summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClint Adams <schizo@debian.org>2009-05-06 21:22:27 -0400
committerClint Adams <schizo@debian.org>2009-05-06 21:22:27 -0400
commit47c0ab9528ec53e5a0a6e761ba3789055e048638 (patch)
tree98fff27a1e9260ee6a8b5597e780236173b28838
parent635221dbdbbaa74dfbb1672cb802d136f8208a1f (diff)
Imported Upstream version 4.2
-rw-r--r--ABOUT-NLS1168
-rw-r--r--BUGS25
-rw-r--r--COPYING898
-rw-r--r--COPYING.DOC322
-rw-r--r--ChangeLog387
-rw-r--r--INSTALL69
-rw-r--r--Makefile.am53
-rw-r--r--Makefile.in597
-rw-r--r--NEWS38
-rw-r--r--README-alpha8
-rw-r--r--THANKS3
-rw-r--r--aclocal.m4264
-rwxr-xr-xautoboot652
-rw-r--r--basicdefs.h42
-rwxr-xr-xbootstrap.sh105
-rwxr-xr-xbootstrap.sh.in101
-rwxr-xr-xbuild-aux/config.guess (renamed from config/config.guess)682
-rwxr-xr-xbuild-aux/config.rpath672
-rwxr-xr-xbuild-aux/config.sub (renamed from config/config.sub)244
-rwxr-xr-xbuild-aux/depcomp (renamed from config/depcomp)219
-rwxr-xr-xbuild-aux/help2man (renamed from config/help2man)0
-rwxr-xr-xbuild-aux/install-sh519
-rw-r--r--build-aux/link-warning.h28
-rwxr-xr-xbuild-aux/mdate-sh (renamed from config/mdate-sh)60
-rwxr-xr-xbuild-aux/missing (renamed from config/missing)175
-rwxr-xr-xbuild-aux/texi2dvi (renamed from config/texi2dvi)0
-rw-r--r--build-aux/texinfo.tex (renamed from config/texinfo.tex)3759
-rw-r--r--config/codeset.m423
-rwxr-xr-xconfig/config.rpath497
-rw-r--r--config/getline.m441
-rw-r--r--config/gettext-ver.m41
-rw-r--r--config/gettext.m4523
-rw-r--r--config/glibc21.m432
-rw-r--r--config/iconv.m496
-rwxr-xr-xconfig/install-sh322
-rw-r--r--config/lcmessage.m432
-rw-r--r--config/progtest.m459
-rw-r--r--config/stdbool.m466
-rw-r--r--config/strverscmp.m424
-rw-r--r--config_h.in555
-rwxr-xr-xconfigure24701
-rw-r--r--configure.ac199
-rw-r--r--doc/Makefile.am52
-rw-r--r--doc/Makefile.in677
-rw-r--r--doc/s-texi1
-rw-r--r--doc/sed-in.texi327
-rw-r--r--doc/sed.148
-rw-r--r--doc/sed.info2586
-rw-r--r--doc/sed.info-11353
-rw-r--r--doc/sed.info-21087
-rw-r--r--doc/sed.texi327
-rw-r--r--doc/sed.x33
-rw-r--r--doc/stamp-vti8
-rw-r--r--doc/version.texi8
-rw-r--r--intl/ChangeLog4
-rw-r--r--intl/Makefile.in337
-rw-r--r--intl/VERSION1
-rw-r--r--intl/bindtextdom.c369
-rwxr-xr-xintl/config.charset440
-rw-r--r--intl/dcgettext.c58
-rw-r--r--intl/dcigettext.c1167
-rw-r--r--intl/dcngettext.c60
-rw-r--r--intl/dgettext.c59
-rw-r--r--intl/dngettext.c61
-rw-r--r--intl/eval-plural.h105
-rw-r--r--intl/explodename.c192
-rw-r--r--intl/finddomain.c198
-rw-r--r--intl/gettext.c64
-rw-r--r--intl/gettextP.h201
-rw-r--r--intl/gmo.h100
-rw-r--r--intl/hash-string.h59
-rw-r--r--intl/intl-compat.c166
-rw-r--r--intl/l10nflist.c400
-rw-r--r--intl/libgnuintl.h137
-rw-r--r--intl/loadinfo.h121
-rw-r--r--intl/loadmsgcat.c445
-rw-r--r--intl/locale.alias78
-rw-r--r--intl/localealias.c419
-rw-r--r--intl/localename.c696
-rw-r--r--intl/ngettext.c68
-rw-r--r--intl/os2compat.c109
-rw-r--r--intl/os2compat.h46
-rw-r--r--intl/osdep.c24
-rw-r--r--intl/plural-exp.c156
-rw-r--r--intl/plural-exp.h122
-rw-r--r--intl/plural.c1322
-rw-r--r--intl/plural.y409
-rw-r--r--intl/textdomain.c142
-rw-r--r--lib/Makefile.am14
-rw-r--r--lib/Makefile.in1386
-rw-r--r--lib/acl-internal.h218
-rw-r--r--lib/acl.h27
-rw-r--r--lib/acl_entries.c58
-rw-r--r--lib/alloca.c173
-rw-r--r--lib/alloca.in.h58
-rw-r--r--lib/btowc.c38
-rwxr-xr-xlib/config.charset683
-rw-r--r--lib/copy-acl.c553
-rw-r--r--lib/errno.in.h157
-rw-r--r--lib/error.c338
-rw-r--r--lib/error.h65
-rw-r--r--lib/exitfail.c24
-rw-r--r--lib/exitfail.h18
-rw-r--r--lib/file-has-acl.c520
-rw-r--r--lib/getdelim.c137
-rw-r--r--lib/getline.c123
-rw-r--r--lib/getopt.c967
-rw-r--r--lib/getopt.h133
-rw-r--r--lib/getopt.in.h225
-rw-r--r--lib/getopt1.c102
-rw-r--r--lib/getopt_int.h130
-rw-r--r--lib/gettext.h272
-rw-r--r--lib/gettimeofday.c147
-rw-r--r--lib/gnulib.mk1052
-rw-r--r--lib/intprops.h77
-rw-r--r--lib/localcharset.c (renamed from intl/localcharset.c)250
-rw-r--r--lib/localcharset.h43
-rw-r--r--lib/lstat.c82
-rw-r--r--lib/malloc.c59
-rw-r--r--lib/mbrlen.c32
-rw-r--r--lib/mbrtowc.c386
-rw-r--r--lib/mbsinit.c47
-rw-r--r--lib/memchr.c200
-rw-r--r--lib/memcmp.c396
-rw-r--r--lib/memmove.c76
-rw-r--r--lib/mkstemp.c86
-rw-r--r--lib/obstack.c473
-rw-r--r--lib/obstack.h353
-rw-r--r--lib/pathmax.h49
-rw-r--r--lib/quote.c40
-rw-r--r--lib/quote.h21
-rw-r--r--lib/quotearg.c799
-rw-r--r--lib/quotearg.h305
-rw-r--r--lib/realloc.c87
-rw-r--r--lib/ref-add.sin (renamed from intl/ref-add.sin)17
-rw-r--r--lib/ref-del.sin (renamed from intl/ref-del.sin)17
-rw-r--r--lib/regcomp.c601
-rw-r--r--lib/regex.c31
-rw-r--r--lib/regex.h (renamed from lib/regex_.h)417
-rw-r--r--lib/regex_internal.c482
-rw-r--r--lib/regex_internal.h324
-rw-r--r--lib/regexec.c962
-rw-r--r--lib/set-mode-acl.c490
-rw-r--r--lib/stat-macros.h3
-rw-r--r--lib/stdbool.in.h121
-rw-r--r--lib/stdbool_.h47
-rw-r--r--lib/stdint.in.h569
-rw-r--r--lib/stdio-write.c148
-rw-r--r--lib/stdio.in.h526
-rw-r--r--lib/stdlib.in.h383
-rw-r--r--lib/streq.h178
-rw-r--r--lib/strerror.c353
-rw-r--r--lib/string.in.h607
-rw-r--r--lib/strverscmp.c37
-rw-r--r--lib/strverscmp.h20
-rw-r--r--lib/sys_stat.in.h363
-rw-r--r--lib/sys_time.in.h66
-rw-r--r--lib/tempname.c314
-rw-r--r--lib/tempname.h39
-rw-r--r--lib/unistd.in.h580
-rw-r--r--lib/unlocked-io.h136
-rw-r--r--lib/verify.h140
-rw-r--r--lib/wchar.in.h308
-rw-r--r--lib/wcrtomb.c53
-rw-r--r--lib/wctob.c37
-rw-r--r--lib/wctype.in.h186
-rw-r--r--lib/xalloc-die.c41
-rw-r--r--lib/xalloc.h280
-rw-r--r--lib/xmalloc.c118
-rw-r--r--m4/00gnulib.m430
-rw-r--r--m4/acl.m4150
-rw-r--r--m4/alloca.m446
-rw-r--r--m4/btowc.m468
-rw-r--r--m4/codeset.m421
-rw-r--r--m4/errno_h.m4113
-rw-r--r--m4/error.m422
-rw-r--r--m4/exitfail.m413
-rw-r--r--m4/extensions.m4104
-rw-r--r--m4/getdelim.m435
-rw-r--r--m4/getline.m480
-rw-r--r--m4/getopt.m483
-rw-r--r--m4/gettext.m4382
-rw-r--r--m4/gettimeofday.m4101
-rw-r--r--m4/glibc21.m430
-rw-r--r--m4/gnulib-common.m4124
-rw-r--r--m4/gnulib-comp.m4405
-rw-r--r--m4/iconv.m4180
-rw-r--r--m4/include_next.m4171
-rw-r--r--m4/inline.m440
-rw-r--r--m4/intlmacosx.m451
-rw-r--r--m4/lib-ld.m4 (renamed from config/lib-ld.m4)57
-rw-r--r--m4/lib-link.m4 (renamed from config/lib-link.m4)400
-rw-r--r--m4/lib-prefix.m4 (renamed from config/lib-prefix.m4)100
-rw-r--r--m4/localcharset.m416
-rw-r--r--m4/locale-fr.m4185
-rw-r--r--m4/locale-ja.m4107
-rw-r--r--m4/locale-zh.m492
-rw-r--r--m4/longlong.m4106
-rw-r--r--m4/lstat.m426
-rw-r--r--m4/malloc.m441
-rw-r--r--m4/mbrlen.m4197
-rw-r--r--m4/mbrtowc.m4382
-rw-r--r--m4/mbsinit.m430
-rw-r--r--m4/mbstate_t.m434
-rw-r--r--m4/mkstemp.m456
-rw-r--r--m4/multiarch.m466
-rw-r--r--m4/nls.m431
-rw-r--r--m4/pathmax.m412
-rw-r--r--m4/po.m4449
-rw-r--r--m4/progtest.m492
-rw-r--r--m4/quote.m413
-rw-r--r--m4/quotearg.m410
-rw-r--r--m4/realloc.m423
-rw-r--r--m4/regex.m4221
-rw-r--r--m4/ssize_t.m421
-rw-r--r--m4/stdbool.m4115
-rw-r--r--m4/stdint.m4472
-rw-r--r--m4/stdio_h.m4133
-rw-r--r--m4/stdlib_h.m473
-rw-r--r--m4/strerror.m468
-rw-r--r--m4/string_h.m492
-rw-r--r--m4/strverscmp.m423
-rw-r--r--m4/sys_stat_h.m459
-rw-r--r--m4/sys_time_h.m457
-rw-r--r--m4/tempname.m422
-rw-r--r--m4/threadlib.m4313
-rw-r--r--m4/unistd_h.m483
-rw-r--r--m4/unlocked-io.m441
-rw-r--r--m4/wchar.m499
-rw-r--r--m4/wcrtomb.m488
-rw-r--r--m4/wctob.m491
-rw-r--r--m4/wctype.m474
-rw-r--r--m4/wint_t.m428
-rw-r--r--m4/xalloc.m424
-rw-r--r--po/LINGUAS37
-rw-r--r--po/Makefile.in.in183
-rw-r--r--po/Makevars19
-rw-r--r--po/POTFILES.in2
-rw-r--r--po/Rules-quot5
-rw-r--r--po/af.gmobin3842 -> 3865 bytes
-rw-r--r--po/af.po306
-rw-r--r--po/ca.gmobin9708 -> 10529 bytes
-rw-r--r--po/ca.po329
-rw-r--r--po/cs.gmobin2001 -> 10583 bytes
-rw-r--r--po/cs.po527
-rw-r--r--po/da.gmobin3913 -> 3937 bytes
-rw-r--r--po/da.po304
-rw-r--r--po/de.gmobin4227 -> 10049 bytes
-rw-r--r--po/de.po378
-rw-r--r--po/el.gmobin2321 -> 13807 bytes
-rw-r--r--po/el.po669
-rw-r--r--po/eo.gmobin3860 -> 10007 bytes
-rw-r--r--po/eo.po456
-rw-r--r--po/es.gmobin4111 -> 10693 bytes
-rw-r--r--po/es.po476
-rw-r--r--po/et.gmobin8954 -> 8977 bytes
-rw-r--r--po/et.po225
-rw-r--r--po/eu.gmobin0 -> 2081 bytes
-rw-r--r--po/eu.po459
-rw-r--r--po/fi.gmobin4086 -> 10755 bytes
-rw-r--r--po/fi.po433
-rw-r--r--po/fr.gmobin9983 -> 10007 bytes
-rw-r--r--po/fr.po227
-rw-r--r--po/ga.gmobin9593 -> 10754 bytes
-rw-r--r--po/ga.po403
-rw-r--r--po/gl.gmobin4057 -> 10635 bytes
-rw-r--r--po/gl.po375
-rw-r--r--po/he.gmobin1901 -> 1925 bytes
-rw-r--r--po/he.po289
-rw-r--r--po/hr.gmobin2001 -> 2024 bytes
-rw-r--r--po/hr.po283
-rw-r--r--po/hu.gmobin4057 -> 9136 bytes
-rw-r--r--po/hu.po330
-rw-r--r--po/id.gmobin3951 -> 10329 bytes
-rw-r--r--po/id.po485
-rw-r--r--po/it.gmobin9721 -> 10716 bytes
-rw-r--r--po/it.po244
-rw-r--r--po/ja.gmobin9067 -> 9046 bytes
-rw-r--r--po/ja.po220
-rw-r--r--po/ko.gmobin1924 -> 1947 bytes
-rw-r--r--po/ko.po293
-rw-r--r--po/nl.gmobin9359 -> 10355 bytes
-rw-r--r--po/nl.po460
-rw-r--r--po/pl.gmobin9957 -> 10763 bytes
-rw-r--r--po/pl.po235
-rw-r--r--po/pt.gmobin0 -> 10624 bytes
-rw-r--r--po/pt.po501
-rw-r--r--po/pt_BR.gmobin4030 -> 10688 bytes
-rw-r--r--po/pt_BR.po340
-rw-r--r--po/remove-potcdate.sin19
-rw-r--r--po/ro.gmobin4050 -> 9711 bytes
-rw-r--r--po/ro.po355
-rw-r--r--po/ru.gmobin9781 -> 13550 bytes
-rw-r--r--po/ru.po421
-rw-r--r--po/sed.pot215
-rw-r--r--po/sk.gmobin4333 -> 10799 bytes
-rw-r--r--po/sk.po371
-rw-r--r--po/sl.gmobin4198 -> 10441 bytes
-rw-r--r--po/sl.po508
-rw-r--r--po/sr.gmobin4915 -> 11683 bytes
-rw-r--r--po/sr.po443
-rw-r--r--po/stamp-po1
-rw-r--r--po/sv.gmobin9548 -> 10422 bytes
-rw-r--r--po/sv.po529
-rw-r--r--po/tr.gmobin4105 -> 9396 bytes
-rw-r--r--po/tr.po444
-rw-r--r--po/uk.gmobin0 -> 3352 bytes
-rw-r--r--po/uk.po560
-rw-r--r--po/vi.gmobin0 -> 11762 bytes
-rw-r--r--po/vi.po502
-rw-r--r--po/zh_CN.gmobin1383 -> 9751 bytes
-rw-r--r--po/zh_CN.po441
-rw-r--r--po/zh_TW.gmobin0 -> 9185 bytes
-rw-r--r--po/zh_TW.po486
-rw-r--r--sed/Makefile.am11
-rw-r--r--sed/Makefile.in519
-rw-r--r--sed/compile.c84
-rw-r--r--sed/execute.c460
-rw-r--r--sed/fmt.c3
-rw-r--r--sed/mbcs.c14
-rw-r--r--sed/regexp.c24
-rw-r--r--sed/sed.c66
-rw-r--r--sed/sed.h14
-rw-r--r--sed/utils.c (renamed from lib/utils.c)197
-rw-r--r--sed/utils.h (renamed from lib/utils.h)6
-rw-r--r--testsuite/Makefile.am31
-rw-r--r--testsuite/Makefile.in600
-rw-r--r--testsuite/Makefile.tests127
-rw-r--r--testsuite/SPENCER.tests4
-rw-r--r--testsuite/badenc.good9
-rw-r--r--testsuite/badenc.inp9
-rw-r--r--testsuite/badenc.sed1
-rw-r--r--testsuite/bsd.good18
-rwxr-xr-xtestsuite/bsd.sh1
-rw-r--r--testsuite/bug-regex10.c4
-rw-r--r--testsuite/bug-regex11.c2
-rw-r--r--testsuite/bug-regex12.c2
-rw-r--r--testsuite/bug-regex13.c2
-rw-r--r--testsuite/bug-regex14.c2
-rw-r--r--testsuite/bug-regex15.c4
-rw-r--r--testsuite/bug-regex16.c4
-rw-r--r--testsuite/bug-regex21.c2
-rw-r--r--testsuite/bug-regex27.c65
-rw-r--r--testsuite/bug-regex28.c76
-rw-r--r--testsuite/bug-regex7.c4
-rw-r--r--testsuite/bug-regex8.c4
-rw-r--r--testsuite/bug-regex9.c2
-rw-r--r--testsuite/insert.good3
-rw-r--r--testsuite/insert.inp2
-rw-r--r--testsuite/insert.sed1
-rw-r--r--testsuite/readin.in21
-rw-r--r--testsuite/runptests.c6
-rwxr-xr-xtestsuite/runtest15
-rw-r--r--testsuite/runtests.c20
-rw-r--r--testsuite/tst-boost.c2
-rw-r--r--testsuite/tst-pcre.c2
-rw-r--r--testsuite/tst-regex2.c4
-rw-r--r--testsuite/tst-rxspencer.c2
-rw-r--r--testsuite/utf8-1.good1
-rw-r--r--testsuite/utf8-1.inp1
-rw-r--r--testsuite/utf8-1.sed1
-rw-r--r--testsuite/utf8-2.good1
-rw-r--r--testsuite/utf8-2.inp1
-rw-r--r--testsuite/utf8-2.sed1
-rw-r--r--testsuite/utf8-3.good1
-rw-r--r--testsuite/utf8-3.inp1
-rw-r--r--testsuite/utf8-3.sed1
-rw-r--r--testsuite/utf8-4.good1
-rw-r--r--testsuite/utf8-4.inp1
-rw-r--r--testsuite/utf8-4.sed1
-rw-r--r--testsuite/version.gin5
371 files changed, 68427 insertions, 29354 deletions
diff --git a/ABOUT-NLS b/ABOUT-NLS
index f083395..3575535 100644
--- a/ABOUT-NLS
+++ b/ABOUT-NLS
@@ -1,10 +1,11 @@
-Notes on the Free Translation Project
-*************************************
+1 Notes on the Free Translation Project
+***************************************
- Free software is going international! The Free Translation Project
-is a way to get maintainers of free software, translators, and users all
-together, so that will gradually become able to speak many languages.
-A few packages already provide translations for their messages.
+Free software is going international! The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages. A few packages already provide translations for their
+messages.
If you found this `ABOUT-NLS' file inside a distribution, you may
assume that the distributed package does use GNU `gettext' internally,
@@ -15,17 +16,17 @@ this package with messages translated.
Installers will find here some useful hints. These notes also
explain how users should proceed for getting the programs to use the
available translations. They tell how people wanting to contribute and
-work at translations should contact the appropriate team.
+work on translations can contact the appropriate team.
When reporting bugs in the `intl/' directory or bugs which may be
related to internationalization, you should tell about the version of
`gettext' which is used. The information can be found in the
`intl/VERSION' file, in internationalized packages.
-Quick configuration advice
-==========================
+1.1 Quick configuration advice
+==============================
- If you want to exploit the full power of internationalization, you
+If you want to exploit the full power of internationalization, you
should configure it using
./configure --with-included-gettext
@@ -45,37 +46,37 @@ to change to GNU `gettext' as soon as possible.
you have installed a recent copy of the GNU gettext package with the
included `libintl'.
-INSTALL Matters
-===============
+1.2 INSTALL Matters
+===================
- Some packages are "localizable" when properly installed; the
-programs they contain can be made to speak your own native language.
-Most such packages use GNU `gettext'. Other packages have their own
-ways to internationalization, predating GNU `gettext'.
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language. Most such
+packages use GNU `gettext'. Other packages have their own ways to
+internationalization, predating GNU `gettext'.
By default, this package will be installed to allow translation of
messages. It will automatically detect whether the system already
-provides the GNU `gettext' functions. If not, the GNU `gettext' own
-library will be used. This library is wholly contained within this
-package, usually in the `intl/' subdirectory, so prior installation of
-the GNU `gettext' package is _not_ required. Installers may use
-special options at configuration time for changing the default
-behaviour. The commands:
+provides the GNU `gettext' functions. If not, the included GNU
+`gettext' library will be used. This library is wholly contained
+within this package, usually in the `intl/' subdirectory, so prior
+installation of the GNU `gettext' package is _not_ required.
+Installers may use special options at configuration time for changing
+the default behaviour. The commands:
./configure --with-included-gettext
./configure --disable-nls
-will respectively bypass any pre-existing `gettext' to use the
+will, respectively, bypass any pre-existing `gettext' to use the
internationalizing routines provided within this package, or else,
_totally_ disable translation of messages.
When you already have GNU `gettext' installed on your system and run
configure without an option for your new package, `configure' will
probably detect the previously built and installed `libintl.a' file and
-will decide to use this. This might be not what is desirable. You
-should use the more recent version of the GNU `gettext' library. I.e.
-if the file `intl/VERSION' shows that the library which comes with this
-package is more recent, you should use
+will decide to use this. This might not be desirable. You should use
+the more recent version of the GNU `gettext' library. I.e. if the file
+`intl/VERSION' shows that the library which comes with this package is
+more recent, you should use
./configure --with-included-gettext
@@ -86,7 +87,7 @@ and therefore it will not be used. The reason is that even an
emulation of `gettext' on top of `catgets' could not provide all the
extensions of the GNU `gettext' library.
- Internationalized packages have usually many `po/LL.po' files, where
+ Internationalized packages usually have many `po/LL.po' files, where
LL gives an ISO 639 two-letter code identifying the language. Unless
translations have been forbidden at `configure' time by using the
`--disable-nls' switch, all available translations are installed
@@ -95,10 +96,10 @@ may be set, prior to configuration, to limit the installed set.
`LINGUAS' should then contain a space separated list of two-letter
codes, stating which languages are allowed.
-Using This Package
-==================
+1.3 Using This Package
+======================
- As a user, if your language has been installed for this package, you
+As a user, if your language has been installed for this package, you
only have to set the `LANG' environment variable to the appropriate
`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
and `CC' is an ISO 3166 two-letter country code. For example, let's
@@ -117,8 +118,8 @@ country code serves to distinguish the dialects.
language and `CC' denoting the country, is the one use on systems based
on GNU libc. On other systems, some variations of this scheme are
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
-locales supported by your system for your country by running the command
-`locale -a | grep '^LL''.
+locales supported by your system for your language by running the
+command `locale -a | grep '^LL''.
Not all programs have translations for all languages. By default, an
English message is shown in place of a nonexistent translation. If you
@@ -131,16 +132,23 @@ system libraries. For example, some Swedish users who would rather
read translations in German than English for when Swedish is not
available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+ Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003). During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
In the `LANGUAGE' environment variable, but not in the `LANG'
environment variable, `LL_CC' combinations can be abbreviated as `LL'
to denote the language's main dialect. For example, `de' is equivalent
to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
(Portuguese as spoken in Portugal) in this context.
-Translating Teams
-=================
+1.4 Translating Teams
+=====================
- For the Free Translation Project to be a success, we need interested
+For the Free Translation Project to be a success, we need interested
people who like their own language and write it well, and who are also
able to synergize with other translators speaking the same language.
Each translation team has its own mailing list. The up-to-date list of
@@ -167,194 +175,904 @@ coordinator for all translator teams.
the terminology in use. Proven linguistic skill are praised more than
programming skill, here.
-Available Packages
-==================
+1.5 Available Packages
+======================
- Languages are not equally supported in all packages. The following
-matrix shows the current state of internationalization, as of January
-2002. The matrix shows, in regard of each package, for which languages
+Languages are not equally supported in all packages. The following
+matrix shows the current state of internationalization, as of July
+2006. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination, with a
translation percentage of at least 50%.
- Ready PO files bg ca cs da de el en eo es et fi fr
- +-------------------------------------+
- a2ps | [] [] [] [] |
- bash | [] [] [] [] |
- bfd | [] [] |
- binutils | [] [] |
- bison | [] [] [] |
- clisp | [] [] [] [] |
- cpio | [] [] [] [] |
- diffutils | [] [] [] [] [] [] |
- enscript | [] [] |
- error | [] [] |
- fetchmail | () [] [] [] () |
- fileutils | [] [] [] [] [] |
- findutils | [] [] [] [] [] |
- flex | [] [] [] |
- gas | [] |
- gawk | [] [] |
- gcal | [] [] |
- gcc | [] [] |
- gettext | [] [] [] [] [] |
- gnupg | [] [] [] [] [] [] |
- gprof | [] [] |
- grep | [] [] [] [] [] [] |
- hello | [] [] [] [] [] [] [] [] |
- id-utils | [] [] [] |
- indent | [] [] [] [] |
- jpilot | () [] [] [] |
- jwhois | [] [] |
- kbd | [] |
- ld | [] [] |
- libc | [] [] [] [] [] [] [] |
- lilypond | [] [] |
- lynx | [] [] [] [] |
- m4 | [] [] [] [] [] |
- make | [] [] [] [] |
- mysecretdiary | [] [] |
- nano | [] () [] [] [] [] |
- nano_1_0 | [] () [] [] [] [] |
- opcodes | [] [] [] |
- parted | [] [] [] [] |
- ptx | [] [] [] [] [] |
- python | |
- recode | [] [] [] [] [] [] |
- sed | [] [] [] [] [] [] [] [] |
- sh-utils | [] [] [] [] [] [] [] [] |
- sharutils | [] [] [] [] [] [] |
- sketch | () [] () |
- soundtracker | [] [] [] |
- sp | |
- tar | [] [] [] [] [] [] |
- texinfo | [] [] [] [] [] |
- textutils | [] [] [] [] |
- util-linux | [] [] [] [] |
- wdiff | [] [] [] [] [] |
- wget | [] [] [] [] [] [] [] [] |
- +-------------------------------------+
- bg ca cs da de el en eo es et fi fr
- 0 8 12 31 36 9 1 9 37 15 1 49
-
- gl he hr hu id it ja ko lv nb nl nn
- +-------------------------------------+
- a2ps | () () [] |
- bash | |
- bfd | [] |
- binutils | [] |
- bison | [] |
- clisp | [] |
- cpio | [] [] [] |
- diffutils | [] [] |
- enscript | [] |
- error | [] |
- fetchmail | |
- fileutils | [] [] |
- findutils | [] [] [] [] [] [] |
- flex | [] |
- gas | |
- gawk | [] |
- gcal | |
- gcc | [] |
- gettext | [] |
- gnupg | [] [] [] |
- gprof | |
- grep | [] [] |
- hello | [] [] [] [] [] [] [] [] [] |
- id-utils | [] |
- indent | [] [] [] |
- jpilot | () () |
- jwhois | |
- kbd | |
- ld | |
- libc | [] [] [] [] |
- lilypond | [] [] |
- lynx | [] [] |
- m4 | [] [] [] [] |
- make | [] [] [] [] |
- mysecretdiary | |
- nano | [] [] [] () () [] |
- nano_1_0 | [] [] [] () () [] |
- opcodes | |
- parted | [] [] [] |
- ptx | [] [] [] [] |
- python | |
- recode | [] [] [] |
- sed | [] [] [] [] [] [] [] |
- sh-utils | [] [] [] [] [] |
- sharutils | [] [] [] |
- sketch | () |
- soundtracker | [] |
- sp | |
- tar | [] [] [] |
- texinfo | [] [] [] |
- textutils | [] [] |
- util-linux | () [] |
- wdiff | |
- wget | [] [] [] [] [] |
- +-------------------------------------+
- gl he hr hu id it ja ko lv nb nl nn
- 20 6 1 3 6 11 22 9 1 6 17 4
-
- no pl pt pt_BR ru sk sl sv tr uk zh
- +-------------------------------------+
- a2ps | () () () [] [] [] () | 8
- bash | | 4
- bfd | [] [] | 5
- binutils | [] | 4
- bison | [] [] [] | 7
- clisp | | 5
- cpio | [] [] [] [] | 11
- diffutils | [] [] [] | 11
- enscript | [] [] [] | 6
- error | [] [] | 5
- fetchmail | () () | 3
- fileutils | [] [] [] [] | 11
- findutils | [] [] [] [] [] [] | 17
- flex | [] [] | 6
- gas | [] | 2
- gawk | [] [] | 5
- gcal | [] | 3
- gcc | [] | 4
- gettext | [] [] [] [] | 10
- gnupg | [] [] [] | 12
- gprof | [] [] | 4
- grep | [] [] [] [] [] | 13
- hello | [] [] [] [] [] [] [] | 24
- id-utils | [] [] | 6
- indent | [] [] [] [] | 11
- jpilot | () () | 3
- jwhois | () () | 2
- kbd | [] [] | 3
- ld | [] [] | 4
- libc | [] [] [] [] [] [] | 17
- lilypond | [] | 5
- lynx | [] [] [] | 9
- m4 | [] [] [] | 12
- make | [] [] [] [] | 12
- mysecretdiary | [] | 3
- nano | () [] [] [] | 12
- nano_1_0 | () [] [] [] | 12
- opcodes | [] [] | 5
- parted | [] [] [] | 10
- ptx | [] [] [] [] [] [] | 15
- python | | 0
- recode | [] [] [] [] | 13
- sed | [] [] [] [] [] [] | 21
- sh-utils | [] [] [] [] [] [] [] [] [] | 22
- sharutils | [] [] | 11
- sketch | () | 1
- soundtracker | | 4
- sp | | 0
- tar | [] [] [] [] [] [] [] | 16
- texinfo | [] [] | 10
- textutils | [] [] | 8
- util-linux | [] [] [] | 8
- wdiff | [] [] [] [] | 9
- wget | [] [] [] [] [] [] | 19
- +-------------------------------------+
- 35 teams no pl pt pt_BR ru sk sl sv tr uk zh
- 54 domains 5 12 2 11 25 10 11 39 29 4 1 463
+ Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo
+ +----------------------------------------------------+
+ GNUnet | [] |
+ a2ps | [] [] [] [] [] |
+ aegis | () |
+ ant-phone | () |
+ anubis | [] |
+ ap-utils | |
+ aspell | [] [] [] [] |
+ bash | [] [] [] |
+ batchelor | [] |
+ bfd | |
+ bibshelf | [] |
+ binutils | [] |
+ bison | [] [] |
+ bison-runtime | [] |
+ bluez-pin | [] [] [] [] [] |
+ cflow | [] |
+ clisp | [] [] |
+ console-tools | [] [] |
+ coreutils | [] [] [] [] |
+ cpio | |
+ cpplib | [] [] [] |
+ cryptonit | [] |
+ darkstat | [] () [] |
+ dialog | [] [] [] [] [] [] |
+ diffutils | [] [] [] [] [] [] |
+ doodle | [] |
+ e2fsprogs | [] [] |
+ enscript | [] [] [] [] |
+ error | [] [] [] [] |
+ fetchmail | [] [] () [] |
+ fileutils | [] [] |
+ findutils | [] [] [] |
+ flex | [] [] [] |
+ fslint | [] |
+ gas | |
+ gawk | [] [] [] |
+ gbiff | [] |
+ gcal | [] |
+ gcc | [] |
+ gettext-examples | [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] |
+ gettext-tools | [] [] |
+ gimp-print | [] [] [] [] |
+ gip | [] |
+ gliv | [] |
+ glunarclock | [] |
+ gmult | [] [] |
+ gnubiff | () |
+ gnucash | () () [] |
+ gnucash-glossary | [] () |
+ gnuedu | |
+ gnulib | [] [] [] [] [] [] |
+ gnunet-gtk | |
+ gnutls | |
+ gpe-aerial | [] [] |
+ gpe-beam | [] [] |
+ gpe-calendar | [] [] |
+ gpe-clock | [] [] |
+ gpe-conf | [] [] |
+ gpe-contacts | |
+ gpe-edit | [] |
+ gpe-filemanager | |
+ gpe-go | [] |
+ gpe-login | [] [] |
+ gpe-ownerinfo | [] [] |
+ gpe-package | |
+ gpe-sketchbook | [] [] |
+ gpe-su | [] [] |
+ gpe-taskmanager | [] [] |
+ gpe-timesheet | [] |
+ gpe-today | [] [] |
+ gpe-todo | |
+ gphoto2 | [] [] [] [] |
+ gprof | [] [] |
+ gpsdrive | () () |
+ gramadoir | [] [] |
+ grep | [] [] [] [] [] [] |
+ gretl | |
+ gsasl | |
+ gss | |
+ gst-plugins | [] [] [] [] |
+ gst-plugins-base | [] [] [] |
+ gst-plugins-good | [] [] [] [] [] [] [] |
+ gstreamer | [] [] [] [] [] [] [] |
+ gtick | [] () |
+ gtkam | [] [] [] |
+ gtkorphan | [] [] |
+ gtkspell | [] [] [] [] |
+ gutenprint | [] |
+ hello | [] [] [] [] [] |
+ id-utils | [] [] |
+ impost | |
+ indent | [] [] [] |
+ iso_3166 | [] [] |
+ iso_3166_1 | [] [] [] [] [] |
+ iso_3166_2 | |
+ iso_3166_3 | [] |
+ iso_4217 | [] |
+ iso_639 | [] [] |
+ jpilot | [] |
+ jtag | |
+ jwhois | |
+ kbd | [] [] [] [] |
+ keytouch | |
+ keytouch-editor | |
+ keytouch-keyboa... | |
+ latrine | () |
+ ld | [] |
+ leafpad | [] [] [] [] [] |
+ libc | [] [] [] [] [] |
+ libexif | [] |
+ libextractor | [] |
+ libgpewidget | [] [] [] |
+ libgpg-error | [] |
+ libgphoto2 | [] [] |
+ libgphoto2_port | [] [] |
+ libgsasl | |
+ libiconv | [] [] |
+ libidn | [] [] |
+ lifelines | [] () |
+ lilypond | [] |
+ lingoteach | |
+ lynx | [] [] [] [] |
+ m4 | [] [] [] [] |
+ mailutils | [] |
+ make | [] [] |
+ man-db | [] () [] [] |
+ minicom | [] [] [] |
+ mysecretdiary | [] [] |
+ nano | [] [] () [] |
+ nano_1_0 | [] () [] [] |
+ opcodes | [] |
+ parted | |
+ pilot-qof | [] |
+ psmisc | [] |
+ pwdutils | |
+ python | |
+ qof | |
+ radius | [] |
+ recode | [] [] [] [] [] [] |
+ rpm | [] [] |
+ screem | |
+ scrollkeeper | [] [] [] [] [] [] [] [] |
+ sed | [] [] [] |
+ sh-utils | [] [] |
+ shared-mime-info | [] [] [] |
+ sharutils | [] [] [] [] [] [] |
+ shishi | |
+ silky | |
+ skencil | [] () |
+ sketch | [] () |
+ solfege | |
+ soundtracker | [] [] |
+ sp | [] |
+ stardict | [] |
+ system-tools-ba... | [] [] [] [] [] [] [] [] [] |
+ tar | [] |
+ texinfo | [] [] [] |
+ textutils | [] [] [] |
+ tin | () () |
+ tp-robot | [] |
+ tuxpaint | [] [] [] [] [] |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux | [] [] [] [] |
+ vorbis-tools | [] [] [] [] |
+ wastesedge | () |
+ wdiff | [] [] [] [] |
+ wget | [] [] |
+ xchat | [] [] [] [] [] |
+ xkeyboard-config | |
+ xpad | [] [] |
+ +----------------------------------------------------+
+ af am ar az be bg bs ca cs cy da de el en en_GB eo
+ 11 0 1 2 8 21 1 42 43 2 62 99 18 1 16 16
+
+ es et eu fa fi fr ga gl gu he hi hr hu id is it
+ +--------------------------------------------------+
+ GNUnet | |
+ a2ps | [] [] [] () |
+ aegis | |
+ ant-phone | [] |
+ anubis | [] |
+ ap-utils | [] [] |
+ aspell | [] [] [] |
+ bash | [] [] [] |
+ batchelor | [] [] |
+ bfd | [] |
+ bibshelf | [] [] [] |
+ binutils | [] [] [] |
+ bison | [] [] [] [] [] [] |
+ bison-runtime | [] [] [] [] [] |
+ bluez-pin | [] [] [] [] [] |
+ cflow | |
+ clisp | [] [] |
+ console-tools | |
+ coreutils | [] [] [] [] [] [] |
+ cpio | [] [] [] |
+ cpplib | [] [] |
+ cryptonit | [] |
+ darkstat | [] () [] [] [] |
+ dialog | [] [] [] [] [] [] [] [] |
+ diffutils | [] [] [] [] [] [] [] [] [] |
+ doodle | [] [] |
+ e2fsprogs | [] [] [] |
+ enscript | [] [] [] |
+ error | [] [] [] [] [] |
+ fetchmail | [] |
+ fileutils | [] [] [] [] [] [] |
+ findutils | [] [] [] [] |
+ flex | [] [] [] |
+ fslint | [] |
+ gas | [] [] |
+ gawk | [] [] [] [] |
+ gbiff | [] |
+ gcal | [] [] |
+ gcc | [] |
+ gettext-examples | [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] [] |
+ gettext-tools | [] [] [] |
+ gimp-print | [] [] |
+ gip | [] [] [] |
+ gliv | () |
+ glunarclock | [] [] [] |
+ gmult | [] [] [] |
+ gnubiff | () () |
+ gnucash | () () () |
+ gnucash-glossary | [] [] |
+ gnuedu | [] |
+ gnulib | [] [] [] [] [] [] [] [] |
+ gnunet-gtk | |
+ gnutls | |
+ gpe-aerial | [] [] |
+ gpe-beam | [] [] |
+ gpe-calendar | [] [] [] [] |
+ gpe-clock | [] [] [] [] |
+ gpe-conf | [] |
+ gpe-contacts | [] [] |
+ gpe-edit | [] [] [] [] |
+ gpe-filemanager | [] |
+ gpe-go | [] [] [] |
+ gpe-login | [] [] [] |
+ gpe-ownerinfo | [] [] [] [] [] |
+ gpe-package | [] |
+ gpe-sketchbook | [] [] |
+ gpe-su | [] [] [] [] |
+ gpe-taskmanager | [] [] [] |
+ gpe-timesheet | [] [] [] [] |
+ gpe-today | [] [] [] [] |
+ gpe-todo | [] |
+ gphoto2 | [] [] [] [] [] |
+ gprof | [] [] [] [] |
+ gpsdrive | () () [] () |
+ gramadoir | [] [] |
+ grep | [] [] [] [] [] [] [] [] [] [] [] [] |
+ gretl | [] [] [] |
+ gsasl | [] |
+ gss | [] |
+ gst-plugins | [] [] [] |
+ gst-plugins-base | [] [] |
+ gst-plugins-good | [] [] [] |
+ gstreamer | [] [] [] |
+ gtick | [] [] [] [] [] |
+ gtkam | [] [] [] [] |
+ gtkorphan | [] [] |
+ gtkspell | [] [] [] [] [] [] |
+ gutenprint | [] |
+ hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
+ id-utils | [] [] [] [] [] |
+ impost | [] [] |
+ indent | [] [] [] [] [] [] [] [] [] [] |
+ iso_3166 | [] [] [] |
+ iso_3166_1 | [] [] [] [] [] [] [] |
+ iso_3166_2 | [] |
+ iso_3166_3 | [] |
+ iso_4217 | [] [] [] [] |
+ iso_639 | [] [] [] [] [] |
+ jpilot | [] [] |
+ jtag | [] |
+ jwhois | [] [] [] [] [] |
+ kbd | [] [] |
+ keytouch | [] |
+ keytouch-editor | [] |
+ keytouch-keyboa... | [] |
+ latrine | [] [] [] |
+ ld | [] [] |
+ leafpad | [] [] [] [] [] [] |
+ libc | [] [] [] [] [] |
+ libexif | [] |
+ libextractor | [] |
+ libgpewidget | [] [] [] [] [] |
+ libgpg-error | |
+ libgphoto2 | [] [] [] |
+ libgphoto2_port | [] [] |
+ libgsasl | [] [] |
+ libiconv | [] |
+ libidn | [] [] |
+ lifelines | () |
+ lilypond | [] |
+ lingoteach | [] [] [] |
+ lynx | [] [] [] |
+ m4 | [] [] [] [] |
+ mailutils | [] [] |
+ make | [] [] [] [] [] [] [] [] |
+ man-db | () |
+ minicom | [] [] [] [] |
+ mysecretdiary | [] [] [] |
+ nano | [] () [] [] [] [] |
+ nano_1_0 | [] [] [] [] [] |
+ opcodes | [] [] [] [] |
+ parted | [] [] [] [] |
+ pilot-qof | |
+ psmisc | [] [] [] |
+ pwdutils | |
+ python | |
+ qof | |
+ radius | [] [] |
+ recode | [] [] [] [] [] [] [] [] |
+ rpm | [] [] |
+ screem | |
+ scrollkeeper | [] [] [] |
+ sed | [] [] [] [] [] |
+ sh-utils | [] [] [] [] [] [] [] |
+ shared-mime-info | [] [] [] [] [] [] |
+ sharutils | [] [] [] [] [] [] [] [] |
+ shishi | |
+ silky | [] |
+ skencil | [] [] |
+ sketch | [] [] |
+ solfege | [] |
+ soundtracker | [] [] [] |
+ sp | [] |
+ stardict | [] |
+ system-tools-ba... | [] [] [] [] [] [] [] [] |
+ tar | [] [] [] [] [] [] |
+ texinfo | [] [] |
+ textutils | [] [] [] [] [] |
+ tin | [] () |
+ tp-robot | [] [] [] [] |
+ tuxpaint | [] [] |
+ unicode-han-tra... | |
+ unicode-transla... | [] [] |
+ util-linux | [] [] [] [] [] [] [] |
+ vorbis-tools | [] [] |
+ wastesedge | () |
+ wdiff | [] [] [] [] [] [] [] [] |
+ wget | [] [] [] [] [] [] [] [] |
+ xchat | [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] [] |
+ xpad | [] [] [] |
+ +--------------------------------------------------+
+ es et eu fa fi fr ga gl gu he hi hr hu id is it
+ 89 21 16 2 41 119 61 14 1 8 1 6 61 30 0 53
+
+ ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
+ +--------------------------------------------------+
+ GNUnet | |
+ a2ps | () [] [] () |
+ aegis | () |
+ ant-phone | [] |
+ anubis | [] [] [] |
+ ap-utils | [] |
+ aspell | [] [] |
+ bash | [] |
+ batchelor | [] [] |
+ bfd | |
+ bibshelf | [] |
+ binutils | |
+ bison | [] [] [] |
+ bison-runtime | [] [] [] |
+ bluez-pin | [] [] [] |
+ cflow | |
+ clisp | [] |
+ console-tools | |
+ coreutils | [] |
+ cpio | |
+ cpplib | [] |
+ cryptonit | [] |
+ darkstat | [] [] |
+ dialog | [] [] |
+ diffutils | [] [] [] |
+ doodle | |
+ e2fsprogs | [] |
+ enscript | [] |
+ error | [] |
+ fetchmail | [] [] |
+ fileutils | [] [] |
+ findutils | [] |
+ flex | [] [] |
+ fslint | [] [] |
+ gas | |
+ gawk | [] [] |
+ gbiff | [] |
+ gcal | |
+ gcc | |
+ gettext-examples | [] [] |
+ gettext-runtime | [] [] [] |
+ gettext-tools | [] [] |
+ gimp-print | [] [] |
+ gip | [] [] |
+ gliv | [] |
+ glunarclock | [] [] |
+ gmult | [] [] |
+ gnubiff | |
+ gnucash | () () |
+ gnucash-glossary | [] |
+ gnuedu | |
+ gnulib | [] [] [] [] |
+ gnunet-gtk | |
+ gnutls | |
+ gpe-aerial | [] |
+ gpe-beam | [] |
+ gpe-calendar | [] |
+ gpe-clock | [] [] |
+ gpe-conf | [] [] |
+ gpe-contacts | [] |
+ gpe-edit | [] [] |
+ gpe-filemanager | [] |
+ gpe-go | [] [] |
+ gpe-login | [] [] |
+ gpe-ownerinfo | [] |
+ gpe-package | [] |
+ gpe-sketchbook | [] [] |
+ gpe-su | [] [] |
+ gpe-taskmanager | [] [] [] |
+ gpe-timesheet | [] |
+ gpe-today | [] |
+ gpe-todo | |
+ gphoto2 | [] [] |
+ gprof | |
+ gpsdrive | () () () |
+ gramadoir | () |
+ grep | [] [] [] |
+ gretl | |
+ gsasl | [] |
+ gss | |
+ gst-plugins | [] |
+ gst-plugins-base | |
+ gst-plugins-good | [] |
+ gstreamer | [] |
+ gtick | [] |
+ gtkam | [] |
+ gtkorphan | [] |
+ gtkspell | [] [] |
+ gutenprint | |
+ hello | [] [] [] [] [] [] [] [] |
+ id-utils | [] |
+ impost | |
+ indent | [] [] |
+ iso_3166 | [] |
+ iso_3166_1 | [] [] |
+ iso_3166_2 | [] |
+ iso_3166_3 | [] |
+ iso_4217 | [] [] [] |
+ iso_639 | [] [] |
+ jpilot | () () () |
+ jtag | |
+ jwhois | [] |
+ kbd | [] |
+ keytouch | [] |
+ keytouch-editor | |
+ keytouch-keyboa... | |
+ latrine | [] |
+ ld | |
+ leafpad | [] [] |
+ libc | [] [] [] [] [] |
+ libexif | |
+ libextractor | |
+ libgpewidget | [] |
+ libgpg-error | |
+ libgphoto2 | [] |
+ libgphoto2_port | [] |
+ libgsasl | [] |
+ libiconv | |
+ libidn | [] [] |
+ lifelines | [] |
+ lilypond | |
+ lingoteach | [] |
+ lynx | [] [] |
+ m4 | [] [] |
+ mailutils | |
+ make | [] [] [] |
+ man-db | () |
+ minicom | [] |
+ mysecretdiary | [] |
+ nano | [] [] [] |
+ nano_1_0 | [] [] [] |
+ opcodes | [] |
+ parted | [] [] |
+ pilot-qof | |
+ psmisc | [] [] [] |
+ pwdutils | |
+ python | |
+ qof | |
+ radius | |
+ recode | [] |
+ rpm | [] [] |
+ screem | [] |
+ scrollkeeper | [] [] [] [] |
+ sed | [] [] |
+ sh-utils | [] [] |
+ shared-mime-info | [] [] [] [] [] |
+ sharutils | [] [] |
+ shishi | |
+ silky | [] |
+ skencil | |
+ sketch | |
+ solfege | |
+ soundtracker | |
+ sp | () |
+ stardict | [] [] |
+ system-tools-ba... | [] [] [] [] |
+ tar | [] [] [] |
+ texinfo | [] [] [] |
+ textutils | [] [] [] |
+ tin | |
+ tp-robot | [] |
+ tuxpaint | [] |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux | [] [] |
+ vorbis-tools | [] |
+ wastesedge | [] |
+ wdiff | [] [] |
+ wget | [] [] |
+ xchat | [] [] [] [] |
+ xkeyboard-config | [] |
+ xpad | [] [] [] |
+ +--------------------------------------------------+
+ ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
+ 40 24 2 1 1 3 1 2 3 21 0 15 1 101 5 3
+
+ nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
+ +------------------------------------------------------+
+ GNUnet | |
+ a2ps | () [] [] [] [] [] [] |
+ aegis | () () |
+ ant-phone | [] [] |
+ anubis | [] [] [] |
+ ap-utils | () |
+ aspell | [] [] |
+ bash | [] [] [] |
+ batchelor | [] [] |
+ bfd | |
+ bibshelf | [] |
+ binutils | [] [] |
+ bison | [] [] [] [] [] |
+ bison-runtime | [] [] [] [] |
+ bluez-pin | [] [] [] [] [] [] [] [] [] |
+ cflow | [] |
+ clisp | [] |
+ console-tools | [] |
+ coreutils | [] [] [] [] |
+ cpio | [] [] [] |
+ cpplib | [] |
+ cryptonit | [] [] |
+ darkstat | [] [] [] [] [] [] |
+ dialog | [] [] [] [] [] [] [] [] [] |
+ diffutils | [] [] [] [] [] [] |
+ doodle | [] [] |
+ e2fsprogs | [] [] |
+ enscript | [] [] [] [] [] |
+ error | [] [] [] [] |
+ fetchmail | [] [] [] |
+ fileutils | [] [] [] [] [] |
+ findutils | [] [] [] [] [] [] |
+ flex | [] [] [] [] [] |
+ fslint | [] [] [] [] |
+ gas | |
+ gawk | [] [] [] [] |
+ gbiff | [] |
+ gcal | [] |
+ gcc | [] |
+ gettext-examples | [] [] [] [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] [] [] [] |
+ gettext-tools | [] [] [] [] [] [] [] |
+ gimp-print | [] [] |
+ gip | [] [] [] [] |
+ gliv | [] [] [] [] |
+ glunarclock | [] [] [] [] [] [] |
+ gmult | [] [] [] [] |
+ gnubiff | () |
+ gnucash | () [] |
+ gnucash-glossary | [] [] [] |
+ gnuedu | |
+ gnulib | [] [] [] [] [] |
+ gnunet-gtk | [] |
+ gnutls | [] [] |
+ gpe-aerial | [] [] [] [] [] [] [] |
+ gpe-beam | [] [] [] [] [] [] [] |
+ gpe-calendar | [] [] [] [] [] [] [] [] |
+ gpe-clock | [] [] [] [] [] [] [] [] |
+ gpe-conf | [] [] [] [] [] [] [] |
+ gpe-contacts | [] [] [] [] [] |
+ gpe-edit | [] [] [] [] [] [] [] [] |
+ gpe-filemanager | [] [] |
+ gpe-go | [] [] [] [] [] [] |
+ gpe-login | [] [] [] [] [] [] [] [] |
+ gpe-ownerinfo | [] [] [] [] [] [] [] [] |
+ gpe-package | [] [] |
+ gpe-sketchbook | [] [] [] [] [] [] [] [] |
+ gpe-su | [] [] [] [] [] [] [] [] |
+ gpe-taskmanager | [] [] [] [] [] [] [] [] |
+ gpe-timesheet | [] [] [] [] [] [] [] [] |
+ gpe-today | [] [] [] [] [] [] [] [] |
+ gpe-todo | [] [] [] [] |
+ gphoto2 | [] [] [] [] [] |
+ gprof | [] [] [] |
+ gpsdrive | [] [] [] |
+ gramadoir | [] [] |
+ grep | [] [] [] [] [] [] [] [] |
+ gretl | [] |
+ gsasl | [] [] |
+ gss | [] [] [] |
+ gst-plugins | [] [] [] [] |
+ gst-plugins-base | [] |
+ gst-plugins-good | [] [] [] [] |
+ gstreamer | [] [] [] |
+ gtick | [] [] [] |
+ gtkam | [] [] [] [] |
+ gtkorphan | [] |
+ gtkspell | [] [] [] [] [] [] [] [] |
+ gutenprint | [] |
+ hello | [] [] [] [] [] [] [] [] |
+ id-utils | [] [] [] [] |
+ impost | [] |
+ indent | [] [] [] [] [] [] |
+ iso_3166 | [] [] [] [] [] [] |
+ iso_3166_1 | [] [] [] [] |
+ iso_3166_2 | |
+ iso_3166_3 | [] [] [] [] |
+ iso_4217 | [] [] [] [] |
+ iso_639 | [] [] [] [] |
+ jpilot | |
+ jtag | [] |
+ jwhois | [] [] [] [] |
+ kbd | [] [] [] |
+ keytouch | [] |
+ keytouch-editor | [] |
+ keytouch-keyboa... | [] |
+ latrine | [] [] |
+ ld | [] |
+ leafpad | [] [] [] [] [] [] |
+ libc | [] [] [] [] [] |
+ libexif | [] |
+ libextractor | [] [] |
+ libgpewidget | [] [] [] [] [] [] [] |
+ libgpg-error | [] [] |
+ libgphoto2 | [] |
+ libgphoto2_port | [] [] [] |
+ libgsasl | [] [] [] [] |
+ libiconv | |
+ libidn | [] [] () |
+ lifelines | [] [] |
+ lilypond | |
+ lingoteach | [] |
+ lynx | [] [] [] |
+ m4 | [] [] [] [] [] |
+ mailutils | [] [] [] [] |
+ make | [] [] [] [] |
+ man-db | [] [] |
+ minicom | [] [] [] [] [] |
+ mysecretdiary | [] [] [] [] |
+ nano | [] [] |
+ nano_1_0 | [] [] [] [] |
+ opcodes | [] [] |
+ parted | [] |
+ pilot-qof | [] |
+ psmisc | [] [] |
+ pwdutils | [] [] |
+ python | |
+ qof | [] |
+ radius | [] [] |
+ recode | [] [] [] [] [] [] [] |
+ rpm | [] [] [] [] |
+ screem | |
+ scrollkeeper | [] [] [] [] [] [] [] |
+ sed | [] [] [] [] [] [] [] [] [] |
+ sh-utils | [] [] [] |
+ shared-mime-info | [] [] [] [] [] |
+ sharutils | [] [] [] [] |
+ shishi | [] |
+ silky | [] |
+ skencil | [] [] [] |
+ sketch | [] [] [] |
+ solfege | [] |
+ soundtracker | [] [] |
+ sp | |
+ stardict | [] [] [] |
+ system-tools-ba... | [] [] [] [] [] [] [] [] [] |
+ tar | [] [] [] [] [] |
+ texinfo | [] [] [] [] |
+ textutils | [] [] [] |
+ tin | () |
+ tp-robot | [] |
+ tuxpaint | [] [] [] [] [] |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux | [] [] [] [] |
+ vorbis-tools | [] [] |
+ wastesedge | |
+ wdiff | [] [] [] [] [] [] |
+ wget | [] [] [] [] |
+ xchat | [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] |
+ xpad | [] [] [] |
+ +------------------------------------------------------+
+ nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
+ 0 2 3 58 31 53 5 76 72 5 42 48 12 51 130 2
+
+ tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
+ +---------------------------------------------------+
+ GNUnet | [] | 2
+ a2ps | [] [] [] | 19
+ aegis | | 0
+ ant-phone | [] [] | 6
+ anubis | [] [] [] | 11
+ ap-utils | () [] | 4
+ aspell | [] [] [] | 14
+ bash | [] | 11
+ batchelor | [] [] | 9
+ bfd | | 1
+ bibshelf | [] | 7
+ binutils | [] [] [] | 9
+ bison | [] [] [] | 19
+ bison-runtime | [] [] [] | 16
+ bluez-pin | [] [] [] [] [] [] | 28
+ cflow | [] [] | 4
+ clisp | | 6
+ console-tools | [] [] | 5
+ coreutils | [] [] | 17
+ cpio | [] [] [] | 9
+ cpplib | [] [] [] [] | 11
+ cryptonit | | 5
+ darkstat | [] () () | 15
+ dialog | [] [] [] [] [] | 30
+ diffutils | [] [] [] [] | 28
+ doodle | [] | 6
+ e2fsprogs | [] [] | 10
+ enscript | [] [] [] | 16
+ error | [] [] [] [] | 18
+ fetchmail | [] [] | 12
+ fileutils | [] [] [] | 18
+ findutils | [] [] [] | 17
+ flex | [] [] | 15
+ fslint | [] | 9
+ gas | [] | 3
+ gawk | [] [] | 15
+ gbiff | [] | 5
+ gcal | [] | 5
+ gcc | [] [] [] | 6
+ gettext-examples | [] [] [] [] [] [] | 26
+ gettext-runtime | [] [] [] [] [] [] | 28
+ gettext-tools | [] [] [] [] [] | 19
+ gimp-print | [] [] | 12
+ gip | [] [] | 12
+ gliv | [] [] | 8
+ glunarclock | [] [] [] | 15
+ gmult | [] [] [] [] | 15
+ gnubiff | [] | 1
+ gnucash | () | 2
+ gnucash-glossary | [] [] | 9
+ gnuedu | [] | 2
+ gnulib | [] [] [] [] [] | 28
+ gnunet-gtk | | 1
+ gnutls | | 2
+ gpe-aerial | [] [] | 14
+ gpe-beam | [] [] | 14
+ gpe-calendar | [] [] [] [] | 19
+ gpe-clock | [] [] [] [] | 20
+ gpe-conf | [] [] | 14
+ gpe-contacts | [] [] | 10
+ gpe-edit | [] [] [] [] | 19
+ gpe-filemanager | [] | 5
+ gpe-go | [] [] | 14
+ gpe-login | [] [] [] [] [] | 20
+ gpe-ownerinfo | [] [] [] [] | 20
+ gpe-package | [] | 5
+ gpe-sketchbook | [] [] | 16
+ gpe-su | [] [] [] | 19
+ gpe-taskmanager | [] [] [] | 19
+ gpe-timesheet | [] [] [] [] | 18
+ gpe-today | [] [] [] [] [] | 20
+ gpe-todo | [] | 6
+ gphoto2 | [] [] [] [] | 20
+ gprof | [] [] | 11
+ gpsdrive | | 4
+ gramadoir | [] | 7
+ grep | [] [] [] [] | 33
+ gretl | | 4
+ gsasl | [] [] | 6
+ gss | [] | 5
+ gst-plugins | [] [] [] | 15
+ gst-plugins-base | [] [] [] | 9
+ gst-plugins-good | [] [] [] | 18
+ gstreamer | [] [] [] | 17
+ gtick | [] | 11
+ gtkam | [] | 13
+ gtkorphan | [] | 7
+ gtkspell | [] [] [] [] [] [] | 26
+ gutenprint | | 3
+ hello | [] [] [] [] [] | 39
+ id-utils | [] [] | 14
+ impost | [] | 4
+ indent | [] [] [] [] | 25
+ iso_3166 | [] [] [] | 15
+ iso_3166_1 | [] [] | 20
+ iso_3166_2 | | 2
+ iso_3166_3 | [] [] | 9
+ iso_4217 | [] [] | 14
+ iso_639 | [] | 14
+ jpilot | [] [] [] [] | 7
+ jtag | [] | 3
+ jwhois | [] [] [] | 13
+ kbd | [] [] | 12
+ keytouch | [] | 4
+ keytouch-editor | | 2
+ keytouch-keyboa... | | 2
+ latrine | [] [] | 8
+ ld | [] [] [] [] | 8
+ leafpad | [] [] [] [] | 23
+ libc | [] [] [] | 23
+ libexif | [] | 4
+ libextractor | [] | 5
+ libgpewidget | [] [] [] | 19
+ libgpg-error | [] | 4
+ libgphoto2 | [] | 8
+ libgphoto2_port | [] [] [] | 11
+ libgsasl | [] | 8
+ libiconv | [] | 4
+ libidn | [] [] | 10
+ lifelines | | 4
+ lilypond | | 2
+ lingoteach | [] | 6
+ lynx | [] [] [] | 15
+ m4 | [] [] [] | 18
+ mailutils | [] | 8
+ make | [] [] [] | 20
+ man-db | [] | 6
+ minicom | [] | 14
+ mysecretdiary | [] [] | 12
+ nano | [] [] | 15
+ nano_1_0 | [] [] [] | 18
+ opcodes | [] [] | 10
+ parted | [] [] [] | 10
+ pilot-qof | [] | 3
+ psmisc | [] | 10
+ pwdutils | [] | 3
+ python | | 0
+ qof | [] | 2
+ radius | [] | 6
+ recode | [] [] [] | 25
+ rpm | [] [] [] [] | 14
+ screem | [] | 2
+ scrollkeeper | [] [] [] [] | 26
+ sed | [] [] [] | 22
+ sh-utils | [] | 15
+ shared-mime-info | [] [] [] [] | 23
+ sharutils | [] [] [] | 23
+ shishi | | 1
+ silky | [] | 4
+ skencil | [] | 7
+ sketch | | 6
+ solfege | | 2
+ soundtracker | [] [] | 9
+ sp | [] | 3
+ stardict | [] [] [] [] | 11
+ system-tools-ba... | [] [] [] [] [] [] [] | 37
+ tar | [] [] [] [] | 19
+ texinfo | [] [] [] | 15
+ textutils | [] [] [] | 17
+ tin | | 1
+ tp-robot | [] [] [] | 10
+ tuxpaint | [] [] [] | 16
+ unicode-han-tra... | | 0
+ unicode-transla... | | 2
+ util-linux | [] [] [] | 20
+ vorbis-tools | [] [] | 11
+ wastesedge | | 1
+ wdiff | [] [] | 22
+ wget | [] [] [] | 19
+ xchat | [] [] [] [] | 28
+ xkeyboard-config | [] [] [] [] | 11
+ xpad | [] [] [] | 14
+ +---------------------------------------------------+
+ 77 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
+ 172 domains 0 1 1 78 39 0 135 13 1 50 3 54 0 2054
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
@@ -367,15 +1085,15 @@ distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
- If January 2002 seems to be old, you may fetch a more recent copy of
+ If July 2006 seems to be old, you may fetch a more recent copy of
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
matrix with full percentage details can be found at
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
-Using `gettext' in new packages
-===============================
+1.6 Using `gettext' in new packages
+===================================
- If you are writing a freely available program and want to
+If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your
package. Of course you have to respect the GNU Library General Public
License which covers the use of the GNU `gettext' library. This means
@@ -384,7 +1102,7 @@ library, whereas only free software can use `libintl' as a static
library or use modified versions of `libintl'.
Once the sources are changed appropriately and the setup can handle
-to use of `gettext' the only thing missing are the translations. The
+the use of `gettext' the only thing missing are the translations. The
Free Translation Project is also available for packages which are not
developed inside the GNU project. Therefore the information given above
applies also for every other Free Software Project. Contact
diff --git a/BUGS b/BUGS
index a8bce01..138f3cd 100644
--- a/BUGS
+++ b/BUGS
@@ -87,8 +87,8 @@ regex syntax clashes (problems with backslashes)
modifying the contents of the directory, so the operation depends on
the permissions of the directory, not of the file). For this same
reason, sed will not let one use `-i' on a writeable file in a
- read-only directory (but unbelievably nobody reports that as a
- bug...).
+ read-only directory, and will break hard or symbolic links when
+ `-i' is used on such a file.
`0a' does not work (gives an error)
@@ -103,20 +103,31 @@ regex syntax clashes (problems with backslashes)
`[a-z]' is case insensitive
+`s/.*//' does not clear pattern space
You are encountering problems with locales. POSIX mandates that `[a-z]'
uses the current locale's collation order -- in C parlance, that means
strcoll(3) instead of strcmp(3). Some locales have a case insensitive
- strcoll, others don't: one of those that have problems is Estonian.
+ strcoll, others don't.
Another problem is that [a-z] tries to use collation symbols. This
only happens if you are on the GNU system, using GNU libc's regular
expression matcher instead of compiling the one supplied with GNU sed.
In a Danish locale, for example, the regular expression `^[a-z]$'
- matches the string `aa', because aa is a single collating symbol that
+ matches the string `aa', because `aa' is a single collating symbol that
comes after `a' and before `b'; `ll' behaves similarly in Spanish
locales, or `ij' in Dutch locales.
- To work around these problems, which may cause bugs in shell scripts,
- set the LC_ALL environment variable to `C', or set the locale on a
- more fine-grained basis with the other LC_* environment variables.
+ Another common localization-related problem happens if your input stream
+ includes invalid multibyte sequences. POSIX mandates that such
+ sequences are _not_ matched by `.', so that `s/.*//' will not clear
+ pattern space as you would expect. In fact, there is no way to clear
+ sed's buffers in the middle of the script in most multibyte locales
+ (including UTF-8 locales). For this reason, GNU sed provides a `z'
+ command (for `zap') as an extension.
+
+ However, to work around both of these problems, which may cause bugs
+ in shell scripts, you can set the LC_ALL environment variable to `C',
+ or set the locale on a more fine-grained basis with the other LC_*
+ environment variables.
+
diff --git a/COPYING b/COPYING
index 623b625..4432540 100644
--- a/COPYING
+++ b/COPYING
@@ -1,284 +1,626 @@
+
GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
+ Version 3, 29 June 2007
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
this License.
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
-
+
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
@@ -287,15 +629,15 @@ free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
+state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
- This program is free software; you can redistribute it and/or modify
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -304,37 +646,31 @@ the "copyright" line and a pointer to where the full notice is found.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/COPYING.DOC b/COPYING.DOC
index 1a86456..2f7e03c 100644
--- a/COPYING.DOC
+++ b/COPYING.DOC
@@ -1,21 +1,22 @@
- GNU Free Documentation License
- Version 1.1, March 2000
- Copyright (C) 2000 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ GNU Free Documentation License
+ Version 1.3, 3 November 2008
+
+
+ Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
-
0. PREAMBLE
The purpose of this License is to make a manual, textbook, or other
-written document "free" in the sense of freedom: to assure everyone
-the effective freedom to copy and redistribute it, with or without
-modifying it, either commercially or noncommercially. Secondarily,
-this License preserves for the author and publisher a way to get
-credit for their work, while not being considered responsible for
-modifications made by others.
+functional and useful document "free" in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
@@ -33,11 +34,15 @@ principally for works whose purpose is instruction or reference.
1. APPLICABILITY AND DEFINITIONS
-This License applies to any manual or other work that contains a
-notice placed by the copyright holder saying it can be distributed
-under the terms of this License. The "Document", below, refers to any
-such manual or work. Any member of the public is a licensee, and is
-addressed as "you".
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The "Document", below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as "you". You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
A "Modified Version" of the Document means any work containing the
Document or a portion of it, either copied verbatim, or with
@@ -45,44 +50,51 @@ modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall subject
-(or to related matters) and contains nothing that could fall directly
-within that overall subject. (For example, if the Document is in part a
-textbook of mathematics, a Secondary Section may not explain any
-mathematics.) The relationship could be a matter of historical
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
commercial, philosophical, ethical or political position regarding
them.
The "Invariant Sections" are certain Secondary Sections whose titles
are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License.
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
The "Cover Texts" are certain short passages of text that are listed,
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License.
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the
-general public, whose contents can be viewed and edited directly and
+general public, that is suitable for revising the document
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or
for automatic translation to a variety of formats suitable for input
to text formatters. A copy made in an otherwise Transparent file
-format whose markup has been designed to thwart or discourage
-subsequent modification by readers is not Transparent. A copy that is
-not "Transparent" is called "Opaque".
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not "Transparent" is called "Opaque".
Examples of suitable formats for Transparent copies include plain
ASCII without markup, Texinfo input format, LaTeX input format, SGML
or XML using a publicly available DTD, and standard-conforming simple
-HTML designed for human modification. Opaque formats include
-PostScript, PDF, proprietary formats that can be read and edited only
-by proprietary word processors, SGML or XML for which the DTD and/or
+HTML, PostScript or PDF designed for human modification. Examples of
+transparent image formats include PNG, XCF and JPG. Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
processing tools are not generally available, and the
-machine-generated HTML produced by some word processors for output
-purposes only.
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
The "Title Page" means, for a printed book, the title page itself,
plus such following pages as are needed to hold, legibly, the material
@@ -91,14 +103,31 @@ formats which do not have any title page as such, "Title Page" means
the text near the most prominent appearance of the work's title,
preceding the beginning of the body of the text.
+The "publisher" means any person or entity that distributes copies of
+the Document to the public.
+
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgements",
+"Dedications", "Endorsements", or "History".) To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
2. VERBATIM COPYING
You may copy and distribute the Document in any medium, either
commercially or noncommercially, provided that this License, the
copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License. You may not use
+to the Document are reproduced in all copies, and that you add no
+other conditions whatsoever to those of this License. You may not use
technical measures to obstruct or control the reading or further
copying of the copies you make or distribute. However, you may accept
compensation in exchange for copies. If you distribute a large enough
@@ -110,9 +139,10 @@ you may publicly display copies.
3. COPYING IN QUANTITY
-If you publish printed copies of the Document numbering more than 100,
-and the Document's license notice requires Cover Texts, you must enclose
-the copies in covers that carry, clearly and legibly, all these Cover
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
the back cover. Both covers must also clearly and legibly identify
you as the publisher of these copies. The front cover must present
@@ -130,20 +160,20 @@ pages.
If you publish or distribute Opaque copies of the Document numbering
more than 100, you must either include a machine-readable Transparent
copy along with each Opaque copy, or state in or with each Opaque copy
-a publicly-accessible computer-network location containing a complete
-Transparent copy of the Document, free of added material, which the
-general network-using public has access to download anonymously at no
-charge using public-standard network protocols. If you use the latter
-option, you must take reasonably prudent steps, when you begin
-distribution of Opaque copies in quantity, to ensure that this
-Transparent copy will remain thus accessible at the stated location
-until at least one year after the last time you distribute an Opaque
-copy (directly or through your agents or retailers) of that edition to
-the public.
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
+Document well before redistributing any large number of copies, to
+give them a chance to provide you with an updated version of the
+Document.
4. MODIFICATIONS
@@ -163,7 +193,8 @@ A. Use in the Title Page (and on the covers, if any) a title distinct
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
- Document (all of its principal authors, if it has less than five).
+ Document (all of its principal authors, if it has fewer than five),
+ unless they release you from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
@@ -175,10 +206,10 @@ F. Include, immediately after the copyright notices, a license notice
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
-I. Preserve the section entitled "History", and its title, and add to
- it an item stating at least the title, year, new authors, and
+I. Preserve the section Entitled "History", Preserve its Title, and add
+ to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
- there is no section entitled "History" in the Document, create one
+ there is no section Entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
@@ -189,17 +220,18 @@ J. Preserve the network location, if any, given in the Document for
You may omit a network location for a work that was published at
least four years before the Document itself, or if the original
publisher of the version it refers to gives permission.
-K. In any section entitled "Acknowledgements" or "Dedications",
- preserve the section's title, and preserve in the section all the
- substance and tone of each of the contributor acknowledgements
+K. For any section Entitled "Acknowledgements" or "Dedications",
+ Preserve the Title of the section, and preserve in the section all
+ the substance and tone of each of the contributor acknowledgements
and/or dedications given therein.
L. Preserve all the Invariant Sections of the Document,
unaltered in their text and in their titles. Section numbers
or the equivalent are not considered part of the section titles.
-M. Delete any section entitled "Endorsements". Such a section
+M. Delete any section Entitled "Endorsements". Such a section
may not be included in the Modified Version.
-N. Do not retitle any existing section as "Endorsements"
+N. Do not retitle any existing section to be Entitled "Endorsements"
or to conflict in title with any Invariant Section.
+O. Preserve any Warranty Disclaimers.
If the Modified Version includes new front-matter sections or
appendices that qualify as Secondary Sections and contain no material
@@ -208,7 +240,7 @@ of these sections as invariant. To do this, add their titles to the
list of Invariant Sections in the Modified Version's license notice.
These titles must be distinct from any other section titles.
-You may add a section entitled "Endorsements", provided it contains
+You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
@@ -236,7 +268,7 @@ License, under the terms defined in section 4 above for modified
versions, provided that you include in the combination all of the
Invariant Sections of all of the original documents, unmodified, and
list them all as Invariant Sections of your combined work in its
-license notice.
+license notice, and that you preserve all their Warranty Disclaimers.
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
@@ -247,43 +279,47 @@ author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
-In the combination, you must combine any sections entitled "History"
-in the various original documents, forming one section entitled
-"History"; likewise combine any sections entitled "Acknowledgements",
-and any sections entitled "Dedications". You must delete all sections
-entitled "Endorsements."
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgements",
+and any sections Entitled "Dedications". You must delete all sections
+Entitled "Endorsements".
6. COLLECTIONS OF DOCUMENTS
-You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
+You may make a collection consisting of the Document and other
+documents released under this License, and replace the individual
+copies of this License in the various documents with a single copy
+that is included in the collection, provided that you follow the rules
+of this License for verbatim copying of each of the documents in all
+other respects.
-You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
+You may extract a single document from such a collection, and
+distribute it individually under this License, provided you insert a
+copy of this License into the extracted document, and follow this
+License in all other respects regarding verbatim copying of that
+document.
7. AGGREGATION WITH INDEPENDENT WORKS
A compilation of the Document or its derivatives with other separate
and independent documents or works, in or on a volume of a storage or
-distribution medium, does not as a whole count as a Modified Version
-of the Document, provided no compilation copyright is claimed for the
-compilation. Such a compilation is called an "aggregate", and this
-License does not apply to the other self-contained works thus compiled
-with the Document, on account of their being thus compiled, if they
-are not themselves derivative works of the Document.
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one quarter
-of the entire aggregate, the Document's Cover Texts may be placed on
-covers that surround only the Document within the aggregate.
-Otherwise they must appear on covers around the whole aggregate.
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
8. TRANSLATION
@@ -294,29 +330,53 @@ Replacing Invariant Sections with translations requires special
permission from their copyright holders, but you may include
translations of some or all Invariant Sections in addition to the
original versions of these Invariant Sections. You may include a
-translation of this License provided that you also include the
-original English version of this License. In case of a disagreement
-between the translation and the original English version of this
-License, the original English version will prevail.
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled "Acknowledgements",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
9. TERMINATION
-You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License. Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License. However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
10. FUTURE REVISIONS OF THIS LICENSE
-The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns. See
+The Free Software Foundation may publish new, revised versions of the
+GNU Free Documentation License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in
+detail to address new problems or concerns. See
http://www.gnu.org/copyleft/.
Each version of the License is given a distinguishing version number.
@@ -326,7 +386,39 @@ following the terms and conditions either of that specified version or
of any later version that has been published (not as a draft) by the
Free Software Foundation. If the Document does not specify a version
number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+11. RELICENSING
+
+"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+"Massive Multiauthor Collaboration" (or "MMC") contained in the site
+means any set of copyrightable works thus published on the MMC site.
+
+"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+"Incorporate" means to publish or republish a Document, in whole or in
+part, as part of another Document.
+
+An MMC is "eligible for relicensing" if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole or
+in part into the MMC, (1) had no cover texts or invariant sections, and
+(2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
ADDENDUM: How to use this License for your documents
@@ -335,19 +427,23 @@ To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
- Copyright (c) YEAR YOUR NAME.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1
- or any later version published by the Free Software Foundation;
- with the Invariant Sections being LIST THEIR TITLES, with the
- Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
- A copy of the license is included in the section entitled "GNU
- Free Documentation License".
-
-If you have no Invariant Sections, write "with no Invariant Sections"
-instead of saying which ones are invariant. If you have no
-Front-Cover Texts, write "no Front-Cover Texts" instead of
-"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with...Texts." line with this:
+
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
diff --git a/ChangeLog b/ChangeLog
index 89b7c67..233a2ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,390 @@
+2009-04-30 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c: Declare bool arguments as int instead to please AIX XLC.
+ * sed/execute.c: Declare bool arguments as int instead to please AIX XLC.
+ * sed/utils.c: Declare bool arguments as int instead to please AIX XLC.
+ * sed/utils.h: Declare bool arguments as int instead to please AIX XLC.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Bump version number.
+ * configure: Regenerate.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Do not create homonymous links from builddir to srcdir.
+ * testsuite/Makefile.tests: Create readin.in2 here.
+ * testsuite/Makefile.am: Do not distribute it.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf: Add rename.
+ * gnulib: Update.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: XFAIL UTF-8 tests where appropriate.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/Makefile.tests: Handle CRLF endings for mingw.
+
+2009-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Link readin.in2 into builddir.
+ * configure: Regenerate.
+ * doc/Makefile.am: Do not distribute sed.html. Do not update
+ sed.texi if the output does not change.
+ * sed/Makefile.am: Order libraries according to their dependencies.
+ * sed/compile.c (get_openfile): Declare FAIL as int.
+ * sed/sed.c: Avoid printf ("") if REG_PERL is not defined.
+ * testsuite/eval.in2: Do not include in the repository.
+ * testsuite/Makefile.am: Clean always eval.in2 and never readin.in2.
+ * testsuite/Makefile.tests: Provide a default empty definition of TIME
+ and remove rules for readin.in2.
+
+2009-03-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * bootstrap.sh.in: Add __bool_true_false_are_defined.
+ * bootstrap.sh: Regenerate.
+ * basicdefs.h: Do not provide bool definitions for BOOTSTRAP at all.
+
+2009-03-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.c (contact): New.
+ (usage): From here.
+ (main): Use it for `sed --version' too.
+
+ * configure.ac: Point to GNU project mailing lists.
+ * sed/sed.c (contact): Use PACKAGE_BUGREPORT.
+ * testsuite/version.gin: Likewise.
+ * testsuite/version.good: Regenerate.
+ * doc/sed.1: Regenerate.
+
+ * bootstrap.sh.in (PACKAGE_BUGREPORT): New.
+ * bootstrap.sh: Regenerate.
+
+2009-03-31 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/Makefile.am: Distribute utf8-3 and utf8-4 test files.
+
+2009-02-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/Makefile.tests: Rewrite rule for utf8-[1234].
+ Reported by Ralf Wildenhues.
+
+2009-02-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.c (usage): Print homepage URL.
+ * testsuite/version.gin: Update.
+
+2009-01-28 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/sed.c (usage): Only print the bug report address for `sed --help'.
+ (main): Print it for `sed --version' too.
+ * testsuite/version.gin: Adapt.
+ * testsuite/Makefile.tests: Refine help message test.
+
+2009-01-23 Paolo Bonzini <bonzini@gnu.org>
+ Hideo AOKI <hideo.aoki.tk@hitachi.com>
+
+ * sed/compile.c (match_slash): Fix MBCS behavior.
+ * sed/sed.h (MBSINIT): New.
+
+2009-01-20 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf, bootstrap.sh.in: Remove memchr, memcmp, memmove
+ compatibility code.
+ * gnulib: Update.
+
+2009-01-09 Paolo Bonzini <bonzini@gnu.org>
+
+ * tests/SPENCER.tests: Add testcases for glibc bugzilla 697.
+ * gnulib: Update.
+
+2009-01-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * execute.c (read_pattern_space): Reset hold space at end-of-file
+ if input->reset_at_next_file.
+
+2008-12-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Let --posix turn off more GNU extensions.
+ * sed/compile.c (mark_subst_opts): Turn off subst options i, I,
+ s, S, x, X, m, and M in --posix mode.
+ (compile_address): Disallow address modifiers, `FIRST~STEP',
+ `ADDR1,+N', and `ADDR1,~N' in --posix mode.
+ (compile_program): In --posix mode, do not accept e or z commands;
+ do not accept text between an a, c, or i command and the following
+ backslash; do not accept an argument to the l command.
+
+2008-12-22 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf: Request modules emulating mb functions.
+ * configure.ac: Do not look for mb functions here.
+
+2008-10-03 Paolo Bonzini <bonzini@gnu.org>
+ Jim Meyering <meyering@redhat.com>
+
+ * autoboot.conf: Add localcharset.
+ * Makefile.am: Remove intl subdir. Require Automake 1.10.
+ * configure.ac: Remove useless macros, switch to external gettext.
+ * lib/Makefile.am: Remove intl subdir from CPPFLAGS.
+ * sed/Makefile.am: Remove intl subdir from CPPFLAGS.
+
+2008-10-02 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot: Sync with gnulib's build-aux/bootstrap.
+
+2008-09-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot: Sync with gnulib's build-aux/bootstrap.
+
+2008-09-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/Makefile.am: Add the utf8-{1,2,3,4} tests.
+ * testsuite/Makefile.tests: Add the utf8-{1,2,3,4} tests.
+ * testsuite/runtest: Support skipping tests.
+ * testsuite/utf8-1.good: New.
+ * testsuite/utf8-1.inp: New.
+ * testsuite/utf8-1.sed: New.
+ * testsuite/utf8-2.good: New.
+ * testsuite/utf8-2.inp: New.
+ * testsuite/utf8-2.sed: New.
+ * testsuite/utf8-3.good: New.
+ * testsuite/utf8-3.inp: New.
+ * testsuite/utf8-3.sed: New.
+ * testsuite/utf8-4.good: New.
+ * testsuite/utf8-4.inp: New.
+ * testsuite/utf8-4.sed: New.
+
+2008-09-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * BUGS: Document s/.*.// behavior with invalid multibyte sequences.
+ * NEWS: Document `z' extension.
+ * doc/sed-in.texi: Document both things.
+ * sed/compile.c (compile_program): Recognize `z'.
+ * sed/execute.c (execute_program): Execute `z'.
+ * testsuite/Makefile.am: Add badenc test.
+ * testsuite/Makefile.tests: Add badenc test.
+ * testsuite/badenc.good: New.
+ * testsuite/badenc.inp: New.
+ * testsuite/badenc.sed: New.
+
+2008-09-28 Paolo Bonzini <bonzini@gnu.org>
+
+ * basicdefs.h: Replace alloca cruft with alloca.h.
+ * bootstrap.sh.in: Update for new gnulib.
+ * bootstrap.sh: Update for new gnulib.
+ * configure.ac: Move gnulib macros earlier.
+ * sed/execute.c: Do not include acl.h when bootstrapping.
+
+2008-08-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (closedown): Close the input file!
+
+2008-08-20 Paolo Bonzini <bonzini@gnu.org>
+
+ * configure.ac: Add gl_DISABLE_THREADS.
+
+2008-08-20 Ralf Wildenhues <ralf.wildenhues@gmx.de
+
+ * doc/sed-in.texi: Drop leading whitespace where appropriate,
+ do not use TABs.
+ * doc/sed.texi: Regnerate.
+
+2008-08-19 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c: Do not include strverscmp.c.
+
+2008-07-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed-in.texi: Remove northpark.edu address for sed FAQ.
+ * doc/sed.texi: Regenerate.
+
+2008-07-10 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed-in.texi: Make the description of ^ and $ more precise.
+ * doc/sed.texi: Regenerate.
+
+2008-06-04 Vladimir Marek <vladimir.marek@sun.com>
+
+ * basicdefs.h: Don't hardcode usage of prototypes on SunStudio.
+
+2008-05-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * autoboot.conf: Update for newer gnulib.
+
+2008-05-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * bootstrap.sh.in: Define bool, true, false. Reported by
+ Jason Stover. Adjust for gnulib changes.
+ * bootstrap.sh: Regenerate.
+
+2008-04-24 Paul Eggert <eggert@twinsun.com>
+
+ * sed/compile.c (match_slash): Treat 's&foo&\&&' compatibly with
+ traditional 'sed'.
+ * testsuite/bsd.sh: Add test case for this.
+ * testsuite/bsd.good: Add test case output.
+
+2008-04-24 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (setup_replacement): Fix bug with \& in POSIX mode.
+
+2008-01-16 Jim Meyering <meyering@redhat.com>
+
+ * sed/execute.c (open_next_file, get_backup_file_name): Avoid
+ warnings from gcc.
+
+2008-01-16 Jim Meyering <meyering@redhat.com>
+
+ * sed/compile.c (snarf_char_class): Reverse order of conjuncts
+ so that "delim" is not used uninitialized.
+
+2008-01-16 Jim Meyering <meyering@redhat.com>
+
+ * sed/utils.c (panic): Remove declaration of unused local, "fd".
+
+2008-01-16 Jim Meyering <meyering@redhat.com>
+
+ * sed/execute.c (open_next_file, get_backup_file_name): Avoid
+ warnings from gcc. Avoid shadowing global "pipe".
+
+2008-01-16 Jim Meyering <meyering@redhat.com>
+
+ * autoboot.conf (gnulib_modules): Add stat-macros and pathmax.
+
+2007-10-25 Paolo Bonzini <bonzini@gnu.org>
+ Mike Frysinger <vapier@gentoo.org>
+
+ * doc/sed.x (q, Q): Document argument.
+ * configure.ac: Remove texi2html checks.
+ * doc/Makefile.am: Remove rules for sed.html, always distribute it.
+
+2007-08-14 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (open_next_file): Follow symlink here...
+ (closedown): ... not here.
+
+2007-06-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/mbcs.c: Upgrade to GPLv3.
+ * sed/regexp.c: Upgrade to GPLv3.
+ * sed/sed.c: Upgrade to GPLv3.
+ * sed/sed.h: Upgrade to GPLv3.
+ * sed/utils.c: Upgrade to GPLv3.
+ * sed/utils.h: Upgrade to GPLv3.
+ * sed/compile.c: Upgrade to GPLv3.
+ * sed/execute.c: Upgrade to GPLv3.
+ * sed/fmt.c: Upgrade to GPLv3.
+
+2007-03-01 Masatake YAMATO <jet@gyve.org> (tiny change)
+
+ * sed/compile.c (compile_program): Accept 0,/REGEXP/ address
+ specification only if --posix is not specified.
+
+2007-02-05 Paolo Bonzini <bonzini@gnu.org>
+
+ * testsuite/bug-regex27.c, testsuite/bug-regex28.c: New, from
+ glibc (written by Jakub Jelinek).
+
+2007-01-26 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (check_final_program): Don't set text if the
+ pending_text is initialized but empty.
+ * sed/execute.c (output_line): Don't print text if it is NULL.
+ * testsuite/Makefile.am (TESTS): Add insert.
+ * testsuite/Makefile.tests (insert): New.
+ * testsuite/insert.good, testsuite/insert.sed, testsuite/insert.inp: New
+ testcase from Jonas Koelker.
+
+2006-12-29 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c: Fix warnings.
+ * sed/execute.c: Fix warnings.
+
+2006-12-22 Bruno Haible <bruno@clisp.org>
+
+ * sed/utils.c: Include pathmax.
+ * sed/mbcs.c: Use local_charset.
+ * sed/execute.c: Copy with padding after the mbstate_t member.
+
+2006-12-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/mbcs.c: Include string.h (reported by Henning Nielsen Lund).
+ * sed/fmt.c: Likewise.
+ * sed/regexp.c: Likewise.
+
+2006-12-18 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (closedown): Remove dead code.
+
+2006-12-17 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/utils.c: Include limits.h.
+
+2006-12-16 Paolo Bonzini <bonzini@gnu.org>
+
+ * doc/sed-in.texi: Document --follow-symlinks.
+
+2006-12-15 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/regexp.c: Disable all extensions on --posix.
+
+2006-09-24 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c: Support ACLs.
+ * lib/utils.c: Move...
+ * sed/utils.c: ... here, and remove xmalloc.
+
+2006-08-21 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/regexp.c: Accept NUL bytes for `.'. Accept 'a\(b' in
+ POSIXLY_CORRECT/POSIXLY_BASIC posixicity.
+
+2006-08-03 Paolo Bonzini <bonzini@gnu.org>
+
+ Revert this part of the previous change:
+
+ 2006-08-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/compile.c (get_openfile): Change second argument to char
+ and turn it into a string within the function. Adjust callers.
+
+2006-08-03 Paolo Bonzini <bonzini@gnu.org>
+ Corinna Vinschen <vinschen@redhat.com>
+
+ * lib/getline.c (getline): Remove Windows special casing.
+ * lib/utils.c (register_open_file, ck_fdopen): New.
+ (ck_fopen, ck_mkstemp): Use register_open_file.
+ * lib/utils.h (ck_fdopen): New.
+ * sed/execute.c (open_next_file): Reopen stdin.
+ * sed/sed.h (read_mode): New.
+ * sed/sed.c (read_mode): New.
+ (main): Set it on --binary.
+ (usage): Document --binary.
+ * sed/compile.c (get_openfile): Change second argument to char
+ and turn it into a string within the function. Adjust callers.
+ * sed/execute.c (dump_append_queue, open_next_file): Use it
+ as mode for ck_fopen.
+
+2006-08-03 Paolo Bonzini <bonzini@gnu.org>
+
+ * sed/execute.c (str_append): Use is_utf8 to skip useless work.
+ * sed/mbcs.c (initialize_mbcs): Look for a UTF-8 locale.
+ (is_utf8): New.
+ * sed/sed.h (is_utf8): New.
+
+2006-07-13 Paolo Bonzini <bonzini@gnu.org>
+
+ * bootstrap.sh.in: Add a few autoconfy tests.
+ * Makefile.am: Update distributed bootstrap.sh.
+
+2006-05-15 Hans-Bernhard Broeker <broeker@physik.rwth-aachen.de>
+
+ * sed/basicdefs.h (OB_MALLOC): Turn VCAST into void * cast.
+
2006-02-03 Paolo Bonzini <bonzini@gnu.org>
* sed/compile.c (compile_program) <case 'y'>: Pass false to match_slash.
diff --git a/INSTALL b/INSTALL
index 54caf7c..23e5f25 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,13 +1,16 @@
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
-Foundation, Inc.
+Installation Instructions
+*************************
- This file is free documentation; the Free Software Foundation gives
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
- These are generic installation instructions.
+These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -67,9 +70,9 @@ The simplest way to compile this package is:
Compilers and Options
=====================
- Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. Run `./configure --help'
-for details on some of the pertinent environment variables.
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about. Run `./configure --help' for
+details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
@@ -82,7 +85,7 @@ is an example:
Compiling For Multiple Architectures
====================================
- You can compile the package for more than one kind of computer at the
+You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
@@ -99,19 +102,19 @@ for another architecture.
Installation Names
==================
- By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc. You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
+options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
@@ -122,7 +125,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
- Some packages pay attention to `--enable-FEATURE' options to
+Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
@@ -137,11 +140,11 @@ you can use the `configure' options `--x-includes=DIR' and
Specifying the System Type
==========================
- There may be some features `configure' cannot figure out
-automatically, but needs to determine by the type of machine the package
-will run on. Usually, assuming the package is built to be run on the
-_same_ architectures, `configure' can figure that out, but if it prints
-a message saying it cannot guess the machine type, give it the
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
@@ -156,7 +159,7 @@ where SYSTEM can have one of these forms:
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
-use the `--target=TYPE' option to select the type of system they will
+use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
@@ -167,9 +170,9 @@ eventually be run) with `--host=TYPE'.
Sharing Defaults
================
- If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
@@ -178,7 +181,7 @@ A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
- Variables not defined in a site shell script can be set in the
+Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
@@ -186,14 +189,18 @@ them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
-will cause the specified gcc to be used as the C compiler (unless it is
-overridden in the site shell script).
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script). Here is a another example:
+
+ /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
+configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation
======================
- `configure' recognizes the following options to control how it
-operates.
+`configure' recognizes the following options to control how it operates.
`--help'
`-h'
diff --git a/Makefile.am b/Makefile.am
index a6ecc04..c1e6a29 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,18 +1,18 @@
## Process this file with automake to produce Makefile.in
# Automake requirements
-AUTOMAKE_OPTIONS = gnits 1.8
-ACLOCAL_AMFLAGS = -I config
+AUTOMAKE_OPTIONS = gnits 1.10 dist-bzip2
+ACLOCAL_AMFLAGS = -I m4
PACKAGE = sed
-SUBDIRS = intl lib po sed doc testsuite
+SUBDIRS = lib po sed doc testsuite
noinst_DATA = bootstrap.sh
noinst_HEADERS = basicdefs.h
-EXTRA_DIST = BUGS THANKS COPYING.DOC README.boot bootstrap.sh \
- config/texi2dvi config/help2man
+EXTRA_DIST = BUGS THANKS COPYING.DOC README.boot \
+ autoboot build-aux/texi2dvi build-aux/help2man
html:
cd doc && make html
@@ -20,23 +20,38 @@ html:
DISTCHECK_CONFIGURE_FLAGS = XGETTEXT='$(SHELL) -c : dummy' $(EXTRA_DC_FLAGS)
EXTRA_DC_FLAGS =
+dist-hook:
+ cmp bootstrap.sh $(srcdir)/bootstrap.sh > /dev/null 2>&1 || \
+ cp -p bootstrap.sh $(srcdir)/bootstrap.sh
+ cp -p $(srcdir)/bootstrap.sh $(distdir)/bootstrap.sh
+
full-distcheck:
+ make distcheck EXTRA_DC_FLAGS='--enable-regex-tests'
make distcheck EXTRA_DC_FLAGS='--enable-html'
make distcheck EXTRA_DC_FLAGS='--disable-i18n'
make distcheck EXTRA_DC_FLAGS='--disable-nls'
- make distcheck EXTRA_DC_FLAGS='--without-included-regex'
make distcheck EXTRA_DC_FLAGS='--without-included-gettext'
+ @case "$(host)" in \
+ *-linux*|*-gnu*) \
+ echo make distcheck EXTRA_DC_FLAGS=\'--without-included-regex\'; \
+ make distcheck EXTRA_DC_FLAGS='--without-included-regex' \
+ ;; \
+ *) \
+ echo Skipping check --without-included-regex \
+ ;; \
+ esac
+
+## update-regex:
+## HOST=sources.redhat.com && \
+## BASEURL="http://$$HOST/cgi-bin/cvsweb.cgi/~checkout~/libc/posix" && \
+## QUERY='cvsroot=glibc&content-type=text/plain' && \
+## wget -O lib/regcomp.c "$$BASEURL/regcomp.c?$$QUERY" && \
+## wget -O lib/regexec.c "$$BASEURL/regexec.c?$$QUERY" && \
+## wget -O lib/regex.c "$$BASEURL/regex.c?$$QUERY" && \
+## wget -O lib/regex_.h "$$BASEURL/regex.h?$$QUERY" && \
+## wget -O lib/regex_internal.c "$$BASEURL/regex_internal.c?$$QUERY" && \
+## wget -O lib/regex_internal.h "$$BASEURL/regex_internal.h?$$QUERY" && \
+## wget -O testsuite/BOOST.tests "$$BASEURL/BOOST.tests?$$QUERY" && \
+## wget -O testsuite/PCRE.tests "$$BASEURL/PCRE.tests?$$QUERY" && \
+## wget -O testsuite/SPENCER.tests "$$BASEURL/rxspencer/tests?$$QUERY"
-update-regex:
- HOST=sources.redhat.com && \
- BASEURL="http://$$HOST/cgi-bin/cvsweb.cgi/~checkout~/libc/posix" && \
- QUERY='cvsroot=glibc&content-type=text/plain' && \
- wget -O lib/regcomp.c "$$BASEURL/regcomp.c?$$QUERY" && \
- wget -O lib/regexec.c "$$BASEURL/regexec.c?$$QUERY" && \
- wget -O lib/regex.c "$$BASEURL/regex.c?$$QUERY" && \
- wget -O lib/regex_.h "$$BASEURL/regex.h?$$QUERY" && \
- wget -O lib/regex_internal.c "$$BASEURL/regex_internal.c?$$QUERY" && \
- wget -O lib/regex_internal.h "$$BASEURL/regex_internal.h?$$QUERY" && \
- wget -O testsuite/BOOST.tests "$$BASEURL/BOOST.tests?$$QUERY" && \
- wget -O testsuite/PCRE.tests "$$BASEURL/PCRE.tests?$$QUERY" && \
- wget -O testsuite/SPENCER.tests "$$BASEURL/rxspencer/tests?$$QUERY"
diff --git a/Makefile.in b/Makefile.in
index a93988d..5758d05 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +15,11 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -37,45 +33,70 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+subdir = .
DIST_COMMON = README $(am__configure_deps) $(noinst_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/bootstrap.sh.in $(srcdir)/config_h.in \
- $(top_srcdir)/configure $(top_srcdir)/intl/Makefile.in \
- ABOUT-NLS AUTHORS COPYING COPYING.DOC ChangeLog INSTALL NEWS \
- README-alpha THANKS config/config.guess config/config.rpath \
- config/config.sub config/depcomp config/install-sh \
- config/mdate-sh config/missing config/texinfo.tex
-subdir = .
+ $(top_srcdir)/configure ABOUT-NLS AUTHORS COPYING COPYING.DOC \
+ ChangeLog INSTALL NEWS THANKS build-aux/config.guess \
+ build-aux/config.rpath build-aux/config.sub build-aux/depcomp \
+ build-aux/install-sh build-aux/mdate-sh build-aux/missing \
+ build-aux/texinfo.tex
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/codeset.m4 \
- $(top_srcdir)/config/getline.m4 \
- $(top_srcdir)/config/gettext-ver.m4 \
- $(top_srcdir)/config/gettext.m4 \
- $(top_srcdir)/config/glibc21.m4 $(top_srcdir)/config/iconv.m4 \
- $(top_srcdir)/config/lcmessage.m4 \
- $(top_srcdir)/config/lib-ld.m4 \
- $(top_srcdir)/config/lib-link.m4 \
- $(top_srcdir)/config/lib-prefix.m4 \
- $(top_srcdir)/config/progtest.m4 \
- $(top_srcdir)/config/stdbool.m4 \
- $(top_srcdir)/config/strverscmp.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+ $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
+ $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
+ $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getline.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+ $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/mbrlen.m4 \
+ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \
+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mkstemp.m4 \
+ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
+ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/realloc.m4 \
+ $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/ssize_t.m4 \
+ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
+ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \
+ $(top_srcdir)/m4/strverscmp.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
+ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/tempname.m4 \
+ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/wchar.m4 \
+ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+ $(top_srcdir)/m4/wctype.m4 $(top_srcdir)/m4/wint_t.m4 \
+ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
+ configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = bootstrap.sh intl/Makefile
+CONFIG_CLEAN_FILES = bootstrap.sh
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
- install-exec-recursive install-info-recursive \
- install-recursive installcheck-recursive installdirs-recursive \
- pdf-recursive ps-recursive uninstall-info-recursive \
- uninstall-recursive
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
DATA = $(noinst_DATA)
HEADERS = $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
@@ -86,64 +107,300 @@ am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
-DIST_ARCHIVES = $(distdir).tar.gz
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
+ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BUILD_HTML_FALSE = @BUILD_HTML_FALSE@
-BUILD_HTML_TRUE = @BUILD_HTML_TRUE@
-BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
-CATOBJEXT = @CATOBJEXT@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
-GENCAT = @GENCAT@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WRITE = @GNULIB_WRITE@
+GREP = @GREP@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRNDUP = @HAVE_STRNDUP@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
HAVE__BOOL = @HAVE__BOOL@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
+LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
+LIB_ACL = @LIB_ACL@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
-MAKEINFO_HTML_FALSE = @MAKEINFO_HTML_FALSE@
-MAKEINFO_HTML_TRUE = @MAKEINFO_HTML_TRUE@
-MKINSTALLDIRS = @MKINSTALLDIRS@
+MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
PACKAGE = sed
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -153,25 +410,92 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
SED_FEATURE_VERSION = @SED_FEATURE_VERSION@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
STRIP = @STRIP@
-TEST_REGEX_FALSE = @TEST_REGEX_FALSE@
-TEST_REGEX_TRUE = @TEST_REGEX_TRUE@
-TEXI2HTML = @TEXI2HTML@
-TEXI2HTML_HTML_FALSE = @TEXI2HTML_HTML_FALSE@
-TEXI2HTML_HTML_TRUE = @TEXI2HTML_HTML_TRUE@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+SYS_STAT_H = @SYS_STAT_H@
+SYS_TIME_H = @SYS_TIME_H@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+USE_ACL = @USE_ACL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+VOID_UNSETENV = @VOID_UNSETENV@
+WCHAR_H = @WCHAR_H@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XFAIL_TESTS = @XFAIL_TESTS@
XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -183,37 +507,52 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
# Automake requirements
-AUTOMAKE_OPTIONS = gnits 1.8
-ACLOCAL_AMFLAGS = -I config
-SUBDIRS = intl lib po sed doc testsuite
+AUTOMAKE_OPTIONS = gnits 1.10 dist-bzip2
+ACLOCAL_AMFLAGS = -I m4
+SUBDIRS = lib po sed doc testsuite
noinst_DATA = bootstrap.sh
noinst_HEADERS = basicdefs.h
-EXTRA_DIST = BUGS THANKS COPYING.DOC README.boot bootstrap.sh \
- config/texi2dvi config/help2man
+EXTRA_DIST = BUGS THANKS COPYING.DOC README.boot \
+ autoboot build-aux/texi2dvi build-aux/help2man
DISTCHECK_CONFIGURE_FLAGS = XGETTEXT='$(SHELL) -c : dummy' $(EXTRA_DC_FLAGS)
EXTRA_DC_FLAGS =
@@ -258,7 +597,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
- $(MAKE) stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config_h.in $(top_builddir)/config.status
@@ -273,9 +612,6 @@ distclean-hdr:
-rm -f config.h stamp-h1
bootstrap.sh: $(top_builddir)/config.status $(srcdir)/bootstrap.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $@
-intl/Makefile: $(top_builddir)/config.status $(top_srcdir)/intl/Makefile.in
- cd $(top_builddir) && $(SHELL) ./config.status $@
-uninstall-info-am:
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -308,8 +644,7 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
+$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
@@ -353,8 +688,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -379,8 +714,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config_h.in $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -390,13 +725,12 @@ ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config_h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) config_h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -417,24 +751,22 @@ distdir: $(DISTFILES)
exit 1;; \
esac
$(am__remove_distdir)
- mkdir $(distdir)
- $(mkdir_p) $(distdir)/. $(distdir)/config $(distdir)/intl $(distdir)/lib $(distdir)/po
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ test -d $(distdir) || mkdir $(distdir)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -448,7 +780,7 @@ distdir: $(DISTFILES)
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
- || $(mkdir_p) "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
@@ -456,23 +788,31 @@ distdir: $(DISTFILES)
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r $(distdir)
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
-
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@@ -488,6 +828,7 @@ dist-zip: distdir
dist dist-all: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
@@ -499,6 +840,8 @@ distcheck: dist
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
@@ -514,7 +857,6 @@ distcheck: dist
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& cd $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
- --with-included-gettext \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -539,7 +881,7 @@ distcheck: dist
$(am__remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@cd $(distuninstallcheck_dir) \
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
@@ -606,12 +948,20 @@ info-am:
install-data-am:
+install-dvi: install-dvi-recursive
+
install-exec-am:
+install-html: install-html-recursive
+
install-info: install-info-recursive
install-man:
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
installcheck-am:
maintainer-clean: maintainer-clean-recursive
@@ -632,49 +982,50 @@ ps: ps-recursive
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
- check-am clean clean-generic clean-recursive ctags \
- ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
- dist-tarZ dist-zip distcheck distclean distclean-generic \
- distclean-hdr distclean-recursive distclean-tags \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am clean clean-generic \
+ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
+ dist-hook dist-lzma dist-shar dist-tarZ dist-zip distcheck \
+ distclean distclean-generic distclean-hdr distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic maintainer-clean-recursive \
- mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-info-am
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
html:
cd doc && make html
+dist-hook:
+ cmp bootstrap.sh $(srcdir)/bootstrap.sh > /dev/null 2>&1 || \
+ cp -p bootstrap.sh $(srcdir)/bootstrap.sh
+ cp -p $(srcdir)/bootstrap.sh $(distdir)/bootstrap.sh
+
full-distcheck:
+ make distcheck EXTRA_DC_FLAGS='--enable-regex-tests'
make distcheck EXTRA_DC_FLAGS='--enable-html'
make distcheck EXTRA_DC_FLAGS='--disable-i18n'
make distcheck EXTRA_DC_FLAGS='--disable-nls'
- make distcheck EXTRA_DC_FLAGS='--without-included-regex'
make distcheck EXTRA_DC_FLAGS='--without-included-gettext'
-
-update-regex:
- HOST=sources.redhat.com && \
- BASEURL="http://$$HOST/cgi-bin/cvsweb.cgi/~checkout~/libc/posix" && \
- QUERY='cvsroot=glibc&content-type=text/plain' && \
- wget -O lib/regcomp.c "$$BASEURL/regcomp.c?$$QUERY" && \
- wget -O lib/regexec.c "$$BASEURL/regexec.c?$$QUERY" && \
- wget -O lib/regex.c "$$BASEURL/regex.c?$$QUERY" && \
- wget -O lib/regex_.h "$$BASEURL/regex.h?$$QUERY" && \
- wget -O lib/regex_internal.c "$$BASEURL/regex_internal.c?$$QUERY" && \
- wget -O lib/regex_internal.h "$$BASEURL/regex_internal.h?$$QUERY" && \
- wget -O testsuite/BOOST.tests "$$BASEURL/BOOST.tests?$$QUERY" && \
- wget -O testsuite/PCRE.tests "$$BASEURL/PCRE.tests?$$QUERY" && \
- wget -O testsuite/SPENCER.tests "$$BASEURL/rxspencer/tests?$$QUERY"
+ @case "$(host)" in \
+ *-linux*|*-gnu*) \
+ echo make distcheck EXTRA_DC_FLAGS=\'--without-included-regex\'; \
+ make distcheck EXTRA_DC_FLAGS='--without-included-regex' \
+ ;; \
+ *) \
+ echo Skipping check --without-included-regex \
+ ;; \
+ esac
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/NEWS b/NEWS
index 233ffef..2799009 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,41 @@
+Sed 4.2
+
+* now released under GPLv3
+
+* added a new extension `z` to clear pattern space even in the presence
+of invalid multibyte sequences
+
+* a preexisting GNU gettext installation is needed in order to compile
+GNU sed with NLS support
+
+* new option --follow-symlinks, available when editing a file in-place.
+This option may not be available on some systems (in this case, the
+option will *not* be a no-op; it will be completely unavailable).
+In the future, the option may be added as a no-op on systems without
+symbolic links at all, since in this case a no-op is effectively
+indistinguishable from a correct implementation.
+
+* hold-space is reset between different files in -i and -s modes.
+
+* multibyte processing fixed
+
+* the following GNU extensions are turned off by --posix: options [iImMsSxX]
+in the `s' command, address kinds `FIRST~STEP' and `ADDR1,+N' and `ADDR1,~N',
+line address 0, `e' or `z' commands, text between an `a' or `c' or `i'
+command and the following backslash, arguments to the `l' command.
+--posix disables all extensions to regular expressions.
+
+* fixed bug in 'i\' giving a segmentation violation if given alone.
+
+* much improved portability
+
+* much faster in UTF-8 locales
+
+* will correctly replace ACLs when using -i
+
+* will now accept NUL bytes for `.'
+
+----------------------------------------------------------------------------
Sed 4.1.5
* fix parsing of a negative character class not including a closed bracket,
diff --git a/README-alpha b/README-alpha
deleted file mode 100644
index 9235efe..0000000
--- a/README-alpha
+++ /dev/null
@@ -1,8 +0,0 @@
-This is an alpha version of GNU sed. Please try it on a wide
-range of scripts (especially configure scripts) and submit
-bug reports to bonzini@gnu.org.
-
-Thanks,
-
-Paolo Bonzini
-GNU sed maintainer
diff --git a/THANKS b/THANKS
index c8a8a32..932c49b 100644
--- a/THANKS
+++ b/THANKS
@@ -6,6 +6,8 @@ Andrew Herbert <andrew@werple.apana.org.au>
Bruno Haible <haible@ilog.fr>
Chip Salzenberg <chip@fin.uucp>
Chris Weber <weber@bucknell.edu>
+Corinna Vinschen <vinschen@redhat.com>
+Daniel R. Grayson <dan@math.uiuc.edu>
David Eckelkamp <eckelkamp@mcc.com>
David J. MacKenzie <djm@nutrimat>
David Schmidt <davids@isc-br.isc-br.com>
@@ -43,6 +45,7 @@ Tapani Tarvainen <tarvaine@tukki.jyu.fi>
Timothy J Luoma <luomat@peak.org>
Tom R.Hageman <tom@basil.icce.rug.nl>
Ulrich Drepper <drepper@redhat.com>
+Vladimir Marek <vladimir.marek@sun.com>
Vladimir Volovich <vvv@vvv.vsu.ru>
Wichert Akkerman <wakkerma@debian.org>
diff --git a/aclocal.m4 b/aclocal.m4
index ccae84f..f596acf 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008 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.
@@ -11,7 +11,15 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(AC_AUTOCONF_VERSION, [2.61],,
+[m4_warning([this file was generated for autoconf 2.61.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -21,14 +29,31 @@
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.10'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.10.1], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
- [AM_AUTOMAKE_VERSION([1.9.5])])
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@@ -85,14 +110,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 7
+# serial 8
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
@@ -101,8 +126,10 @@ AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ(2.52)dnl
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
if $2; then
$1_TRUE=
$1_FALSE='#'
@@ -116,15 +143,14 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 8
+# serial 9
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -152,6 +178,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
[$1], CXX, [depcc="$CXX" am_compiler_list=],
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
@@ -217,6 +244,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -269,7 +297,8 @@ if test "x$enable_dependency_tracking" != xno; then
AMDEPBACKSLASH='\'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
@@ -294,8 +323,9 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
@@ -354,14 +384,14 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 12
+# serial 13
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@@ -378,16 +408,20 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
+[AC_PREREQ([2.60])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
fi
# test whether we have cygpath
@@ -407,6 +441,9 @@ m4_ifval([$2],
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
@@ -442,6 +479,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES(CXX)],
[define([AC_PROG_CXX],
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
])
])
@@ -455,16 +496,17 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
+_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $1 | $1:* )
+ $_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
@@ -477,7 +519,7 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
AC_SUBST(install_sh)])
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
@@ -555,14 +597,14 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
+# serial 5
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
@@ -578,6 +620,7 @@ AC_SUBST($1)])
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
@@ -588,7 +631,7 @@ else
fi
])
-# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -596,60 +639,23 @@ fi
# AM_PROG_MKDIR_P
# ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake. There are at least two reasons why we must not
-# use `-m 0755':
-# - it causes special bits like SGID to be ignored,
-# - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out. Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
+# Check for `mkdir -p'.
AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
- else
- mkdir_p='$(install_sh) -d'
- fi
-fi
-AC_SUBST([mkdir_p])])
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
# Helper functions for option handling. -*- Autoconf -*-
@@ -761,9 +767,21 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
+# Copyright (C) 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
@@ -860,16 +878,68 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
-m4_include([config/codeset.m4])
-m4_include([config/getline.m4])
-m4_include([config/gettext-ver.m4])
-m4_include([config/gettext.m4])
-m4_include([config/glibc21.m4])
-m4_include([config/iconv.m4])
-m4_include([config/lcmessage.m4])
-m4_include([config/lib-ld.m4])
-m4_include([config/lib-link.m4])
-m4_include([config/lib-prefix.m4])
-m4_include([config/progtest.m4])
-m4_include([config/stdbool.m4])
-m4_include([config/strverscmp.m4])
+m4_include([m4/00gnulib.m4])
+m4_include([m4/acl.m4])
+m4_include([m4/alloca.m4])
+m4_include([m4/btowc.m4])
+m4_include([m4/codeset.m4])
+m4_include([m4/errno_h.m4])
+m4_include([m4/error.m4])
+m4_include([m4/exitfail.m4])
+m4_include([m4/extensions.m4])
+m4_include([m4/getdelim.m4])
+m4_include([m4/getline.m4])
+m4_include([m4/getopt.m4])
+m4_include([m4/gettext.m4])
+m4_include([m4/gettimeofday.m4])
+m4_include([m4/glibc21.m4])
+m4_include([m4/gnulib-common.m4])
+m4_include([m4/gnulib-comp.m4])
+m4_include([m4/iconv.m4])
+m4_include([m4/include_next.m4])
+m4_include([m4/inline.m4])
+m4_include([m4/intlmacosx.m4])
+m4_include([m4/lib-ld.m4])
+m4_include([m4/lib-link.m4])
+m4_include([m4/lib-prefix.m4])
+m4_include([m4/localcharset.m4])
+m4_include([m4/locale-fr.m4])
+m4_include([m4/locale-ja.m4])
+m4_include([m4/locale-zh.m4])
+m4_include([m4/longlong.m4])
+m4_include([m4/lstat.m4])
+m4_include([m4/malloc.m4])
+m4_include([m4/mbrlen.m4])
+m4_include([m4/mbrtowc.m4])
+m4_include([m4/mbsinit.m4])
+m4_include([m4/mbstate_t.m4])
+m4_include([m4/mkstemp.m4])
+m4_include([m4/multiarch.m4])
+m4_include([m4/nls.m4])
+m4_include([m4/pathmax.m4])
+m4_include([m4/po.m4])
+m4_include([m4/progtest.m4])
+m4_include([m4/quote.m4])
+m4_include([m4/quotearg.m4])
+m4_include([m4/realloc.m4])
+m4_include([m4/regex.m4])
+m4_include([m4/ssize_t.m4])
+m4_include([m4/stdbool.m4])
+m4_include([m4/stdint.m4])
+m4_include([m4/stdio_h.m4])
+m4_include([m4/stdlib_h.m4])
+m4_include([m4/strerror.m4])
+m4_include([m4/string_h.m4])
+m4_include([m4/strverscmp.m4])
+m4_include([m4/sys_stat_h.m4])
+m4_include([m4/sys_time_h.m4])
+m4_include([m4/tempname.m4])
+m4_include([m4/threadlib.m4])
+m4_include([m4/unistd_h.m4])
+m4_include([m4/unlocked-io.m4])
+m4_include([m4/wchar.m4])
+m4_include([m4/wcrtomb.m4])
+m4_include([m4/wctob.m4])
+m4_include([m4/wctype.m4])
+m4_include([m4/wint_t.m4])
+m4_include([m4/xalloc.m4])
diff --git a/autoboot b/autoboot
new file mode 100755
index 0000000..1134a65
--- /dev/null
+++ b/autoboot
@@ -0,0 +1,652 @@
+#! /bin/sh
+
+# Bootstrap this package from checked-out sources.
+
+# Copyright (C) 2003-2008 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Written by Paul Eggert.
+
+nl='
+'
+
+# Ensure file names are sorted consistently across platforms.
+LC_ALL=C
+export LC_ALL
+
+local_gl_dir=gl
+
+# Temporary directory names.
+bt='._bootmp'
+bt_regex=`echo "$bt"| sed 's/\./[.]/g'`
+bt2=${bt}2
+
+usage() {
+ echo >&2 "\
+Usage: $0 [OPTION]...
+Bootstrap this package from the checked-out sources.
+
+Options:
+ --gnulib-srcdir=DIRNAME Specify the local directory where gnulib
+ sources reside. Use this if you already
+ have gnulib sources on your machine, and
+ do not want to waste your bandwidth downloading
+ them again.
+ --copy Copy files instead of creating symbolic links.
+ --force Attempt to bootstrap even if the sources seem
+ not to have been checked out.
+ --skip-po Do not download po files.
+
+If the file $0.conf exists in the same directory as this script, its
+contents are read as shell variables to configure the bootstrap.
+
+Running without arguments will suffice in most cases.
+"
+}
+
+# Configuration.
+
+# Name of the Makefile.am
+gnulib_mk=gnulib.mk
+
+# List of gnulib modules needed.
+gnulib_modules=
+
+# Any gnulib files needed that are not in modules.
+gnulib_files=
+
+# The command to download all .po files for a specified domain into
+# a specified directory. Fill in the first %s is the domain name, and
+# the second with the destination directory. Use rsync's -L and -r
+# options because the latest/%s directory and the .po files within are
+# all symlinks.
+po_download_command_format=\
+"rsync -Lrtvz 'translationproject.org::tp/latest/%s/' '%s'"
+
+extract_package_name='
+ /^AC_INIT(/{
+ /.*,.*,.*, */{
+ s///
+ s/[][]//g
+ s/)$//
+ p
+ q
+ }
+ s/AC_INIT(\[*//
+ s/]*,.*//
+ s/^GNU //
+ y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ s/[^A-Za-z0-9_]/-/g
+ p
+ }
+'
+package=`sed -n "$extract_package_name" configure.ac` || exit
+gnulib_name=lib$package
+
+build_aux=build-aux
+source_base=lib
+m4_base=m4
+doc_base=doc
+tests_base=tests
+
+# Extra files from gnulib, which override files from other sources.
+gnulib_extra_files="
+ $build_aux/install-sh
+ $build_aux/missing
+ $build_aux/mdate-sh
+ $build_aux/texinfo.tex
+ $build_aux/depcomp
+ $build_aux/config.guess
+ $build_aux/config.sub
+ doc/INSTALL
+"
+
+# Additional gnulib-tool options to use. Use "\newline" to break lines.
+gnulib_tool_option_extras=
+
+# Other locale categories that need message catalogs.
+EXTRA_LOCALE_CATEGORIES=
+
+# Additional xgettext options to use. Use "\\\newline" to break lines.
+XGETTEXT_OPTIONS='\\\
+ --flag=_:1:pass-c-format\\\
+ --flag=N_:1:pass-c-format\\\
+ --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
+'
+
+# Package bug report address for gettext files
+MSGID_BUGS_ADDRESS=bug-$package@gnu.org
+
+# Files we don't want to import.
+excluded_files=
+
+# File that should exist in the top directory of a checked out hierarchy,
+# but not in a distribution tarball.
+checkout_only_file=README-hacking
+
+# Whether to use copies instead of symlinks.
+copy=false
+
+# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want
+# those files to be generated in directories like lib/, m4/, and po/.
+# Or set it to 'auto' to make this script select which to use based
+# on which version control system (if any) is used in the source directory.
+vc_ignore=auto
+
+# Override the default configuration, if necessary.
+# Make sure that bootstrap.conf is sourced from the current directory
+# if we were invoked as "sh bootstrap".
+case "$0" in
+ */*) test -r "$0.conf" && . "$0.conf" ;;
+ *) test -r "$0.conf" && . ./"$0.conf" ;;
+esac
+
+
+if test "$vc_ignore" = auto; then
+ vc_ignore=
+ test -d .git && vc_ignore=.gitignore
+ test -d CVS && vc_ignore="$vc_ignore .cvsignore"
+fi
+
+# Translate configuration into internal form.
+
+# Parse options.
+
+for option
+do
+ case $option in
+ --help)
+ usage
+ exit;;
+ --gnulib-srcdir=*)
+ GNULIB_SRCDIR=`expr "X$option" : 'X--gnulib-srcdir=\(.*\)'`;;
+ --skip-po)
+ SKIP_PO=t;;
+ --force)
+ checkout_only_file=;;
+ --copy)
+ copy=true;;
+ *)
+ echo >&2 "$0: $option: unknown option"
+ exit 1;;
+ esac
+done
+
+if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
+ echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2
+ exit 1
+fi
+
+# If $STR is not already on a line by itself in $FILE, insert it,
+# sorting the new contents of the file and replacing $FILE with the result.
+insert_sorted_if_absent() {
+ file=$1
+ str=$2
+ test -f $file || touch $file
+ echo "$str" | sort -u - $file | cmp -s - $file \
+ || echo "$str" | sort -u - $file -o $file \
+ || exit 1
+}
+
+# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
+found_aux_dir=no
+grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
+ >/dev/null && found_aux_dir=yes
+grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
+ >/dev/null && found_aux_dir=yes
+if test $found_aux_dir = no; then
+ echo "$0: expected line not found in configure.ac. Add the following:" >&2
+ echo " AC_CONFIG_AUX_DIR([$build_aux])" >&2
+ exit 1
+fi
+
+# If $build_aux doesn't exist, create it now, otherwise some bits
+# below will malfunction. If creating it, also mark it as ignored.
+if test ! -d $build_aux; then
+ mkdir $build_aux
+ for dot_ig in x $vc_ignore; do
+ test $dot_ig = x && continue
+ insert_sorted_if_absent $dot_ig $build_aux
+ done
+fi
+
+echo "$0: Bootstrapping from checked-out $package sources..."
+
+# See if we can use gnulib's git-merge-changelog merge driver.
+if test -d .git && (git --version) >/dev/null 2>/dev/null ; then
+ if git config merge.merge-changelog.driver >/dev/null ; then
+ :
+ elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then
+ echo "initializing git-merge-changelog driver"
+ git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
+ git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
+ else
+ echo "consider installing git-merge-changelog from gnulib"
+ fi
+fi
+
+
+cleanup_gnulib() {
+ status=$?
+ rm -fr gnulib
+ exit $status
+}
+
+git_modules_config () {
+ GIT_CONFIG_LOCAL=.gitmodules git config "$@"
+}
+
+# Get gnulib files.
+
+case ${GNULIB_SRCDIR--} in
+-)
+ if git_modules_config submodule.gnulib.url >/dev/null; then
+ echo "$0: getting gnulib files..."
+ git submodule init || exit $?
+ git submodule update || exit $?
+
+ elif [ ! -d gnulib ]; then
+ echo "$0: getting gnulib files..."
+
+ trap cleanup_gnulib 1 2 13 15
+
+ git clone --depth 2 git://git.sv.gnu.org/gnulib ||
+ cleanup_gnulib
+
+ trap - 1 2 13 15
+ fi
+ GNULIB_SRCDIR=gnulib
+ ;;
+*)
+ # Redirect the gnulib submodule to the directory on the command line
+ # if possible.
+ if test -d "$GNULIB_SRCDIR"/.git && \
+ git_modules_config submodule.gnulib.url >/dev/null; then
+ git submodule init
+ GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd`
+ git config --replace-all submodule.gnulib.url $GNULIB_SRCDIR
+ echo "$0: getting gnulib files..."
+ git submodule update || exit $?
+ GNULIB_SRCDIR=gnulib
+ fi
+ ;;
+esac
+
+gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
+<$gnulib_tool || exit
+
+# Get translations.
+
+download_po_files() {
+ subdir=$1
+ domain=$2
+ echo "$0: getting translations into $subdir for $domain..."
+ cmd=`printf "$po_download_command_format" "$domain" "$subdir"`
+ eval "$cmd"
+}
+
+# Download .po files to $po_dir/.reference and copy only the new
+# or modified ones into $po_dir. Also update $po_dir/LINGUAS.
+update_po_files() {
+ # Directory containing primary .po files.
+ # Overwrite them only when we're sure a .po file is new.
+ po_dir=$1
+ domain=$2
+
+ # Download *.po files into this dir.
+ # Usually contains *.s1 checksum files.
+ ref_po_dir="$po_dir/.reference"
+
+ test -d $ref_po_dir || mkdir $ref_po_dir || return
+ download_po_files $ref_po_dir $domain \
+ && ls "$ref_po_dir"/*.po 2>/dev/null |
+ sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS"
+
+ langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'`
+ test "$langs" = '*' && langs=x
+ for po in $langs; do
+ case $po in x) continue;; esac
+ new_po="$ref_po_dir/$po.po"
+ cksum_file="$ref_po_dir/$po.s1"
+ if ! test -f "$cksum_file" ||
+ ! test -f "$po_dir/$po.po" ||
+ ! sha1sum -c --status "$cksum_file" < "$new_po" > /dev/null; then
+ echo "updated $po_dir/$po.po..."
+ cp "$new_po" "$po_dir/$po.po" && sha1sum < "$new_po" > "$cksum_file"
+ fi
+ done
+}
+
+case $SKIP_PO in
+'')
+ if test -d po; then
+ update_po_files po $package || exit
+ fi
+
+ if test -d runtime-po; then
+ update_po_files runtime-po $package-runtime || exit
+ fi;;
+esac
+
+symlink_to_dir()
+{
+ src=$1/$2
+ dst=${3-$2}
+
+ test -f "$src" && {
+
+ # If the destination directory doesn't exist, create it.
+ # This is required at least for "lib/uniwidth/cjk.h".
+ dst_dir=`dirname "$dst"`
+ if ! test -d "$dst_dir"; then
+ mkdir -p "$dst_dir"
+
+ # If we've just created a directory like lib/uniwidth,
+ # tell version control system(s) it's ignorable.
+ # FIXME: for now, this does only one level
+ parent=`dirname "$dst_dir"`
+ for dot_ig in x $vc_ignore; do
+ test $dot_ig = x && continue
+ ig=$parent/$dot_ig
+ insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'`
+ done
+ fi
+
+ if $copy; then
+ {
+ test ! -h "$dst" || {
+ echo "$0: rm -f $dst" &&
+ rm -f "$dst"
+ }
+ } &&
+ test -f "$dst" &&
+ cmp -s "$src" "$dst" || {
+ echo "$0: cp -fp $src $dst" &&
+ cp -fp "$src" "$dst"
+ }
+ else
+ test -h "$dst" &&
+ src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
+ dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
+ test "$src_i" = "$dst_i" || {
+ dot_dots=
+ case $src in
+ /*) ;;
+ *)
+ case /$dst/ in
+ *//* | */../* | */./* | /*/*/*/*/*/)
+ echo >&2 "$0: invalid symlink calculation: $src -> $dst"
+ exit 1;;
+ /*/*/*/*/) dot_dots=../../../;;
+ /*/*/*/) dot_dots=../../;;
+ /*/*/) dot_dots=../;;
+ esac;;
+ esac
+
+ echo "$0: ln -fs $dot_dots$src $dst" &&
+ ln -fs "$dot_dots$src" "$dst"
+ }
+ fi
+ }
+}
+
+cp_mark_as_generated()
+{
+ cp_src=$1
+ cp_dst=$2
+
+ if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
+ symlink_to_dir "$GNULIB_SRCDIR" "$cp_dst"
+ elif cmp -s "$cp_src" "$local_gl_dir/$cp_dst"; then
+ symlink_to_dir $local_gl_dir "$cp_dst"
+ else
+ case $cp_dst in
+ *.[ch]) c1='/* '; c2=' */';;
+ *.texi) c1='@c '; c2= ;;
+ *.m4|*/Make*|Make*) c1='# ' ; c2= ;;
+ *) c1= ; c2= ;;
+ esac
+
+ # If the destination directory doesn't exist, create it.
+ # This is required at least for "lib/uniwidth/cjk.h".
+ dst_dir=`dirname "$cp_dst"`
+ test -d "$dst_dir" || mkdir -p "$dst_dir"
+
+ if test -z "$c1"; then
+ cmp -s "$cp_src" "$cp_dst" || {
+ # Copy the file first to get proper permissions if it
+ # doesn't already exist. Then overwrite the copy.
+ echo "$0: cp -f $cp_src $cp_dst" &&
+ rm -f "$cp_dst" &&
+ cp "$cp_src" "$cp_dst-t" &&
+ sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
+ mv -f "$cp_dst-t" "$cp_dst"
+ }
+ else
+ # Copy the file first to get proper permissions if it
+ # doesn't already exist. Then overwrite the copy.
+ cp "$cp_src" "$cp_dst-t" &&
+ (
+ echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
+ echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
+ sed "s!$bt_regex/!!g" "$cp_src"
+ ) > $cp_dst-t &&
+ if cmp -s "$cp_dst-t" "$cp_dst"; then
+ rm -f "$cp_dst-t"
+ else
+ echo "$0: cp $cp_src $cp_dst # with edits" &&
+ mv -f "$cp_dst-t" "$cp_dst"
+ fi
+ fi
+ fi
+}
+
+version_controlled_file() {
+ dir=$1
+ file=$2
+ found=no
+ if test -d CVS; then
+ grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
+ grep '^/[^/]*/[0-9]' > /dev/null && found=yes
+ elif test -d .git; then
+ git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
+ elif test -d .svn; then
+ svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes
+ else
+ echo "$0: no version control for $dir/$file?" >&2
+ fi
+ test $found = yes
+}
+
+slurp() {
+ for dir in . `(cd $1 && find * -type d -print)`; do
+ copied=
+ sep=
+ for file in `ls -a $1/$dir`; do
+ case $file in
+ .|..) continue;;
+ .*) continue;; # FIXME: should all file names starting with "." be ignored?
+ esac
+ test -d $1/$dir/$file && continue
+ for excluded_file in $excluded_files; do
+ test "$dir/$file" = "$excluded_file" && continue 2
+ done
+ if test $file = Makefile.am; then
+ copied=$copied${sep}$gnulib_mk; sep=$nl
+ remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
+ sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || {
+ echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
+ rm -f $dir/$gnulib_mk &&
+ sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
+ }
+ elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
+ version_controlled_file $dir $file; then
+ echo "$0: $dir/$file overrides $1/$dir/$file"
+ else
+ copied=$copied$sep$file; sep=$nl
+ if test $file = gettext.m4; then
+ echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
+ rm -f $dir/$file
+ sed '
+ /^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
+ AC_DEFUN([AM_INTL_SUBDIR], [
+ /^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
+ AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
+ $a\
+ AC_DEFUN([gl_LOCK_EARLY], [])
+ ' $1/$dir/$file >$dir/$file
+ else
+ cp_mark_as_generated $1/$dir/$file $dir/$file
+ fi
+ fi || exit
+ done
+
+ for dot_ig in x $vc_ignore; do
+ test $dot_ig = x && continue
+ ig=$dir/$dot_ig
+ if test -n "$copied"; then
+ insert_sorted_if_absent $ig "$copied"
+ # If an ignored file name ends with .in.h, then also add
+ # the name with just ".h". Many gnulib headers are generated,
+ # e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
+ # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
+ f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
+ insert_sorted_if_absent $ig "$f"
+
+ # For files like sys_stat.in.h and sys_time.in.h, record as
+ # ignorable the directory we might eventually create: sys/.
+ f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
+ insert_sorted_if_absent $ig "$f"
+ fi
+ done
+ done
+}
+
+
+# Create boot temporary directories to import from gnulib and gettext.
+rm -fr $bt $bt2 &&
+mkdir $bt $bt2 || exit
+
+# Import from gnulib.
+
+gnulib_tool_options="\
+ --import\
+ --no-changelog\
+ --aux-dir $bt/$build_aux\
+ --doc-base $bt/$doc_base\
+ --lib $gnulib_name\
+ --m4-base $bt/$m4_base/\
+ --source-base $bt/$source_base/\
+ --tests-base $bt/$tests_base\
+ --local-dir $local_gl_dir\
+ $gnulib_tool_option_extras\
+"
+echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
+$gnulib_tool $gnulib_tool_options --import $gnulib_modules &&
+slurp $bt || exit
+
+for file in $gnulib_files; do
+ symlink_to_dir "$GNULIB_SRCDIR" $file || exit
+done
+
+
+# Import from gettext.
+with_gettext=yes
+grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
+ with_gettext=no
+
+if test $with_gettext = yes; then
+ echo "$0: (cd $bt2; autopoint) ..."
+ cp configure.ac $bt2 &&
+ (cd $bt2 && autopoint && rm configure.ac) &&
+ slurp $bt2 $bt || exit
+fi
+rm -fr $bt $bt2 || exit
+
+# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
+# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
+# The following requires GNU find 4.2.3 or newer. Considering the usual
+# portability constraints of this script, that may seem a very demanding
+# requirement, but it should be ok. Ignore any failure, which is fine,
+# since this is only a convenience to help developers avoid the relatively
+# unusual case in which a symlinked-to .m4 file is git-removed from gnulib
+# between successive runs of this script.
+find "$m4_base" "$source_base" \
+ -depth \( -name '*.m4' -o -name '*.[ch]' \) \
+ -type l -xtype l -delete > /dev/null 2>&1
+
+# Reconfigure, getting other files.
+
+for command in \
+ libtool \
+ 'aclocal --force -I m4' \
+ 'autoconf --force' \
+ 'autoheader --force' \
+ 'automake --add-missing --copy --force-missing';
+do
+ if test "$command" = libtool; then
+ grep '^[ ]*AM_PROG_LIBTOOL\>' configure.ac >/dev/null ||
+ continue
+ command='libtoolize -c -f'
+ fi
+ echo "$0: $command ..."
+ $command || exit
+done
+
+
+# Get some extra files from gnulib, overriding existing files.
+for file in $gnulib_extra_files; do
+ case $file in
+ */INSTALL) dst=INSTALL;;
+ build-aux/*) dst=$build_aux/`expr "$file" : 'build-aux/\(.*\)'`;;
+ *) dst=$file;;
+ esac
+ symlink_to_dir "$GNULIB_SRCDIR" $file $dst || exit
+done
+
+if test $with_gettext = yes; then
+ # Create gettext configuration.
+ echo "$0: Creating po/Makevars from po/Makevars.template ..."
+ rm -f po/Makevars
+ sed '
+ /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
+ /^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/
+ /^XGETTEXT_OPTIONS *=/{
+ s/$/ \\/
+ a\
+ '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
+ }
+ ' po/Makevars.template >po/Makevars
+
+ if test -d runtime-po; then
+ # Similarly for runtime-po/Makevars, but not quite the same.
+ rm -f runtime-po/Makevars
+ sed '
+ /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/
+ /^subdir *=.*/s/=.*/= runtime-po/
+ /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
+ /^XGETTEXT_OPTIONS *=/{
+ s/$/ \\/
+ a\
+ '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
+ }
+ ' <po/Makevars.template >runtime-po/Makevars
+
+ # Copy identical files from po to runtime-po.
+ (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
+ fi
+fi
+
+echo "$0: done. Now you can run './configure'."
diff --git a/basicdefs.h b/basicdefs.h
index c36cc6f..72f7503 100644
--- a/basicdefs.h
+++ b/basicdefs.h
@@ -18,29 +18,7 @@
#ifndef BASICDEFS_H
#define BASICDEFS_H
-#if defined(_AIX)
-#pragma alloca
-#else
-# if !defined(alloca) /* predefined by HP cc +Olibcalls */
-# ifdef __GNUC__
-# define alloca(size) __builtin_alloca(size)
-# else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# if defined(__hpux)
- void *alloca ();
-# else
-# if !defined(__OS2__) && !defined(WIN32)
- char *alloca ();
-# else
-# include <malloc.h> /* OS/2 defines alloca in here */
-# endif
-# endif
-# endif
-# endif
-# endif
-#endif
+#include <alloca.h>
#ifdef HAVE_WCHAR_H
# include <wchar.h>
@@ -62,20 +40,10 @@
# include <stdbool.h>
#endif
-#if ENABLE_NLS
-# include <libintl.h>
-#else
-# define gettext(msgid) (msgid)
-# define ngettext(sing, plur, n) ((n) == 1 ? (sing) : (plur))
-#endif
+#include <gettext.h>
+#define N_(String) gettext_noop(String)
#define _(String) gettext(String)
-#ifdef gettext_noop
-# define N_(String) gettext_noop(String)
-#else
-# define N_(String) (String)
-#endif
-
/* type countT is used to keep track of line numbers, etc. */
typedef unsigned long countT;
@@ -97,7 +65,7 @@ typedef unsigned long countT;
/* Can the compiler grok function prototypes? */
-#if (defined __STDC__ && __STDC__-0) || defined __GNUC__ || defined __SUNPRO_C || __PROTOTYPES
+#if (defined __STDC__ && __STDC__-0) || defined __GNUC__ || __PROTOTYPES
# define P_(s) s
#else
# define P_(s) ()
@@ -124,7 +92,7 @@ typedef unsigned long countT;
#define FREE(x) (ck_free(VCAST(VOID *)x))
#define MEMCPY(d,s,l) (memcpy(VCAST(VOID *)(d),VCAST(const VOID *)(s),l))
#define MEMMOVE(d,s,l) (memmove(VCAST(VOID *)(d),VCAST(const VOID *)(s),l))
-#define OB_MALLOC(o,n,t) (VCAST(t *)obstack_alloc(o,(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_free ck_free
diff --git a/bootstrap.sh b/bootstrap.sh
index 976893b..c25d16a 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -19,33 +19,90 @@ if test -f config.h; then :; else
*/
#define PACKAGE "sed"
-#define VERSION "4.1.5-boot"
-#define SED_FEATURE_VERSION "4.1"
+#define PACKAGE_BUGREPORT "bug-gnu-utils@gnu.org"
+#define VERSION "4.2-boot"
+#define SED_FEATURE_VERSION "4.2"
#define BOOTSTRAP 1
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+
/* Define if your compiler/headers don't support const. */
#undef const
+#define __getopt_argv_const const
-/* Undefine if headers have conflicting definition. */
-#define mbstate_t int
+/* Define if headers have no definition. */
+/* #define mbstate_t int */
+#define HAVE_WCHAR_H 1
+#define HAVE_MBRTOWC 1
/* Toggle if you encounter errors in lib/mkstemp.c. */
-#define HAVE_UNISTD_H
-#define HAVE_FCNTL_H
+#define HAVE_UNISTD_H 1
+#define HAVE_FCNTL_H 1
#undef HAVE_SYS_FILE_H
#undef HAVE_IO_H
-/* Undefine if <stdio.h> or <sys/types.h> has conflicting definition. */
-#define size_t unsigned
-#define ssize_t int
-
-/* If your antique compiler doesn't grok ``void *'', then #define VOID char */
-#undef VOID
+/* Emulate stdbool.h. */
+#define bool int
+#define true 1
+#define false 0
+/* Avoid uselessly complicated gnulib stuff. */
+#define _LOCALCHARSET_H
+#define locale_charset() "C"
/* All other config.h.in options intentionally omitted. Report as a
bug if you need extra "#define"s in here. */
+
END_OF_CONFIG_H
+
+ cat > conftest.c << \EOF
+#define size_t unsigned
+#include <sys/types.h>
+#include <stdio.h>
+
+size_t s;
+EOF
+ if $CC -c conftest.c -o conftest.o > /dev/null 2>&1 ; then
+ echo '#define size_t unsigned' >> config.h
+ echo checking for size_t... no
+ else
+ echo checking for size_t... yes
+ fi
+
+ cat > conftest.c << \EOF
+#define ssize_t int
+#include <sys/types.h>
+#include <stdio.h>
+
+ssize_t s;
+EOF
+ if $CC -c conftest.c -o conftest.o > /dev/null 2>&1 ; then
+ echo '#define ssize_t int' >> config.h
+ echo checking for ssize_t... no
+ else
+ echo checking for ssize_t... yes
+ fi
+
+ cat > conftest.c << \EOF
+void *foo;
+
+EOF
+ if $CC -c conftest.c -o conftest.o > /dev/null 2>&1 ; then
+ echo checking for void *... yes
+ else
+ echo '#define VOID char' >> config.h
+ echo checking for void *... no
+ fi
+
+ rm -f conftest.*
+
+ cat >> config.h << \EOF
+#include <sys/types.h>
+#include <stdio.h>
+EOF
+
fi
# tell the user what we're doing from here on...
@@ -55,21 +112,28 @@ set -x -e
rm -f lib/*.o sed/*.o sed/sed
cd lib || exit 1
-rm -f regex.h
-cp regex_.h regex.h
-${CC} -DHAVE_CONFIG_H -I.. -I. -c alloca.c
+cp alloca.in.h alloca.h || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c alloca.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c copy-acl.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c error.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c exitfail.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c file-has-acl.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c getdelim.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c getline.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c getopt.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c getopt1.c || exit 1
-${CC} -DHAVE_CONFIG_H -I.. -I. -c memchr.c || exit 1
-${CC} -DHAVE_CONFIG_H -I.. -I. -c memcmp.c || exit 1
-${CC} -DHAVE_CONFIG_H -I.. -I. -c memmove.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c malloc.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c mkstemp.c || exit 1
-${CC} -DHAVE_CONFIG_H -I.. -I. -c strverscmp.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c obstack.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c quote.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c quotearg.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c regex.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c set-mode-acl.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c strerror.c || exit 1
-${CC} -DHAVE_CONFIG_H -I.. -I. -c utils.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c strverscmp.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c tempname.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c xalloc-die.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c xmalloc.c || exit 1
cd ../sed || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c sed.c || exit 1
@@ -78,5 +142,6 @@ ${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c compile.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c execute.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c mbcs.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c regexp.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c utils.c || exit 1
${CC} -o sed *.o ../lib/*.o || exit 1
diff --git a/bootstrap.sh.in b/bootstrap.sh.in
index 82b2432..9905b7a 100755
--- a/bootstrap.sh.in
+++ b/bootstrap.sh.in
@@ -19,33 +19,90 @@ if test -f config.h; then :; else
*/
#define PACKAGE "sed"
+#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
#define VERSION "@VERSION@-boot"
#define SED_FEATURE_VERSION "@SED_FEATURE_VERSION@"
#define BOOTSTRAP 1
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE 1
+#endif
+
/* Define if your compiler/headers don't support const. */
#undef const
+#define __getopt_argv_const const
-/* Undefine if headers have conflicting definition. */
-#define mbstate_t int
+/* Define if headers have no definition. */
+/* #define mbstate_t int */
+#define HAVE_WCHAR_H 1
+#define HAVE_MBRTOWC 1
/* Toggle if you encounter errors in lib/mkstemp.c. */
-#define HAVE_UNISTD_H
-#define HAVE_FCNTL_H
+#define HAVE_UNISTD_H 1
+#define HAVE_FCNTL_H 1
#undef HAVE_SYS_FILE_H
#undef HAVE_IO_H
-/* Undefine if <stdio.h> or <sys/types.h> has conflicting definition. */
-#define size_t unsigned
-#define ssize_t int
-
-/* If your antique compiler doesn't grok ``void *'', then #define VOID char */
-#undef VOID
+/* Emulate stdbool.h. */
+#define bool int
+#define true 1
+#define false 0
+/* Avoid uselessly complicated gnulib stuff. */
+#define _LOCALCHARSET_H
+#define locale_charset() "C"
/* All other config.h.in options intentionally omitted. Report as a
bug if you need extra "#define"s in here. */
+
END_OF_CONFIG_H
+
+ cat > conftest.c << \EOF
+#define size_t unsigned
+#include <sys/types.h>
+#include <stdio.h>
+
+size_t s;
+EOF
+ if $CC -c conftest.c -o conftest.o > /dev/null 2>&1 ; then
+ echo '#define size_t unsigned' >> config.h
+ echo checking for size_t... no
+ else
+ echo checking for size_t... yes
+ fi
+
+ cat > conftest.c << \EOF
+#define ssize_t int
+#include <sys/types.h>
+#include <stdio.h>
+
+ssize_t s;
+EOF
+ if $CC -c conftest.c -o conftest.o > /dev/null 2>&1 ; then
+ echo '#define ssize_t int' >> config.h
+ echo checking for ssize_t... no
+ else
+ echo checking for ssize_t... yes
+ fi
+
+ cat > conftest.c << \EOF
+void *foo;
+
+EOF
+ if $CC -c conftest.c -o conftest.o > /dev/null 2>&1 ; then
+ echo checking for void *... yes
+ else
+ echo '#define VOID char' >> config.h
+ echo checking for void *... no
+ fi
+
+ rm -f conftest.*
+
+ cat >> config.h << \EOF
+#include <sys/types.h>
+#include <stdio.h>
+EOF
+
fi
# tell the user what we're doing from here on...
@@ -55,21 +112,28 @@ set -x -e
rm -f lib/*.o sed/*.o sed/sed
cd lib || exit 1
-rm -f regex.h
-cp regex_.h regex.h
-${CC} -DHAVE_CONFIG_H -I.. -I. -c alloca.c
+cp alloca.in.h alloca.h || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c alloca.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c copy-acl.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c error.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c exitfail.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c file-has-acl.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c getdelim.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c getline.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c getopt.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c getopt1.c || exit 1
-${CC} -DHAVE_CONFIG_H -I.. -I. -c memchr.c || exit 1
-${CC} -DHAVE_CONFIG_H -I.. -I. -c memcmp.c || exit 1
-${CC} -DHAVE_CONFIG_H -I.. -I. -c memmove.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c malloc.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c mkstemp.c || exit 1
-${CC} -DHAVE_CONFIG_H -I.. -I. -c strverscmp.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c obstack.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c quote.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c quotearg.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c regex.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c set-mode-acl.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -c strerror.c || exit 1
-${CC} -DHAVE_CONFIG_H -I.. -I. -c utils.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c strverscmp.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c tempname.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c xalloc-die.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -c xmalloc.c || exit 1
cd ../sed || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c sed.c || exit 1
@@ -78,5 +142,6 @@ ${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c compile.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c execute.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c mbcs.c || exit 1
${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c regexp.c || exit 1
+${CC} -DHAVE_CONFIG_H -I.. -I. -I../lib -c utils.c || exit 1
${CC} -o sed *.o ../lib/*.o || exit 1
diff --git a/config/config.guess b/build-aux/config.guess
index 23d670b..3eda297 100755
--- a/config/config.guess
+++ b/build-aux/config.guess
@@ -1,9 +1,10 @@
#! /bin/sh
# Attempt to guess a canonical system name.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
-timestamp='2004-08-11'
+timestamp='2009-02-03'
# 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
@@ -17,13 +18,15 @@ timestamp='2004-08-11'
#
# 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.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+
# Originally written by Per Bothner <per@bothner.com>.
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
@@ -53,8 +56,8 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -66,11 +69,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -104,7 +107,7 @@ 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 -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$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 ; } ;
@@ -123,7 +126,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
@@ -158,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
@@ -196,64 +200,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
- exit 0 ;;
- amd64:OpenBSD:*:*)
- echo x86_64-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- amiga:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- cats:OpenBSD:*:*)
- echo arm-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- luna88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- macppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvmeppc:OpenBSD:*:*)
- echo powerpc-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mipseb-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sun3:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:OpenBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
*:ekkoBSD:*:*)
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
macppc:MirBSD:*:*)
- echo powerppc-unknown-mirbsd${UNAME_RELEASE}
- exit 0 ;;
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
*:MirBSD:*:*)
echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -306,37 +269,43 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit 0 ;;
+ exit ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# Should we change UNAME_MACHINE based on the output of uname instead
# of the specific Alpha model?
echo alpha-pc-interix
- exit 0 ;;
+ exit ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
- exit 0 ;;
+ exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
- exit 0;;
+ exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-amigaos
- exit 0 ;;
+ exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo ${UNAME_MACHINE}-unknown-morphos
- exit 0 ;;
+ exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
- exit 0 ;;
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
- exit 0 ;;
+ exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
- exit 0;;
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
- exit 0;;
+ exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
@@ -344,32 +313,45 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
else
echo pyramid-pyramid-bsd
fi
- exit 0 ;;
+ exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
- exit 0 ;;
+ exit ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
- exit 0 ;;
- DRS?6000:UNIX_SV:4.2*:7*)
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7 && exit 0 ;;
+ sparc) echo sparc-icl-nx7; exit ;;
esac ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
- i86pc:SunOS:5.*:*)
- echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ 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/[^.]*//'`
+ exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
@@ -378,10 +360,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit 0 ;;
+ exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
@@ -393,10 +375,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
- exit 0 ;;
+ exit ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
@@ -407,40 +389,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
- exit 0 ;;
+ exit ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -464,32 +446,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c \
- && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
- && exit 0
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
echo mips-mips-riscos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
- exit 0 ;;
+ exit ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
- exit 0 ;;
+ exit ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
- exit 0 ;;
+ exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
- exit 0 ;;
+ exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
- exit 0 ;;
+ exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
- exit 0 ;;
+ exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -505,29 +488,29 @@ EOF
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit 0 ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
- exit 0 ;;
+ exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
- exit 0 ;;
+ exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
- exit 0 ;;
+ exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
- exit 0 ;;
+ exit ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit 0 ;;
+ exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
- exit 0 ;;
+ exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
@@ -535,7 +518,7 @@ EOF
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit 0 ;;
+ exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval $set_cc_for_build
@@ -550,15 +533,19 @@ EOF
exit(0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
- echo rs6000-ibm-aix3.2.5
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
- exit 0 ;;
- *:AIX:*:[45])
+ exit ;;
+ *:AIX:*:[456])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
@@ -571,28 +558,28 @@ EOF
IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit 0 ;;
+ exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
- exit 0 ;;
+ exit ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
- exit 0 ;;
+ exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit 0 ;; # report: romp-ibm BSD 4.3
+ exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
- exit 0 ;;
+ exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
- exit 0 ;;
+ exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
- exit 0 ;;
+ exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
- exit 0 ;;
+ exit ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
case "${UNAME_MACHINE}" in
@@ -654,9 +641,19 @@ EOF
esac
if [ ${HP_ARCH} = "hppa2.0w" ]
then
- # avoid double evaluation of $set_cc_for_build
- test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
then
HP_ARCH="hppa2.0w"
else
@@ -664,11 +661,11 @@ EOF
fi
fi
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit 0 ;;
+ exit ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux${HPUX_REV}
- exit 0 ;;
+ exit ;;
3050*:HI-UX:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -696,152 +693,192 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
- exit 0 ;;
+ exit ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
- exit 0 ;;
+ exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
- exit 0 ;;
+ exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
- exit 0 ;;
+ exit ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
- exit 0 ;;
+ exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
- exit 0 ;;
+ exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
- exit 0 ;;
+ exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
- exit 0 ;;
+ exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit 0 ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit 0 ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit 0 ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit 0 ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit 0 ;;
+ exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
+ exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit 0 ;;
+ exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:BSD/OS:*:*)
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:FreeBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit 0 ;;
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
- exit 0 ;;
- i*:MINGW*:*)
+ exit ;;
+ *:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
- exit 0 ;;
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
- exit 0 ;;
- x86:Interix*:[34]*)
- echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
- exit 0 ;;
+ exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd | genuineintel)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
- exit 0 ;;
+ exit ;;
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
# UNAME_MACHINE based on the output of uname instead of i386?
echo i586-pc-interix
- exit 0 ;;
+ exit ;;
i*:UWIN*:*)
echo ${UNAME_MACHINE}-pc-uwin
- exit 0 ;;
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
p*:CYGWIN*:*)
echo powerpcle-unknown-cygwin
- exit 0 ;;
+ exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit 0 ;;
+ exit ;;
*:GNU:*:*)
# the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit 0 ;;
+ exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit 0 ;;
+ exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
- exit 0 ;;
+ exit ;;
arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
cris:Linux:*:*)
echo cris-axis-linux-gnu
- exit 0 ;;
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
m32r*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
mips:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
@@ -858,8 +895,12 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
mips64:Linux:*:*)
eval $set_cc_for_build
@@ -877,15 +918,22 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
- test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -899,7 +947,10 @@ EOF
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit 0 ;;
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -907,25 +958,31 @@ EOF
PA8*) echo hppa2.0-unknown-linux-gnu ;;
*) echo hppa-unknown-linux-gnu ;;
esac
- exit 0 ;;
+ exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
- exit 0 ;;
+ exit ;;
sh64*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
- exit 0 ;;
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
@@ -943,15 +1000,12 @@ EOF
;;
a.out-i386-linux)
echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0 ;;
- coff-i386)
- echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0 ;;
+ exit ;;
"")
# Either a pre-BFD a.out linker (linux-gnuoldld) or
# one that does not give us useful --help.
echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit 0 ;;
+ exit ;;
esac
# Determine whether the default compiler is a.out or elf
eval $set_cc_for_build
@@ -968,7 +1022,7 @@ EOF
LIBC=gnulibc1
# endif
#else
- #ifdef __INTEL_COMPILER
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
LIBC=gnu
#else
LIBC=gnuaout
@@ -978,16 +1032,23 @@ EOF
LIBC=dietlibc
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
- test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
- exit 0 ;;
+ exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
@@ -995,27 +1056,27 @@ EOF
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit 0 ;;
+ exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
- exit 0 ;;
+ exit ;;
i*86:XTS-300:*:STOP)
echo ${UNAME_MACHINE}-unknown-stop
- exit 0 ;;
+ exit ;;
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
- exit 0 ;;
- i*86:syllable:*:*)
+ exit ;;
+ i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
- exit 0 ;;
+ exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit 0 ;;
+ exit ;;
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
@@ -1023,15 +1084,16 @@ EOF
else
echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
fi
- exit 0 ;;
- i*86:*:5:[78]*)
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit 0 ;;
+ exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1049,73 +1111,86 @@ EOF
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
- exit 0 ;;
+ exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i386.
- echo i386-pc-msdosdjgpp
- exit 0 ;;
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
- exit 0 ;;
+ exit ;;
paragon:*:*:*)
echo i860-intel-osf1
- exit 0 ;;
+ exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
- exit 0 ;;
+ exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
- exit 0 ;;
+ exit ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
- exit 0 ;;
+ exit ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
- exit 0 ;;
+ exit ;;
M68*:*:R3V[5678]*:*)
- test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && echo i486-ncr-sysv4 && exit 0 ;;
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
- exit 0 ;;
+ exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
- exit 0 ;;
+ exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1123,69 +1198,84 @@ EOF
else
echo ns32k-sni-sysv
fi
- exit 0 ;;
+ exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
- exit 0 ;;
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
- exit 0 ;;
+ exit ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
- exit 0 ;;
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
- exit 0 ;;
+ exit ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
- exit 0 ;;
+ exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit 0 ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
- exit 0 ;;
+ exit ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
- exit 0 ;;
+ exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
- exit 0 ;;
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Rhapsody:*:*)
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
- *86) UNAME_PROCESSOR=i686 ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1193,22 +1283,25 @@ EOF
UNAME_MACHINE=pc
fi
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
- exit 0 ;;
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
- exit 0 ;;
+ exit ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
- exit 0 ;;
+ exit ;;
DS/*:UNIX_System_V:*:*)
echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
@@ -1219,38 +1312,50 @@ EOF
UNAME_MACHINE="$cputype"
fi
echo ${UNAME_MACHINE}-unknown-plan9
- exit 0 ;;
+ exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
- exit 0 ;;
+ exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
- exit 0 ;;
+ exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
- exit 0 ;;
+ exit ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
- exit 0 ;;
+ exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
- exit 0 ;;
+ exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
- exit 0 ;;
+ exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux${UNAME_RELEASE}
- exit 0 ;;
+ exit ;;
*:DragonFly:*:*)
echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit 0 ;;
+ exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms && exit 0 ;;
- I*) echo ia64-dec-vms && exit 0 ;;
- V*) echo vax-dec-vms && exit 0 ;;
- esac
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1282,7 +1387,7 @@ main ()
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix"); exit (0);
+ printf ("arm-acorn-riscix\n"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
@@ -1371,11 +1476,12 @@ main ()
}
EOF
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
# Apollos put the system type in the environment.
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
# Convex versions that predate uname can use getsysinfo(1)
@@ -1384,22 +1490,22 @@ then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
- exit 0 ;;
+ exit ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit 0 ;;
+ exit ;;
c34*)
echo c34-convex-bsd
- exit 0 ;;
+ exit ;;
c38*)
echo c38-convex-bsd
- exit 0 ;;
+ exit ;;
c4*)
echo c4-convex-bsd
- exit 0 ;;
+ exit ;;
esac
fi
@@ -1410,7 +1516,9 @@ This script, last modified $timestamp, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from
- ftp://ftp.gnu.org/pub/gnu/config/
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
If the version you run ($0) is already up to date, please
send the following data and any information you think might be
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
new file mode 100755
index 0000000..85c2f20
--- /dev/null
+++ b/build-aux/config.rpath
@@ -0,0 +1,672 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2008 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ darwin*)
+ case $cc_basename in
+ xlc*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ newsos6)
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ ecc*)
+ wl='-Wl,'
+ ;;
+ icc* | ifort*)
+ wl='-Wl,'
+ ;;
+ lf95*)
+ wl='-Wl,'
+ ;;
+ pgcc | pgf77 | pgf90)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ wl='-Wl,'
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ case "$host_os" in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we cannot use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ gnu* | linux* | k*bsd*-gnu)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = no; then
+ hardcode_libdir_flag_spec=
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if test "$GCC" = yes ; then
+ :
+ else
+ case $cc_basename in
+ xlc*)
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | dragonfly*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+ hpux11*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ ;;
+ *)
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ ;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator=':'
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec= # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ library_names_spec='$libname.a'
+ ;;
+ aix[4-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ amigaos*)
+ library_names_spec='$libname.a'
+ ;;
+ beos*)
+ library_names_spec='$libname$shrext'
+ ;;
+ bsdi[45]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ shrext=.dll
+ library_names_spec='$libname.dll.a $libname.lib'
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ library_names_spec='$libname$shrext'
+ ;;
+ dgux*)
+ library_names_spec='$libname$shrext'
+ ;;
+ freebsd1*)
+ ;;
+ freebsd* | dragonfly*)
+ case "$host_os" in
+ freebsd[123]*)
+ library_names_spec='$libname$shrext$versuffix' ;;
+ *)
+ library_names_spec='$libname$shrext' ;;
+ esac
+ ;;
+ gnu*)
+ library_names_spec='$libname$shrext'
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $host_cpu in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ library_names_spec='$libname$shrext'
+ ;;
+ interix[3-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ library_names_spec='$libname$shrext'
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux* | k*bsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ knetbsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ netbsd*)
+ library_names_spec='$libname$shrext'
+ ;;
+ newsos6)
+ library_names_spec='$libname$shrext'
+ ;;
+ nto-qnx*)
+ library_names_spec='$libname$shrext'
+ ;;
+ openbsd*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ library_names_spec='$libname.a'
+ ;;
+ osf3* | osf4* | osf5*)
+ library_names_spec='$libname$shrext'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sunos4*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ sysv4 | sysv4.3*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv4*MP*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ library_names_spec='$libname$shrext'
+ ;;
+ uts4*)
+ library_names_spec='$libname$shrext'
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/config/config.sub b/build-aux/config.sub
index 095b56f..a39437d 100755
--- a/config/config.sub
+++ b/build-aux/config.sub
@@ -1,9 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# Free Software Foundation, Inc.
-timestamp='2004-06-24'
+timestamp='2009-04-17'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,14 +22,15 @@ timestamp='2004-06-24'
#
# 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.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+
# Please send patches to <config-patches@gnu.org>. Submit a context
# diff and a properly formatted ChangeLog entry.
#
@@ -70,8 +72,8 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
-Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -83,11 +85,11 @@ Try \`$me --help' for more information."
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
- echo "$timestamp" ; exit 0 ;;
+ echo "$timestamp" ; exit ;;
--version | -v )
- echo "$version" ; exit 0 ;;
+ echo "$version" ; exit ;;
--help | --h* | -h )
- echo "$usage"; exit 0 ;;
+ echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
@@ -99,7 +101,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
echo $1
- exit 0;;
+ exit ;;
* )
break ;;
@@ -118,8 +120,10 @@ esac
# 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-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
- kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -170,6 +174,10 @@ case $os in
-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/'`
@@ -186,6 +194,10 @@ case $os in
# 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/'`
@@ -230,22 +242,28 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
- | fr30 | frv \
+ | fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
- | m32r | m32rle | m68000 | m68k | m88k | mcore \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
- | mips64vr | mips64vrel \
+ | mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
@@ -254,21 +272,26 @@ case $basic_machine in
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
+ | moxie \
+ | mt \
| msp430 \
+ | nios | nios2 \
| ns16k | ns32k \
- | openrisc | or32 \
+ | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | score \
+ | 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 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
- | strongarm \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
- | x86 | xscale | xstormy16 | xtensa \
- | z8k)
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
@@ -278,6 +301,9 @@ case $basic_machine in
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
@@ -297,28 +323,32 @@ case $basic_machine in
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* \
- | bs2000-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
- | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
- | m32r-* | m32rle-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | mcore-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
- | mips64vr-* | mips64vrel-* \
+ | mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
@@ -327,26 +357,33 @@ case $basic_machine in
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
+ | mt-* \
| msp430-* \
+ | nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+ | 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-* | sparc86x-* | sparclet-* | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
- | xtensa-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
| ymp-* \
- | z8k-*)
+ | 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.
@@ -410,6 +447,10 @@ case $basic_machine in
basic_machine=m68k-apollo
os=-bsd
;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -418,10 +459,22 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -450,13 +503,16 @@ case $basic_machine in
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16c)
- basic_machine=cr16c-unknown
+ 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
;;
@@ -486,6 +542,14 @@ case $basic_machine in
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
@@ -636,6 +700,14 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
m88k-omron*)
basic_machine=m88k-omron
;;
@@ -651,6 +723,10 @@ case $basic_machine in
basic_machine=i386-pc
os=-mingw32
;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
miniframe)
basic_machine=m68000-convergent
;;
@@ -676,6 +752,9 @@ case $basic_machine in
basic_machine=i386-pc
os=-msdos
;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
@@ -751,9 +830,8 @@ case $basic_machine in
basic_machine=hppa1.1-oki
os=-proelf
;;
- or32 | or32-*)
+ openrisc | openrisc-*)
basic_machine=or32-unknown
- os=-coff
;;
os400)
basic_machine=powerpc-ibm
@@ -775,6 +853,14 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
pbd)
basic_machine=sparc-tti
;;
@@ -784,6 +870,12 @@ case $basic_machine in
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
;;
@@ -840,6 +932,10 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
@@ -866,6 +962,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
sei)
basic_machine=mips-sei
os=-seiux
@@ -877,6 +977,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
sh64)
basic_machine=sh64-unknown
;;
@@ -966,6 +1069,10 @@ case $basic_machine in
basic_machine=tic6x-unknown
os=-coff
;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -1026,6 +1133,10 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
xps | xps100)
basic_machine=xps100-honeywell
;;
@@ -1037,6 +1148,10 @@ case $basic_machine in
basic_machine=z8k-unknown
os=-sim
;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
none)
basic_machine=none-none
os=-none
@@ -1075,13 +1190,10 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
basic_machine=sparc-sun
;;
cydra)
@@ -1150,24 +1262,28 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* \
+ | -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1185,7 +1301,7 @@ case $os in
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
@@ -1294,6 +1410,12 @@ case $os in
-kaos*)
os=-kaos
;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
-none)
;;
*)
@@ -1316,6 +1438,12 @@ else
# system, and we'll never get to this point.
case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
*-acorn)
os=-riscix1.2
;;
@@ -1325,9 +1453,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1353,6 +1481,9 @@ case $basic_machine in
m68*-cisco)
os=-aout
;;
+ mep-*)
+ os=-elf
+ ;;
mips*-cisco)
os=-elf
;;
@@ -1371,6 +1502,9 @@ case $basic_machine in
*-be)
os=-beos
;;
+ *-haiku)
+ os=-haiku
+ ;;
*-ibm)
os=-aix
;;
@@ -1542,7 +1676,7 @@ case $basic_machine in
esac
echo $basic_machine$os
-exit 0
+exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/config/depcomp b/build-aux/depcomp
index eed3cc9..9ebfd85 100755
--- a/config/depcomp
+++ b/build-aux/depcomp
@@ -1,13 +1,14 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2004-05-31.23
+scriptversion=2009-04-22.22
-# Copyright (C) 1999, 2000, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
+# Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# 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,
@@ -16,9 +17,7 @@ scriptversion=2004-05-31.23
# GNU 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 <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -50,11 +49,11 @@ Environment variables:
Report bugs to <bug-automake@gnu.org>.
EOF
- exit 0
+ exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
- exit 0
+ exit $?
;;
esac
@@ -86,12 +85,34 @@ if test "$depmode" = dashXmstdout; then
depmode=dashmstdout
fi
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u="sed s,\\\\\\\\,/,g"
+ depmode=msvisualcpp
+fi
+
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
- "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
stat=$?
if test $stat -eq 0; then :
else
@@ -178,14 +199,14 @@ sgi)
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
-' ' ' >> $depfile
- echo >> $depfile
+' ' ' >> "$depfile"
+ echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> $depfile
+ >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@@ -201,34 +222,39 @@ aix)
# current directory. Also, the AIX compiler puts `$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
- stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
- tmpdepfile="$stripped.u"
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
- if test -f "$tmpdepfile"; then :
- else
- stripped=`echo "$stripped" | sed 's,^.*/,,'`
- tmpdepfile="$stripped.u"
- fi
-
if test $stat -eq 0; then :
else
- rm -f "$tmpdepfile"
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
if test -f "$tmpdepfile"; then
- outname="$stripped.o"
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
- sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+ sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+ # That's a tab and a space in the [].
+ sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
@@ -276,6 +302,51 @@ icc)
rm -f "$tmpdepfile"
;;
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -eq 0; then :
+ else
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add `dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ echo "#dummy" > "$depfile"
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
@@ -287,36 +358,43 @@ tru64)
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
- # Dependencies are output in .lo.d with libtool 1.4.
- # With libtool 1.5 they are output both in $dir.libs/$base.o.d
- # and in $dir.libs/$base.o.d and $dir$base.o.d. We process the
- # latter, because the former will be cleaned when $dir.libs is
- # erased.
- tmpdepfile1="$dir.libs/$base.lo.d"
- tmpdepfile2="$dir$base.o.d"
- tmpdepfile3="$dir.libs/$base.d"
+ # With Tru64 cc, shared objects can also be used to make a
+ # static library. This mechanism is used in libtool 1.4 series to
+ # handle both shared and static libraries in a single compilation.
+ # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+ #
+ # With libtool 1.5 this exception was removed, and libtool now
+ # generates 2 separate objects for the 2 libraries. These two
+ # compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
+ tmpdepfile2=$dir$base.o.d # libtool 1.5
+ tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
+ tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
- tmpdepfile1="$dir$base.o.d"
- tmpdepfile2="$dir$base.d"
- tmpdepfile3="$dir$base.d"
+ tmpdepfile1=$dir$base.o.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ tmpdepfile4=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
exit $stat
fi
- if test -f "$tmpdepfile1"; then
- tmpdepfile="$tmpdepfile1"
- elif test -f "$tmpdepfile2"; then
- tmpdepfile="$tmpdepfile2"
- else
- tmpdepfile="$tmpdepfile3"
- fi
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+ do
+ test -f "$tmpdepfile" && break
+ done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a tab and a space in the [].
@@ -338,7 +416,7 @@ dashmstdout)
# Remove the call to Libtool.
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
@@ -389,32 +467,39 @@ makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
- cleared=no
- for arg in "$@"; do
+ cleared=no eat=no
+ for arg
+ do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
- obj_suffix="`echo $object | sed 's/^.*\././'`"
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
@@ -434,7 +519,7 @@ cpp)
# Remove the call to Libtool.
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
@@ -460,7 +545,8 @@ cpp)
done
"$@" -E |
- sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+ sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
@@ -471,13 +557,27 @@ cpp)
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
+ # always write the preprocessed file to stdout.
"$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
IFS=" "
for arg
do
case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
@@ -490,16 +590,23 @@ msvisualcpp)
;;
esac
done
- "$@" -E |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
none)
exec "$@"
;;
diff --git a/config/help2man b/build-aux/help2man
index af57f41..af57f41 100755
--- a/config/help2man
+++ b/build-aux/help2man
diff --git a/build-aux/install-sh b/build-aux/install-sh
new file mode 100755
index 0000000..a5897de
--- /dev/null
+++ b/build-aux/install-sh
@@ -0,0 +1,519 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2006-12-25.00
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" "" $nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+ doit_exec=exec
+else
+ doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+ test "$posix_glob" != "?" || {
+ if (set -f) 2>/dev/null; then
+ posix_glob=
+ else
+ posix_glob=:
+ fi
+ }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *' '* | *'
+'* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t) dst_arg=$2
+ shift;;
+
+ -T) no_target_directory=true;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+
+ dst=$dst_arg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst;;
+ esac
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test -n "$no_target_directory"; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ # Prefer dirname, but fall back on a substitute if dirname fails.
+ dstdir=`
+ (dirname "$dst") 2>/dev/null ||
+ expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$dst" : 'X\(//\)[^/]' \| \
+ X"$dst" : 'X\(//\)$' \| \
+ X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+ echo X"$dst" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'
+ `
+
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writeable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ -*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ eval "$initialize_posix_glob"
+
+ oIFS=$IFS
+ IFS=/
+ $posix_glob set -f
+ set fnord $dstdir
+ shift
+ $posix_glob set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test -z "$d" && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+
+ eval "$initialize_posix_glob" &&
+ $posix_glob set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ $posix_glob set +f &&
+
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/build-aux/link-warning.h b/build-aux/link-warning.h
new file mode 100644
index 0000000..fda0194
--- /dev/null
+++ b/build-aux/link-warning.h
@@ -0,0 +1,28 @@
+/* GL_LINK_WARNING("literal string") arranges to emit the literal string as
+ a linker warning on most glibc systems.
+ We use a linker warning rather than a preprocessor warning, because
+ #warning cannot be used inside macros. */
+#ifndef GL_LINK_WARNING
+ /* This works on platforms with GNU ld and ELF object format.
+ Testing __GLIBC__ is sufficient for asserting that GNU ld is in use.
+ Testing __ELF__ guarantees the ELF object format.
+ Testing __GNUC__ is necessary for the compound expression syntax. */
+# if defined __GLIBC__ && defined __ELF__ && defined __GNUC__
+# define GL_LINK_WARNING(message) \
+ GL_LINK_WARNING1 (__FILE__, __LINE__, message)
+# define GL_LINK_WARNING1(file, line, message) \
+ GL_LINK_WARNING2 (file, line, message) /* macroexpand file and line */
+# define GL_LINK_WARNING2(file, line, message) \
+ GL_LINK_WARNING3 (file ":" #line ": warning: " message)
+# define GL_LINK_WARNING3(message) \
+ ({ static const char warning[sizeof (message)] \
+ __attribute__ ((__unused__, \
+ __section__ (".gnu.warning"), \
+ __aligned__ (1))) \
+ = message "\n"; \
+ (void)0; \
+ })
+# else
+# define GL_LINK_WARNING(message) ((void) 0)
+# endif
+#endif
diff --git a/config/mdate-sh b/build-aux/mdate-sh
index caed933..757a5dc 100755
--- a/config/mdate-sh
+++ b/build-aux/mdate-sh
@@ -1,14 +1,15 @@
#!/bin/sh
# Get modification time of a file or directory and pretty-print it.
-scriptversion=2003-11-09.00
+scriptversion=2007-03-30.02
-# Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1995, 1996, 1997, 2003, 2004, 2005, 2007 Free Software
+# Foundation, Inc.
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# 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,
@@ -17,8 +18,7 @@ scriptversion=2003-11-09.00
# GNU 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 <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -42,11 +42,11 @@ Pretty-print the modification time of FILE.
Report bugs to <bug-automake@gnu.org>.
EOF
- exit 0
+ exit $?
;;
-v | --v*)
echo "mdate-sh $scriptversion"
- exit 0
+ exit $?
;;
esac
@@ -58,7 +58,15 @@ export LC_ALL
LC_TIME=C
export LC_TIME
-save_arg1="$1"
+# GNU ls changes its time format in response to the TIME_STYLE
+# variable. Since we cannot assume `unset' works, revert this
+# variable to its documented default.
+if test "${TIME_STYLE+set}" = set; then
+ TIME_STYLE=posix-long-iso
+ export TIME_STYLE
+fi
+
+save_arg1=$1
# Find out how to get the extended ls output of a file or directory.
if ls -L /dev/null 1>/dev/null 2>&1; then
@@ -66,6 +74,10 @@ if ls -L /dev/null 1>/dev/null 2>&1; then
else
ls_command='ls -l -d'
fi
+# Avoid user/group names that might have spaces, when possible.
+if ls -n /dev/null 1>/dev/null 2>&1; then
+ ls_command="$ls_command -n"
+fi
# A `ls -l' line looks as follows on OS/2.
# drwxrwx--- 0 Aug 11 2001 foo
@@ -80,7 +92,7 @@ fi
# words should be skipped to get the date.
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
-set - x`$ls_command /`
+set x`$ls_command /`
# Find which argument is the month.
month=
@@ -107,13 +119,32 @@ do
done
# Get the extended ls output of the file or directory.
-set - x`eval "$ls_command \"\$save_arg1\""`
+set dummy x`eval "$ls_command \"\$save_arg1\""`
# Remove all preceding arguments
eval $command
-# Get the month. Next argument is day, followed by the year or time.
-case $1 in
+# Because of the dummy argument above, month is in $2.
+#
+# On a POSIX system, we should have
+#
+# $# = 5
+# $1 = file size
+# $2 = month
+# $3 = day
+# $4 = year or time
+# $5 = filename
+#
+# On Darwin 7.7.0 and 7.6.0, we have
+#
+# $# = 4
+# $1 = day
+# $2 = month
+# $3 = year or time
+# $4 = filename
+
+# Get the month.
+case $2 in
Jan) month=January; nummonth=1;;
Feb) month=February; nummonth=2;;
Mar) month=March; nummonth=3;;
@@ -128,7 +159,10 @@ case $1 in
Dec) month=December; nummonth=12;;
esac
-day=$2
+case $3 in
+ ???*) day=$1;;
+ *) day=$3; shift;;
+esac
# Here we have to deal with the problem that the ls output gives either
# the time of day or the year.
diff --git a/config/missing b/build-aux/missing
index 4c6e3b3..f359dae 100755
--- a/config/missing
+++ b/build-aux/missing
@@ -1,15 +1,15 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2003-09-02.23
+scriptversion=2008-12-21.33
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
+# 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,
@@ -18,9 +18,7 @@ scriptversion=2003-09-02.23
# GNU 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 <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -33,6 +31,8 @@ if test $# -eq 0; then
fi
run=:
+sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
+sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
# In the cases where this matters, `missing' is being run in the
# srcdir already.
@@ -44,7 +44,7 @@ fi
msg="missing on your system"
-case "$1" in
+case $1 in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
@@ -60,11 +60,6 @@ case "$1" in
msg="probably too old"
fi
;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case "$1" in
-h|--h|--he|--hel|--help)
echo "\
@@ -82,6 +77,7 @@ Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
+ autom4te touch the output file, or create a stub one
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
@@ -91,11 +87,16 @@ Supported PROGRAM values:
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
Send bug reports to <bug-automake@gnu.org>."
+ exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
+ exit $?
;;
-*)
@@ -104,12 +105,49 @@ Send bug reports to <bug-automake@gnu.org>."
exit 1
;;
- aclocal*)
+esac
+
+# normalize program name to check for.
+program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+# Now exit if we have it, but it failed. Also exit now if we
+# don't have it and --version was passed (most likely to detect
+# the program). This is about non-GNU programs, so use $1 not
+# $program.
+case $1 in
+ lex*|yacc*)
+ # Not GNU programs, they don't have --version.
+ ;;
+
+ tar*)
+ if test -n "$run"; then
+ echo 1>&2 "ERROR: \`tar' requires --run"
+ exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ exit 1
+ fi
+ ;;
+
+ *)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
+ elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
+ # Could not run --version or --help. This is probably someone
+ # running `$TOOL --version' or `$TOOL --help' to check whether
+ # $TOOL exists and not knowing $TOOL uses missing.
+ exit 1
fi
+ ;;
+esac
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case $program in
+ aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
@@ -118,12 +156,7 @@ WARNING: \`$1' is $msg. You should only need it if
touch aclocal.m4
;;
- autoconf)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ autoconf*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
@@ -132,12 +165,7 @@ WARNING: \`$1' is $msg. You should only need it if
touch configure
;;
- autoheader)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ autoheader*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
@@ -147,7 +175,7 @@ WARNING: \`$1' is $msg. You should only need it if
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
- case "$f" in
+ case $f in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
@@ -157,11 +185,6 @@ WARNING: \`$1' is $msg. You should only need it if
;;
automake*)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
@@ -172,12 +195,7 @@ WARNING: \`$1' is $msg. You should only need it if
while read f; do touch "$f"; done
;;
- autom4te)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ autom4te*)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
@@ -185,8 +203,8 @@ WARNING: \`$1' is needed, but is $msg.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
- file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
- test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -f "$file"; then
touch $file
else
@@ -200,90 +218,78 @@ WARNING: \`$1' is needed, but is $msg.
fi
;;
- bison|yacc)
+ bison*|yacc*)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
- if [ ! -f y.tab.h ]; then
+ if test ! -f y.tab.h; then
echo >y.tab.h
fi
- if [ ! -f y.tab.c ]; then
+ if test ! -f y.tab.c; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
- lex|flex)
+ lex*|flex*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
- if [ $# -ne 1 ]; then
+ if test $# -ne 1; then
eval LASTARG="\${$#}"
- case "$LASTARG" in
+ case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if [ -f "$SRCFILE" ]; then
+ if test -f "$SRCFILE"; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
- if [ ! -f lex.yy.c ]; then
+ if test ! -f lex.yy.c; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
- help2man)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- fi
-
+ help2man*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
- if test -z "$file"; then
- file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
- fi
- if [ -f "$file" ]; then
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
+ if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
- exit 1
+ exit $?
fi
;;
- makeinfo)
- if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
- # We have makeinfo, but it failed.
- exit 1
- fi
-
+ makeinfo*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -291,20 +297,29 @@ WARNING: \`$1' is $msg. You should only need it if
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
- file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ # The file to touch is that specified with -o ...
+ file=`echo "$*" | sed -n "$sed_output"`
+ test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
if test -z "$file"; then
- file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ # ... or it is the one specified with @setfilename ...
+ infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '
+ /^@setfilename/{
+ s/.* \([^ ]*\) *$/\1/
+ p
+ q
+ }' $infile`
+ # ... or it is derived from the source name (dir/f.texi becomes f.info)
+ test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
+ # If the file does not exist, the user really needs makeinfo;
+ # let's fail without touching anything.
+ test -f $file || exit 1
touch $file
;;
- tar)
+ tar*)
shift
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
@@ -317,13 +332,13 @@ WARNING: \`$1' is $msg. You should only need it if
fi
firstarg="$1"
if shift; then
- case "$firstarg" in
+ case $firstarg in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
- case "$firstarg" in
+ case $firstarg in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
diff --git a/config/texi2dvi b/build-aux/texi2dvi
index 0286bd7..0286bd7 100755
--- a/config/texi2dvi
+++ b/build-aux/texi2dvi
diff --git a/config/texinfo.tex b/build-aux/texinfo.tex
index e5bdedc..23a30bc 100644
--- a/config/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,16 +3,16 @@
% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2004-07-31.11}
+\def\texinfoversion{2009-03-28.05}
%
-% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
-% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software
-% Foundation, Inc.
+% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+% 2007, 2008, 2009 Free Software Foundation, Inc.
%
-% This texinfo.tex file is free software; you can redistribute it and/or
+% This texinfo.tex file is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
-% published by the Free Software Foundation; either version 2, or (at
-% your option) any later version.
+% published by the Free Software Foundation, either version 3 of the
+% License, or (at your option) any later version.
%
% This texinfo.tex file is distributed in the hope that it will be
% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
@@ -20,9 +20,7 @@
% General Public License for more details.
%
% You should have received a copy of the GNU General Public License
-% along with this texinfo.tex file; see the file COPYING. 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 <http://www.gnu.org/licenses/>.
%
% As a special exception, when this file is read by TeX when processing
% a Texinfo source document, you may use the result without
@@ -67,7 +65,7 @@
\everyjob{\message{[Texinfo version \texinfoversion]}%
\catcode`+=\active \catcode`\_=\active}
-\message{Basics,}
+
\chardef\other=12
% We never want plain's \outer definition of \+ in Texinfo.
@@ -89,15 +87,20 @@
\let\ptexhat=^
\let\ptexi=\i
\let\ptexindent=\indent
-\let\ptexnoindent=\noindent
\let\ptexinsert=\insert
\let\ptexlbrace=\{
\let\ptexless=<
+\let\ptexnewwrite\newwrite
+\let\ptexnoindent=\noindent
\let\ptexplus=+
\let\ptexrbrace=\}
\let\ptexslash=\/
\let\ptexstar=\*
\let\ptext=\t
+\let\ptextop=\top
+{\catcode`\'=\active
+\global\let\ptexquoteright'}% Math-mode def from plain.tex.
+\let\ptexraggedright=\raggedright
% If this character appears in an error message or help string, it
% starts a new line in the output.
@@ -152,20 +155,22 @@
\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
-% In some macros, we cannot use the `\? notation---the left quote is
-% in some cases the escape char.
+% Since the category of space is not known, we have to be careful.
+\chardef\spacecat = 10
+\def\spaceisspace{\catcode`\ =\spacecat}
+
+% sometimes characters are active, so we need control sequences.
\chardef\colonChar = `\:
\chardef\commaChar = `\,
+\chardef\dashChar = `\-
\chardef\dotChar = `\.
\chardef\exclamChar= `\!
+\chardef\lquoteChar= `\`
\chardef\questChar = `\?
+\chardef\rquoteChar= `\'
\chardef\semiChar = `\;
\chardef\underChar = `\_
-\chardef\spaceChar = `\ %
-\chardef\spacecat = 10
-\def\spaceisspace{\catcode\spaceChar=\spacecat}
-
% Ignore a token.
%
\def\gobble#1{}
@@ -276,6 +281,50 @@
\newdimen\cornerthick \cornerthick=.3pt
\newdimen\topandbottommargin \topandbottommargin=.75in
+% Output a mark which sets \thischapter, \thissection and \thiscolor.
+% We dump everything together because we only have one kind of mark.
+% This works because we only use \botmark / \topmark, not \firstmark.
+%
+% A mark contains a subexpression of the \ifcase ... \fi construct.
+% \get*marks macros below extract the needed part using \ifcase.
+%
+% Another complication is to let the user choose whether \thischapter
+% (\thissection) refers to the chapter (section) in effect at the top
+% of a page, or that at the bottom of a page. The solution is
+% described on page 260 of The TeXbook. It involves outputting two
+% marks for the sectioning macros, one before the section break, and
+% one after. I won't pretend I can describe this better than DEK...
+\def\domark{%
+ \toks0=\expandafter{\lastchapterdefs}%
+ \toks2=\expandafter{\lastsectiondefs}%
+ \toks4=\expandafter{\prevchapterdefs}%
+ \toks6=\expandafter{\prevsectiondefs}%
+ \toks8=\expandafter{\lastcolordefs}%
+ \mark{%
+ \the\toks0 \the\toks2
+ \noexpand\or \the\toks4 \the\toks6
+ \noexpand\else \the\toks8
+ }%
+}
+% \topmark doesn't work for the very first chapter (after the title
+% page or the contents), so we use \firstmark there -- this gets us
+% the mark with the chapter defs, unless the user sneaks in, e.g.,
+% @setcolor (or @url, or @link, etc.) between @contents and the very
+% first @chapter.
+\def\gettopheadingmarks{%
+ \ifcase0\topmark\fi
+ \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
+}
+\def\getbottomheadingmarks{\ifcase1\botmark\fi}
+\def\getcolormarks{\ifcase2\topmark\fi}
+
+% Avoid "undefined control sequence" errors.
+\def\lastchapterdefs{}
+\def\lastsectiondefs{}
+\def\prevchapterdefs{}
+\def\prevsectiondefs{}
+\def\lastcolordefs{}
+
% Main output routine.
\chardef\PAGE = 255
\output = {\onepageout{\pagecontents\PAGE}}
@@ -293,7 +342,9 @@
%
% Do this outside of the \shipout so @code etc. will be expanded in
% the headline as they should be, not taken literally (outputting ''code).
+ \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
\setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
+ \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
\setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
%
{%
@@ -301,10 +352,14 @@
% take effect in \write's, yet the group defined by the \vbox ends
% before the \shipout runs.
%
- \escapechar = `\\ % use backslash in output files.
\indexdummies % don't expand commands in the output.
\normalturnoffactive % \ in index entries must not stay \, e.g., if
- % the page break happens to be in the middle of an example.
+ % the page break happens to be in the middle of an example.
+ % We don't want .vr (or whatever) entries like this:
+ % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
+ % "\acronym" won't work when it's read back in;
+ % it needs to be
+ % {\code {{\tt \backslashcurfont }acronym}
\shipout\vbox{%
% Do this early so pdf references go to the beginning of the page.
\ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
@@ -332,9 +387,9 @@
\pagebody{#1}%
\ifdim\ht\footlinebox > 0pt
% Only leave this space if the footline is nonempty.
- % (We lessened \vsize for it in \oddfootingxxx.)
+ % (We lessened \vsize for it in \oddfootingyyy.)
% The \baselineskip=24pt in plain's \makefootline has no effect.
- \vskip 2\baselineskip
+ \vskip 24pt
\unvbox\footlinebox
\fi
%
@@ -355,7 +410,7 @@
\egroup % \vbox from first cropmarks clause
\fi
}% end of \shipout\vbox
- }% end of group with \normalturnoffactive
+ }% end of group with \indexdummies
\advancepageno
\ifnum\outputpenalty>-20000 \else\dosupereject\fi
}
@@ -368,7 +423,7 @@
% marginal hacks, juha@viisa.uucp (Juha Takala)
\ifvoid\margin\else % marginal info is present
\rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
-\dimen@=\dp#1 \unvbox#1
+\dimen@=\dp#1\relax \unvbox#1\relax
\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
}
@@ -390,7 +445,7 @@
%
\def\parsearg{\parseargusing{}}
\def\parseargusing#1#2{%
- \def\next{#2}%
+ \def\argtorun{#2}%
\begingroup
\obeylines
\spaceisspace
@@ -409,7 +464,7 @@
\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
-% Each occurence of `\^^M' or `<space>\^^M' is replaced by a single space.
+% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
%
% \argremovec might leave us with trailing space, e.g.,
% @end itemize @c foo
@@ -421,8 +476,7 @@
\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
\def\temp{#3}%
\ifx\temp\empty
- % We cannot use \next here, as it holds the macro to run;
- % thus we reuse \temp.
+ % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
\let\temp\finishparsearg
\else
\let\temp\argcheckspaces
@@ -434,14 +488,14 @@
% If a _delimited_ argument is enclosed in braces, they get stripped; so
% to get _exactly_ the rest of the line, we had to prevent such situation.
% We prepended an \empty token at the very beginning and we expand it now,
-% just before passing the control to \next.
-% (Similarily, we have to think about #3 of \argcheckspacesY above: it is
+% just before passing the control to \argtorun.
+% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
% either the null string, or it ends with \^^M---thus there is no danger
% that a pair of braces would be stripped.
%
% But first, we have to remove the trailing space token.
%
-\def\finishparsearg#1 \ArgTerm{\expandafter\next\expandafter{#1}}
+\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
% \parseargdef\foo{...}
% is roughly equivalent to
@@ -492,12 +546,12 @@
% used to check whether the current environment is the one expected.
%
% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
-% are not treated as enviroments; they don't open a group. (The
+% are not treated as environments; they don't open a group. (The
% implementation of @end takes care not to call \endgroup in this
% special case.)
-% At runtime, environments start with this:
+% At run-time, environments start with this:
\def\startenvironment#1{\begingroup\def\thisenv{#1}}
% initialize
\let\thisenv\empty
@@ -515,7 +569,7 @@
\fi
}
-% Evironment mismatch, #1 expected:
+% Environment mismatch, #1 expected:
\def\badenverr{%
\errhelp = \EMsimple
\errmessage{This command can appear only \inenvironment\temp,
@@ -565,7 +619,7 @@
\let\}=\myrbrace
\begingroup
% Definitions to produce \{ and \} commands for indices,
- % and @{ and @} for the aux file.
+ % and @{ and @} for the aux/toc files.
\catcode`\{ = \other \catcode`\} = \other
\catcode`\[ = 1 \catcode`\] = 2
\catcode`\! = 0 \catcode`\\ = \other
@@ -599,8 +653,8 @@
\def\jmacro{j}
\def\dotless#1{%
\def\temp{#1}%
- \ifx\temp\imacro \ptexi
- \else\ifx\temp\jmacro \j
+ \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
+ \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
\else \errmessage{@dotless can be used only with i or j}%
\fi\fi
}
@@ -646,13 +700,28 @@
\let\/=\allowbreak
% @. is an end-of-sentence period.
-\def\.{.\spacefactor=3000 }
+\def\.{.\spacefactor=\endofsentencespacefactor\space}
% @! is an end-of-sentence bang.
-\def\!{!\spacefactor=3000 }
+\def\!{!\spacefactor=\endofsentencespacefactor\space}
% @? is an end-of-sentence query.
-\def\?{?\spacefactor=3000 }
+\def\?{?\spacefactor=\endofsentencespacefactor\space}
+
+% @frenchspacing on|off says whether to put extra space after punctuation.
+%
+\def\onword{on}
+\def\offword{off}
+%
+\parseargdef\frenchspacing{%
+ \def\temp{#1}%
+ \ifx\temp\onword \plainfrenchspacing
+ \else\ifx\temp\offword \plainnonfrenchspacing
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
+ \fi\fi
+}
% @w prevents a word break. Without the \leavevmode, @w at the
% beginning of a paragraph, when TeX is still in vertical mode, would
@@ -851,15 +920,20 @@ where each line of input produces a line of output.}
\temp
}
-% @include file insert text of that file as input.
+% @include FILE -- \input text of FILE.
%
\def\include{\parseargusing\filenamecatcodes\includezzz}
\def\includezzz#1{%
\pushthisfilestack
\def\thisfile{#1}%
{%
- \makevalueexpandable
- \def\temp{\input #1 }%
+ \makevalueexpandable % we want to expand any @value in FILE.
+ \turnoffactive % and allow special characters in the expansion
+ \indexnofonts % Allow `@@' and other weird things in file names.
+ \edef\temp{\noexpand\input #1 }%
+ %
+ % This trickery is to read FILE outside of a group, in case it makes
+ % definitions, etc.
\expandafter
}\temp
\popthisfilestack
@@ -874,6 +948,8 @@ where each line of input produces a line of output.}
\catcode`>=\other
\catcode`+=\other
\catcode`-=\other
+ \catcode`\`=\other
+ \catcode`\'=\other
}
\def\pushthisfilestack{%
@@ -1030,9 +1106,9 @@ where each line of input produces a line of output.}
% _ active, and distinguish by seeing if the current family is \slfam,
% which is what @var uses.
{
- \catcode\underChar = \active
+ \catcode`\_ = \active
\gdef\mathunderscore{%
- \catcode\underChar=\active
+ \catcode`\_=\active
\def_{\ifnum\fam=\slfam \_\else\sb\fi}%
}
}
@@ -1049,6 +1125,16 @@ where each line of input produces a line of output.}
\mathunderscore
\let\\ = \mathbackslash
\mathactive
+ % make the texinfo accent commands work in math mode
+ \let\"=\ddot
+ \let\'=\acute
+ \let\==\bar
+ \let\^=\hat
+ \let\`=\grave
+ \let\u=\breve
+ \let\v=\check
+ \let\~=\tilde
+ \let\dotaccent=\dot
$\finishmath
}
\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
@@ -1062,28 +1148,41 @@ where each line of input produces a line of output.}
\catcode`< = \active
\catcode`> = \active
\catcode`+ = \active
+ \catcode`' = \active
\gdef\mathactive{%
\let^ = \ptexhat
\let< = \ptexless
\let> = \ptexgtr
\let+ = \ptexplus
+ \let' = \ptexquoteright
}
}
-% @bullet and @minus need the same treatment as @math, just above.
+% Some math mode symbols.
\def\bullet{$\ptexbullet$}
-\def\minus{$-$}
+\def\geq{\ifmmode \ge\else $\ge$\fi}
+\def\leq{\ifmmode \le\else $\le$\fi}
+\def\minus{\ifmmode -\else $-$\fi}
% @dots{} outputs an ellipsis using the current font.
-% We do .5em per period so that it has the same spacing in a typewriter
-% font as three actual period characters.
+% We do .5em per period so that it has the same spacing in the cm
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em. So do
+% whichever is larger.
%
\def\dots{%
\leavevmode
- \hbox to 1.5em{%
- \hskip 0pt plus 0.25fil
- .\hfil.\hfil.%
- \hskip 0pt plus 0.5fil
+ \setbox0=\hbox{...}% get width of three periods
+ \ifdim\wd0 > 1.5em
+ \dimen0 = \wd0
+ \else
+ \dimen0 = 1.5em
+ \fi
+ \hbox to \dimen0{%
+ \hskip 0pt plus.25fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus.5fil
}%
}
@@ -1091,7 +1190,7 @@ where each line of input produces a line of output.}
%
\def\enddots{%
\dots
- \spacefactor=3000
+ \spacefactor=\endofsentencespacefactor
}
% @comma{} is so commas can be inserted into text without messing up
@@ -1175,40 +1274,179 @@ where each line of input produces a line of output.}
\fi
\fi
\fi
-%
+
+% PDF uses PostScript string constants for the names of xref targets,
+% for display in the outlines, and in other places. Thus, we have to
+% double any backslashes. Otherwise, a name like "\node" will be
+% interpreted as a newline (\n), followed by o, d, e. Not good.
+% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
+% (and related messages, the final outcome is that it is up to the TeX
+% user to double the backslashes and otherwise make the string valid, so
+% that's what we do).
+
+% double active backslashes.
+%
+{\catcode`\@=0 \catcode`\\=\active
+ @gdef@activebackslashdouble{%
+ @catcode`@\=@active
+ @let\=@doublebackslash}
+}
+
+% To handle parens, we must adopt a different approach, since parens are
+% not active characters. hyperref.dtx (which has the same problem as
+% us) handles it with this amazing macro to replace tokens, with minor
+% changes for Texinfo. It is included here under the GPL by permission
+% from the author, Heiko Oberdiek.
+%
+% #1 is the tokens to replace.
+% #2 is the replacement.
+% #3 is the control sequence with the string.
+%
+\def\HyPsdSubst#1#2#3{%
+ \def\HyPsdReplace##1#1##2\END{%
+ ##1%
+ \ifx\\##2\\%
+ \else
+ #2%
+ \HyReturnAfterFi{%
+ \HyPsdReplace##2\END
+ }%
+ \fi
+ }%
+ \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
+}
+\long\def\HyReturnAfterFi#1\fi{\fi#1}
+
+% #1 is a control sequence in which to do the replacements.
+\def\backslashparens#1{%
+ \xdef#1{#1}% redefine it as its expansion; the definition is simply
+ % \lastnode when called from \setref -> \pdfmkdest.
+ \HyPsdSubst{(}{\realbackslash(}{#1}%
+ \HyPsdSubst{)}{\realbackslash)}{#1}%
+}
+
+\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
+with PDF output, and none of those formats could be found. (.eps cannot
+be supported due to the design of the PDF format; use regular TeX (DVI
+output) for that.)}
+
\ifpdf
- \input pdfcolor
- \pdfcatalog{/PageMode /UseOutlines}%
+ %
+ % Color manipulation macros based on pdfcolor.tex.
+ \def\cmykDarkRed{0.28 1 1 0.35}
+ \def\cmykBlack{0 0 0 1}
+ %
+ % k sets the color for filling (usual text, etc.);
+ % K sets the color for stroking (thin rules, e.g., normal _'s).
+ \def\pdfsetcolor#1{\pdfliteral{#1 k #1 K}}
+ %
+ % Set color, and create a mark which defines \thiscolor accordingly,
+ % so that \makeheadline knows which color to restore.
+ \def\setcolor#1{%
+ \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
+ \domark
+ \pdfsetcolor{#1}%
+ }
+ %
+ \def\maincolor{\cmykBlack}
+ \pdfsetcolor{\maincolor}
+ \edef\thiscolor{\maincolor}
+ \def\lastcolordefs{}
+ %
+ \def\makefootline{%
+ \baselineskip24pt
+ \line{\pdfsetcolor{\maincolor}\the\footline}%
+ }
+ %
+ \def\makeheadline{%
+ \vbox to 0pt{%
+ \vskip-22.5pt
+ \line{%
+ \vbox to8.5pt{}%
+ % Extract \thiscolor definition from the marks.
+ \getcolormarks
+ % Typeset the headline with \maincolor, then restore the color.
+ \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
+ }%
+ \vss
+ }%
+ \nointerlineskip
+ }
+ %
+ %
+ \pdfcatalog{/PageMode /UseOutlines}
+ %
+ % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
\def\dopdfimage#1#2#3{%
- \def\imagewidth{#2}%
- \def\imageheight{#3}%
- % without \immediate, pdftex seg faults when the same image is
+ \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+ \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+ %
+ % pdftex (and the PDF format) support .png, .jpg, .pdf (among
+ % others). Let's try in that order.
+ \let\pdfimgext=\empty
+ \begingroup
+ \openin 1 #1.png \ifeof 1
+ \openin 1 #1.jpg \ifeof 1
+ \openin 1 #1.jpeg \ifeof 1
+ \openin 1 #1.JPG \ifeof 1
+ \openin 1 #1.pdf \ifeof 1
+ \openin 1 #1.PDF \ifeof 1
+ \errhelp = \nopdfimagehelp
+ \errmessage{Could not find image file #1 for pdf}%
+ \else \gdef\pdfimgext{PDF}%
+ \fi
+ \else \gdef\pdfimgext{pdf}%
+ \fi
+ \else \gdef\pdfimgext{JPG}%
+ \fi
+ \else \gdef\pdfimgext{jpeg}%
+ \fi
+ \else \gdef\pdfimgext{jpg}%
+ \fi
+ \else \gdef\pdfimgext{png}%
+ \fi
+ \closein 1
+ \endgroup
+ %
+ % without \immediate, ancient pdftex seg faults when the same image is
% included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
\ifnum\pdftexversion < 14
\immediate\pdfimage
\else
\immediate\pdfximage
\fi
- \ifx\empty\imagewidth\else width \imagewidth \fi
- \ifx\empty\imageheight\else height \imageheight \fi
+ \ifdim \wd0 >0pt width \imagewidth \fi
+ \ifdim \wd2 >0pt height \imageheight \fi
\ifnum\pdftexversion<13
- #1.pdf%
+ #1.\pdfimgext
\else
- {#1.pdf}%
+ {#1.\pdfimgext}%
\fi
\ifnum\pdftexversion < 14 \else
\pdfrefximage \pdflastximage
\fi}
+ %
\def\pdfmkdest#1{{%
- % We have to set dummies so commands such as @code in a section title
- % aren't expanded.
- \atdummies
- \normalturnoffactive
- \pdfdest name{#1} xyz%
+ % We have to set dummies so commands such as @code, and characters
+ % such as \, aren't expanded when present in a section title.
+ \indexnofonts
+ \turnoffactive
+ \activebackslashdouble
+ \makevalueexpandable
+ \def\pdfdestname{#1}%
+ \backslashparens\pdfdestname
+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
}}
+ %
+ % used to mark target names; must be expandable.
\def\pdfmkpgn#1{#1}
- \let\linkcolor = \Blue % was Cyan, but that seems light?
- \def\endlink{\Black\pdfendlink}
+ %
+ % by default, use a color that is dark enough to print on paper as
+ % nearly black, but still distinguishable for online viewing.
+ \def\urlcolor{\cmykDarkRed}
+ \def\linkcolor{\cmykDarkRed}
+ \def\endlink{\setcolor{\maincolor}\pdfendlink}
+ %
% Adding outlines to PDF; macros for calculating structure of outlines
% come from Petr Olsak
\def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
@@ -1217,20 +1455,31 @@ where each line of input produces a line of output.}
\advance\tempnum by 1
\expandafter\xdef\csname#1\endcsname{\the\tempnum}}
%
- % #1 is the section text. #2 is the pdf expression for the number
- % of subentries (or empty, for subsubsections). #3 is the node
- % text, which might be empty if this toc entry had no
- % corresponding node. #4 is the page number.
+ % #1 is the section text, which is what will be displayed in the
+ % outline by the pdf viewer. #2 is the pdf expression for the number
+ % of subentries (or empty, for subsubsections). #3 is the node text,
+ % which might be empty if this toc entry had no corresponding node.
+ % #4 is the page number
%
\def\dopdfoutline#1#2#3#4{%
% Generate a link to the node text if that exists; else, use the
% page number. We could generate a destination for the section
% text in the case where a section has no node, but it doesn't
- % seem worthwhile, since most documents are normally structured.
+ % seem worth the trouble, since most documents are normally structured.
\def\pdfoutlinedest{#3}%
- \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}\fi
+ \ifx\pdfoutlinedest\empty
+ \def\pdfoutlinedest{#4}%
+ \else
+ % Doubled backslashes in the name.
+ {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
+ \backslashparens\pdfoutlinedest}%
+ \fi
%
- \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{#1}%
+ % Also double the backslashes in the display string.
+ {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
+ \backslashparens\pdfoutlinetext}%
+ %
+ \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
}
%
\def\pdfmakeoutlines{%
@@ -1242,13 +1491,13 @@ where each line of input produces a line of output.}
% Read toc silently, to get counts of subentries for \pdfoutline.
\def\numchapentry##1##2##3##4{%
\def\thischapnum{##2}%
- \let\thissecnum\empty
- \let\thissubsecnum\empty
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
}%
\def\numsecentry##1##2##3##4{%
\advancenumber{chap\thischapnum}%
\def\thissecnum{##2}%
- \let\thissubsecnum\empty
+ \def\thissubsecnum{0}%
}%
\def\numsubsecentry##1##2##3##4{%
\advancenumber{sec\thissecnum}%
@@ -1257,9 +1506,9 @@ where each line of input produces a line of output.}
\def\numsubsubsecentry##1##2##3##4{%
\advancenumber{subsec\thissubsecnum}%
}%
- \let\thischapnum\empty
- \let\thissecnum\empty
- \let\thissubsecnum\empty
+ \def\thischapnum{0}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
%
% use \def rather than \let here because we redefine \chapentry et
% al. a second time, below.
@@ -1271,7 +1520,7 @@ where each line of input produces a line of output.}
\def\unnsecentry{\numsecentry}%
\def\unnsubsecentry{\numsubsecentry}%
\def\unnsubsubsecentry{\numsubsubsecentry}%
- \input \jobname.toc
+ \readdatafile{toc}%
%
% Read toc second time, this time actually producing the outlines.
% The `-' means take the \expnumber as the absolute number of
@@ -1297,41 +1546,12 @@ where each line of input produces a line of output.}
% their "best" equivalent, based on the @documentencoding. Right
% now, I guess we'll just let the pdf reader have its way.
\indexnofonts
- \turnoffactive
- \input \jobname.toc
+ \setupdatafile
+ \catcode`\\=\active \otherbackslash
+ \input \tocreadfilename
\endgroup
}
%
- \def\makelinks #1,{%
- \def\params{#1}\def\E{END}%
- \ifx\params\E
- \let\nextmakelinks=\relax
- \else
- \let\nextmakelinks=\makelinks
- \ifnum\lnkcount>0,\fi
- \picknum{#1}%
- \startlink attr{/Border [0 0 0]}
- goto name{\pdfmkpgn{\the\pgn}}%
- \linkcolor #1%
- \advance\lnkcount by 1%
- \endlink
- \fi
- \nextmakelinks
- }
- \def\picknum#1{\expandafter\pn#1}
- \def\pn#1{%
- \def\p{#1}%
- \ifx\p\lbrace
- \let\nextpn=\ppn
- \else
- \let\nextpn=\ppnn
- \def\first{#1}
- \fi
- \nextpn
- }
- \def\ppn#1{\pgn=#1\gobble}
- \def\ppnn{\pgn=\first}
- \def\pdfmklnk#1{\lnkcount=0\makelinks #1,END,}
\def\skipspaces#1{\def\PP{#1}\def\D{|}%
\ifx\PP\D\let\nextsp\relax
\else\let\nextsp\skipspaces
@@ -1346,11 +1566,23 @@ where each line of input produces a line of output.}
\else
\let \startlink \pdfstartlink
\fi
+ % make a live url in pdf output.
\def\pdfurl#1{%
\begingroup
- \normalturnoffactive\def\@{@}%
+ % it seems we really need yet another set of dummies; have not
+ % tried to figure out what each command should do in the context
+ % of @url. for now, just make @/ a no-op, that's the only one
+ % people have actually reported a problem with.
+ %
+ \normalturnoffactive
+ \def\@{@}%
+ \let\/=\empty
\makevalueexpandable
- \leavevmode\Red
+ % do we want to go so far as to use \indexnofonts instead of just
+ % special-casing \var here?
+ \def\var##1{##1}%
+ %
+ \leavevmode\setcolor{\urlcolor}%
\startlink attr{/Border [0 0 0]}%
user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
\endgroup}
@@ -1377,13 +1609,15 @@ where each line of input produces a line of output.}
{\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
\def\pdflink#1{%
\startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
- \linkcolor #1\endlink}
+ \setcolor{\linkcolor}#1\endlink}
\def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
\else
+ % non-pdf mode
\let\pdfmkdest = \gobble
\let\pdfurl = \gobble
\let\endlink = \relax
- \let\linkcolor = \relax
+ \let\setcolor = \gobble
+ \let\pdfsetcolor = \gobble
\let\pdfmakeoutlines = \relax
\fi % \ifx\pdfoutput
@@ -1406,9 +1640,13 @@ where each line of input produces a line of output.}
\def\rm{\fam=0 \setfontstyle{rm}}
\def\it{\fam=\itfam \setfontstyle{it}}
\def\sl{\fam=\slfam \setfontstyle{sl}}
-\def\bf{\fam=\bffam \setfontstyle{bf}}
+\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
\def\tt{\fam=\ttfam \setfontstyle{tt}}
+% Unfortunately, we have to override this for titles and the like, since
+% in those cases "rm" is bold. Sigh.
+\def\rmisbold{\rm\def\curfontstyle{bf}}
+
% Texinfo sort of supports the sans serif font style, which plain TeX does not.
% So we set up a \sf.
\newfam\sffam
@@ -1418,6 +1656,7 @@ where each line of input produces a line of output.}
% We don't need math for this font style.
\def\ttsl{\setfontstyle{ttsl}}
+
% Default leading.
\newdimen\textleading \textleading = 13.2pt
@@ -1429,8 +1668,12 @@ where each line of input produces a line of output.}
\def\strutheightpercent{.70833}
\def\strutdepthpercent {.29167}
%
+% can get a sort of poor man's double spacing by redefining this.
+\def\baselinefactor{1}
+%
\def\setleading#1{%
- \normalbaselineskip = #1\relax
+ \dimen0 = #1\relax
+ \normalbaselineskip = \baselinefactor\dimen0
\normallineskip = \lineskipfactor\normalbaselineskip
\normalbaselines
\setbox\strutbox =\hbox{%
@@ -1439,10 +1682,279 @@ where each line of input produces a line of output.}
}%
}
+% PDF CMaps. See also LaTeX's t1.cmap.
+%
+% do nothing with this by default.
+\expandafter\let\csname cmapOT1\endcsname\gobble
+\expandafter\let\csname cmapOT1IT\endcsname\gobble
+\expandafter\let\csname cmapOT1TT\endcsname\gobble
+
+% if we are producing pdf, and we have \pdffontattr, then define cmaps.
+% (\pdffontattr was introduced many years ago, but people still run
+% older pdftex's; it's easy to conditionalize, so we do.)
+\ifpdf \ifx\pdffontattr\undefined \else
+ \begingroup
+ \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+ \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1-0)
+%%Title: (TeX-OT1-0 TeX OT1 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+8 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<23> <26> <0023>
+<28> <3B> <0028>
+<3F> <5B> <003F>
+<5D> <5E> <005D>
+<61> <7A> <0061>
+<7B> <7C> <2013>
+endbfrange
+40 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <00660066>
+<0C> <00660069>
+<0D> <0066006C>
+<0E> <006600660069>
+<0F> <00660066006C>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<21> <0021>
+<22> <201D>
+<27> <2019>
+<3C> <00A1>
+<3D> <003D>
+<3E> <00BF>
+<5C> <201C>
+<5F> <02D9>
+<60> <2018>
+<7D> <02DD>
+<7E> <007E>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+ }\endgroup
+ \expandafter\edef\csname cmapOT1\endcsname#1{%
+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+ }%
+%
+% \cmapOT1IT
+ \begingroup
+ \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+ \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1IT-0)
+%%Title: (TeX-OT1IT-0 TeX OT1IT 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1IT)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1IT-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+8 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<25> <26> <0025>
+<28> <3B> <0028>
+<3F> <5B> <003F>
+<5D> <5E> <005D>
+<61> <7A> <0061>
+<7B> <7C> <2013>
+endbfrange
+42 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <00660066>
+<0C> <00660069>
+<0D> <0066006C>
+<0E> <006600660069>
+<0F> <00660066006C>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<21> <0021>
+<22> <201D>
+<23> <0023>
+<24> <00A3>
+<27> <2019>
+<3C> <00A1>
+<3D> <003D>
+<3E> <00BF>
+<5C> <201C>
+<5F> <02D9>
+<60> <2018>
+<7D> <02DD>
+<7E> <007E>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+ }\endgroup
+ \expandafter\edef\csname cmapOT1IT\endcsname#1{%
+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+ }%
+%
+% \cmapOT1TT
+ \begingroup
+ \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+ \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1TT-0)
+%%Title: (TeX-OT1TT-0 TeX OT1TT 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1TT)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1TT-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+5 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<21> <26> <0021>
+<28> <5F> <0028>
+<61> <7E> <0061>
+endbfrange
+32 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <2191>
+<0C> <2193>
+<0D> <0027>
+<0E> <00A1>
+<0F> <00BF>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<20> <2423>
+<27> <2019>
+<60> <2018>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+ }\endgroup
+ \expandafter\edef\csname cmapOT1TT\endcsname#1{%
+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+ }%
+\fi\fi
+
+
% Set the font macro #1 to the font named #2, adding on the
% specified font prefix (normally `cm').
-% #3 is the font's design size, #4 is a scale factor
-\def\setfont#1#2#3#4{\font#1=\fontprefix#2#3 scaled #4}
+% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
+% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
+% empty to omit).
+\def\setfont#1#2#3#4#5{%
+ \font#1=\fontprefix#2#3 scaled #4
+ \csname cmap#5\endcsname#1%
+}
+% This is what gets called when #5 of \setfont is empty.
+\let\cmap\gobble
+% emacs-page end of cmaps
% Use cm as the default font prefix.
% To specify the font prefix, you must define \fontprefix
@@ -1467,118 +1979,293 @@ where each line of input produces a line of output.}
\def\scshape{csc}
\def\scbshape{csc}
+% Definitions for a main text size of 11pt. This is the default in
+% Texinfo.
+%
+\def\definetextfontsizexi{%
% Text fonts (11.2pt, magstep1).
-\newcount\mainmagstep
-\ifx\bigger\relax
- % not really supported.
- \mainmagstep=\magstep1
- \setfont\textrm\rmshape{12}{1000}
- \setfont\texttt\ttshape{12}{1000}
-\else
- \mainmagstep=\magstephalf
- \setfont\textrm\rmshape{10}{\mainmagstep}
- \setfont\texttt\ttshape{10}{\mainmagstep}
-\fi
-\setfont\textbf\bfshape{10}{\mainmagstep}
-\setfont\textit\itshape{10}{\mainmagstep}
-\setfont\textsl\slshape{10}{\mainmagstep}
-\setfont\textsf\sfshape{10}{\mainmagstep}
-\setfont\textsc\scshape{10}{\mainmagstep}
-\setfont\textttsl\ttslshape{10}{\mainmagstep}
+\def\textnominalsize{11pt}
+\edef\mainmagstep{\magstephalf}
+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
+\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
+\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
\font\texti=cmmi10 scaled \mainmagstep
\font\textsy=cmsy10 scaled \mainmagstep
+\def\textecsize{1095}
% A few fonts for @defun names and args.
-\setfont\defbf\bfshape{10}{\magstep1}
-\setfont\deftt\ttshape{10}{\magstep1}
-\setfont\defttsl\ttslshape{10}{\magstep1}
+\setfont\defbf\bfshape{10}{\magstep1}{OT1}
+\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
+\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
% Fonts for indices, footnotes, small examples (9pt).
-\setfont\smallrm\rmshape{9}{1000}
-\setfont\smalltt\ttshape{9}{1000}
-\setfont\smallbf\bfshape{10}{900}
-\setfont\smallit\itshape{9}{1000}
-\setfont\smallsl\slshape{9}{1000}
-\setfont\smallsf\sfshape{9}{1000}
-\setfont\smallsc\scshape{10}{900}
-\setfont\smallttsl\ttslshape{10}{900}
+\def\smallnominalsize{9pt}
+\setfont\smallrm\rmshape{9}{1000}{OT1}
+\setfont\smalltt\ttshape{9}{1000}{OT1TT}
+\setfont\smallbf\bfshape{10}{900}{OT1}
+\setfont\smallit\itshape{9}{1000}{OT1IT}
+\setfont\smallsl\slshape{9}{1000}{OT1}
+\setfont\smallsf\sfshape{9}{1000}{OT1}
+\setfont\smallsc\scshape{10}{900}{OT1}
+\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
\font\smalli=cmmi9
\font\smallsy=cmsy9
+\def\smallecsize{0900}
% Fonts for small examples (8pt).
-\setfont\smallerrm\rmshape{8}{1000}
-\setfont\smallertt\ttshape{8}{1000}
-\setfont\smallerbf\bfshape{10}{800}
-\setfont\smallerit\itshape{8}{1000}
-\setfont\smallersl\slshape{8}{1000}
-\setfont\smallersf\sfshape{8}{1000}
-\setfont\smallersc\scshape{10}{800}
-\setfont\smallerttsl\ttslshape{10}{800}
+\def\smallernominalsize{8pt}
+\setfont\smallerrm\rmshape{8}{1000}{OT1}
+\setfont\smallertt\ttshape{8}{1000}{OT1TT}
+\setfont\smallerbf\bfshape{10}{800}{OT1}
+\setfont\smallerit\itshape{8}{1000}{OT1IT}
+\setfont\smallersl\slshape{8}{1000}{OT1}
+\setfont\smallersf\sfshape{8}{1000}{OT1}
+\setfont\smallersc\scshape{10}{800}{OT1}
+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
\font\smalleri=cmmi8
\font\smallersy=cmsy8
+\def\smallerecsize{0800}
% Fonts for title page (20.4pt):
-\setfont\titlerm\rmbshape{12}{\magstep3}
-\setfont\titleit\itbshape{10}{\magstep4}
-\setfont\titlesl\slbshape{10}{\magstep4}
-\setfont\titlett\ttbshape{12}{\magstep3}
-\setfont\titlettsl\ttslshape{10}{\magstep4}
-\setfont\titlesf\sfbshape{17}{\magstep1}
+\def\titlenominalsize{20pt}
+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
+\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
\let\titlebf=\titlerm
-\setfont\titlesc\scbshape{10}{\magstep4}
+\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
\font\titlei=cmmi12 scaled \magstep3
\font\titlesy=cmsy10 scaled \magstep4
-\def\authorrm{\secrm}
-\def\authortt{\sectt}
+\def\titleecsize{2074}
% Chapter (and unnumbered) fonts (17.28pt).
-\setfont\chaprm\rmbshape{12}{\magstep2}
-\setfont\chapit\itbshape{10}{\magstep3}
-\setfont\chapsl\slbshape{10}{\magstep3}
-\setfont\chaptt\ttbshape{12}{\magstep2}
-\setfont\chapttsl\ttslshape{10}{\magstep3}
-\setfont\chapsf\sfbshape{17}{1000}
+\def\chapnominalsize{17pt}
+\setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
+\setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
+\setfont\chapsl\slbshape{10}{\magstep3}{OT1}
+\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
+\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
+\setfont\chapsf\sfbshape{17}{1000}{OT1}
\let\chapbf=\chaprm
-\setfont\chapsc\scbshape{10}{\magstep3}
+\setfont\chapsc\scbshape{10}{\magstep3}{OT1}
\font\chapi=cmmi12 scaled \magstep2
\font\chapsy=cmsy10 scaled \magstep3
+\def\chapecsize{1728}
% Section fonts (14.4pt).
-\setfont\secrm\rmbshape{12}{\magstep1}
-\setfont\secit\itbshape{10}{\magstep2}
-\setfont\secsl\slbshape{10}{\magstep2}
-\setfont\sectt\ttbshape{12}{\magstep1}
-\setfont\secttsl\ttslshape{10}{\magstep2}
-\setfont\secsf\sfbshape{12}{\magstep1}
+\def\secnominalsize{14pt}
+\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
+\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
+\setfont\secsl\slbshape{10}{\magstep2}{OT1}
+\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
+\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
+\setfont\secsf\sfbshape{12}{\magstep1}{OT1}
\let\secbf\secrm
-\setfont\secsc\scbshape{10}{\magstep2}
+\setfont\secsc\scbshape{10}{\magstep2}{OT1}
\font\seci=cmmi12 scaled \magstep1
\font\secsy=cmsy10 scaled \magstep2
+\def\sececsize{1440}
% Subsection fonts (13.15pt).
-\setfont\ssecrm\rmbshape{12}{\magstephalf}
-\setfont\ssecit\itbshape{10}{1315}
-\setfont\ssecsl\slbshape{10}{1315}
-\setfont\ssectt\ttbshape{12}{\magstephalf}
-\setfont\ssecttsl\ttslshape{10}{1315}
-\setfont\ssecsf\sfbshape{12}{\magstephalf}
+\def\ssecnominalsize{13pt}
+\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
+\setfont\ssecit\itbshape{10}{1315}{OT1IT}
+\setfont\ssecsl\slbshape{10}{1315}{OT1}
+\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
+\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
+\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
\let\ssecbf\ssecrm
-\setfont\ssecsc\scbshape{10}{1315}
+\setfont\ssecsc\scbshape{10}{1315}{OT1}
\font\sseci=cmmi12 scaled \magstephalf
\font\ssecsy=cmsy10 scaled 1315
+\def\ssececsize{1200}
% Reduced fonts for @acro in text (10pt).
-\setfont\reducedrm\rmshape{10}{1000}
-\setfont\reducedtt\ttshape{10}{1000}
-\setfont\reducedbf\bfshape{10}{1000}
-\setfont\reducedit\itshape{10}{1000}
-\setfont\reducedsl\slshape{10}{1000}
-\setfont\reducedsf\sfshape{10}{1000}
-\setfont\reducedsc\scshape{10}{1000}
-\setfont\reducedttsl\ttslshape{10}{1000}
+\def\reducednominalsize{10pt}
+\setfont\reducedrm\rmshape{10}{1000}{OT1}
+\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
+\setfont\reducedbf\bfshape{10}{1000}{OT1}
+\setfont\reducedit\itshape{10}{1000}{OT1IT}
+\setfont\reducedsl\slshape{10}{1000}{OT1}
+\setfont\reducedsf\sfshape{10}{1000}{OT1}
+\setfont\reducedsc\scshape{10}{1000}{OT1}
+\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
\font\reducedi=cmmi10
\font\reducedsy=cmsy10
+\def\reducedecsize{1000}
+
+% reset the current fonts
+\textfonts
+\rm
+} % end of 11pt text font size definitions
+
+
+% Definitions to make the main text be 10pt Computer Modern, with
+% section, chapter, etc., sizes following suit. This is for the GNU
+% Press printing of the Emacs 22 manual. Maybe other manuals in the
+% future. Used with @smallbook, which sets the leading to 12pt.
+%
+\def\definetextfontsizex{%
+% Text fonts (10pt).
+\def\textnominalsize{10pt}
+\edef\mainmagstep{1000}
+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
+\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
+\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
+\def\textecsize{1000}
+
+% A few fonts for @defun names and args.
+\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
+\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
+\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+
+% Fonts for indices, footnotes, small examples (9pt).
+\def\smallnominalsize{9pt}
+\setfont\smallrm\rmshape{9}{1000}{OT1}
+\setfont\smalltt\ttshape{9}{1000}{OT1TT}
+\setfont\smallbf\bfshape{10}{900}{OT1}
+\setfont\smallit\itshape{9}{1000}{OT1IT}
+\setfont\smallsl\slshape{9}{1000}{OT1}
+\setfont\smallsf\sfshape{9}{1000}{OT1}
+\setfont\smallsc\scshape{10}{900}{OT1}
+\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
+\font\smalli=cmmi9
+\font\smallsy=cmsy9
+\def\smallecsize{0900}
+
+% Fonts for small examples (8pt).
+\def\smallernominalsize{8pt}
+\setfont\smallerrm\rmshape{8}{1000}{OT1}
+\setfont\smallertt\ttshape{8}{1000}{OT1TT}
+\setfont\smallerbf\bfshape{10}{800}{OT1}
+\setfont\smallerit\itshape{8}{1000}{OT1IT}
+\setfont\smallersl\slshape{8}{1000}{OT1}
+\setfont\smallersf\sfshape{8}{1000}{OT1}
+\setfont\smallersc\scshape{10}{800}{OT1}
+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
+\def\smallerecsize{0800}
+
+% Fonts for title page (20.4pt):
+\def\titlenominalsize{20pt}
+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
+\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
+\let\titlebf=\titlerm
+\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
+\font\titlei=cmmi12 scaled \magstep3
+\font\titlesy=cmsy10 scaled \magstep4
+\def\titleecsize{2074}
+
+% Chapter fonts (14.4pt).
+\def\chapnominalsize{14pt}
+\setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
+\setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
+\setfont\chapsl\slbshape{10}{\magstep2}{OT1}
+\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
+\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
+\setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
+\let\chapbf\chaprm
+\setfont\chapsc\scbshape{10}{\magstep2}{OT1}
+\font\chapi=cmmi12 scaled \magstep1
+\font\chapsy=cmsy10 scaled \magstep2
+\def\chapecsize{1440}
+
+% Section fonts (12pt).
+\def\secnominalsize{12pt}
+\setfont\secrm\rmbshape{12}{1000}{OT1}
+\setfont\secit\itbshape{10}{\magstep1}{OT1IT}
+\setfont\secsl\slbshape{10}{\magstep1}{OT1}
+\setfont\sectt\ttbshape{12}{1000}{OT1TT}
+\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
+\setfont\secsf\sfbshape{12}{1000}{OT1}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep1}{OT1}
+\font\seci=cmmi12
+\font\secsy=cmsy10 scaled \magstep1
+\def\sececsize{1200}
+
+% Subsection fonts (10pt).
+\def\ssecnominalsize{10pt}
+\setfont\ssecrm\rmbshape{10}{1000}{OT1}
+\setfont\ssecit\itbshape{10}{1000}{OT1IT}
+\setfont\ssecsl\slbshape{10}{1000}{OT1}
+\setfont\ssectt\ttbshape{10}{1000}{OT1TT}
+\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
+\setfont\ssecsf\sfbshape{10}{1000}{OT1}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{1000}{OT1}
+\font\sseci=cmmi10
+\font\ssecsy=cmsy10
+\def\ssececsize{1000}
+
+% Reduced fonts for @acro in text (9pt).
+\def\reducednominalsize{9pt}
+\setfont\reducedrm\rmshape{9}{1000}{OT1}
+\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
+\setfont\reducedbf\bfshape{10}{900}{OT1}
+\setfont\reducedit\itshape{9}{1000}{OT1IT}
+\setfont\reducedsl\slshape{9}{1000}{OT1}
+\setfont\reducedsf\sfshape{9}{1000}{OT1}
+\setfont\reducedsc\scshape{10}{900}{OT1}
+\setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
+\font\reducedi=cmmi9
+\font\reducedsy=cmsy9
+\def\reducedecsize{0900}
+
+% reduce space between paragraphs
+\divide\parskip by 2
+
+% reset the current fonts
+\textfonts
+\rm
+} % end of 10pt text font size definitions
+
+
+% We provide the user-level command
+% @fonttextsize 10
+% (or 11) to redefine the text font size. pt is assumed.
+%
+\def\xword{10}
+\def\xiword{11}
+%
+\parseargdef\fonttextsize{%
+ \def\textsizearg{#1}%
+ \wlog{doing @fonttextsize \textsizearg}%
+ %
+ % Set \globaldefs so that documents can use this inside @tex, since
+ % makeinfo 4.8 does not support it, but we need it nonetheless.
+ %
+ \begingroup \globaldefs=1
+ \ifx\textsizearg\xword \definetextfontsizex
+ \else \ifx\textsizearg\xiword \definetextfontsizexi
+ \else
+ \errhelp=\EMsimple
+ \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
+ \fi\fi
+ \endgroup
+}
+
% In order for the font changes to affect most math symbols and letters,
% we have to define the \textfont of the standard families. Since
@@ -1608,6 +2295,7 @@ where each line of input produces a line of output.}
\let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
\let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
\let\tenttsl=\textttsl
+ \def\curfontsize{text}%
\def\lsize{reduced}\def\lllsize{smaller}%
\resetmathfonts \setleading{\textleading}}
\def\titlefonts{%
@@ -1615,13 +2303,16 @@ where each line of input produces a line of output.}
\let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
\let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
\let\tenttsl=\titlettsl
+ \def\curfontsize{title}%
\def\lsize{chap}\def\lllsize{subsec}%
\resetmathfonts \setleading{25pt}}
-\def\titlefont#1{{\titlefonts\rm #1}}
+\def\titlefont#1{{\titlefonts\rmisbold #1}}
\def\chapfonts{%
\let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
\let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
- \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl
+ \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
+ \let\tenttsl=\chapttsl
+ \def\curfontsize{chap}%
\def\lsize{sec}\def\lllsize{text}%
\resetmathfonts \setleading{19pt}}
\def\secfonts{%
@@ -1629,6 +2320,7 @@ where each line of input produces a line of output.}
\let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
\let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
\let\tenttsl=\secttsl
+ \def\curfontsize{sec}%
\def\lsize{subsec}\def\lllsize{reduced}%
\resetmathfonts \setleading{16pt}}
\def\subsecfonts{%
@@ -1636,6 +2328,7 @@ where each line of input produces a line of output.}
\let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
\let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
\let\tenttsl=\ssecttsl
+ \def\curfontsize{ssec}%
\def\lsize{text}\def\lllsize{small}%
\resetmathfonts \setleading{15pt}}
\let\subsubsecfonts = \subsecfonts
@@ -1644,6 +2337,7 @@ where each line of input produces a line of output.}
\let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
\let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
\let\tenttsl=\reducedttsl
+ \def\curfontsize{reduced}%
\def\lsize{small}\def\lllsize{smaller}%
\resetmathfonts \setleading{10.5pt}}
\def\smallfonts{%
@@ -1651,6 +2345,7 @@ where each line of input produces a line of output.}
\let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
\let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
\let\tenttsl=\smallttsl
+ \def\curfontsize{small}%
\def\lsize{smaller}\def\lllsize{smaller}%
\resetmathfonts \setleading{10.5pt}}
\def\smallerfonts{%
@@ -1658,9 +2353,20 @@ where each line of input produces a line of output.}
\let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
\let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
\let\tenttsl=\smallerttsl
+ \def\curfontsize{smaller}%
\def\lsize{smaller}\def\lllsize{smaller}%
\resetmathfonts \setleading{9.5pt}}
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+
+% Define these just so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
% Set the fonts to use with the @small... environments.
\let\smallexamplefonts = \smallfonts
@@ -1674,28 +2380,128 @@ where each line of input produces a line of output.}
%
% By the way, for comparison, here's what fits with @example (10pt):
% 8.5x11=71 smallbook=60 a4=75 a5=58
-%
-% I wish the USA used A4 paper.
% --karl, 24jan03.
-
% Set up the default fonts, so we can use them for creating boxes.
%
-\textfonts \rm
+\definetextfontsizexi
-% Define these so they can be easily changed for other fonts.
-\def\angleleft{$\langle$}
-\def\angleright{$\rangle$}
+
+\message{markup,}
+
+% Check if we are currently using a typewriter font. Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
+% define and register \INITMACRO to be called on markup style changes.
+% \INITMACRO can check \currentmarkupstyle for the innermost
+% style and the set of \ifmarkupSTYLE switches for all styles
+% currently in effect.
+\newif\ifmarkupvar
+\newif\ifmarkupsamp
+\newif\ifmarkupkey
+%\newif\ifmarkupfile % @file == @samp.
+%\newif\ifmarkupoption % @option == @samp.
+\newif\ifmarkupcode
+\newif\ifmarkupkbd
+%\newif\ifmarkupenv % @env == @code.
+%\newif\ifmarkupcommand % @command == @code.
+\newif\ifmarkuptex % @tex (and part of @math, for now).
+\newif\ifmarkupexample
+\newif\ifmarkupverb
+\newif\ifmarkupverbatim
+
+\let\currentmarkupstyle\empty
+
+\def\setupmarkupstyle#1{%
+ \csname markup#1true\endcsname
+ \def\currentmarkupstyle{#1}%
+ \markupstylesetup
+}
+
+\let\markupstylesetup\empty
+
+\def\defmarkupstylesetup#1{%
+ \expandafter\def\expandafter\markupstylesetup
+ \expandafter{\markupstylesetup #1}%
+ \def#1%
+}
+
+% Markup style setup for left and right quotes.
+\defmarkupstylesetup\markupsetuplq{%
+ \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname
+ \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
+}
+
+\defmarkupstylesetup\markupsetuprq{%
+ \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname
+ \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
+}
+
+{
+\catcode`\'=\active
+\catcode`\`=\active
+
+\gdef\markupsetuplqdefault{\let`\lq}
+\gdef\markupsetuprqdefault{\let'\rq}
+
+\gdef\markupsetcodequoteleft{\let`\codequoteleft}
+\gdef\markupsetcodequoteright{\let'\codequoteright}
+
+\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
+}
+
+\let\markupsetuplqcode \markupsetcodequoteleft
+\let\markupsetuprqcode \markupsetcodequoteright
+\let\markupsetuplqexample \markupsetcodequoteleft
+\let\markupsetuprqexample \markupsetcodequoteright
+\let\markupsetuplqverb \markupsetcodequoteleft
+\let\markupsetuprqverb \markupsetcodequoteright
+\let\markupsetuplqverbatim \markupsetcodequoteleft
+\let\markupsetuprqverbatim \markupsetcodequoteright
+
+\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
+\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
+
+% Allow an option to not replace quotes with a regular directed right
+% quote/apostrophe (char 0x27), but instead use the undirected quote
+% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
+% the default, but it works for pasting with more pdf viewers (at least
+% evince), the lilypond developers report. xpdf does work with the
+% regular 0x27.
+%
+\def\codequoteright{%
+ \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
+ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+ '%
+ \else \char'15 \fi
+ \else \char'15 \fi
+}
+%
+% and a similar option for the left quote char vs. a grave accent.
+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
+% the code environments to do likewise.
+%
+\def\codequoteleft{%
+ \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
+ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+ % [Knuth] pp. 380,381,391
+ % \relax disables Spanish ligatures ?` and !` of \tt font.
+ \relax`%
+ \else \char'22 \fi
+ \else \char'22 \fi
+}
+
+% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
+\def\noligaturesquoteleft{\relax\lq}
% Count depth in font-changes, for error checks
\newcount\fontdepth \fontdepth=0
-% Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}
-\setfont\shortcontbf\bfshape{10}{\magstep1} % no cmb12
-\setfont\shortcontsl\slshape{12}{1000}
-\setfont\shortconttt\ttshape{12}{1000}
-
%% Add scribe-like font environments, plus @l for inline lisp (usually sans
%% serif) and @ii for TeX italic
@@ -1710,19 +2516,28 @@ where each line of input produces a line of output.}
% @var is set to this for defun arguments.
\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
-% like \smartslanted except unconditionally use \sl. We never want
+% @cite is like \smartslanted except unconditionally use \sl. We never want
% ttsl for book titles, do we?
\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
\let\i=\smartitalic
\let\slanted=\smartslanted
-\let\var=\smartslanted
+\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
\let\dfn=\smartslanted
\let\emph=\smartitalic
+% Explicit font changes: @r, @sc, undocumented @ii.
+\def\r#1{{\rm #1}} % roman font
+\def\sc#1{{\smallcaps#1}} % smallcaps font
+\def\ii#1{{\it #1}} % italic font
+
+% @b, explicit bold. Also @strong.
\def\b#1{{\bf #1}}
\let\strong=\b
+% @sansserif, explicit sans.
+\def\sansserif#1{{\sf #1}}
+
% We can't just use \exhyphenpenalty, because that only has effect at
% the end of a paragraph. Restore normal hyphenation at the end of the
% group within which \nohyphenation is presumably called.
@@ -1735,27 +2550,48 @@ where each line of input produces a line of output.}
% sometimes \x has an active definition that messes things up.
%
\catcode`@=11
- \def\frenchspacing{%
+ \def\plainfrenchspacing{%
\sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
\sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
+ \def\endofsentencespacefactor{1000}% for @. and friends
+ }
+ \def\plainnonfrenchspacing{%
+ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+ \def\endofsentencespacefactor{3000}% for @. and friends
}
\catcode`@=\other
+\def\endofsentencespacefactor{3000}% default
+% @t, explicit typewriter.
\def\t#1{%
- {\tt \rawbackslash \frenchspacing #1}%
+ {\tt \rawbackslash \plainfrenchspacing #1}%
\null
}
-\def\samp#1{`\tclose{#1}'\null}
-\setfont\keyrm\rmshape{8}{1000}
-\font\keysy=cmsy9
-\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
- \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
- \vbox{\hrule\kern-0.4pt
- \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
- \kern-0.4pt\hrule}%
- \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-% The old definition, with no lozenge:
-%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
+
+% @samp.
+\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
+
+% definition of @key that produces a lozenge. Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+% \vbox{\hrule\kern-0.4pt
+% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+% \kern-0.4pt\hrule}%
+% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge. If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle. But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+ \nohyphenation
+ \ifmonospace\else\tt\fi
+ #1}\null}
+
+% ctrl is no longer a Texinfo command.
\def\ctrl #1{{\tt \rawbackslash \hat}#1}
% @file, @option are the same as @samp.
@@ -1779,7 +2615,7 @@ where each line of input produces a line of output.}
\nohyphenation
%
\rawbackslash
- \frenchspacing
+ \plainfrenchspacing
#1%
}%
\null
@@ -1795,12 +2631,21 @@ where each line of input produces a line of output.}
% and arrange explicitly to hyphenate at a dash.
% -- rms.
{
- \catcode`\-=\active
- \catcode`\_=\active
+ \catcode`\-=\active \catcode`\_=\active
+ \catcode`\'=\active \catcode`\`=\active
+ \global\let'=\rq \global\let`=\lq % default definitions
%
\global\def\code{\begingroup
- \catcode`\-=\active \let-\codedash
- \catcode`\_=\active \let_\codeunder
+ \setupmarkupstyle{code}%
+ % The following should really be moved into \setupmarkupstyle handlers.
+ \catcode\dashChar=\active \catcode\underChar=\active
+ \ifallowcodebreaks
+ \let-\codedash
+ \let_\codeunder
+ \else
+ \let-\realdash
+ \let_\realunder
+ \fi
\codex
}
}
@@ -1820,43 +2665,73 @@ where each line of input produces a line of output.}
}
\def\codex #1{\tclose{#1}\endgroup}
+% An additional complication: the above will allow breaks after, e.g.,
+% each of the four underscores in __typeof__. This is undesirable in
+% some manuals, especially if they don't have long identifiers in
+% general. @allowcodebreaks provides a way to control this.
+%
+\newif\ifallowcodebreaks \allowcodebreakstrue
+
+\def\keywordtrue{true}
+\def\keywordfalse{false}
+
+\parseargdef\allowcodebreaks{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\keywordtrue
+ \allowcodebreakstrue
+ \else\ifx\txiarg\keywordfalse
+ \allowcodebreaksfalse
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
+ \fi\fi
+}
+
% @kbd is like @code, except that if the argument is just one @key command,
% then @kbd has no effect.
+\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
% `example' (@kbd uses ttsl only inside of @example and friends),
% or `code' (@kbd uses normal tty font always).
\parseargdef\kbdinputstyle{%
- \def\arg{#1}%
- \ifx\arg\worddistinct
+ \def\txiarg{#1}%
+ \ifx\txiarg\worddistinct
\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
- \else\ifx\arg\wordexample
+ \else\ifx\txiarg\wordexample
\gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
- \else\ifx\arg\wordcode
+ \else\ifx\txiarg\wordcode
\gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
\else
\errhelp = \EMsimple
- \errmessage{Unknown @kbdinputstyle option `\arg'}%
+ \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
\fi\fi\fi
}
\def\worddistinct{distinct}
\def\wordexample{example}
\def\wordcode{code}
-% Default is `distinct.'
+% Default is `distinct'.
\kbdinputstyle distinct
\def\xkey{\key}
\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
\ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\look}}\fi
-\else{\tclose{\kbdfont\look}}\fi}
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
\let\indicateurl=\code
\let\env=\code
\let\command=\code
+% @clicksequence{File @click{} Open ...}
+\def\clicksequence#1{\begingroup #1\endgroup}
+
+% @clickstyle @arrow (by default)
+\parseargdef\clickstyle{\def\click{#1}}
+\def\click{\arrow}
+
% @uref (abbreviation for `urlref') takes an optional (comma-separated)
% second argument specifying the text to display and an optional third
% arg as text to display instead of (rather than in addition to) the url
@@ -1906,34 +2781,20 @@ where each line of input produces a line of output.}
\let\email=\uref
\fi
-% Check if we are currently using a typewriter font. Since all the
-% Computer Modern typewriter fonts have zero interword stretch (and
-% shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
-
% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
%
\def\dmn#1{\thinspace #1}
-\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
-
% @l was never documented to mean ``switch to the Lisp font'',
% and it is not used as such in any manual I can find. We need it for
% Polish suppressed-l. --karl, 22sep96.
%\def\l#1{{\li #1}\null}
-% Explicit font changes: @r, @sc, undocumented @ii.
-\def\r#1{{\rm #1}} % roman font
-\def\sc#1{{\smallcaps#1}} % smallcaps font
-\def\ii#1{{\it #1}} % italic font
-
% @acronym for "FBI", "NATO", and the like.
% We print this one point size smaller, since it's intended for
% all-uppercase.
-%
+%
\def\acronym#1{\doacronym #1,,\finish}
\def\doacronym#1,#2,#3\finish{%
{\selectfonts\lsize #1}%
@@ -1945,20 +2806,170 @@ where each line of input produces a line of output.}
% @abbr for "Comput. J." and the like.
% No font change, but don't do end-of-sentence spacing.
-%
+%
\def\abbr#1{\doabbr #1,,\finish}
\def\doabbr#1,#2,#3\finish{%
- {\frenchspacing #1}%
+ {\plainfrenchspacing #1}%
\def\temp{#2}%
\ifx\temp\empty \else
\space ({\unsepspaces \ignorespaces \temp \unskip})%
\fi
}
+
+\message{glyphs,}
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
+% Since these characters are used in examples, they should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+%
+\def\point{$\star$}
+\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
+\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% The @error{} command.
+% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
+%
+\setbox\errorbox=\hbox to \dimen0{\hfil
+ \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+ \advance\hsize by -2\dimen2 % Rules.
+ \vbox{%
+ \hrule height\dimen2
+ \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
+ \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+ \kern3pt\vrule width\dimen2}% Space to right.
+ \hrule height\dimen2}
+ \hfil}
+%
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
+
% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
%
\def\pounds{{\it\$}}
+% @euro{} comes from a separate font, depending on the current style.
+% We use the free feym* fonts from the eurosym package by Henrik
+% Theiling, which support regular, slanted, bold and bold slanted (and
+% "outlined" (blackboard board, sort of) versions, which we don't need).
+% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
+%
+% Although only regular is the truly official Euro symbol, we ignore
+% that. The Euro is designed to be slightly taller than the regular
+% font height.
+%
+% feymr - regular
+% feymo - slanted
+% feybr - bold
+% feybo - bold slanted
+%
+% There is no good (free) typewriter version, to my knowledge.
+% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
+% Hmm.
+%
+% Also doesn't work in math. Do we need to do math with euro symbols?
+% Hope not.
+%
+%
+\def\euro{{\eurofont e}}
+\def\eurofont{%
+ % We set the font at each command, rather than predefining it in
+ % \textfonts and the other font-switching commands, so that
+ % installations which never need the symbol don't have to have the
+ % font installed.
+ %
+ % There is only one designed size (nominal 10pt), so we always scale
+ % that to the current nominal size.
+ %
+ % By the way, simply using "at 1em" works for cmr10 and the like, but
+ % does not work for cmbx10 and other extended/shrunken fonts.
+ %
+ \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
+ %
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
+ \else
+ % regular:
+ \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
+ \fi
+ \thiseurofont
+}
+
+% Glyphs from the EC fonts. We don't use \let for the aliases, because
+% sometimes we redefine the original macro, and the alias should reflect
+% the redefinition.
+%
+% Use LaTeX names for the Icelandic letters.
+\def\DH{{\ecfont \char"D0}} % Eth
+\def\dh{{\ecfont \char"F0}} % eth
+\def\TH{{\ecfont \char"DE}} % Thorn
+\def\th{{\ecfont \char"FE}} % thorn
+%
+\def\guillemetleft{{\ecfont \char"13}}
+\def\guillemotleft{\guillemetleft}
+\def\guillemetright{{\ecfont \char"14}}
+\def\guillemotright{\guillemetright}
+\def\guilsinglleft{{\ecfont \char"0E}}
+\def\guilsinglright{{\ecfont \char"0F}}
+\def\quotedblbase{{\ecfont \char"12}}
+\def\quotesinglbase{{\ecfont \char"0D}}
+%
+% This positioning is not perfect (see the ogonek LaTeX package), but
+% we have the precomposed glyphs for the most common cases. We put the
+% tests to use those glyphs in the single \ogonek macro so we have fewer
+% dummy definitions to worry about for index entries, etc.
+%
+% ogonek is also used with other letters in Lithuanian (IOU), but using
+% the precomposed glyphs for those is not so easy since they aren't in
+% the same EC font.
+\def\ogonek#1{{%
+ \def\temp{#1}%
+ \ifx\temp\macrocharA\Aogonek
+ \else\ifx\temp\macrochara\aogonek
+ \else\ifx\temp\macrocharE\Eogonek
+ \else\ifx\temp\macrochare\eogonek
+ \else
+ \ecfont \setbox0=\hbox{#1}%
+ \ifdim\ht0=1ex\accent"0C #1%
+ \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
+ \fi
+ \fi\fi\fi\fi
+ }%
+}
+\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
+\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
+\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
+\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
+%
+% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
+\def\ecfont{%
+ % We can't distinguish serif/sans and italic/slanted, but this
+ % is used for crude hacks anyway (like adding French and German
+ % quotes to documents typeset with CM, where we lose kerning), so
+ % hopefully nobody will notice/care.
+ \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
+ \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \else
+ % regular:
+ \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \fi
+ \thisecfont
+}
+
% @registeredsymbol - R in a circle. The font for the R should really
% be smaller yet, but lllsize is the best we can do for now.
% Adapted from the plain.tex definition of \copyright.
@@ -1969,14 +2980,24 @@ where each line of input produces a line of output.}
}$%
}
+% @textdegree - the normal degrees sign.
+%
+\def\textdegree{$^\circ$}
+
% Laurent Siebenmann reports \Orb undefined with:
% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
% so we'll define it if necessary.
-%
+%
\ifx\Orb\undefined
\def\Orb{\mathhexbox20D}
\fi
+% Quotes.
+\chardef\quotedblleft="5C
+\chardef\quotedblright=`\"
+\chardef\quoteleft=`\`
+\chardef\quoteright=`\'
+
\message{page headings,}
@@ -2061,12 +3082,9 @@ where each line of input produces a line of output.}
\let\subtitlerm=\tenrm
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
-\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
- \let\tt=\authortt}
-
\parseargdef\title{%
\checkenv\titlepage
- \leftline{\titlefonts\rm #1}
+ \leftline{\titlefonts\rmisbold #1}
% print a rule at the page bottom also.
\finishedtitlepagefalse
\vskip4pt \hrule height 4pt width \hsize \vskip4pt
@@ -2087,7 +3105,7 @@ where each line of input produces a line of output.}
\else
\checkenv\titlepage
\ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
- {\authorfont \leftline{#1}}%
+ {\secfonts\rmisbold \leftline{#1}}%
\fi
}
@@ -2140,12 +3158,39 @@ where each line of input produces a line of output.}
%
% Leave some space for the footline. Hopefully ok to assume
% @evenfooting will not be used by itself.
- \global\advance\pageheight by -\baselineskip
- \global\advance\vsize by -\baselineskip
+ \global\advance\pageheight by -12pt
+ \global\advance\vsize by -12pt
}
\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
+% @evenheadingmarks top \thischapter <- chapter at the top of a page
+% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
+%
+% The same set of arguments for:
+%
+% @oddheadingmarks
+% @evenfootingmarks
+% @oddfootingmarks
+% @everyheadingmarks
+% @everyfootingmarks
+
+\def\evenheadingmarks{\headingmarks{even}{heading}}
+\def\oddheadingmarks{\headingmarks{odd}{heading}}
+\def\evenfootingmarks{\headingmarks{even}{footing}}
+\def\oddfootingmarks{\headingmarks{odd}{footing}}
+\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
+ \headingmarks{odd}{heading}{#1} }
+\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
+ \headingmarks{odd}{footing}{#1} }
+% #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
+\def\headingmarks#1#2#3 {%
+ \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
+ \global\expandafter\let\csname get#1#2marks\endcsname \temp
+}
+
+\everyheadingmarks bottom
+\everyfootingmarks bottom
% @headings double turns headings on for double-sided printing.
% @headings single turns headings on for single-sided printing.
@@ -2288,7 +3333,7 @@ where each line of input produces a line of output.}
% cause the example and the item to crash together. So we use this
% bizarre value of 10001 as a signal to \aboveenvbreak to insert
% \parskip glue after all. Section titles are handled this way also.
- %
+ %
\penalty 10001
\endgroup
\itemxneedsnegativevskipfalse
@@ -2314,15 +3359,26 @@ where each line of input produces a line of output.}
% @table, @ftable, @vtable.
\envdef\table{%
\let\itemindex\gobble
- \tablex
+ \tablecheck{table}%
}
\envdef\ftable{%
\def\itemindex ##1{\doind {fn}{\code{##1}}}%
- \tablex
+ \tablecheck{ftable}%
}
\envdef\vtable{%
\def\itemindex ##1{\doind {vr}{\code{##1}}}%
- \tablex
+ \tablecheck{vtable}%
+}
+\def\tablecheck#1{%
+ \ifnum \the\catcode`\^^M=\active
+ \endgroup
+ \errmessage{This command won't work in this context; perhaps the problem is
+ that we are \inenvironment\thisenv}%
+ \def\next{\doignore{#1}}%
+ \else
+ \let\next\tablex
+ \fi
+ \next
}
\def\tablex#1{%
\def\itemindicate{#1}%
@@ -2371,9 +3427,18 @@ where each line of input produces a line of output.}
\parindent=0pt
\parskip=\smallskipamount
\ifdim\parskip=0pt \parskip=2pt \fi
+ %
+ % Try typesetting the item mark that if the document erroneously says
+ % something like @itemize @samp (intending @table), there's an error
+ % right away at the @itemize. It's not the best error message in the
+ % world, but it's better than leaving it to the @item. This means if
+ % the user wants an empty mark, they have to say @w{} not just @w.
\def\itemcontents{#1}%
+ \setbox0 = \hbox{\itemcontents}%
+ %
% @itemize with no arg is equivalent to @itemize @bullet.
\ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
+ %
\let\item=\itemizeitem
}
@@ -2394,6 +3459,7 @@ where each line of input produces a line of output.}
\ifnum\lastpenalty<10000 \parskip=0in \fi
\noindent
\hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
+ %
\vadjust{\penalty 1200}}% not good to break after first line of item.
\flushcr
}
@@ -2615,12 +3681,19 @@ where each line of input produces a line of output.}
%
% @headitem starts a heading row, which we typeset in bold.
% Assignments have to be global since we are inside the implicit group
-% of an alignment entry. Note that \everycr resets \everytab.
-\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}%
+% of an alignment entry. \everycr resets \everytab so we don't have to
+% undo it ourselves.
+\def\headitemfont{\b}% for people to use in the template row; not changeable
+\def\headitem{%
+ \checkenv\multitable
+ \crcr
+ \global\everytab={\bf}% can't use \headitemfont since the parsing differs
+ \the\everytab % for the first item
+}%
%
% A \tab used to include \hskip1sp. But then the space in a template
% line is not enough. That is bad. So let's go back to just `&' until
-% we encounter the problem it was intended to solve again.
+% we again encounter the problem the 1sp was intended to solve.
% --karl, nathan@acm.org, 20apr99.
\def\tab{\checkenv\multitable &\the\everytab}%
@@ -2633,7 +3706,10 @@ where each line of input produces a line of output.}
\startsavinginserts
%
% @item within a multitable starts a normal row.
- \let\item\crcr
+ % We use \def instead of \let so that if one of the multitable entries
+ % contains an @itemize, we don't choke on the \item (seen as \crcr aka
+ % \endtemplate) expanding \doitemize.
+ \def\item{\crcr}%
%
\tolerance=9500
\hbadness=9500
@@ -2718,19 +3794,17 @@ where each line of input produces a line of output.}
\global\setpercentfalse
}
-\def\setmultitablespacing{% test to see if user has set \multitablelinespace.
-% If so, do nothing. If not, give it an appropriate dimension based on
-% current baselineskip.
+\def\setmultitablespacing{%
+ \def\multistrut{\strut}% just use the standard line spacing
+ %
+ % Compute \multitablelinespace (if not defined by user) for use in
+ % \multitableparskip calculation. We used define \multistrut based on
+ % this, but (ironically) that caused the spacing to be off.
+ % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
\ifdim\multitablelinespace=0pt
\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
\global\advance\multitablelinespace by-\ht0
-%% strut to put in table in case some entry doesn't have descenders,
-%% to keep lines equally spaced
-\let\multistrut = \strut
-\else
-%% FIXME: what is \box0 supposed to be?
-\gdef\multistrut{\vrule height\multitablelinespace depth\dp0
-width0pt\relax} \fi
+\fi
%% Test to see if parskip is larger than space between lines of
%% table. If not, do nothing.
%% If so, set to same dimension as multitablelinespace.
@@ -2788,6 +3862,7 @@ width0pt\relax} \fi
\def\doignore#1{\begingroup
% Scan in ``verbatim'' mode:
+ \obeylines
\catcode`\@ = \other
\catcode`\{ = \other
\catcode`\} = \other
@@ -2808,16 +3883,16 @@ width0pt\relax} \fi
\gdef\dodoignore#1{%
% #1 contains the command name as a string, e.g., `ifinfo'.
%
- % Define a command to find the next `@end #1', which must be on a line
- % by itself.
- \long\def\doignoretext##1^^M@end #1{\doignoretextyyy##1^^M@#1\_STOP_}%
+ % Define a command to find the next `@end #1'.
+ \long\def\doignoretext##1^^M@end #1{%
+ \doignoretextyyy##1^^M@#1\_STOP_}%
+ %
% And this command to find another #1 command, at the beginning of a
% line. (Otherwise, we would consider a line `@c @ifset', for
% example, to count as an @ifset for nesting.)
\long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
%
% And now expand that command.
- \obeylines %
\doignoretext ^^M%
}%
}
@@ -2847,7 +3922,12 @@ width0pt\relax} \fi
}
% Finish off ignored text.
-\def\enddoignore{\endgroup\ignorespaces}
+{ \obeylines%
+ % Ignore anything after the last `@end #1'; this matters in verbatim
+ % environments, where otherwise the newline after an ignored conditional
+ % would result in a blank line in the output.
+ \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
+}
% @set VAR sets the variable VAR to an empty value.
@@ -2960,9 +4040,8 @@ width0pt\relax} \fi
% Index generation facilities
% Define \newwrite to be identical to plain tex's \newwrite
-% except not \outer, so it can be used within \newindex.
-{\catcode`\@=11
-\gdef\newwrite{\alloc@7\write\chardef\sixt@@n}}
+% except not \outer, so it can be used within macros and \if's.
+\edef\newwrite{\makecsname{ptexnewwrite}}
% \newindex {foo} defines an index named foo.
% It automatically defines \fooindex such that
@@ -3013,11 +4092,11 @@ width0pt\relax} \fi
\def\dosynindex#1#2#3{%
% Only do \closeout if we haven't already done it, else we'll end up
% closing the target index.
- \expandafter \ifx\csname donesynindex#2\endcsname \undefined
+ \expandafter \ifx\csname donesynindex#2\endcsname \relax
% The \closeout helps reduce unnecessary open files; the limit on the
% Acorn RISC OS is a mere 16 files.
\expandafter\closeout\csname#2indfile\endcsname
- \expandafter\let\csname\donesynindex#2\endcsname = 1
+ \expandafter\let\csname donesynindex#2\endcsname = 1
\fi
% redefine \fooindfile:
\expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
@@ -3048,42 +4127,50 @@ width0pt\relax} \fi
% we have to laboriously prevent expansion for those that we don't.
%
\def\indexdummies{%
+ \escapechar = `\\ % use backslash in output files.
\def\@{@}% change to @@ when we switch to @ as escape char in index files.
\def\ {\realbackslash\space }%
+ %
% Need these in case \tex is in effect and \{ is a \delimiter again.
% But can't use \lbracecmd and \rbracecmd because texindex assumes
% braces and backslashes are used only as delimiters.
\let\{ = \mylbrace
\let\} = \myrbrace
%
- % \definedummyword defines \#1 as \realbackslash #1\space, thus
- % effectively preventing its expansion. This is used only for control
- % words, not control letters, because the \space would be incorrect
- % for control characters, but is needed to separate the control word
- % from whatever follows.
+ % I don't entirely understand this, but when an index entry is
+ % generated from a macro call, the \endinput which \scanmacro inserts
+ % causes processing to be prematurely terminated. This is,
+ % apparently, because \indexsorttmp is fully expanded, and \endinput
+ % is an expandable command. The redefinition below makes \endinput
+ % disappear altogether for that purpose -- although logging shows that
+ % processing continues to some further point. On the other hand, it
+ % seems \endinput does not hurt in the printed index arg, since that
+ % is still getting written without apparent harm.
%
- % For control letters, we have \definedummyletter, which omits the
- % space.
+ % Sample source (mac-idx3.tex, reported by Graham Percival to
+ % help-texinfo, 22may06):
+ % @macro funindex {WORD}
+ % @findex xyz
+ % @end macro
+ % ...
+ % @funindex commtest
%
- % These can be used both for control words that take an argument and
- % those that do not. If it is followed by {arg} in the input, then
- % that will dutifully get written to the index (or wherever).
+ % The above is not enough to reproduce the bug, but it gives the flavor.
%
- \def\definedummyword##1{%
- \expandafter\def\csname ##1\endcsname{\realbackslash ##1\space}%
- }%
- \def\definedummyletter##1{%
- \expandafter\def\csname ##1\endcsname{\realbackslash ##1}%
- }%
- \let\definedummyaccent\definedummyletter
+ % Sample whatsit resulting:
+ % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
+ %
+ % So:
+ \let\endinput = \empty
%
% Do the redefinitions.
\commondummies
}
-% For the aux file, @ is the escape character. So we want to redefine
-% everything using @ instead of \realbackslash. When everything uses
-% @, this will be simpler.
+% For the aux and toc files, @ is the escape character. So we want to
+% redefine everything using @ as the escape character (instead of
+% \realbackslash, still used for index files). When everything uses @,
+% this will be simpler.
%
\def\atdummies{%
\def\@{@@}%
@@ -3091,146 +4178,168 @@ width0pt\relax} \fi
\let\{ = \lbraceatcmd
\let\} = \rbraceatcmd
%
- % (See comments in \indexdummies.)
- \def\definedummyword##1{%
- \expandafter\def\csname ##1\endcsname{@##1\space}%
- }%
- \def\definedummyletter##1{%
- \expandafter\def\csname ##1\endcsname{@##1}%
- }%
- \let\definedummyaccent\definedummyletter
- %
% Do the redefinitions.
\commondummies
+ \otherbackslash
}
-% Called from \indexdummies and \atdummies. \definedummyword and
-% \definedummyletter must be defined first.
+% Called from \indexdummies and \atdummies.
%
\def\commondummies{%
%
- \normalturnoffactive
+ % \definedummyword defines \#1 as \string\#1\space, thus effectively
+ % preventing its expansion. This is used only for control% words,
+ % not control letters, because the \space would be incorrect for
+ % control characters, but is needed to separate the control word
+ % from whatever follows.
+ %
+ % For control letters, we have \definedummyletter, which omits the
+ % space.
+ %
+ % These can be used both for control words that take an argument and
+ % those that do not. If it is followed by {arg} in the input, then
+ % that will dutifully get written to the index (or wherever).
+ %
+ \def\definedummyword ##1{\def##1{\string##1\space}}%
+ \def\definedummyletter##1{\def##1{\string##1}}%
+ \let\definedummyaccent\definedummyletter
%
\commondummiesnofonts
%
- \definedummyletter{_}%
+ \definedummyletter\_%
%
% Non-English letters.
- \definedummyword{AA}%
- \definedummyword{AE}%
- \definedummyword{L}%
- \definedummyword{OE}%
- \definedummyword{O}%
- \definedummyword{aa}%
- \definedummyword{ae}%
- \definedummyword{l}%
- \definedummyword{oe}%
- \definedummyword{o}%
- \definedummyword{ss}%
- \definedummyword{exclamdown}%
- \definedummyword{questiondown}%
- \definedummyword{ordf}%
- \definedummyword{ordm}%
+ \definedummyword\AA
+ \definedummyword\AE
+ \definedummyword\DH
+ \definedummyword\L
+ \definedummyword\O
+ \definedummyword\OE
+ \definedummyword\TH
+ \definedummyword\aa
+ \definedummyword\ae
+ \definedummyword\dh
+ \definedummyword\exclamdown
+ \definedummyword\l
+ \definedummyword\o
+ \definedummyword\oe
+ \definedummyword\ordf
+ \definedummyword\ordm
+ \definedummyword\questiondown
+ \definedummyword\ss
+ \definedummyword\th
%
% Although these internal commands shouldn't show up, sometimes they do.
- \definedummyword{bf}%
- \definedummyword{gtr}%
- \definedummyword{hat}%
- \definedummyword{less}%
- \definedummyword{sf}%
- \definedummyword{sl}%
- \definedummyword{tclose}%
- \definedummyword{tt}%
- %
- \definedummyword{LaTeX}%
- \definedummyword{TeX}%
+ \definedummyword\bf
+ \definedummyword\gtr
+ \definedummyword\hat
+ \definedummyword\less
+ \definedummyword\sf
+ \definedummyword\sl
+ \definedummyword\tclose
+ \definedummyword\tt
+ %
+ \definedummyword\LaTeX
+ \definedummyword\TeX
%
% Assorted special characters.
- \definedummyword{bullet}%
- \definedummyword{comma}%
- \definedummyword{copyright}%
- \definedummyword{registeredsymbol}%
- \definedummyword{dots}%
- \definedummyword{enddots}%
- \definedummyword{equiv}%
- \definedummyword{error}%
- \definedummyword{expansion}%
- \definedummyword{minus}%
- \definedummyword{pounds}%
- \definedummyword{point}%
- \definedummyword{print}%
- \definedummyword{result}%
+ \definedummyword\bullet
+ \definedummyword\comma
+ \definedummyword\copyright
+ \definedummyword\registeredsymbol
+ \definedummyword\dots
+ \definedummyword\enddots
+ \definedummyword\equiv
+ \definedummyword\error
+ \definedummyword\euro
+ \definedummyword\guillemetleft
+ \definedummyword\guillemetright
+ \definedummyword\guilsinglleft
+ \definedummyword\guilsinglright
+ \definedummyword\expansion
+ \definedummyword\minus
+ \definedummyword\ogonek
+ \definedummyword\pounds
+ \definedummyword\point
+ \definedummyword\print
+ \definedummyword\quotedblbase
+ \definedummyword\quotedblleft
+ \definedummyword\quotedblright
+ \definedummyword\quoteleft
+ \definedummyword\quoteright
+ \definedummyword\quotesinglbase
+ \definedummyword\result
+ \definedummyword\textdegree
+ %
+ % We want to disable all macros so that they are not expanded by \write.
+ \macrolist
+ %
+ \normalturnoffactive
%
% Handle some cases of @value -- where it does not contain any
% (non-fully-expandable) commands.
\makevalueexpandable
- %
- % Normal spaces, not active ones.
- \unsepspaces
- %
- % No macro expansion.
- \turnoffmacros
}
% \commondummiesnofonts: common to \commondummies and \indexnofonts.
%
-% Better have this without active chars.
-{
- \catcode`\~=\other
- \gdef\commondummiesnofonts{%
- % Control letters and accents.
- \definedummyletter{!}%
- \definedummyaccent{"}%
- \definedummyaccent{'}%
- \definedummyletter{*}%
- \definedummyaccent{,}%
- \definedummyletter{.}%
- \definedummyletter{/}%
- \definedummyletter{:}%
- \definedummyaccent{=}%
- \definedummyletter{?}%
- \definedummyaccent{^}%
- \definedummyaccent{`}%
- \definedummyaccent{~}%
- \definedummyword{u}%
- \definedummyword{v}%
- \definedummyword{H}%
- \definedummyword{dotaccent}%
- \definedummyword{ringaccent}%
- \definedummyword{tieaccent}%
- \definedummyword{ubaraccent}%
- \definedummyword{udotaccent}%
- \definedummyword{dotless}%
- %
- % Texinfo font commands.
- \definedummyword{b}%
- \definedummyword{i}%
- \definedummyword{r}%
- \definedummyword{sc}%
- \definedummyword{t}%
- %
- % Commands that take arguments.
- \definedummyword{acronym}%
- \definedummyword{cite}%
- \definedummyword{code}%
- \definedummyword{command}%
- \definedummyword{dfn}%
- \definedummyword{emph}%
- \definedummyword{env}%
- \definedummyword{file}%
- \definedummyword{kbd}%
- \definedummyword{key}%
- \definedummyword{math}%
- \definedummyword{option}%
- \definedummyword{samp}%
- \definedummyword{strong}%
- \definedummyword{tie}%
- \definedummyword{uref}%
- \definedummyword{url}%
- \definedummyword{var}%
- \definedummyword{verb}%
- \definedummyword{w}%
- }
+\def\commondummiesnofonts{%
+ % Control letters and accents.
+ \definedummyletter\!%
+ \definedummyaccent\"%
+ \definedummyaccent\'%
+ \definedummyletter\*%
+ \definedummyaccent\,%
+ \definedummyletter\.%
+ \definedummyletter\/%
+ \definedummyletter\:%
+ \definedummyaccent\=%
+ \definedummyletter\?%
+ \definedummyaccent\^%
+ \definedummyaccent\`%
+ \definedummyaccent\~%
+ \definedummyword\u
+ \definedummyword\v
+ \definedummyword\H
+ \definedummyword\dotaccent
+ \definedummyword\ogonek
+ \definedummyword\ringaccent
+ \definedummyword\tieaccent
+ \definedummyword\ubaraccent
+ \definedummyword\udotaccent
+ \definedummyword\dotless
+ %
+ % Texinfo font commands.
+ \definedummyword\b
+ \definedummyword\i
+ \definedummyword\r
+ \definedummyword\sc
+ \definedummyword\t
+ %
+ % Commands that take arguments.
+ \definedummyword\acronym
+ \definedummyword\cite
+ \definedummyword\code
+ \definedummyword\command
+ \definedummyword\dfn
+ \definedummyword\emph
+ \definedummyword\env
+ \definedummyword\file
+ \definedummyword\kbd
+ \definedummyword\key
+ \definedummyword\math
+ \definedummyword\option
+ \definedummyword\pxref
+ \definedummyword\ref
+ \definedummyword\samp
+ \definedummyword\strong
+ \definedummyword\tie
+ \definedummyword\uref
+ \definedummyword\url
+ \definedummyword\var
+ \definedummyword\verb
+ \definedummyword\w
+ \definedummyword\xref
}
% \indexnofonts is used when outputting the strings to sort the index
@@ -3240,13 +4349,9 @@ width0pt\relax} \fi
%
\def\indexnofonts{%
% Accent commands should become @asis.
- \def\definedummyaccent##1{%
- \expandafter\let\csname ##1\endcsname\asis
- }%
+ \def\definedummyaccent##1{\let##1\asis}%
% We can just ignore other control letters.
- \def\definedummyletter##1{%
- \expandafter\def\csname ##1\endcsname{}%
- }%
+ \def\definedummyletter##1{\let##1\empty}%
% Hopefully, all control words can become @asis.
\let\definedummyword\definedummyaccent
%
@@ -3265,19 +4370,23 @@ width0pt\relax} \fi
% Non-English letters.
\def\AA{AA}%
\def\AE{AE}%
+ \def\DH{DZZ}%
\def\L{L}%
\def\OE{OE}%
\def\O{O}%
+ \def\TH{ZZZ}%
\def\aa{aa}%
\def\ae{ae}%
+ \def\dh{dzz}%
+ \def\exclamdown{!}%
\def\l{l}%
\def\oe{oe}%
- \def\o{o}%
- \def\ss{ss}%
- \def\exclamdown{!}%
- \def\questiondown{?}%
\def\ordf{a}%
\def\ordm{o}%
+ \def\o{o}%
+ \def\questiondown{?}%
+ \def\ss{ss}%
+ \def\th{zzz}%
%
\def\LaTeX{LaTeX}%
\def\TeX{TeX}%
@@ -3292,15 +4401,36 @@ width0pt\relax} \fi
\def\enddots{...}%
\def\equiv{==}%
\def\error{error}%
+ \def\euro{euro}%
+ \def\guillemetleft{<<}%
+ \def\guillemetright{>>}%
+ \def\guilsinglleft{<}%
+ \def\guilsinglright{>}%
\def\expansion{==>}%
\def\minus{-}%
\def\pounds{pounds}%
\def\point{.}%
\def\print{-|}%
+ \def\quotedblbase{"}%
+ \def\quotedblleft{"}%
+ \def\quotedblright{"}%
+ \def\quoteleft{`}%
+ \def\quoteright{'}%
+ \def\quotesinglbase{,}%
\def\result{=>}%
+ \def\textdegree{degrees}%
+ %
+ % We need to get rid of all macros, leaving only the arguments (if present).
+ % Of course this is not nearly correct, but it is the best we can do for now.
+ % makeinfo does not expand macros in the argument to @deffn, which ends up
+ % writing an index entry, and texindex isn't prepared for an index sort entry
+ % that starts with \.
%
- % Don't write macro names.
- \emptyusermacros
+ % Since macro invocations are followed by braces, we can just redefine them
+ % to take a single TeX argument. The case of a macro invocation that
+ % goes to end-of-line is not handled.
+ %
+ \macrolist
}
\let\indexbackslash=0 %overridden during \printindex.
@@ -3328,11 +4458,7 @@ width0pt\relax} \fi
%
\edef\writeto{\csname#1indfile\endcsname}%
%
- \ifvmode
- \dosubindsanitize
- \else
- \dosubindwrite
- \fi
+ \safewhatsit\dosubindwrite
}%
\fi
}
@@ -3347,7 +4473,6 @@ width0pt\relax} \fi
%
% Remember, we are within a group.
\indexdummies % Must do this here, since \bf, etc expand at this stage
- \escapechar=`\\
\def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
% so it will be output as is; and it will print as backslash.
%
@@ -3370,13 +4495,13 @@ width0pt\relax} \fi
\temp
}
-% Take care of unwanted page breaks:
+% Take care of unwanted page breaks/skips around a whatsit:
%
% If a skip is the last thing on the list now, preserve it
% by backing up by \lastskip, doing the \write, then inserting
% the skip again. Otherwise, the whatsit generated by the
-% \write will make \lastskip zero. The result is that sequences
-% like this:
+% \write or \pdfdest will make \lastskip zero. The result is that
+% sequences like this:
% @end defun
% @tindex whatever
% @defun ...
@@ -3400,25 +4525,31 @@ width0pt\relax} \fi
%
\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
%
+\newskip\whatsitskip
+\newcount\whatsitpenalty
+%
% ..., ready, GO:
%
-\def\dosubindsanitize{%
+\def\safewhatsit#1{%
+\ifhmode
+ #1%
+\else
% \lastskip and \lastpenalty cannot both be nonzero simultaneously.
- \skip0 = \lastskip
+ \whatsitskip = \lastskip
\edef\lastskipmacro{\the\lastskip}%
- \count255 = \lastpenalty
+ \whatsitpenalty = \lastpenalty
%
% If \lastskip is nonzero, that means the last item was a
% skip. And since a skip is discardable, that means this
- % -\skip0 glue we're inserting is preceded by a
+ % -\whatsitskip glue we're inserting is preceded by a
% non-discardable item, therefore it is not a potential
% breakpoint, therefore no \nobreak needed.
\ifx\lastskipmacro\zeroskipmacro
\else
- \vskip-\skip0
+ \vskip-\whatsitskip
\fi
%
- \dosubindwrite
+ #1%
%
\ifx\lastskipmacro\zeroskipmacro
% If \lastskip was zero, perhaps the last item was a penalty, and
@@ -3426,19 +4557,20 @@ width0pt\relax} \fi
% to re-insert the same penalty (values >10000 are used for various
% signals); since we just inserted a non-discardable item, any
% following glue (such as a \parskip) would be a breakpoint. For example:
- %
+ %
% @deffn deffn-whatever
% @vindex index-whatever
% Description.
% would allow a break between the index-whatever whatsit
% and the "Description." paragraph.
- \ifnum\count255>9999 \penalty\count255 \fi
+ \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
\else
% On the other hand, if we had a nonzero \lastskip,
% this make-up glue would be preceded by a non-discardable item
% (the whatsit from the \write), so we must insert a \nobreak.
- \nobreak\vskip\skip0
+ \nobreak\vskip\whatsitskip
\fi
+\fi
}
% The index entry written in the file actually looks like
@@ -3481,6 +4613,7 @@ width0pt\relax} \fi
%
\smallfonts \rm
\tolerance = 9500
+ \plainfrenchspacing
\everypar = {}% don't want the \kern\-parindent from indentation suppression.
%
% See if the index file exists and is nonempty.
@@ -3530,7 +4663,10 @@ width0pt\relax} \fi
\removelastskip
%
% We like breaks before the index initials, so insert a bonus.
- \penalty -300
+ \nobreak
+ \vskip 0pt plus 3\baselineskip
+ \penalty 0
+ \vskip 0pt plus -3\baselineskip
%
% Typeset the initial. Making this add up to a whole number of
% baselineskips increases the chance of the dots lining up from column
@@ -3540,10 +4676,9 @@ width0pt\relax} \fi
% No shrink because it confuses \balancecolumns.
\vskip 1.67\baselineskip plus .5\baselineskip
\leftline{\secbf #1}%
- \vskip .33\baselineskip plus .1\baselineskip
- %
% Do our best not to break after the initial.
\nobreak
+ \vskip .33\baselineskip plus .1\baselineskip
}}
% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
@@ -3552,7 +4687,7 @@ width0pt\relax} \fi
%
% A straightforward implementation would start like this:
% \def\entry#1#2{...
-% But this frozes the catcodes in the argument, and can cause problems to
+% But this freezes the catcodes in the argument, and can cause problems to
% @code, which sets - active. This problem was fixed by a kludge---
% ``-'' was active throughout whole index, but this isn't really right.
%
@@ -3608,11 +4743,8 @@ width0pt\relax} \fi
% The following is kludged to not output a line of dots in the index if
% there are no page numbers. The next person who breaks this will be
% cursed by a Unix daemon.
- \def\tempa{{\rm }}%
- \def\tempb{#1}%
- \edef\tempc{\tempa}%
- \edef\tempd{\tempb}%
- \ifx\tempc\tempd
+ \setbox\boxA = \hbox{#1}%
+ \ifdim\wd\boxA = 0pt
\ %
\else
%
@@ -3636,9 +4768,9 @@ width0pt\relax} \fi
\endgroup
}
-% Like \dotfill except takes at least 1 em.
+% Like plain.tex's \dotfill, except uses up at least 1 em.
\def\indexdotfill{\cleaders
- \hbox{$\mathsurround=0pt \mkern1.5mu ${\it .}$ \mkern1.5mu$}\hskip 1em plus 1fill}
+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
\def\primary #1{\line{#1\hfil}}
@@ -3748,6 +4880,34 @@ width0pt\relax} \fi
%
% All done with double columns.
\def\enddoublecolumns{%
+ % The following penalty ensures that the page builder is exercised
+ % _before_ we change the output routine. This is necessary in the
+ % following situation:
+ %
+ % The last section of the index consists only of a single entry.
+ % Before this section, \pagetotal is less than \pagegoal, so no
+ % break occurs before the last section starts. However, the last
+ % section, consisting of \initial and the single \entry, does not
+ % fit on the page and has to be broken off. Without the following
+ % penalty the page builder will not be exercised until \eject
+ % below, and by that time we'll already have changed the output
+ % routine to the \balancecolumns version, so the next-to-last
+ % double-column page will be processed with \balancecolumns, which
+ % is wrong: The two columns will go to the main vertical list, with
+ % the broken-off section in the recent contributions. As soon as
+ % the output routine finishes, TeX starts reconsidering the page
+ % break. The two columns and the broken-off section both fit on the
+ % page, because the two columns now take up only half of the page
+ % goal. When TeX sees \eject from below which follows the final
+ % section, it invokes the new output routine that we've set after
+ % \balancecolumns below; \onepageout will try to fit the two columns
+ % and the final section into the vbox of \pageheight (see
+ % \pagebody), causing an overfull box.
+ %
+ % Note that glue won't work here, because glue does not exercise the
+ % page builder, unlike penalties (see The TeXbook, pp. 280-281).
+ \penalty0
+ %
\output = {%
% Split the last of the double-column material. Leave it on the
% current page, no automatic page break.
@@ -3857,11 +5017,15 @@ width0pt\relax} \fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
-% Each @chapter defines this as the name of the chapter.
-% page headings and footings can use it. @section does likewise.
-% However, they are not reliable, because we don't use marks.
+% Each @chapter defines these (using marks) as the number+name, number
+% and name of the chapter. Page headings and footings can use
+% these. @section does likewise.
\def\thischapter{}
+\def\thischapternum{}
+\def\thischaptername{}
\def\thissection{}
+\def\thissectionnum{}
+\def\thissectionname{}
\newcount\absseclevel % used to calculate proper heading level
\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
@@ -3974,7 +5138,9 @@ width0pt\relax} \fi
\gdef\chaplevelprefix{\the\chapno.}%
\resetallfloatnos
%
- \message{\putwordChapter\space \the\chapno}%
+ % \putwordChapter can contain complex things in translations.
+ \toks0=\expandafter{\putwordChapter}%
+ \message{\the\toks0 \space \the\chapno}%
%
% Write the actual heading.
\chapmacro{#1}{Ynumbered}{\the\chapno}%
@@ -3985,15 +5151,17 @@ width0pt\relax} \fi
\global\let\subsubsection = \numberedsubsubsec
}
-\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz
+\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
+%
\def\appendixzzz#1{%
\global\secno=0 \global\subsecno=0 \global\subsubsecno=0
\global\advance\appendixno by 1
\gdef\chaplevelprefix{\appendixletter.}%
\resetallfloatnos
%
- \def\appendixnum{\putwordAppendix\space \appendixletter}%
- \message{\appendixnum}%
+ % \putwordAppendix can contain complex things in translations.
+ \toks0=\expandafter{\putwordAppendix}%
+ \message{\the\toks0 \space \appendixletter}%
%
\chapmacro{#1}{Yappendix}{\appendixletter}%
%
@@ -4125,7 +5293,6 @@ width0pt\relax} \fi
% 3) Likewise, headings look best if no \parindent is used, and
% if justification is not attempted. Hence \raggedright.
-
\def\majorheading{%
{\advance\chapheadingskip by 10pt \chapbreak }%
\parsearg\chapheadingzzz
@@ -4134,8 +5301,8 @@ width0pt\relax} \fi
\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
\def\chapheadingzzz#1{%
{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}%
+ \parindent=0pt\ptexraggedright
+ \rmisbold #1\hfill}}%
\bigskip \par\penalty 200\relax
\suppressfirstparagraphindent
}
@@ -4162,7 +5329,20 @@ width0pt\relax} \fi
\def\chapbreak{\dobreak \chapheadingskip {-4000}}
\def\chappager{\par\vfill\supereject}
-\def\chapoddpage{\chappager \ifodd\pageno \else \hbox to 0pt{} \chappager\fi}
+% Because \domark is called before \chapoddpage, the filler page will
+% get the headings for the next chapter, which is wrong. But we don't
+% care -- we just disable all headings on the filler page.
+\def\chapoddpage{%
+ \chappager
+ \ifodd\pageno \else
+ \begingroup
+ \evenheadline={\hfil}\evenfootline={\hfil}%
+ \oddheadline={\hfil}\oddfootline={\hfil}%
+ \hbox to 0pt{}%
+ \chappager
+ \endgroup
+ \fi
+}
\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
@@ -4196,41 +5376,78 @@ width0pt\relax} \fi
\def\Yappendixkeyword{Yappendix}
%
\def\chapmacro#1#2#3{%
+ % Insert the first mark before the heading break (see notes for \domark).
+ \let\prevchapterdefs=\lastchapterdefs
+ \let\prevsectiondefs=\lastsectiondefs
+ \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
+ \gdef\thissection{}}%
+ %
+ \def\temptype{#2}%
+ \ifx\temptype\Ynothingkeyword
+ \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+ \gdef\thischapter{\thischaptername}}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+ \gdef\thischapter{}}%
+ \else\ifx\temptype\Yappendixkeyword
+ \toks0={#1}%
+ \xdef\lastchapterdefs{%
+ \gdef\noexpand\thischaptername{\the\toks0}%
+ \gdef\noexpand\thischapternum{\appendixletter}%
+ % \noexpand\putwordAppendix avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
+ \noexpand\thischapternum:
+ \noexpand\thischaptername}%
+ }%
+ \else
+ \toks0={#1}%
+ \xdef\lastchapterdefs{%
+ \gdef\noexpand\thischaptername{\the\toks0}%
+ \gdef\noexpand\thischapternum{\the\chapno}%
+ % \noexpand\putwordChapter avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
+ \noexpand\thischapternum:
+ \noexpand\thischaptername}%
+ }%
+ \fi\fi\fi
+ %
+ % Output the mark. Pass it through \safewhatsit, to take care of
+ % the preceding space.
+ \safewhatsit\domark
+ %
+ % Insert the chapter heading break.
\pchapsepmacro
+ %
+ % Now the second mark, after the heading break. No break points
+ % between here and the heading.
+ \let\prevchapterdefs=\lastchapterdefs
+ \let\prevsectiondefs=\lastsectiondefs
+ \domark
+ %
{%
- \chapfonts \rm
+ \chapfonts \rmisbold
%
- % Have to define \thissection before calling \donoderef, because the
+ % Have to define \lastsection before calling \donoderef, because the
% xref code eventually uses it. On the other hand, it has to be called
% after \pchapsepmacro, or the headline will change too soon.
- \gdef\thissection{#1}%
- \gdef\thischaptername{#1}%
+ \gdef\lastsection{#1}%
%
% Only insert the separating space if we have a chapter/appendix
% number, and don't print the unnumbered ``number''.
- \def\temptype{#2}%
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unnchap}%
- \def\thischapter{#1}%
\else\ifx\temptype\Yomitfromtockeyword
\setbox0 = \hbox{}% contents like unnumbered, but no toc entry
\def\toctype{omit}%
- \xdef\thischapter{}%
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
\def\toctype{app}%
- % We don't substitute the actual chapter name into \thischapter
- % because we don't want its macros evaluated now. And we don't
- % use \thissection because that changes with each section.
- %
- \xdef\thischapter{\putwordAppendix{} \appendixletter:
- \noexpand\thischaptername}%
\else
\setbox0 = \hbox{#3\enspace}%
\def\toctype{numchap}%
- \xdef\thischapter{\putwordChapter{} \the\chapno:
- \noexpand\thischaptername}%
\fi\fi\fi
%
% Write the toc entry for this chapter. Must come before the
@@ -4246,7 +5463,8 @@ width0pt\relax} \fi
\donoderef{#2}%
%
% Typeset the actual heading.
- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \nobreak % Avoid page breaks at the interline glue.
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
\hangindent=\wd0 \centerparametersmaybe
\unhbox0 #1\par}%
}%
@@ -4270,8 +5488,8 @@ width0pt\relax} \fi
%
\def\unnchfopen #1{%
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
- \parindent=0pt\raggedright
- \rm #1\hfill}}\bigskip \par\nobreak
+ \parindent=0pt\ptexraggedright
+ \rmisbold #1\hfill}}\bigskip \par\nobreak
}
\def\chfopen #1#2{\chapoddpage {\chapfonts
\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
@@ -4280,7 +5498,7 @@ width0pt\relax} \fi
\def\centerchfopen #1{%
\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
\parindent=0pt
- \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
+ \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
}
\def\CHAPFopen{%
\global\let\chapmacro=\chfopen
@@ -4308,47 +5526,108 @@ width0pt\relax} \fi
% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
% section number.
%
+\def\seckeyword{sec}
+%
\def\sectionheading#1#2#3#4{%
{%
% Switch to the right set of fonts.
- \csname #2fonts\endcsname \rm
+ \csname #2fonts\endcsname \rmisbold
+ %
+ \def\sectionlevel{#2}%
+ \def\temptype{#3}%
+ %
+ % Insert first mark before the heading break (see notes for \domark).
+ \let\prevsectiondefs=\lastsectiondefs
+ \ifx\temptype\Ynothingkeyword
+ \ifx\sectionlevel\seckeyword
+ \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
+ \gdef\thissection{\thissectionname}}%
+ \fi
+ \else\ifx\temptype\Yomitfromtockeyword
+ % Don't redefine \thissection.
+ \else\ifx\temptype\Yappendixkeyword
+ \ifx\sectionlevel\seckeyword
+ \toks0={#1}%
+ \xdef\lastsectiondefs{%
+ \gdef\noexpand\thissectionname{\the\toks0}%
+ \gdef\noexpand\thissectionnum{#4}%
+ % \noexpand\putwordSection avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thissection{\noexpand\putwordSection{}
+ \noexpand\thissectionnum:
+ \noexpand\thissectionname}%
+ }%
+ \fi
+ \else
+ \ifx\sectionlevel\seckeyword
+ \toks0={#1}%
+ \xdef\lastsectiondefs{%
+ \gdef\noexpand\thissectionname{\the\toks0}%
+ \gdef\noexpand\thissectionnum{#4}%
+ % \noexpand\putwordSection avoids expanding indigestible
+ % commands in some of the translations.
+ \gdef\noexpand\thissection{\noexpand\putwordSection{}
+ \noexpand\thissectionnum:
+ \noexpand\thissectionname}%
+ }%
+ \fi
+ \fi\fi\fi
+ %
+ % Go into vertical mode. Usually we'll already be there, but we
+ % don't want the following whatsit to end up in a preceding paragraph
+ % if the document didn't happen to have a blank line.
+ \par
+ %
+ % Output the mark. Pass it through \safewhatsit, to take care of
+ % the preceding space.
+ \safewhatsit\domark
%
% Insert space above the heading.
\csname #2headingbreak\endcsname
%
- % Only insert the space after the number if we have a section number.
- \def\sectionlevel{#2}%
- \def\temptype{#3}%
+ % Now the second mark, after the heading break. No break points
+ % between here and the heading.
+ \let\prevsectiondefs=\lastsectiondefs
+ \domark
%
+ % Only insert the space after the number if we have a section number.
\ifx\temptype\Ynothingkeyword
\setbox0 = \hbox{}%
\def\toctype{unn}%
- \gdef\thissection{#1}%
+ \gdef\lastsection{#1}%
\else\ifx\temptype\Yomitfromtockeyword
% for @headings -- no section number, don't include in toc,
- % and don't redefine \thissection.
+ % and don't redefine \lastsection.
\setbox0 = \hbox{}%
\def\toctype{omit}%
\let\sectionlevel=\empty
\else\ifx\temptype\Yappendixkeyword
\setbox0 = \hbox{#4\enspace}%
\def\toctype{app}%
- \gdef\thissection{#1}%
+ \gdef\lastsection{#1}%
\else
\setbox0 = \hbox{#4\enspace}%
\def\toctype{num}%
- \gdef\thissection{#1}%
+ \gdef\lastsection{#1}%
\fi\fi\fi
%
- % Write the toc entry (before \donoderef). See comments in \chfplain.
+ % Write the toc entry (before \donoderef). See comments in \chapmacro.
\writetocentry{\toctype\sectionlevel}{#1}{#4}%
%
% Write the node reference (= pdf destination for pdftex).
- % Again, see comments in \chfplain.
+ % Again, see comments in \chapmacro.
\donoderef{#3}%
%
+ % Interline glue will be inserted when the vbox is completed.
+ % That glue will be a valid breakpoint for the page, since it'll be
+ % preceded by a whatsit (usually from the \donoderef, or from the
+ % \writetocentry if there was no node). We don't want to allow that
+ % break, since then the whatsits could end up on page n while the
+ % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
+ \nobreak
+ %
% Output the actual section heading.
- \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
\hangindent=\wd0 % zero if no section number
\unhbox0 #1}%
}%
@@ -4364,11 +5643,11 @@ width0pt\relax} \fi
% glue accumulate. (Not a breakpoint because it's preceded by a
% discardable item.)
\vskip-\parskip
- %
+ %
% This is purely so the last item on the list is a known \penalty >
% 10000. This is so \startdefun can avoid allowing breakpoints after
% section headings. Otherwise, it would insert a valid breakpoint between:
- %
+ %
% @section sec-whatever
% @deffn def-whatever
\penalty 10001
@@ -4405,11 +5684,11 @@ width0pt\relax} \fi
\fi
%
\iflinks
- \toks0 = {#2}%
- \toks2 = \expandafter{\lastnode}%
- \edef\temp{\write\tocfile{\realbackslash #1entry{\the\toks0}{#3}%
- {\the\toks2}{\noexpand\folio}}}%
- \temp
+ {\atdummies
+ \edef\temp{%
+ \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
+ \temp
+ }%
\fi
\fi
%
@@ -4422,6 +5701,31 @@ width0pt\relax} \fi
\ifpdf \global\pdfmakepagedesttrue \fi
}
+
+% These characters do not print properly in the Computer Modern roman
+% fonts, so we must take special care. This is more or less redundant
+% with the Texinfo input format setup at the end of this file.
+%
+\def\activecatcodes{%
+ \catcode`\"=\active
+ \catcode`\$=\active
+ \catcode`\<=\active
+ \catcode`\>=\active
+ \catcode`\\=\active
+ \catcode`\^=\active
+ \catcode`\_=\active
+ \catcode`\|=\active
+ \catcode`\~=\active
+}
+
+
+% Read the toc file, which is essentially Texinfo input.
+\def\readtocfile{%
+ \setupdatafile
+ \activecatcodes
+ \input \tocreadfilename
+}
+
\newskip\contentsrightmargin \contentsrightmargin=1in
\newcount\savepageno
\newcount\lastnegativepageno \lastnegativepageno = -1
@@ -4438,29 +5742,29 @@ width0pt\relax} \fi
%
% Don't need to put `Contents' or `Short Contents' in the headline.
% It is abundantly clear what they are.
- \def\thischapter{}%
\chapmacro{#1}{Yomitfromtoc}{}%
%
\savepageno = \pageno
\begingroup % Set up to handle contents files properly.
- \catcode`\\=0 \catcode`\{=1 \catcode`\}=2 \catcode`\@=11
- % We can't do this, because then an actual ^ in a section
- % title fails, e.g., @chapter ^ -- exponentiation. --karl, 9jul97.
- %\catcode`\^=7 % to see ^^e4 as \"a etc. juha@piuha.ydi.vtt.fi
- \raggedbottom % Worry more about breakpoints than the bottom.
+ \raggedbottom % Worry more about breakpoints than the bottom.
\advance\hsize by -\contentsrightmargin % Don't use the full line length.
%
% Roman numerals for page numbers.
\ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
}
+% redefined for the two-volume lispref. We always output on
+% \jobname.toc even if this is redefined.
+%
+\def\tocreadfilename{\jobname.toc}
% Normal (long) toc.
+%
\def\contents{%
\startcontents{\putwordTOC}%
- \openin 1 \jobname.toc
+ \openin 1 \tocreadfilename\space
\ifeof 1 \else
- \input \jobname.toc
+ \readtocfile
\fi
\vfill \eject
\contentsalignmacro % in case @setchapternewpage odd is in effect
@@ -4496,9 +5800,9 @@ width0pt\relax} \fi
\let\numsubsubsecentry = \numsecentry
\let\appsubsubsecentry = \numsecentry
\let\unnsubsubsecentry = \numsecentry
- \openin 1 \jobname.toc
+ \openin 1 \tocreadfilename\space
\ifeof 1 \else
- \input \jobname.toc
+ \readtocfile
\fi
\closein 1
\vfill \eject
@@ -4621,45 +5925,12 @@ width0pt\relax} \fi
\message{environments,}
% @foo ... @end foo.
-% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
-%
-% Since these characters are used in examples, it should be an even number of
-% \tt widths. Each \tt character is 1en, so two makes it 1em.
-%
-\def\point{$\star$}
-\def\result{\leavevmode\raise.15ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
-\def\expansion{\leavevmode\raise.1ex\hbox to 1em{\hfil$\mapsto$\hfil}}
-\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
-\def\equiv{\leavevmode\lower.1ex\hbox to 1em{\hfil$\ptexequiv$\hfil}}
-
-% The @error{} command.
-% Adapted from the TeXbook's \boxit.
-%
-\newbox\errorbox
-%
-{\tentt \global\dimen0 = 3em}% Width of the box.
-\dimen2 = .55pt % Thickness of rules
-% The text. (`r' is open on the right, `e' somewhat less so on the left.)
-\setbox0 = \hbox{\kern-.75pt \tensf error\kern-1.5pt}
-%
-\setbox\errorbox=\hbox to \dimen0{\hfil
- \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
- \advance\hsize by -2\dimen2 % Rules.
- \vbox{%
- \hrule height\dimen2
- \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
- \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
- \kern3pt\vrule width\dimen2}% Space to right.
- \hrule height\dimen2}
- \hfil}
-%
-\def\error{\leavevmode\lower.7ex\copy\errorbox}
-
% @tex ... @end tex escapes into raw Tex temporarily.
% One exception: @ is still an escape character, so that @end tex works.
% But \@ or @@ will get a plain tex @ character.
\envdef\tex{%
+ \setupmarkupstyle{tex}%
\catcode `\\=0 \catcode `\{=1 \catcode `\}=2
\catcode `\$=3 \catcode `\&=4 \catcode `\#=6
\catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
@@ -4669,6 +5940,8 @@ width0pt\relax} \fi
\catcode `\|=\other
\catcode `\<=\other
\catcode `\>=\other
+ \catcode`\`=\other
+ \catcode`\'=\other
\escapechar=`\\
%
\let\b=\ptexb
@@ -4688,6 +5961,8 @@ width0pt\relax} \fi
\let\/=\ptexslash
\let\*=\ptexstar
\let\t=\ptext
+ \expandafter \let\csname top\endcsname=\ptextop % outer
+ \let\frenchspacing=\plainfrenchspacing
%
\def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
\def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
@@ -4733,7 +6008,8 @@ width0pt\relax} \fi
\let\afterenvbreak = \aboveenvbreak
-% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins.
+% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
+% also clear it, so that its embedded environments do the narrowing again.
\let\nonarrowing=\relax
% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
@@ -4770,7 +6046,7 @@ width0pt\relax} \fi
% each corner char, and rule thickness
\normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
% Flag to tell @lisp, etc., not to narrow margin.
- \let\nonarrowing=\comment
+ \let\nonarrowing = t%
\vbox\bgroup
\baselineskip=0pt\parskip=0pt\lineskip=0pt
\carttop
@@ -4801,6 +6077,7 @@ width0pt\relax} \fi
% This macro is called at the beginning of all the @example variants,
% inside a group.
+\newdimen\nonfillparindent
\def\nonfillstart{%
\aboveenvbreak
\hfuzz = 12pt % Don't be fussy
@@ -4808,17 +6085,40 @@ width0pt\relax} \fi
\let\par = \lisppar % don't ignore blank lines
\obeylines % each line of input is a line of output
\parskip = 0pt
+ % Turn off paragraph indentation but redefine \indent to emulate
+ % the normal \indent.
+ \nonfillparindent=\parindent
\parindent = 0pt
+ \let\indent\nonfillindent
+ %
\emergencystretch = 0pt % don't try to avoid overfull boxes
- % @cartouche defines \nonarrowing to inhibit narrowing
- % at next level down.
\ifx\nonarrowing\relax
\advance \leftskip by \lispnarrowing
\exdentamount=\lispnarrowing
+ \else
+ \let\nonarrowing = \relax
\fi
\let\exdent=\nofillexdent
}
+\begingroup
+\obeyspaces
+% We want to swallow spaces (but not other tokens) after the fake
+% @indent in our nonfill-environments, where spaces are normally
+% active and set to @tie, resulting in them not being ignored after
+% @indent.
+\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
+\gdef\nonfillindentcheck{%
+\ifx\temp %
+\expandafter\nonfillindentgobble%
+\else%
+\leavevmode\nonfillindentbox%
+\fi%
+}%
+\endgroup
+\def\nonfillindentgobble#1{\nonfillindent}
+\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
+
% If you want all examples etc. small: @set dispenvsize small.
% If you want even small examples the full size: @set dispenvsize nosmall.
% This affects the following displayed environments:
@@ -4829,12 +6129,18 @@ width0pt\relax} \fi
\let\SETdispenvsize\relax
\def\setnormaldispenv{%
\ifx\SETdispenvsize\smallword
+ % end paragraph for sake of leading, in case document has no blank
+ % line. This is redundant with what happens in \aboveenvbreak, but
+ % we need to do it before changing the fonts, and it's inconvenient
+ % to change the fonts afterward.
+ \ifnum \lastpenalty=10000 \else \endgraf \fi
\smallexamplefonts \rm
\fi
}
\def\setsmalldispenv{%
\ifx\SETdispenvsize\nosmallword
\else
+ \ifnum \lastpenalty=10000 \else \endgraf \fi
\smallexamplefonts \rm
\fi
}
@@ -4861,11 +6167,10 @@ width0pt\relax} \fi
%
\maketwodispenvs {lisp}{example}{%
\nonfillstart
- \tt
+ \tt\setupmarkupstyle{example}%
\let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
\gobble % eat return
}
-
% @display/@smalldisplay: same as @lisp except keep current font.
%
\makedispenv {display}{%
@@ -4900,12 +6205,36 @@ width0pt\relax} \fi
\let\Eflushright = \afterenvbreak
+% @raggedright does more-or-less normal line breaking but no right
+% justification. From plain.tex.
+\envdef\raggedright{%
+ \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+}
+\let\Eraggedright\par
+
+\envdef\raggedleft{%
+ \parindent=0pt \leftskip0pt plus2em
+ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+ \hbadness=10000 % Last line will usually be underfull, so turn off
+ % badness reporting.
+}
+\let\Eraggedleft\par
+
+\envdef\raggedcenter{%
+ \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
+ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+ \hbadness=10000 % Last line will usually be underfull, so turn off
+ % badness reporting.
+}
+\let\Eraggedcenter\par
+
+
% @quotation does normal linebreaking (hence we can't use \nonfillstart)
% and narrows the margins. We keep \parskip nonzero in general, since
% we're doing normal filling. So, when using \aboveenvbreak and
% \afterenvbreak, temporarily make \parskip 0.
%
-\envdef\quotation{%
+\def\quotationstart{%
{\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
\parindent=0pt
%
@@ -4914,11 +6243,23 @@ width0pt\relax} \fi
\advance\leftskip by \lispnarrowing
\advance\rightskip by \lispnarrowing
\exdentamount = \lispnarrowing
+ \else
\let\nonarrowing = \relax
\fi
\parsearg\quotationlabel
}
+\envdef\quotation{%
+ \setnormaldispenv
+ \quotationstart
+}
+
+\envdef\smallquotation{%
+ \setsmalldispenv
+ \quotationstart
+}
+\let\Esmallquotation = \Equotation
+
% We have retained a nonzero parskip for the environment, since we're
% doing normal filling.
%
@@ -4954,18 +6295,16 @@ width0pt\relax} \fi
\do\ \do\\\do\{\do\}\do\$\do\&%
\do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
\do\<\do\>\do\|\do\@\do+\do\"%
+ % Don't do the quotes -- if we do, @set txicodequoteundirected and
+ % @set txicodequotebacktick will not have effect on @verb and
+ % @verbatim, and ?` and !` ligatures won't get disabled.
+ %\do\`\do\'%
}
%
% [Knuth] p. 380
\def\uncatcodespecials{%
\def\do##1{\catcode`##1=\other}\dospecials}
%
-% [Knuth] pp. 380,381,391
-% Disable Spanish ligatures ?` and !` of \tt font
-\begingroup
- \catcode`\`=\active\gdef`{\relax\lq}
-\endgroup
-%
% Setup for the @verb command.
%
% Eight spaces for a tab
@@ -4977,7 +6316,7 @@ width0pt\relax} \fi
\def\setupverb{%
\tt % easiest (and conventionally used) font for verbatim
\def\par{\leavevmode\endgraf}%
- \catcode`\`=\active
+ \setupmarkupstyle{verb}%
\tabeightspaces
% Respect line breaks,
% print special symbols as themselves, and
@@ -4992,6 +6331,7 @@ width0pt\relax} \fi
\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
%
\def\starttabbox{\setbox0=\hbox\bgroup}
+%
\begingroup
\catcode`\^^I=\active
\gdef\tabexpand{%
@@ -5005,14 +6345,16 @@ width0pt\relax} \fi
}%
}
\endgroup
+
+% start the verbatim environment.
\def\setupverbatim{%
+ \let\nonarrowing = t%
\nonfillstart
- \advance\leftskip by -\defbodyindent
% Easiest (and conventionally used) font for verbatim
\tt
\def\par{\leavevmode\egroup\box0\endgraf}%
- \catcode`\`=\active
\tabexpand
+ \setupmarkupstyle{verbatim}%
% Respect line breaks,
% print special symbols as themselves, and
% make each space count
@@ -5072,6 +6414,7 @@ width0pt\relax} \fi
{%
\makevalueexpandable
\setupverbatim
+ \indexnofonts % Allow `@@' and other weird things in file names.
\input #1
\afterenvbreak
}%
@@ -5097,27 +6440,35 @@ width0pt\relax} \fi
\endgroup
}
+
\message{defuns,}
% @defun etc.
\newskip\defbodyindent \defbodyindent=.4in
\newskip\defargsindent \defargsindent=50pt
\newskip\deflastargmargin \deflastargmargin=18pt
+\newcount\defunpenalty
% Start the processing of @deffn:
\def\startdefun{%
\ifnum\lastpenalty<10000
\medbreak
+ \defunpenalty=10003 % Will keep this @deffn together with the
+ % following @def command, see below.
\else
% If there are two @def commands in a row, we'll have a \nobreak,
% which is there to keep the function description together with its
% header. But if there's nothing but headers, we need to allow a
% break somewhere. Check specifically for penalty 10002, inserted
- % by \defargscommonending, instead of 10000, since the sectioning
+ % by \printdefunline, instead of 10000, since the sectioning
% commands also insert a nobreak penalty, and we don't want to allow
% a break between a section heading and a defun.
- %
- \ifnum\lastpenalty=10002 \penalty2000 \fi
+ %
+ % As a minor refinement, we avoid "club" headers by signalling
+ % with penalty of 10003 after the very first @deffn in the
+ % sequence (see above), and penalty of 10002 after any following
+ % @def command.
+ \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
%
% Similarly, after a section heading, do not allow a break.
% But do insert the glue.
@@ -5135,7 +6486,7 @@ width0pt\relax} \fi
%
% As above, allow line break if we have multiple x headers in a row.
% It's not a great place, though.
- \ifnum\lastpenalty=10002 \penalty3000 \fi
+ \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
%
% And now, it's time to reuse the body of the original defun:
\expandafter\gobbledefun#1%
@@ -5153,7 +6504,7 @@ width0pt\relax} \fi
\advance\rightskip by 0pt plus 1fil
\endgraf
\nobreak\vskip -\parskip
- \penalty 10002 % signal to \startdefun and \dodefunx
+ \penalty\defunpenalty % signal to \startdefun and \dodefunx
% Some of the @defun-type tags do not enable magic parentheses,
% rendering the following check redundant. But we don't optimize.
\checkparencounts
@@ -5163,7 +6514,7 @@ width0pt\relax} \fi
\def\Edefun{\endgraf\medbreak}
% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
-% the only thing remainnig is to define \deffnheader.
+% the only thing remaining is to define \deffnheader.
%
\def\makedefun#1{%
\expandafter\let\csname E#1\endcsname = \Edefun
@@ -5342,7 +6693,7 @@ width0pt\relax} \fi
%
% On the other hand, if an argument has two dashes (for instance), we
% want a way to get ttsl. Let's try @var for that.
- \let\var=\ttslanted
+ \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
#1%
\sl\hyphenchar\font=45
}
@@ -5422,12 +6773,14 @@ width0pt\relax} \fi
\ifnum\parencount=0 \else \badparencount \fi
\ifnum\brackcount=0 \else \badbrackcount \fi
}
+% these should not use \errmessage; the glibc manual, at least, actually
+% has such constructs (when documenting function pointers).
\def\badparencount{%
- \errmessage{Unbalanced parentheses in @def}%
+ \message{Warning: unbalanced parentheses in @def...}%
\global\parencount=0
}
\def\badbrackcount{%
- \errmessage{Unbalanced square braces in @def}%
+ \message{Warning: unbalanced square brackets in @def...}%
\global\brackcount=0
}
@@ -5453,12 +6806,15 @@ width0pt\relax} \fi
\newlinechar`\^^M
\let\xeatspaces\eatspaces
% Undo catcode changes of \startcontents and \doprintindex
- \catcode`\@=0 \catcode`\\=\other \escapechar=`\@
+ % When called from @insertcopying or (short)caption, we need active
+ % backslash to get it printed correctly. Previously, we had
+ % \catcode`\\=\other instead. We'll see whether a problem appears
+ % with macro expansion. --kasal, 19aug04
+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
% ... and \example
\spaceisspace
%
% Append \endinput to make sure that TeX does not see the ending newline.
- %
% I've verified that it is necessary both for e-TeX and for ordinary TeX
% --kasal, 29nov03
\scantokens{#1\endinput}%
@@ -5473,17 +6829,30 @@ width0pt\relax} \fi
\newcount\paramno % Count of parameters
\newtoks\macname % Macro name
\newif\ifrecursive % Is it recursive?
-\def\macrolist{} % List of all defined macros in the form
- % \do\macro1\do\macro2...
+
+% List of all defined macros in the form
+% \definedummyword\macro1\definedummyword\macro2...
+% Currently is also contains all @aliases; the list can be split
+% if there is a need.
+\def\macrolist{}
+
+% Add the macro to \macrolist
+\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
+\def\addtomacrolistxxx#1{%
+ \toks0 = \expandafter{\macrolist\definedummyword#1}%
+ \xdef\macrolist{\the\toks0}%
+}
% Utility routines.
-% This does \let #1 = #2, except with \csnames.
+% This does \let #1 = #2, with \csnames; that is,
+% \let \csname#1\endcsname = \csname#2\endcsname
+% (except of course we have to play expansion games).
+%
\def\cslet#1#2{%
-\expandafter\expandafter
-\expandafter\let
-\expandafter\expandafter
-\csname#1\endcsname
-\csname#2\endcsname}
+ \expandafter\let
+ \csname#1\expandafter\endcsname
+ \csname#2\endcsname
+}
% Trim leading and trailing spaces off a string.
% Concepts from aro-bend problem 15 (see CTAN).
@@ -5506,19 +6875,25 @@ width0pt\relax} \fi
% all characters are catcode 10, 11 or 12, except \ which is active
% (as in normal texinfo). It is necessary to change the definition of \.
+% Non-ASCII encodings make 8-bit characters active, so un-activate
+% them to avoid their expansion. Must do this non-globally, to
+% confine the change to the current group.
+
% It's necessary to have hard CRs when the macro is executed. This is
% done by making ^^M (\endlinechar) catcode 12 when reading the macro
% body, and then making it the \newlinechar in \scanmacro.
\def\scanctxt{%
- \catcode`\~=\other
- \catcode`\^=\other
- \catcode`\_=\other
- \catcode`\|=\other
+ \catcode`\"=\other
+ \catcode`\+=\other
\catcode`\<=\other
\catcode`\>=\other
- \catcode`\+=\other
\catcode`\@=\other
+ \catcode`\^=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\~=\other
+ \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
}
\def\scanargctxt{%
@@ -5569,10 +6944,7 @@ width0pt\relax} \fi
\else \errmessage{Macro name \the\macname\space already defined}\fi
\global\cslet{macsave.\the\macname}{\the\macname}%
\global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
- % Add the macroname to \macrolist
- \toks0 = \expandafter{\macrolist\do}%
- \xdef\macrolist{\the\toks0
- \expandafter\noexpand\csname\the\macname\endcsname}%
+ \addtomacrolist{\the\macname}%
\fi
\begingroup \macrobodyctxt
\ifrecursive \expandafter\parsermacbody
@@ -5586,7 +6958,7 @@ width0pt\relax} \fi
% Remove the macro name from \macrolist:
\begingroup
\expandafter\let\csname#1\endcsname \relax
- \let\do\unmacrodo
+ \let\definedummyword\unmacrodo
\xdef\macrolist{\macrolist}%
\endgroup
\else
@@ -5598,10 +6970,10 @@ width0pt\relax} \fi
% macro definitions that have been changed to \relax.
%
\def\unmacrodo#1{%
- \ifx#1\relax
+ \ifx #1\relax
% remove this
\else
- \noexpand\do \noexpand #1%
+ \noexpand\definedummyword \noexpand#1%
\fi
}
@@ -5714,30 +7086,11 @@ width0pt\relax} \fi
% {. If so it reads up to the closing }, if not, it reads the whole
% line. Whatever was read is then fed to the next control sequence
% as an argument (by \parsebrace or \parsearg)
-\def\braceorline#1{\let\next=#1\futurelet\nchar\braceorlinexxx}
+\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
\def\braceorlinexxx{%
\ifx\nchar\bgroup\else
\expandafter\parsearg
- \fi \next}
-
-% We want to disable all macros during \shipout so that they are not
-% expanded by \write.
-\def\turnoffmacros{\begingroup \def\do##1{\let\noexpand##1=\relax}%
- \edef\next{\macrolist}\expandafter\endgroup\next}
-
-% For \indexnofonts, we need to get rid of all macros, leaving only the
-% arguments (if present). Of course this is not nearly correct, but it
-% is the best we can do for now. makeinfo does not expand macros in the
-% argument to @deffn, which ends up writing an index entry, and texindex
-% isn't prepared for an index sort entry that starts with \.
-%
-% Since macro invocations are followed by braces, we can just redefine them
-% to take a single TeX argument. The case of a macro invocation that
-% goes to end-of-line is not handled.
-%
-\def\emptyusermacros{\begingroup
- \def\do##1{\let\noexpand##1=\noexpand\asis}%
- \edef\next{\macrolist}\expandafter\endgroup\next}
+ \fi \macnamexxx}
% @alias.
@@ -5748,6 +7101,7 @@ width0pt\relax} \fi
\def\aliasyyy #1=#2\relax{%
{%
\expandafter\let\obeyedspace=\empty
+ \addtomacrolist{#1}%
\xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
}%
\next
@@ -5757,7 +7111,6 @@ width0pt\relax} \fi
\message{cross references,}
\newwrite\auxfile
-
\newif\ifhavexrefs % True if xref values are known.
\newif\ifwarnedxrefs % True if we warned once that they aren't known.
@@ -5802,7 +7155,7 @@ width0pt\relax} \fi
% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
% anchor), which consists of three parts:
-% 1) NAME-title - the current sectioning name taken from \thissection,
+% 1) NAME-title - the current sectioning name taken from \lastsection,
% or the anchor name.
% 2) NAME-snt - section number and type, passed as the SNT arg, or
% empty for anchors.
@@ -5817,16 +7170,14 @@ width0pt\relax} \fi
\iflinks
{%
\atdummies % preserve commands, but don't expand them
- \turnoffactive
- \otherbackslash
\edef\writexrdef##1##2{%
\write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
##1}{##2}}% these are parameters of \writexrdef
}%
- \toks0 = \expandafter{\thissection}%
+ \toks0 = \expandafter{\lastsection}%
\immediate \writexrdef{title}{\the\toks0 }%
\immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
- \writexrdef{pg}{\folio}% will be written later, during \shipout
+ \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout
}%
\fi
}
@@ -5870,18 +7221,25 @@ width0pt\relax} \fi
%
% Make link in pdf output.
\ifpdf
- \leavevmode
- \getfilename{#4}%
- {\turnoffactive \otherbackslash
+ {\indexnofonts
+ \turnoffactive
+ % This expands tokens, so do it after making catcode changes, so _
+ % etc. don't get their TeX definitions.
+ \getfilename{#4}%
+ %
+ % See comments at \activebackslashdouble.
+ {\activebackslashdouble \xdef\pdfxrefdest{#1}%
+ \backslashparens\pdfxrefdest}%
+ %
+ \leavevmode
+ \startlink attr{/Border [0 0 0]}%
\ifnum\filenamelength>0
- \startlink attr{/Border [0 0 0]}%
- goto file{\the\filename.pdf} name{#1}%
+ goto file{\the\filename.pdf} name{\pdfxrefdest}%
\else
- \startlink attr{/Border [0 0 0]}%
- goto name{\pdfmkpgn{#1}}%
+ goto name{\pdfmkpgn{\pdfxrefdest}}%
\fi
}%
- \linkcolor
+ \setcolor{\linkcolor}%
\fi
%
% Float references are printed completely differently: "Figure 1.2"
@@ -5892,7 +7250,6 @@ width0pt\relax} \fi
% include an _ in the xref name, etc.
\indexnofonts
\turnoffactive
- \otherbackslash
\expandafter\global\expandafter\let\expandafter\Xthisreftitle
\csname XR#1-title\endcsname
}%
@@ -5900,7 +7257,7 @@ width0pt\relax} \fi
% If the user specified the print name (third arg) to the ref,
% print it instead of our usual "Figure 1.2".
\ifdim\wd0 = 0pt
- \refx{#1-snt}%
+ \refx{#1-snt}{}%
\else
\printedrefname
\fi
@@ -5920,14 +7277,14 @@ width0pt\relax} \fi
% is a loss. Therefore, we give the text of the node name again, so it
% is as if TeX is seeing it for the first time.
\ifdim \wd1 > 0pt
- \putwordsection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
+ \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
\else
% _ (for example) has to be the character _ for the purposes of the
% control sequence corresponding to the node, but it has to expand
% into the usual \leavevmode...\vrule stuff for purposes of
% printing. So we \turnoffactive for the \refx-snt, back on for the
% printing, back off for the \refx-pg.
- {\turnoffactive \otherbackslash
+ {\turnoffactive
% Only output a following space if the -snt ref is nonempty; for
% @unnumbered and @anchor, it won't be.
\setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
@@ -5940,7 +7297,7 @@ width0pt\relax} \fi
,\space
%
% output the `page 3'.
- \turnoffactive \otherbackslash \putwordpage\tie\refx{#1-pg}{}%
+ \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
\fi
\fi
\endlink
@@ -6016,10 +7373,18 @@ width0pt\relax} \fi
% collisions). But if this is a float type, we have more work to do.
%
\def\xrdef#1#2{%
- \expandafter\gdef\csname XR#1\endcsname{#2}% remember this xref value.
+ {% The node name might contain 8-bit characters, which in our current
+ % implementation are changed to commands like @'e. Don't let these
+ % mess up the control sequence name.
+ \indexnofonts
+ \turnoffactive
+ \xdef\safexrefname{#1}%
+ }%
+ %
+ \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
%
% Was that xref control sequence that we just defined for a float?
- \expandafter\iffloat\csname XR#1\endcsname
+ \expandafter\iffloat\csname XR\safexrefname\endcsname
% it was a float, and we have the (safe) float type in \iffloattype.
\expandafter\let\expandafter\floatlist
\csname floatlist\iffloattype\endcsname
@@ -6034,7 +7399,8 @@ width0pt\relax} \fi
%
% Remember this xref in the control sequence \floatlistFLOATTYPE,
% for later use in \listoffloats.
- \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0{#1}}%
+ \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
+ {\safexrefname}}%
\fi
}
@@ -6043,13 +7409,13 @@ width0pt\relax} \fi
\def\tryauxfile{%
\openin 1 \jobname.aux
\ifeof 1 \else
- \readauxfile
+ \readdatafile{aux}%
\global\havexrefstrue
\fi
\closein 1
}
-\def\readauxfile{\begingroup
+\def\setupdatafile{%
\catcode`\^^@=\other
\catcode`\^^A=\other
\catcode`\^^B=\other
@@ -6118,11 +7484,11 @@ width0pt\relax} \fi
%
% Make the characters 128-255 be printing characters.
{%
- \count 1=128
+ \count1=128
\def\loop{%
- \catcode\count 1=\other
- \advance\count 1 by 1
- \ifnum \count 1<256 \loop \fi
+ \catcode\count1=\other
+ \advance\count1 by 1
+ \ifnum \count1<256 \loop \fi
}%
}%
%
@@ -6130,8 +7496,12 @@ width0pt\relax} \fi
\catcode`\{=1
\catcode`\}=2
\catcode`\@=0
- %
- \input \jobname.aux
+}
+
+\def\readdatafile#1{%
+\begingroup
+ \setupdatafile
+ \input\jobname.#1
\endgroup}
@@ -6217,7 +7587,7 @@ width0pt\relax} \fi
% In case a @footnote appears in a vbox, save the footnote text and create
% the real \insert just after the vbox finished. Otherwise, the insertion
% would be lost.
-% Similarily, if a @footnote appears inside an alignment, save the footnote
+% Similarly, if a @footnote appears inside an alignment, save the footnote
% text to a box and make the \insert when a row of the table is finished.
% And the same can be done for other insert classes. --kasal, 16nov03.
@@ -6321,15 +7691,19 @@ width0pt\relax} \fi
% If the image is by itself, center it.
\ifvmode
\imagevmodetrue
- \nobreak\bigskip
+ \nobreak\medskip
% Usually we'll have text after the image which will insert
% \parskip glue, so insert it here too to equalize the space
% above and below.
\nobreak\vskip\parskip
\nobreak
- \line\bgroup\hss
\fi
%
+ % Leave vertical mode so that indentation from an enclosing
+ % environment such as @quotation is respected. On the other hand, if
+ % it's at the top level, we don't want the normal paragraph indentation.
+ \noindent
+ %
% Output the image.
\ifpdf
\dopdfimage{#1}{#2}{#3}%
@@ -6340,7 +7714,7 @@ width0pt\relax} \fi
\epsfbox{#1.eps}%
\fi
%
- \ifimagevmode \hss \egroup \bigbreak \fi % space after the image
+ \ifimagevmode \medskip \fi % space after the standalone image
\endgroup}
@@ -6407,13 +7781,13 @@ width0pt\relax} \fi
\global\advance\floatno by 1
%
{%
- % This magic value for \thissection is output by \setref as the
+ % This magic value for \lastsection is output by \setref as the
% XREFLABEL-title value. \xrefX uses it to distinguish float
% labels (which have a completely different output format) from
% node and anchor labels. And \xrdef uses it to construct the
% lists of floats.
%
- \edef\thissection{\floatmagic=\safefloattype}%
+ \edef\lastsection{\floatmagic=\safefloattype}%
\setref{\floatlabel}{Yfloat}%
}%
\fi
@@ -6468,6 +7842,9 @@ width0pt\relax} \fi
\ifx\captionline\empty \else
\vskip.5\parskip
\captionline
+ %
+ % Space below caption.
+ \vskip\parskip
\fi
%
% If have an xref label, write the list of floats info. Do this
@@ -6477,26 +7854,31 @@ width0pt\relax} \fi
% \floatlabel-lof. Besides \floatident, we include the short
% caption if specified, else the full caption if specified, else nothing.
{%
- \atdummies \turnoffactive \otherbackslash
- \immediate\write\auxfile{@xrdef{\floatlabel-lof}{%
- \floatident
- \ifx\thisshortcaption\empty
- \ifx\thiscaption\empty \else : \thiscaption \fi
- \else
- : \thisshortcaption
- \fi
- }}%
+ \atdummies
+ %
+ % since we read the caption text in the macro world, where ^^M
+ % is turned into a normal character, we have to scan it back, so
+ % we don't write the literal three characters "^^M" into the aux file.
+ \scanexp{%
+ \xdef\noexpand\gtemp{%
+ \ifx\thisshortcaption\empty
+ \thiscaption
+ \else
+ \thisshortcaption
+ \fi
+ }%
+ }%
+ \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
+ \ifx\gtemp\empty \else : \gtemp \fi}}%
}%
\fi
- %
- % Space below caption, if we printed anything.
- \ifx\printedsomething\empty \else \vskip\parskip \fi
\egroup % end of \vtop
%
% place the captured inserts
%
- % BEWARE: when the floats start float, we have to issue warning whenever an
- % insert appears inside a float which could possibly float. --kasal, 26may04
+ % BEWARE: when the floats start floating, we have to issue warning
+ % whenever an insert appears inside a float which could possibly
+ % float. --kasal, 26may04
%
\checkinserts
}
@@ -6540,7 +7922,7 @@ width0pt\relax} \fi
% #1 is the control sequence we are passed; we expand into a conditional
% which is true if #1 represents a float ref. That is, the magic
-% \thissection value which we \setref above.
+% \lastsection value which we \setref above.
%
\def\iffloat#1{\expandafter\doiffloat#1==\finish}
%
@@ -6601,39 +7983,909 @@ width0pt\relax} \fi
\writeentry
}}
+
\message{localization,}
-% and i18n.
-% @documentlanguage is usually given very early, just after
-% @setfilename. If done too late, it may not override everything
-% properly. Single argument is the language abbreviation.
-% It would be nice if we could set up a hyphenation file here.
+% For single-language documents, @documentlanguage is usually given very
+% early, just after @documentencoding. Single argument is the language
+% (de) or locale (de_DE) abbreviation.
%
-\parseargdef\documentlanguage{%
+{
+ \catcode`\_ = \active
+ \globaldefs=1
+\parseargdef\documentlanguage{\begingroup
+ \let_=\normalunderscore % normal _ character for filenames
\tex % read txi-??.tex file in plain TeX.
- % Read the file if it exists.
+ % Read the file by the name they passed if it exists.
\openin 1 txi-#1.tex
\ifeof 1
- \errhelp = \nolanghelp
- \errmessage{Cannot read language file txi-#1.tex}%
+ \documentlanguagetrywithoutunderscore{#1_\finish}%
\else
+ \globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex
\fi
\closein 1
- \endgroup
+ \endgroup % end raw TeX
+\endgroup}
+%
+% If they passed de_DE, and txi-de_DE.tex doesn't exist,
+% try txi-de.tex.
+%
+\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
+ \openin 1 txi-#1.tex
+ \ifeof 1
+ \errhelp = \nolanghelp
+ \errmessage{Cannot read language file txi-#1.tex}%
+ \else
+ \globaldefs = 1 % everything in the txi-LL files needs to persist
+ \input txi-#1.tex
+ \fi
+ \closein 1
}
+}% end of special _ catcode
+%
\newhelp\nolanghelp{The given language definition file cannot be found or
-is empty. Maybe you need to install it? In the current directory
-should work if nowhere else does.}
+is empty. Maybe you need to install it? Putting it in the current
+directory should work if nowhere else does.}
+% This macro is called from txi-??.tex files; the first argument is the
+% \language name to set (without the "\lang@" prefix), the second and
+% third args are \{left,right}hyphenmin.
+%
+% The language names to pass are determined when the format is built.
+% See the etex.log file created at that time, e.g.,
+% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
+%
+% With TeX Live 2008, etex now includes hyphenation patterns for all
+% available languages. This means we can support hyphenation in
+% Texinfo, at least to some extent. (This still doesn't solve the
+% accented characters problem.)
+%
+\catcode`@=11
+\def\txisetlanguage#1#2#3{%
+ % do not set the language if the name is undefined in the current TeX.
+ \expandafter\ifx\csname lang@#1\endcsname \relax
+ \message{no patterns for #1}%
+ \else
+ \global\language = \csname lang@#1\endcsname
+ \fi
+ % but there is no harm in adjusting the hyphenmin values regardless.
+ \global\lefthyphenmin = #2\relax
+ \global\righthyphenmin = #3\relax
+}
-% @documentencoding should change something in TeX eventually, most
-% likely, but for now just recognize it.
-\let\documentencoding = \comment
+% Helpers for encodings.
+% Set the catcode of characters 128 through 255 to the specified number.
+%
+\def\setnonasciicharscatcode#1{%
+ \count255=128
+ \loop\ifnum\count255<256
+ \global\catcode\count255=#1\relax
+ \advance\count255 by 1
+ \repeat
+}
+\def\setnonasciicharscatcodenonglobal#1{%
+ \count255=128
+ \loop\ifnum\count255<256
+ \catcode\count255=#1\relax
+ \advance\count255 by 1
+ \repeat
+}
-% Page size parameters.
+% @documentencoding sets the definition of non-ASCII characters
+% according to the specified encoding.
%
+\parseargdef\documentencoding{%
+ % Encoding being declared for the document.
+ \def\declaredencoding{\csname #1.enc\endcsname}%
+ %
+ % Supported encodings: names converted to tokens in order to be able
+ % to compare them with \ifx.
+ \def\ascii{\csname US-ASCII.enc\endcsname}%
+ \def\latnine{\csname ISO-8859-15.enc\endcsname}%
+ \def\latone{\csname ISO-8859-1.enc\endcsname}%
+ \def\lattwo{\csname ISO-8859-2.enc\endcsname}%
+ \def\utfeight{\csname UTF-8.enc\endcsname}%
+ %
+ \ifx \declaredencoding \ascii
+ \asciichardefs
+ %
+ \else \ifx \declaredencoding \lattwo
+ \setnonasciicharscatcode\active
+ \lattwochardefs
+ %
+ \else \ifx \declaredencoding \latone
+ \setnonasciicharscatcode\active
+ \latonechardefs
+ %
+ \else \ifx \declaredencoding \latnine
+ \setnonasciicharscatcode\active
+ \latninechardefs
+ %
+ \else \ifx \declaredencoding \utfeight
+ \setnonasciicharscatcode\active
+ \utfeightchardefs
+ %
+ \else
+ \message{Unknown document encoding #1, ignoring.}%
+ %
+ \fi % utfeight
+ \fi % latnine
+ \fi % latone
+ \fi % lattwo
+ \fi % ascii
+}
+
+% A message to be logged when using a character that isn't available
+% the default font encoding (OT1).
+%
+\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
+
+% Take account of \c (plain) vs. \, (Texinfo) difference.
+\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
+
+% First, make active non-ASCII characters in order for them to be
+% correctly categorized when TeX reads the replacement text of
+% macros containing the character definitions.
+\setnonasciicharscatcode\active
+%
+% Latin1 (ISO-8859-1) character definitions.
+\def\latonechardefs{%
+ \gdef^^a0{~}
+ \gdef^^a1{\exclamdown}
+ \gdef^^a2{\missingcharmsg{CENT SIGN}}
+ \gdef^^a3{{\pounds}}
+ \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
+ \gdef^^a5{\missingcharmsg{YEN SIGN}}
+ \gdef^^a6{\missingcharmsg{BROKEN BAR}}
+ \gdef^^a7{\S}
+ \gdef^^a8{\"{}}
+ \gdef^^a9{\copyright}
+ \gdef^^aa{\ordf}
+ \gdef^^ab{\guillemetleft}
+ \gdef^^ac{$\lnot$}
+ \gdef^^ad{\-}
+ \gdef^^ae{\registeredsymbol}
+ \gdef^^af{\={}}
+ %
+ \gdef^^b0{\textdegree}
+ \gdef^^b1{$\pm$}
+ \gdef^^b2{$^2$}
+ \gdef^^b3{$^3$}
+ \gdef^^b4{\'{}}
+ \gdef^^b5{$\mu$}
+ \gdef^^b6{\P}
+ %
+ \gdef^^b7{$^.$}
+ \gdef^^b8{\cedilla\ }
+ \gdef^^b9{$^1$}
+ \gdef^^ba{\ordm}
+ %
+ \gdef^^bb{\guilletright}
+ \gdef^^bc{$1\over4$}
+ \gdef^^bd{$1\over2$}
+ \gdef^^be{$3\over4$}
+ \gdef^^bf{\questiondown}
+ %
+ \gdef^^c0{\`A}
+ \gdef^^c1{\'A}
+ \gdef^^c2{\^A}
+ \gdef^^c3{\~A}
+ \gdef^^c4{\"A}
+ \gdef^^c5{\ringaccent A}
+ \gdef^^c6{\AE}
+ \gdef^^c7{\cedilla C}
+ \gdef^^c8{\`E}
+ \gdef^^c9{\'E}
+ \gdef^^ca{\^E}
+ \gdef^^cb{\"E}
+ \gdef^^cc{\`I}
+ \gdef^^cd{\'I}
+ \gdef^^ce{\^I}
+ \gdef^^cf{\"I}
+ %
+ \gdef^^d0{\DH}
+ \gdef^^d1{\~N}
+ \gdef^^d2{\`O}
+ \gdef^^d3{\'O}
+ \gdef^^d4{\^O}
+ \gdef^^d5{\~O}
+ \gdef^^d6{\"O}
+ \gdef^^d7{$\times$}
+ \gdef^^d8{\O}
+ \gdef^^d9{\`U}
+ \gdef^^da{\'U}
+ \gdef^^db{\^U}
+ \gdef^^dc{\"U}
+ \gdef^^dd{\'Y}
+ \gdef^^de{\TH}
+ \gdef^^df{\ss}
+ %
+ \gdef^^e0{\`a}
+ \gdef^^e1{\'a}
+ \gdef^^e2{\^a}
+ \gdef^^e3{\~a}
+ \gdef^^e4{\"a}
+ \gdef^^e5{\ringaccent a}
+ \gdef^^e6{\ae}
+ \gdef^^e7{\cedilla c}
+ \gdef^^e8{\`e}
+ \gdef^^e9{\'e}
+ \gdef^^ea{\^e}
+ \gdef^^eb{\"e}
+ \gdef^^ec{\`{\dotless i}}
+ \gdef^^ed{\'{\dotless i}}
+ \gdef^^ee{\^{\dotless i}}
+ \gdef^^ef{\"{\dotless i}}
+ %
+ \gdef^^f0{\dh}
+ \gdef^^f1{\~n}
+ \gdef^^f2{\`o}
+ \gdef^^f3{\'o}
+ \gdef^^f4{\^o}
+ \gdef^^f5{\~o}
+ \gdef^^f6{\"o}
+ \gdef^^f7{$\div$}
+ \gdef^^f8{\o}
+ \gdef^^f9{\`u}
+ \gdef^^fa{\'u}
+ \gdef^^fb{\^u}
+ \gdef^^fc{\"u}
+ \gdef^^fd{\'y}
+ \gdef^^fe{\th}
+ \gdef^^ff{\"y}
+}
+
+% Latin9 (ISO-8859-15) encoding character definitions.
+\def\latninechardefs{%
+ % Encoding is almost identical to Latin1.
+ \latonechardefs
+ %
+ \gdef^^a4{\euro}
+ \gdef^^a6{\v S}
+ \gdef^^a8{\v s}
+ \gdef^^b4{\v Z}
+ \gdef^^b8{\v z}
+ \gdef^^bc{\OE}
+ \gdef^^bd{\oe}
+ \gdef^^be{\"Y}
+}
+
+% Latin2 (ISO-8859-2) character definitions.
+\def\lattwochardefs{%
+ \gdef^^a0{~}
+ \gdef^^a1{\ogonek{A}}
+ \gdef^^a2{\u{}}
+ \gdef^^a3{\L}
+ \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
+ \gdef^^a5{\v L}
+ \gdef^^a6{\'S}
+ \gdef^^a7{\S}
+ \gdef^^a8{\"{}}
+ \gdef^^a9{\v S}
+ \gdef^^aa{\cedilla S}
+ \gdef^^ab{\v T}
+ \gdef^^ac{\'Z}
+ \gdef^^ad{\-}
+ \gdef^^ae{\v Z}
+ \gdef^^af{\dotaccent Z}
+ %
+ \gdef^^b0{\textdegree}
+ \gdef^^b1{\ogonek{a}}
+ \gdef^^b2{\ogonek{ }}
+ \gdef^^b3{\l}
+ \gdef^^b4{\'{}}
+ \gdef^^b5{\v l}
+ \gdef^^b6{\'s}
+ \gdef^^b7{\v{}}
+ \gdef^^b8{\cedilla\ }
+ \gdef^^b9{\v s}
+ \gdef^^ba{\cedilla s}
+ \gdef^^bb{\v t}
+ \gdef^^bc{\'z}
+ \gdef^^bd{\H{}}
+ \gdef^^be{\v z}
+ \gdef^^bf{\dotaccent z}
+ %
+ \gdef^^c0{\'R}
+ \gdef^^c1{\'A}
+ \gdef^^c2{\^A}
+ \gdef^^c3{\u A}
+ \gdef^^c4{\"A}
+ \gdef^^c5{\'L}
+ \gdef^^c6{\'C}
+ \gdef^^c7{\cedilla C}
+ \gdef^^c8{\v C}
+ \gdef^^c9{\'E}
+ \gdef^^ca{\ogonek{E}}
+ \gdef^^cb{\"E}
+ \gdef^^cc{\v E}
+ \gdef^^cd{\'I}
+ \gdef^^ce{\^I}
+ \gdef^^cf{\v D}
+ %
+ \gdef^^d0{\DH}
+ \gdef^^d1{\'N}
+ \gdef^^d2{\v N}
+ \gdef^^d3{\'O}
+ \gdef^^d4{\^O}
+ \gdef^^d5{\H O}
+ \gdef^^d6{\"O}
+ \gdef^^d7{$\times$}
+ \gdef^^d8{\v R}
+ \gdef^^d9{\ringaccent U}
+ \gdef^^da{\'U}
+ \gdef^^db{\H U}
+ \gdef^^dc{\"U}
+ \gdef^^dd{\'Y}
+ \gdef^^de{\cedilla T}
+ \gdef^^df{\ss}
+ %
+ \gdef^^e0{\'r}
+ \gdef^^e1{\'a}
+ \gdef^^e2{\^a}
+ \gdef^^e3{\u a}
+ \gdef^^e4{\"a}
+ \gdef^^e5{\'l}
+ \gdef^^e6{\'c}
+ \gdef^^e7{\cedilla c}
+ \gdef^^e8{\v c}
+ \gdef^^e9{\'e}
+ \gdef^^ea{\ogonek{e}}
+ \gdef^^eb{\"e}
+ \gdef^^ec{\v e}
+ \gdef^^ed{\'\i}
+ \gdef^^ee{\^\i}
+ \gdef^^ef{\v d}
+ %
+ \gdef^^f0{\dh}
+ \gdef^^f1{\'n}
+ \gdef^^f2{\v n}
+ \gdef^^f3{\'o}
+ \gdef^^f4{\^o}
+ \gdef^^f5{\H o}
+ \gdef^^f6{\"o}
+ \gdef^^f7{$\div$}
+ \gdef^^f8{\v r}
+ \gdef^^f9{\ringaccent u}
+ \gdef^^fa{\'u}
+ \gdef^^fb{\H u}
+ \gdef^^fc{\"u}
+ \gdef^^fd{\'y}
+ \gdef^^fe{\cedilla t}
+ \gdef^^ff{\dotaccent{}}
+}
+
+% UTF-8 character definitions.
+%
+% This code to support UTF-8 is based on LaTeX's utf8.def, with some
+% changes for Texinfo conventions. It is included here under the GPL by
+% permission from Frank Mittelbach and the LaTeX team.
+%
+\newcount\countUTFx
+\newcount\countUTFy
+\newcount\countUTFz
+
+\gdef\UTFviiiTwoOctets#1#2{\expandafter
+ \UTFviiiDefined\csname u8:#1\string #2\endcsname}
+%
+\gdef\UTFviiiThreeOctets#1#2#3{\expandafter
+ \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
+%
+\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
+ \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
+
+\gdef\UTFviiiDefined#1{%
+ \ifx #1\relax
+ \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
+ \else
+ \expandafter #1%
+ \fi
+}
+
+\begingroup
+ \catcode`\~13
+ \catcode`\"12
+
+ \def\UTFviiiLoop{%
+ \global\catcode\countUTFx\active
+ \uccode`\~\countUTFx
+ \uppercase\expandafter{\UTFviiiTmp}%
+ \advance\countUTFx by 1
+ \ifnum\countUTFx < \countUTFy
+ \expandafter\UTFviiiLoop
+ \fi}
+
+ \countUTFx = "C2
+ \countUTFy = "E0
+ \def\UTFviiiTmp{%
+ \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
+ \UTFviiiLoop
+
+ \countUTFx = "E0
+ \countUTFy = "F0
+ \def\UTFviiiTmp{%
+ \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
+ \UTFviiiLoop
+
+ \countUTFx = "F0
+ \countUTFy = "F4
+ \def\UTFviiiTmp{%
+ \xdef~{\noexpand\UTFviiiFourOctets\string~}}
+ \UTFviiiLoop
+\endgroup
+
+\begingroup
+ \catcode`\"=12
+ \catcode`\<=12
+ \catcode`\.=12
+ \catcode`\,=12
+ \catcode`\;=12
+ \catcode`\!=12
+ \catcode`\~=13
+
+ \gdef\DeclareUnicodeCharacter#1#2{%
+ \countUTFz = "#1\relax
+ \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
+ \begingroup
+ \parseXMLCharref
+ \def\UTFviiiTwoOctets##1##2{%
+ \csname u8:##1\string ##2\endcsname}%
+ \def\UTFviiiThreeOctets##1##2##3{%
+ \csname u8:##1\string ##2\string ##3\endcsname}%
+ \def\UTFviiiFourOctets##1##2##3##4{%
+ \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter
+ \gdef\UTFviiiTmp{#2}%
+ \endgroup}
+
+ \gdef\parseXMLCharref{%
+ \ifnum\countUTFz < "A0\relax
+ \errhelp = \EMsimple
+ \errmessage{Cannot define Unicode char value < 00A0}%
+ \else\ifnum\countUTFz < "800\relax
+ \parseUTFviiiA,%
+ \parseUTFviiiB C\UTFviiiTwoOctets.,%
+ \else\ifnum\countUTFz < "10000\relax
+ \parseUTFviiiA;%
+ \parseUTFviiiA,%
+ \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
+ \else
+ \parseUTFviiiA;%
+ \parseUTFviiiA,%
+ \parseUTFviiiA!%
+ \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
+ \fi\fi\fi
+ }
+
+ \gdef\parseUTFviiiA#1{%
+ \countUTFx = \countUTFz
+ \divide\countUTFz by 64
+ \countUTFy = \countUTFz
+ \multiply\countUTFz by 64
+ \advance\countUTFx by -\countUTFz
+ \advance\countUTFx by 128
+ \uccode `#1\countUTFx
+ \countUTFz = \countUTFy}
+
+ \gdef\parseUTFviiiB#1#2#3#4{%
+ \advance\countUTFz by "#10\relax
+ \uccode `#3\countUTFz
+ \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
+\endgroup
+
+\def\utfeightchardefs{%
+ \DeclareUnicodeCharacter{00A0}{\tie}
+ \DeclareUnicodeCharacter{00A1}{\exclamdown}
+ \DeclareUnicodeCharacter{00A3}{\pounds}
+ \DeclareUnicodeCharacter{00A8}{\"{ }}
+ \DeclareUnicodeCharacter{00A9}{\copyright}
+ \DeclareUnicodeCharacter{00AA}{\ordf}
+ \DeclareUnicodeCharacter{00AB}{\guillemetleft}
+ \DeclareUnicodeCharacter{00AD}{\-}
+ \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
+ \DeclareUnicodeCharacter{00AF}{\={ }}
+
+ \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
+ \DeclareUnicodeCharacter{00B4}{\'{ }}
+ \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
+ \DeclareUnicodeCharacter{00BA}{\ordm}
+ \DeclareUnicodeCharacter{00BB}{\guillemetright}
+ \DeclareUnicodeCharacter{00BF}{\questiondown}
+
+ \DeclareUnicodeCharacter{00C0}{\`A}
+ \DeclareUnicodeCharacter{00C1}{\'A}
+ \DeclareUnicodeCharacter{00C2}{\^A}
+ \DeclareUnicodeCharacter{00C3}{\~A}
+ \DeclareUnicodeCharacter{00C4}{\"A}
+ \DeclareUnicodeCharacter{00C5}{\AA}
+ \DeclareUnicodeCharacter{00C6}{\AE}
+ \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
+ \DeclareUnicodeCharacter{00C8}{\`E}
+ \DeclareUnicodeCharacter{00C9}{\'E}
+ \DeclareUnicodeCharacter{00CA}{\^E}
+ \DeclareUnicodeCharacter{00CB}{\"E}
+ \DeclareUnicodeCharacter{00CC}{\`I}
+ \DeclareUnicodeCharacter{00CD}{\'I}
+ \DeclareUnicodeCharacter{00CE}{\^I}
+ \DeclareUnicodeCharacter{00CF}{\"I}
+
+ \DeclareUnicodeCharacter{00D0}{\DH}
+ \DeclareUnicodeCharacter{00D1}{\~N}
+ \DeclareUnicodeCharacter{00D2}{\`O}
+ \DeclareUnicodeCharacter{00D3}{\'O}
+ \DeclareUnicodeCharacter{00D4}{\^O}
+ \DeclareUnicodeCharacter{00D5}{\~O}
+ \DeclareUnicodeCharacter{00D6}{\"O}
+ \DeclareUnicodeCharacter{00D8}{\O}
+ \DeclareUnicodeCharacter{00D9}{\`U}
+ \DeclareUnicodeCharacter{00DA}{\'U}
+ \DeclareUnicodeCharacter{00DB}{\^U}
+ \DeclareUnicodeCharacter{00DC}{\"U}
+ \DeclareUnicodeCharacter{00DD}{\'Y}
+ \DeclareUnicodeCharacter{00DE}{\TH}
+ \DeclareUnicodeCharacter{00DF}{\ss}
+
+ \DeclareUnicodeCharacter{00E0}{\`a}
+ \DeclareUnicodeCharacter{00E1}{\'a}
+ \DeclareUnicodeCharacter{00E2}{\^a}
+ \DeclareUnicodeCharacter{00E3}{\~a}
+ \DeclareUnicodeCharacter{00E4}{\"a}
+ \DeclareUnicodeCharacter{00E5}{\aa}
+ \DeclareUnicodeCharacter{00E6}{\ae}
+ \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
+ \DeclareUnicodeCharacter{00E8}{\`e}
+ \DeclareUnicodeCharacter{00E9}{\'e}
+ \DeclareUnicodeCharacter{00EA}{\^e}
+ \DeclareUnicodeCharacter{00EB}{\"e}
+ \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
+ \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
+ \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
+ \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
+
+ \DeclareUnicodeCharacter{00F0}{\dh}
+ \DeclareUnicodeCharacter{00F1}{\~n}
+ \DeclareUnicodeCharacter{00F2}{\`o}
+ \DeclareUnicodeCharacter{00F3}{\'o}
+ \DeclareUnicodeCharacter{00F4}{\^o}
+ \DeclareUnicodeCharacter{00F5}{\~o}
+ \DeclareUnicodeCharacter{00F6}{\"o}
+ \DeclareUnicodeCharacter{00F8}{\o}
+ \DeclareUnicodeCharacter{00F9}{\`u}
+ \DeclareUnicodeCharacter{00FA}{\'u}
+ \DeclareUnicodeCharacter{00FB}{\^u}
+ \DeclareUnicodeCharacter{00FC}{\"u}
+ \DeclareUnicodeCharacter{00FD}{\'y}
+ \DeclareUnicodeCharacter{00FE}{\th}
+ \DeclareUnicodeCharacter{00FF}{\"y}
+
+ \DeclareUnicodeCharacter{0100}{\=A}
+ \DeclareUnicodeCharacter{0101}{\=a}
+ \DeclareUnicodeCharacter{0102}{\u{A}}
+ \DeclareUnicodeCharacter{0103}{\u{a}}
+ \DeclareUnicodeCharacter{0104}{\ogonek{A}}
+ \DeclareUnicodeCharacter{0105}{\ogonek{a}}
+ \DeclareUnicodeCharacter{0106}{\'C}
+ \DeclareUnicodeCharacter{0107}{\'c}
+ \DeclareUnicodeCharacter{0108}{\^C}
+ \DeclareUnicodeCharacter{0109}{\^c}
+ \DeclareUnicodeCharacter{0118}{\ogonek{E}}
+ \DeclareUnicodeCharacter{0119}{\ogonek{e}}
+ \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
+ \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
+ \DeclareUnicodeCharacter{010C}{\v{C}}
+ \DeclareUnicodeCharacter{010D}{\v{c}}
+ \DeclareUnicodeCharacter{010E}{\v{D}}
+
+ \DeclareUnicodeCharacter{0112}{\=E}
+ \DeclareUnicodeCharacter{0113}{\=e}
+ \DeclareUnicodeCharacter{0114}{\u{E}}
+ \DeclareUnicodeCharacter{0115}{\u{e}}
+ \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
+ \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
+ \DeclareUnicodeCharacter{011A}{\v{E}}
+ \DeclareUnicodeCharacter{011B}{\v{e}}
+ \DeclareUnicodeCharacter{011C}{\^G}
+ \DeclareUnicodeCharacter{011D}{\^g}
+ \DeclareUnicodeCharacter{011E}{\u{G}}
+ \DeclareUnicodeCharacter{011F}{\u{g}}
+
+ \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
+ \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
+ \DeclareUnicodeCharacter{0124}{\^H}
+ \DeclareUnicodeCharacter{0125}{\^h}
+ \DeclareUnicodeCharacter{0128}{\~I}
+ \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
+ \DeclareUnicodeCharacter{012A}{\=I}
+ \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
+ \DeclareUnicodeCharacter{012C}{\u{I}}
+ \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
+
+ \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
+ \DeclareUnicodeCharacter{0131}{\dotless{i}}
+ \DeclareUnicodeCharacter{0132}{IJ}
+ \DeclareUnicodeCharacter{0133}{ij}
+ \DeclareUnicodeCharacter{0134}{\^J}
+ \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
+ \DeclareUnicodeCharacter{0139}{\'L}
+ \DeclareUnicodeCharacter{013A}{\'l}
+
+ \DeclareUnicodeCharacter{0141}{\L}
+ \DeclareUnicodeCharacter{0142}{\l}
+ \DeclareUnicodeCharacter{0143}{\'N}
+ \DeclareUnicodeCharacter{0144}{\'n}
+ \DeclareUnicodeCharacter{0147}{\v{N}}
+ \DeclareUnicodeCharacter{0148}{\v{n}}
+ \DeclareUnicodeCharacter{014C}{\=O}
+ \DeclareUnicodeCharacter{014D}{\=o}
+ \DeclareUnicodeCharacter{014E}{\u{O}}
+ \DeclareUnicodeCharacter{014F}{\u{o}}
+
+ \DeclareUnicodeCharacter{0150}{\H{O}}
+ \DeclareUnicodeCharacter{0151}{\H{o}}
+ \DeclareUnicodeCharacter{0152}{\OE}
+ \DeclareUnicodeCharacter{0153}{\oe}
+ \DeclareUnicodeCharacter{0154}{\'R}
+ \DeclareUnicodeCharacter{0155}{\'r}
+ \DeclareUnicodeCharacter{0158}{\v{R}}
+ \DeclareUnicodeCharacter{0159}{\v{r}}
+ \DeclareUnicodeCharacter{015A}{\'S}
+ \DeclareUnicodeCharacter{015B}{\'s}
+ \DeclareUnicodeCharacter{015C}{\^S}
+ \DeclareUnicodeCharacter{015D}{\^s}
+ \DeclareUnicodeCharacter{015E}{\cedilla{S}}
+ \DeclareUnicodeCharacter{015F}{\cedilla{s}}
+
+ \DeclareUnicodeCharacter{0160}{\v{S}}
+ \DeclareUnicodeCharacter{0161}{\v{s}}
+ \DeclareUnicodeCharacter{0162}{\cedilla{t}}
+ \DeclareUnicodeCharacter{0163}{\cedilla{T}}
+ \DeclareUnicodeCharacter{0164}{\v{T}}
+
+ \DeclareUnicodeCharacter{0168}{\~U}
+ \DeclareUnicodeCharacter{0169}{\~u}
+ \DeclareUnicodeCharacter{016A}{\=U}
+ \DeclareUnicodeCharacter{016B}{\=u}
+ \DeclareUnicodeCharacter{016C}{\u{U}}
+ \DeclareUnicodeCharacter{016D}{\u{u}}
+ \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
+ \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
+
+ \DeclareUnicodeCharacter{0170}{\H{U}}
+ \DeclareUnicodeCharacter{0171}{\H{u}}
+ \DeclareUnicodeCharacter{0174}{\^W}
+ \DeclareUnicodeCharacter{0175}{\^w}
+ \DeclareUnicodeCharacter{0176}{\^Y}
+ \DeclareUnicodeCharacter{0177}{\^y}
+ \DeclareUnicodeCharacter{0178}{\"Y}
+ \DeclareUnicodeCharacter{0179}{\'Z}
+ \DeclareUnicodeCharacter{017A}{\'z}
+ \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
+ \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
+ \DeclareUnicodeCharacter{017D}{\v{Z}}
+ \DeclareUnicodeCharacter{017E}{\v{z}}
+
+ \DeclareUnicodeCharacter{01C4}{D\v{Z}}
+ \DeclareUnicodeCharacter{01C5}{D\v{z}}
+ \DeclareUnicodeCharacter{01C6}{d\v{z}}
+ \DeclareUnicodeCharacter{01C7}{LJ}
+ \DeclareUnicodeCharacter{01C8}{Lj}
+ \DeclareUnicodeCharacter{01C9}{lj}
+ \DeclareUnicodeCharacter{01CA}{NJ}
+ \DeclareUnicodeCharacter{01CB}{Nj}
+ \DeclareUnicodeCharacter{01CC}{nj}
+ \DeclareUnicodeCharacter{01CD}{\v{A}}
+ \DeclareUnicodeCharacter{01CE}{\v{a}}
+ \DeclareUnicodeCharacter{01CF}{\v{I}}
+
+ \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
+ \DeclareUnicodeCharacter{01D1}{\v{O}}
+ \DeclareUnicodeCharacter{01D2}{\v{o}}
+ \DeclareUnicodeCharacter{01D3}{\v{U}}
+ \DeclareUnicodeCharacter{01D4}{\v{u}}
+
+ \DeclareUnicodeCharacter{01E2}{\={\AE}}
+ \DeclareUnicodeCharacter{01E3}{\={\ae}}
+ \DeclareUnicodeCharacter{01E6}{\v{G}}
+ \DeclareUnicodeCharacter{01E7}{\v{g}}
+ \DeclareUnicodeCharacter{01E8}{\v{K}}
+ \DeclareUnicodeCharacter{01E9}{\v{k}}
+
+ \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
+ \DeclareUnicodeCharacter{01F1}{DZ}
+ \DeclareUnicodeCharacter{01F2}{Dz}
+ \DeclareUnicodeCharacter{01F3}{dz}
+ \DeclareUnicodeCharacter{01F4}{\'G}
+ \DeclareUnicodeCharacter{01F5}{\'g}
+ \DeclareUnicodeCharacter{01F8}{\`N}
+ \DeclareUnicodeCharacter{01F9}{\`n}
+ \DeclareUnicodeCharacter{01FC}{\'{\AE}}
+ \DeclareUnicodeCharacter{01FD}{\'{\ae}}
+ \DeclareUnicodeCharacter{01FE}{\'{\O}}
+ \DeclareUnicodeCharacter{01FF}{\'{\o}}
+
+ \DeclareUnicodeCharacter{021E}{\v{H}}
+ \DeclareUnicodeCharacter{021F}{\v{h}}
+
+ \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
+ \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
+ \DeclareUnicodeCharacter{0228}{\cedilla{E}}
+ \DeclareUnicodeCharacter{0229}{\cedilla{e}}
+ \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
+ \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
+
+ \DeclareUnicodeCharacter{0232}{\=Y}
+ \DeclareUnicodeCharacter{0233}{\=y}
+ \DeclareUnicodeCharacter{0237}{\dotless{j}}
+
+ \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
+
+ \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
+ \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
+ \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
+ \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
+ \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
+ \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
+ \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
+ \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
+ \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
+ \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
+ \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
+ \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
+
+ \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
+ \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
+
+ \DeclareUnicodeCharacter{1E20}{\=G}
+ \DeclareUnicodeCharacter{1E21}{\=g}
+ \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
+ \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
+ \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
+ \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
+ \DeclareUnicodeCharacter{1E26}{\"H}
+ \DeclareUnicodeCharacter{1E27}{\"h}
+
+ \DeclareUnicodeCharacter{1E30}{\'K}
+ \DeclareUnicodeCharacter{1E31}{\'k}
+ \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
+ \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
+ \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
+ \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
+ \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
+ \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
+ \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
+ \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
+ \DeclareUnicodeCharacter{1E3E}{\'M}
+ \DeclareUnicodeCharacter{1E3F}{\'m}
+
+ \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
+ \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
+ \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
+ \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
+ \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
+ \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
+ \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
+ \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
+ \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
+ \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
+
+ \DeclareUnicodeCharacter{1E54}{\'P}
+ \DeclareUnicodeCharacter{1E55}{\'p}
+ \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
+ \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
+ \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
+ \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
+ \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
+ \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
+ \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
+ \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
+
+ \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
+ \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
+ \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
+ \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
+ \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
+ \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
+ \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
+ \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
+ \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
+ \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
+
+ \DeclareUnicodeCharacter{1E7C}{\~V}
+ \DeclareUnicodeCharacter{1E7D}{\~v}
+ \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
+ \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
+
+ \DeclareUnicodeCharacter{1E80}{\`W}
+ \DeclareUnicodeCharacter{1E81}{\`w}
+ \DeclareUnicodeCharacter{1E82}{\'W}
+ \DeclareUnicodeCharacter{1E83}{\'w}
+ \DeclareUnicodeCharacter{1E84}{\"W}
+ \DeclareUnicodeCharacter{1E85}{\"w}
+ \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
+ \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
+ \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
+ \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
+ \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
+ \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
+ \DeclareUnicodeCharacter{1E8C}{\"X}
+ \DeclareUnicodeCharacter{1E8D}{\"x}
+ \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
+ \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
+
+ \DeclareUnicodeCharacter{1E90}{\^Z}
+ \DeclareUnicodeCharacter{1E91}{\^z}
+ \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
+ \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
+ \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
+ \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
+ \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
+ \DeclareUnicodeCharacter{1E97}{\"t}
+ \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
+ \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
+
+ \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
+ \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
+
+ \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
+ \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
+ \DeclareUnicodeCharacter{1EBC}{\~E}
+ \DeclareUnicodeCharacter{1EBD}{\~e}
+
+ \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
+ \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
+ \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
+ \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
+
+ \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
+ \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
+
+ \DeclareUnicodeCharacter{1EF2}{\`Y}
+ \DeclareUnicodeCharacter{1EF3}{\`y}
+ \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
+
+ \DeclareUnicodeCharacter{1EF8}{\~Y}
+ \DeclareUnicodeCharacter{1EF9}{\~y}
+
+ \DeclareUnicodeCharacter{2013}{--}
+ \DeclareUnicodeCharacter{2014}{---}
+ \DeclareUnicodeCharacter{2018}{\quoteleft}
+ \DeclareUnicodeCharacter{2019}{\quoteright}
+ \DeclareUnicodeCharacter{201A}{\quotesinglbase}
+ \DeclareUnicodeCharacter{201C}{\quotedblleft}
+ \DeclareUnicodeCharacter{201D}{\quotedblright}
+ \DeclareUnicodeCharacter{201E}{\quotedblbase}
+ \DeclareUnicodeCharacter{2022}{\bullet}
+ \DeclareUnicodeCharacter{2026}{\dots}
+ \DeclareUnicodeCharacter{2039}{\guilsinglleft}
+ \DeclareUnicodeCharacter{203A}{\guilsinglright}
+ \DeclareUnicodeCharacter{20AC}{\euro}
+
+ \DeclareUnicodeCharacter{2192}{\expansion}
+ \DeclareUnicodeCharacter{21D2}{\result}
+
+ \DeclareUnicodeCharacter{2212}{\minus}
+ \DeclareUnicodeCharacter{2217}{\point}
+ \DeclareUnicodeCharacter{2261}{\equiv}
+}% end of \utfeightchardefs
+
+
+% US-ASCII character definitions.
+\def\asciichardefs{% nothing need be done
+ \relax
+}
+
+% Make non-ASCII characters printable again for compatibility with
+% existing Texinfo documents that may use them, even without declaring a
+% document encoding.
+%
+\setnonasciicharscatcode \other
+
+
+\message{formatting,}
+
\newdimen\defaultparindent \defaultparindent = 15pt
\chapheadingskip = 15pt plus 4pt minus 2pt
@@ -6646,7 +8898,7 @@ should work if nowhere else does.}
% Don't be so finicky about underfull hboxes, either.
\hbadness = 2000
-% Following George Bush, just get rid of widows and orphans.
+% Following George Bush, get rid of widows and orphans.
\widowpenalty=10000
\clubpenalty=10000
@@ -6664,9 +8916,9 @@ should work if nowhere else does.}
\fi
}
-% Parameters in order: 1) textheight; 2) textwidth; 3) voffset;
-% 4) hoffset; 5) binding offset; 6) topskip; 7) physical page height; 8)
-% physical page width.
+% Parameters in order: 1) textheight; 2) textwidth;
+% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
+% 7) physical page height; 8) physical page width.
%
% We also call \setleading{\textleading}, so the caller should define
% \textleading. The caller should also set \parskip.
@@ -6693,6 +8945,10 @@ should work if nowhere else does.}
\ifpdf
\pdfpageheight #7\relax
\pdfpagewidth #8\relax
+ % if we don't reset these, they will remain at "1 true in" of
+ % whatever layout pdftex was dumped with.
+ \pdfhorigin = 1 true in
+ \pdfvorigin = 1 true in
\fi
%
\setleading{\textleading}
@@ -6707,19 +8963,19 @@ should work if nowhere else does.}
\textleading = 13.2pt
%
% If page is nothing but text, make it come out even.
- \internalpagesizes{46\baselineskip}{6in}%
+ \internalpagesizes{607.2pt}{6in}% that's 46 lines
{\voffset}{.25in}%
{\bindingoffset}{36pt}%
{11in}{8.5in}%
}}
-% Use @smallbook to reset parameters for 7x9.5 (or so) format.
+% Use @smallbook to reset parameters for 7x9.25 trim size.
\def\smallbook{{\globaldefs = 1
\parskip = 2pt plus 1pt
\textleading = 12pt
%
\internalpagesizes{7.5in}{5in}%
- {\voffset}{.25in}%
+ {-.2in}{0in}%
{\bindingoffset}{16pt}%
{9.25in}{7in}%
%
@@ -6730,6 +8986,24 @@ should work if nowhere else does.}
\defbodyindent = .5cm
}}
+% Use @smallerbook to reset parameters for 6x9 trim size.
+% (Just testing, parameters still in flux.)
+\def\smallerbook{{\globaldefs = 1
+ \parskip = 1.5pt plus 1pt
+ \textleading = 12pt
+ %
+ \internalpagesizes{7.4in}{4.8in}%
+ {-.2in}{-.4in}%
+ {0pt}{14pt}%
+ {9in}{6in}%
+ %
+ \lispnarrowing = 0.25in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = .4cm
+}}
+
% Use @afourpaper to print on European A4 paper.
\def\afourpaper{{\globaldefs = 1
\parskip = 3pt plus 2pt minus 1pt
@@ -6745,7 +9019,7 @@ should work if nowhere else does.}
% \global\normaloffset = -6mm
% \global\bindingoffset = 10mm
% @end tex
- \internalpagesizes{51\baselineskip}{160mm}
+ \internalpagesizes{673.2pt}{160mm}% that's 51 lines
{\voffset}{\hoffset}%
{\bindingoffset}{44pt}%
{297mm}{210mm}%
@@ -6810,7 +9084,7 @@ should work if nowhere else does.}
\parskip = 3pt plus 2pt minus 1pt
\setleading{\textleading}%
%
- \dimen0 = #1
+ \dimen0 = #1\relax
\advance\dimen0 by \voffset
%
\dimen2 = \hsize
@@ -6829,6 +9103,9 @@ should work if nowhere else does.}
\message{and turning on texinfo input format.}
+% DEL is a comment character, in case @c does not suffice.
+\catcode`\^^? = 14
+
% Define macros to output various characters with catcode for normal text.
\catcode`\"=\other
\catcode`\~=\other
@@ -6882,6 +9159,7 @@ should work if nowhere else does.}
\catcode`\_=\active
\def_{\ifusingtt\normalunderscore\_}
+\let\realunder=_
% Subroutine for the previous macro.
\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
@@ -6904,6 +9182,13 @@ should work if nowhere else does.}
% \otherifyactive is called near the end of this file.
\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+% Used sometimes to turn off (effectively) the active characters even after
+% parsing them.
+\def\turnoffactive{%
+ \normalturnoffactive
+ \otherbackslash
+}
+
\catcode`\@=0
% \backslashcurfont outputs one backslash character in current font,
@@ -6911,27 +9196,29 @@ should work if nowhere else does.}
\global\chardef\backslashcurfont=`\\
\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
+% \realbackslash is an actual character `\' with catcode other, and
+% \doublebackslash is two of them (for the pdf outlines).
+{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
+
+% In texinfo, backslash is an active character; it prints the backslash
+% in fixed width font.
+\catcode`\\=\active
+@def@normalbackslash{{@tt@backslashcurfont}}
+% On startup, @fixbackslash assigns:
+% @let \ = @normalbackslash
+
% \rawbackslash defines an active \ to do \backslashcurfont.
% \otherbackslash defines an active \ to be a literal `\' character with
% catcode other.
-{\catcode`\\=\active
- @gdef@rawbackslash{@let\=@backslashcurfont}
- @gdef@otherbackslash{@let\=@realbackslash}
-}
-
-% \realbackslash is an actual character `\' with catcode other.
-{\catcode`\\=\other @gdef@realbackslash{\}}
-
-% \normalbackslash outputs one backslash in fixed width font.
-\def\normalbackslash{{\tt\backslashcurfont}}
+@gdef@rawbackslash{@let\=@backslashcurfont}
+@gdef@otherbackslash{@let\=@realbackslash}
-\catcode`\\=\active
-
-% Used sometimes to turn off (effectively) the active characters
-% even after parsing them.
-@def@turnoffactive{%
+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
+% the literal character `\'.
+%
+@def@normalturnoffactive{%
+ @let\=@normalbackslash
@let"=@normaldoublequote
- @let\=@realbackslash
@let~=@normaltilde
@let^=@normalcaret
@let_=@normalunderscore
@@ -6940,15 +9227,11 @@ should work if nowhere else does.}
@let>=@normalgreater
@let+=@normalplus
@let$=@normaldollar %$ font-lock fix
+ @markupsetuplqdefault
+ @markupsetuprqdefault
@unsepspaces
}
-% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
-% the literal character `\'. (Thus, \ is not expandable when this is in
-% effect.)
-%
-@def@normalturnoffactive{@turnoffactive @let\=@normalbackslash}
-
% Make _ and + \other characters, temporarily.
% This is canceled by @fixbackslash.
@otherifyactive
@@ -6961,9 +9244,9 @@ should work if nowhere else does.}
@global@let\ = @eatinput
% On the other hand, perhaps the file did not have a `\input texinfo'. Then
-% the first `\{ in the file would cause an error. This macro tries to fix
+% the first `\' in the file would cause an error. This macro tries to fix
% that, assuming it is called before the first `\' could plausibly occur.
-% Also back turn on active characters that might appear in the input
+% Also turn back on active characters that might appear in the input
% file name, in case not using a pre-dumped format.
%
@gdef@fixbackslash{%
@@ -6980,9 +9263,21 @@ should work if nowhere else does.}
@catcode`@# = @other
@catcode`@% = @other
+@c Finally, make ` and ' active, so that txicodequoteundirected and
+@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
+@c don't make ` and ' active, @code will not get them as active chars.
+@c Do this last of all since we use ` in the previous @catcode assignments.
+@catcode`@'=@active
+@catcode`@`=@active
+@markupsetuplqdefault
+@markupsetuprqdefault
+
+@c Gnulib now utterly and painfully insists on no trailing whitespace.
+@c So we have to nuke it.
@c Local variables:
@c eval: (add-hook 'write-file-hooks 'time-stamp)
+@c eval: (add-hook 'write-file-hooks 'nuke-trailing-whitespace)
@c page-delimiter: "^\\\\message"
@c time-stamp-start: "def\\\\texinfoversion{"
@c time-stamp-format: "%:y-%02m-%02d.%02H"
diff --git a/config/codeset.m4 b/config/codeset.m4
deleted file mode 100644
index 59535eb..0000000
--- a/config/codeset.m4
+++ /dev/null
@@ -1,23 +0,0 @@
-# codeset.m4 serial AM1 (gettext-0.10.40)
-dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([AM_LANGINFO_CODESET],
-[
- AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
- [AC_TRY_LINK([#include <langinfo.h>],
- [char* cs = nl_langinfo(CODESET);],
- am_cv_langinfo_codeset=yes,
- am_cv_langinfo_codeset=no)
- ])
- if test $am_cv_langinfo_codeset = yes; then
- AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
- [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
- fi
-])
diff --git a/config/config.rpath b/config/config.rpath
deleted file mode 100755
index dfcdbe8..0000000
--- a/config/config.rpath
+++ /dev/null
@@ -1,497 +0,0 @@
-#! /bin/sh
-# Output a system dependent set of variables, describing how to set the
-# run time search path of shared libraries in an executable.
-#
-# Copyright 1996-2002 Free Software Foundation, Inc.
-# Taken from GNU libtool, 2001
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# 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.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-#
-# The first argument passed to this file is the canonical host specification,
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
-# should be set by the caller.
-#
-# The set of defined variables is at the end of this script.
-
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-shlibext=
-
-host="$1"
-host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-wl=
-if test "$GCC" = yes; then
- wl='-Wl,'
-else
- case "$host_os" in
- aix3* | aix4* | aix5*)
- if test "$host_cpu" = ia64; then
- wl='-Wl,'
- fi
- ;;
- hpux9* | hpux10* | hpux11*)
- wl='-Wl,'
- ;;
- irix5* | irix6*)
- wl='-Wl,'
- ;;
- linux*)
- echo '__INTEL_COMPILER' > conftest.$ac_ext
- if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
- then
- :
- else
- # Intel icc
- wl='-Qoption,ld,'
- fi
- ;;
- osf3* | osf4* | osf5*)
- wl='-Wl,'
- ;;
- solaris*)
- wl='-Wl,'
- ;;
- sunos4*)
- wl='-Qoption ld '
- ;;
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- if test "x$host_vendor" = xsni; then
- wl='-LD'
- else
- wl='-Wl,'
- fi
- ;;
- esac
-fi
-
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-
-case "$host_os" in
- cygwin* | mingw* | pw32* )
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
- case "$host_os" in
- aix3* | aix4* | aix5*)
- # On AIX, the GNU linker is very broken
- ld_shlibs=no
- ;;
- amigaos*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can use
- # them.
- ld_shlibs=no
- ;;
- beos*)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- cygwin* | mingw* | pw32*)
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
- solaris* | sysv5*)
- if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- sunos4*)
- hardcode_direct=yes
- ;;
- *)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- esac
- if test "$ld_shlibs" = yes; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- fi
-else
- case "$host_os" in
- aix3*)
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$GCC" = yes; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
- aix4* | aix5*)
- hardcode_libdir_separator=':'
- if test "$GCC" = yes; then
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- hardcode_direct=yes
- else
- # We have old collect2
- hardcode_direct=unsupported
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
- fi
- else
- hardcode_direct=yes
- fi
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- else
- # Test if we are trying to use run time linking, or normal AIX style linking.
- # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
- aix_use_runtimelinking=no
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- fi
- if test "$aix_use_runtimelinking" = yes; then
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
- else
- hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
- fi
- fi
- ;;
- amigaos*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
- ;;
- cygwin* | mingw* | pw32*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- libext=lib
- ;;
- darwin* | rhapsody*)
- hardcode_direct=yes
- ;;
- freebsd1*)
- ld_shlibs=no
- ;;
- freebsd2.2*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- freebsd2*)
- hardcode_direct=yes
- hardcode_minus_L=yes
- ;;
- freebsd*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- hpux9* | hpux10* | hpux11*)
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_minus_L=yes # Not in the search PATH, but as the default
- # location of the library.
- ;;
- irix5* | irix6*)
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
- netbsd*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- newsos6)
- hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
- openbsd*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- osf3*)
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
- osf4* | osf5*)
- if test "$GCC" = yes; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- # Both cc and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- hardcode_libdir_separator=:
- ;;
- sco3.2v5*)
- ;;
- solaris*)
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- sunos4*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- ;;
- sysv4)
- if test "x$host_vendor" = xsno; then
- hardcode_direct=yes # is this really true???
- else
- hardcode_direct=no # Motorola manual says yes, but my tests say they lie
- fi
- ;;
- sysv4.3*)
- ;;
- sysv5*)
- hardcode_libdir_flag_spec=
- ;;
- uts4*)
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
- dgux*)
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- ld_shlibs=yes
- fi
- ;;
- sysv4.2uw2*)
- hardcode_direct=yes
- hardcode_minus_L=no
- ;;
- sysv5uw7* | unixware7*)
- ;;
- *)
- ld_shlibs=no
- ;;
- esac
-fi
-
-# Check dynamic linker characteristics
-libname_spec='lib$name'
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-case "$host_os" in
- aix3*)
- shlibext=so
- ;;
- aix4* | aix5*)
- shlibext=so
- ;;
- amigaos*)
- shlibext=ixlibrary
- ;;
- beos*)
- shlibext=so
- ;;
- bsdi4*)
- shlibext=so
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- ;;
- cygwin* | mingw* | pw32*)
- case $GCC,$host_os in
- yes,cygwin*)
- shlibext=dll.a
- ;;
- yes,mingw*)
- shlibext=dll
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
- ;;
- yes,pw32*)
- shlibext=dll
- ;;
- *)
- shlibext=dll
- ;;
- esac
- ;;
- darwin* | rhapsody*)
- shlibext=dylib
- ;;
- freebsd1*)
- ;;
- freebsd*)
- shlibext=so
- ;;
- gnu*)
- shlibext=so
- ;;
- hpux9* | hpux10* | hpux11*)
- shlibext=sl
- ;;
- irix5* | irix6*)
- shlibext=so
- case "$host_os" in
- irix5*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in
- *-32|*"-32 ") libsuff= shlibsuff= ;;
- *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
- *-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
- *) libsuff= shlibsuff= ;;
- esac
- ;;
- esac
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- ;;
- linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
- ;;
- linux-gnu*)
- shlibext=so
- ;;
- netbsd*)
- shlibext=so
- ;;
- newsos6)
- shlibext=so
- ;;
- openbsd*)
- shlibext=so
- ;;
- os2*)
- libname_spec='$name'
- shlibext=dll
- ;;
- osf3* | osf4* | osf5*)
- shlibext=so
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
- sco3.2v5*)
- shlibext=so
- ;;
- solaris*)
- shlibext=so
- ;;
- sunos4*)
- shlibext=so
- ;;
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- shlibext=so
- case "$host_vendor" in
- motorola)
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
- uts4*)
- shlibext=so
- ;;
- dgux*)
- shlibext=so
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- shlibext=so
- fi
- ;;
-esac
-
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
-escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-
-sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
-
-# How to pass a linker flag through the compiler.
-wl="$escaped_wl"
-
-# Static library suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally "so").
-shlibext="$shlibext"
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator="$hardcode_libdir_separator"
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct="$hardcode_direct"
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L="$hardcode_minus_L"
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec="$escaped_sys_lib_search_path_spec"
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="$escaped_sys_lib_dlsearch_path_spec"
-
-EOF
diff --git a/config/getline.m4 b/config/getline.m4
deleted file mode 100644
index ff8b5f4..0000000
--- a/config/getline.m4
+++ /dev/null
@@ -1,41 +0,0 @@
-#serial 4
-
-dnl See if there's a working, system-supplied version of the getline function.
-dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
-dnl have a function by that name in -linet that doesn't have anything
-dnl to do with the function we need.
-AC_DEFUN([AM_FUNC_GETLINE],
-[dnl
- am_getline_needs_run_time_check=no
- AC_CHECK_FUNC(getline,
- dnl Found it in some library. Verify that it works.
- am_getline_needs_run_time_check=yes,
- am_cv_func_working_getline=no)
- if test $am_getline_needs_run_time_check = yes; then
- AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline,
- [echo fooN |tr -d '\012'|tr N '\012' > conftest.data
- AC_TRY_RUN([
-# include <stdio.h>
-# include <sys/types.h>
-# include <string.h>
- int main ()
- { /* Based on a test program from Karl Heuer. */
- char *line = NULL;
- size_t siz = 0;
- int len;
- FILE *in = fopen ("./conftest.data", "r");
- if (!in)
- return 1;
- len = getline (&line, &siz, in);
- exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
- }
- ], am_cv_func_working_getline=yes dnl The library version works.
- , am_cv_func_working_getline=no dnl The library version does NOT work.
- , am_cv_func_working_getline=no dnl We're cross compiling.
- )])
- fi
-
- if test $am_cv_func_working_getline = no; then
- AC_LIBOBJ(getline)
- fi
-])
diff --git a/config/gettext-ver.m4 b/config/gettext-ver.m4
deleted file mode 100644
index 7e553f3..0000000
--- a/config/gettext-ver.m4
+++ /dev/null
@@ -1 +0,0 @@
-AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/config/gettext.m4 b/config/gettext.m4
deleted file mode 100644
index 30ea489..0000000
--- a/config/gettext.m4
+++ /dev/null
@@ -1,523 +0,0 @@
-# gettext.m4 serial 12 (gettext-0.11)
-dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002.
-
-dnl Macro to add for using GNU gettext.
-
-dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
-dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
-dnl default (if it is not specified or empty) is 'no-libtool'.
-dnl INTLSYMBOL should be 'external' for packages with no intl directory,
-dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
-dnl If INTLSYMBOL is 'use-libtool', then a libtool library
-dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
-dnl depending on --{enable,disable}-{shared,static} and on the presence of
-dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
-dnl $(top_builddir)/intl/libintl.a will be created.
-dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
-dnl implementations (in libc or libintl) without the ngettext() function
-dnl will be ignored.
-dnl INTLDIR is used to find the intl libraries. If empty,
-dnl the value `$(top_builddir)/intl/' is used.
-dnl
-dnl The result of the configuration is one of three cases:
-dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
-dnl and used.
-dnl Catalog format: GNU --> install in $(datadir)
-dnl Catalog extension: .mo after installation, .gmo in source tree
-dnl 2) GNU gettext has been found in the system's C library.
-dnl Catalog format: GNU --> install in $(datadir)
-dnl Catalog extension: .mo after installation, .gmo in source tree
-dnl 3) No internationalization, always use English msgid.
-dnl Catalog format: none
-dnl Catalog extension: none
-dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
-dnl The use of .gmo is historical (it was needed to avoid overwriting the
-dnl GNU format catalogs when building on a platform with an X/Open gettext),
-dnl but we keep it in order not to force irrelevant filename changes on the
-dnl maintainers.
-dnl
-AC_DEFUN([AM_GNU_GETTEXT],
-[
- dnl Argument checking.
- ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
- [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
-])])])])])
- ifelse([$2], [], , [ifelse([$2], [need-ngettext], ,
- [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
-])])])
- define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
- define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
-
- AC_REQUIRE([AM_PO_SUBDIRS])dnl
- ifelse(gt_included_intl, yes, [
- AC_REQUIRE([AM_INTL_SUBDIR])dnl
- ])
-
- dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
-
- AC_MSG_CHECKING([whether NLS is requested])
- dnl Default is enabled NLS
- AC_ARG_ENABLE(nls,
- [ --disable-nls do not use Native Language Support],
- USE_NLS=$enableval, USE_NLS=yes)
- AC_MSG_RESULT($USE_NLS)
- AC_SUBST(USE_NLS)
-
- ifelse(gt_included_intl, yes, [
- BUILD_INCLUDED_LIBINTL=no
- USE_INCLUDED_LIBINTL=no
- ])
- LIBINTL=
- LTLIBINTL=
- POSUB=
-
- dnl If we use NLS figure out what method
- if test "$USE_NLS" = "yes"; then
- gt_use_preinstalled_gnugettext=no
- ifelse(gt_included_intl, yes, [
- AC_MSG_CHECKING([whether included gettext is requested])
- AC_ARG_WITH(included-gettext,
- [ --with-included-gettext use the GNU gettext library included here],
- nls_cv_force_use_gnu_gettext=$withval,
- nls_cv_force_use_gnu_gettext=no)
- AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
- ])
- dnl User does not insist on using GNU NLS library. Figure out what
- dnl to use. If GNU gettext is available we use this. Else we have
- dnl to fall back to GNU NLS library.
-
- dnl Add a version number to the cache macros.
- define([gt_api_version], ifelse([$2], [need-ngettext], 2, 1))
- define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
- define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
-
- AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
- [AC_TRY_LINK([#include <libintl.h>
-extern int _nl_msg_cat_cntr;],
- [bindtextdomain ("", "");
-return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
- gt_cv_func_gnugettext_libc=yes,
- gt_cv_func_gnugettext_libc=no)])
-
- if test "$gt_cv_func_gnugettext_libc" != "yes"; then
- dnl Sometimes libintl requires libiconv, so first search for libiconv.
- ifelse(gt_included_intl, yes, , [
- AM_ICONV_LINK
- ])
- dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
- dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
- dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
- dnl even if libiconv doesn't exist.
- AC_LIB_LINKFLAGS_BODY([intl])
- AC_CACHE_CHECK([for GNU gettext in libintl],
- gt_cv_func_gnugettext_libintl,
- [gt_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS $INCINTL"
- gt_save_LIBS="$LIBS"
- LIBS="$LIBS $LIBINTL"
- dnl Now see whether libintl exists and does not depend on libiconv.
- AC_TRY_LINK([#include <libintl.h>
-extern int _nl_msg_cat_cntr;],
- [bindtextdomain ("", "");
-return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
- gt_cv_func_gnugettext_libintl=yes,
- gt_cv_func_gnugettext_libintl=no)
- dnl Now see whether libintl exists and depends on libiconv.
- if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
- LIBS="$LIBS $LIBICONV"
- AC_TRY_LINK([#include <libintl.h>
-extern int _nl_msg_cat_cntr;],
- [bindtextdomain ("", "");
-return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
- [LIBINTL="$LIBINTL $LIBICONV"
- LTLIBINTL="$LTLIBINTL $LTLIBICONV"
- gt_cv_func_gnugettext_libintl=yes
- ])
- fi
- CPPFLAGS="$gt_save_CPPFLAGS"
- LIBS="$gt_save_LIBS"])
- fi
-
- dnl If an already present or preinstalled GNU gettext() is found,
- dnl use it. But if this macro is used in GNU gettext, and GNU
- dnl gettext is already preinstalled in libintl, we update this
- dnl libintl. (Cf. the install rule in intl/Makefile.in.)
- if test "$gt_cv_func_gnugettext_libc" = "yes" \
- || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
- && test "$PACKAGE" != gettext; }; then
- gt_use_preinstalled_gnugettext=yes
- fi
-
- ifelse(gt_included_intl, yes, [
- if test "$gt_use_preinstalled_gnugettext" != "yes"; then
- dnl GNU gettext is not found in the C library.
- dnl Fall back on included GNU gettext library.
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- dnl Mark actions used to generate GNU NLS library.
- INTLOBJS="\$(GETTOBJS)"
- BUILD_INCLUDED_LIBINTL=yes
- USE_INCLUDED_LIBINTL=yes
- LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
- LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
- LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
- fi
-
- if test "$gt_use_preinstalled_gnugettext" = "yes" \
- || test "$nls_cv_use_gnu_gettext" = "yes"; then
- dnl Mark actions to use GNU gettext tools.
- CATOBJEXT=.gmo
- fi
- ])
-
- if test "$gt_use_preinstalled_gnugettext" = "yes" \
- || test "$nls_cv_use_gnu_gettext" = "yes"; then
- AC_DEFINE(ENABLE_NLS, 1,
- [Define to 1 if translation of program messages to the user's native language
- is requested.])
- else
- USE_NLS=no
- fi
- fi
-
- if test "$USE_NLS" = "yes"; then
-
- if test "$gt_use_preinstalled_gnugettext" = "yes"; then
- if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
- AC_MSG_CHECKING([how to link with libintl])
- AC_MSG_RESULT([$LIBINTL])
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
- fi
-
- dnl For backward compatibility. Some packages may be using this.
- AC_DEFINE(HAVE_GETTEXT, 1,
- [Define if the GNU gettext() function is already present or preinstalled.])
- AC_DEFINE(HAVE_DCGETTEXT, 1,
- [Define if the GNU dcgettext() function is already present or preinstalled.])
- fi
-
- dnl We need to process the po/ directory.
- POSUB=po
- fi
-
- ifelse(gt_included_intl, yes, [
- dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
- dnl to 'yes' because some of the testsuite requires it.
- if test "$PACKAGE" = gettext; then
- BUILD_INCLUDED_LIBINTL=yes
- fi
-
- dnl Make all variables we use known to autoconf.
- AC_SUBST(BUILD_INCLUDED_LIBINTL)
- AC_SUBST(USE_INCLUDED_LIBINTL)
- AC_SUBST(CATOBJEXT)
- AC_SUBST(INTLOBJS)
-
- dnl For backward compatibility. Some configure.ins may be using this.
- nls_cv_header_intl=
- nls_cv_header_libgt=
-
- dnl For backward compatibility. Some Makefiles may be using this.
- DATADIRNAME=share
- AC_SUBST(DATADIRNAME)
-
- dnl For backward compatibility. Some Makefiles may be using this.
- INSTOBJEXT=.mo
- AC_SUBST(INSTOBJEXT)
-
- dnl For backward compatibility. Some Makefiles may be using this.
- GENCAT=gencat
- AC_SUBST(GENCAT)
-
- dnl Enable libtool support if the surrounding package wishes it.
- INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
- AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
- ])
-
- dnl For backward compatibility. Some Makefiles may be using this.
- INTLLIBS="$LIBINTL"
- AC_SUBST(INTLLIBS)
-
- dnl Make all documented variables known to autoconf.
- AC_SUBST(LIBINTL)
- AC_SUBST(LTLIBINTL)
- AC_SUBST(POSUB)
-])
-
-
-dnl Checks for all prerequisites of the po subdirectory,
-dnl except for USE_NLS.
-AC_DEFUN([AM_PO_SUBDIRS],
-[
- AC_REQUIRE([AC_PROG_MAKE_SET])dnl
- AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_MKINSTALLDIRS])dnl
-
- dnl Perform the following tests also if --disable-nls has been given,
- dnl because they are needed for "make dist" to work.
-
- dnl Search for GNU msgfmt in the PATH.
- dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
- dnl The second test excludes FreeBSD msgfmt.
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
- (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
- :)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
- dnl Search for GNU xgettext 0.11 or newer in the PATH.
- dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
- dnl The second test excludes FreeBSD xgettext.
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
- (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
- :)
- dnl Remove leftover from FreeBSD xgettext call.
- rm -f messages.po
-
- dnl Search for GNU msgmerge 0.11 or newer in the PATH.
- AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
- [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
-
- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
- dnl Test whether we really found GNU msgfmt.
- if test "$GMSGFMT" != ":"; then
- dnl If it is no GNU msgfmt we define it as : so that the
- dnl Makefiles still can work.
- if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
- (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- : ;
- else
- GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
- AC_MSG_RESULT(
- [found $GMSGFMT program is not GNU msgfmt; ignore it])
- GMSGFMT=":"
- fi
- fi
-
- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is no GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
- (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext program is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- dnl Remove leftover from FreeBSD xgettext call.
- rm -f messages.po
- fi
-
- AC_OUTPUT_COMMANDS([
- for ac_file in $CONFIG_FILES; do
- # Support "outfile[:infile[:infile...]]"
- case "$ac_file" in
- *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- esac
- # PO directories have a Makefile.in generated from Makefile.in.in.
- case "$ac_file" in */Makefile.in)
- # Adjust a relative srcdir.
- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
- # In autoconf-2.13 it is called $ac_given_srcdir.
- # In autoconf-2.50 it is called $srcdir.
- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
- if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
- rm -f "$ac_dir/POTFILES"
- test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
- cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
- # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
- # on $ac_dir but don't depend on user-specified configuration
- # parameters.
- if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
- # The LINGUAS file contains the set of available languages.
- if test -n "$ALL_LINGUAS"; then
- test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
- fi
- ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- # Hide the ALL_LINGUAS assigment from automake.
- eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
- fi
- case "$ac_given_srcdir" in
- .) srcdirpre= ;;
- *) srcdirpre='$(srcdir)/' ;;
- esac
- POFILES=
- GMOFILES=
- UPDATEPOFILES=
- DUMMYPOFILES=
- for lang in $ALL_LINGUAS; do
- POFILES="$POFILES $srcdirpre$lang.po"
- GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
- UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
- DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
- done
- # CATALOGS depends on both $ac_dir and the user's LINGUAS
- # environment variable.
- INST_LINGUAS=
- if test -n "$ALL_LINGUAS"; then
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "$LINGUAS"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang"*) useit=yes;;
- esac
- done
- if test $useit = yes; then
- INST_LINGUAS="$INST_LINGUAS $presentlang"
- fi
- done
- fi
- CATALOGS=
- if test -n "$INST_LINGUAS"; then
- for lang in $INST_LINGUAS; do
- CATALOGS="$CATALOGS $lang.gmo"
- done
- fi
- test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
- sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
- for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
- if test -f "$f"; then
- case "$f" in
- *.orig | *.bak | *~) ;;
- *) cat "$f" >> "$ac_dir/Makefile" ;;
- esac
- fi
- done
- fi
- ;;
- esac
- done],
- [# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
- # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
- # from automake.
- eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
- # Capture the value of LINGUAS because we need it to compute CATALOGS.
- LINGUAS="${LINGUAS-%UNSET%}"
- ])
-])
-
-
-dnl Checks for all prerequisites of the intl subdirectory,
-dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
-dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
-AC_DEFUN([AM_INTL_SUBDIR],
-[
- AC_REQUIRE([AC_PROG_INSTALL])dnl
- AC_REQUIRE([AM_MKINSTALLDIRS])dnl
- AC_REQUIRE([AC_PROG_CC])dnl
- AC_REQUIRE([AC_CANONICAL_HOST])dnl
- AC_REQUIRE([AC_PROG_RANLIB])dnl
- AC_REQUIRE([AC_ISC_POSIX])dnl
- AC_REQUIRE([AC_HEADER_STDC])dnl
- AC_REQUIRE([AC_C_CONST])dnl
- AC_REQUIRE([AC_C_INLINE])dnl
- AC_REQUIRE([AC_TYPE_OFF_T])dnl
- AC_REQUIRE([AC_TYPE_SIZE_T])dnl
- AC_REQUIRE([AC_FUNC_ALLOCA])dnl
- AC_REQUIRE([AC_FUNC_MMAP])dnl
- AC_REQUIRE([jm_GLIBC21])dnl
-
- AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
-stdlib.h string.h unistd.h sys/param.h])
- AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
-geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
-strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
-
- AM_ICONV
- AM_LANGINFO_CODESET
- AM_LC_MESSAGES
-
- dnl intl/plural.c is generated from intl/plural.y. It requires bison,
- dnl because plural.y uses bison specific features. It requires at least
- dnl bison-1.26 because earlier versions generate a plural.c that doesn't
- dnl compile.
- dnl bison is only needed for the maintainer (who touches plural.y). But in
- dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
- dnl the rule in general Makefile. Now, some people carelessly touch the
- dnl files or have a broken "make" program, hence the plural.c rule will
- dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
- dnl present or too old.
- AC_CHECK_PROGS([INTLBISON], [bison])
- if test -z "$INTLBISON"; then
- ac_verc_fail=yes
- else
- dnl Found it, now check the version.
- AC_MSG_CHECKING([version of bison])
-changequote(<<,>>)dnl
- ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
-changequote([,])dnl
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
- esac
- AC_MSG_RESULT([$ac_prog_version])
- fi
- if test $ac_verc_fail = yes; then
- INTLBISON=:
- fi
-])
-
-
-AC_DEFUN([AM_MKINSTALLDIRS],
-[
- dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
- dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
- dnl Try to locate is.
- MKINSTALLDIRS=
- if test -n "$ac_aux_dir"; then
- MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
- fi
- if test -z "$MKINSTALLDIRS"; then
- MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
- fi
- AC_SUBST(MKINSTALLDIRS)
-])
diff --git a/config/glibc21.m4 b/config/glibc21.m4
deleted file mode 100644
index 9c9f3db..0000000
--- a/config/glibc21.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
-dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-# Test for the GNU C Library, version 2.1 or newer.
-# From Bruno Haible.
-
-AC_DEFUN([jm_GLIBC21],
- [
- AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
- ac_cv_gnu_library_2_1,
- [AC_EGREP_CPP([Lucky GNU user],
- [
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
- Lucky GNU user
- #endif
-#endif
- ],
- ac_cv_gnu_library_2_1=yes,
- ac_cv_gnu_library_2_1=no)
- ]
- )
- AC_SUBST(GLIBC21)
- GLIBC21="$ac_cv_gnu_library_2_1"
- ]
-)
diff --git a/config/iconv.m4 b/config/iconv.m4
deleted file mode 100644
index f81e8b9..0000000
--- a/config/iconv.m4
+++ /dev/null
@@ -1,96 +0,0 @@
-# iconv.m4 serial AM3 (gettext-0.11)
-dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-dnl From Bruno Haible.
-
-AC_DEFUN([AM_ICONV_LINK],
-[
- dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
- dnl those with the standalone portable GNU libiconv installed).
-
- dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
-
- dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([iconv])
-
- dnl Add $INCICONV to CPPFLAGS before performing the following checks,
- dnl because if the user has installed libiconv and not disabled its use
- dnl via --without-libiconv-prefix, he wants to use it. The first
- dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
- am_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
-
- AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
- am_cv_func_iconv="no, consider installing GNU libiconv"
- am_cv_lib_iconv=no
- AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- am_cv_func_iconv=yes)
- if test "$am_cv_func_iconv" != yes; then
- am_save_LIBS="$LIBS"
- LIBS="$LIBS $LIBICONV"
- AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
- [iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);],
- am_cv_lib_iconv=yes
- am_cv_func_iconv=yes)
- LIBS="$am_save_LIBS"
- fi
- ])
- if test "$am_cv_func_iconv" = yes; then
- AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
- fi
- if test "$am_cv_lib_iconv" = yes; then
- AC_MSG_CHECKING([how to link with libiconv])
- AC_MSG_RESULT([$LIBICONV])
- else
- dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
- dnl either.
- CPPFLAGS="$am_save_CPPFLAGS"
- LIBICONV=
- LTLIBICONV=
- fi
- AC_SUBST(LIBICONV)
- AC_SUBST(LTLIBICONV)
-])
-
-AC_DEFUN([AM_ICONV],
-[
- AC_REQUIRE([AM_ICONV_LINK])
- if test "$am_cv_func_iconv" = yes; then
- AC_MSG_CHECKING([for iconv declaration])
- AC_CACHE_VAL(am_cv_proto_iconv, [
- AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
- am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
- am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
- AC_MSG_RESULT([$]{ac_t:-
- }[$]am_cv_proto_iconv)
- AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
- [Define as const if the declaration of iconv() needs const.])
- fi
-])
diff --git a/config/install-sh b/config/install-sh
deleted file mode 100755
index b777f12..0000000
--- a/config/install-sh
+++ /dev/null
@@ -1,322 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2004-07-05.00
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch. It can only install one file at a time, a restriction
-# shared with many OS's install programs.
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-chmodcmd="$chmodprog 0755"
-chowncmd=
-chgrpcmd=
-stripcmd=
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=
-dst=
-dir_arg=
-dstarg=
-no_target_directory=
-
-usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
--c (ignored)
--d create directories instead of installing files.
--g GROUP $chgrpprog installed files to GROUP.
--m MODE $chmodprog installed files to MODE.
--o USER $chownprog installed files to USER.
--s $stripprog installed files.
--t DIRECTORY install into DIRECTORY.
--T report an error if DSTFILE is a directory.
---help display this help and exit.
---version display version info and exit.
-
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
-"
-
-while test -n "$1"; do
- case $1 in
- -c) shift
- continue;;
-
- -d) dir_arg=true
- shift
- continue;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift
- shift
- continue;;
-
- --help) echo "$usage"; exit 0;;
-
- -m) chmodcmd="$chmodprog $2"
- shift
- shift
- continue;;
-
- -o) chowncmd="$chownprog $2"
- shift
- shift
- continue;;
-
- -s) stripcmd=$stripprog
- shift
- continue;;
-
- -t) dstarg=$2
- shift
- shift
- continue;;
-
- -T) no_target_directory=true
- shift
- continue;;
-
- --version) echo "$0 $scriptversion"; exit 0;;
-
- *) # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- test -n "$dir_arg$dstarg" && break
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dstarg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dstarg"
- shift # fnord
- fi
- shift # arg
- dstarg=$arg
- done
- break;;
- esac
-done
-
-if test -z "$1"; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
- fi
- # It's OK to call `install-sh -d' without argument.
- # This can happen when creating conditional directories.
- exit 0
-fi
-
-for src
-do
- # Protect names starting with `-'.
- case $src in
- -*) src=./$src ;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- src=
-
- if test -d "$dst"; then
- mkdircmd=:
- chmodcmd=
- else
- mkdircmd=$mkdirprog
- fi
- else
- # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
- exit 1
- fi
-
- if test -z "$dstarg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- dst=$dstarg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst ;;
- esac
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dstarg: Is a directory" >&2
- exit 1
- fi
- dst=$dst/`basename "$src"`
- fi
- fi
-
- # This sed command emulates the dirname command.
- dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
- # Make sure that the destination directory exists.
-
- # Skip lots of stat calls in the usual case.
- if test ! -d "$dstdir"; then
- defaultIFS='
- '
- IFS="${IFS-$defaultIFS}"
-
- oIFS=$IFS
- # Some sh's can't handle IFS=/ for some reason.
- IFS='%'
- set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
- IFS=$oIFS
-
- pathcomp=
-
- while test $# -ne 0 ; do
- pathcomp=$pathcomp$1
- shift
- if test ! -d "$pathcomp"; then
- $mkdirprog "$pathcomp"
- # mkdir can fail with a `File exist' error in case several
- # install-sh are creating the directory concurrently. This
- # is OK.
- test -d "$pathcomp" || exit
- fi
- pathcomp=$pathcomp/
- done
- fi
-
- if test -n "$dir_arg"; then
- $doit $mkdircmd "$dst" \
- && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
- else
- dstfile=`basename "$dst"`
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
- # Trap to clean up those temp files at exit.
- trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
- trap '(exit $?); exit' 1 2 13 15
-
- # Copy the file name to the temp name.
- $doit $cpprog "$src" "$dsttmp" &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
- # If any of these fail, we abort the whole thing. If we want to
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $cpprog $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
- # Now rename the file to the real destination.
- { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
- || {
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
-
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- if test -f "$dstdir/$dstfile"; then
- $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
- || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
- || {
- echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
- (exit 1); exit
- }
- else
- :
- fi
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
- }
- }
- fi || { (exit 1); exit; }
-done
-
-# The final little trick to "correctly" pass the exit status to the exit trap.
-{
- (exit 0); exit
-}
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
-# End:
diff --git a/config/lcmessage.m4 b/config/lcmessage.m4
deleted file mode 100644
index ffbf915..0000000
--- a/config/lcmessage.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-# lcmessage.m4 serial 2 (gettext-0.10.40)
-dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
-
-# Check whether LC_MESSAGES is available in <locale.h>.
-
-AC_DEFUN([AM_LC_MESSAGES],
- [if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your <locale.h> file defines LC_MESSAGES.])
- fi
- fi])
diff --git a/config/progtest.m4 b/config/progtest.m4
deleted file mode 100644
index 443c8e3..0000000
--- a/config/progtest.m4
+++ /dev/null
@@ -1,59 +0,0 @@
-# progtest.m4 serial 2 (gettext-0.10.40)
-dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
-
-dnl Authors:
-dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
-
-# Search path for a program which passes the given test.
-
-dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-AC_DEFUN([AM_PATH_PROG_WITH_TEST],
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
- /*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
- ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
- AC_MSG_RESULT([$]$1)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
diff --git a/config/stdbool.m4 b/config/stdbool.m4
deleted file mode 100644
index 11804fe..0000000
--- a/config/stdbool.m4
+++ /dev/null
@@ -1,66 +0,0 @@
-# Check for stdbool.h that conforms to C99.
-
-# Copyright (C) 2002-2003 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-# This macro is only needed in autoconf <= 2.54. Newer versions of autoconf
-# have this macro built-in.
-
-AC_DEFUN([AC_HEADER_STDBOOL],
- [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
- [ac_cv_header_stdbool_h],
- [AC_TRY_COMPILE(
- [
- #include <stdbool.h>
- #ifndef bool
- "error: bool is not defined"
- #endif
- #ifndef false
- "error: false is not defined"
- #endif
- #if false
- "error: false is not 0"
- #endif
- #ifndef true
- "error: false is not defined"
- #endif
- #if true != 1
- "error: true is not 1"
- #endif
- #ifndef __bool_true_false_are_defined
- "error: __bool_true_false_are_defined is not defined"
- #endif
-
- struct s { _Bool s: 1; _Bool t; } s;
-
- char a[true == 1 ? 1 : -1];
- char b[false == 0 ? 1 : -1];
- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
- char d[(bool) -0.5 == true ? 1 : -1];
- bool e = &s;
- char f[(_Bool) -0.0 == false ? 1 : -1];
- char g[true];
- char h[sizeof (_Bool)];
- char i[sizeof s.t];
- ],
- [ return !a + !b + !c + !d + !e + !f + !g + !h + !i; ],
- [ac_cv_header_stdbool_h=yes],
- [ac_cv_header_stdbool_h=no])])
- AC_CHECK_TYPES([_Bool])
- if test $ac_cv_header_stdbool_h = yes; then
- AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
- fi])
diff --git a/config/strverscmp.m4 b/config/strverscmp.m4
deleted file mode 100644
index bb82336..0000000
--- a/config/strverscmp.m4
+++ /dev/null
@@ -1,24 +0,0 @@
-# strverscmp.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-AC_DEFUN([gl_FUNC_STRVERSCMP],
-[
- dnl Persuade glibc <string.h> to declare strverscmp().
- AC_REQUIRE([AC_GNU_SOURCE])
-
- AC_REPLACE_FUNCS(strverscmp)
- if test $ac_cv_func_strverscmp = no; then
- gl_PREREQ_STRVERSCMP
- fi
-])
-
-# Prerequisites of lib/strverscmp.c.
-AC_DEFUN([gl_PREREQ_STRVERSCMP], [
- :
-])
-
diff --git a/config_h.in b/config_h.in
index bd90836..fc1d096 100644
--- a/config_h.in
+++ b/config_h.in
@@ -1,5 +1,24 @@
/* config_h.in. Generated from configure.ac by autoheader. */
+/* Define if the compiler is building for multiple architectures of Apple
+ platforms at once. */
+#undef AA_APPLE_UNIVERSAL_BUILD
+
+/* Define to the number of bits in type 'ptrdiff_t'. */
+#undef BITSIZEOF_PTRDIFF_T
+
+/* Define to the number of bits in type 'sig_atomic_t'. */
+#undef BITSIZEOF_SIG_ATOMIC_T
+
+/* Define to the number of bits in type 'size_t'. */
+#undef BITSIZEOF_SIZE_T
+
+/* Define to the number of bits in type 'wchar_t'. */
+#undef BITSIZEOF_WCHAR_T
+
+/* Define to the number of bits in type 'wint_t'. */
+#undef BITSIZEOF_WINT_T
+
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
@@ -8,20 +27,92 @@
/* Define to 1 if using `alloca.c'. */
#undef C_ALLOCA
+/* Follow symlinks when processing in place */
+#undef ENABLE_FOLLOW_SYMLINKS
+
/* Define to 1 if translation of program messages to the user's native
language is requested. */
#undef ENABLE_NLS
-/* Define to 1 if you have `alloca', as a function or macro. */
+/* Define if gettimeofday clobbers the localtime buffer. */
+#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME
+
+/* Define to indicate the 'malloc' module. */
+#undef GNULIB_MALLOC_GNU
+
+/* Define to 1 if you have the `acl' function. */
+#undef HAVE_ACL
+
+/* Define to 1 if you have the `aclx_get' function. */
+#undef HAVE_ACLX_GET
+
+/* Define to 1 if you have the `acl_copy_ext_native' function. */
+#undef HAVE_ACL_COPY_EXT_NATIVE
+
+/* Define to 1 if you have the `acl_create_entry_np' function. */
+#undef HAVE_ACL_CREATE_ENTRY_NP
+
+/* Define to 1 if you have the `acl_delete_def_file' function. */
+#undef HAVE_ACL_DELETE_DEF_FILE
+
+/* Define to 1 if you have the `acl_delete_fd_np' function. */
+#undef HAVE_ACL_DELETE_FD_NP
+
+/* Define to 1 if you have the `acl_delete_file_np' function. */
+#undef HAVE_ACL_DELETE_FILE_NP
+
+/* Define to 1 if you have the `acl_entries' function. */
+#undef HAVE_ACL_ENTRIES
+
+/* Define to 1 if you have the `acl_extended_file' function. */
+#undef HAVE_ACL_EXTENDED_FILE
+
+/* Define to 1 if the constant ACL_FIRST_ENTRY exists. */
+#undef HAVE_ACL_FIRST_ENTRY
+
+/* Define to 1 if you have the `acl_free' function. */
+#undef HAVE_ACL_FREE
+
+/* Define to 1 if you have the `acl_free_text' function. */
+#undef HAVE_ACL_FREE_TEXT
+
+/* Define to 1 if you have the `acl_from_mode' function. */
+#undef HAVE_ACL_FROM_MODE
+
+/* Define to 1 if you have the `acl_from_text' function. */
+#undef HAVE_ACL_FROM_TEXT
+
+/* Define to 1 if you have the `acl_get_fd' function. */
+#undef HAVE_ACL_GET_FD
+
+/* Define to 1 if you have the `acl_get_file' function. */
+#undef HAVE_ACL_GET_FILE
+
+/* Define to 1 if you have the <acl/libacl.h> header file. */
+#undef HAVE_ACL_LIBACL_H
+
+/* Define to 1 if you have the `acl_set_fd' function. */
+#undef HAVE_ACL_SET_FD
+
+/* Define to 1 if you have the `acl_set_file' function. */
+#undef HAVE_ACL_SET_FILE
+
+/* Define to 1 if you have the `acl_to_short_text' function. */
+#undef HAVE_ACL_TO_SHORT_TEXT
+
+/* Define to 1 if you have the `acl_trivial' function. */
+#undef HAVE_ACL_TRIVIAL
+
+/* Define to 1 if the ACL type ACL_TYPE_EXTENDED exists. */
+#undef HAVE_ACL_TYPE_EXTENDED
+
+/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
+ may be supplied by this distribution. */
#undef HAVE_ALLOCA
-/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
- */
+/* Define to 1 if you have the <alloca.h> header file. */
#undef HAVE_ALLOCA_H
-/* Define to 1 if you have the <argz.h> header file. */
-#undef HAVE_ARGZ_H
-
/* Define to 1 if you have the `bcopy' function. */
#undef HAVE_BCOPY
@@ -31,10 +122,98 @@
/* Define to 1 if you have the `bzero' function. */
#undef HAVE_BZERO
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+ CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+ the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
#undef HAVE_DCGETTEXT
+/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_CLEARERR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+ don't. */
+#undef HAVE_DECL_FEOF_UNLOCKED
+
+/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FERROR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FFLUSH_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FGETS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FPUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FPUTS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FREAD_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FWRITE_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_GETCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+ don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getdelim', and to 0 if you
+ don't. */
+#undef HAVE_DECL_GETDELIM
+
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+ */
+#undef HAVE_DECL_GETENV
+
+/* Define to 1 if you have the declaration of `getline', and to 0 if you
+ don't. */
+#undef HAVE_DECL_GETLINE
+
+/* Define to 1 if you have the declaration of `isblank', and to 0 if you
+ don't. */
+#undef HAVE_DECL_ISBLANK
+
+/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_PUTCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
+ don't. */
+#undef HAVE_DECL_PUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `strerror', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRERROR
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRERROR_R
+
+/* Define to 1 if you have the declaration of `wctob', and to 0 if you don't.
+ */
+#undef HAVE_DECL_WCTOB
+
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#undef HAVE_DIRENT_H
@@ -51,39 +230,38 @@
/* Define to 1 if you have the `fchown' function. */
#undef HAVE_FCHOWN
-/* Define to 1 if you have the `feof_unlocked' function. */
-#undef HAVE_FEOF_UNLOCKED
+/* Define to 1 if you have the `flockfile' function. */
+#undef HAVE_FLOCKFILE
-/* Define to 1 if you have the `fgets_unlocked' function. */
-#undef HAVE_FGETS_UNLOCKED
+/* Define to 1 if you have the `funlockfile' function. */
+#undef HAVE_FUNLOCKFILE
-/* Define to 1 if you have the `getcwd' function. */
-#undef HAVE_GETCWD
+/* Define to 1 if you have the `getacl' function. */
+#undef HAVE_GETACL
-/* Define to 1 if you have the `getc_unlocked' function. */
-#undef HAVE_GETC_UNLOCKED
+/* Define to 1 if you have the `getdelim' function. */
+#undef HAVE_GETDELIM
-/* Define to 1 if you have the `getegid' function. */
-#undef HAVE_GETEGID
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
-/* Define to 1 if you have the `geteuid' function. */
-#undef HAVE_GETEUID
-
-/* Define to 1 if you have the `getgid' function. */
-#undef HAVE_GETGID
-
-/* Define to 1 if you have the `getpagesize' function. */
-#undef HAVE_GETPAGESIZE
+/* Define to 1 if you have the `getopt_long_only' function. */
+#undef HAVE_GETOPT_LONG_ONLY
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
-/* Define to 1 if you have the `getuid' function. */
-#undef HAVE_GETUID
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
-/* Define if you have the iconv() function. */
+/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
+/* Define to 1 if the compiler supports one of the keywords 'inline',
+ '__inline__', '__inline' and effectively inlines functions marked as such.
+ */
+#undef HAVE_INLINE
+
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
@@ -99,14 +277,17 @@
/* Define to 1 if you have the `isblank' function. */
#undef HAVE_ISBLANK
+/* Define to 1 if you have the `iswcntrl' function. */
+#undef HAVE_ISWCNTRL
+
+/* Define to 1 if you have the `iswctype' function. */
+#undef HAVE_ISWCTYPE
+
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
-/* Define if your <locale.h> file defines LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
-
-/* Define to 1 if you have the `regex' library (-lregex). */
-#undef HAVE_LIBREGEX
+/* Define to 1 if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
@@ -117,54 +298,46 @@
/* Define to 1 if you support file names longer than 14 characters. */
#undef HAVE_LONG_FILE_NAMES
-/* Define to 1 if you have the <malloc.h> header file. */
-#undef HAVE_MALLOC_H
+/* Define to 1 if the system has the type `long long int'. */
+#undef HAVE_LONG_LONG_INT
+
+/* Define to 1 if you have the `lstat' function. */
+#undef HAVE_LSTAT
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+ to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define if the 'malloc' function is POSIX compliant. */
+#undef HAVE_MALLOC_POSIX
-/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
+/* Define to 1 if you have the `mbrlen' function. */
+#undef HAVE_MBRLEN
+
+/* Define to 1 if you have the `mbrtowc' function. */
#undef HAVE_MBRTOWC
+/* Define to 1 if you have the `mbsinit' function. */
+#undef HAVE_MBSINIT
+
/* Define to 1 if <wchar.h> declares mbstate_t. */
#undef HAVE_MBSTATE_T
/* Define to 1 if you have the <mcheck.h> header file. */
#undef HAVE_MCHECK_H
-/* Define to 1 if you have the `memchr' function. */
-#undef HAVE_MEMCHR
-
-/* Define to 1 if you have the `memcmp' function. */
-#undef HAVE_MEMCMP
-
/* Define to 1 if you have the `memcpy' function. */
#undef HAVE_MEMCPY
-/* Define to 1 if you have the `memmove' function. */
-#undef HAVE_MEMMOVE
-
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
-/* Define to 1 if you have the `mempcpy' function. */
-#undef HAVE_MEMPCPY
-
/* Define to 1 if you have the `memset' function. */
#undef HAVE_MEMSET
-/* Define to 1 if you have the `mkstemp' function. */
-#undef HAVE_MKSTEMP
-
-/* Define to 1 if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
-/* Define to 1 if you have the `munmap' function. */
-#undef HAVE_MUNMAP
-
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
-/* Define to 1 if you have the <nl_types.h> header file. */
-#undef HAVE_NL_TYPES_H
-
/* Define to 1 if libc includes obstacks. */
#undef HAVE_OBSTACK
@@ -174,18 +347,27 @@
/* Define to 1 if you have the `popen' function. */
#undef HAVE_POPEN
-/* Define to 1 if you have the `putenv' function. */
-#undef HAVE_PUTENV
-
-/* Define to 1 if you have the <regex.h> header file. */
-#undef HAVE_REGEX_H
+/* Define to 1 if you have the <random.h> header file. */
+#undef HAVE_RANDOM_H
-/* Define to 1 if you have the `setenv' function. */
-#undef HAVE_SETENV
+/* Define if the 'realloc' function is POSIX compliant. */
+#undef HAVE_REALLOC_POSIX
/* Define to 1 if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
+/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
+#undef HAVE_SIGNED_SIG_ATOMIC_T
+
+/* Define to 1 if 'wchar_t' is a signed integer type. */
+#undef HAVE_SIGNED_WCHAR_T
+
+/* Define to 1 if 'wint_t' is a signed integer type. */
+#undef HAVE_SIGNED_WINT_T
+
+/* Define to 1 if you have the `statacl' function. */
+#undef HAVE_STATACL
+
/* Define to 1 if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
@@ -198,23 +380,17 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
-/* Define to 1 if you have the `stpcpy' function. */
-#undef HAVE_STPCPY
-
-/* Define to 1 if you have the `strcasecmp' function. */
-#undef HAVE_STRCASECMP
-
/* Define to 1 if you have the `strchr' function. */
#undef HAVE_STRCHR
-/* Define to 1 if you have the `strdup' function. */
-#undef HAVE_STRDUP
-
-/* Define to 1 if you have the `strerror' function. */
-#undef HAVE_STRERROR
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
@@ -225,9 +401,18 @@
/* Define to 1 if you have the `strtoul' function. */
#undef HAVE_STRTOUL
+/* Define to 1 if the system has the type `struct random_data'. */
+#undef HAVE_STRUCT_RANDOM_DATA
+
/* Define to 1 if you have the `strverscmp' function. */
#undef HAVE_STRVERSCMP
+/* Define to 1 if you have the <sys/acl.h> header file. */
+#undef HAVE_SYS_ACL_H
+
+/* Define to 1 if you have the <sys/bitypes.h> header file. */
+#undef HAVE_SYS_BITYPES_H
+
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H
@@ -235,6 +420,9 @@
/* Define to 1 if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
+/* Define to 1 if you have the <sys/inttypes.h> header file. */
+#undef HAVE_SYS_INTTYPES_H
+
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_NDIR_H
@@ -242,18 +430,27 @@
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#undef HAVE_SYS_TIMEB_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
-/* Define to 1 if you have the `tsearch' function. */
-#undef HAVE_TSEARCH
-
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#undef HAVE_UNSIGNED_LONG_LONG_INT
+
/* Define to 1 if you have the `vprintf' function. */
#undef HAVE_VPRINTF
@@ -266,23 +463,36 @@
/* Define to 1 if you have the `wcscoll' function. */
#undef HAVE_WCSCOLL
+/* Define to 1 if you have the `wctob' function. */
+#undef HAVE_WCTOB
+
/* Define to 1 if you have the <wctype.h> header file. */
#undef HAVE_WCTYPE_H
+/* Define to 1 if you have the <winsock2.h> header file. */
+#undef HAVE_WINSOCK2_H
+
+/* Define if you have the 'wint_t' type. */
+#undef HAVE_WINT_T
+
/* Define to 1 if the system has the type `_Bool'. */
#undef HAVE__BOOL
-/* Define to 1 if you have the `__argz_count' function. */
-#undef HAVE___ARGZ_COUNT
+/* Define to 1 if you have the `_ftime' function. */
+#undef HAVE__FTIME
-/* Define to 1 if you have the `__argz_next' function. */
-#undef HAVE___ARGZ_NEXT
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+ slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
-/* Define to 1 if you have the `__argz_stringify' function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define if the mbrtowc function has the NULL string argument bug. */
+#undef MBRTOWC_NULL_ARG_BUG
-/* Define as const if the declaration of iconv() needs const. */
-#undef ICONV_CONST
+/* Define if the mbrtowc function does not return 0 for a NUL character. */
+#undef MBRTOWC_NUL_RETVAL_BUG
+
+/* Define if the mbrtowc function returns a wrong return value. */
+#undef MBRTOWC_RETVAL_BUG
/* Name of package */
#undef PACKAGE
@@ -302,30 +512,60 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'ptrdiff_t'. */
+#undef PTRDIFF_T_SUFFIX
+
+/* Define this to 1 if strerror is broken. */
+#undef REPLACE_STRERROR
+
/* Define to the version of GNU sed whose features are supported by this sed.
*/
#undef SED_FEATURE_VERSION
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'sig_atomic_t'. */
+#undef SIG_ATOMIC_T_SUFFIX
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'size_t'. */
+#undef SIZE_T_SUFFIX
+
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
- automatically deduced at run-time.
+ automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
#undef STACK_DIRECTION
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#undef STAT_MACROS_BROKEN
+
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Define to 1 if strerror_r returns char *. */
+#undef STRERROR_R_CHAR_P
+
+/* Define to nonzero if you want access control list support. */
+#undef USE_ACL
+
+/* Define to 1 if you want getc etc. to use unlocked I/O if available.
+ Unlocked I/O can improve performance in unithreaded apps, but it is not
+ safe for multithreaded apps. */
+#undef USE_UNLOCKED_IO
+
/* Version number of package */
#undef VERSION
-/* Define to 1 if on AIX 3.
- System headers sometimes define this.
- We just want to avoid a redefinition error message. */
-#ifndef _ALL_SOURCE
-# undef _ALL_SOURCE
-#endif
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'wchar_t'. */
+#undef WCHAR_T_SUFFIX
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'wint_t'. */
+#undef WINT_T_SUFFIX
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
@@ -348,26 +588,145 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
+/* Define if you want regoff_t to be at least as wide POSIX requires. */
+#undef _REGEX_LARGE_OFFSETS
+
/* Include BSD functions in regex, used by the testsuite */
#undef _REGEX_RE_COMP
+/* Define to 500 only on HP-UX. */
+#undef _XOPEN_SOURCE
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define to rpl_ if the getopt replacement functions and variables should be
+ used. */
+#undef __GETOPT_PREFIX
+
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
+/* Define to rpl_gmtime if the replacement function should be used. */
+#undef gmtime
+
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
#undef inline
#endif
+/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+ __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE_CC__ tests for the Apple compiler and its version.
+ __STDC_VERSION__ tests for the C99 mode. */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif
+
+/* Define to rpl_localtime if the replacement function should be used. */
+#undef localtime
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
/* Define to a type if <wchar.h> does not define. */
#undef mbstate_t
-/* Define to `long' if <sys/types.h> does not define. */
-#undef off_t
+/* Define to the type of st_nlink in struct stat, or a supertype. */
+#undef nlink_t
+
+/* Define to rpl_re_comp if the replacement should be used. */
+#undef re_comp
+
+/* Define to rpl_re_compile_fastmap if the replacement should be used. */
+#undef re_compile_fastmap
-/* Define to `unsigned' if <sys/types.h> does not define. */
+/* Define to rpl_re_compile_pattern if the replacement should be used. */
+#undef re_compile_pattern
+
+/* Define to rpl_re_exec if the replacement should be used. */
+#undef re_exec
+
+/* Define to rpl_re_match if the replacement should be used. */
+#undef re_match
+
+/* Define to rpl_re_match_2 if the replacement should be used. */
+#undef re_match_2
+
+/* Define to rpl_re_search if the replacement should be used. */
+#undef re_search
+
+/* Define to rpl_re_search_2 if the replacement should be used. */
+#undef re_search_2
+
+/* Define to rpl_re_set_registers if the replacement should be used. */
+#undef re_set_registers
+
+/* Define to rpl_re_set_syntax if the replacement should be used. */
+#undef re_set_syntax
+
+/* Define to rpl_re_syntax_options if the replacement should be used. */
+#undef re_syntax_options
+
+/* Define to rpl_regcomp if the replacement should be used. */
+#undef regcomp
+
+/* Define to rpl_regerror if the replacement should be used. */
+#undef regerror
+
+/* Define to rpl_regexec if the replacement should be used. */
+#undef regexec
+
+/* Define to rpl_regfree if the replacement should be used. */
+#undef regfree
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+ nothing if this is not supported. Do not define if restrict is
+ supported directly. */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict, even
+ though the corresponding Sun C compiler does, which causes
+ "#define restrict _Restrict" in the previous line. Perhaps some future
+ version of Sun C++ will work with _Restrict; if so, it'll probably
+ define __RESTRICT, just as Sun C does. */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+#endif
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Define to `int' if <sys/types.h> does not define. */
#undef ssize_t
+
+/* Define as a marker that can be attached to function parameter declarations
+ for parameters that are not used. This helps to reduce warnings, such as
+ from GCC -Wunused-parameter. */
+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _UNUSED_PARAMETER_ __attribute__ ((__unused__))
+#else
+# define _UNUSED_PARAMETER_
+#endif
+
diff --git a/configure b/configure
index 0b01618..d58c407 100755
--- a/configure
+++ b/configure
@@ -1,27 +1,56 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for sed 4.1.5.
+# Generated by GNU Autoconf 2.61 for sed 4.2.
#
-# Report bugs to <bonzini@gnu.org>.
+# Report bugs to <bug-gnu-utils@gnu.org>.
#
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
fi
-DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
@@ -31,8 +60,43 @@ else
fi
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
PS1='$ '
PS2='> '
PS4='+ '
@@ -46,18 +110,19 @@ do
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
- $as_unset $as_var
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
fi
done
# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
@@ -65,157 +130,388 @@ fi
# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+# CDPATH.
+$as_unset CDPATH
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
fi
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
+ case $as_dir in
/*)
- if ("$as_dir/$as_base" -c '
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
as_lineno_1=$LINENO
as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
+ s/-\n.*//
' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
+ chmod +x "$as_me.lineno" ||
{ echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
@@ -224,7 +520,28 @@ else
as_mkdir_p=false
fi
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -233,86 +550,518 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
+exec 7<&0 </dev/null 6>&1
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
-exec 6>&1
-
#
# Initializations.
#
ac_default_prefix=/usr/local
+ac_clean_files=
ac_config_libobj_dir=.
+LIBOBJS=
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete. It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
# Identity of this package.
PACKAGE_NAME='sed'
PACKAGE_TARNAME='sed'
-PACKAGE_VERSION='4.1.5'
-PACKAGE_STRING='sed 4.1.5'
-PACKAGE_BUGREPORT='bonzini@gnu.org'
+PACKAGE_VERSION='4.2'
+PACKAGE_STRING='sed 4.2'
+PACKAGE_BUGREPORT='bug-gnu-utils@gnu.org'
ac_unique_file="sed/sed.c"
# Factoring default headers for most tests.
ac_includes_default="\
#include <stdio.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
# include <strings.h>
#endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
#endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar SED_FEATURE_VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB CPP EGREP HAVE__BOOL ALLOCA LIBOBJS TEST_REGEX_TRUE TEST_REGEX_FALSE BUILD_HTML_TRUE BUILD_HTML_FALSE TEXI2HTML MAKEINFO_HTML_TRUE MAKEINFO_HTML_FALSE TEXI2HTML_HTML_TRUE TEXI2HTML_HTML_FALSE MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE build build_cpu build_vendor build_os host host_cpu host_vendor host_os GLIBC21 LIBICONV LTLIBICONV INTLBISON USE_NLS BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT INTLOBJS DATADIRNAME INSTOBJEXT GENCAT INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB LTLIBOBJS'
+ac_func_list=
+ac_header_list=
+gt_needs=
+ac_subst_vars='SHELL
+PATH_SEPARATOR
+PACKAGE_NAME
+PACKAGE_TARNAME
+PACKAGE_VERSION
+PACKAGE_STRING
+PACKAGE_BUGREPORT
+exec_prefix
+prefix
+program_transform_name
+bindir
+sbindir
+libexecdir
+datarootdir
+datadir
+sysconfdir
+sharedstatedir
+localstatedir
+includedir
+oldincludedir
+docdir
+infodir
+htmldir
+dvidir
+pdfdir
+psdir
+libdir
+localedir
+mandir
+DEFS
+ECHO_C
+ECHO_N
+ECHO_T
+LIBS
+build_alias
+host_alias
+target_alias
+INSTALL_PROGRAM
+INSTALL_SCRIPT
+INSTALL_DATA
+am__isrc
+CYGPATH_W
+PACKAGE
+VERSION
+ACLOCAL
+AUTOCONF
+AUTOMAKE
+AUTOHEADER
+MAKEINFO
+install_sh
+STRIP
+INSTALL_STRIP_PROGRAM
+mkdir_p
+AWK
+SET_MAKE
+am__leading_dot
+AMTAR
+am__tar
+am__untar
+SED_FEATURE_VERSION
+CC
+CFLAGS
+LDFLAGS
+CPPFLAGS
+ac_ct_CC
+EXEEXT
+OBJEXT
+DEPDIR
+am__include
+am__quote
+AMDEP_TRUE
+AMDEP_FALSE
+AMDEPBACKSLASH
+CCDEPMODE
+am__fastdepCC_TRUE
+am__fastdepCC_FALSE
+RANLIB
+build
+build_cpu
+build_vendor
+build_os
+host
+host_cpu
+host_vendor
+host_os
+CPP
+GREP
+EGREP
+GL_COND_LIBTOOL_TRUE
+GL_COND_LIBTOOL_FALSE
+LIB_ACL
+USE_ACL
+ALLOCA
+ALLOCA_H
+GNULIB_BTOWC
+GNULIB_WCTOB
+GNULIB_MBSINIT
+GNULIB_MBRTOWC
+GNULIB_MBRLEN
+GNULIB_MBSRTOWCS
+GNULIB_MBSNRTOWCS
+GNULIB_WCRTOMB
+GNULIB_WCSRTOMBS
+GNULIB_WCSNRTOMBS
+GNULIB_WCWIDTH
+HAVE_BTOWC
+HAVE_MBSINIT
+HAVE_MBRTOWC
+HAVE_MBRLEN
+HAVE_MBSRTOWCS
+HAVE_MBSNRTOWCS
+HAVE_WCRTOMB
+HAVE_WCSRTOMBS
+HAVE_WCSNRTOMBS
+HAVE_DECL_WCTOB
+HAVE_DECL_WCWIDTH
+REPLACE_MBSTATE_T
+REPLACE_BTOWC
+REPLACE_WCTOB
+REPLACE_MBSINIT
+REPLACE_MBRTOWC
+REPLACE_MBRLEN
+REPLACE_MBSRTOWCS
+REPLACE_MBSNRTOWCS
+REPLACE_WCRTOMB
+REPLACE_WCSRTOMBS
+REPLACE_WCWIDTH
+WCHAR_H
+LOCALE_FR
+INCLUDE_NEXT
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE
+PRAGMA_SYSTEM_HEADER
+NEXT_ERRNO_H
+ERRNO_H
+EMULTIHOP_HIDDEN
+EMULTIHOP_VALUE
+ENOLINK_HIDDEN
+ENOLINK_VALUE
+EOVERFLOW_HIDDEN
+EOVERFLOW_VALUE
+GNULIB_FPRINTF
+GNULIB_FPRINTF_POSIX
+GNULIB_PRINTF
+GNULIB_PRINTF_POSIX
+GNULIB_SNPRINTF
+GNULIB_SPRINTF_POSIX
+GNULIB_VFPRINTF
+GNULIB_VFPRINTF_POSIX
+GNULIB_VPRINTF
+GNULIB_VPRINTF_POSIX
+GNULIB_VSNPRINTF
+GNULIB_VSPRINTF_POSIX
+GNULIB_DPRINTF
+GNULIB_VDPRINTF
+GNULIB_VASPRINTF
+GNULIB_OBSTACK_PRINTF
+GNULIB_OBSTACK_PRINTF_POSIX
+GNULIB_FOPEN
+GNULIB_FREOPEN
+GNULIB_FSEEK
+GNULIB_FSEEKO
+GNULIB_FTELL
+GNULIB_FTELLO
+GNULIB_FFLUSH
+GNULIB_FCLOSE
+GNULIB_FPUTC
+GNULIB_PUTC
+GNULIB_PUTCHAR
+GNULIB_FPUTS
+GNULIB_PUTS
+GNULIB_FWRITE
+GNULIB_GETDELIM
+GNULIB_GETLINE
+GNULIB_PERROR
+GNULIB_STDIO_H_SIGPIPE
+REPLACE_STDIO_WRITE_FUNCS
+REPLACE_FPRINTF
+REPLACE_VFPRINTF
+REPLACE_PRINTF
+REPLACE_VPRINTF
+REPLACE_SNPRINTF
+HAVE_DECL_SNPRINTF
+REPLACE_VSNPRINTF
+HAVE_DECL_VSNPRINTF
+REPLACE_SPRINTF
+REPLACE_VSPRINTF
+HAVE_DPRINTF
+REPLACE_DPRINTF
+HAVE_VDPRINTF
+REPLACE_VDPRINTF
+HAVE_VASPRINTF
+REPLACE_VASPRINTF
+HAVE_DECL_OBSTACK_PRINTF
+REPLACE_OBSTACK_PRINTF
+REPLACE_FOPEN
+REPLACE_FREOPEN
+HAVE_FSEEKO
+REPLACE_FSEEKO
+REPLACE_FSEEK
+HAVE_FTELLO
+REPLACE_FTELLO
+REPLACE_FTELL
+REPLACE_FFLUSH
+REPLACE_FCLOSE
+HAVE_DECL_GETDELIM
+HAVE_DECL_GETLINE
+REPLACE_GETLINE
+REPLACE_PERROR
+GETOPT_H
+LIBINTL
+LTLIBINTL
+NEXT_SYS_TIME_H
+HAVE_SYS_TIME_H
+HAVE_STRUCT_TIMEVAL
+REPLACE_GETTIMEOFDAY
+SYS_TIME_H
+GLIBC21
+LOCALCHARSET_TESTS_ENVIRONMENT
+GNULIB_LCHMOD
+GNULIB_LSTAT
+HAVE_LCHMOD
+REPLACE_LSTAT
+REPLACE_MKDIR
+HAVE_MALLOC_POSIX
+GNULIB_MALLOC_POSIX
+GNULIB_REALLOC_POSIX
+GNULIB_CALLOC_POSIX
+GNULIB_ATOLL
+GNULIB_GETLOADAVG
+GNULIB_GETSUBOPT
+GNULIB_MKDTEMP
+GNULIB_MKSTEMP
+GNULIB_PUTENV
+GNULIB_RANDOM_R
+GNULIB_RPMATCH
+GNULIB_SETENV
+GNULIB_STRTOD
+GNULIB_STRTOLL
+GNULIB_STRTOULL
+GNULIB_UNSETENV
+HAVE_ATOLL
+HAVE_CALLOC_POSIX
+HAVE_GETSUBOPT
+HAVE_MKDTEMP
+HAVE_REALLOC_POSIX
+HAVE_RANDOM_R
+HAVE_RPMATCH
+HAVE_SETENV
+HAVE_STRTOD
+HAVE_STRTOLL
+HAVE_STRTOULL
+HAVE_STRUCT_RANDOM_DATA
+HAVE_SYS_LOADAVG_H
+HAVE_UNSETENV
+HAVE_DECL_GETLOADAVG
+REPLACE_MKSTEMP
+REPLACE_PUTENV
+REPLACE_STRTOD
+VOID_UNSETENV
+LOCALE_JA
+LOCALE_ZH_CN
+LOCALE_FR_UTF8
+APPLE_UNIVERSAL_BUILD
+STDBOOL_H
+HAVE__BOOL
+HAVE_LONG_LONG_INT
+HAVE_UNSIGNED_LONG_LONG_INT
+HAVE_INTTYPES_H
+HAVE_SYS_TYPES_H
+NEXT_STDINT_H
+HAVE_STDINT_H
+HAVE_SYS_INTTYPES_H
+HAVE_SYS_BITYPES_H
+BITSIZEOF_PTRDIFF_T
+BITSIZEOF_SIZE_T
+BITSIZEOF_SIG_ATOMIC_T
+BITSIZEOF_WCHAR_T
+BITSIZEOF_WINT_T
+HAVE_SIGNED_SIG_ATOMIC_T
+HAVE_SIGNED_WCHAR_T
+HAVE_SIGNED_WINT_T
+PTRDIFF_T_SUFFIX
+SIZE_T_SUFFIX
+SIG_ATOMIC_T_SUFFIX
+WCHAR_T_SUFFIX
+WINT_T_SUFFIX
+STDINT_H
+NEXT_STDIO_H
+NEXT_STDLIB_H
+HAVE_RANDOM_H
+GNULIB_MEMMEM
+GNULIB_MEMPCPY
+GNULIB_MEMRCHR
+GNULIB_RAWMEMCHR
+GNULIB_STPCPY
+GNULIB_STPNCPY
+GNULIB_STRCHRNUL
+GNULIB_STRDUP
+GNULIB_STRNDUP
+GNULIB_STRNLEN
+GNULIB_STRPBRK
+GNULIB_STRSEP
+GNULIB_STRSTR
+GNULIB_STRCASESTR
+GNULIB_STRTOK_R
+GNULIB_MBSLEN
+GNULIB_MBSNLEN
+GNULIB_MBSCHR
+GNULIB_MBSRCHR
+GNULIB_MBSSTR
+GNULIB_MBSCASECMP
+GNULIB_MBSNCASECMP
+GNULIB_MBSPCASECMP
+GNULIB_MBSCASESTR
+GNULIB_MBSCSPN
+GNULIB_MBSPBRK
+GNULIB_MBSSPN
+GNULIB_MBSSEP
+GNULIB_MBSTOK_R
+GNULIB_STRERROR
+GNULIB_STRSIGNAL
+GNULIB_STRVERSCMP
+HAVE_DECL_MEMMEM
+HAVE_MEMPCPY
+HAVE_DECL_MEMRCHR
+HAVE_RAWMEMCHR
+HAVE_STPCPY
+HAVE_STPNCPY
+HAVE_STRCHRNUL
+HAVE_DECL_STRDUP
+HAVE_STRNDUP
+HAVE_DECL_STRNDUP
+HAVE_DECL_STRNLEN
+HAVE_STRPBRK
+HAVE_STRSEP
+HAVE_STRCASESTR
+HAVE_DECL_STRTOK_R
+HAVE_DECL_STRERROR
+HAVE_DECL_STRSIGNAL
+HAVE_STRVERSCMP
+REPLACE_MEMMEM
+REPLACE_STRDUP
+REPLACE_STRSTR
+REPLACE_STRCASESTR
+REPLACE_STRERROR
+REPLACE_STRSIGNAL
+NEXT_STRING_H
+HAVE_LSTAT
+NEXT_SYS_STAT_H
+SYS_STAT_H
+GNULIB_CHOWN
+GNULIB_CLOSE
+GNULIB_DUP2
+GNULIB_ENVIRON
+GNULIB_EUIDACCESS
+GNULIB_FCHDIR
+GNULIB_FSYNC
+GNULIB_FTRUNCATE
+GNULIB_GETCWD
+GNULIB_GETDOMAINNAME
+GNULIB_GETDTABLESIZE
+GNULIB_GETHOSTNAME
+GNULIB_GETLOGIN_R
+GNULIB_GETPAGESIZE
+GNULIB_GETUSERSHELL
+GNULIB_LCHOWN
+GNULIB_LINK
+GNULIB_LSEEK
+GNULIB_READLINK
+GNULIB_SLEEP
+GNULIB_UNISTD_H_SIGPIPE
+GNULIB_WRITE
+HAVE_DUP2
+HAVE_EUIDACCESS
+HAVE_FSYNC
+HAVE_FTRUNCATE
+HAVE_GETDOMAINNAME
+HAVE_GETDTABLESIZE
+HAVE_GETHOSTNAME
+HAVE_GETPAGESIZE
+HAVE_GETUSERSHELL
+HAVE_LINK
+HAVE_READLINK
+HAVE_SLEEP
+HAVE_DECL_ENVIRON
+HAVE_DECL_GETLOGIN_R
+HAVE_OS_H
+HAVE_SYS_PARAM_H
+REPLACE_CHOWN
+REPLACE_CLOSE
+REPLACE_FCHDIR
+REPLACE_GETCWD
+REPLACE_GETPAGESIZE
+REPLACE_LCHOWN
+REPLACE_LSEEK
+REPLACE_WRITE
+UNISTD_H_HAVE_WINSOCK2_H
+NEXT_UNISTD_H
+HAVE_UNISTD_H
+HAVE_WINT_T
+HAVE_WCHAR_H
+NEXT_WCHAR_H
+HAVE_ISWCNTRL
+NEXT_WCTYPE_H
+HAVE_WCTYPE_H
+WCTYPE_H
+REPLACE_ISWCNTRL
+LIBSED_LIBDEPS
+LIBSED_LTLIBDEPS
+USE_NLS
+GETTEXT_MACRO_VERSION
+MSGFMT
+GMSGFMT
+MSGFMT_015
+GMSGFMT_015
+XGETTEXT
+XGETTEXT_015
+MSGMERGE
+XGETTEXT_EXTRA_OPTIONS
+INTL_MACOSX_LIBS
+LIBICONV
+LTLIBICONV
+INTLLIBS
+POSUB
+TEST_REGEX_TRUE
+TEST_REGEX_FALSE
+XFAIL_TESTS
+LIBOBJS
+LTLIBOBJS
+gl_LIBOBJS
+gl_LTLIBOBJS
+gltests_LIBOBJS
+gltests_LTLIBOBJS'
ac_subst_files=''
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
# Initialize some variables set by options.
ac_init_help=
@@ -339,34 +1088,48 @@ x_libraries=NONE
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
ac_prev=
+ac_dashdash=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
- eval "$ac_prev=\$ac_option"
+ eval $ac_prev=\$ac_option
ac_prev=
continue
fi
- ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
# Accept the important Cygnus configure options, so we can diagnose typos.
- case $ac_option in
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
@@ -388,33 +1151,45 @@ do
--config-cache | -C)
cache_file=config.cache ;;
- -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ -datadir | --datadir | --datadi | --datad)
ac_prev=datadir ;;
- -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
- | --da=*)
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
datadir=$ac_optarg ;;
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
-disable-* | --disable-*)
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- eval "enable_$ac_feature=no" ;;
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
-enable-* | --enable-*)
ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
- ac_feature=`echo $ac_feature | sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "enable_$ac_feature='$ac_optarg'" ;;
+ ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
+ eval enable_$ac_feature=\$ac_optarg ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -441,6 +1216,12 @@ do
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
@@ -465,13 +1246,16 @@ do
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
-localstatedir | --localstatedir | --localstatedi | --localstated \
- | --localstate | --localstat | --localsta | --localst \
- | --locals | --local | --loca | --loc | --lo)
+ | --localstate | --localstat | --localsta | --localst | --locals)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
- | --localstate=* | --localstat=* | --localsta=* | --localst=* \
- | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -536,6 +1320,16 @@ do
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
@@ -588,24 +1382,20 @@ do
-with-* | --with-*)
ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- case $ac_option in
- *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
- *) ac_optarg=yes ;;
- esac
- eval "with_$ac_package='$ac_optarg'" ;;
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=\$ac_optarg ;;
-without-* | --without-*)
ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
- ac_package=`echo $ac_package | sed 's/-/_/g'`
- eval "with_$ac_package=no" ;;
+ ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
+ eval with_$ac_package=no ;;
--x)
# Obsolete; use --with-x.
@@ -636,8 +1426,7 @@ Try \`$0 --help' for more information." >&2
expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid variable name: $ac_envvar" >&2
{ (exit 1); exit 1; }; }
- ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
- eval "$ac_envvar='$ac_optarg'"
+ eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
*)
@@ -657,27 +1446,19 @@ if test -n "$ac_prev"; then
{ (exit 1); exit 1; }; }
fi
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
+# Be sure to have absolute directory names.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
do
- eval ac_val=$`echo $ac_var`
+ eval ac_val=\$$ac_var
case $ac_val in
- [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
-do
- eval ac_val=$`echo $ac_var`
- case $ac_val in
- [\\/$]* | ?:[\\/]* ) ;;
- *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
- { (exit 1); exit 1; }; };;
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
+ { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
done
# There might be people who depend on the old broken behavior: `$host'
@@ -704,74 +1485,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { echo "$as_me: error: Working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
- # Try the directory containing this script, then its parent.
- ac_confdir=`(dirname "$0") 2>/dev/null ||
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$0" ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$0" : 'X\(//\)[^/]' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$0" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
srcdir=$ac_confdir
- if test ! -r $srcdir/$ac_unique_file; then
+ if test ! -r "$srcdir/$ac_unique_file"; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
-if test ! -r $srcdir/$ac_unique_file; then
- if test "$ac_srcdir_defaulted" = yes; then
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
{ (exit 1); exit 1; }; }
- else
- { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
- { (exit 1); exit 1; }; }
- fi
fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
- { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
{ (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
#
# Report the --help message.
@@ -780,7 +1563,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 sed 4.1.5 to adapt to many kinds of systems.
+\`configure' configures sed 4.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -800,9 +1583,6 @@ Configuration:
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
-_ACEOF
-
- cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
@@ -820,15 +1600,22 @@ Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/sed]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
_ACEOF
cat <<\_ACEOF
@@ -846,7 +1633,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of sed 4.1.5:";;
+ short | recursive ) echo "Configuration of sed 4.2:";;
esac
cat <<\_ACEOF
@@ -855,21 +1642,24 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
+ --disable-acl do not support ACLs
--disable-largefile omit support for large files
- --disable-i18n disable internationalization (default=yes)
- --enable-regex-tests enable regex matcher regression tests (default=yes)
- --enable-html build HTML manual (default=no)
--disable-nls do not use Native Language Support
+ --disable-rpath do not hardcode runtime library paths
+ --disable-i18n disable internationalization (default=enabled)
+ --enable-regex-tests enable regex matcher regression tests (default=yes)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-included-regex use included regex matcher (default=yes)
+ --without-included-regex
+ don't compile regex; this is the default on systems
+ with recent-enough versions of the GNU C Library
+ (use with caution on other systems).
--with-gnu-ld assume the C compiler uses GNU ld default=no
- --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
- --with-included-gettext use the GNU gettext library included here
- --with-libintl-prefix=DIR search for libintl in DIR/include and DIR/lib
+ --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
--without-libintl-prefix don't search for libintl in includedir and libdir
Some influential environment variables:
@@ -877,129 +1667,96 @@ Some influential environment variables:
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
- CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
- headers in a nonstandard directory <include dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
-Report bugs to <bonzini@gnu.org>.
+Report bugs to <bug-gnu-utils@gnu.org>.
_ACEOF
+ac_status=$?
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
- ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
- test -d $ac_dir || continue
+ test -d "$ac_dir" || continue
ac_builddir=.
-if test "$ac_dir" != .; then
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
- cd $ac_dir
- # Check for guested configure; otherwise get Cygnus style configure.
- if test -f $ac_srcdir/configure.gnu; then
- echo
- $SHELL $ac_srcdir/configure.gnu --help=recursive
- elif test -f $ac_srcdir/configure; then
- echo
- $SHELL $ac_srcdir/configure --help=recursive
- elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
- echo
- $ac_configure --help
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
- fi
- cd $ac_popdir
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
done
fi
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-sed configure 4.1.5
-generated by GNU Autoconf 2.59
+sed configure 4.2
+generated by GNU Autoconf 2.61
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
- exit 0
+ exit
fi
-exec 5>config.log
-cat >&5 <<_ACEOF
+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 sed $as_me 4.1.5, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+It was created by sed $as_me 4.2, which was
+generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
_ACEOF
+exec 5>>config.log
{
cat <<_ASUNAME
## --------- ##
@@ -1018,7 +1775,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
@@ -1032,6 +1789,7 @@ do
test -z "$as_dir" && as_dir=.
echo "PATH: $as_dir"
done
+IFS=$as_save_IFS
} >&5
@@ -1053,7 +1811,6 @@ _ACEOF
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
-ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
@@ -1064,7 +1821,7 @@ do
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ *\'*)
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
@@ -1086,9 +1843,7 @@ do
-* ) ac_must_keep_next=true ;;
esac
fi
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
+ ac_configure_args="$ac_configure_args '$ac_arg'"
;;
esac
done
@@ -1099,8 +1854,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
@@ -1113,20 +1868,34 @@ trap 'exit_status=$?
_ASBOX
echo
# The following way of writing the cache mishandles newlines in values,
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
(set) 2>&1 |
- case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
- ;;
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
*)
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-}
+ esac |
+ sort
+)
echo
cat <<\_ASBOX
@@ -1137,22 +1906,28 @@ _ASBOX
echo
for ac_var in $ac_subst_vars
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
done | sort
echo
if test -n "$ac_subst_files"; then
cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
_ASBOX
echo
for ac_var in $ac_subst_files
do
- eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ echo "$ac_var='\''$ac_val'\''"
done | sort
echo
fi
@@ -1164,26 +1939,24 @@ _ASBOX
## ----------- ##
_ASBOX
echo
- sed "/^$/d" confdefs.h | sort
+ cat confdefs.h
echo
fi
test "$ac_signal" != 0 &&
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
- rm -f core *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
- ' 0
+' 0
for ac_signal in 1 2 13 15; do
trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+rm -f -r conftest* confdefs.h
# Predefined preprocessor variables.
@@ -1214,14 +1987,17 @@ _ACEOF
# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
- if test "x$prefix" != xNONE; then
- CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
- else
- CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
- fi
+if test -n "$CONFIG_SITE"; then
+ set x "$CONFIG_SITE"
+elif test "x$prefix" != xNONE; then
+ set x "$prefix/share/config.site" "$prefix/etc/config.site"
+else
+ set x "$ac_default_prefix/share/config.site" \
+ "$ac_default_prefix/etc/config.site"
fi
-for ac_site_file in $CONFIG_SITE; do
+shift
+for ac_site_file
+do
if test -r "$ac_site_file"; then
{ echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
@@ -1237,8 +2013,8 @@ if test -r "$cache_file"; then
{ echo "$as_me:$LINENO: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
- [\\/]* | ?:[\\/]* ) . $cache_file;;
- *) . ./$cache_file;;
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
esac
fi
else
@@ -1247,15 +2023,61 @@ echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
+ac_func_list="$ac_func_list btowc"
+ac_header_list="$ac_header_list errno.h"
+ac_header_list="$ac_header_list sys/time.h"
+ac_func_list="$ac_func_list gettimeofday"
+ac_func_list="$ac_func_list lstat"
+ac_func_list="$ac_func_list mbsinit"
+ac_func_list="$ac_func_list mbrtowc"
+ac_func_list="$ac_func_list mbrlen"
+ac_func_list="$ac_func_list pathconf"
+ac_header_list="$ac_header_list sys/param.h"
+ac_header_list="$ac_header_list locale.h"
+ac_func_list="$ac_func_list isblank"
+ac_func_list="$ac_func_list iswctype"
+ac_func_list="$ac_func_list wcscoll"
+ac_header_list="$ac_header_list stdint.h"
+ac_header_list="$ac_header_list wchar.h"
+ac_header_list="$ac_header_list stdio.h"
+ac_header_list="$ac_header_list stdlib.h"
+ac_header_list="$ac_header_list sys/socket.h"
+ac_header_list="$ac_header_list string.h"
+ac_header_list="$ac_header_list sys/stat.h"
+ac_header_list="$ac_header_list unistd.h"
+ac_func_list="$ac_func_list wcrtomb"
+ac_func_list="$ac_func_list wctob"
+ac_func_list="$ac_func_list iswcntrl"
+ac_header_list="$ac_header_list wctype.h"
+gl_use_threads_default=no
+ac_header_list="$ac_header_list io.h"
+ac_header_list="$ac_header_list limits.h"
+ac_header_list="$ac_header_list stdarg.h"
+ac_header_list="$ac_header_list alloca.h"
+ac_header_list="$ac_header_list stddef.h"
+ac_header_list="$ac_header_list sys/file.h"
+ac_header_list="$ac_header_list mcheck.h"
+gt_needs="$gt_needs "
+ac_func_list="$ac_func_list isatty"
+ac_func_list="$ac_func_list bcopy"
+ac_func_list="$ac_func_list bzero"
+ac_func_list="$ac_func_list isascii"
+ac_func_list="$ac_func_list memcpy"
+ac_func_list="$ac_func_list memset"
+ac_func_list="$ac_func_list strchr"
+ac_func_list="$ac_func_list strtoul"
+ac_func_list="$ac_func_list popen"
+ac_func_list="$ac_func_list fchown"
+ac_func_list="$ac_func_list fchmod"
+ac_func_list="$ac_func_list setlocale"
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+for ac_var in $ac_precious_vars; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
- eval ac_old_val="\$ac_cv_env_${ac_var}_value"
- eval ac_new_val="\$ac_env_${ac_var}_value"
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
case $ac_old_set,$ac_new_set in
set,)
{ echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
@@ -1280,8 +2102,7 @@ echo "$as_me: current value: $ac_new_val" >&2;}
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
@@ -1298,12 +2119,6 @@ echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start ov
{ (exit 1); exit 1; }; }
fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
@@ -1328,38 +2143,50 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_aux_dir=
-for ac_dir in config $srcdir/config; do
- if test -f $ac_dir/install-sh; then
+for ac_dir in build-aux "$srcdir"/build-aux; do
+ if test -f "$ac_dir/install-sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
- elif test -f $ac_dir/install.sh; then
+ elif test -f "$ac_dir/install.sh"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
- elif test -f $ac_dir/shtool; then
+ elif test -f "$ac_dir/shtool"; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in build-aux \"$srcdir\"/build-aux" >&2;}
{ (exit 1); exit 1; }; }
fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
- ac_config_headers="$ac_config_headers config.h:config_h.in"
+ac_config_headers="$ac_config_headers config.h:config_h.in"
+
+
+am__api_version='1.10'
-am__api_version="1.9"
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
@@ -1373,8 +2200,8 @@ am__api_version="1.9"
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1396,7 +2223,7 @@ case $as_dir/ in
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -1415,21 +2242,22 @@ case $as_dir/ in
;;
esac
done
+IFS=$as_save_IFS
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
- # As a last resort, use the slow shell script. We don't cache a
- # path for INSTALL within a source directory, because that will
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
- # removed, or if the path is relative.
+ # removed, or if the value is a relative name.
INSTALL=$ac_install_sh
fi
fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
+{ echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6; }
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
@@ -1439,8 +2267,8 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
# Just in case
sleep 1
echo timestamp > conftest.file
@@ -1482,20 +2310,20 @@ echo "$as_me: error: newly created file is older than distributed files!
Check your system clock" >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
test "$program_prefix" != NONE &&
- program_transform_name="s,^,$program_prefix,;$program_transform_name"
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
- program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
# Double any \ or $. echo might interpret backslashes.
# By default was `s,x,x', remove it if useless.
cat <<\_ACEOF >conftest.sed
s/[\\$]/&&/g;s/;s,x,x,$//
_ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
+rm -f conftest.sed
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
@@ -1510,45 +2338,60 @@ else
echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- # We used to keeping the `.' as first argument, in order to
- # allow $(mkdir_p) to be used without argument. As in
- # $(mkdir_p) $(somedir)
- # where $(somedir) is conditionally defined. However this is wrong
- # for two reasons:
- # 1. if the package is installed by a user who cannot write `.'
- # make install will fail,
- # 2. the above comment should most certainly read
- # $(mkdir_p) $(DESTDIR)$(somedir)
- # so it does not work when $(somedir) is undefined and
- # $(DESTDIR) is not.
- # To support the latter case, we have to write
- # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
- # so the `.' trick is pointless.
- mkdir_p='mkdir -p --'
-else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- for d in ./-p ./--version;
- do
- test -d $d && rmdir $d
- done
- # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
- if test -f "$ac_aux_dir/mkinstalldirs"; then
- mkdir_p='$(mkinstalldirs)'
+{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+done
+IFS=$as_save_IFS
+
+fi
+
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
else
- mkdir_p='$(install_sh) -d'
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
fi
fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_AWK+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1561,54 +2404,57 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_AWK="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
+ { echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
+
test -n "$AWK" && break
done
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
+set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
all:
- @echo 'ac_maketemp="$(MAKE)"'
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
- eval ac_cv_prog_make_${ac_make}_set=yes
-else
- eval ac_cv_prog_make_${ac_make}_set=no
-fi
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
rm -f conftest.make
fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
SET_MAKE=
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -1621,12 +2467,16 @@ else
fi
rmdir .tst 2>/dev/null
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
- test -f $srcdir/config.status; then
- { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
{ (exit 1); exit 1; }; }
+ fi
fi
# test whether we have cygpath
@@ -1641,7 +2491,7 @@ fi
# Define the identity of the package.
PACKAGE='sed'
- VERSION='4.1.5'
+ VERSION='4.2'
cat >>confdefs.h <<_ACEOF
@@ -1669,7 +2519,7 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
@@ -1679,8 +2529,8 @@ if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_STRIP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1693,32 +2543,34 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
- echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
+ { echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1731,33 +2583,47 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_STRIP="strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
- echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
+ { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
- STRIP=$ac_ct_STRIP
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
else
STRIP="$ac_cv_prog_STRIP"
fi
fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
@@ -1772,7 +2638,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-SED_FEATURE_VERSION=4.1
+SED_FEATURE_VERSION=4.2
cat >>confdefs.h <<_ACEOF
#define SED_FEATURE_VERSION "$SED_FEATURE_VERSION"
@@ -1788,8 +2654,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1802,32 +2668,34 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1840,36 +2708,51 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1882,74 +2765,34 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
- ac_ct_CC=$CC
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$ac_ct_CC"; then
- ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_ac_ct_CC="cc"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
- CC=$ac_ct_CC
-else
- CC="$ac_cv_prog_CC"
-fi
+ fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1963,7 +2806,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -1974,6 +2817,7 @@ do
fi
done
done
+IFS=$as_save_IFS
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
@@ -1991,22 +2835,23 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
+
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -2019,36 +2864,38 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+ { echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
+
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
- for ac_prog in cl
+ for ac_prog in cl.exe
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -2061,29 +2908,45 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+ { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
+
test -n "$ac_ct_CC" && break
done
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
fi
fi
@@ -2096,21 +2959,35 @@ See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
- "checking for C compiler version" >&5
+echo "$as_me:$LINENO: checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
- (eval $ac_compiler --version </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
- (eval $ac_compiler -v </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
- (eval $ac_compiler -V </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
@@ -2135,47 +3012,77 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
- (eval $ac_link_default) 2>&5
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort. b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions. Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link_default") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- # Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
- conftest.$ac_ext )
- # This is the source file.
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
break;;
* )
break;;
esac
done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
else
+ ac_file=''
+fi
+
+{ echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6; }
+if test -z "$ac_file"; then
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
@@ -2187,19 +3094,21 @@ See \`config.log' for more details." >&2;}
fi
ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
-# Check the compiler produces executables we can run. If not, either
+# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if { ac_try='./$ac_file'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -2218,22 +3127,27 @@ See \`config.log' for more details." >&2;}
fi
fi
fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+{ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
rm -f a.out a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run. If not, either
+# Check that the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6; }
+
+{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
@@ -2244,9 +3158,8 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
break;;
* ) break;;
esac
@@ -2260,14 +3173,14 @@ See \`config.log' for more details." >&2;}
fi
rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -2287,14 +3200,20 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
- for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
@@ -2312,12 +3231,12 @@ fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6; }
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -2340,50 +3259,49 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_compiler_gnu=no
+ ac_compiler_gnu=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2399,38 +3317,118 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_prog_cc_g=no
+
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
@@ -2446,12 +3444,12 @@ else
CFLAGS=
fi
fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
+{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_prog_cc_stdc=no
+ ac_cv_prog_cc_c89=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -2485,12 +3483,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
- as 'x'. The following induces an error, until -std1 is added to get
+ as 'x'. The following induces an error, until -std is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
- that's true only with -std1. */
+ that's true only with -std. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2505,205 +3508,57 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
return 0;
}
_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
CC=$ac_save_CC
fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6; } ;;
+ xno)
+ { echo "$as_me:$LINENO: result: unsupported" >&5
+echo "${ECHO_T}unsupported" >&6; } ;;
*)
- echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
+ CC="$CC $ac_cv_prog_cc_c89"
+ { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
esac
-# Some people use a C++ compiler to compile C. Since we use `exit',
-# in C++ we need to declare it. In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
- choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- for ac_declaration in \
- '' \
- 'extern "C" void std::exit (int) throw (); using std::exit;' \
- 'extern "C" void std::exit (int); using std::exit;' \
- 'extern "C" void exit (int) throw ();' \
- 'extern "C" void exit (int);' \
- 'void exit (int);'
-do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_declaration
-int
-main ()
-{
-exit (42);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
- echo '#ifdef __cplusplus' >>confdefs.h
- echo $ac_declaration >>confdefs.h
- echo '#endif' >>confdefs.h
-fi
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2711,7 +3566,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
DEPDIR="${am__leading_dot}deps"
- ac_config_commands="$ac_config_commands depfiles"
+ac_config_commands="$ac_config_commands depfiles"
am_make=${MAKE-make}
@@ -2721,8 +3576,8 @@ am__doit:
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
-echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
am__include="#"
am__quote=
_am_result=none
@@ -2749,22 +3604,20 @@ if test "$am__include" = "#"; then
fi
-echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6
+{ echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6; }
rm -f confinc confmf
-# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+# Check whether --enable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then
- enableval="$enable_dependency_tracking"
+ enableval=$enable_dependency_tracking;
+fi
-fi;
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
+ if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
AMDEP_FALSE='#'
else
@@ -2774,11 +3627,10 @@ fi
-
depcc="$CC" am_compiler_list=
-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -2842,6 +3694,7 @@ else
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
@@ -2867,13 +3720,11 @@ else
fi
fi
-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
-
-if
+ if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
am__fastdepCC_TRUE=
@@ -2887,8 +3738,8 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -2901,32 +3752,34 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
+ { echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
+
fi
if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -2939,27 +3792,41 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
+IFS=$as_save_IFS
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
+ { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
- RANLIB=$ac_ct_RANLIB
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
else
RANLIB="$ac_cv_prog_RANLIB"
fi
@@ -2970,14 +3837,97 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+{ echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6; }
+if test "${ac_cv_build+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6; }
+if test "${ac_cv_host+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -3011,24 +3961,22 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
echo "$as_me: failed program was:" >&5
@@ -3037,9 +3985,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
+
rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -3049,24 +3998,22 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
@@ -3077,6 +4024,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_preproc_ok=:
break
fi
+
rm -f conftest.err conftest.$ac_ext
done
@@ -3094,8 +4042,8 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
+{ echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6; }
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
@@ -3118,24 +4066,22 @@ cat >>conftest.$ac_ext <<_ACEOF
#endif
Syntax error
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
:
else
echo "$as_me: failed program was:" >&5
@@ -3144,9 +4090,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
+
rm -f conftest.err conftest.$ac_ext
- # OK, works on sane cases. Now check whether non-existent headers
+ # OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -3156,24 +4103,22 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
# Broken: success on invalid input.
continue
else
@@ -3184,6 +4129,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_preproc_ok=:
break
fi
+
rm -f conftest.err conftest.$ac_ext
done
@@ -3206,52 +4152,170 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
+{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
+ ac_path_GREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_GREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+else
+ ac_cv_path_GREP=$GREP
+fi
-echo "$as_me:$LINENO: checking for AIX" >&5
-echo $ECHO_N "checking for AIX... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#ifdef _AIX
- yes
-#endif
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "yes" >/dev/null 2>&1; then
- echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-cat >>confdefs.h <<\_ACEOF
-#define _ALL_SOURCE 1
-_ACEOF
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_path_EGREP_found=false
+# Loop through the user's path and test for each of PROGNAME-LIST
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+
+ $ac_path_EGREP_found && break 3
+ done
+done
+
+done
+IFS=$as_save_IFS
+
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+fi
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ ac_cv_path_EGREP=$EGREP
fi
-rm -f conftest*
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -3275,35 +4339,31 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_header_stdc=no
+ ac_cv_header_stdc=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
@@ -3359,6 +4419,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <ctype.h>
+#include <stdlib.h>
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
@@ -3378,18 +4439,27 @@ main ()
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
- exit(2);
- exit (0);
+ return 2;
+ return 0;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
@@ -3402,12 +4472,14 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+
+
fi
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
@@ -3430,9 +4502,9 @@ for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -3446,38 +4518,35 @@ $ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
+ eval "$as_ac_Header=no"
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
@@ -3488,18 +4557,21 @@ fi
done
-if test "${ac_cv_header_minix_config_h+set}" = set; then
- echo "$as_me:$LINENO: checking for minix/config.h" >&5
-echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
+
+
+
+ if test "${ac_cv_header_minix_config_h+set}" = set; then
+ { echo "$as_me:$LINENO: checking for minix/config.h" >&5
+echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
if test "${ac_cv_header_minix_config_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
-echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
else
# Is the header compilable?
-echo "$as_me:$LINENO: checking minix/config.h usability" >&5
-echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking minix/config.h usability" >&5
+echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -3510,41 +4582,37 @@ $ac_includes_default
#include <minix/config.h>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
-echo "$as_me:$LINENO: checking minix/config.h presence" >&5
-echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking minix/config.h presence" >&5
+echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -3553,24 +4621,22 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <minix/config.h>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -3578,9 +4644,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
+
rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -3604,25 +4671,23 @@ echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compi
echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------ ##
-## Report this to bonzini@gnu.org ##
-## ------------------------------ ##
+ ( cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-gnu-utils@gnu.org ##
+## ------------------------------------ ##
_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-echo "$as_me:$LINENO: checking for minix/config.h" >&5
-echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking for minix/config.h" >&5
+echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; }
if test "${ac_cv_header_minix_config_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_header_minix_config_h=$ac_header_preproc
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
-echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; }
fi
if test $ac_cv_header_minix_config_h = yes; then
@@ -3632,7 +4697,7 @@ else
fi
-if test "$MINIX" = yes; then
+ if test "$MINIX" = yes; then
cat >>confdefs.h <<\_ACEOF
#define _POSIX_SOURCE 1
@@ -3648,556 +4713,2374 @@ cat >>confdefs.h <<\_ACEOF
#define _MINIX 1
_ACEOF
+ fi
+
+ case "$host_os" in
+ hpux*)
+
+cat >>confdefs.h <<\_ACEOF
+#define _XOPEN_SOURCE 500
+_ACEOF
+
+ ;;
+ esac
+
+
+
+ { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
+echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; }
+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_safe_to_define___extensions__=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_safe_to_define___extensions__=no
fi
-echo "$as_me:$LINENO: checking for library containing strerror" >&5
-echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
-if test "${ac_cv_search_strerror+set}" = set; then
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
+echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ cat >>confdefs.h <<\_ACEOF
+#define __EXTENSIONS__ 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _ALL_SOURCE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _TANDEM_SOURCE 1
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for inline" >&5
+echo $ECHO_N "checking for inline... $ECHO_C" >&6; }
+if test "${ac_cv_c_inline+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_func_search_save_LIBS=$LIBS
-ac_cv_search_strerror=no
-cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* 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
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_inline=$ac_kw
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+echo "${ECHO_T}$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
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror ();
+_ACEOF
+ ;;
+esac
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ echo "$as_me:$LINENO: checking for working alloca.h" >&5
+echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <alloca.h>
int
main ()
{
-strerror ();
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_working_alloca_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_working_alloca_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA_H 1
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for alloca" >&5
+echo $ECHO_N "checking for alloca... $ECHO_C" >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_strerror="none required"
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_alloca_works=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ ac_cv_func_alloca_works=no
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_strerror" = no; then
- for ac_lib in cposix; do
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+
+
+
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+cat >>confdefs.h <<\_ACEOF
+#define C_ALLOCA 1
+_ACEOF
+
+
+{ echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; }
+if test "${ac_cv_os_cray+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
-/* Override any gcc2 internal prototype to avoid an error. */
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+echo "${ECHO_T}$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char strerror ();
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-strerror ();
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+ return find_stack_direction () < 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_search_strerror="-l$ac_lib"
-break
+ ac_cv_c_stack_direction=1
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+
+ GNULIB_BTOWC=0;
+ GNULIB_WCTOB=0;
+ GNULIB_MBSINIT=0;
+ GNULIB_MBRTOWC=0;
+ GNULIB_MBRLEN=0;
+ GNULIB_MBSRTOWCS=0;
+ GNULIB_MBSNRTOWCS=0;
+ GNULIB_WCRTOMB=0;
+ GNULIB_WCSRTOMBS=0;
+ GNULIB_WCSNRTOMBS=0;
+ GNULIB_WCWIDTH=0;
+ HAVE_BTOWC=1;
+ HAVE_MBSINIT=1;
+ HAVE_MBRTOWC=1;
+ HAVE_MBRLEN=1;
+ HAVE_MBSRTOWCS=1;
+ HAVE_MBSNRTOWCS=1;
+ HAVE_WCRTOMB=1;
+ HAVE_WCSRTOMBS=1;
+ HAVE_WCSNRTOMBS=1;
+ HAVE_DECL_WCTOB=1;
+ HAVE_DECL_WCWIDTH=1;
+ REPLACE_MBSTATE_T=0;
+ REPLACE_BTOWC=0;
+ REPLACE_WCTOB=0;
+ REPLACE_MBSINIT=0;
+ REPLACE_MBRTOWC=0;
+ REPLACE_MBRLEN=0;
+ REPLACE_MBSRTOWCS=0;
+ REPLACE_MBSNRTOWCS=0;
+ REPLACE_WCRTOMB=0;
+ REPLACE_WCSRTOMBS=0;
+ REPLACE_WCWIDTH=0;
+ WCHAR_H='';
+
+
+
+
+
+for ac_func in $ac_func_list
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
- done
-fi
-LIBS=$ac_func_search_save_LIBS
fi
-echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
-echo "${ECHO_T}$ac_cv_search_strerror" >&6
-if test "$ac_cv_search_strerror" != no; then
- test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
fi
+done
-# Check whether --enable-largefile or --disable-largefile was given.
-if test "${enable_largefile+set}" = set; then
- enableval="$enable_largefile"
-fi;
-if test "$enable_largefile" != no; then
- echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
-echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
-if test "${ac_cv_sys_largefile_CC+set}" = set; then
+
+ { echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
+echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6; }
+if test "${am_cv_langinfo_codeset+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_sys_largefile_CC=no
- if test "$GCC" != yes; then
- ac_save_CC=$CC
- while :; do
- # IRIX 6.2 and later do not support large files by default,
- # so use the C compiler's -n32 option if that helps.
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+#include <langinfo.h>
int
main ()
{
-
+char* cs = nl_langinfo(CODESET); return !cs;
;
return 0;
}
_ACEOF
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ am_cv_langinfo_codeset=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ am_cv_langinfo_codeset=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
+echo "${ECHO_T}$am_cv_langinfo_codeset" >&6; }
+ if test $am_cv_langinfo_codeset = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LANGINFO_CODESET 1
+_ACEOF
+
+ fi
+
+
+
+
+ { echo "$as_me:$LINENO: checking for a traditional french locale" >&5
+echo $ECHO_N "checking for a traditional french locale... $ECHO_C" >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_locale_fr" >&5
+echo "${ECHO_T}$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether the preprocessor supports include_next" >&5
+echo $ECHO_N "checking whether the preprocessor supports include_next... $ECHO_C" >&6; }
+if test "${gl_cv_have_include_next+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ rm -rf conftestd1a conftestd1b conftestd2
+ mkdir conftestd1a conftestd1b conftestd2
+ cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd1b/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd2/conftest.h
+#ifndef DEFINED_IN_CONFTESTD1
+#error "include_next test doesn't work"
+#endif
+#define DEFINED_IN_CONFTESTD2
+EOF
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+ cat >conftest.$ac_ext <<_ACEOF
+#include <conftest.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gl_cv_have_include_next=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f conftest.err conftest.$ac_objext
- CC="$CC -n32"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+ cat >conftest.$ac_ext <<_ACEOF
+#include <conftest.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gl_cv_have_include_next=buggy
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gl_cv_have_include_next=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ rm -rf conftestd1a conftestd1b conftestd2
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_have_include_next" >&5
+echo "${ECHO_T}$gl_cv_have_include_next" >&6; }
+ PRAGMA_SYSTEM_HEADER=
+ if test $gl_cv_have_include_next = yes; then
+ INCLUDE_NEXT=include_next
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ if test -n "$GCC"; then
+ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+ fi
+ else
+ if test $gl_cv_have_include_next = buggy; then
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ else
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
+ fi
+ fi
+
+
+
+
+
+
+
+
+for ac_header in $ac_header_list
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sys_largefile_CC=' -n32'; break
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_objext
- break
- done
- CC=$ac_save_CC
- rm -f conftest.$ac_ext
- fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-gnu-utils@gnu.org ##
+## ------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
-echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
-echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
- if test "$ac_cv_sys_largefile_CC" != no; then
- CC=$CC$ac_cv_sys_largefile_CC
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking for complete errno.h" >&5
+echo $ECHO_N "checking for complete errno.h... $ECHO_C" >&6; }
+if test "${gl_cv_header_errno_h_complete+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <errno.h>
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "booboo" >/dev/null 2>&1; then
+ gl_cv_header_errno_h_complete=no
+else
+ gl_cv_header_errno_h_complete=yes
+fi
+rm -f conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_complete" >&5
+echo "${ECHO_T}$gl_cv_header_errno_h_complete" >&6; }
+ if test $gl_cv_header_errno_h_complete = yes; then
+ ERRNO_H=''
+ else
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_errno_h='<'errno.h'>'
+ else
+ { echo "$as_me:$LINENO: checking absolute name of <errno.h>" >&5
+echo $ECHO_N "checking absolute name of <errno.h>... $ECHO_C" >&6; }
+if test "${gl_cv_next_errno_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test $ac_cv_header_errno_h = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/errno.h#{
+ s#.*"\(.*/errno.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_errno_h='<'errno.h'>'
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_next_errno_h" >&5
+echo "${ECHO_T}$gl_cv_next_errno_h" >&6; }
+ fi
+ NEXT_ERRNO_H=$gl_cv_next_errno_h
+
+
+
+ ERRNO_H='errno.h'
fi
- echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
-if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+
+ if test -n "$ERRNO_H"; then
+ { echo "$as_me:$LINENO: checking for EMULTIHOP value" >&5
+echo $ECHO_N "checking for EMULTIHOP value... $ECHO_C" >&6; }
+if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ gl_cv_header_errno_h_EMULTIHOP=yes
+else
+ gl_cv_header_errno_h_EMULTIHOP=no
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EMULTIHOP = no; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ gl_cv_header_errno_h_EMULTIHOP=hidden
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EMULTIHOP) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
while :; do
- ac_cv_sys_file_offset_bits=no
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
int
main ()
{
+static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)];
+test_array [0] = 0
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EMULTIHOP) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EMULTIHOP) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
int
main ()
{
+static int test_array [1 - 2 * !((EMULTIHOP) <= $ac_mid)];
+test_array [0] = 0
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) gl_cv_header_errno_h_EMULTIHOP=$ac_lo;;
+'') ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+static long int longval () { return EMULTIHOP; }
+static unsigned long int ulongval () { return EMULTIHOP; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if ((EMULTIHOP) < 0)
+ {
+ long int i = longval ();
+ if (i != (EMULTIHOP))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != (EMULTIHOP))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_sys_file_offset_bits=64; break
+ gl_cv_header_errno_h_EMULTIHOP=`cat conftest.val`
else
- echo "$as_me: failed program was:" >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- break
-done
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
-echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
-if test "$ac_cv_sys_file_offset_bits" != no; then
+rm -f conftest.val
+ fi
+ fi
-cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
+echo "${ECHO_T}$gl_cv_header_errno_h_EMULTIHOP" >&6; }
+ case $gl_cv_header_errno_h_EMULTIHOP in
+ yes | no)
+ EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
+ ;;
+ *)
+ EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
+ ;;
+ esac
+
+
+ fi
+
+
+ if test -n "$ERRNO_H"; then
+ { echo "$as_me:$LINENO: checking for ENOLINK value" >&5
+echo $ECHO_N "checking for ENOLINK value... $ECHO_C" >&6; }
+if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ gl_cv_header_errno_h_ENOLINK=yes
+else
+ gl_cv_header_errno_h_ENOLINK=no
fi
rm -f conftest*
- echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
-echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
-if test "${ac_cv_sys_large_files+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+
+ if test $gl_cv_header_errno_h_ENOLINK = no; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ gl_cv_header_errno_h_ENOLINK=hidden
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_ENOLINK = hidden; then
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((ENOLINK) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
while :; do
- ac_cv_sys_large_files=no
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
int
main ()
{
+static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)];
+test_array [0] = 0
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((ENOLINK) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((ENOLINK) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- break
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#define _LARGE_FILES 1
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
int
main ()
{
+static int test_array [1 - 2 * !((ENOLINK) <= $ac_mid)];
+test_array [0] = 0
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) gl_cv_header_errno_h_ENOLINK=$ac_lo;;
+'') ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+static long int longval () { return ENOLINK; }
+static unsigned long int ulongval () { return ENOLINK; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if ((ENOLINK) < 0)
+ {
+ long int i = longval ();
+ if (i != (ENOLINK))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != (ENOLINK))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_sys_large_files=1; break
+ gl_cv_header_errno_h_ENOLINK=`cat conftest.val`
else
- echo "$as_me: failed program was:" >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- break
-done
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
-echo "${ECHO_T}$ac_cv_sys_large_files" >&6
-if test "$ac_cv_sys_large_files" != no; then
+rm -f conftest.val
+ fi
+ fi
-cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_ENOLINK" >&5
+echo "${ECHO_T}$gl_cv_header_errno_h_ENOLINK" >&6; }
+ case $gl_cv_header_errno_h_ENOLINK in
+ yes | no)
+ ENOLINK_HIDDEN=0; ENOLINK_VALUE=
+ ;;
+ *)
+ ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
+ ;;
+ esac
+
+
+ fi
+
+
+ if test -n "$ERRNO_H"; then
+ { echo "$as_me:$LINENO: checking for EOVERFLOW value" >&5
+echo $ECHO_N "checking for EOVERFLOW value... $ECHO_C" >&6; }
+if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ gl_cv_header_errno_h_EOVERFLOW=yes
+else
+ gl_cv_header_errno_h_EOVERFLOW=no
fi
rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EOVERFLOW = no; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ gl_cv_header_errno_h_EOVERFLOW=hidden
fi
+rm -f conftest*
-echo "$as_me:$LINENO: checking for long file names" >&5
-echo $ECHO_N "checking for long file names... $ECHO_C" >&6
-if test "${ac_cv_sys_long_file_names+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EOVERFLOW) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
else
- ac_cv_sys_long_file_names=yes
-# Test for long file names in all the places we know might matter:
-# . the current directory, where building will happen
-# $prefix/lib where we will be installing things
-# $exec_prefix/lib likewise
-# eval it to expand exec_prefix.
-# $TMPDIR if set, where it might want to write temporary files
-# if $TMPDIR is not set:
-# /tmp where it might want to write temporary files
-# /var/tmp likewise
-# /usr/tmp likewise
-if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
- ac_tmpdirs=$TMPDIR
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
else
- ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EOVERFLOW) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((EOVERFLOW) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
fi
-for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
- test -d $ac_dir || continue
- test -w $ac_dir || continue # It is less confusing to not echo anything here.
- ac_xdir=$ac_dir/cf$$
- (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
- ac_tf1=$ac_xdir/conftest9012345
- ac_tf2=$ac_xdir/conftest9012346
- (echo 1 >$ac_tf1) 2>/dev/null
- (echo 2 >$ac_tf2) 2>/dev/null
- ac_val=`cat $ac_tf1 2>/dev/null`
- if test ! -f $ac_tf1 || test "$ac_val" != 1; then
- ac_cv_sys_long_file_names=no
- rm -rf $ac_xdir 2>/dev/null
- break
- fi
- rm -rf $ac_xdir 2>/dev/null
-done
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
fi
-echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
-echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
-if test $ac_cv_sys_long_file_names = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LONG_FILE_NAMES 1
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-fi
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((EOVERFLOW) <= $ac_mid)];
+test_array [0] = 0
-echo "$as_me:$LINENO: checking whether -lcP is needed" >&5
-echo $ECHO_N "checking whether -lcP is needed... $ECHO_C" >&6
-if test "${sed_cv_libcp_needed+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-if test "$cross_compiling" = yes; then
- sed_cv_libcp_needed="assuming no"
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) gl_cv_header_errno_h_EOVERFLOW=$ac_lo;;
+'') ;;
+esac
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -4206,62 +7089,96 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
+#define _XOPEN_SOURCE_EXTENDED 1
#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
-int main()
+static long int longval () { return EOVERFLOW; }
+static unsigned long int ulongval () { return EOVERFLOW; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
{
- FILE *fp;
- int result;
- errno = 0;
- fp = fopen ("conftest.c", "r");
- if (!fp) return 0; /* error, assume not needed */
- result = fflush (fp) == EOF && errno == 0;
- fclose (fp);
- return result;
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if ((EOVERFLOW) < 0)
+ {
+ long int i = longval ();
+ if (i != (EOVERFLOW))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != (EOVERFLOW))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- sed_cv_libcp_needed=no
+ gl_cv_header_errno_h_EOVERFLOW=`cat conftest.val`
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-( exit $ac_status )
-sed_cv_libcp_needed=yes
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+rm -f conftest.val
+ fi
+ fi
fi
-echo "$as_me:$LINENO: result: $sed_cv_libcp_needed" >&5
-echo "${ECHO_T}$sed_cv_libcp_needed" >&6
-if test "$sed_cv_libcp_needed" = yes; then
- LIBS="-lcP $LIBS"
-fi
-
+{ echo "$as_me:$LINENO: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
+echo "${ECHO_T}$gl_cv_header_errno_h_EOVERFLOW" >&6; }
+ case $gl_cv_header_errno_h_EOVERFLOW in
+ yes | no)
+ EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
+ ;;
+ *)
+ EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
+ ;;
+ esac
+ fi
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
- as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
-echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5
+echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_strerror_r+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -4270,318 +7187,1073 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h>
-#include <$ac_hdr>
-
+$ac_includes_default
int
main ()
{
-if ((DIR *) 0)
-return 0;
+#ifndef strerror_r
+ (void) strerror_r;
+#endif
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_strerror_r=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
+ ac_cv_have_decl_strerror_r=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6; }
+if test $ac_cv_have_decl_strerror_r = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R 1
+_ACEOF
+
+
+else
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+#define HAVE_DECL_STRERROR_R 0
_ACEOF
-ac_header_dirent=$ac_hdr; break
+
fi
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
- echo "$as_me:$LINENO: checking for library containing opendir" >&5
-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
-if test "${ac_cv_search_opendir+set}" = set; then
+
+
+for ac_func in strerror_r
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_func_search_save_LIBS=$LIBS
-ac_cv_search_opendir=no
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
-/* Override any gcc2 internal prototype to avoid an error. */
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir ();
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-opendir ();
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+{ echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5
+echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6; }
+if test "${ac_cv_func_strerror_r_char_p+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ ac_cv_func_strerror_r_char_p=no
+ if test $ac_cv_have_decl_strerror_r = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ char *p = strerror_r (0, buf, sizeof buf);
+ return !p || x;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_func_strerror_r_char_p=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ else
+ # strerror_r is not declared. Choose between
+ # systems that have relatively inaccessible declarations for the
+ # function. BeOS and DEC UNIX 4.0 fall in this category, but the
+ # former has a strerror_r that returns char*, while the latter
+ # has a strerror_r that returns `int'.
+ # This test should segfault on the DEC system.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ extern char *strerror_r ();
+int
+main ()
+{
+char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ return ! isalpha (x);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_search_opendir="none required"
+ ac_cv_func_strerror_r_char_p=yes
else
- echo "$as_me: failed program was:" >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_opendir" = no; then
- for ac_lib in dir; do
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
+echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; }
+if test $ac_cv_func_strerror_r_char_p = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STRERROR_R_CHAR_P 1
+_ACEOF
+
+fi
+
+
+ XGETTEXT_EXTRA_OPTIONS=
+
+
+ GNULIB_FPRINTF=0;
+ GNULIB_FPRINTF_POSIX=0;
+ GNULIB_PRINTF=0;
+ GNULIB_PRINTF_POSIX=0;
+ GNULIB_SNPRINTF=0;
+ GNULIB_SPRINTF_POSIX=0;
+ GNULIB_VFPRINTF=0;
+ GNULIB_VFPRINTF_POSIX=0;
+ GNULIB_VPRINTF=0;
+ GNULIB_VPRINTF_POSIX=0;
+ GNULIB_VSNPRINTF=0;
+ GNULIB_VSPRINTF_POSIX=0;
+ GNULIB_DPRINTF=0;
+ GNULIB_VDPRINTF=0;
+ GNULIB_VASPRINTF=0;
+ GNULIB_OBSTACK_PRINTF=0;
+ GNULIB_OBSTACK_PRINTF_POSIX=0;
+ GNULIB_FOPEN=0;
+ GNULIB_FREOPEN=0;
+ GNULIB_FSEEK=0;
+ GNULIB_FSEEKO=0;
+ GNULIB_FTELL=0;
+ GNULIB_FTELLO=0;
+ GNULIB_FFLUSH=0;
+ GNULIB_FCLOSE=0;
+ GNULIB_FPUTC=0;
+ GNULIB_PUTC=0;
+ GNULIB_PUTCHAR=0;
+ GNULIB_FPUTS=0;
+ GNULIB_PUTS=0;
+ GNULIB_FWRITE=0;
+ GNULIB_GETDELIM=0;
+ GNULIB_GETLINE=0;
+ GNULIB_PERROR=0;
+ GNULIB_STDIO_H_SIGPIPE=0;
+ REPLACE_STDIO_WRITE_FUNCS=0;
+ REPLACE_FPRINTF=0;
+ REPLACE_VFPRINTF=0;
+ REPLACE_PRINTF=0;
+ REPLACE_VPRINTF=0;
+ REPLACE_SNPRINTF=0;
+ HAVE_DECL_SNPRINTF=1;
+ REPLACE_VSNPRINTF=0;
+ HAVE_DECL_VSNPRINTF=1;
+ REPLACE_SPRINTF=0;
+ REPLACE_VSPRINTF=0;
+ HAVE_DPRINTF=1;
+ REPLACE_DPRINTF=0;
+ HAVE_VDPRINTF=1;
+ REPLACE_VDPRINTF=0;
+ HAVE_VASPRINTF=1;
+ REPLACE_VASPRINTF=0;
+ HAVE_DECL_OBSTACK_PRINTF=1;
+ REPLACE_OBSTACK_PRINTF=0;
+ REPLACE_FOPEN=0;
+ REPLACE_FREOPEN=0;
+ HAVE_FSEEKO=1;
+ REPLACE_FSEEKO=0;
+ REPLACE_FSEEK=0;
+ HAVE_FTELLO=1;
+ REPLACE_FTELLO=0;
+ REPLACE_FTELL=0;
+ REPLACE_FFLUSH=0;
+ REPLACE_FCLOSE=0;
+ HAVE_DECL_GETDELIM=1;
+ HAVE_DECL_GETLINE=1;
+ REPLACE_GETLINE=0;
+ REPLACE_PERROR=0;
+
+{ echo "$as_me:$LINENO: checking whether getdelim is declared" >&5
+echo $ECHO_N "checking whether getdelim is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_getdelim+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir ();
+$ac_includes_default
int
main ()
{
-opendir ();
+#ifndef getdelim
+ (void) getdelim;
+#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_getdelim=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_getdelim=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getdelim" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getdelim" >&6; }
+if test $ac_cv_have_decl_getdelim = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETDELIM 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETDELIM 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether getline is declared" >&5
+echo $ECHO_N "checking whether getline is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_getline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef getline
+ (void) getline;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_getline=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_getline=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getline" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getline" >&6; }
+if test $ac_cv_have_decl_getline = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLINE 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLINE 0
+_ACEOF
+
+
+fi
+
+
+
+ if test -z "$GETOPT_H"; then
+
+for ac_header in getopt.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_opendir="-l$ac_lib"
-break
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
fi
-LIBS=$ac_func_search_save_LIBS
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-gnu-utils@gnu.org ##
+## ------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-echo "${ECHO_T}$ac_cv_search_opendir" >&6
-if test "$ac_cv_search_opendir" != no; then
- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
else
- echo "$as_me:$LINENO: checking for library containing opendir" >&5
-echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
-if test "${ac_cv_search_opendir+set}" = set; then
+ GETOPT_H=getopt.h
+fi
+
+done
+
+ fi
+
+ if test -z "$GETOPT_H"; then
+
+for ac_func in getopt_long_only
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_func_search_save_LIBS=$LIBS
-ac_cv_search_opendir=no
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
-/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir ();
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-opendir ();
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_search_opendir="none required"
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_opendir" = no; then
- for ac_lib in x; do
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ GETOPT_H=getopt.h
+fi
+done
+
+ fi
+
+ if test -z "$GETOPT_H"; then
+ { echo "$as_me:$LINENO: checking whether optreset is declared" >&5
+echo $ECHO_N "checking whether optreset is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_optreset+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <getopt.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
+int
+main ()
+{
+#ifndef optreset
+ (void) optreset;
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char opendir ();
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_optreset=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_optreset=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_optreset" >&5
+echo "${ECHO_T}$ac_cv_have_decl_optreset" >&6; }
+if test $ac_cv_have_decl_optreset = yes; then
+ GETOPT_H=getopt.h
+fi
+
+ fi
+
+ if test -z "$GETOPT_H"; then
+ { echo "$as_me:$LINENO: checking for working GNU getopt function" >&5
+echo $ECHO_N "checking for working GNU getopt function... $ECHO_C" >&6; }
+if test "${gl_cv_func_gnu_getopt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ { echo "$as_me:$LINENO: checking whether getopt_clip is declared" >&5
+echo $ECHO_N "checking whether getopt_clip is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_getopt_clip+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <getopt.h>
+
int
main ()
{
-opendir ();
+#ifndef getopt_clip
+ (void) getopt_clip;
+#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_getopt_clip=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_getopt_clip=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getopt_clip" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getopt_clip" >&6; }
+if test $ac_cv_have_decl_getopt_clip = yes; then
+ gl_cv_func_gnu_getopt=no
+else
+ gl_cv_func_gnu_getopt=yes
+fi
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <getopt.h>
+int
+main ()
+{
+
+ char *myargv[3];
+ myargv[0] = "conftest";
+ myargv[1] = "-+";
+ myargv[2] = 0;
+ return getopt (2, myargv, "+a") != '?';
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_search_opendir="-l$ac_lib"
-break
+ gl_cv_func_gnu_getopt=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_gnu_getopt=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_gnu_getopt" >&5
+echo "${ECHO_T}$gl_cv_func_gnu_getopt" >&6; }
+ if test "$gl_cv_func_gnu_getopt" = "no"; then
+ GETOPT_H=getopt.h
+ fi
+ fi
+
+{ echo "$as_me:$LINENO: checking whether getenv is declared" >&5
+echo $ECHO_N "checking whether getenv is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_getenv+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef getenv
+ (void) getenv;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_getenv=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ ac_cv_have_decl_getenv=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- done
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-LIBS=$ac_func_search_save_LIBS
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getenv" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getenv" >&6; }
+if test $ac_cv_have_decl_getenv = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV 0
+_ACEOF
+
+
fi
-echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
-echo "${ECHO_T}$ac_cv_search_opendir" >&6
-if test "$ac_cv_search_opendir" != no; then
- test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
+
+
+{ echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
+echo $ECHO_N "checking for C/C++ restrict keyword... $ECHO_C" >&6; }
+if test "${ac_cv_c_restrict+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_c_restrict=no
+ # The order here caters to the fact that C++ does not require restrict.
+ for ac_kw in __restrict __restrict__ _Restrict restrict; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+typedef int * int_ptr;
+ int foo (int_ptr $ac_kw ip) {
+ return ip[0];
+ }
+int
+main ()
+{
+int s[1];
+ int * $ac_kw t = s;
+ t[0] = 0;
+ return foo(t)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_restrict=$ac_kw
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_restrict" != no && break
+ done
+
fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
+echo "${ECHO_T}$ac_cv_c_restrict" >&6; }
+ case $ac_cv_c_restrict in
+ restrict) ;;
+ no) cat >>confdefs.h <<\_ACEOF
+#define restrict
+_ACEOF
+ ;;
+ *) cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
@@ -4592,13 +8264,65 @@ fi
-for ac_header in io.h limits.h locale.h stdarg.h alloca.h stddef.h errno.h \
- wchar.h wctype.h sys/file.h mcheck.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_time_h='<'sys/time.h'>'
+ else
+ { echo "$as_me:$LINENO: checking absolute name of <sys/time.h>" >&5
+echo $ECHO_N "checking absolute name of <sys/time.h>... $ECHO_C" >&6; }
+if test "${gl_cv_next_sys_time_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test $ac_cv_header_sys_time_h = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/time.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sys/time.h#{
+ s#.*"\(.*/sys/time.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sys_time_h='<'sys/time.h'>'
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_next_sys_time_h" >&5
+echo "${ECHO_T}$gl_cv_next_sys_time_h" >&6; }
+ fi
+ NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
+
+
+
+
+ if test $ac_cv_header_sys_time_h = yes; then
+ HAVE_SYS_TIME_H=1
+ else
+ HAVE_SYS_TIME_H=0
+ fi
+
+
+ { echo "$as_me:$LINENO: checking for struct timeval" >&5
+echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
+if test "${gl_cv_sys_struct_timeval+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -4607,55 +8331,141 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
-#include <$ac_header>
+int
+main ()
+{
+static struct timeval x; x.tv_sec = x.tv_usec;
+ ;
+ return 0;
+}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gl_cv_sys_struct_timeval=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gl_cv_sys_struct_timeval=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_sys_struct_timeval" >&5
+echo "${ECHO_T}$gl_cv_sys_struct_timeval" >&6; }
+ if test $gl_cv_sys_struct_timeval = yes; then
+ HAVE_STRUCT_TIMEVAL=1
+ else
+ HAVE_STRUCT_TIMEVAL=0
+ fi
+
+
+ REPLACE_GETTIMEOFDAY=0
+
+ if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then
+ SYS_TIME_H=sys/time.h
+ else
+ SYS_TIME_H=
+ fi
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
+echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef getc_unlocked
+ (void) getc_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_getc_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
+ ac_cv_have_decl_getc_unlocked=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6; }
+if test $ac_cv_have_decl_getc_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED 1
+_ACEOF
+
+
+else
cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_DECL_GETC_UNLOCKED 0
_ACEOF
+
fi
-done
-echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
+
+ { echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5
+echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6; }
+if test "${ac_cv_gnu_library_2_1+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -4665,236 +8475,1506 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Lucky GNU user" >/dev/null 2>&1; then
+ ac_cv_gnu_library_2_1=yes
+else
+ ac_cv_gnu_library_2_1=no
+fi
+rm -f conftest*
+
+
+
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5
+echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6; }
+
+ GLIBC21="$ac_cv_gnu_library_2_1"
+
+
+
+ GNULIB_LCHMOD=0;
+ GNULIB_LSTAT=0;
+ HAVE_LCHMOD=1;
+ REPLACE_LSTAT=0;
+ REPLACE_MKDIR=0;
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether malloc, realloc, calloc are POSIX compliant" >&5
+echo $ECHO_N "checking whether malloc, realloc, calloc are POSIX compliant... $ECHO_C" >&6; }
+if test "${gl_cv_func_malloc_posix+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
int
main ()
{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ choke me
+ #endif
- *t++ = 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- }
-#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gl_cv_func_malloc_posix=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ gl_cv_func_malloc_posix=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_malloc_posix" >&5
+echo "${ECHO_T}$gl_cv_func_malloc_posix" >&6; }
+
+
+ GNULIB_MALLOC_POSIX=0;
+ GNULIB_REALLOC_POSIX=0;
+ GNULIB_CALLOC_POSIX=0;
+ GNULIB_ATOLL=0;
+ GNULIB_GETLOADAVG=0;
+ GNULIB_GETSUBOPT=0;
+ GNULIB_MKDTEMP=0;
+ GNULIB_MKSTEMP=0;
+ GNULIB_PUTENV=0;
+ GNULIB_RANDOM_R=0;
+ GNULIB_RPMATCH=0;
+ GNULIB_SETENV=0;
+ GNULIB_STRTOD=0;
+ GNULIB_STRTOLL=0;
+ GNULIB_STRTOULL=0;
+ GNULIB_UNSETENV=0;
+ HAVE_ATOLL=1;
+ HAVE_CALLOC_POSIX=1;
+ HAVE_GETSUBOPT=1;
+ HAVE_MALLOC_POSIX=1;
+ HAVE_MKDTEMP=1;
+ HAVE_REALLOC_POSIX=1;
+ HAVE_RANDOM_R=1;
+ HAVE_RPMATCH=1;
+ HAVE_SETENV=1;
+ HAVE_STRTOD=1;
+ HAVE_STRTOLL=1;
+ HAVE_STRTOULL=1;
+ HAVE_STRUCT_RANDOM_DATA=1;
+ HAVE_SYS_LOADAVG_H=0;
+ HAVE_UNSETENV=1;
+ HAVE_DECL_GETLOADAVG=1;
+ REPLACE_MKSTEMP=0;
+ REPLACE_PUTENV=0;
+ REPLACE_STRTOD=0;
+ VOID_UNSETENV=0;
+
+
+
+ { echo "$as_me:$LINENO: checking for mbstate_t" >&5
+echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_mbstate_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+# include <wchar.h>
+int
+main ()
+{
+mbstate_t x; return sizeof x;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_mbstate_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_mbstate_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
+echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6; }
+ if test $ac_cv_type_mbstate_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+ else
+
+cat >>confdefs.h <<\_ACEOF
+#define mbstate_t int
+_ACEOF
+
+ fi
+
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking for a traditional japanese locale" >&5
+echo $ECHO_N "checking for a traditional japanese locale... $ECHO_C" >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_locale_ja" >&5
+echo "${ECHO_T}$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking for a transitional chinese locale" >&5
+echo $ECHO_N "checking for a transitional chinese locale... $ECHO_C" >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_locale_zh_CN" >&5
+echo "${ECHO_T}$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+ { echo "$as_me:$LINENO: checking for a french Unicode locale" >&5
+echo $ECHO_N "checking for a french Unicode locale... $ECHO_C" >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_locale_fr_utf8" >&5
+echo "${ECHO_T}$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5
+echo $ECHO_N "checking whether mbrtowc handles incomplete characters... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_c_const=yes
+ gl_cv_func_mbrtowc_incomplete_state=yes
else
- echo "$as_me: failed program was:" >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_c_const=no
+( exit $ac_status )
+gl_cv_func_mbrtowc_incomplete_state=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-cat >>confdefs.h <<\_ACEOF
-#define const
-_ACEOF
+
+ fi
fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_incomplete_state" >&6; }
-echo "$as_me:$LINENO: checking for size_t" >&5
-echo $ECHO_N "checking for size_t... $ECHO_C" >&6
-if test "${ac_cv_type_size_t+set}" = set; then
+
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5
+echo $ECHO_N "checking whether mbrtowc works as well as mbtowc... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
{
-if ((size_t *) 0)
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
return 0;
-if (sizeof (size_t))
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_mbrtowc_sanitycheck=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+
+
+ WCHAR_H=wchar.h
+
+ fi
+
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBRTOWC=1
+ fi
+
+
+
+
+
+
+ if test $ac_cv_func_mbrtowc = no; then
+ HAVE_MBRTOWC=0
+ fi
+ if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
+
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc handles a NULL string argument" >&5
+echo $ECHO_N "checking whether mbrtowc handles a NULL string argument... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ case "$host_os" in
+ # Guess no on OSF/1.
+ osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
+ esac
+ if test $LOCALE_FR_UTF8 != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+ int ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ mbrtowc (&wc, NULL, 5, &state);
+ /* Check that wc was not modified. */
+ if (wc != (wchar_t) 0xBADFACE)
+ return 1;
+ }
return 0;
- ;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_mbrtowc_null_arg=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mbrtowc_null_arg=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_null_arg" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_null_arg" >&6; }
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc has a correct return value" >&5
+echo $ECHO_N "checking whether mbrtowc has a correct return value... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_retval+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ case "$host_os" in
+ # Guess no on HP-UX and Solaris.
+ hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris. */
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+ return 1;
+ }
+ }
+ /* This fails on HP-UX 11.11. */
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+ return 1;
+ }
+ }
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_mbrtowc_retval=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mbrtowc_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_retval" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_retval" >&6; }
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
+echo $ECHO_N "checking whether mbrtowc returns 0 when parsing a NUL character... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8 and 9.
+ solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8 and 9. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "", 1, &state) != 0)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_type_size_t=yes
+ gl_cv_func_mbrtowc_nul_retval=yes
else
- echo "$as_me: failed program was:" >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_type_size_t=no
+( exit $ac_status )
+gl_cv_func_mbrtowc_nul_retval=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
-echo "${ECHO_T}$ac_cv_type_size_t" >&6
-if test $ac_cv_type_size_t = yes; then
+
+
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_nul_retval" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_nul_retval" >&6; }
+
+ case "$gl_cv_func_mbrtowc_null_arg" in
+ *yes) ;;
+ *)
+cat >>confdefs.h <<\_ACEOF
+#define MBRTOWC_NULL_ARG_BUG 1
+_ACEOF
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_retval" in
+ *yes) ;;
+ *)
+cat >>confdefs.h <<\_ACEOF
+#define MBRTOWC_RETVAL_BUG 1
+_ACEOF
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_nul_retval" in
+ *yes) ;;
+ *)
+cat >>confdefs.h <<\_ACEOF
+#define MBRTOWC_NUL_RETVAL_BUG 1
+_ACEOF
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ fi
+ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+
+
+ WCHAR_H=wchar.h
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
+
+
:
+
+ fi
+
+
+
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
-cat >>confdefs.h <<_ACEOF
-#define size_t unsigned
+ ;
+ return 0;
+}
_ACEOF
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-echo "$as_me:$LINENO: checking for ssize_t" >&5
-echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
-if test "${ac_cv_type_ssize_t+set}" = set; then
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_largefile_CC=' -n32'; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ while :; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
int
main ()
{
-if ((ssize_t *) 0)
- return 0;
-if (sizeof (ssize_t))
- return 0;
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_file_offset_bits=no; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_file_offset_bits=64; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -f conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
+if test "${ac_cv_sys_large_files+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_ssize_t=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_large_files=no; break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_type_ssize_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
-echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
-if test $ac_cv_type_ssize_t = yes; then
- :
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_large_files=1; break
else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
cat >>confdefs.h <<_ACEOF
-#define ssize_t int
+#define _LARGE_FILES $ac_cv_sys_large_files
_ACEOF
+;;
+esac
+rm -f conftest*
+ fi
+fi
+
+
+ gl_cv_c_multiarch=no
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+
+ arch=
+ prev=
+ for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+ if test -n "$prev"; then
+ case $word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$arch" || test "$arch" = "$word"; then
+ arch="$word"
+ else
+ gl_cv_c_multiarch=yes
+ fi
+ ;;
+ esac
+ prev=
+ else
+ if test "x$word" = "x-arch"; then
+ prev=arch
+ fi
+ fi
+ done
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $gl_cv_c_multiarch = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define AA_APPLE_UNIVERSAL_BUILD 1
+_ACEOF
+
+ APPLE_UNIVERSAL_BUILD=1
+ else
+ APPLE_UNIVERSAL_BUILD=0
+ fi
+
+
+
+
+
+
+
+
-echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
-echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5
+echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; }
if test "${ac_cv_header_stdbool_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -4916,7 +9996,7 @@ cat >>conftest.$ac_ext <<_ACEOF
"error: false is not 0"
#endif
#ifndef true
- "error: false is not defined"
+ "error: true is not defined"
#endif
#if true != 1
"error: true is not 1"
@@ -4930,56 +10010,87 @@ cat >>conftest.$ac_ext <<_ACEOF
char a[true == 1 ? 1 : -1];
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
- char d[(bool) -0.5 == true ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
bool e = &s;
- char f[(_Bool) -0.0 == false ? 1 : -1];
+ char f[(_Bool) 0.0 == false ? 1 : -1];
char g[true];
char h[sizeof (_Bool)];
char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ #if defined __xlc__ || defined __GNUC__
+ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+ reported by James Lemley on 2005-10-05; see
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ This test is not quite right, since xlc is allowed to
+ reject this program, as the initializer for xlcbug is
+ not one of the forms that C requires support for.
+ However, doing the test right would require a run-time
+ test, and that would make cross-compilation harder.
+ Let us hope that IBM fixes the xlc bug, and also adds
+ support for this kind of constant expression. In the
+ meantime, this test will reject xlc, which is OK, since
+ our stdbool.h substitute should suffice. We also test
+ this with GCC, where it should work, to detect more
+ quickly whether someone messes up the test in the
+ future. */
+ char digs[] = "0123456789";
+ int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+ #endif
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
int
main ()
{
- return !a + !b + !c + !d + !e + !f + !g + !h + !i;
+
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_header_stdbool_h=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_header_stdbool_h=no
+ ac_cv_header_stdbool_h=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
-echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6
- echo "$as_me:$LINENO: checking for _Bool" >&5
-echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5
+echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; }
+ { echo "$as_me:$LINENO: checking for _Bool" >&5
+echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
if test "${ac_cv_type__Bool+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -4990,50 +10101,47 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
+typedef _Bool ac__type_new_;
int
main ()
{
-if ((_Bool *) 0)
+if ((ac__type_new_ *) 0)
return 0;
-if (sizeof (_Bool))
+if (sizeof (ac__type_new_))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_cv_type__Bool=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_type__Bool=no
+ ac_cv_type__Bool=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
-echo "${ECHO_T}$ac_cv_type__Bool" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
+echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
if test $ac_cv_type__Bool = yes; then
cat >>confdefs.h <<_ACEOF
@@ -5050,84 +10158,823 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
-if test "$ac_cv_type__Bool" = no; then
- HAVE__BOOL=0
+
+ { echo "$as_me:$LINENO: checking for long long int" >&5
+echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
+if test "${ac_cv_type_long_long_int+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- HAVE__BOOL=1
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
+ ;
+ return 0;
+}
+
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ if test "$cross_compiling" = yes; then
+ ac_cv_type_long_long_int=yes
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <limits.h>
+ #ifndef LLONG_MAX
+ # define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ # define LLONG_MAX (HALF - 1 + HALF)
+ #endif
+int
+main ()
+{
+long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_long_long_int=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-if test "$ac_cv_header_stdbool_h" = no; then
- ac_config_files="$ac_config_files lib/stdbool.h:lib/stdbool_.h"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_long_long_int=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
+ if test $ac_cv_type_long_long_int = yes; then
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments. Useless!
-echo "$as_me:$LINENO: checking for working alloca.h" >&5
-echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
-if test "${ac_cv_working_alloca_h+set}" = set; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_LONG_INT 1
+_ACEOF
+
+ fi
+
+
+ { echo "$as_me:$LINENO: checking for unsigned long long int" >&5
+echo $ECHO_N "checking for unsigned long long int... $ECHO_C" >&6; }
+if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
+
+ /* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <alloca.h>
+/* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
int
main ()
{
-char *p = (char *) alloca (2 * sizeof (int));
+/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
;
return 0;
}
+
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_type_unsigned_long_long_int=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_unsigned_long_long_int=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long_int" >&5
+echo "${ECHO_T}$ac_cv_type_unsigned_long_long_int" >&6; }
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNSIGNED_LONG_LONG_INT 1
+_ACEOF
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ GNULIB_MEMMEM=0;
+ GNULIB_MEMPCPY=0;
+ GNULIB_MEMRCHR=0;
+ GNULIB_RAWMEMCHR=0;
+ GNULIB_STPCPY=0;
+ GNULIB_STPNCPY=0;
+ GNULIB_STRCHRNUL=0;
+ GNULIB_STRDUP=0;
+ GNULIB_STRNDUP=0;
+ GNULIB_STRNLEN=0;
+ GNULIB_STRPBRK=0;
+ GNULIB_STRSEP=0;
+ GNULIB_STRSTR=0;
+ GNULIB_STRCASESTR=0;
+ GNULIB_STRTOK_R=0;
+ GNULIB_MBSLEN=0;
+ GNULIB_MBSNLEN=0;
+ GNULIB_MBSCHR=0;
+ GNULIB_MBSRCHR=0;
+ GNULIB_MBSSTR=0;
+ GNULIB_MBSCASECMP=0;
+ GNULIB_MBSNCASECMP=0;
+ GNULIB_MBSPCASECMP=0;
+ GNULIB_MBSCASESTR=0;
+ GNULIB_MBSCSPN=0;
+ GNULIB_MBSPBRK=0;
+ GNULIB_MBSSPN=0;
+ GNULIB_MBSSEP=0;
+ GNULIB_MBSTOK_R=0;
+ GNULIB_STRERROR=0;
+ GNULIB_STRSIGNAL=0;
+ GNULIB_STRVERSCMP=0;
+ HAVE_DECL_MEMMEM=1;
+ HAVE_MEMPCPY=1;
+ HAVE_DECL_MEMRCHR=1;
+ HAVE_RAWMEMCHR=1;
+ HAVE_STPCPY=1;
+ HAVE_STPNCPY=1;
+ HAVE_STRCHRNUL=1;
+ HAVE_DECL_STRDUP=1;
+ HAVE_STRNDUP=1;
+ HAVE_DECL_STRNDUP=1;
+ HAVE_DECL_STRNLEN=1;
+ HAVE_STRPBRK=1;
+ HAVE_STRSEP=1;
+ HAVE_STRCASESTR=1;
+ HAVE_DECL_STRTOK_R=1;
+ HAVE_DECL_STRERROR=1;
+ HAVE_DECL_STRSIGNAL=1;
+ HAVE_STRVERSCMP=1;
+ REPLACE_MEMMEM=0;
+ REPLACE_STRDUP=0;
+ REPLACE_STRSTR=0;
+ REPLACE_STRCASESTR=0;
+ REPLACE_STRERROR=0;
+ REPLACE_STRSIGNAL=0;
+
+
+
+
+
+
+ if test -z "$ERRNO_H"; then
+ { echo "$as_me:$LINENO: checking for working strerror function" >&5
+echo $ECHO_N "checking for working strerror function... $ECHO_C" >&6; }
+if test "${gl_cv_func_working_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+return !*strerror (-2);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gl_cv_func_working_strerror=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gl_cv_func_working_strerror=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+return !*strerror (-2);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_working_alloca_h=yes
+ gl_cv_func_working_strerror=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_working_strerror=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_working_strerror" >&5
+echo "${ECHO_T}$gl_cv_func_working_strerror" >&6; }
+ if test $gl_cv_func_working_strerror = no; then
+ REPLACE_STRERROR=1
+ fi
+ else
+ REPLACE_STRERROR=1
+ fi
+ if test $REPLACE_STRERROR = 1; then
+
+ { echo "$as_me:$LINENO: checking whether strerror is declared" >&5
+echo $ECHO_N "checking whether strerror is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef strerror
+ (void) strerror;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_strerror=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_working_alloca_h=no
+ ac_cv_have_decl_strerror=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
-echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
-if test $ac_cv_working_alloca_h = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror" >&5
+echo "${ECHO_T}$ac_cv_have_decl_strerror" >&6; }
+if test $ac_cv_have_decl_strerror = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR 0
+_ACEOF
+
+
+fi
+
+
+
+
+
+
+
+
+ if test $ac_cv_header_sys_socket_h != yes; then
+
+for ac_header in winsock2.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-gnu-utils@gnu.org ##
+## ------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ fi
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_string_h='<'string.h'>'
+ else
+ { echo "$as_me:$LINENO: checking absolute name of <string.h>" >&5
+echo $ECHO_N "checking absolute name of <string.h>... $ECHO_C" >&6; }
+if test "${gl_cv_next_string_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test $ac_cv_header_string_h = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/string.h#{
+ s#.*"\(.*/string.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_string_h='<'string.h'>'
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_next_string_h" >&5
+echo "${ECHO_T}$gl_cv_next_string_h" >&6; }
+ fi
+ NEXT_STRING_H=$gl_cv_next_string_h
+
+
+
+
+{ echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
+echo $ECHO_N "checking whether stat file-mode macros are broken... $ECHO_C" >&6; }
+if test "${ac_cv_header_stat_broken+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined S_ISBLK && defined S_IFDIR
+extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+#endif
+
+#if defined S_ISBLK && defined S_IFCHR
+extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+#endif
+
+#if defined S_ISLNK && defined S_IFREG
+extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+#endif
+
+#if defined S_ISSOCK && defined S_IFREG
+extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stat_broken=no
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stat_broken=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
+echo "${ECHO_T}$ac_cv_header_stat_broken" >&6; }
+if test $ac_cv_header_stat_broken = yes; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA_H 1
+#define STAT_MACROS_BROKEN 1
_ACEOF
fi
-echo "$as_me:$LINENO: checking for alloca" >&5
-echo $ECHO_N "checking for alloca... $ECHO_C" >&6
-if test "${ac_cv_func_alloca_works+set}" = set; then
+
+
+
+ GNULIB_CHOWN=0;
+ GNULIB_CLOSE=0;
+ GNULIB_DUP2=0;
+ GNULIB_ENVIRON=0;
+ GNULIB_EUIDACCESS=0;
+ GNULIB_FCHDIR=0;
+ GNULIB_FSYNC=0;
+ GNULIB_FTRUNCATE=0;
+ GNULIB_GETCWD=0;
+ GNULIB_GETDOMAINNAME=0;
+ GNULIB_GETDTABLESIZE=0;
+ GNULIB_GETHOSTNAME=0;
+ GNULIB_GETLOGIN_R=0;
+ GNULIB_GETPAGESIZE=0;
+ GNULIB_GETUSERSHELL=0;
+ GNULIB_LCHOWN=0;
+ GNULIB_LINK=0;
+ GNULIB_LSEEK=0;
+ GNULIB_READLINK=0;
+ GNULIB_SLEEP=0;
+ GNULIB_UNISTD_H_SIGPIPE=0;
+ GNULIB_WRITE=0;
+ HAVE_DUP2=1;
+ HAVE_EUIDACCESS=1;
+ HAVE_FSYNC=1;
+ HAVE_FTRUNCATE=1;
+ HAVE_GETDOMAINNAME=1;
+ HAVE_GETDTABLESIZE=1;
+ HAVE_GETHOSTNAME=1;
+ HAVE_GETPAGESIZE=1;
+ HAVE_GETUSERSHELL=1;
+ HAVE_LINK=1;
+ HAVE_READLINK=1;
+ HAVE_SLEEP=1;
+ HAVE_DECL_ENVIRON=1;
+ HAVE_DECL_GETLOGIN_R=1;
+ HAVE_OS_H=0;
+ HAVE_SYS_PARAM_H=0;
+ REPLACE_CHOWN=0;
+ REPLACE_CLOSE=0;
+ REPLACE_FCHDIR=0;
+ REPLACE_GETCWD=0;
+ REPLACE_GETPAGESIZE=0;
+ REPLACE_LCHOWN=0;
+ REPLACE_LSEEK=0;
+ REPLACE_WRITE=0;
+ UNISTD_H_HAVE_WINSOCK2_H=0;
+
+
+
+{ echo "$as_me:$LINENO: checking whether clearerr_unlocked is declared" >&5
+echo $ECHO_N "checking whether clearerr_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_clearerr_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5136,92 +10983,338 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# ifdef _MSC_VER
-# include <malloc.h>
-# define alloca _alloca
-# else
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-# endif
-# endif
-# endif
-# endif
+$ac_includes_default
+int
+main ()
+{
+#ifndef clearerr_unlocked
+ (void) clearerr_unlocked;
#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_clearerr_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_clearerr_unlocked=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_clearerr_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_clearerr_unlocked" >&6; }
+if test $ac_cv_have_decl_clearerr_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CLEARERR_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CLEARERR_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether feof_unlocked is declared" >&5
+echo $ECHO_N "checking whether feof_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_feof_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
int
main ()
{
-char *p = (char *) alloca (1);
+#ifndef feof_unlocked
+ (void) feof_unlocked;
+#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_feof_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_feof_unlocked=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_feof_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_feof_unlocked" >&6; }
+if test $ac_cv_have_decl_feof_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FEOF_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FEOF_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether ferror_unlocked is declared" >&5
+echo $ECHO_N "checking whether ferror_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_ferror_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef ferror_unlocked
+ (void) ferror_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_ferror_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_ferror_unlocked=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_ferror_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_ferror_unlocked" >&6; }
+if test $ac_cv_have_decl_ferror_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FERROR_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FERROR_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether fflush_unlocked is declared" >&5
+echo $ECHO_N "checking whether fflush_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_fflush_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef fflush_unlocked
+ (void) fflush_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_alloca_works=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_fflush_unlocked=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_alloca_works=no
+ ac_cv_have_decl_fflush_unlocked=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
-echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fflush_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fflush_unlocked" >&6; }
+if test $ac_cv_have_decl_fflush_unlocked = yes; then
-if test $ac_cv_func_alloca_works = yes; then
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFLUSH_UNLOCKED 1
+_ACEOF
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ALLOCA 1
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFLUSH_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether fgets_unlocked is declared" >&5
+echo $ECHO_N "checking whether fgets_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_fgets_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef fgets_unlocked
+ (void) fgets_unlocked;
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_fgets_unlocked=yes
else
- # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-# that cause trouble. Some versions do not even contain alloca or
-# contain a buggy version. If you still want to use their alloca,
-# use ar to extract alloca.o from them instead of compiling alloca.c.
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_fgets_unlocked=no
+fi
-ALLOCA=alloca.$ac_objext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fgets_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fgets_unlocked" >&6; }
+if test $ac_cv_have_decl_fgets_unlocked = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define C_ALLOCA 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FGETS_UNLOCKED 1
_ACEOF
-echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
-echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
-if test "${ac_cv_os_cray+set}" = set; then
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FGETS_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether fputc_unlocked is declared" >&5
+echo $ECHO_N "checking whether fputc_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_fputc_unlocked+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5230,30 +11323,839 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
+$ac_includes_default
+int
+main ()
+{
+#ifndef fputc_unlocked
+ (void) fputc_unlocked;
#endif
+ ;
+ return 0;
+}
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "webecray" >/dev/null 2>&1; then
- ac_cv_os_cray=yes
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_fputc_unlocked=yes
else
- ac_cv_os_cray=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_fputc_unlocked=no
fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
-echo "${ECHO_T}$ac_cv_os_cray" >&6
-if test $ac_cv_os_cray = yes; then
- for ac_func in _getb67 GETB67 getb67; do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fputc_unlocked" >&6; }
+if test $ac_cv_have_decl_fputc_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTC_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTC_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether fputs_unlocked is declared" >&5
+echo $ECHO_N "checking whether fputs_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_fputs_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef fputs_unlocked
+ (void) fputs_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_fputs_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_fputs_unlocked=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fputs_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fputs_unlocked" >&6; }
+if test $ac_cv_have_decl_fputs_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTS_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTS_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether fread_unlocked is declared" >&5
+echo $ECHO_N "checking whether fread_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_fread_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef fread_unlocked
+ (void) fread_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_fread_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_fread_unlocked=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fread_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fread_unlocked" >&6; }
+if test $ac_cv_have_decl_fread_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREAD_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREAD_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether fwrite_unlocked is declared" >&5
+echo $ECHO_N "checking whether fwrite_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_fwrite_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef fwrite_unlocked
+ (void) fwrite_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_fwrite_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_fwrite_unlocked=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_fwrite_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_fwrite_unlocked" >&6; }
+if test $ac_cv_have_decl_fwrite_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FWRITE_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FWRITE_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether getchar_unlocked is declared" >&5
+echo $ECHO_N "checking whether getchar_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_getchar_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef getchar_unlocked
+ (void) getchar_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_getchar_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_getchar_unlocked=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getchar_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getchar_unlocked" >&6; }
+if test $ac_cv_have_decl_getchar_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETCHAR_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETCHAR_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether putc_unlocked is declared" >&5
+echo $ECHO_N "checking whether putc_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_putc_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef putc_unlocked
+ (void) putc_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_putc_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_putc_unlocked=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_putc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_putc_unlocked" >&6; }
+if test $ac_cv_have_decl_putc_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTC_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTC_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+{ echo "$as_me:$LINENO: checking whether putchar_unlocked is declared" >&5
+echo $ECHO_N "checking whether putchar_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_putchar_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef putchar_unlocked
+ (void) putchar_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_putchar_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_putchar_unlocked=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_putchar_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_putchar_unlocked" >&6; }
+if test $ac_cv_have_decl_putchar_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTCHAR_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTCHAR_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+ { echo "$as_me:$LINENO: checking for wint_t" >&5
+echo $ECHO_N "checking for wint_t... $ECHO_C" >&6; }
+if test "${gt_cv_c_wint_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gt_cv_c_wint_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_c_wint_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_c_wint_t" >&5
+echo "${ECHO_T}$gt_cv_c_wint_t" >&6; }
+ if test $gt_cv_c_wint_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WINT_T 1
+_ACEOF
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ if false; then
+ GL_COND_LIBTOOL_TRUE=
+ GL_COND_LIBTOOL_FALSE='#'
+else
+ GL_COND_LIBTOOL_TRUE='#'
+ GL_COND_LIBTOOL_FALSE=
+fi
+
+ gl_cond_libtool=false
+ gl_libdeps=
+ gl_ltlibdeps=
+
+
+
+
+
+
+
+
+
+ gl_source_base='lib'
+
+ # Check whether --enable-acl was given.
+if test "${enable_acl+set}" = set; then
+ enableval=$enable_acl;
+else
+ enable_acl=auto
+fi
+
+
+ LIB_ACL=
+ use_acl=0
+
+ if test "x$enable_acl" != "xno"; then
+
+for ac_header in sys/acl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-gnu-utils@gnu.org ##
+## ------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_sys_acl_h = yes; then
+ ac_save_LIBS=$LIBS
+
+ if test $use_acl = 0; then
+ { echo "$as_me:$LINENO: checking for library containing acl_get_file" >&5
+echo $ECHO_N "checking for library containing acl_get_file... $ECHO_C" >&6; }
+if test "${ac_cv_search_acl_get_file+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char acl_get_file ();
+int
+main ()
+{
+return acl_get_file ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' acl pacl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_search_acl_get_file=$ac_res
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_acl_get_file+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_acl_get_file+set}" = set; then
+ :
+else
+ ac_cv_search_acl_get_file=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_search_acl_get_file" >&5
+echo "${ECHO_T}$ac_cv_search_acl_get_file" >&6; }
+ac_res=$ac_cv_search_acl_get_file
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ if test "$ac_cv_search_acl_get_file" != "none required"; then
+ LIB_ACL=$ac_cv_search_acl_get_file
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
+ acl_free acl_from_mode acl_from_text \
+ acl_delete_def_file acl_extended_file \
+ acl_delete_fd_np acl_delete_file_np \
+ acl_copy_ext_native acl_create_entry_np \
+ acl_to_short_text acl_free_text
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5279,87 +12181,77 @@ cat >>conftest.$ac_ext <<_ACEOF
#undef $ac_func
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
#endif
int
main ()
{
-return f != $ac_func;
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define CRAY_STACKSEG_END $ac_func
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
- break
fi
+done
- done
-fi
+ # If the acl_get_file bug is detected, don't enable the ACL support.
-echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
-echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
-if test "${ac_cv_c_stack_direction+set}" = set; then
+ { echo "$as_me:$LINENO: checking for working acl_get_file" >&5
+echo $ECHO_N "checking for working acl_get_file... $ECHO_C" >&6; }
+if test "${gl_cv_func_working_acl_get_file+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then
- ac_cv_c_stack_direction=0
+ gl_cv_func_working_acl_get_file=cross-compiling
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -5367,66 +12259,222 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-int
-find_stack_direction ()
-{
- static char *addr = 0;
- auto char dummy;
- if (addr == 0)
- {
- addr = &dummy;
- return find_stack_direction ();
- }
- else
- return (&dummy > addr) ? 1 : -1;
-}
+#include <sys/types.h>
+ #include <sys/acl.h>
+ #include <errno.h>
int
main ()
{
- exit (find_stack_direction () < 0);
+return !! (!acl_get_file (".", ACL_TYPE_ACCESS)
+ && errno == ENOENT);
+ ;
+ return 0;
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_c_stack_direction=1
+ gl_cv_func_working_acl_get_file=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-ac_cv_c_stack_direction=-1
+gl_cv_func_working_acl_get_file=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+
fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_working_acl_get_file" >&5
+echo "${ECHO_T}$gl_cv_func_working_acl_get_file" >&6; }
+
+ if test $gl_cv_func_working_acl_get_file = yes; then
+ use_acl=1
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
-echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
-cat >>confdefs.h <<_ACEOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
+
+ if test $use_acl = 1; then
+
+for ac_header in acl/libacl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_header_preproc=no
fi
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
-for ac_func in vprintf
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-gnu-utils@gnu.org ##
+## ------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+for ac_func in acl_entries
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5452,76 +12500,181 @@ cat >>conftest.$ac_ext <<_ACEOF
#undef $ac_func
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
#endif
int
main ()
{
-return f != $ac_func;
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
-echo "$as_me:$LINENO: checking for _doprnt" >&5
-echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6
-if test "${ac_cv_func__doprnt+set}" = set; then
+else
+
+ gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ { echo "$as_me:$LINENO: checking for ACL_FIRST_ENTRY" >&5
+echo $ECHO_N "checking for ACL_FIRST_ENTRY... $ECHO_C" >&6; }
+if test "${gl_cv_acl_ACL_FIRST_ENTRY+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#include <sys/types.h>
+#include <sys/acl.h>
+int type = ACL_FIRST_ENTRY;
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gl_cv_acl_ACL_FIRST_ENTRY=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gl_cv_acl_ACL_FIRST_ENTRY=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
+echo "${ECHO_T}$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
+ if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACL_FIRST_ENTRY 1
+_ACEOF
+
+ fi
+ { echo "$as_me:$LINENO: checking for ACL_TYPE_EXTENDED" >&5
+echo $ECHO_N "checking for ACL_TYPE_EXTENDED... $ECHO_C" >&6; }
+if test "${gl_cv_acl_ACL_TYPE_EXTENDED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#include <sys/types.h>
+#include <sys/acl.h>
+int type = ACL_TYPE_EXTENDED;
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gl_cv_acl_ACL_TYPE_EXTENDED=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gl_cv_acl_ACL_TYPE_EXTENDED=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
+echo "${ECHO_T}$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
+ if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ACL_TYPE_EXTENDED 1
+_ACEOF
+
+ fi
+ else
+ LIB_ACL=
+ fi
+
+fi
+
+ fi
+
+ if test $use_acl = 0; then
+
+for ac_func in acl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5530,12 +12683,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define _doprnt innocuous__doprnt
+#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char _doprnt (); below.
+ which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -5545,86 +12698,164 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef _doprnt
+#undef $ac_func
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char _doprnt ();
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub__doprnt) || defined (__stub____doprnt)
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
-#else
-char (*f) () = _doprnt;
-#endif
-#ifdef __cplusplus
-}
#endif
int
main ()
{
-return f != _doprnt;
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func__doprnt=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func__doprnt=no
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
-echo "${ECHO_T}$ac_cv_func__doprnt" >&6
-if test $ac_cv_func__doprnt = yes; then
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_DOPRNT 1
+fi
+done
+
+ if test $ac_cv_func_acl = yes; then
+ { echo "$as_me:$LINENO: checking for library containing acl_trivial" >&5
+echo $ECHO_N "checking for library containing acl_trivial... $ECHO_C" >&6; }
+if test "${ac_cv_search_acl_trivial+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char acl_trivial ();
+int
+main ()
+{
+return acl_trivial ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' sec; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_search_acl_trivial=$ac_res
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_acl_trivial+set}" = set; then
+ break
fi
done
+if test "${ac_cv_search_acl_trivial+set}" = set; then
+ :
+else
+ ac_cv_search_acl_trivial=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_search_acl_trivial" >&5
+echo "${ECHO_T}$ac_cv_search_acl_trivial" >&6; }
+ac_res=$ac_cv_search_acl_trivial
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+ if test "$ac_cv_search_acl_trivial" != "none required"; then
+ LIB_ACL=$ac_cv_search_acl_trivial
+ fi
+fi
- am_getline_needs_run_time_check=no
- echo "$as_me:$LINENO: checking for getline" >&5
-echo $ECHO_N "checking for getline... $ECHO_C" >&6
-if test "${ac_cv_func_getline+set}" = set; then
+
+for ac_func in acl_trivial
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5633,12 +12864,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define getline to an innocuous variant, in case <limits.h> declares getline.
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define getline innocuous_getline
+#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char getline (); below.
+ which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -5648,150 +12879,182 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef getline
+#undef $ac_func
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char getline ();
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_getline) || defined (__stub___getline)
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
-#else
-char (*f) () = getline;
-#endif
-#ifdef __cplusplus
-}
#endif
int
main ()
{
-return f != getline;
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_getline=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_getline=no
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_getline" >&5
-echo "${ECHO_T}$ac_cv_func_getline" >&6
-if test $ac_cv_func_getline = yes; then
- am_getline_needs_run_time_check=yes
-else
- am_cv_func_working_getline=no
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
+done
- if test $am_getline_needs_run_time_check = yes; then
- echo "$as_me:$LINENO: checking for working getline function" >&5
-echo $ECHO_N "checking for working getline function... $ECHO_C" >&6
-if test "${am_cv_func_working_getline+set}" = set; then
+ use_acl=1
+ fi
+ fi
+
+ if test $use_acl = 0 || test "$ac_cv_func_acl" = yes; then
+
+for ac_func in getacl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo fooN |tr -d '\012'|tr N '\012' > conftest.data
- if test "$cross_compiling" = yes; then
- am_cv_func_working_getline=no
-else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
-# include <stdio.h>
-# include <sys/types.h>
-# include <string.h>
- int main ()
- { /* Based on a test program from Karl Heuer. */
- char *line = NULL;
- size_t siz = 0;
- int len;
- FILE *in = fopen ("./conftest.data", "r");
- if (!in)
- return 1;
- len = getline (&line, &siz, in);
- exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
- }
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- am_cv_func_working_getline=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
+ echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-( exit $ac_status )
-am_cv_func_working_getline=no
+ eval "$as_ac_var=no"
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
fi
-echo "$as_me:$LINENO: result: $am_cv_func_working_getline" >&5
-echo "${ECHO_T}$am_cv_func_working_getline" >&6
- fi
+done
- if test $am_cv_func_working_getline = no; then
- case $LIBOBJS in
- "getline.$ac_objext" | \
- *" getline.$ac_objext" | \
- "getline.$ac_objext "* | \
- *" getline.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS getline.$ac_objext" ;;
-esac
+ if test $ac_cv_func_getacl = yes; then
+ use_acl=1
+ fi
+ fi
- fi
+ if test $use_acl = 0; then
-echo "$as_me:$LINENO: checking for obstacks" >&5
-echo $ECHO_N "checking for obstacks... $ECHO_C" >&6
-if test "${ac_cv_func_obstack+set}" = set; then
+for ac_func in aclx_get
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5800,70 +13063,98 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include "obstack.h"
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-struct obstack *mem; obstack_free(mem,(char *) 0)
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_obstack=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_obstack=no
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_obstack" >&5
-echo "${ECHO_T}$ac_cv_func_obstack" >&6
-if test $ac_cv_func_obstack = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_OBSTACK 1
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
-else
- case $LIBOBJS in
- "obstack.$ac_objext" | \
- *" obstack.$ac_objext" | \
- "obstack.$ac_objext "* | \
- *" obstack.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS obstack.$ac_objext" ;;
-esac
-
fi
+done
+ if test $ac_cv_func_aclx_get = yes; then
+ use_acl=1
+ fi
+ fi
+
+ if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
- echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5
-echo $ECHO_N "checking whether mbrtowc and mbstate_t are properly declared... $ECHO_C" >&6
-if test "${ac_cv_func_mbrtowc+set}" = set; then
+for ac_func in statacl
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5872,60 +13163,299 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <wchar.h>
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-mbstate_t state; return ! (sizeof state && mbrtowc);
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_statacl = yes; then
+ use_acl=1
+ fi
+ fi
+
+ LIBS=$ac_save_LIBS
+ fi
+ if test "x$enable_acl$use_acl" = "xyes0"; then
+ { { echo "$as_me:$LINENO: error: ACLs enabled but support not detected" >&5
+echo "$as_me: error: ACLs enabled but support not detected" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define USE_ACL $use_acl
+_ACEOF
+
+ USE_ACL=$use_acl
+
+
+
+
+
+
+
+ if test $ac_cv_func_alloca_works = no; then
+ :
+ fi
+
+ # Define an additional variable used in the Makefile substitution.
+ if test $ac_cv_working_alloca_h = yes; then
+ { echo "$as_me:$LINENO: checking for alloca as a compiler built-in" >&5
+echo $ECHO_N "checking for alloca as a compiler built-in... $ECHO_C" >&6; }
+if test "${gl_cv_rpl_alloca+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+ Need own alloca
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Need own alloca" >/dev/null 2>&1; then
+ gl_cv_rpl_alloca=yes
+else
+ gl_cv_rpl_alloca=no
+fi
+rm -f conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_rpl_alloca" >&5
+echo "${ECHO_T}$gl_cv_rpl_alloca" >&6; }
+ if test $gl_cv_rpl_alloca = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
+
+ ALLOCA_H=alloca.h
+ else
+ ALLOCA_H=
+ fi
+ else
+ ALLOCA_H=alloca.h
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_btowc = no; then
+ HAVE_BTOWC=0
+ else
+
+
+
+ { echo "$as_me:$LINENO: checking whether btowc(EOF) is correct" >&5
+echo $ECHO_N "checking whether btowc(EOF) is correct... $ECHO_C" >&6; }
+if test "${gl_cv_func_btowc_eof+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ case "$host_os" in
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (btowc (EOF) != WEOF)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_func_mbrtowc=yes
+ gl_cv_func_btowc_eof=yes
else
- echo "$as_me: failed program was:" >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_mbrtowc=no
+( exit $ac_status )
+gl_cv_func_btowc_eof=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_mbrtowc" >&5
-echo "${ECHO_T}$ac_cv_func_mbrtowc" >&6
- if test $ac_cv_func_mbrtowc = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBRTOWC 1
-_ACEOF
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_btowc_eof" >&5
+echo "${ECHO_T}$gl_cv_func_btowc_eof" >&6; }
+ case "$gl_cv_func_btowc_eof" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
fi
+ if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
-echo "$as_me:$LINENO: checking for mbstate_t" >&5
-echo $ECHO_N "checking for mbstate_t... $ECHO_C" >&6
-if test "${ac_cv_type_mbstate_t+set}" = set; then
+
+ WCHAR_H=wchar.h
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_BTOWC=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for error_at_line" >&5
+echo $ECHO_N "checking for error_at_line... $ECHO_C" >&6; }
+if test "${ac_cv_lib_error_at_line+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -5934,72 +13464,106 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-# include <wchar.h>
+#include <error.h>
int
main ()
{
-mbstate_t x; return sizeof x;
+error_at_line (0, 0, "", 0, "an error occurred");
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_mbstate_t=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_lib_error_at_line=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_type_mbstate_t=no
+ ac_cv_lib_error_at_line=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_mbstate_t" >&5
-echo "${ECHO_T}$ac_cv_type_mbstate_t" >&6
- if test $ac_cv_type_mbstate_t = yes; then
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_error_at_line" >&5
+echo "${ECHO_T}$ac_cv_lib_error_at_line" >&6; }
+if test $ac_cv_lib_error_at_line = no; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MBSTATE_T 1
-_ACEOF
- else
-cat >>confdefs.h <<\_ACEOF
-#define mbstate_t int
-_ACEOF
- fi
-for ac_func in strverscmp
+ gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
+
+fi
+
+
+
+ :
+
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
+
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS exitfail.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in getdelim
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -6025,103 +13589,88 @@ cat >>conftest.$ac_ext <<_ACEOF
#undef $ac_func
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
#endif
int
main ()
{
-return f != $ac_func;
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
else
- case $LIBOBJS in
- "$ac_func.$ac_objext" | \
- *" $ac_func.$ac_objext" | \
- "$ac_func.$ac_objext "* | \
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
-esac
+
+ gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
fi
done
- if test $ac_cv_func_strverscmp = no; then
- :
- fi
+ if test $ac_cv_func_getdelim = no; then
-for ac_func in memchr memcmp memmove strerror mkstemp
+for ac_func in flockfile funlockfile
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -6147,86 +13696,354 @@ cat >>conftest.$ac_ext <<_ACEOF
#undef $ac_func
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
#endif
int
main ()
{
-return f != $ac_func;
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
+fi
+done
+
+ { echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
+echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $LIBOBJS in
- "$ac_func.$ac_objext" | \
- *" $ac_func.$ac_objext" | \
- "$ac_func.$ac_objext "* | \
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef getc_unlocked
+ (void) getc_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_getc_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_cv_have_decl_getc_unlocked=no
fi
-done
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6; }
+if test $ac_cv_have_decl_getc_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED 0
+_ACEOF
+
+
+fi
+
+
+
+ fi
+
+ if test $ac_cv_have_decl_getdelim = no; then
+ HAVE_DECL_GETDELIM=0
+ fi
+
+
+
+ GNULIB_GETDELIM=1
+
+
+
+
+
+
+
+
+
+
+
+ gl_getline_needs_run_time_check=no
+ { echo "$as_me:$LINENO: checking for getline" >&5
+echo $ECHO_N "checking for getline... $ECHO_C" >&6; }
+if test "${ac_cv_func_getline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define getline to an innocuous variant, in case <limits.h> declares getline.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define getline innocuous_getline
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getline (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef getline
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getline ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_getline || defined __stub___getline
+choke me
+#endif
+
+int
+main ()
+{
+return getline ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_getline=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_getline=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_getline" >&5
+echo "${ECHO_T}$ac_cv_func_getline" >&6; }
+if test $ac_cv_func_getline = yes; then
+ gl_getline_needs_run_time_check=yes
+else
+ am_cv_func_working_getline=no
+fi
+
+ if test $gl_getline_needs_run_time_check = yes; then
+ { echo "$as_me:$LINENO: checking for working getline function" >&5
+echo $ECHO_N "checking for working getline function... $ECHO_C" >&6; }
+if test "${am_cv_func_working_getline+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ echo fooN |tr -d '\012'|tr N '\012' > conftest.data
+ if test "$cross_compiling" = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+ Lucky GNU user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Lucky GNU user" >/dev/null 2>&1; then
+ am_cv_func_working_getline=yes
+else
+ am_cv_func_working_getline=no
+fi
+rm -f conftest*
+
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+ int main ()
+ { /* Based on a test program from Karl Heuer. */
+ char *line = NULL;
+ size_t siz = 0;
+ int len;
+ FILE *in = fopen ("./conftest.data", "r");
+ if (!in)
+ return 1;
+ len = getline (&line, &siz, in);
+ exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
+ }
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ am_cv_func_working_getline=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+am_cv_func_working_getline=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_func_working_getline" >&5
+echo "${ECHO_T}$am_cv_func_working_getline" >&6; }
+ fi
+
+ if test $ac_cv_have_decl_getline = no; then
+ HAVE_DECL_GETLINE=0
+ fi
+
+ if test $am_cv_func_working_getline = no; then
+ REPLACE_GETLINE=1
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
@@ -6244,13 +14061,12 @@ done
-for ac_func in isatty bcopy bzero isascii memcpy memset strchr strtoul popen \
- pathconf isblank fchown fchmod setlocale wcrtomb wcscoll btowc
+for ac_func in getdelim
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -6276,68 +14092,167 @@ cat >>conftest.$ac_ext <<_ACEOF
#undef $ac_func
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+ gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+
+
+
+
+ if test $ac_cv_func_getdelim = no; then
+
+
+
+for ac_func in flockfile funlockfile
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
#else
-char (*f) () = $ac_func;
+# include <assert.h>
#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
-}
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
#endif
int
main ()
{
-return f != $ac_func;
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
@@ -6346,44 +14261,308 @@ _ACEOF
fi
done
+ { echo "$as_me:$LINENO: checking whether getc_unlocked is declared" >&5
+echo $ECHO_N "checking whether getc_unlocked is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_getc_unlocked+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef getc_unlocked
+ (void) getc_unlocked;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_getc_unlocked=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_getc_unlocked=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getc_unlocked" >&5
+echo "${ECHO_T}$ac_cv_have_decl_getc_unlocked" >&6; }
+if test $ac_cv_have_decl_getc_unlocked = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED 1
+_ACEOF
-# Check whether --enable-i18n or --disable-i18n was given.
-if test "${enable_i18n+set}" = set; then
- enableval="$enable_i18n"
else
- enable_i18n=yes
-fi;
-if test "x$enable_i18n" = xno; then
- ac_cv_func_wcscoll=false
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED 0
+_ACEOF
+
+
fi
-# Check whether --with-included-regex or --without-included-regex was given.
-if test "${with_included_regex+set}" = set; then
- withval="$with_included_regex"
+ fi
+
+ if test $ac_cv_have_decl_getdelim = no; then
+ HAVE_DECL_GETDELIM=0
+ fi
+
+
+ fi
+
+
+
+ GNULIB_GETLINE=1
+
+
+
+ if test -n "$GETOPT_H"; then
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
+
+
+ GETOPT_H=getopt.h
+
+cat >>confdefs.h <<\_ACEOF
+#define __GETOPT_PREFIX rpl_
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking for gettimeofday with POSIX signature" >&5
+echo $ECHO_N "checking for gettimeofday with POSIX signature... $ECHO_C" >&6; }
+if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- with_included_regex=yes
-fi;
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/time.h>
+ struct timeval c;
-if test "x$with_included_regex" = xno; then
+int
+main ()
+{
+
+ int (*f) (struct timeval *restrict, void *restrict) = gettimeofday;
+ int x = f (&c, 0);
+ return !(x | c.tv_sec | c.tv_usec);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gl_cv_func_gettimeofday_posix_signature=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gl_cv_func_gettimeofday_posix_signature=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_posix_signature" >&5
+echo "${ECHO_T}$gl_cv_func_gettimeofday_posix_signature" >&6; }
-for ac_header in regex.h
+
+
+
+ { echo "$as_me:$LINENO: checking whether gettimeofday clobbers localtime buffer" >&5
+echo $ECHO_N "checking whether gettimeofday clobbers localtime buffer... $ECHO_C" >&6; }
+if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ gl_cv_func_gettimeofday_clobber=yes
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+ #include <sys/time.h>
+ #include <time.h>
+ #include <stdlib.h>
+
+int
+main ()
+{
+
+ time_t t = 0;
+ struct tm *lt;
+ struct tm saved_lt;
+ struct timeval tv;
+ lt = localtime (&t);
+ saved_lt = *lt;
+ gettimeofday (&tv, NULL);
+ return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_gettimeofday_clobber=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_gettimeofday_clobber=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_gettimeofday_clobber" >&5
+echo "${ECHO_T}$gl_cv_func_gettimeofday_clobber" >&6; }
+
+ if test $gl_cv_func_gettimeofday_clobber = yes; then
+ REPLACE_GETTIMEOFDAY=1
+ SYS_TIME_H=sys/time.h
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
+
+
+
+for ac_header in sys/timeb.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
else
# Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -6394,41 +14573,37 @@ $ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -6437,24 +14612,22 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -6462,9 +14635,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
+
rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -6488,25 +14662,24 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------ ##
-## Report this to bonzini@gnu.org ##
-## ------------------------------ ##
+ ( cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-gnu-utils@gnu.org ##
+## ------------------------------------ ##
_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -6519,82 +14692,286 @@ fi
done
-echo "$as_me:$LINENO: checking for re_search in -lregex" >&5
-echo $ECHO_N "checking for re_search in -lregex... $ECHO_C" >&6
-if test "${ac_cv_lib_regex_re_search+set}" = set; then
+for ac_func in _ftime
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lregex $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
-/* Override any gcc2 internal prototype to avoid an error. */
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char re_search ();
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-re_search ();
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define gmtime rpl_gmtime
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define localtime rpl_localtime
+_ACEOF
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1
+_ACEOF
+
+ fi
+
+
+ if test $gl_cv_func_gettimeofday_posix_signature != yes; then
+ REPLACE_GETTIMEOFDAY=1
+ SYS_TIME_H=sys/time.h
+ if test $gl_cv_func_gettimeofday_clobber != yes; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
+
+
+
+for ac_header in sys/timeb.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_regex_re_search=yes
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_lib_regex_re_search=no
+ ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-gnu-utils@gnu.org ##
+## ------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_regex_re_search" >&5
-echo "${ECHO_T}$ac_cv_lib_regex_re_search" >&6
-if test $ac_cv_lib_regex_re_search = yes; then
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBREGEX 1
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
- LIBS="-lregex $LIBS"
-
fi
- echo "$as_me:$LINENO: checking for re_search" >&5
-echo $ECHO_N "checking for re_search... $ECHO_C" >&6
-if test "${ac_cv_func_re_search+set}" = set; then
+done
+
+
+for ac_func in _ftime
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -6603,12 +14980,12 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define re_search to an innocuous variant, in case <limits.h> declares re_search.
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define re_search innocuous_re_search
+#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char re_search (); below.
+ which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
@@ -6618,500 +14995,2176 @@ cat >>conftest.$ac_ext <<_ACEOF
# include <assert.h>
#endif
-#undef re_search
+#undef $ac_func
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char re_search ();
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_re_search) || defined (__stub___re_search)
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
-#else
-char (*f) () = re_search;
-#endif
-#ifdef __cplusplus
-}
#endif
int
main ()
{
-return f != re_search;
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_re_search=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_func_re_search=no
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_re_search" >&5
-echo "${ECHO_T}$ac_cv_func_re_search" >&6
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
- if test $ac_cv_header_regex_h = no || test $ac_cv_func_re_search = no; then
- { echo "$as_me:$LINENO: WARNING: GNU regex not found, falling back to the included version" >&5
-echo "$as_me: WARNING: GNU regex not found, falling back to the included version" >&2;}
- with_included_regex=yes
+ fi
fi
+
+
+
+ { echo "$as_me:$LINENO: checking whether the compiler generally respects inline" >&5
+echo $ECHO_N "checking whether the compiler generally respects inline... $ECHO_C" >&6; }
+if test "${gl_cv_c_inline_effective+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test $ac_cv_c_inline = no; then
+ gl_cv_c_inline_effective=no
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifdef __NO_INLINE__
+ #error "inline is not effective"
+ #endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gl_cv_c_inline_effective=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gl_cv_c_inline_effective=no
fi
-# Check whether --enable-regex-tests or --disable-regex-tests was given.
-if test "${enable_regex_tests+set}" = set; then
- enableval="$enable_regex_tests"
- if test "x$with_included_regex" = xno; then
- enable_regex_tests=no
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
fi
+{ echo "$as_me:$LINENO: result: $gl_cv_c_inline_effective" >&5
+echo "${ECHO_T}$gl_cv_c_inline_effective" >&6; }
+ if test $gl_cv_c_inline_effective = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INLINE 1
+_ACEOF
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_lstat = yes; then
+ { echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5
+echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6; }
+if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- enable_regex_tests=$with_included_regex
-fi;
+ rm -f conftest.sym conftest.file
+echo >conftest.file
+if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_lstat_dereferences_slashed_symlink=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+struct stat sbuf;
+ /* Linux will dereference the symlink and fail.
+ That is better in the sense that it means we will not
+ have to compile and use the lstat wrapper. */
+ return lstat ("conftest.sym/", &sbuf) == 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_lstat_dereferences_slashed_symlink=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+( exit $ac_status )
+ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
-if test "x$enable_regex_tests" != xno; then
- TEST_REGEX_TRUE=
- TEST_REGEX_FALSE='#'
else
- TEST_REGEX_TRUE='#'
- TEST_REGEX_FALSE=
+ # If the `ln -s' command failed, then we probably don't even
+ # have an lstat function.
+ ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f conftest.sym conftest.file
+
fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
+echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
-if test "x$with_included_regex" != xno; then
- ac_config_links="$ac_config_links lib/regex.h:lib/regex_.h"
+test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
- case $LIBOBJS in
- "regex.$ac_objext" | \
- *" regex.$ac_objext" | \
- "regex.$ac_objext "* | \
- *" regex.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS regex.$ac_objext" ;;
+cat >>confdefs.h <<_ACEOF
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+_ACEOF
+
+
+if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
+
+fi
+
+ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+ REPLACE_LSTAT=1
+ fi
+ # Prerequisites of lib/lstat.c.
+
+ fi
+
+
+
+ GNULIB_LSTAT=1
+
+
+for ac_header in stdlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_header_compiler=no
fi
-if test "x$enable_regex_tests" = xyes; then
-cat >>confdefs.h <<_ACEOF
-#define _REGEX_RE_COMP 1
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_header_preproc=no
fi
-# Check whether --enable-html or --disable-html was given.
-if test "${enable_html+set}" = set; then
- enableval="$enable_html"
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-gnu-utils@gnu.org ##
+## ------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- enable_html=no
-fi;
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+fi
-if test "x$enable_html" != xno; then
- BUILD_HTML_TRUE=
- BUILD_HTML_FALSE='#'
+done
+
+{ echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
+echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; }
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_malloc_0_nonnull=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_malloc_0_nonnull=yes
else
- BUILD_HTML_TRUE='#'
- BUILD_HTML_FALSE=
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-: ${TEXI2HTML=texi2html -monolithic}
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
+echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MALLOC 1
+_ACEOF
-echo "$as_me:$LINENO: checking how to build HTML documentation" >&5
-echo $ECHO_N "checking how to build HTML documentation... $ECHO_C" >&6
-if eval $am_missing_run makeinfo --help 2>&1 | grep .-html > /dev/null; then
- echo "$as_me:$LINENO: result: with makeinfo" >&5
-echo "${ECHO_T}with makeinfo" >&6
- enable_html=makeinfo
else
- if $TEXI2HTML --help 2>&1 | grep monolithic > /dev/null; then
- echo "$as_me:$LINENO: result: with texi2html" >&5
-echo "${ECHO_T}with texi2html" >&6
- enable_html=texi2html
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MALLOC 0
+_ACEOF
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
+
+
+cat >>confdefs.h <<\_ACEOF
+#define malloc rpl_malloc
+_ACEOF
+
+fi
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define GNULIB_MALLOC_GNU 1
+_ACEOF
+
+
+
+ if test $gl_cv_func_malloc_posix = yes; then
+ HAVE_MALLOC_POSIX=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MALLOC_POSIX 1
+_ACEOF
+
else
- echo "$as_me:$LINENO: result: not built" >&5
-echo "${ECHO_T}not built" >&6
- if test "x$enable_html" != xno; then
- { { echo "$as_me:$LINENO: error: cannot build HTML documentation" >&5
-echo "$as_me: error: cannot build HTML documentation" >&2;}
- { (exit install makeinfo 4.0 or texi2html); exit install makeinfo 4.0 or texi2html; }; }
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
+
+ HAVE_MALLOC_POSIX=0
+ fi
+
+
+
+
+ GNULIB_MALLOC_POSIX=1
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbrlen = no; then
+ HAVE_MBRLEN=0
+ else
+ if test $REPLACE_MBRTOWC = 1; then
+ REPLACE_MBRLEN=1
fi
- enable_html=no
fi
-fi
+ if test $HAVE_MBRLEN = 0 || test $REPLACE_MBRLEN = 1; then
+
+
+ WCHAR_H=wchar.h
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS mbrlen.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_MBRLEN=1
-if test "x$enable_html" = xmakeinfo; then
- MAKEINFO_HTML_TRUE=
- MAKEINFO_HTML_FALSE='#'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5
+echo $ECHO_N "checking whether mbrtowc handles incomplete characters... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_mbrtowc_incomplete_state=yes
else
- MAKEINFO_HTML_TRUE='#'
- MAKEINFO_HTML_FALSE=
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5
+echo $ECHO_N "checking whether mbrtowc works as well as mbtowc... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
-if test "x$enable_html" = xtexi2html; then
- TEXI2HTML_HTML_TRUE=
- TEXI2HTML_HTML_FALSE='#'
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_mbrtowc_sanitycheck=yes
else
- TEXI2HTML_HTML_TRUE='#'
- TEXI2HTML_HTML_FALSE=
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
-MKINSTALLDIRS="$mkdir_p"
+ WCHAR_H=wchar.h
+ fi
- # Extract the first word of "msgfmt", so it can be a program name with args.
-set dummy msgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGFMT+set}" = set; then
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBRTOWC=1
+ fi
+
+
+
+
+
+
+ if test $ac_cv_func_mbrtowc = no; then
+ HAVE_MBRTOWC=0
+ fi
+ if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
+
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc handles a NULL string argument" >&5
+echo $ECHO_N "checking whether mbrtowc handles a NULL string argument... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$MSGFMT" in
- /*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
- (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
- ;;
+
+ case "$host_os" in
+ # Guess no on OSF/1.
+ osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
+ esac
+ if test $LOCALE_FR_UTF8 != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+ int ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ mbrtowc (&wc, NULL, 5, &state);
+ /* Check that wc was not modified. */
+ if (wc != (wchar_t) 0xBADFACE)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test "$MSGFMT" != ":"; then
- echo "$as_me:$LINENO: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_mbrtowc_null_arg=yes
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mbrtowc_null_arg=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
+
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_null_arg" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_null_arg" >&6; }
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc has a correct return value" >&5
+echo $ECHO_N "checking whether mbrtowc has a correct return value... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_retval+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $GMSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
- ;;
- *)
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
+ case "$host_os" in
+ # Guess no on HP-UX and Solaris.
+ hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris. */
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+ return 1;
+ }
+ }
+ /* This fails on HP-UX 11.11. */
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+ return 1;
+ }
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_mbrtowc_retval=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mbrtowc_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-if test -n "$GMSGFMT"; then
- echo "$as_me:$LINENO: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+
+ fi
+
fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_retval" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_retval" >&6; }
- # Extract the first word of "xgettext", so it can be a program name with args.
-set dummy xgettext; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
+echo $ECHO_N "checking whether mbrtowc returns 0 when parsing a NUL character... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$XGETTEXT" in
- /*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
- (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
+
+ case "$host_os" in
+ # Guess no on Solaris 8 and 9.
+ solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8 and 9. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "", 1, &state) != 0)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test "$XGETTEXT" != ":"; then
- echo "$as_me:$LINENO: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_mbrtowc_nul_retval=yes
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mbrtowc_nul_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
- rm -f messages.po
- # Extract the first word of "msgmerge", so it can be a program name with args.
-set dummy msgmerge; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_nul_retval" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_nul_retval" >&6; }
+
+ case "$gl_cv_func_mbrtowc_null_arg" in
+ *yes) ;;
+ *)
+cat >>confdefs.h <<\_ACEOF
+#define MBRTOWC_NULL_ARG_BUG 1
+_ACEOF
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_retval" in
+ *yes) ;;
+ *)
+cat >>confdefs.h <<\_ACEOF
+#define MBRTOWC_RETVAL_BUG 1
+_ACEOF
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_nul_retval" in
+ *yes) ;;
+ *)
+cat >>confdefs.h <<\_ACEOF
+#define MBRTOWC_NUL_RETVAL_BUG 1
+_ACEOF
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ fi
+ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+
+
+ WCHAR_H=wchar.h
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_MBRTOWC=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc handles incomplete characters" >&5
+echo $ECHO_N "checking whether mbrtowc handles incomplete characters... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case "$MSGMERGE" in
- /*)
- ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
- ac_cv_path_MSGMERGE="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
- ;;
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_mbrtowc_incomplete_state=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mbrtowc_incomplete_state=no
fi
-MSGMERGE="$ac_cv_path_MSGMERGE"
-if test "$MSGMERGE" != ":"; then
- echo "$as_me:$LINENO: result: $MSGMERGE" >&5
-echo "${ECHO_T}$MSGMERGE" >&6
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether mbrtowc works as well as mbtowc" >&5
+echo $ECHO_N "checking whether mbrtowc works as well as mbtowc... $ECHO_C" >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_mbrtowc_sanitycheck=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
- if test "$GMSGFMT" != ":"; then
- if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
- (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- : ;
- else
- GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
- echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
-echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6
- GMSGFMT=":"
- fi
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+echo "${ECHO_T}$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
fi
+ if test $REPLACE_MBSTATE_T = 1; then
+
+
+ WCHAR_H=wchar.h
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
- (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
- : ;
- else
- echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
-echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
- XGETTEXT=":"
- fi
- rm -f messages.po
fi
- ac_config_commands="$ac_config_commands default-1"
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBSINIT=1
+ fi
-# Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
- { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
-if test "${ac_cv_build+set}" = set; then
+
+
+
+ if test $ac_cv_func_mbsinit = no; then
+ HAVE_MBSINIT=0
+ fi
+ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+
+
+ WCHAR_H=wchar.h
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_MBSINIT=1
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking for working mkstemp" >&5
+echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6; }
+if test "${gl_cv_func_working_mkstemp+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
- ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
- { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
- { (exit 1); exit 1; }; }
+ mkdir conftest.mkstemp
+ if test "$cross_compiling" = yes; then
+ gl_cv_func_working_mkstemp=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+int i;
+ off_t large = (off_t) 4294967295u;
+ if (large < 0)
+ large = 2147483647;
+ for (i = 0; i < 70; i++)
+ {
+ char templ[] = "conftest.mkstemp/coXXXXXX";
+ int (*mkstemp_function) (char *) = mkstemp;
+ int fd = mkstemp_function (templ);
+ if (fd < 0 || lseek (fd, large, SEEK_SET) != large)
+ return 1;
+ close (fd);
+ }
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_working_mkstemp=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_working_mkstemp=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
-if test "${ac_cv_host+set}" = set; then
+ rm -rf conftest.mkstemp
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_working_mkstemp" >&5
+echo "${ECHO_T}$gl_cv_func_working_mkstemp" >&6; }
+
+ if test $gl_cv_func_working_mkstemp != yes; then
+ REPLACE_MKSTEMP=1
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext"
+
+
+
+ fi
+
+
+
+ GNULIB_MKSTEMP=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for obstacks" >&5
+echo $ECHO_N "checking for obstacks... $ECHO_C" >&6; }
+if test "${ac_cv_func_obstack+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
- ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
- { (exit 1); exit 1; }; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+ #include "obstack.h"
+int
+main ()
+{
+struct obstack mem;
+ #define obstack_chunk_alloc malloc
+ #define obstack_chunk_free free
+ obstack_init (&mem);
+ obstack_free (&mem, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_obstack=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_cv_func_obstack=no
fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
-host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_obstack" >&5
+echo "${ECHO_T}$ac_cv_func_obstack" >&6; }
+if test $ac_cv_func_obstack = yes; then
-echo "$as_me:$LINENO: checking for inline" >&5
-echo $ECHO_N "checking for inline... $ECHO_C" >&6
-if test "${ac_cv_c_inline+set}" = set; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_OBSTACK 1
+_ACEOF
+
+else
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS quote.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS quotearg.$ac_objext"
+
+
+
+
+ if test $gl_cv_func_malloc_posix = yes; then
+ HAVE_REALLOC_POSIX=1
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_REALLOC_POSIX 1
+_ACEOF
+
+ else
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
+
+ HAVE_REALLOC_POSIX=0
+ fi
+
+
+
+
+ GNULIB_REALLOC_POSIX=1
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-included-regex was given.
+if test "${with_included_regex+set}" = set; then
+ withval=$with_included_regex;
+fi
+
+
+ case $with_included_regex in #(
+ yes|no) ac_use_included_regex=$with_included_regex
+ ;;
+ '')
+ # If the system regex support is good enough that it passes the
+ # following run test, then default to *not* using the included regex.c.
+ # If cross compiling, assume the test would fail and use the included
+ # regex.c.
+ { echo "$as_me:$LINENO: checking for working re_compile_pattern" >&5
+echo $ECHO_N "checking for working re_compile_pattern... $ECHO_C" >&6; }
+if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_cv_c_inline=no
-for ac_kw in inline __inline__ __inline; do
+ if test "$cross_compiling" = yes; then
+ gl_cv_func_re_compile_pattern_working=no
+else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* 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
+$ac_includes_default
+ #if HAVE_LOCALE_H
+ #include <locale.h>
+ #endif
+ #include <limits.h>
+ #include <regex.h>
+
+int
+main ()
+{
+static struct re_pattern_buffer regex;
+ unsigned char folded_chars[UCHAR_MAX + 1];
+ int i;
+ const char *s;
+ struct re_registers regs;
+
+ #if HAVE_LOCALE_H
+ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ This test needs valgrind to catch the bug on Debian
+ GNU/Linux 3.1 x86, but it might catch the bug better
+ on other platforms and it shouldn't hurt to try the
+ test here. */
+ if (setlocale (LC_ALL, "en_US.UTF-8"))
+ {
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ return 1;
+ if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ return 1;
+ if (! setlocale (LC_ALL, "C"))
+ return 1;
+ }
+ #endif
+
+ /* This test is from glibc bug 3957, reported by Andrew Mackey. */
+ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[^x]b", 6, &regex);
+ if (s)
+ return 1;
+
+ /* This should fail, but succeeds for glibc-2.5. */
+ if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+ return 1;
+
+ /* This regular expression is from Spencer ere test number 75
+ in grep-2.3. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ for (i = 0; i <= UCHAR_MAX; i++)
+ folded_chars[i] = i;
+ regex.translate = folded_chars;
+ s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
+ /* This should fail with _Invalid character class name_ error. */
+ if (!s)
+ return 1;
+
+ /* This should succeed, but does not for glibc-2.1.3. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("{1", 2, &regex);
+
+ if (s)
+ return 1;
+
+ /* The following example is derived from a problem report
+ against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[an\371]*n", 7, &regex);
+ if (s)
+ return 1;
+
+ /* This should match, but does not for glibc-2.2.1. */
+ if (re_match (&regex, "an", 2, 0, &regs) != 2)
+ return 1;
+
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ /* glibc-2.2.93 does not work with a negative RANGE argument. */
+ if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+ return 1;
+
+ /* The version of regex.c in older versions of gnulib
+ ignored RE_ICASE. Detect that problem too. */
+ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+ return 1;
+
+ /* Catch a bug reported by Vin Shelton in
+ http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+ */
+ re_set_syntax (RE_SYNTAX_POSIX_BASIC
+ & ~RE_CONTEXT_INVALID_DUP
+ & ~RE_NO_EMPTY_RANGES);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+ if (s)
+ return 1;
+
+ /* REG_STARTEND was added to glibc on 2004-01-15.
+ Reject older versions. */
+ if (! REG_STARTEND)
+ return 1;
+
+ /* Reject hosts whose regoff_t values are too narrow.
+ These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
+ and 32-bit int. */
+ if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+ || sizeof (regoff_t) < sizeof (ssize_t))
+ return 1;
+
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_re_compile_pattern_working=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_re_compile_pattern_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_re_compile_pattern_working" >&5
+echo "${ECHO_T}$gl_cv_func_re_compile_pattern_working" >&6; }
+ case $gl_cv_func_re_compile_pattern_working in #(
+ yes) ac_use_included_regex=no;; #(
+ no) ac_use_included_regex=yes;;
+ esac
+ ;;
+ *) { { echo "$as_me:$LINENO: error: Invalid value for --with-included-regex: $with_included_regex" >&5
+echo "$as_me: error: Invalid value for --with-included-regex: $with_included_regex" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+
+ if test $ac_use_included_regex = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _REGEX_LARGE_OFFSETS 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_syntax_options rpl_re_syntax_options
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_set_syntax rpl_re_set_syntax
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_compile_pattern rpl_re_compile_pattern
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_compile_fastmap rpl_re_compile_fastmap
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_search rpl_re_search
+_ACEOF
+
+cat >>confdefs.h <<\_ACEOF
+#define re_search_2 rpl_re_search_2
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_match rpl_re_match
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_match_2 rpl_re_match_2
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_set_registers rpl_re_set_registers
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_comp rpl_re_comp
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define re_exec rpl_re_exec
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define regcomp rpl_regcomp
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define regexec rpl_regexec
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define regerror rpl_regerror
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define regfree rpl_regfree
+_ACEOF
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
+
+
+
+
+
+
+for ac_header in libintl.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_inline=$ac_kw; break
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-gnu-utils@gnu.org ##
+## ------------------------------------ ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
-echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
-echo "${ECHO_T}$ac_cv_c_inline" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
-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
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether isblank is declared" >&5
+echo $ECHO_N "checking whether isblank is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_isblank+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+
+int
+main ()
+{
+#ifndef isblank
+ (void) isblank;
#endif
+
+ ;
+ return 0;
+}
_ACEOF
- ;;
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_isblank=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_isblank=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isblank" >&5
+echo "${ECHO_T}$ac_cv_have_decl_isblank" >&6; }
+if test $ac_cv_have_decl_isblank = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ISBLANK 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ISBLANK 0
+_ACEOF
+
+
+fi
+
+
+
+ fi
+
-echo "$as_me:$LINENO: checking for off_t" >&5
-echo $ECHO_N "checking for off_t... $ECHO_C" >&6
-if test "${ac_cv_type_off_t+set}" = set; then
+ { echo "$as_me:$LINENO: checking for ssize_t" >&5
+echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
+if test "${gt_cv_ssize_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -7120,78 +17173,505 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#include <sys/types.h>
int
main ()
{
-if ((off_t *) 0)
- return 0;
-if (sizeof (off_t))
+int x = sizeof (ssize_t *) + sizeof (ssize_t);
+ return !x;
+ ;
return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gt_cv_ssize_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_ssize_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_ssize_t" >&5
+echo "${ECHO_T}$gt_cv_ssize_t" >&6; }
+ if test $gt_cv_ssize_t = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ssize_t int
+_ACEOF
+
+ fi
+
+
+
+
+ # Define two additional variables used in the Makefile substitution.
+
+ if test "$ac_cv_header_stdbool_h" = yes; then
+ STDBOOL_H=''
+ else
+ STDBOOL_H='stdbool.h'
+ fi
+
+
+ if test "$ac_cv_type__Bool" = yes; then
+ HAVE__BOOL=1
+ else
+ HAVE__BOOL=0
+ fi
+
+
+
+
+
+ if test $ac_cv_type_long_long_int = yes; then
+ HAVE_LONG_LONG_INT=1
+ else
+ HAVE_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ HAVE_UNSIGNED_LONG_LONG_INT=1
+ else
+ HAVE_UNSIGNED_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ HAVE_INTTYPES_H=1
+ else
+ HAVE_INTTYPES_H=0
+ fi
+
+
+ if test $ac_cv_header_sys_types_h = yes; then
+ HAVE_SYS_TYPES_H=1
+ else
+ HAVE_SYS_TYPES_H=0
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ else
+ { echo "$as_me:$LINENO: checking absolute name of <stdint.h>" >&5
+echo $ECHO_N "checking absolute name of <stdint.h>... $ECHO_C" >&6; }
+if test "${gl_cv_next_stdint_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test $ac_cv_header_stdint_h = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdint.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdint.h#{
+ s#.*"\(.*/stdint.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_next_stdint_h" >&5
+echo "${ECHO_T}$gl_cv_next_stdint_h" >&6; }
+ fi
+ NEXT_STDINT_H=$gl_cv_next_stdint_h
+
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ HAVE_STDINT_H=1
+ else
+ HAVE_STDINT_H=0
+ fi
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ { echo "$as_me:$LINENO: checking whether stdint.h conforms to C99" >&5
+echo $ECHO_N "checking whether stdint.h conforms to C99... $ECHO_C" >&6; }
+if test "${gl_cv_header_working_stdint_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ gl_cv_header_working_stdint_h=no
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+struct s {
+ int check_PTRDIFF:
+ PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+ && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+ ? 1 : -1;
+ /* Detect bug in FreeBSD 6.0 / ia64. */
+ int check_SIG_ATOMIC:
+ SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+ && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+ ? 1 : -1;
+ int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+ int check_WCHAR:
+ WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+ && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+ ? 1 : -1;
+ /* Detect bug in mingw. */
+ int check_WINT:
+ WINT_MIN == TYPE_MINIMUM (wint_t)
+ && WINT_MAX == TYPE_MAXIMUM (wint_t)
+ ? 1 : -1;
+
+ /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
+ int check_UINT8_C:
+ (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+ int check_UINT16_C:
+ (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+ /* Detect bugs in OpenBSD 3.9 stdint.h. */
+#ifdef UINT8_MAX
+ int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+ int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+ int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+ int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+ int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+ int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+ int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+ int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+ int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+ int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+ int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+ int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+ int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+ int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+ int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+
+int
+main ()
+{
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ if test "$cross_compiling" = yes; then
+ gl_cv_header_working_stdint_h=yes
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+ {
+#ifdef INT8_MAX
+ MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+ MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+ MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+ MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+ MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+ MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+ MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+ MVAL (UINT64_MAX),
+#endif
+ NULL
+ };
+
+int
+main ()
+{
+
+ const char **mv;
+ for (mv = macro_values; *mv != NULL; mv++)
+ {
+ const char *value = *mv;
+ /* Test whether it looks like a cast expression. */
+ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+ || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+ || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+ || strncmp (value, "((int)"/*)*/, 6) == 0
+ || strncmp (value, "((signed short)"/*)*/, 15) == 0
+ || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+ return 1;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_type_off_t=yes
+ gl_cv_header_working_stdint_h=yes
else
- echo "$as_me: failed program was:" >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_type_off_t=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
-echo "${ECHO_T}$ac_cv_type_off_t" >&6
-if test $ac_cv_type_off_t = yes; then
- :
+
+
+
else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-cat >>confdefs.h <<_ACEOF
-#define off_t long
-_ACEOF
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_header_working_stdint_h" >&5
+echo "${ECHO_T}$gl_cv_header_working_stdint_h" >&6; }
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=
+ else
-for ac_header in stdlib.h unistd.h
+for ac_header in sys/inttypes.h sys/bitypes.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
else
# Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7202,41 +17682,37 @@ $ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ ac_header_compiler=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@@ -7245,24 +17721,22 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
@@ -7270,9 +17744,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
+
rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
@@ -7296,25 +17771,24 @@ echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------ ##
-## Report this to bonzini@gnu.org ##
-## ------------------------------ ##
+ ( cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-gnu-utils@gnu.org ##
+## ------------------------------------ ##
_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ ) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
@@ -7326,13 +17800,1432 @@ fi
done
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ else
+ HAVE_SYS_INTTYPES_H=0
+ fi
+
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ else
+ HAVE_SYS_BITYPES_H=0
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
-for ac_func in getpagesize
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { echo "$as_me:$LINENO: checking for bit size of $gltype" >&5
+echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6; }
+if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) result=$ac_lo;;
+'') result=unknown ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+static long int longval () { return sizeof ($gltype) * CHAR_BIT; }
+static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if ((sizeof ($gltype) * CHAR_BIT) < 0)
+ {
+ long int i = longval ();
+ if (i != (sizeof ($gltype) * CHAR_BIT))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != (sizeof ($gltype) * CHAR_BIT))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ result=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+result=unknown
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+ac_res=`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+ fi
+
+
+
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { echo "$as_me:$LINENO: checking for bit size of $gltype" >&5
+echo $ECHO_N "checking for bit size of $gltype... $ECHO_C" >&6; }
+if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+int
+main ()
+{
+static int test_array [1 - 2 * !((sizeof ($gltype) * CHAR_BIT) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) result=$ac_lo;;
+'') result=unknown ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>
+static long int longval () { return sizeof ($gltype) * CHAR_BIT; }
+static unsigned long int ulongval () { return sizeof ($gltype) * CHAR_BIT; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if ((sizeof ($gltype) * CHAR_BIT) < 0)
+ {
+ long int i = longval ();
+ if (i != (sizeof ($gltype) * CHAR_BIT))
+ return 1;
+ fprintf (f, "%ld\n", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != (sizeof ($gltype) * CHAR_BIT))
+ return 1;
+ fprintf (f, "%lu\n", i);
+ }
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ result=`cat conftest.val`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+result=unknown
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+ac_res=`eval echo '${'gl_cv_bitsizeof_${gltype}'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+
+
+
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { echo "$as_me:$LINENO: checking whether $gltype is signed" >&5
+echo $ECHO_N "checking whether $gltype is signed... $ECHO_C" >&6; }
+if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ result=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ result=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval gl_cv_type_${gltype}_signed=\$result
+
+fi
+ac_res=`eval echo '${'gl_cv_type_${gltype}_signed'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+ eval result=\$gl_cv_type_${gltype}_signed
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if test "$result" = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGNED_${GLTYPE} 1
+_ACEOF
+
+ eval HAVE_SIGNED_${GLTYPE}=1
+ else
+ eval HAVE_SIGNED_${GLTYPE}=0
+ fi
+ done
+
+
+ gl_cv_type_ptrdiff_t_signed=yes
+ gl_cv_type_size_t_signed=no
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5
+echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6; }
+if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+ac_res=`eval echo '${'gl_cv_type_${gltype}_suffix'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+ fi
+
+
+
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { echo "$as_me:$LINENO: checking for $gltype integer literal suffix" >&5
+echo $ECHO_N "checking for $gltype integer literal suffix... $ECHO_C" >&6; }
+if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+ac_res=`eval echo '${'gl_cv_type_${gltype}_suffix'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+
+ STDINT_H=stdint.h
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdio_h='<'stdio.h'>'
+ else
+ { echo "$as_me:$LINENO: checking absolute name of <stdio.h>" >&5
+echo $ECHO_N "checking absolute name of <stdio.h>... $ECHO_C" >&6; }
+if test "${gl_cv_next_stdio_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test $ac_cv_header_stdio_h = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdio.h#{
+ s#.*"\(.*/stdio.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdio_h='<'stdio.h'>'
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_next_stdio_h" >&5
+echo "${ECHO_T}$gl_cv_next_stdio_h" >&6; }
+ fi
+ NEXT_STDIO_H=$gl_cv_next_stdio_h
+
+
+
+ GNULIB_FPRINTF=1
+ GNULIB_PRINTF=1
+ GNULIB_VFPRINTF=1
+ GNULIB_VPRINTF=1
+ GNULIB_FPUTC=1
+ GNULIB_PUTC=1
+ GNULIB_PUTCHAR=1
+ GNULIB_FPUTS=1
+ GNULIB_PUTS=1
+ GNULIB_FWRITE=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdlib_h='<'stdlib.h'>'
+ else
+ { echo "$as_me:$LINENO: checking absolute name of <stdlib.h>" >&5
+echo $ECHO_N "checking absolute name of <stdlib.h>... $ECHO_C" >&6; }
+if test "${gl_cv_next_stdlib_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test $ac_cv_header_stdlib_h = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdlib.h#{
+ s#.*"\(.*/stdlib.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdlib_h='<'stdlib.h'>'
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_next_stdlib_h" >&5
+echo "${ECHO_T}$gl_cv_next_stdlib_h" >&6; }
+ fi
+ NEXT_STDLIB_H=$gl_cv_next_stdlib_h
+
+
+
+
+for ac_header in random.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_random_h = yes; then
+ HAVE_RANDOM_H=1
+ else
+ HAVE_RANDOM_H=0
+ fi
+
+ { echo "$as_me:$LINENO: checking for struct random_data" >&5
+echo $ECHO_N "checking for struct random_data... $ECHO_C" >&6; }
+if test "${ac_cv_type_struct_random_data+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+ #if HAVE_RANDOM_H
+ # include <random.h>
+ #endif
+
+
+typedef struct random_data ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_struct_random_data=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_struct_random_data=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_random_data" >&5
+echo "${ECHO_T}$ac_cv_type_struct_random_data" >&6; }
+if test $ac_cv_type_struct_random_data = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_RANDOM_DATA 1
+_ACEOF
+
+
+else
+ HAVE_STRUCT_RANDOM_DATA=0
+fi
+
+
+
+
+ if test $REPLACE_STRERROR = 1; then
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
+
+
+cat >>confdefs.h <<_ACEOF
+#define REPLACE_STRERROR $REPLACE_STRERROR
+_ACEOF
+
+ fi
+
+
+
+ GNULIB_STRERROR=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in strverscmp
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -7358,83 +19251,164 @@ cat >>conftest.$ac_ext <<_ACEOF
#undef $ac_func
-/* Override any gcc2 internal prototype to avoid an error. */
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
-{
#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
#endif
int
main ()
{
-return f != $ac_func;
+return $ac_func ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ eval "$as_ac_var=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
+else
+
+ gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
+
fi
done
-echo "$as_me:$LINENO: checking for working mmap" >&5
-echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
-if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+
+ if test $ac_cv_func_strverscmp = no; then
+
+ :
+
+ HAVE_STRVERSCMP=0
+ fi
+
+
+
+ GNULIB_STRVERSCMP=1
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_lstat = yes; then
+ HAVE_LSTAT=1
+ else
+ HAVE_LSTAT=0
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+ else
+ { echo "$as_me:$LINENO: checking absolute name of <sys/stat.h>" >&5
+echo $ECHO_N "checking absolute name of <sys/stat.h>... $ECHO_C" >&6; }
+if test "${gl_cv_next_sys_stat_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if test "$cross_compiling" = yes; then
- ac_cv_func_mmap_fixed_mapped=no
+
+ if test $ac_cv_header_sys_stat_h = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sys/stat.h#{
+ s#.*"\(.*/sys/stat.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_next_sys_stat_h" >&5
+echo "${ECHO_T}$gl_cv_next_sys_stat_h" >&6; }
+ fi
+ NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
+
+
+
+ SYS_STAT_H='sys/stat.h'
+
+
+ { echo "$as_me:$LINENO: checking for nlink_t" >&5
+echo $ECHO_N "checking for nlink_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_nlink_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -7442,171 +19416,1169 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-/* malloc might have been renamed as rpl_malloc. */
-#undef malloc
-
-/* Thanks to Mike Haertel and Jim Avera for this test.
- Here is a matrix of mmap possibilities:
- mmap private not fixed
- mmap private fixed at somewhere currently unmapped
- mmap private fixed at somewhere already mapped
- mmap shared not fixed
- mmap shared fixed at somewhere currently unmapped
- mmap shared fixed at somewhere already mapped
- For private mappings, we should verify that changes cannot be read()
- back from the file, nor mmap's back from the file at a different
- address. (There have been systems where private was not correctly
- implemented like the infamous i386 svr4.0, and systems where the
- VM page cache was not coherent with the file system buffer cache
- like early versions of FreeBSD and possibly contemporary NetBSD.)
- For shared mappings, we should conversely verify that changes get
- propagated back to all the places they're supposed to be.
-
- Grep wants private fixed already mapped.
- The main things grep needs to know about mmap are:
- * does it exist and is it safe to write into the mmap'd area
- * how to use it (BSD variants) */
-
-#include <fcntl.h>
-#include <sys/mman.h>
-
-#if !STDC_HEADERS && !HAVE_STDLIB_H
-char *malloc ();
+#include <sys/types.h>
+ #include <sys/stat.h>
+
+typedef nlink_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_nlink_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_nlink_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_nlink_t" >&5
+echo "${ECHO_T}$ac_cv_type_nlink_t" >&6; }
+if test $ac_cv_type_nlink_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<\_ACEOF
+#define nlink_t int
+_ACEOF
+
+fi
+
+
+
+ { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+done
+IFS=$as_save_IFS
+
+fi
+
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+
+
+
+ { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+done
+IFS=$as_save_IFS
+
+fi
+
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+echo "${ECHO_T}$MKDIR_P" >&6; }
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS tempname.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_unistd_h='<'unistd.h'>'
+ else
+ { echo "$as_me:$LINENO: checking absolute name of <unistd.h>" >&5
+echo $ECHO_N "checking absolute name of <unistd.h>... $ECHO_C" >&6; }
+if test "${gl_cv_next_unistd_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test $ac_cv_header_unistd_h = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <unistd.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/unistd.h#{
+ s#.*"\(.*/unistd.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_unistd_h='<'unistd.h'>'
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_next_unistd_h" >&5
+echo "${ECHO_T}$gl_cv_next_unistd_h" >&6; }
+ fi
+ NEXT_UNISTD_H=$gl_cv_next_unistd_h
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_header_unistd_h = yes; then
+ HAVE_UNISTD_H=1
+ else
+ HAVE_UNISTD_H=0
+ fi
+
+
+
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_UNLOCKED_IO 1
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether <wchar.h> is standalone" >&5
+echo $ECHO_N "checking whether <wchar.h> is standalone... $ECHO_C" >&6; }
+if test "${gl_cv_header_wchar_h_standalone+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#include <wchar.h>
+wchar_t w;
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gl_cv_header_wchar_h_standalone=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gl_cv_header_wchar_h_standalone=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_header_wchar_h_standalone" >&5
+echo "${ECHO_T}$gl_cv_header_wchar_h_standalone" >&6; }
+
+
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+
+
+ if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes; then
+ WCHAR_H=wchar.h
+ fi
+
+
+
+
+
+
+
+ if test $ac_cv_header_wchar_h = yes; then
+ HAVE_WCHAR_H=1
+ else
+ HAVE_WCHAR_H=0
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_wchar_h='<'wchar.h'>'
+ else
+ { echo "$as_me:$LINENO: checking absolute name of <wchar.h>" >&5
+echo $ECHO_N "checking absolute name of <wchar.h>... $ECHO_C" >&6; }
+if test "${gl_cv_next_wchar_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test $ac_cv_header_wchar_h = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/wchar.h#{
+ s#.*"\(.*/wchar.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_wchar_h='<'wchar.h'>'
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_next_wchar_h" >&5
+echo "${ECHO_T}$gl_cv_next_wchar_h" >&6; }
+ fi
+ NEXT_WCHAR_H=$gl_cv_next_wchar_h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_wcrtomb = no; then
+ HAVE_WCRTOMB=0
+ else
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether wcrtomb return value is correct" >&5
+echo $ECHO_N "checking whether wcrtomb return value is correct... $ECHO_C" >&6; }
+if test "${gl_cv_func_wcrtomb_retval+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX 4, OSF/1 and Solaris.
+ aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_wcrtomb_retval=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_wcrtomb_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_wcrtomb_retval" >&5
+echo "${ECHO_T}$gl_cv_func_wcrtomb_retval" >&6; }
+ case "$gl_cv_func_wcrtomb_retval" in
+ *yes) ;;
+ *) REPLACE_WCRTOMB=1 ;;
+ esac
+ fi
+ if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+
+
+ WCHAR_H=wchar.h
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_WCRTOMB=1
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_wctob = no; then
+ HAVE_DECL_WCTOB=0
+
+
+ WCHAR_H=wchar.h
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS wctob.$ac_objext"
+
+
+ :
+
+ else
+
+
+
+ { echo "$as_me:$LINENO: checking whether wctob works" >&5
+echo $ECHO_N "checking whether wctob works... $ECHO_C" >&6; }
+if test "${gl_cv_func_wctob_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris <= 9.
+ solaris2.[1-9] | solaris2.[1-9].*)
+ gl_cv_func_wctob_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wctob_works="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none; then
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ wchar_t wc;
+
+ if (mbtowc (&wc, "\374", 1) == 1)
+ if (wctob (wc) != (unsigned char) '\374')
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gl_cv_func_wctob_works=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gl_cv_func_wctob_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_func_wctob_works" >&5
+echo "${ECHO_T}$gl_cv_func_wctob_works" >&6; }
+ case "$gl_cv_func_wctob_works" in
+ *yes) ;;
+ *) REPLACE_WCTOB=1 ;;
+ esac
+ if test $REPLACE_WCTOB = 1; then
+
+
+ WCHAR_H=wchar.h
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS wctob.$ac_objext"
+
+
+ :
+
+ else
+
+ { echo "$as_me:$LINENO: checking whether wctob is declared" >&5
+echo $ECHO_N "checking whether wctob is declared... $ECHO_C" >&6; }
+if test "${ac_cv_have_decl_wctob+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+
+int
+main ()
+{
+#ifndef wctob
+ (void) wctob;
#endif
-/* This mess was copied from the GNU getpagesize.h. */
-#if !HAVE_GETPAGESIZE
-/* Assume that all systems that can run configure have sys/param.h. */
-# if !HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_wctob=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-# ifdef _SC_PAGESIZE
-# define getpagesize() sysconf(_SC_PAGESIZE)
-# else /* no _SC_PAGESIZE */
-# if HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# ifdef EXEC_PAGESIZE
-# define getpagesize() EXEC_PAGESIZE
-# else /* no EXEC_PAGESIZE */
-# ifdef NBPG
-# define getpagesize() NBPG * CLSIZE
-# ifndef CLSIZE
-# define CLSIZE 1
-# endif /* no CLSIZE */
-# else /* no NBPG */
-# ifdef NBPC
-# define getpagesize() NBPC
-# else /* no NBPC */
-# ifdef PAGESIZE
-# define getpagesize() PAGESIZE
-# endif /* PAGESIZE */
-# endif /* no NBPC */
-# endif /* no NBPG */
-# endif /* no EXEC_PAGESIZE */
-# else /* no HAVE_SYS_PARAM_H */
-# define getpagesize() 8192 /* punt totally */
-# endif /* no HAVE_SYS_PARAM_H */
-# endif /* no _SC_PAGESIZE */
-
-#endif /* no HAVE_GETPAGESIZE */
-
-int
-main ()
-{
- char *data, *data2, *data3;
- int i, pagesize;
- int fd;
-
- pagesize = getpagesize ();
-
- /* First, make a file with some known garbage in it. */
- data = (char *) malloc (pagesize);
- if (!data)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- *(data + i) = rand ();
- umask (0);
- fd = creat ("conftest.mmap", 0600);
- if (fd < 0)
- exit (1);
- if (write (fd, data, pagesize) != pagesize)
- exit (1);
- close (fd);
+ ac_cv_have_decl_wctob=no
+fi
- /* Next, try to mmap the file at a fixed address which already has
- something else allocated at it. If we can, also make sure that
- we see the same garbage. */
- fd = open ("conftest.mmap", O_RDWR);
- if (fd < 0)
- exit (1);
- data2 = (char *) malloc (2 * pagesize);
- if (!data2)
- exit (1);
- data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
- if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data2 + i))
- exit (1);
-
- /* Finally, make sure that changes to the mapped area do not
- percolate back to the file as seen by read(). (This is a bug on
- some variants of i386 svr4.0.) */
- for (i = 0; i < pagesize; ++i)
- *(data2 + i) = *(data2 + i) + 1;
- data3 = (char *) malloc (pagesize);
- if (!data3)
- exit (1);
- if (read (fd, data3, pagesize) != pagesize)
- exit (1);
- for (i = 0; i < pagesize; ++i)
- if (*(data + i) != *(data3 + i))
- exit (1);
- close (fd);
- exit (0);
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_wctob" >&5
+echo "${ECHO_T}$ac_cv_have_decl_wctob" >&6; }
+if test $ac_cv_have_decl_wctob = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_WCTOB 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_WCTOB 0
+_ACEOF
+
+
+fi
+
+
+ if test $ac_cv_have_decl_wctob != yes; then
+ HAVE_DECL_WCTOB=0
+
+
+ WCHAR_H=wchar.h
+
+ fi
+ fi
+ fi
+
+
+
+ GNULIB_WCTOB=1
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_iswcntrl = yes; then
+ HAVE_ISWCNTRL=1
+ else
+ HAVE_ISWCNTRL=0
+ fi
+
+
+
+
+
+
+
+
+
+
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+
+
+ WCTYPE_H=wctype.h
+ if test $ac_cv_header_wctype_h = yes; then
+ if test $ac_cv_func_iswcntrl = yes; then
+ { echo "$as_me:$LINENO: checking whether iswcntrl works" >&5
+echo $ECHO_N "checking whether iswcntrl works... $ECHO_C" >&6; }
+if test "${gl_cv_func_iswcntrl_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test "$cross_compiling" = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+ #if __GNU_LIBRARY__ == 1
+ Linux libc5 i18n is broken.
+ #endif
+int
+main ()
+{
+
+ ;
+ return 0;
}
_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gl_cv_func_iswcntrl_works=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gl_cv_func_iswcntrl_works=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stddef.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <wchar.h>
+ #include <wctype.h>
+ int main () { return iswprint ('x') == 0; }
+_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_func_mmap_fixed_mapped=yes
+ gl_cv_func_iswcntrl_works=yes
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-ac_cv_func_mmap_fixed_mapped=no
+gl_cv_func_iswcntrl_works=no
fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
+
+
+
fi
-echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
-echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
-if test $ac_cv_func_mmap_fixed_mapped = yes; then
+{ echo "$as_me:$LINENO: result: $gl_cv_func_iswcntrl_works" >&5
+echo "${ECHO_T}$gl_cv_func_iswcntrl_works" >&6; }
+ if test $gl_cv_func_iswcntrl_works = yes; then
+ WCTYPE_H=
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_wctype_h='<'wctype.h'>'
+ else
+ { echo "$as_me:$LINENO: checking absolute name of <wctype.h>" >&5
+echo $ECHO_N "checking absolute name of <wctype.h>... $ECHO_C" >&6; }
+if test "${gl_cv_next_wctype_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ if test $ac_cv_header_wctype_h = yes; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wctype.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/wctype.h#{
+ s#.*"\(.*/wctype.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_wctype_h='<'wctype.h'>'
+ fi
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_next_wctype_h" >&5
+echo "${ECHO_T}$gl_cv_next_wctype_h" >&6; }
+ fi
+ NEXT_WCTYPE_H=$gl_cv_next_wctype_h
+
+
+
+ HAVE_WCTYPE_H=1
+ else
+ HAVE_WCTYPE_H=0
+ fi
+
+
+
+ if test "$gl_cv_func_iswcntrl_works" = no; then
+ REPLACE_ISWCNTRL=1
+ else
+ REPLACE_ISWCNTRL=0
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ gl_LIBOBJS="$gl_LIBOBJS xmalloc.$ac_objext"
+
+
+
+
+ :
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+ gltests_libdeps=
+ gltests_ltlibdeps=
+
+
+
+
+
+
+
+
+
+ gl_source_base='tests'
+
+
+
+
+
+
+
+ LIBSED_LIBDEPS="$gl_libdeps"
+
+ LIBSED_LTLIBDEPS="$gl_ltlibdeps"
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for long file names" >&5
+echo $ECHO_N "checking for long file names... $ECHO_C" >&6; }
+if test "${ac_cv_sys_long_file_names+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_sys_long_file_names=yes
+# Test for long file names in all the places we know might matter:
+# . the current directory, where building will happen
+# $prefix/lib where we will be installing things
+# $exec_prefix/lib likewise
+# $TMPDIR if set, where it might want to write temporary files
+# /tmp where it might want to write temporary files
+# /var/tmp likewise
+# /usr/tmp likewise
+for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
+ # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
+ # in the usual case where exec_prefix is '${prefix}'.
+ case $ac_dir in #(
+ . | /* | ?:[\\/]*) ;; #(
+ *) continue;;
+ esac
+ test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
+ ac_xdir=$ac_dir/cf$$
+ (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
+ ac_tf1=$ac_xdir/conftest9012345
+ ac_tf2=$ac_xdir/conftest9012346
+ touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
+ ac_cv_sys_long_file_names=no
+ rm -f -r "$ac_xdir" 2>/dev/null
+ test $ac_cv_sys_long_file_names = no && break
+done
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sys_long_file_names" >&5
+echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6; }
+if test $ac_cv_sys_long_file_names = yes; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_MMAP 1
+#define HAVE_LONG_FILE_NAMES 1
_ACEOF
fi
-rm -f conftest.mmap
+{ echo "$as_me:$LINENO: checking whether -lcP is needed" >&5
+echo $ECHO_N "checking whether -lcP is needed... $ECHO_C" >&6; }
+if test "${sed_cv_libcp_needed+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
- echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5
-echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
-if test "${ac_cv_gnu_library_2_1+set}" = set; then
+if test "$cross_compiling" = yes; then
+ sed_cv_libcp_needed="assuming no"
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <errno.h>
+
+int main()
+{
+ FILE *fp;
+ int result;
+ errno = 0;
+ fp = fopen ("conftest.c", "r");
+ if (!fp) return 0; /* error, assume not needed */
+ result = fflush (fp) == EOF && errno == 0;
+ fclose (fp);
+ return result;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ sed_cv_libcp_needed=no
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+sed_cv_libcp_needed=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+fi
+{ echo "$as_me:$LINENO: result: $sed_cv_libcp_needed" >&5
+echo "${ECHO_T}$sed_cv_libcp_needed" >&6; }
+if test "$sed_cv_libcp_needed" = yes; then
+ LIBS="-lcP $LIBS"
+fi
+
+
+
+
+
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -7615,30 +20587,986 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
-#include <features.h>
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
- Lucky GNU user
- #endif
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ { echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dir; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_search_opendir=$ac_res
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_opendir+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then
+ :
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+ { echo "$as_me:$LINENO: checking for library containing opendir" >&5
+echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "Lucky GNU user" >/dev/null 2>&1; then
- ac_cv_gnu_library_2_1=yes
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' x; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_search_opendir=$ac_res
else
- ac_cv_gnu_library_2_1=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_opendir+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then
+ :
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+fi
fi
-echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5
-echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
- GLIBC21="$ac_cv_gnu_library_2_1"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
+if test "${ac_cv_c_const+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_const=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_const=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+echo "${ECHO_T}$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for size_t" >&5
+echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_size_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+typedef size_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_size_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_size_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
+if test $ac_cv_type_size_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for ssize_t" >&5
+echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_ssize_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+typedef ssize_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_ssize_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_ssize_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
+echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
+if test $ac_cv_type_ssize_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ssize_t int
+_ACEOF
+
+fi
+
+
+
+for ac_func in vprintf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+{ echo "$as_me:$LINENO: checking for _doprnt" >&5
+echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; }
+if test "${ac_cv_func__doprnt+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define _doprnt innocuous__doprnt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _doprnt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef _doprnt
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char _doprnt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub__doprnt || defined __stub____doprnt
+choke me
+#endif
+
+int
+main ()
+{
+return _doprnt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func__doprnt=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func__doprnt=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+echo "${ECHO_T}$ac_cv_func__doprnt" >&6; }
+if test $ac_cv_func__doprnt = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DOPRNT 1
+_ACEOF
+
+fi
+
+fi
+done
+
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6; }
+ # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval=$enable_nls; USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ { echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6; }
+
+
+
+
+ GETTEXT_MACRO_VERSION=0.17
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case "$MSGFMT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+ { echo "$as_me:$LINENO: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case "$XGETTEXT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ { echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+ rm -f messages.po
+
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+ ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ { echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+echo "${ECHO_T}$MSGMERGE" >&6; }
+else
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+ test -n "$localedir" || localedir='${datadir}/locale'
+
+
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+
+
+ ac_config_commands="$ac_config_commands po-directories"
@@ -7658,18 +21586,31 @@ echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
prefix="$acl_save_prefix"
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
+# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
- withval="$with_gnu_ld"
- test "$withval" = no || with_gnu_ld=yes
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
-fi;
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -7698,11 +21639,11 @@ echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
;;
esac
elif test "$with_gnu_ld" = yes; then
- echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
else
- echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+ { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
fi
if test "${acl_cv_path_LD+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7716,11 +21657,12 @@ else
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
fi
done
IFS="$ac_save_ifs"
@@ -7731,35 +21673,37 @@ fi
LD="$acl_cv_path_LD"
if test -n "$LD"; then
- echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
+ { echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6; }
else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+ { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
fi
test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
{ (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
if test "${acl_cv_prog_gnu_ld+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- acl_cv_prog_gnu_ld=yes
-else
- acl_cv_prog_gnu_ld=no
-fi
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac
fi
-echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6
+{ echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; }
with_gnu_ld=$acl_cv_prog_gnu_ld
- echo "$as_me:$LINENO: checking for shared library run path origin" >&5
-echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6
+
+ { echo "$as_me:$LINENO: checking for shared library run path origin" >&5
+echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; }
if test "${acl_cv_rpath+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -7771,17 +21715,95 @@ else
acl_cv_rpath=done
fi
-echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
-echo "${ECHO_T}$acl_cv_rpath" >&6
+{ echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
+echo "${ECHO_T}$acl_cv_rpath" >&6; }
wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
- sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+ enableval=$enable_rpath; :
+else
+ enable_rpath=yes
+fi
+
+
+
+
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ { echo "$as_me:$LINENO: checking for 64-bit host" >&5
+echo $ECHO_N "checking for 64-bit host... $ECHO_C" >&6; }
+if test "${gl_cv_solaris_64bit+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef _LP64
+sixtyfour bits
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sixtyfour bits" >/dev/null 2>&1; then
+ gl_cv_solaris_64bit=yes
+else
+ gl_cv_solaris_64bit=no
+fi
+rm -f conftest*
+
+
+fi
+{ echo "$as_me:$LINENO: result: $gl_cv_solaris_64bit" >&5
+echo "${ECHO_T}$gl_cv_solaris_64bit" >&6; }
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+
+
+
+
@@ -7804,10 +21826,9 @@ echo "${ECHO_T}$acl_cv_rpath" >&6
prefix="$acl_save_prefix"
-# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
+# Check whether --with-libiconv-prefix was given.
if test "${with_libiconv_prefix+set}" = set; then
- withval="$with_libiconv_prefix"
-
+ withval=$with_libiconv_prefix;
if test "X$withval" = "Xno"; then
use_additional=no
else
@@ -7826,14 +21847,20 @@ if test "${with_libiconv_prefix+set}" = set; then
else
additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
fi
fi
-fi;
+fi
+
LIBICONV=
LTLIBICONV=
INCICONV=
+ LIBICONV_PREFIX=
rpathdirs=
ltrpathdirs=
names_already_handled=
@@ -7867,22 +21894,52 @@ fi;
found_la=
found_so=
found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
fi
fi
fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
fi
if test "X$found_dir" = "X"; then
for x in $LDFLAGS $LTLIBICONV; do
@@ -7898,21 +21955,44 @@ fi;
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
fi
fi
fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
;;
esac
if test "X$found_dir" != "X"; then
@@ -7923,7 +22003,9 @@ fi;
if test "X$found_dir" != "X"; then
LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
if test "X$found_so" != "X"; then
- if test "X$found_dir" = "X/usr/lib"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
else
haveit=
@@ -7936,10 +22018,10 @@ fi;
if test -z "$haveit"; then
ltrpathdirs="$ltrpathdirs $found_dir"
fi
- if test "$hardcode_direct" = yes; then
+ if test "$acl_hardcode_direct" = yes; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
haveit=
for x in $rpathdirs; do
@@ -7971,7 +22053,7 @@ fi;
if test -z "$haveit"; then
LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
fi
- if test "$hardcode_minus_L" != no; then
+ if test "$acl_hardcode_minus_L" != no; then
LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
else
LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
@@ -7988,8 +22070,18 @@ fi;
fi
additional_includedir=
case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
additional_includedir="$basedir/include"
;;
esac
@@ -7999,7 +22091,7 @@ fi;
if test "X$additional_includedir" = "X/usr/local/include"; then
if test -n "$GCC"; then
case $host_os in
- linux*) haveit=yes;;
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
@@ -8038,12 +22130,14 @@ fi;
case "$dep" in
-L*)
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- if test "X$additional_libdir" != "X/usr/lib"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
- linux*) haveit=yes;;
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
@@ -8093,6 +22187,31 @@ fi;
fi
fi
;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
-l*)
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
;;
@@ -8115,21 +22234,21 @@ fi;
done
done
if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
alldirs=
for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
done
acl_save_libdir="$libdir"
libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
else
for found_dir in $rpathdirs; do
acl_save_libdir="$libdir"
libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
done
@@ -8142,162 +22261,17 @@ fi;
fi
- am_save_CPPFLAGS="$CPPFLAGS"
- for element in $INCICONV; do
- haveit=
- for x in $CPPFLAGS; do
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- eval x=\"$x\"
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
- fi
- done
- echo "$as_me:$LINENO: checking for iconv" >&5
-echo $ECHO_N "checking for iconv... $ECHO_C" >&6
-if test "${am_cv_func_iconv+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- am_cv_func_iconv="no, consider installing GNU libiconv"
- am_cv_lib_iconv=no
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <iconv.h>
-int
-main ()
-{
-iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- am_cv_func_iconv=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- if test "$am_cv_func_iconv" != yes; then
- am_save_LIBS="$LIBS"
- LIBS="$LIBS $LIBICONV"
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <iconv.h>
-int
-main ()
-{
-iconv_t cd = iconv_open("","");
- iconv(cd,NULL,NULL,NULL,NULL);
- iconv_close(cd);
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- am_cv_lib_iconv=yes
- am_cv_func_iconv=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LIBS="$am_save_LIBS"
- fi
-fi
-echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
-echo "${ECHO_T}$am_cv_func_iconv" >&6
- if test "$am_cv_func_iconv" = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_ICONV 1
-_ACEOF
- fi
- if test "$am_cv_lib_iconv" = yes; then
- echo "$as_me:$LINENO: checking how to link with libiconv" >&5
-echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $LIBICONV" >&5
-echo "${ECHO_T}$LIBICONV" >&6
- else
- CPPFLAGS="$am_save_CPPFLAGS"
- LIBICONV=
- LTLIBICONV=
- fi
@@ -8313,185 +22287,175 @@ echo "${ECHO_T}$LIBICONV" >&6
-for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
-stdlib.h string.h unistd.h sys/param.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+
+
+ { echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
+echo $ECHO_N "checking for CFPreferencesCopyAppValue... $ECHO_C" >&6; }
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-#include <$ac_header>
+#include <CoreFoundation/CFPreferences.h>
+int
+main ()
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+ ;
+ return 0;
+}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ gt_cv_func_CFPreferencesCopyAppValue=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_header_compiler=no
+ gt_cv_func_CFPreferencesCopyAppValue=no
fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+echo "${ECHO_T}$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFPREFERENCESCOPYAPPVALUE 1
+_ACEOF
+
+ fi
+ { echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5
+echo $ECHO_N "checking for CFLocaleCopyCurrent... $ECHO_C" >&6; }
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <$ac_header>
+#include <CoreFoundation/CFLocale.h>
+int
+main ()
+{
+CFLocaleCopyCurrent();
+ ;
+ return 0;
+}
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ gt_cv_func_CFLocaleCopyCurrent=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
+ gt_cv_func_CFLocaleCopyCurrent=no
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------ ##
-## Report this to bonzini@gnu.org ##
-## ------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=\$ac_header_preproc"
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+{ echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+echo "${ECHO_T}$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFLOCALECOPYCURRENT 1
_ACEOF
-fi
-
-done
-
-
-
-
-
-
-
-
-
-
-
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
-for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
-geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \
-strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
+ { echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
+echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6; }
+if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@@ -8500,363 +22464,336 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
int
main ()
{
-return f != $ac_func;
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$gt_func_gnugettext_libc=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+ eval "$gt_func_gnugettext_libc=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+ac_res=`eval echo '${'$gt_func_gnugettext_libc'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
-fi
-done
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
- if test "$am_cv_func_iconv" = yes; then
- echo "$as_me:$LINENO: checking for iconv declaration" >&5
-echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6
- if test "${am_cv_proto_iconv+set}" = set; then
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { echo "$as_me:$LINENO: checking for iconv" >&5
+echo $ECHO_N "checking for iconv... $ECHO_C" >&6; }
+if test "${am_cv_func_iconv+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
#include <stdlib.h>
#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-
int
main ()
{
-
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- am_cv_proto_iconv_arg1=""
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ am_cv_func_iconv=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-am_cv_proto_iconv_arg1="const"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
- am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
-fi
-
- am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
- echo "$as_me:$LINENO: result: ${ac_t:-
- }$am_cv_proto_iconv" >&5
-echo "${ECHO_T}${ac_t:-
- }$am_cv_proto_iconv" >&6
-
-cat >>confdefs.h <<_ACEOF
-#define ICONV_CONST $am_cv_proto_iconv_arg1
-_ACEOF
-
- fi
+fi
- echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
-echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
-if test "${am_cv_langinfo_codeset+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <langinfo.h>
+#include <stdlib.h>
+#include <iconv.h>
int
main ()
{
-char* cs = nl_langinfo(CODESET);
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- am_cv_langinfo_codeset=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-am_cv_langinfo_codeset=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
-echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
- if test $am_cv_langinfo_codeset = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LANGINFO_CODESET 1
-_ACEOF
- fi
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
- if test $ac_cv_header_locale_h = yes; then
- echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
-echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
-if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+fi
+{ echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+echo "${ECHO_T}$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { echo "$as_me:$LINENO: checking for working iconv" >&5
+echo $ECHO_N "checking for working iconv... $ECHO_C" >&6; }
+if test "${am_cv_func_iconv_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ if test "$cross_compiling" = yes; then
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <locale.h>
-int
-main ()
+
+#include <iconv.h>
+#include <string.h>
+int main ()
{
-return LC_MESSAGES
- ;
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- am_cv_val_LC_MESSAGES=yes
+ am_cv_func_iconv_works=yes
else
- echo "$as_me: failed program was:" >&5
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-am_cv_val_LC_MESSAGES=no
+( exit $ac_status )
+am_cv_func_iconv_works=no
fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
-echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
- if test $am_cv_val_LC_MESSAGES = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LC_MESSAGES 1
-_ACEOF
- fi
- fi
-
- for ac_prog in bison
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_INTLBISON+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$INTLBISON"; then
- ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_INTLBISON="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
+ LIBS="$am_save_LIBS"
fi
-fi
-INTLBISON=$ac_cv_prog_INTLBISON
-if test -n "$INTLBISON"; then
- echo "$as_me:$LINENO: result: $INTLBISON" >&5
-echo "${ECHO_T}$INTLBISON" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$INTLBISON" && break
-done
-
- if test -z "$INTLBISON"; then
- ac_verc_fail=yes
- else
- echo "$as_me:$LINENO: checking version of bison" >&5
-echo $ECHO_N "checking version of bison... $ECHO_C" >&6
- ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+{ echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5
+echo "${ECHO_T}$am_cv_func_iconv_works" >&6; }
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
esac
- echo "$as_me:$LINENO: result: $ac_prog_version" >&5
-echo "${ECHO_T}$ac_prog_version" >&6
- fi
- if test $ac_verc_fail = yes; then
- INTLBISON=:
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
fi
+ if test "$am_func_iconv" = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV 1
+_ACEOF
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: result: $LIBICONV" >&5
+echo "${ECHO_T}$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
@@ -8868,112 +22805,6 @@ echo "${ECHO_T}$ac_prog_version" >&6
- echo "$as_me:$LINENO: checking whether NLS is requested" >&5
-echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
- # Check whether --enable-nls or --disable-nls was given.
-if test "${enable_nls+set}" = set; then
- enableval="$enable_nls"
- USE_NLS=$enableval
-else
- USE_NLS=yes
-fi;
- echo "$as_me:$LINENO: result: $USE_NLS" >&5
-echo "${ECHO_T}$USE_NLS" >&6
-
-
-
- BUILD_INCLUDED_LIBINTL=no
- USE_INCLUDED_LIBINTL=no
-
- LIBINTL=
- LTLIBINTL=
- POSUB=
-
- if test "$USE_NLS" = "yes"; then
- gt_use_preinstalled_gnugettext=no
-
- echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
-echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
-
-# Check whether --with-included-gettext or --without-included-gettext was given.
-if test "${with_included_gettext+set}" = set; then
- withval="$with_included_gettext"
- nls_cv_force_use_gnu_gettext=$withval
-else
- nls_cv_force_use_gnu_gettext=no
-fi;
- echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
-echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
-
- nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
- if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
-
-
-
-
-
-
- echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
-echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6
-if test "${gt_cv_func_gnugettext2_libc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <libintl.h>
-extern int _nl_msg_cat_cntr;
-int
-main ()
-{
-bindtextdomain ("", "");
-return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- gt_cv_func_gnugettext2_libc=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-gt_cv_func_gnugettext2_libc=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libc" >&5
-echo "${ECHO_T}$gt_cv_func_gnugettext2_libc" >&6
-
- if test "$gt_cv_func_gnugettext2_libc" != "yes"; then
-
-
-
use_additional=yes
acl_save_prefix="$prefix"
@@ -8988,10 +22819,9 @@ echo "${ECHO_T}$gt_cv_func_gnugettext2_libc" >&6
prefix="$acl_save_prefix"
-# Check whether --with-libintl-prefix or --without-libintl-prefix was given.
+# Check whether --with-libintl-prefix was given.
if test "${with_libintl_prefix+set}" = set; then
- withval="$with_libintl_prefix"
-
+ withval=$with_libintl_prefix;
if test "X$withval" = "Xno"; then
use_additional=no
else
@@ -9010,14 +22840,20 @@ if test "${with_libintl_prefix+set}" = set; then
else
additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
fi
fi
-fi;
+fi
+
LIBINTL=
LTLIBINTL=
INCINTL=
+ LIBINTL_PREFIX=
rpathdirs=
ltrpathdirs=
names_already_handled=
@@ -9051,22 +22887,52 @@ fi;
found_la=
found_so=
found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
fi
fi
fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
fi
if test "X$found_dir" = "X"; then
for x in $LDFLAGS $LTLIBINTL; do
@@ -9082,21 +22948,44 @@ fi;
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
fi
fi
fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
;;
esac
if test "X$found_dir" != "X"; then
@@ -9107,7 +22996,9 @@ fi;
if test "X$found_dir" != "X"; then
LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
if test "X$found_so" != "X"; then
- if test "X$found_dir" = "X/usr/lib"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
else
haveit=
@@ -9120,10 +23011,10 @@ fi;
if test -z "$haveit"; then
ltrpathdirs="$ltrpathdirs $found_dir"
fi
- if test "$hardcode_direct" = yes; then
+ if test "$acl_hardcode_direct" = yes; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
haveit=
for x in $rpathdirs; do
@@ -9155,7 +23046,7 @@ fi;
if test -z "$haveit"; then
LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
fi
- if test "$hardcode_minus_L" != no; then
+ if test "$acl_hardcode_minus_L" != no; then
LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
else
LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
@@ -9172,8 +23063,18 @@ fi;
fi
additional_includedir=
case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
additional_includedir="$basedir/include"
;;
esac
@@ -9183,7 +23084,7 @@ fi;
if test "X$additional_includedir" = "X/usr/local/include"; then
if test -n "$GCC"; then
case $host_os in
- linux*) haveit=yes;;
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
@@ -9222,12 +23123,14 @@ fi;
case "$dep" in
-L*)
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- if test "X$additional_libdir" != "X/usr/lib"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
- linux*) haveit=yes;;
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
@@ -9277,6 +23180,31 @@ fi;
fi
fi
;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
-l*)
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
;;
@@ -9299,21 +23227,21 @@ fi;
done
done
if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
alldirs=
for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
done
acl_save_libdir="$libdir"
libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
else
for found_dir in $rpathdirs; do
acl_save_libdir="$libdir"
libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
done
@@ -9325,9 +23253,14 @@ fi;
done
fi
- echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
-echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6
-if test "${gt_cv_func_gnugettext2_libintl+set}" = set; then
+
+
+
+
+
+ { echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
+echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6; }
+if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
gt_save_CPPFLAGS="$CPPFLAGS"
@@ -9341,48 +23274,51 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <libintl.h>
+$gt_revision_test_code
extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
int
main ()
{
bindtextdomain ("", "");
-return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- gt_cv_func_gnugettext2_libintl=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$gt_func_gnugettext_libintl=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-gt_cv_func_gnugettext2_libintl=no
+ eval "$gt_func_gnugettext_libintl=no"
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
- if test "$gt_cv_func_gnugettext2_libintl" != yes && test -n "$LIBICONV"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
LIBS="$LIBS $LIBICONV"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -9391,83 +23327,82 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <libintl.h>
+$gt_revision_test_code
extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
int
main ()
{
bindtextdomain ("", "");
-return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
LIBINTL="$LIBINTL $LIBICONV"
LTLIBINTL="$LTLIBINTL $LTLIBICONV"
- gt_cv_func_gnugettext2_libintl=yes
+ eval "$gt_func_gnugettext_libintl=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
CPPFLAGS="$gt_save_CPPFLAGS"
LIBS="$gt_save_LIBS"
fi
-echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libintl" >&5
-echo "${ECHO_T}$gt_cv_func_gnugettext2_libintl" >&6
+ac_res=`eval echo '${'$gt_func_gnugettext_libintl'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
fi
- if test "$gt_cv_func_gnugettext2_libc" = "yes" \
- || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \
- && test "$PACKAGE" != gettext; }; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
gt_use_preinstalled_gnugettext=yes
+ else
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
fi
- if test "$gt_use_preinstalled_gnugettext" != "yes"; then
- nls_cv_use_gnu_gettext=yes
- fi
- fi
-
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- INTLOBJS="\$(GETTOBJS)"
- BUILD_INCLUDED_LIBINTL=yes
- USE_INCLUDED_LIBINTL=yes
- LIBINTL="../intl/libintl.a $LIBICONV"
- LTLIBINTL="../intl/libintl.a $LTLIBICONV"
- LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
- fi
+ if test -n "$INTL_MACOSX_LIBS"; then
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
- CATOBJEXT=.gmo
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
fi
-
+ fi
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
@@ -9481,14 +23416,34 @@ _ACEOF
fi
fi
+ { echo "$as_me:$LINENO: checking whether to use NLS" >&5
+echo $ECHO_N "checking whether to use NLS... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: result: $USE_NLS" >&5
+echo "${ECHO_T}$USE_NLS" >&6; }
+ if test "$USE_NLS" = "yes"; then
+ { echo "$as_me:$LINENO: checking where the gettext function comes from" >&5
+echo $ECHO_N "checking where the gettext function comes from... $ECHO_C" >&6; }
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ { echo "$as_me:$LINENO: result: $gt_source" >&5
+echo "${ECHO_T}$gt_source" >&6; }
+ fi
+
if test "$USE_NLS" = "yes"; then
if test "$gt_use_preinstalled_gnugettext" = "yes"; then
- if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then
- echo "$as_me:$LINENO: checking how to link with libintl" >&5
-echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6
- echo "$as_me:$LINENO: result: $LIBINTL" >&5
-echo "${ECHO_T}$LIBINTL" >&6
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ { echo "$as_me:$LINENO: checking how to link with libintl" >&5
+echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6; }
+ { echo "$as_me:$LINENO: result: $LIBINTL" >&5
+echo "${ECHO_T}$LIBINTL" >&6; }
for element in $INCINTL; do
haveit=
@@ -9530,44 +23485,416 @@ _ACEOF
fi
- if test "$PACKAGE" = gettext; then
- BUILD_INCLUDED_LIBINTL=yes
- fi
+
+ INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- nls_cv_header_intl=
- nls_cv_header_libgt=
- DATADIRNAME=share
- INSTOBJEXT=.mo
- GENCAT=gencat
- INTL_LIBTOOL_SUFFIX_PREFIX=
- INTLLIBS="$LIBINTL"
- ac_config_commands="$ac_config_commands gettext-fix"
- ac_config_files="$ac_config_files bootstrap.sh"
- ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile sed/Makefile testsuite/Makefile po/Makefile.in intl/Makefile"
+
+
+# Check whether --enable-i18n was given.
+if test "${enable_i18n+set}" = set; then
+ enableval=$enable_i18n;
+else
+ enable_i18n=yes
+fi
+
+if test "x$enable_i18n" = xno; then
+ ac_cv_func_wcscoll=false
+fi
+
+# Check whether --enable-regex-tests was given.
+if test "${enable_regex_tests+set}" = set; then
+ enableval=$enable_regex_tests; if test "x$with_included_regex" = xno; then
+ enable_regex_tests=no
+fi
+else
+ enable_regex_tests=$with_included_regex
+fi
+
+
+ if test "x$enable_regex_tests" = xyes; then
+ TEST_REGEX_TRUE=
+ TEST_REGEX_FALSE='#'
+else
+ TEST_REGEX_TRUE='#'
+ TEST_REGEX_FALSE=
+fi
+
+if test "x$enable_regex_tests" = xyes; then
+
+cat >>confdefs.h <<_ACEOF
+#define _REGEX_RE_COMP 1
+_ACEOF
+
+fi
+
+# Check whether we are able to follow symlinks
+{ echo "$as_me:$LINENO: checking for lstat" >&5
+echo $ECHO_N "checking for lstat... $ECHO_C" >&6; }
+if test "${ac_cv_func_lstat+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define lstat to an innocuous variant, in case <limits.h> declares lstat.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define lstat innocuous_lstat
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char lstat (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef lstat
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lstat ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_lstat || defined __stub___lstat
+choke me
+#endif
+
+int
+main ()
+{
+return lstat ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_lstat=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_lstat=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_lstat" >&5
+echo "${ECHO_T}$ac_cv_func_lstat" >&6; }
+if test $ac_cv_func_lstat = yes; then
+ have_lstat=yes
+fi
+
+{ echo "$as_me:$LINENO: checking for readlink" >&5
+echo $ECHO_N "checking for readlink... $ECHO_C" >&6; }
+if test "${ac_cv_func_readlink+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define readlink to an innocuous variant, in case <limits.h> declares readlink.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define readlink innocuous_readlink
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char readlink (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef readlink
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char readlink ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_readlink || defined __stub___readlink
+choke me
+#endif
+
+int
+main ()
+{
+return readlink ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_func_readlink=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_readlink=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_func_readlink" >&5
+echo "${ECHO_T}$ac_cv_func_readlink" >&6; }
+if test $ac_cv_func_readlink = yes; then
+ have_readlink=yes
+fi
+
+if test "x$have_lstat" = xyes -a "x$have_readlink" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_FOLLOW_SYMLINKS
+_ACEOF
+
+fi
+
+# Determine whether we should run UTF-8 tests by checking if cyrillic
+# letters are case-folded properly. The test for UTF-8 locales (bot
+# in general and specifically for a Russian one) is a bit weak, but it
+# should match exactly what is done in the testsuite. In fact, sed's
+# logic is portable (though testing it requires care) so it is enough to
+# have a couple of platforms where these tests pass. Right now, only
+# Windows and HP/UX do not support the tests.
+{ echo "$as_me:$LINENO: checking whether UTF-8 case folding tests should pass" >&5
+echo $ECHO_N "checking whether UTF-8 case folding tests should pass... $ECHO_C" >&6; }
+if test "$cross_compiling" = yes; then
+ { echo "$as_me:$LINENO: result: don't care (cross compiling)" >&5
+echo "${ECHO_T}don't care (cross compiling)" >&6; }; XFAIL_TESTS=
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <stdlib.h>
+#include <wchar.h>
+#ifdef HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
+
+int test(void)
+{
+ char in[] = "\xD0\xB4";
+ char good[] = "\xD0\x94";
+ char out[10];
+ wchar_t in_wc, good_wc;
+ if (mbtowc (&in_wc, in, 3) == -1)
+ return 0;
+ if (mbtowc (&good_wc, good, 3) == -1)
+ return 0;
+ if (towupper (in_wc) != good_wc)
+ return 0;
+ if (wctomb (out, good_wc) != 2)
+ return 0;
+ if (memcmp (out, good, 2))
+ return 0;
+ return 1;
+}
+
+int main()
+{
+ char *old;
+ int len;
+
+ /* Try hardcoding a Russian UTF-8 locale. If the name "ru_RU.UTF-8"
+ is invalid, use setlocale again just to get the current locale. */
+ old = setlocale (LC_CTYPE, "ru_RU.UTF-8");
+ if (old)
+ {
+ if (test())
+ exit (0);
+ }
+ else
+ old = setlocale (LC_CTYPE, "C");
+
+ /* Maybe cyrillic case folding is implemented for all UTF-8 locales.
+ If the current locale is not UTF-8, the test will be skipped. */
+ len = strlen (old);
+ if ((len > 6 && !strcmp (old + len - 6, ".UTF-8"))
+ || (len > 6 && !strcmp (old + len - 6, ".utf-8"))
+ || (len > 5 && !strcmp (old + len - 5, ".UTF8"))
+ || (len > 5 && !strcmp (old + len - 5, ".utf8")))
+
+ /* ok */
+ ;
+ else
+ exit (1);
+
+ /* Run the test in the detected UTF-8 locale. */
+ setlocale (LC_CTYPE, old);
+ exit (!test ());
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }; XFAIL_TESTS=
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }; XFAIL_TESTS='utf8-1 utf8-2 utf8-3 utf8-4'
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+# Under MinGW, the bsd.sh test fails because of the EOF character (^Z).
+case $host in
+ *mingw*) XFAIL_TESTS="$XFAIL_TESTS bsd" ;;
+ *) ;;
+esac
+
+
+ac_config_files="$ac_config_files bootstrap.sh"
+
+ac_config_files="$ac_config_files testsuite/version.good:testsuite/version.gin"
+
+ac_config_files="$ac_config_files Makefile doc/Makefile lib/Makefile sed/Makefile testsuite/Makefile po/Makefile.in"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -9587,39 +23914,58 @@ _ACEOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
+# So, we kill variables containing newlines.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-{
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
+echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
"s/'/'\\\\''/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
- ;;
+ ;; #(
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
;;
- esac;
-} |
+ esac |
+ sort
+) |
sed '
+ /^ac_cv_env_/b end
t clear
- : clear
+ :clear
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
t end
- /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
- : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
- if test -w $cache_file; then
- test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { echo "$as_me:$LINENO: updating cache $cache_file" >&5
+echo "$as_me: updating cache $cache_file" >&6;}
cat confcache >$cache_file
else
- echo "not updating unwritable cache $cache_file"
+ { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+echo "$as_me: not updating unwritable cache $cache_file" >&6;}
fi
fi
rm -f confcache
@@ -9628,32 +23974,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[ ]*$//;
-}'
-fi
-
DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
- # 2. Add them.
- ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
- ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs
@@ -9674,31 +24006,49 @@ echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${TEST_REGEX_TRUE}" && test -z "${TEST_REGEX_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"TEST_REGEX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"TEST_REGEX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${BUILD_HTML_TRUE}" && test -z "${BUILD_HTML_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"BUILD_HTML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"BUILD_HTML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
- { (exit 1); exit 1; }; }
-fi
-if test -z "${MAKEINFO_HTML_TRUE}" && test -z "${MAKEINFO_HTML_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"MAKEINFO_HTML\" was never defined.
+if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"GL_COND_LIBTOOL\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"MAKEINFO_HTML\" was never defined.
+echo "$as_me: error: conditional \"GL_COND_LIBTOOL\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "${TEXI2HTML_HTML_TRUE}" && test -z "${TEXI2HTML_HTML_FALSE}"; then
- { { echo "$as_me:$LINENO: error: conditional \"TEXI2HTML_HTML\" was never defined.
+
+ gl_libobjs=
+ gl_ltlibobjs=
+ if test -n "$gl_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
+ gl_libobjs="$gl_libobjs $i.$ac_objext"
+ gl_ltlibobjs="$gl_ltlibobjs $i.lo"
+ done
+ fi
+ gl_LIBOBJS=$gl_libobjs
+
+ gl_LTLIBOBJS=$gl_ltlibobjs
+
+
+
+ gltests_libobjs=
+ gltests_ltlibobjs=
+ if test -n "$gltests_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
+ gltests_libobjs="$gltests_libobjs $i.$ac_objext"
+ gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
+ done
+ fi
+ gltests_LIBOBJS=$gltests_libobjs
+
+ gltests_LTLIBOBJS=$gltests_ltlibobjs
+
+
+if test -z "${TEST_REGEX_TRUE}" && test -z "${TEST_REGEX_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"TEST_REGEX\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"TEXI2HTML_HTML\" was never defined.
+echo "$as_me: error: conditional \"TEST_REGEX\" was never defined.
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -9726,17 +24076,45 @@ cat >>$CONFIG_STATUS <<\_ACEOF
## M4sh Initialization. ##
## --------------------- ##
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
fi
-DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
@@ -9746,8 +24124,43 @@ else
fi
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+as_nl='
+'
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
PS1='$ '
PS2='> '
PS4='+ '
@@ -9761,18 +24174,19 @@ do
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
- $as_unset $as_var
+ ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
fi
done
# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
@@ -9780,159 +24194,120 @@ fi
# Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
+# CDPATH.
+$as_unset CDPATH
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
as_lineno_1=$LINENO
as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
+ s/-\n.*//
' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ chmod +x "$as_me.lineno" ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
esac
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir
+fi
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
@@ -9941,7 +24316,28 @@ else
as_mkdir_p=false
fi
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -9950,31 +24346,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
exec 6>&1
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# Save the log message, to keep $[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by sed $as_me 4.1.5, which was
-generated by GNU Autoconf 2.59. Invocation command line was
+# values after options handling.
+ac_log="
+This file was extended by sed $as_me 4.2, which was
+generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -9982,30 +24361,20 @@ generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
# Files that config.status was made for.
-if test -n "$ac_config_files"; then
- echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
-if test -n "$ac_config_headers"; then
- echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_links"; then
- echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
-
-if test -n "$ac_config_commands"; then
- echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
+_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
-
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
@@ -10013,7 +24382,7 @@ current configuration.
Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
- -V, --version print version number, then exit
+ -V, --version print version number and configuration settings, then exit
-q, --quiet do not print progress messages
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
@@ -10028,26 +24397,26 @@ $config_files
Configuration headers:
$config_headers
-Configuration links:
-$config_links
-
Configuration commands:
$config_commands
Report bugs to <bug-autoconf@gnu.org>."
-_ACEOF
+_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-sed config.status 4.1.5
-configured by $0, generated by GNU Autoconf 2.59,
- with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+sed config.status 4.2
+configured by $0, generated by GNU Autoconf 2.61,
+ with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 2006 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
@@ -10058,39 +24427,24 @@ while test $# != 0
do
case $1 in
--*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
- -*)
+ *)
ac_option=$1
ac_optarg=$2
ac_shift=shift
;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
esac
case $ac_option in
# Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
$ac_shift
@@ -10100,18 +24454,24 @@ Try \`$0 --help' for more information." >&2;}
$ac_shift
CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ { echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil | --si | --s)
ac_cs_silent=: ;;
# This is an error.
- -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
+ -*) { echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; } ;;
- *) ac_config_targets="$ac_config_targets $1" ;;
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
esac
shift
@@ -10127,57 +24487,64 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
if \$ac_cs_recheck; then
- echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
- exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ CONFIG_SHELL=$SHELL
+ export CONFIG_SHELL
+ exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
fi
_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ echo "$ac_log"
+} >&5
+_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
#
-# INIT-COMMANDS section.
+# INIT-COMMANDS
#
-
AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-# Capture the value of obsolete $ALL_LINGUAS because we need it to compute
- # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
- # from automake.
- eval 'ALL_LINGUAS''="$ALL_LINGUAS"'
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
# Capture the value of LINGUAS because we need it to compute CATALOGS.
LINGUAS="${LINGUAS-%UNSET%}"
- install_sh="$install_sh"
-
_ACEOF
-
-
cat >>$CONFIG_STATUS <<\_ACEOF
+
+# Handling of arguments.
for ac_config_target in $ac_config_targets
do
- case "$ac_config_target" in
- # Handling of arguments.
- "lib/stdbool.h" ) CONFIG_FILES="$CONFIG_FILES lib/stdbool.h:lib/stdbool_.h" ;;
- "bootstrap.sh" ) CONFIG_FILES="$CONFIG_FILES bootstrap.sh" ;;
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
- "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
- "sed/Makefile" ) CONFIG_FILES="$CONFIG_FILES sed/Makefile" ;;
- "testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
- "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
- "intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;;
- "lib/regex.h" ) CONFIG_LINKS="$CONFIG_LINKS lib/regex.h:lib/regex_.h" ;;
- "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
- "gettext-fix" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gettext-fix" ;;
- "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h:config_h.in" ;;
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config_h.in" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
+ "bootstrap.sh") CONFIG_FILES="$CONFIG_FILES bootstrap.sh" ;;
+ "testsuite/version.good") CONFIG_FILES="$CONFIG_FILES testsuite/version.good:testsuite/version.gin" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
+ "sed/Makefile") CONFIG_FILES="$CONFIG_FILES sed/Makefile" ;;
+ "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
+ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
done
+
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
@@ -10185,375 +24552,920 @@ done
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
- test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
+# simply because there is no reason against having it here, and in addition,
# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
trap '{ (exit 1); exit 1; }' 1 2 13 15
}
-
# Create a (secure) tmp directory for tmp files.
{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
} ||
{
echo "$me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
-_ACEOF
-
-cat >>$CONFIG_STATUS <<_ACEOF
-
#
-# CONFIG_FILES section.
+# Set up the sed scripts for CONFIG_FILES section.
#
# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s,@SHELL@,$SHELL,;t t
-s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s,@exec_prefix@,$exec_prefix,;t t
-s,@prefix@,$prefix,;t t
-s,@program_transform_name@,$program_transform_name,;t t
-s,@bindir@,$bindir,;t t
-s,@sbindir@,$sbindir,;t t
-s,@libexecdir@,$libexecdir,;t t
-s,@datadir@,$datadir,;t t
-s,@sysconfdir@,$sysconfdir,;t t
-s,@sharedstatedir@,$sharedstatedir,;t t
-s,@localstatedir@,$localstatedir,;t t
-s,@libdir@,$libdir,;t t
-s,@includedir@,$includedir,;t t
-s,@oldincludedir@,$oldincludedir,;t t
-s,@infodir@,$infodir,;t t
-s,@mandir@,$mandir,;t t
-s,@build_alias@,$build_alias,;t t
-s,@host_alias@,$host_alias,;t t
-s,@target_alias@,$target_alias,;t t
-s,@DEFS@,$DEFS,;t t
-s,@ECHO_C@,$ECHO_C,;t t
-s,@ECHO_N@,$ECHO_N,;t t
-s,@ECHO_T@,$ECHO_T,;t t
-s,@LIBS@,$LIBS,;t t
-s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s,@INSTALL_DATA@,$INSTALL_DATA,;t t
-s,@CYGPATH_W@,$CYGPATH_W,;t t
-s,@PACKAGE@,$PACKAGE,;t t
-s,@VERSION@,$VERSION,;t t
-s,@ACLOCAL@,$ACLOCAL,;t t
-s,@AUTOCONF@,$AUTOCONF,;t t
-s,@AUTOMAKE@,$AUTOMAKE,;t t
-s,@AUTOHEADER@,$AUTOHEADER,;t t
-s,@MAKEINFO@,$MAKEINFO,;t t
-s,@install_sh@,$install_sh,;t t
-s,@STRIP@,$STRIP,;t t
-s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
-s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
-s,@mkdir_p@,$mkdir_p,;t t
-s,@AWK@,$AWK,;t t
-s,@SET_MAKE@,$SET_MAKE,;t t
-s,@am__leading_dot@,$am__leading_dot,;t t
-s,@AMTAR@,$AMTAR,;t t
-s,@am__tar@,$am__tar,;t t
-s,@am__untar@,$am__untar,;t t
-s,@SED_FEATURE_VERSION@,$SED_FEATURE_VERSION,;t t
-s,@CC@,$CC,;t t
-s,@CFLAGS@,$CFLAGS,;t t
-s,@LDFLAGS@,$LDFLAGS,;t t
-s,@CPPFLAGS@,$CPPFLAGS,;t t
-s,@ac_ct_CC@,$ac_ct_CC,;t t
-s,@EXEEXT@,$EXEEXT,;t t
-s,@OBJEXT@,$OBJEXT,;t t
-s,@DEPDIR@,$DEPDIR,;t t
-s,@am__include@,$am__include,;t t
-s,@am__quote@,$am__quote,;t t
-s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t
-s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t
-s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
-s,@CCDEPMODE@,$CCDEPMODE,;t t
-s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
-s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
-s,@RANLIB@,$RANLIB,;t t
-s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s,@CPP@,$CPP,;t t
-s,@EGREP@,$EGREP,;t t
-s,@HAVE__BOOL@,$HAVE__BOOL,;t t
-s,@ALLOCA@,$ALLOCA,;t t
-s,@LIBOBJS@,$LIBOBJS,;t t
-s,@TEST_REGEX_TRUE@,$TEST_REGEX_TRUE,;t t
-s,@TEST_REGEX_FALSE@,$TEST_REGEX_FALSE,;t t
-s,@BUILD_HTML_TRUE@,$BUILD_HTML_TRUE,;t t
-s,@BUILD_HTML_FALSE@,$BUILD_HTML_FALSE,;t t
-s,@TEXI2HTML@,$TEXI2HTML,;t t
-s,@MAKEINFO_HTML_TRUE@,$MAKEINFO_HTML_TRUE,;t t
-s,@MAKEINFO_HTML_FALSE@,$MAKEINFO_HTML_FALSE,;t t
-s,@TEXI2HTML_HTML_TRUE@,$TEXI2HTML_HTML_TRUE,;t t
-s,@TEXI2HTML_HTML_FALSE@,$TEXI2HTML_HTML_FALSE,;t t
-s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t
-s,@MSGFMT@,$MSGFMT,;t t
-s,@GMSGFMT@,$GMSGFMT,;t t
-s,@XGETTEXT@,$XGETTEXT,;t t
-s,@MSGMERGE@,$MSGMERGE,;t t
-s,@build@,$build,;t t
-s,@build_cpu@,$build_cpu,;t t
-s,@build_vendor@,$build_vendor,;t t
-s,@build_os@,$build_os,;t t
-s,@host@,$host,;t t
-s,@host_cpu@,$host_cpu,;t t
-s,@host_vendor@,$host_vendor,;t t
-s,@host_os@,$host_os,;t t
-s,@GLIBC21@,$GLIBC21,;t t
-s,@LIBICONV@,$LIBICONV,;t t
-s,@LTLIBICONV@,$LTLIBICONV,;t t
-s,@INTLBISON@,$INTLBISON,;t t
-s,@USE_NLS@,$USE_NLS,;t t
-s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
-s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
-s,@CATOBJEXT@,$CATOBJEXT,;t t
-s,@INTLOBJS@,$INTLOBJS,;t t
-s,@DATADIRNAME@,$DATADIRNAME,;t t
-s,@INSTOBJEXT@,$INSTOBJEXT,;t t
-s,@GENCAT@,$GENCAT,;t t
-s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
-s,@INTLLIBS@,$INTLLIBS,;t t
-s,@LIBINTL@,$LIBINTL,;t t
-s,@LTLIBINTL@,$LTLIBINTL,;t t
-s,@POSUB@,$POSUB,;t t
-s,@LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
- cat >>$CONFIG_STATUS <<\_ACEOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+if test -n "$CONFIG_FILES"; then
+
+_ACEOF
+
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+SHELL!$SHELL$ac_delim
+PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
+PACKAGE_NAME!$PACKAGE_NAME$ac_delim
+PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
+PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
+PACKAGE_STRING!$PACKAGE_STRING$ac_delim
+PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
+exec_prefix!$exec_prefix$ac_delim
+prefix!$prefix$ac_delim
+program_transform_name!$program_transform_name$ac_delim
+bindir!$bindir$ac_delim
+sbindir!$sbindir$ac_delim
+libexecdir!$libexecdir$ac_delim
+datarootdir!$datarootdir$ac_delim
+datadir!$datadir$ac_delim
+sysconfdir!$sysconfdir$ac_delim
+sharedstatedir!$sharedstatedir$ac_delim
+localstatedir!$localstatedir$ac_delim
+includedir!$includedir$ac_delim
+oldincludedir!$oldincludedir$ac_delim
+docdir!$docdir$ac_delim
+infodir!$infodir$ac_delim
+htmldir!$htmldir$ac_delim
+dvidir!$dvidir$ac_delim
+pdfdir!$pdfdir$ac_delim
+psdir!$psdir$ac_delim
+libdir!$libdir$ac_delim
+localedir!$localedir$ac_delim
+mandir!$mandir$ac_delim
+DEFS!$DEFS$ac_delim
+ECHO_C!$ECHO_C$ac_delim
+ECHO_N!$ECHO_N$ac_delim
+ECHO_T!$ECHO_T$ac_delim
+LIBS!$LIBS$ac_delim
+build_alias!$build_alias$ac_delim
+host_alias!$host_alias$ac_delim
+target_alias!$target_alias$ac_delim
+INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
+INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
+INSTALL_DATA!$INSTALL_DATA$ac_delim
+am__isrc!$am__isrc$ac_delim
+CYGPATH_W!$CYGPATH_W$ac_delim
+PACKAGE!$PACKAGE$ac_delim
+VERSION!$VERSION$ac_delim
+ACLOCAL!$ACLOCAL$ac_delim
+AUTOCONF!$AUTOCONF$ac_delim
+AUTOMAKE!$AUTOMAKE$ac_delim
+AUTOHEADER!$AUTOHEADER$ac_delim
+MAKEINFO!$MAKEINFO$ac_delim
+install_sh!$install_sh$ac_delim
+STRIP!$STRIP$ac_delim
+INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
+mkdir_p!$mkdir_p$ac_delim
+AWK!$AWK$ac_delim
+SET_MAKE!$SET_MAKE$ac_delim
+am__leading_dot!$am__leading_dot$ac_delim
+AMTAR!$AMTAR$ac_delim
+am__tar!$am__tar$ac_delim
+am__untar!$am__untar$ac_delim
+SED_FEATURE_VERSION!$SED_FEATURE_VERSION$ac_delim
+CC!$CC$ac_delim
+CFLAGS!$CFLAGS$ac_delim
+LDFLAGS!$LDFLAGS$ac_delim
+CPPFLAGS!$CPPFLAGS$ac_delim
+ac_ct_CC!$ac_ct_CC$ac_delim
+EXEEXT!$EXEEXT$ac_delim
+OBJEXT!$OBJEXT$ac_delim
+DEPDIR!$DEPDIR$ac_delim
+am__include!$am__include$ac_delim
+am__quote!$am__quote$ac_delim
+AMDEP_TRUE!$AMDEP_TRUE$ac_delim
+AMDEP_FALSE!$AMDEP_FALSE$ac_delim
+AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
+CCDEPMODE!$CCDEPMODE$ac_delim
+am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
+am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
+RANLIB!$RANLIB$ac_delim
+build!$build$ac_delim
+build_cpu!$build_cpu$ac_delim
+build_vendor!$build_vendor$ac_delim
+build_os!$build_os$ac_delim
+host!$host$ac_delim
+host_cpu!$host_cpu$ac_delim
+host_vendor!$host_vendor$ac_delim
+host_os!$host_os$ac_delim
+CPP!$CPP$ac_delim
+GREP!$GREP$ac_delim
+EGREP!$EGREP$ac_delim
+GL_COND_LIBTOOL_TRUE!$GL_COND_LIBTOOL_TRUE$ac_delim
+GL_COND_LIBTOOL_FALSE!$GL_COND_LIBTOOL_FALSE$ac_delim
+LIB_ACL!$LIB_ACL$ac_delim
+USE_ACL!$USE_ACL$ac_delim
+ALLOCA!$ALLOCA$ac_delim
+ALLOCA_H!$ALLOCA_H$ac_delim
+GNULIB_BTOWC!$GNULIB_BTOWC$ac_delim
+GNULIB_WCTOB!$GNULIB_WCTOB$ac_delim
+GNULIB_MBSINIT!$GNULIB_MBSINIT$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
-fi # test -n "$CONFIG_FILES"
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+GNULIB_MBRTOWC!$GNULIB_MBRTOWC$ac_delim
+GNULIB_MBRLEN!$GNULIB_MBRLEN$ac_delim
+GNULIB_MBSRTOWCS!$GNULIB_MBSRTOWCS$ac_delim
+GNULIB_MBSNRTOWCS!$GNULIB_MBSNRTOWCS$ac_delim
+GNULIB_WCRTOMB!$GNULIB_WCRTOMB$ac_delim
+GNULIB_WCSRTOMBS!$GNULIB_WCSRTOMBS$ac_delim
+GNULIB_WCSNRTOMBS!$GNULIB_WCSNRTOMBS$ac_delim
+GNULIB_WCWIDTH!$GNULIB_WCWIDTH$ac_delim
+HAVE_BTOWC!$HAVE_BTOWC$ac_delim
+HAVE_MBSINIT!$HAVE_MBSINIT$ac_delim
+HAVE_MBRTOWC!$HAVE_MBRTOWC$ac_delim
+HAVE_MBRLEN!$HAVE_MBRLEN$ac_delim
+HAVE_MBSRTOWCS!$HAVE_MBSRTOWCS$ac_delim
+HAVE_MBSNRTOWCS!$HAVE_MBSNRTOWCS$ac_delim
+HAVE_WCRTOMB!$HAVE_WCRTOMB$ac_delim
+HAVE_WCSRTOMBS!$HAVE_WCSRTOMBS$ac_delim
+HAVE_WCSNRTOMBS!$HAVE_WCSNRTOMBS$ac_delim
+HAVE_DECL_WCTOB!$HAVE_DECL_WCTOB$ac_delim
+HAVE_DECL_WCWIDTH!$HAVE_DECL_WCWIDTH$ac_delim
+REPLACE_MBSTATE_T!$REPLACE_MBSTATE_T$ac_delim
+REPLACE_BTOWC!$REPLACE_BTOWC$ac_delim
+REPLACE_WCTOB!$REPLACE_WCTOB$ac_delim
+REPLACE_MBSINIT!$REPLACE_MBSINIT$ac_delim
+REPLACE_MBRTOWC!$REPLACE_MBRTOWC$ac_delim
+REPLACE_MBRLEN!$REPLACE_MBRLEN$ac_delim
+REPLACE_MBSRTOWCS!$REPLACE_MBSRTOWCS$ac_delim
+REPLACE_MBSNRTOWCS!$REPLACE_MBSNRTOWCS$ac_delim
+REPLACE_WCRTOMB!$REPLACE_WCRTOMB$ac_delim
+REPLACE_WCSRTOMBS!$REPLACE_WCSRTOMBS$ac_delim
+REPLACE_WCWIDTH!$REPLACE_WCWIDTH$ac_delim
+WCHAR_H!$WCHAR_H$ac_delim
+LOCALE_FR!$LOCALE_FR$ac_delim
+INCLUDE_NEXT!$INCLUDE_NEXT$ac_delim
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE!$INCLUDE_NEXT_AS_FIRST_DIRECTIVE$ac_delim
+PRAGMA_SYSTEM_HEADER!$PRAGMA_SYSTEM_HEADER$ac_delim
+NEXT_ERRNO_H!$NEXT_ERRNO_H$ac_delim
+ERRNO_H!$ERRNO_H$ac_delim
+EMULTIHOP_HIDDEN!$EMULTIHOP_HIDDEN$ac_delim
+EMULTIHOP_VALUE!$EMULTIHOP_VALUE$ac_delim
+ENOLINK_HIDDEN!$ENOLINK_HIDDEN$ac_delim
+ENOLINK_VALUE!$ENOLINK_VALUE$ac_delim
+EOVERFLOW_HIDDEN!$EOVERFLOW_HIDDEN$ac_delim
+EOVERFLOW_VALUE!$EOVERFLOW_VALUE$ac_delim
+GNULIB_FPRINTF!$GNULIB_FPRINTF$ac_delim
+GNULIB_FPRINTF_POSIX!$GNULIB_FPRINTF_POSIX$ac_delim
+GNULIB_PRINTF!$GNULIB_PRINTF$ac_delim
+GNULIB_PRINTF_POSIX!$GNULIB_PRINTF_POSIX$ac_delim
+GNULIB_SNPRINTF!$GNULIB_SNPRINTF$ac_delim
+GNULIB_SPRINTF_POSIX!$GNULIB_SPRINTF_POSIX$ac_delim
+GNULIB_VFPRINTF!$GNULIB_VFPRINTF$ac_delim
+GNULIB_VFPRINTF_POSIX!$GNULIB_VFPRINTF_POSIX$ac_delim
+GNULIB_VPRINTF!$GNULIB_VPRINTF$ac_delim
+GNULIB_VPRINTF_POSIX!$GNULIB_VPRINTF_POSIX$ac_delim
+GNULIB_VSNPRINTF!$GNULIB_VSNPRINTF$ac_delim
+GNULIB_VSPRINTF_POSIX!$GNULIB_VSPRINTF_POSIX$ac_delim
+GNULIB_DPRINTF!$GNULIB_DPRINTF$ac_delim
+GNULIB_VDPRINTF!$GNULIB_VDPRINTF$ac_delim
+GNULIB_VASPRINTF!$GNULIB_VASPRINTF$ac_delim
+GNULIB_OBSTACK_PRINTF!$GNULIB_OBSTACK_PRINTF$ac_delim
+GNULIB_OBSTACK_PRINTF_POSIX!$GNULIB_OBSTACK_PRINTF_POSIX$ac_delim
+GNULIB_FOPEN!$GNULIB_FOPEN$ac_delim
+GNULIB_FREOPEN!$GNULIB_FREOPEN$ac_delim
+GNULIB_FSEEK!$GNULIB_FSEEK$ac_delim
+GNULIB_FSEEKO!$GNULIB_FSEEKO$ac_delim
+GNULIB_FTELL!$GNULIB_FTELL$ac_delim
+GNULIB_FTELLO!$GNULIB_FTELLO$ac_delim
+GNULIB_FFLUSH!$GNULIB_FFLUSH$ac_delim
+GNULIB_FCLOSE!$GNULIB_FCLOSE$ac_delim
+GNULIB_FPUTC!$GNULIB_FPUTC$ac_delim
+GNULIB_PUTC!$GNULIB_PUTC$ac_delim
+GNULIB_PUTCHAR!$GNULIB_PUTCHAR$ac_delim
+GNULIB_FPUTS!$GNULIB_FPUTS$ac_delim
+GNULIB_PUTS!$GNULIB_PUTS$ac_delim
+GNULIB_FWRITE!$GNULIB_FWRITE$ac_delim
+GNULIB_GETDELIM!$GNULIB_GETDELIM$ac_delim
+GNULIB_GETLINE!$GNULIB_GETLINE$ac_delim
+GNULIB_PERROR!$GNULIB_PERROR$ac_delim
+GNULIB_STDIO_H_SIGPIPE!$GNULIB_STDIO_H_SIGPIPE$ac_delim
+REPLACE_STDIO_WRITE_FUNCS!$REPLACE_STDIO_WRITE_FUNCS$ac_delim
+REPLACE_FPRINTF!$REPLACE_FPRINTF$ac_delim
+REPLACE_VFPRINTF!$REPLACE_VFPRINTF$ac_delim
+REPLACE_PRINTF!$REPLACE_PRINTF$ac_delim
+REPLACE_VPRINTF!$REPLACE_VPRINTF$ac_delim
+REPLACE_SNPRINTF!$REPLACE_SNPRINTF$ac_delim
+HAVE_DECL_SNPRINTF!$HAVE_DECL_SNPRINTF$ac_delim
+REPLACE_VSNPRINTF!$REPLACE_VSNPRINTF$ac_delim
+HAVE_DECL_VSNPRINTF!$HAVE_DECL_VSNPRINTF$ac_delim
+REPLACE_SPRINTF!$REPLACE_SPRINTF$ac_delim
+REPLACE_VSPRINTF!$REPLACE_VSPRINTF$ac_delim
+HAVE_DPRINTF!$HAVE_DPRINTF$ac_delim
+REPLACE_DPRINTF!$REPLACE_DPRINTF$ac_delim
+HAVE_VDPRINTF!$HAVE_VDPRINTF$ac_delim
+REPLACE_VDPRINTF!$REPLACE_VDPRINTF$ac_delim
+HAVE_VASPRINTF!$HAVE_VASPRINTF$ac_delim
+REPLACE_VASPRINTF!$REPLACE_VASPRINTF$ac_delim
+HAVE_DECL_OBSTACK_PRINTF!$HAVE_DECL_OBSTACK_PRINTF$ac_delim
+REPLACE_OBSTACK_PRINTF!$REPLACE_OBSTACK_PRINTF$ac_delim
_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+REPLACE_FOPEN!$REPLACE_FOPEN$ac_delim
+REPLACE_FREOPEN!$REPLACE_FREOPEN$ac_delim
+HAVE_FSEEKO!$HAVE_FSEEKO$ac_delim
+REPLACE_FSEEKO!$REPLACE_FSEEKO$ac_delim
+REPLACE_FSEEK!$REPLACE_FSEEK$ac_delim
+HAVE_FTELLO!$HAVE_FTELLO$ac_delim
+REPLACE_FTELLO!$REPLACE_FTELLO$ac_delim
+REPLACE_FTELL!$REPLACE_FTELL$ac_delim
+REPLACE_FFLUSH!$REPLACE_FFLUSH$ac_delim
+REPLACE_FCLOSE!$REPLACE_FCLOSE$ac_delim
+HAVE_DECL_GETDELIM!$HAVE_DECL_GETDELIM$ac_delim
+HAVE_DECL_GETLINE!$HAVE_DECL_GETLINE$ac_delim
+REPLACE_GETLINE!$REPLACE_GETLINE$ac_delim
+REPLACE_PERROR!$REPLACE_PERROR$ac_delim
+GETOPT_H!$GETOPT_H$ac_delim
+LIBINTL!$LIBINTL$ac_delim
+LTLIBINTL!$LTLIBINTL$ac_delim
+NEXT_SYS_TIME_H!$NEXT_SYS_TIME_H$ac_delim
+HAVE_SYS_TIME_H!$HAVE_SYS_TIME_H$ac_delim
+HAVE_STRUCT_TIMEVAL!$HAVE_STRUCT_TIMEVAL$ac_delim
+REPLACE_GETTIMEOFDAY!$REPLACE_GETTIMEOFDAY$ac_delim
+SYS_TIME_H!$SYS_TIME_H$ac_delim
+GLIBC21!$GLIBC21$ac_delim
+LOCALCHARSET_TESTS_ENVIRONMENT!$LOCALCHARSET_TESTS_ENVIRONMENT$ac_delim
+GNULIB_LCHMOD!$GNULIB_LCHMOD$ac_delim
+GNULIB_LSTAT!$GNULIB_LSTAT$ac_delim
+HAVE_LCHMOD!$HAVE_LCHMOD$ac_delim
+REPLACE_LSTAT!$REPLACE_LSTAT$ac_delim
+REPLACE_MKDIR!$REPLACE_MKDIR$ac_delim
+HAVE_MALLOC_POSIX!$HAVE_MALLOC_POSIX$ac_delim
+GNULIB_MALLOC_POSIX!$GNULIB_MALLOC_POSIX$ac_delim
+GNULIB_REALLOC_POSIX!$GNULIB_REALLOC_POSIX$ac_delim
+GNULIB_CALLOC_POSIX!$GNULIB_CALLOC_POSIX$ac_delim
+GNULIB_ATOLL!$GNULIB_ATOLL$ac_delim
+GNULIB_GETLOADAVG!$GNULIB_GETLOADAVG$ac_delim
+GNULIB_GETSUBOPT!$GNULIB_GETSUBOPT$ac_delim
+GNULIB_MKDTEMP!$GNULIB_MKDTEMP$ac_delim
+GNULIB_MKSTEMP!$GNULIB_MKSTEMP$ac_delim
+GNULIB_PUTENV!$GNULIB_PUTENV$ac_delim
+GNULIB_RANDOM_R!$GNULIB_RANDOM_R$ac_delim
+GNULIB_RPMATCH!$GNULIB_RPMATCH$ac_delim
+GNULIB_SETENV!$GNULIB_SETENV$ac_delim
+GNULIB_STRTOD!$GNULIB_STRTOD$ac_delim
+GNULIB_STRTOLL!$GNULIB_STRTOLL$ac_delim
+GNULIB_STRTOULL!$GNULIB_STRTOULL$ac_delim
+GNULIB_UNSETENV!$GNULIB_UNSETENV$ac_delim
+HAVE_ATOLL!$HAVE_ATOLL$ac_delim
+HAVE_CALLOC_POSIX!$HAVE_CALLOC_POSIX$ac_delim
+HAVE_GETSUBOPT!$HAVE_GETSUBOPT$ac_delim
+HAVE_MKDTEMP!$HAVE_MKDTEMP$ac_delim
+HAVE_REALLOC_POSIX!$HAVE_REALLOC_POSIX$ac_delim
+HAVE_RANDOM_R!$HAVE_RANDOM_R$ac_delim
+HAVE_RPMATCH!$HAVE_RPMATCH$ac_delim
+HAVE_SETENV!$HAVE_SETENV$ac_delim
+HAVE_STRTOD!$HAVE_STRTOD$ac_delim
+HAVE_STRTOLL!$HAVE_STRTOLL$ac_delim
+HAVE_STRTOULL!$HAVE_STRTOULL$ac_delim
+HAVE_STRUCT_RANDOM_DATA!$HAVE_STRUCT_RANDOM_DATA$ac_delim
+HAVE_SYS_LOADAVG_H!$HAVE_SYS_LOADAVG_H$ac_delim
+HAVE_UNSETENV!$HAVE_UNSETENV$ac_delim
+HAVE_DECL_GETLOADAVG!$HAVE_DECL_GETLOADAVG$ac_delim
+REPLACE_MKSTEMP!$REPLACE_MKSTEMP$ac_delim
+REPLACE_PUTENV!$REPLACE_PUTENV$ac_delim
+REPLACE_STRTOD!$REPLACE_STRTOD$ac_delim
+VOID_UNSETENV!$VOID_UNSETENV$ac_delim
+LOCALE_JA!$LOCALE_JA$ac_delim
+LOCALE_ZH_CN!$LOCALE_ZH_CN$ac_delim
+LOCALE_FR_UTF8!$LOCALE_FR_UTF8$ac_delim
+APPLE_UNIVERSAL_BUILD!$APPLE_UNIVERSAL_BUILD$ac_delim
+STDBOOL_H!$STDBOOL_H$ac_delim
+HAVE__BOOL!$HAVE__BOOL$ac_delim
+HAVE_LONG_LONG_INT!$HAVE_LONG_LONG_INT$ac_delim
+HAVE_UNSIGNED_LONG_LONG_INT!$HAVE_UNSIGNED_LONG_LONG_INT$ac_delim
+HAVE_INTTYPES_H!$HAVE_INTTYPES_H$ac_delim
+HAVE_SYS_TYPES_H!$HAVE_SYS_TYPES_H$ac_delim
+NEXT_STDINT_H!$NEXT_STDINT_H$ac_delim
+HAVE_STDINT_H!$HAVE_STDINT_H$ac_delim
+HAVE_SYS_INTTYPES_H!$HAVE_SYS_INTTYPES_H$ac_delim
+HAVE_SYS_BITYPES_H!$HAVE_SYS_BITYPES_H$ac_delim
+BITSIZEOF_PTRDIFF_T!$BITSIZEOF_PTRDIFF_T$ac_delim
+BITSIZEOF_SIZE_T!$BITSIZEOF_SIZE_T$ac_delim
+BITSIZEOF_SIG_ATOMIC_T!$BITSIZEOF_SIG_ATOMIC_T$ac_delim
+BITSIZEOF_WCHAR_T!$BITSIZEOF_WCHAR_T$ac_delim
+BITSIZEOF_WINT_T!$BITSIZEOF_WINT_T$ac_delim
+HAVE_SIGNED_SIG_ATOMIC_T!$HAVE_SIGNED_SIG_ATOMIC_T$ac_delim
+HAVE_SIGNED_WCHAR_T!$HAVE_SIGNED_WCHAR_T$ac_delim
+HAVE_SIGNED_WINT_T!$HAVE_SIGNED_WINT_T$ac_delim
+PTRDIFF_T_SUFFIX!$PTRDIFF_T_SUFFIX$ac_delim
+SIZE_T_SUFFIX!$SIZE_T_SUFFIX$ac_delim
+SIG_ATOMIC_T_SUFFIX!$SIG_ATOMIC_T_SUFFIX$ac_delim
+WCHAR_T_SUFFIX!$WCHAR_T_SUFFIX$ac_delim
+WINT_T_SUFFIX!$WINT_T_SUFFIX$ac_delim
+STDINT_H!$STDINT_H$ac_delim
+NEXT_STDIO_H!$NEXT_STDIO_H$ac_delim
+NEXT_STDLIB_H!$NEXT_STDLIB_H$ac_delim
+HAVE_RANDOM_H!$HAVE_RANDOM_H$ac_delim
+GNULIB_MEMMEM!$GNULIB_MEMMEM$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-3.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+GNULIB_MEMPCPY!$GNULIB_MEMPCPY$ac_delim
+GNULIB_MEMRCHR!$GNULIB_MEMRCHR$ac_delim
+GNULIB_RAWMEMCHR!$GNULIB_RAWMEMCHR$ac_delim
+GNULIB_STPCPY!$GNULIB_STPCPY$ac_delim
+GNULIB_STPNCPY!$GNULIB_STPNCPY$ac_delim
+GNULIB_STRCHRNUL!$GNULIB_STRCHRNUL$ac_delim
+GNULIB_STRDUP!$GNULIB_STRDUP$ac_delim
+GNULIB_STRNDUP!$GNULIB_STRNDUP$ac_delim
+GNULIB_STRNLEN!$GNULIB_STRNLEN$ac_delim
+GNULIB_STRPBRK!$GNULIB_STRPBRK$ac_delim
+GNULIB_STRSEP!$GNULIB_STRSEP$ac_delim
+GNULIB_STRSTR!$GNULIB_STRSTR$ac_delim
+GNULIB_STRCASESTR!$GNULIB_STRCASESTR$ac_delim
+GNULIB_STRTOK_R!$GNULIB_STRTOK_R$ac_delim
+GNULIB_MBSLEN!$GNULIB_MBSLEN$ac_delim
+GNULIB_MBSNLEN!$GNULIB_MBSNLEN$ac_delim
+GNULIB_MBSCHR!$GNULIB_MBSCHR$ac_delim
+GNULIB_MBSRCHR!$GNULIB_MBSRCHR$ac_delim
+GNULIB_MBSSTR!$GNULIB_MBSSTR$ac_delim
+GNULIB_MBSCASECMP!$GNULIB_MBSCASECMP$ac_delim
+GNULIB_MBSNCASECMP!$GNULIB_MBSNCASECMP$ac_delim
+GNULIB_MBSPCASECMP!$GNULIB_MBSPCASECMP$ac_delim
+GNULIB_MBSCASESTR!$GNULIB_MBSCASESTR$ac_delim
+GNULIB_MBSCSPN!$GNULIB_MBSCSPN$ac_delim
+GNULIB_MBSPBRK!$GNULIB_MBSPBRK$ac_delim
+GNULIB_MBSSPN!$GNULIB_MBSSPN$ac_delim
+GNULIB_MBSSEP!$GNULIB_MBSSEP$ac_delim
+GNULIB_MBSTOK_R!$GNULIB_MBSTOK_R$ac_delim
+GNULIB_STRERROR!$GNULIB_STRERROR$ac_delim
+GNULIB_STRSIGNAL!$GNULIB_STRSIGNAL$ac_delim
+GNULIB_STRVERSCMP!$GNULIB_STRVERSCMP$ac_delim
+HAVE_DECL_MEMMEM!$HAVE_DECL_MEMMEM$ac_delim
+HAVE_MEMPCPY!$HAVE_MEMPCPY$ac_delim
+HAVE_DECL_MEMRCHR!$HAVE_DECL_MEMRCHR$ac_delim
+HAVE_RAWMEMCHR!$HAVE_RAWMEMCHR$ac_delim
+HAVE_STPCPY!$HAVE_STPCPY$ac_delim
+HAVE_STPNCPY!$HAVE_STPNCPY$ac_delim
+HAVE_STRCHRNUL!$HAVE_STRCHRNUL$ac_delim
+HAVE_DECL_STRDUP!$HAVE_DECL_STRDUP$ac_delim
+HAVE_STRNDUP!$HAVE_STRNDUP$ac_delim
+HAVE_DECL_STRNDUP!$HAVE_DECL_STRNDUP$ac_delim
+HAVE_DECL_STRNLEN!$HAVE_DECL_STRNLEN$ac_delim
+HAVE_STRPBRK!$HAVE_STRPBRK$ac_delim
+HAVE_STRSEP!$HAVE_STRSEP$ac_delim
+HAVE_STRCASESTR!$HAVE_STRCASESTR$ac_delim
+HAVE_DECL_STRTOK_R!$HAVE_DECL_STRTOK_R$ac_delim
+HAVE_DECL_STRERROR!$HAVE_DECL_STRERROR$ac_delim
+HAVE_DECL_STRSIGNAL!$HAVE_DECL_STRSIGNAL$ac_delim
+HAVE_STRVERSCMP!$HAVE_STRVERSCMP$ac_delim
+REPLACE_MEMMEM!$REPLACE_MEMMEM$ac_delim
+REPLACE_STRDUP!$REPLACE_STRDUP$ac_delim
+REPLACE_STRSTR!$REPLACE_STRSTR$ac_delim
+REPLACE_STRCASESTR!$REPLACE_STRCASESTR$ac_delim
+REPLACE_STRERROR!$REPLACE_STRERROR$ac_delim
+REPLACE_STRSIGNAL!$REPLACE_STRSIGNAL$ac_delim
+NEXT_STRING_H!$NEXT_STRING_H$ac_delim
+HAVE_LSTAT!$HAVE_LSTAT$ac_delim
+NEXT_SYS_STAT_H!$NEXT_SYS_STAT_H$ac_delim
+SYS_STAT_H!$SYS_STAT_H$ac_delim
+GNULIB_CHOWN!$GNULIB_CHOWN$ac_delim
+GNULIB_CLOSE!$GNULIB_CLOSE$ac_delim
+GNULIB_DUP2!$GNULIB_DUP2$ac_delim
+GNULIB_ENVIRON!$GNULIB_ENVIRON$ac_delim
+GNULIB_EUIDACCESS!$GNULIB_EUIDACCESS$ac_delim
+GNULIB_FCHDIR!$GNULIB_FCHDIR$ac_delim
+GNULIB_FSYNC!$GNULIB_FSYNC$ac_delim
+GNULIB_FTRUNCATE!$GNULIB_FTRUNCATE$ac_delim
+GNULIB_GETCWD!$GNULIB_GETCWD$ac_delim
+GNULIB_GETDOMAINNAME!$GNULIB_GETDOMAINNAME$ac_delim
+GNULIB_GETDTABLESIZE!$GNULIB_GETDTABLESIZE$ac_delim
+GNULIB_GETHOSTNAME!$GNULIB_GETHOSTNAME$ac_delim
+GNULIB_GETLOGIN_R!$GNULIB_GETLOGIN_R$ac_delim
+GNULIB_GETPAGESIZE!$GNULIB_GETPAGESIZE$ac_delim
+GNULIB_GETUSERSHELL!$GNULIB_GETUSERSHELL$ac_delim
+GNULIB_LCHOWN!$GNULIB_LCHOWN$ac_delim
+GNULIB_LINK!$GNULIB_LINK$ac_delim
+GNULIB_LSEEK!$GNULIB_LSEEK$ac_delim
+GNULIB_READLINK!$GNULIB_READLINK$ac_delim
+GNULIB_SLEEP!$GNULIB_SLEEP$ac_delim
+GNULIB_UNISTD_H_SIGPIPE!$GNULIB_UNISTD_H_SIGPIPE$ac_delim
+GNULIB_WRITE!$GNULIB_WRITE$ac_delim
+HAVE_DUP2!$HAVE_DUP2$ac_delim
+HAVE_EUIDACCESS!$HAVE_EUIDACCESS$ac_delim
+HAVE_FSYNC!$HAVE_FSYNC$ac_delim
+HAVE_FTRUNCATE!$HAVE_FTRUNCATE$ac_delim
+HAVE_GETDOMAINNAME!$HAVE_GETDOMAINNAME$ac_delim
+HAVE_GETDTABLESIZE!$HAVE_GETDTABLESIZE$ac_delim
+HAVE_GETHOSTNAME!$HAVE_GETHOSTNAME$ac_delim
+HAVE_GETPAGESIZE!$HAVE_GETPAGESIZE$ac_delim
+HAVE_GETUSERSHELL!$HAVE_GETUSERSHELL$ac_delim
+HAVE_LINK!$HAVE_LINK$ac_delim
+HAVE_READLINK!$HAVE_READLINK$ac_delim
+HAVE_SLEEP!$HAVE_SLEEP$ac_delim
+HAVE_DECL_ENVIRON!$HAVE_DECL_ENVIRON$ac_delim
+HAVE_DECL_GETLOGIN_R!$HAVE_DECL_GETLOGIN_R$ac_delim
+HAVE_OS_H!$HAVE_OS_H$ac_delim
+HAVE_SYS_PARAM_H!$HAVE_SYS_PARAM_H$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-4.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+CEOF$ac_eof
+_ACEOF
+
+
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ cat >conf$$subs.sed <<_ACEOF
+REPLACE_CHOWN!$REPLACE_CHOWN$ac_delim
+REPLACE_CLOSE!$REPLACE_CLOSE$ac_delim
+REPLACE_FCHDIR!$REPLACE_FCHDIR$ac_delim
+REPLACE_GETCWD!$REPLACE_GETCWD$ac_delim
+REPLACE_GETPAGESIZE!$REPLACE_GETPAGESIZE$ac_delim
+REPLACE_LCHOWN!$REPLACE_LCHOWN$ac_delim
+REPLACE_LSEEK!$REPLACE_LSEEK$ac_delim
+REPLACE_WRITE!$REPLACE_WRITE$ac_delim
+UNISTD_H_HAVE_WINSOCK2_H!$UNISTD_H_HAVE_WINSOCK2_H$ac_delim
+NEXT_UNISTD_H!$NEXT_UNISTD_H$ac_delim
+HAVE_UNISTD_H!$HAVE_UNISTD_H$ac_delim
+HAVE_WINT_T!$HAVE_WINT_T$ac_delim
+HAVE_WCHAR_H!$HAVE_WCHAR_H$ac_delim
+NEXT_WCHAR_H!$NEXT_WCHAR_H$ac_delim
+HAVE_ISWCNTRL!$HAVE_ISWCNTRL$ac_delim
+NEXT_WCTYPE_H!$NEXT_WCTYPE_H$ac_delim
+HAVE_WCTYPE_H!$HAVE_WCTYPE_H$ac_delim
+WCTYPE_H!$WCTYPE_H$ac_delim
+REPLACE_ISWCNTRL!$REPLACE_ISWCNTRL$ac_delim
+LIBSED_LIBDEPS!$LIBSED_LIBDEPS$ac_delim
+LIBSED_LTLIBDEPS!$LIBSED_LTLIBDEPS$ac_delim
+USE_NLS!$USE_NLS$ac_delim
+GETTEXT_MACRO_VERSION!$GETTEXT_MACRO_VERSION$ac_delim
+MSGFMT!$MSGFMT$ac_delim
+GMSGFMT!$GMSGFMT$ac_delim
+MSGFMT_015!$MSGFMT_015$ac_delim
+GMSGFMT_015!$GMSGFMT_015$ac_delim
+XGETTEXT!$XGETTEXT$ac_delim
+XGETTEXT_015!$XGETTEXT_015$ac_delim
+MSGMERGE!$MSGMERGE$ac_delim
+XGETTEXT_EXTRA_OPTIONS!$XGETTEXT_EXTRA_OPTIONS$ac_delim
+INTL_MACOSX_LIBS!$INTL_MACOSX_LIBS$ac_delim
+LIBICONV!$LIBICONV$ac_delim
+LTLIBICONV!$LTLIBICONV$ac_delim
+INTLLIBS!$INTLLIBS$ac_delim
+POSUB!$POSUB$ac_delim
+TEST_REGEX_TRUE!$TEST_REGEX_TRUE$ac_delim
+TEST_REGEX_FALSE!$TEST_REGEX_FALSE$ac_delim
+XFAIL_TESTS!$XFAIL_TESTS$ac_delim
+LIBOBJS!$LIBOBJS$ac_delim
+LTLIBOBJS!$LTLIBOBJS$ac_delim
+gl_LIBOBJS!$gl_LIBOBJS$ac_delim
+gl_LTLIBOBJS!$gl_LTLIBOBJS$ac_delim
+gltests_LIBOBJS!$gltests_LIBOBJS$ac_delim
+gltests_LTLIBOBJS!$gltests_LTLIBOBJS$ac_delim
+_ACEOF
+
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 45; then
+ break
+ elif $ac_last_try; then
+ { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+ ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+ ac_eof=`expr $ac_eof + 1`
+fi
+
+cat >>$CONFIG_STATUS <<_ACEOF
+cat >"\$tmp/subs-5.sed" <<\CEOF$ac_eof
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+_ACEOF
+sed '
+s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
+s/^/s,@/; s/!/@,|#_!!_#|/
+:n
+t n
+s/'"$ac_delim"'$/,g/; t
+s/$/\\/; p
+N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
+' >>$CONFIG_STATUS <conf$$subs.sed
+rm -f conf$$subs.sed
+cat >>$CONFIG_STATUS <<_ACEOF
+:end
+s/|#_!!_#|//g
+CEOF$ac_eof
+_ACEOF
+
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
+fi # test -n "$CONFIG_FILES"
+
+
+for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
+echo "$as_me: error: Invalid tag $ac_tag." >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ ac_file_inputs="$ac_file_inputs $ac_f"
+ done
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input="Generated from "`IFS=:
+ echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ fi
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin";;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
-
ac_builddir=.
-if test "$ac_dir" != .; then
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
case $srcdir in
- .) # No --srcdir option. We are building in place.
+ .) # We are building in place.
ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
case $INSTALL in
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
- *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
- if test x"$ac_file" != x-; then
- { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+case `sed -n '/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+' $ac_file_inputs` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
cat >>$CONFIG_STATUS <<_ACEOF
sed "$ac_vpsub
$extrasub
@@ -10561,529 +25473,175 @@ _ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-s,@INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
- # Run the commands associated with the file.
+s&@configure_input@&$configure_input&;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" | sed -f "$tmp/subs-3.sed" | sed -f "$tmp/subs-4.sed" | sed -f "$tmp/subs-5.sed" >$tmp/out
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
case $ac_file in
- bootstrap.sh ) chmod +x bootstrap.sh ;;
+ -) cat "$tmp/out"; rm -f "$tmp/out";;
+ *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
esac
-done
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_HEADER section.
-#
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
+# Transform confdefs.h into a sed script `conftest.defines', that
+# substitutes the proper values into config.h.in to produce config.h.
+rm -f conftest.defines conftest.tail
+# First, append a space to every undef/define line, to ease matching.
+echo 's/$/ /' >conftest.defines
+# Then, protect against being on the right side of a sed subst, or in
+# an unquoted here document, in config.status. If some macros were
+# called several times there might be several #defines for the same
+# symbol, which is useless. But do not sort them, since the last
+# AC_DEFINE must be honored.
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
+# NAME is the cpp macro being defined, VALUE is the value it is being given.
+# PARAMS is the parameter list in the macro definition--in most cases, it's
+# just an empty string.
+ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
+ac_dB='\\)[ (].*,\\1define\\2'
ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- # Do quote $f, to prevent DOS paths from being IFS'd.
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- # Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h. The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status. Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless. Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments. This is necessary, for
+ac_dD=' ,'
+
+uniq confdefs.h |
+ sed -n '
+ t rset
+ :rset
+ s/^[ ]*#[ ]*define[ ][ ]*//
+ t ok
+ d
+ :ok
+ s/[\\&,]/\\&/g
+ s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
+ s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
+ ' >>conftest.defines
+
+# Remove the space that was appended to ease matching.
+# Then replace #undef with comments. This is necessary, for
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo ' :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
+# (The regexp can be short, since the line contains either #define or #undef.)
+echo 's/ $//
+s,^[ #]*u.*,/* & */,' >>conftest.defines
+
+# Break up conftest.defines:
+ac_max_sed_lines=50
+
+# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
+# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
+# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
+# et cetera.
+ac_in='$ac_file_inputs'
+ac_out='"$tmp/out1"'
+ac_nxt='"$tmp/out2"'
+
+while :
do
- # Write a limited-size here document to $tmp/defines.sed.
- echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ # Write a here document:
+ cat >>$CONFIG_STATUS <<_ACEOF
+ # First, check the format of the line:
+ cat >"\$tmp/defines.sed" <<\\CEOF
+/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
+/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
+b
+:def
+_ACEOF
+ sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
echo 'CEOF
- sed -f $tmp/defines.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
+ ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
+ sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
+ grep . conftest.tail >/dev/null || break
rm -f conftest.defines
mv conftest.tail conftest.defines
done
-rm -f conftest.defines
-echo ' fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
- # Write a limited-size here document to $tmp/undefs.sed.
- echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
- # Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
- # Work around the forget-to-reset-the-flag bug.
- echo 't clr' >>$CONFIG_STATUS
- echo ': clr' >>$CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
- echo 'CEOF
- sed -f $tmp/undefs.sed $tmp/in >$tmp/out
- rm -f $tmp/in
- mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
- rm -f conftest.undefs
- mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
+rm -f conftest.defines conftest.tail
+echo "ac_result=$ac_in" >>$CONFIG_STATUS
cat >>$CONFIG_STATUS <<\_ACEOF
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- echo "/* Generated by configure. */" >$tmp/config.h
- else
- echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
- fi
- cat $tmp/in >>$tmp/config.h
- rm -f $tmp/in
if test x"$ac_file" != x-; then
- if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ echo "/* $configure_input */" >"$tmp/config.h"
+ cat "$ac_result" >>"$tmp/config.h"
+ if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
{ echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
rm -f $ac_file
- mv $tmp/config.h $ac_file
+ mv "$tmp/config.h" $ac_file
fi
else
- cat $tmp/config.h
- rm -f $tmp/config.h
+ echo "/* $configure_input */"
+ cat "$ac_result"
fi
+ rm -f "$tmp/out12"
# Compute $ac_file's index in $config_headers.
+_am_arg=$ac_file
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $ac_file | $ac_file:* )
+ $_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X$ac_file |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`/stamp-h$_am_stamp_count
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-
-#
-# CONFIG_LINKS section.
-#
-
-for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
-
- { echo "$as_me:$LINENO: linking $srcdir/$ac_source to $ac_dest" >&5
-echo "$as_me: linking $srcdir/$ac_source to $ac_dest" >&6;}
-
- if test ! -r $srcdir/$ac_source; then
- { { echo "$as_me:$LINENO: error: $srcdir/$ac_source: file not found" >&5
-echo "$as_me: error: $srcdir/$ac_source: file not found" >&2;}
- { (exit 1); exit 1; }; }
- fi
- rm -f $ac_dest
-
- # Make relative symlinks.
- ac_dest_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dest_dir"
- else
- as_dir="$ac_dest_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dest_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dest_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dest_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dest_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dest_dir";;
-*)
- case "$ac_dest_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dest_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dest_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
- case $srcdir in
- [\\/$]* | ?:[\\/]* ) ac_rel_source=$srcdir/$ac_source ;;
- *) ac_rel_source=$ac_top_builddir$srcdir/$ac_source ;;
+ :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
+echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
esac
- # Try a symlink, then a hard link, then a copy.
- ln -s $ac_rel_source $ac_dest 2>/dev/null ||
- ln $srcdir/$ac_source $ac_dest 2>/dev/null ||
- cp -p $srcdir/$ac_source $ac_dest ||
- { { echo "$as_me:$LINENO: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&5
-echo "$as_me: error: cannot link or copy $srcdir/$ac_source to $ac_dest" >&2;}
- { (exit 1); exit 1; }; }
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
- case $ac_dest in
- depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
+ case $ac_file$ac_mode in
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
@@ -11091,20 +25649,32 @@ echo "$as_me: executing $ac_dest commands" >&6;}
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
- # So let's grep whole file.
- if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
- dirpart=`(dirname "$mf") 2>/dev/null ||
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
else
continue
fi
@@ -11126,49 +25696,76 @@ echo X"$mf" |
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
- fdir=`(dirname "$file") 2>/dev/null ||
+ fdir=`$as_dirname -- "$file" ||
$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$file" : 'X\(//\)[^/]' \| \
X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p $dirpart/$fdir
- else
- as_dir=$dirpart/$fdir
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir=$dirpart/$fdir
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$as_dir" : 'X\(//\)[^/]' \| \
X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
-echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+echo "$as_me: error: cannot create directory $as_dir" >&2;}
{ (exit 1); exit 1; }; }; }
-
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
;;
- default-1 )
+ "po-directories":C)
for ac_file in $CONFIG_FILES; do
# Support "outfile[:infile[:infile...]]"
case "$ac_file" in
@@ -11188,35 +25785,52 @@ done
/*) top_srcdir="$ac_given_srcdir" ;;
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
rm -f "$ac_dir/POTFILES"
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
- # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
# on $ac_dir but don't depend on user-specified configuration
# parameters.
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
# The LINGUAS file contains the set of available languages.
- if test -n "$ALL_LINGUAS"; then
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
fi
- ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
- # Hide the ALL_LINGUAS assigment from automake.
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
case "$ac_given_srcdir" in
.) srcdirpre= ;;
*) srcdirpre='$(srcdir)/' ;;
esac
POFILES=
- GMOFILES=
UPDATEPOFILES=
DUMMYPOFILES=
+ GMOFILES=
for lang in $ALL_LINGUAS; do
POFILES="$POFILES $srcdirpre$lang.po"
- GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
done
# CATALOGS depends on both $ac_dir and the user's LINGUAS
# environment variable.
@@ -11251,7 +25865,7 @@ done
done
fi
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
- sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
if test -f "$f"; then
case "$f" in
@@ -11264,22 +25878,11 @@ done
;;
esac
done ;;
- gettext-fix )
- sed -e '/^mkinstalldirs *=/a\' \
- -e "install_sh=$install_sh" \
- -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
- intl/Makefile > intl/Makefile.tmp
- mv intl/Makefile.tmp intl/Makefile
- sed -e '/^mkinstalldirs *=/a\' \
- -e "install_sh=$install_sh" \
- -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
- po/Makefile > po/Makefile.tmp
- mv po/Makefile.tmp po/Makefile ;;
+ "bootstrap.sh":F) chmod +x bootstrap.sh ;;
+
esac
-done
-_ACEOF
+done # for ac_tag
-cat >>$CONFIG_STATUS <<\_ACEOF
{ (exit 0); exit 0; }
_ACEOF
diff --git a/configure.ac b/configure.ac
index 446c412..ed5a728 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,25 +1,21 @@
dnl Process this file with -*- autoconf -*- to produce a configure script.
-AC_INIT(sed, 4.1.5, bonzini@gnu.org, sed)
-AC_CONFIG_AUX_DIR(config)
+AC_INIT(sed, 4.2, bug-gnu-utils@gnu.org, sed)
+AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_SRCDIR([sed/sed.c])
AM_CONFIG_HEADER(config.h:config_h.in)
-AC_PREREQ(2.59)
+AC_PREREQ(2.60)
AM_INIT_AUTOMAKE
-SED_FEATURE_VERSION=4.1
+SED_FEATURE_VERSION=4.2
AC_DEFINE_UNQUOTED(SED_FEATURE_VERSION, "$SED_FEATURE_VERSION",
[Define to the version of GNU sed whose features are supported by this sed.])
AC_SUBST(SED_FEATURE_VERSION)
AC_PROG_CC
-AC_PROG_RANLIB
-AC_GNU_SOURCE
-AC_AIX
-AC_MINIX
-AC_ISC_POSIX
-AC_SYS_LARGEFILE
+gl_EARLY
+gl_INIT
+gl_DISABLE_THREADS
AC_SYS_LONG_FILE_NAMES
-
AC_CACHE_CHECK([whether -lcP is needed], [sed_cv_libcp_needed], [
AC_TRY_RUN([
#include <stdio.h>
@@ -44,56 +40,29 @@ if test "$sed_cv_libcp_needed" = yes; then
fi
AC_HEADER_DIRENT
-AC_CHECK_HEADERS(io.h limits.h locale.h stdarg.h alloca.h stddef.h errno.h \
- wchar.h wctype.h sys/file.h mcheck.h, [], [],
+AC_CHECK_HEADERS_ONCE(io.h limits.h locale.h stdarg.h alloca.h stddef.h
+ errno.h wchar.h wctype.h sys/file.h mcheck.h, [], [],
[AC_INCLUDES_DEFAULT])
AC_C_CONST
AC_TYPE_SIZE_T
AC_CHECK_TYPE(ssize_t, int)
-AC_HEADER_STDBOOL
-if test "$ac_cv_type__Bool" = no; then
- HAVE__BOOL=0
-else
- HAVE__BOOL=1
-fi
-AC_SUBST(HAVE__BOOL)
-if test "$ac_cv_header_stdbool_h" = no; then
- AC_CONFIG_FILES(lib/stdbool.h:lib/stdbool_.h)
-fi
-
-AC_FUNC_ALLOCA
AC_FUNC_VPRINTF
-AM_FUNC_GETLINE
-AC_FUNC_OBSTACK
-AC_FUNC_MBRTOWC
-AC_TYPE_MBSTATE_T
-gl_FUNC_STRVERSCMP
-AC_REPLACE_FUNCS(memchr memcmp memmove strerror mkstemp)
-AC_CHECK_FUNCS(isatty bcopy bzero isascii memcpy memset strchr strtoul popen \
- pathconf isblank fchown fchmod setlocale wcrtomb wcscoll btowc)
+
+AC_DEFUN([AM_MKINSTALLDIRS], [MKINSTALLDIRS="$mkdir_p" AC_SUBST(MKINSTALLDIRS)])
+AM_GNU_GETTEXT_VERSION(0.15)
+AM_GNU_GETTEXT([external])
+
+AC_CHECK_FUNCS_ONCE(isatty bcopy bzero isascii memcpy memset strchr strtoul
+ popen pathconf fchown fchmod setlocale)
AC_ARG_ENABLE(i18n,
-[ --disable-i18n disable internationalization (default=yes)], ,
+[ --disable-i18n disable internationalization (default=enabled)], ,
enable_i18n=yes)
if test "x$enable_i18n" = xno; then
ac_cv_func_wcscoll=false
fi
-AC_ARG_WITH(included-regex,
-[ --with-included-regex use included regex matcher (default=yes)], ,
-with_included_regex=yes)
-
-if test "x$with_included_regex" = xno; then
- AC_CHECK_HEADERS(regex.h)
- AC_CHECK_LIB(regex, re_search)
- AC_CHECK_FUNC(re_search)
- if test $ac_cv_header_regex_h = no || test $ac_cv_func_re_search = no; then
- AC_MSG_WARN([GNU regex not found, falling back to the included version])
- with_included_regex=yes
- fi
-fi
-
AC_ARG_ENABLE(regex-tests,
[ --enable-regex-tests enable regex matcher regression tests (default=yes)],
[if test "x$with_included_regex" = xno; then
@@ -101,64 +70,102 @@ AC_ARG_ENABLE(regex-tests,
fi],
enable_regex_tests=$with_included_regex)
-AM_CONDITIONAL(TEST_REGEX, test "x$enable_regex_tests" != xno)
-if test "x$with_included_regex" != xno; then
- AC_CONFIG_LINKS(lib/regex.h:lib/regex_.h)
- AC_LIBOBJ(regex)
-fi
+AM_CONDITIONAL(TEST_REGEX, test "x$enable_regex_tests" = xyes)
if test "x$enable_regex_tests" = xyes; then
AC_DEFINE_UNQUOTED(_REGEX_RE_COMP, 1,
[Include BSD functions in regex, used by the testsuite])
fi
-AC_ARG_ENABLE(html,
-[ --enable-html build HTML manual (default=no)], ,
-enable_html=no)
-
-AM_CONDITIONAL(BUILD_HTML, test "x$enable_html" != xno)
+# Check whether we are able to follow symlinks
+AC_CHECK_FUNC(lstat, have_lstat=yes)
+AC_CHECK_FUNC(readlink, have_readlink=yes)
+if test "x$have_lstat" = xyes -a "x$have_readlink" = xyes; then
+ AC_DEFINE(ENABLE_FOLLOW_SYMLINKS, ,[Follow symlinks when processing in place])
+fi
-: ${TEXI2HTML=texi2html -monolithic}
-AC_SUBST(TEXI2HTML)
+# Determine whether we should run UTF-8 tests by checking if cyrillic
+# letters are case-folded properly. The test for UTF-8 locales (bot
+# in general and specifically for a Russian one) is a bit weak, but it
+# should match exactly what is done in the testsuite. In fact, sed's
+# logic is portable (though testing it requires care) so it is enough to
+# have a couple of platforms where these tests pass. Right now, only
+# Windows and HP/UX do not support the tests.
+AC_MSG_CHECKING([whether UTF-8 case folding tests should pass])
+AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <stdlib.h>
+#include <wchar.h>
+#ifdef HAVE_WCTYPE_H
+#include <wctype.h>
+#endif
+
+int test(void)
+{
+ char in[] = "\xD0\xB4";
+ char good[] = "\xD0\x94";
+ char out[10];
+ wchar_t in_wc, good_wc;
+ if (mbtowc (&in_wc, in, 3) == -1)
+ return 0;
+ if (mbtowc (&good_wc, good, 3) == -1)
+ return 0;
+ if (towupper (in_wc) != good_wc)
+ return 0;
+ if (wctomb (out, good_wc) != 2)
+ return 0;
+ if (memcmp (out, good, 2))
+ return 0;
+ return 1;
+}
-AC_MSG_CHECKING(how to build HTML documentation)
-if eval $am_missing_run makeinfo --help 2>&1 | grep .-html > /dev/null; then
- AC_MSG_RESULT(with makeinfo)
- enable_html=makeinfo
-else
- if $TEXI2HTML --help 2>&1 | grep monolithic > /dev/null; then
- AC_MSG_RESULT(with texi2html)
- enable_html=texi2html
+int main()
+{
+ char *old;
+ int len;
+
+ /* Try hardcoding a Russian UTF-8 locale. If the name "ru_RU.UTF-8"
+ is invalid, use setlocale again just to get the current locale. */
+ old = setlocale (LC_CTYPE, "ru_RU.UTF-8");
+ if (old)
+ {
+ if (test())
+ exit (0);
+ }
else
- AC_MSG_RESULT(not built)
- if test "x$enable_html" != xno; then
- AC_MSG_ERROR(cannot build HTML documentation, install makeinfo 4.0 or texi2html)
- fi
- enable_html=no
- fi
-fi
-
-AM_CONDITIONAL(MAKEINFO_HTML, test "x$enable_html" = xmakeinfo)
-AM_CONDITIONAL(TEXI2HTML_HTML, test "x$enable_html" = xtexi2html)
-
-
-AC_DEFUN([AM_MKINSTALLDIRS], [MKINSTALLDIRS="$mkdir_p" AC_SUBST(MKINSTALLDIRS)])
-AM_GNU_GETTEXT_VERSION(0.14)
-AM_GNU_GETTEXT(no-libtool, need-ngettext, ../intl)
-AC_CONFIG_COMMANDS([gettext-fix], [
- sed -e '/^mkinstalldirs *=/a\' \
- -e "install_sh=$install_sh" \
- -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
- intl/Makefile > intl/Makefile.tmp
- mv intl/Makefile.tmp intl/Makefile
- sed -e '/^mkinstalldirs *=/a\' \
- -e "install_sh=$install_sh" \
- -e 's/^mkinstalldirs *=.*/mkinstalldirs=$(MKINSTALLDIRS)/' \
- po/Makefile > po/Makefile.tmp
- mv po/Makefile.tmp po/Makefile], [
- install_sh="$install_sh"])
+ old = setlocale (LC_CTYPE, "C");
+
+ /* Maybe cyrillic case folding is implemented for all UTF-8 locales.
+ If the current locale is not UTF-8, the test will be skipped. */
+ len = strlen (old);
+ if ((len > 6 && !strcmp (old + len - 6, ".UTF-8"))
+ || (len > 6 && !strcmp (old + len - 6, ".utf-8"))
+ || (len > 5 && !strcmp (old + len - 5, ".UTF8"))
+ || (len > 5 && !strcmp (old + len - 5, ".utf8")))
+
+ /* ok */
+ ;
+ else
+ exit (1);
+
+ /* Run the test in the detected UTF-8 locale. */
+ setlocale (LC_CTYPE, old);
+ exit (!test ());
+}
+], [AC_MSG_RESULT([yes]); XFAIL_TESTS=],
+ [AC_MSG_RESULT([no]); XFAIL_TESTS='utf8-1 utf8-2 utf8-3 utf8-4'],
+ [AC_MSG_RESULT([don't care (cross compiling)]); XFAIL_TESTS=])
+
+# Under MinGW, the bsd.sh test fails because of the EOF character (^Z).
+case $host in
+ *mingw*) XFAIL_TESTS="$XFAIL_TESTS bsd" ;;
+ *) ;;
+esac
+AC_SUBST([XFAIL_TESTS])
AC_CONFIG_FILES([bootstrap.sh], chmod +x bootstrap.sh)
+AC_CONFIG_FILES([testsuite/version.good:testsuite/version.gin])
AC_CONFIG_FILES([Makefile doc/Makefile \
lib/Makefile sed/Makefile testsuite/Makefile \
-po/Makefile.in intl/Makefile])
+po/Makefile.in])
AC_OUTPUT
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 80ecafd..af6975c 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -2,54 +2,32 @@
info_TEXINFOS = sed.texi
sed_TEXINFOS = config.texi version.texi
dist_man_MANS = sed.1
-dist_noinst_DATA = sed.x sed-in.texi
+dist_noinst_DATA = sed.x sed-in.texi s-texi
dist_noinst_SCRIPTS = groupify.sed
-CLEANFILES = sed.html
-TEXI2DVI = $(top_srcdir)/config/texi2dvi --expand
-HELP2MAN = $(top_srcdir)/config/help2man
+TEXI2DVI = $(top_srcdir)/build-aux/texi2dvi --expand
+HELP2MAN = $(top_srcdir)/build-aux/help2man
SED = $(top_builddir)/sed/sed
+AM_MAKEINFOHTMLFLAGS = --no-split
+
# To produce better quality output, in the example sed
# scripts we group comments with lines following them;
# since mantaining the "@group...@end group" manually
# is a burden, we do this automatically
-$(srcdir)/sed.texi: sed-in.texi $(srcdir)/groupify.sed
+$(srcdir)/sed.texi: $(srcdir)/s-texi
+$(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed
sed -nf $(srcdir)/groupify.sed \
- < $(srcdir)/sed-in.texi > $(srcdir)/sed.texi
+ < $(srcdir)/sed-in.texi > $(srcdir)/sed-tmp.texi
+ if cmp $(srcdir)/sed.texi $(srcdir)/sed-tmp.texi; then \
+ rm -f $(srcdir)/sed-tmp.texi; \
+ else \
+ mv -f $(srcdir)/sed-tmp.texi $(srcdir)/sed.texi; \
+ fi
+ echo stamp > $(srcdir)/s-texi
sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
$(HELP2MAN) --name "stream editor for filtering and transforming text" \
- -p sed --include $(srcdir)/sed.x $(SED) > $(srcdir)/sed.1
+ -p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED)
dist-hook:
touch $(distdir)/sed.1
-
-# This rule is used if --enable-html is passed
-if BUILD_HTML
-docdir = $(datadir)/doc
-pkgdocdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
-pkgdoc_DATA = sed.html
-
-all: html
-
-html: sed.html
-
-.PHONY: html
-endif
-
-# Having a dependancy on sed.info automatically makes
-# sed.html dependant on sed.texi and all the included
-# sources
-if MAKEINFO_HTML
-sed.html: sed.texi sed.info
- builddir=`pwd` && cd $(srcdir) && \
- $(MAKEINFO) --html --no-split -o $$builddir/sed.html sed.texi
-endif
-
-# These rules are used together with TEXI2HTML
-if TEXI2HTML_HTML
-sed.html: sed.texi sed.info
- cp $(srcdir)/*.texi . && \
- $(TEXI2HTML) sed.texi && \
- rm *.texi
-endif
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 39ca0f7..085069a 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,15 +15,11 @@
@SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -43,18 +39,40 @@ DIST_COMMON = $(dist_man_MANS) $(dist_noinst_DATA) \
$(srcdir)/Makefile.in $(srcdir)/stamp-vti \
$(srcdir)/version.texi
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/codeset.m4 \
- $(top_srcdir)/config/getline.m4 \
- $(top_srcdir)/config/gettext-ver.m4 \
- $(top_srcdir)/config/gettext.m4 \
- $(top_srcdir)/config/glibc21.m4 $(top_srcdir)/config/iconv.m4 \
- $(top_srcdir)/config/lcmessage.m4 \
- $(top_srcdir)/config/lib-ld.m4 \
- $(top_srcdir)/config/lib-link.m4 \
- $(top_srcdir)/config/lib-prefix.m4 \
- $(top_srcdir)/config/progtest.m4 \
- $(top_srcdir)/config/stdbool.m4 \
- $(top_srcdir)/config/strverscmp.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+ $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
+ $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
+ $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getline.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+ $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/mbrlen.m4 \
+ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \
+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mkstemp.m4 \
+ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
+ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/realloc.m4 \
+ $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/ssize_t.m4 \
+ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
+ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \
+ $(top_srcdir)/m4/strverscmp.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
+ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/tempname.m4 \
+ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/wchar.m4 \
+ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+ $(top_srcdir)/m4/wctype.m4 $(top_srcdir)/m4/wint_t.m4 \
+ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -64,8 +82,8 @@ SCRIPTS = $(dist_noinst_SCRIPTS)
SOURCES =
DIST_SOURCES =
INFO_DEPS = $(srcdir)/sed.info
-TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex
-am__TEXINFO_TEX_DIR = $(top_srcdir)/config
+TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
DVIS = sed.dvi
PDFS = sed.pdf
PSS = sed.ps
@@ -73,76 +91,309 @@ HTMLS = sed.html
TEXINFOS = sed.texi
TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
-AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
DVIPS = dvips
-am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" \
- "$(DESTDIR)$(pkgdocdir)"
-man1dir = $(mandir)/man1
-NROFF = nroff
-MANS = $(dist_man_MANS)
+am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-pkgdocDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dist_noinst_DATA) $(pkgdoc_DATA)
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(dist_man_MANS)
+DATA = $(dist_noinst_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
+ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BUILD_HTML_FALSE = @BUILD_HTML_FALSE@
-BUILD_HTML_TRUE = @BUILD_HTML_TRUE@
-BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
-CATOBJEXT = @CATOBJEXT@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
-GENCAT = @GENCAT@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WRITE = @GNULIB_WRITE@
+GREP = @GREP@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRNDUP = @HAVE_STRNDUP@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
HAVE__BOOL = @HAVE__BOOL@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
+LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
+LIB_ACL = @LIB_ACL@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
-MAKEINFO_HTML_FALSE = @MAKEINFO_HTML_FALSE@
-MAKEINFO_HTML_TRUE = @MAKEINFO_HTML_TRUE@
-MKINSTALLDIRS = @MKINSTALLDIRS@
+MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -152,25 +403,92 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
SED_FEATURE_VERSION = @SED_FEATURE_VERSION@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
STRIP = @STRIP@
-TEST_REGEX_FALSE = @TEST_REGEX_FALSE@
-TEST_REGEX_TRUE = @TEST_REGEX_TRUE@
-TEXI2HTML = @TEXI2HTML@
-TEXI2HTML_HTML_FALSE = @TEXI2HTML_HTML_FALSE@
-TEXI2HTML_HTML_TRUE = @TEXI2HTML_HTML_TRUE@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+SYS_STAT_H = @SYS_STAT_H@
+SYS_TIME_H = @SYS_TIME_H@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+USE_ACL = @USE_ACL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+VOID_UNSETENV = @VOID_UNSETENV@
+WCHAR_H = @WCHAR_H@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XFAIL_TESTS = @XFAIL_TESTS@
XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -182,42 +500,52 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
info_TEXINFOS = sed.texi
sed_TEXINFOS = config.texi version.texi
dist_man_MANS = sed.1
-dist_noinst_DATA = sed.x sed-in.texi
+dist_noinst_DATA = sed.x sed-in.texi s-texi
dist_noinst_SCRIPTS = groupify.sed
-CLEANFILES = sed.html
-TEXI2DVI = $(top_srcdir)/config/texi2dvi --expand
-HELP2MAN = $(top_srcdir)/config/help2man
+TEXI2DVI = $(top_srcdir)/build-aux/texi2dvi --expand
+HELP2MAN = $(top_srcdir)/build-aux/help2man
SED = $(top_builddir)/sed/sed
-
-# This rule is used if --enable-html is passed
-@BUILD_HTML_TRUE@docdir = $(datadir)/doc
-@BUILD_HTML_TRUE@pkgdocdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
-@BUILD_HTML_TRUE@pkgdoc_DATA = sed.html
+AM_MAKEINFOHTMLFLAGS = --no-split
all: all-am
.SUFFIXES:
@@ -256,9 +584,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
restore=: && backupdir="$(am__leading_dot)am$$$$" && \
am__cwd=`pwd` && cd $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
- done; \
+ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+ done; \
+ else :; fi && \
cd "$$am__cwd"; \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
-o $@ $<; \
@@ -298,11 +628,11 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(srcdir)/sed.info: sed.texi $(srcdir)/version.texi $(sed_TEXINFOS)
sed.dvi: sed.texi $(srcdir)/version.texi $(sed_TEXINFOS)
sed.pdf: sed.texi $(srcdir)/version.texi $(sed_TEXINFOS)
-@MAKEINFO_HTML_FALSE@@TEXI2HTML_HTML_FALSE@sed.html: sed.texi $(srcdir)/version.texi $(sed_TEXINFOS)
+sed.html: sed.texi $(srcdir)/version.texi $(sed_TEXINFOS)
$(srcdir)/version.texi: $(srcdir)/stamp-vti
$(srcdir)/stamp-vti: sed.texi $(top_srcdir)/configure
@(dir=.; test -f ./sed.texi || dir=$(srcdir); \
- set `$(SHELL) $(top_srcdir)/config/mdate-sh $$dir/sed.texi`; \
+ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/sed.texi`; \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
@@ -319,11 +649,29 @@ mostlyclean-vti:
maintainer-clean-vti:
-rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
.dvi.ps:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) -o $@ $<
+uninstall-dvi-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(DVIS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
+ rm -f "$(DESTDIR)$(dvidir)/$$f"; \
+ done
+
+uninstall-html-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(HTMLS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
+ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
+ done
+
uninstall-info-am:
@$(PRE_UNINSTALL)
- @if (install-info --version && \
+ @if test -d '$(DESTDIR)$(infodir)' && \
+ (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
@@ -337,12 +685,28 @@ uninstall-info-am:
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
- (if cd "$(DESTDIR)$(infodir)"; then \
+ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
else :; fi); \
done
+uninstall-pdf-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(PDFS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
+ done
+
+uninstall-ps-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(PSS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(psdir)/$$f"; \
+ done
+
dist-info: $(INFO_DEPS)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
@@ -351,10 +715,13 @@ dist-info: $(INFO_DEPS)
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
- for file in $$d/$$base*; do \
- relfile=`expr "$$file" : "$$d/\(.*\)"`; \
- test -f $(distdir)/$$relfile || \
- cp -p $$file $(distdir)/$$relfile; \
+ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
+ if test -f $$file; then \
+ relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+ test -f $(distdir)/$$relfile || \
+ cp -p $$file $(distdir)/$$relfile; \
+ else :; fi; \
done; \
done
@@ -371,7 +738,7 @@ maintainer-clean-aminfo:
done
install-man1: $(man1_MANS) $(man_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
for i in $$l2; do \
@@ -414,23 +781,6 @@ uninstall-man1:
echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
done
-install-pkgdocDATA: $(pkgdoc_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(pkgdocdir)" || $(mkdir_p) "$(DESTDIR)$(pkgdocdir)"
- @list='$(pkgdoc_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(pkgdocDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdocdir)/$$f'"; \
- $(pkgdocDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdocdir)/$$f"; \
- done
-
-uninstall-pkgdocDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(pkgdoc_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(pkgdocdir)/$$f'"; \
- rm -f "$(DESTDIR)$(pkgdocdir)/$$f"; \
- done
tags: TAGS
TAGS:
@@ -439,22 +789,21 @@ CTAGS:
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -472,8 +821,8 @@ check-am: all-am
check: check-am
all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(MANS) $(DATA)
installdirs:
- for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(pkgdocdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -492,7 +841,6 @@ install-strip:
mostlyclean-generic:
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -512,7 +860,7 @@ dvi: dvi-am
dvi-am: $(DVIS)
-@BUILD_HTML_FALSE@html: html-am
+html: html-am
html-am: $(HTMLS)
@@ -520,15 +868,44 @@ info: info-am
info-am: $(INFO_DEPS)
-install-data-am: install-info-am install-man install-pkgdocDATA
+install-data-am: install-info-am install-man
+
+install-dvi: install-dvi-am
+install-dvi-am: $(DVIS)
+ @$(NORMAL_INSTALL)
+ test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
+ @list='$(DVIS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(dvidir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(dvidir)/$$f"; \
+ done
install-exec-am:
+install-html: install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
+ else \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(htmldir)/$$f"; \
+ fi; \
+ done
install-info: install-info-am
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
- test -z "$(infodir)" || $(mkdir_p) "$(DESTDIR)$(infodir)"
+ test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for file in $$list; do \
@@ -558,6 +935,28 @@ install-info-am: $(INFO_DEPS)
else : ; fi
install-man: install-man1
+install-pdf: install-pdf-am
+
+install-pdf-am: $(PDFS)
+ @$(NORMAL_INSTALL)
+ test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
+ @list='$(PDFS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(pdfdir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(pdfdir)/$$f"; \
+ done
+install-ps: install-ps-am
+
+install-ps-am: $(PSS)
+ @$(NORMAL_INSTALL)
+ test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
+ @list='$(PSS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(psdir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(psdir)/$$f"; \
+ done
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -577,56 +976,50 @@ ps: ps-am
ps-am: $(PSS)
-uninstall-am: uninstall-info-am uninstall-man uninstall-pkgdocDATA
+uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
+ uninstall-man uninstall-pdf-am uninstall-ps-am
uninstall-man: uninstall-man1
+.MAKE: install-am install-strip
+
.PHONY: all all-am check check-am clean clean-generic dist-hook \
dist-info distclean distclean-generic distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-man1 install-pkgdocDATA \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-aminfo \
- maintainer-clean-generic maintainer-clean-vti mostlyclean \
- mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \
- pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
- uninstall-man uninstall-man1 uninstall-pkgdocDATA
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-man1 install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-aminfo maintainer-clean-generic \
+ maintainer-clean-vti mostlyclean mostlyclean-aminfo \
+ mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am \
+ uninstall uninstall-am uninstall-dvi-am uninstall-html-am \
+ uninstall-info-am uninstall-man uninstall-man1 \
+ uninstall-pdf-am uninstall-ps-am
# To produce better quality output, in the example sed
# scripts we group comments with lines following them;
# since mantaining the "@group...@end group" manually
# is a burden, we do this automatically
-$(srcdir)/sed.texi: sed-in.texi $(srcdir)/groupify.sed
+$(srcdir)/sed.texi: $(srcdir)/s-texi
+$(srcdir)/s-texi: sed-in.texi $(srcdir)/groupify.sed
sed -nf $(srcdir)/groupify.sed \
- < $(srcdir)/sed-in.texi > $(srcdir)/sed.texi
+ < $(srcdir)/sed-in.texi > $(srcdir)/sed-tmp.texi
+ if cmp $(srcdir)/sed.texi $(srcdir)/sed-tmp.texi; then \
+ rm -f $(srcdir)/sed-tmp.texi; \
+ else \
+ mv -f $(srcdir)/sed-tmp.texi $(srcdir)/sed.texi; \
+ fi
+ echo stamp > $(srcdir)/s-texi
sed.1: $(top_srcdir)/sed/sed.c $(top_srcdir)/configure.ac $(srcdir)/sed.x
$(HELP2MAN) --name "stream editor for filtering and transforming text" \
- -p sed --include $(srcdir)/sed.x $(SED) > $(srcdir)/sed.1
+ -p sed --include $(srcdir)/sed.x -o $(srcdir)/sed.1 $(SED)
dist-hook:
touch $(distdir)/sed.1
-
-@BUILD_HTML_TRUE@all: html
-
-@BUILD_HTML_TRUE@html: sed.html
-
-@BUILD_HTML_TRUE@.PHONY: html
-
-# Having a dependancy on sed.info automatically makes
-# sed.html dependant on sed.texi and all the included
-# sources
-@MAKEINFO_HTML_TRUE@sed.html: sed.texi sed.info
-@MAKEINFO_HTML_TRUE@ builddir=`pwd` && cd $(srcdir) && \
-@MAKEINFO_HTML_TRUE@ $(MAKEINFO) --html --no-split -o $$builddir/sed.html sed.texi
-
-# These rules are used together with TEXI2HTML
-@TEXI2HTML_HTML_TRUE@sed.html: sed.texi sed.info
-@TEXI2HTML_HTML_TRUE@ cp $(srcdir)/*.texi . && \
-@TEXI2HTML_HTML_TRUE@ $(TEXI2HTML) sed.texi && \
-@TEXI2HTML_HTML_TRUE@ rm *.texi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/doc/s-texi b/doc/s-texi
new file mode 100644
index 0000000..859afb1
--- /dev/null
+++ b/doc/s-texi
@@ -0,0 +1 @@
+stamp
diff --git a/doc/sed-in.texi b/doc/sed-in.texi
index 3becf31..c8bb21d 100644
--- a/doc/sed-in.texi
+++ b/doc/sed-in.texi
@@ -210,11 +210,28 @@ then exit.
@opindex --silent
@cindex Disabling autoprint, from command line
By default, @command{sed} prints out the pattern space
-at the end of each cycle through the script.
+at the end of each cycle through the script (@pxref{Execution Cycle, ,
+How @code{sed} works}).
These options disable this automatic printing,
and @command{sed} only produces output when explicitly told to
via the @code{p} command.
+@item -e @var{script}
+@itemx --expression=@var{script}
+@opindex -e
+@opindex --expression
+@cindex Script, from command line
+Add the commands in @var{script} to the set of commands to be
+run while processing the input.
+
+@item -f @var{script-file}
+@itemx --file=@var{script-file}
+@opindex -f
+@opindex --file
+@cindex Script, from a file
+Add the commands contained in the file @var{script-file}
+to the set of commands to be run while processing the input.
+
@item -i[@var{SUFFIX}]
@itemx --in-place[=@var{SUFFIX}]
@opindex -i
@@ -238,7 +255,7 @@ renamed to the output file's original name. The extension,
if supplied, is used to modify the name of the old file
before renaming the temporary file, thereby making a backup
copy@footnote{Note that @value{SSED} creates the backup
- file whether or not any output is actually changed.}).
+file whether or not any output is actually changed.}).
@cindex In-place editing, Perl-style backup file names
This rule is followed: if the extension doesn't contain a @code{*},
@@ -277,6 +294,29 @@ standard. If you want to disable only the latter kind of
extension, you can set the @code{POSIXLY_CORRECT} variable
to a non-empty value.
+@item -b
+@itemx --binary
+@opindex -b
+@opindex --binary
+This option is available on every platform, but is only effective where the
+operating system makes a distinction between text files and binary files.
+When such a distinction is made---as is the case for MS-DOS, Windows,
+Cygwin---text files are composed of lines separated by a carriage return
+@emph{and} a line feed character, and @command{sed} does not see the
+ending CR. When this option is specified, @command{sed} will open
+input files in binary mode, thus not requesting this special processing
+and considering lines to end at a line feed.
+
+@item --follow-symlinks
+@opindex --follow-symlinks
+This option is available only on platforms that support
+symbolic links and has an effect only if option @option{-i}
+is specified. In this case, if the file that is specified
+on the command line is a symbolic link, @command{sed} will
+follow the link and edit the ultimate destination of the
+link. The default behavior is to break the symbolic link,
+so that the link destination will not be modified.
+
@item -r
@itemx --regexp-extended
@opindex -r
@@ -326,22 +366,6 @@ Buffer both input and output as minimally as practical.
the likes of @samp{tail -f}, and you wish to see the transformed
output as soon as possible.)
-@item -e @var{script}
-@itemx --expression=@var{script}
-@opindex -e
-@opindex --expression
-@cindex Script, from command line
-Add the commands in @var{script} to the set of commands to be
-run while processing the input.
-
-@item -f @var{script-file}
-@itemx --file=@var{script-file}
-@opindex -f
-@opindex --file
-@cindex Script, from a file
-Add the commands contained in the file @var{script-file}
-to the set of commands to be run while processing the input.
-
@end table
If no @option{-e}, @option{-f}, @option{--expression}, or @option{--file}
@@ -410,11 +434,11 @@ executed.
When the end of the script is reached, unless the @option{-n} option
is in use, the contents of pattern space are printed out to the output
stream, adding back the trailing newline if it was removed.@footnote{Actually,
- if @command{sed} prints a line without the terminating newline, it will
- nevertheless print the missing newline as soon as more text is sent to
- the same output stream, which gives the ``least expected surprise''
- even though it does not make commands like @samp{sed -n p} exactly
- identical to @command{cat}.} Then the next cycle starts for the next
+if @command{sed} prints a line without the terminating newline, it will
+nevertheless print the missing newline as soon as more text is sent to
+the same output stream, which gives the ``least expected surprise''
+even though it does not make commands like @samp{sed -n p} exactly
+identical to @command{cat}.} Then the next cycle starts for the next
input line.
Unless special commands (like @samp{D}) are used, the pattern space is
@@ -621,7 +645,7 @@ themselves in a pattern, and match the corresponding characters
in the subject. As a trivial example, the pattern
@example
- The quick brown fox
+The quick brown fox
@end example
@noindent
@@ -692,21 +716,26 @@ Use back references (see below).
Matches any character, including newline.
@item ^
-Matches the null string at beginning of line, i.e. what
-appears after the circumflex must appear at the
-beginning of line. @code{^#include} will match only
-lines where @samp{#include} is the first thing on line---if
-there are spaces before, for example, the match fails.
-@code{^} acts as a special character only at the beginning
-of the regular expression or subexpression (that is,
-after @code{\(} or @code{\|}). Portable scripts should avoid
-@code{^} at the beginning of a subexpression, though, as
-@acronym{POSIX} allows implementations that treat @code{^} as
-an ordinary character in that context.
-
+Matches the null string at beginning of the pattern space, i.e. what
+appears after the circumflex must appear at the beginning of the
+pattern space.
+
+In most scripts, pattern space is initialized to the content of each
+line (@pxref{Execution Cycle, , How @code{sed} works}). So, it is a
+useful simplification to think of @code{^#include} as matching only
+lines where @samp{#include} is the first thing on line---if there are
+spaces before, for example, the match fails. This simplification is
+valid as long as the original content of pattern space is not modified,
+for example with an @code{s} command.
+
+@code{^} acts as a special character only at the beginning of the
+regular expression or subexpression (that is, after @code{\(} or
+@code{\|}). Portable scripts should avoid @code{^} at the beginning of
+a subexpression, though, as @acronym{POSIX} allows implementations that
+treat @code{^} as an ordinary character in that context.
@item $
-It is the same as @code{^}, but refers to end of line.
+It is the same as @code{^}, but refers to end of pattern space.
@code{$} also acts as a special character only at the end
of the regular expression or subexpression (that is, before @code{\)}
or @code{\|}), and its use at the end of a subexpression is not
@@ -1407,9 +1436,9 @@ wastes time by reading the whole file without any visible effect:
@example
:eat
-$d @i{Quit silently on the last line}
-N @i{Read another line, silently}
-g @i{Overwrite pattern space each time to save memory}
+$d @i{@r{Quit silently on the last line}}
+N @i{@r{Read another line, silently}}
+g @i{@r{Overwrite pattern space each time to save memory}}
b eat
@end example
@@ -1460,6 +1489,18 @@ This command enables all @value{SSEDEXT} even if
Write to the given filename the portion of the pattern space up to
the first newline. Everything said under the @code{w} command about
file handling holds here too.
+
+@item z
+@findex z (Zap) command
+@cindex @value{SSEDEXT}, emptying pattern space
+@cindex Emptying pattern space
+This command empties the content of pattern space. It is
+usually the same as @samp{s/.*//}, but is more efficient
+and works in the presence of invalid multibyte sequences
+in the input stream. @sc{posix} mandates that such sequences
+are @emph{not} matched by @samp{.}, so that there is no portable
+way to clear @command{sed}'s buffers in the middle of the
+script in most multibyte locales (including UTF-8 locales).
@end table
@node Escapes
@@ -1707,7 +1748,7 @@ transform it to be shell commands, then just feed them to shell.
Don't worry, even worse hacks are done when using @command{sed}; I have
seen a script converting the output of @command{date} into a @command{bc}
program!
-
+
The main body of this is the @command{sed} script, which remaps the name
from lower to upper (or vice-versa) and even checks out
if the remapped name is the same as the original name.
@@ -1729,7 +1770,7 @@ variables and proper quoting.
help()
@{
- cat << eof
+ cat << eof
Usage: $0 [-n] [-r] [-h] files...
-n do nothing, only see what would be done
@@ -1773,7 +1814,7 @@ case `basename $0` in
*upper*) TO=$UPPER; FROM=$LOWER ;;
*) FROM=$UPPER; TO=$LOWER ;;
esac
-
+
eval $finder | sed -n '
# remove all trailing slashes
@@ -2562,10 +2603,9 @@ In addition to several books that have been written about @command{sed}
(either specifically or as chapters in books which discuss
shell programming), one can find out more about @command{sed}
(including suggestions of a few books) from the FAQ
-for the @code{sed-users} mailing list, available from any of:
+for the @code{sed-users} mailing list, available from:
@display
- @uref{http://www.student.northpark.edu/pemente/sed/sedfaq.html}
- @uref{http://sed.sf.net/grabbag/tutorials/sedfaq.html}
+@uref{http://sed.sourceforge.net/sedfaq.html}
@end display
Also of interest are
@@ -2589,7 +2629,7 @@ of your report if at all possible.
Please do not send a bug report like this:
@example
-@i{while building frobme-1.3.4}
+@i{@i{@r{while building frobme-1.3.4}}}
$ configure
@error{} sed: file sedscr line 1: Unknown option to 's'
@end example
@@ -2638,7 +2678,7 @@ instead of just
@example
/foo/@{ N;N;N;N;N;N;N;N;N; @}
@end example
-
+
@cindex @code{POSIXLY_CORRECT} behavior, @code{N} command
In any case, the simplest workaround is to use @code{$d;N} in
scripts that rely on the traditional behavior, or to set
@@ -2706,10 +2746,14 @@ to the original name: if you rename or delete files, you're actually
modifying the contents of the directory, so the operation depends on
the permissions of the directory, not of the file. For this same
reason, @command{sed} does not let you use @option{-i} on a writeable file
-in a read-only directory (but unbelievably nobody reports that as a
-bug@dots{}).
+in a read-only directory, and will break hard or symbolic links when
+@option{-i} is used on such a file.
@item @code{0a} does not work (gives an error)
+@cindex @code{0} address
+@cindex @acronym{GNU} extensions, @code{0} address
+@cindex Non-bugs, @code{0} address
+
There is no line 0. 0 is a special address that is only used to treat
addresses like @code{0,/@var{RE}/} as active when the script starts: if
you write @code{1,/abc/d} and the first line includes the word @samp{abc},
@@ -2720,11 +2764,12 @@ is obtained with @code{0,/abc/d}.
@ifclear PERL
@item @code{[a-z]} is case insensitive
+@cindex Non-bugs, localization-related
+
You are encountering problems with locales. POSIX mandates that @code{[a-z]}
uses the current locale's collation order -- in C parlance, that means using
@code{strcoll(3)} instead of @code{strcmp(3)}. Some locales have a
-case-insensitive collation order, others don't: one of those that have
-problems is Estonian.
+case-insensitive collation order, others don't.
Another problem is that @code{[a-z]} tries to use collation symbols.
This only happens if you are on the @acronym{GNU} system, using
@@ -2737,6 +2782,22 @@ locales, or @samp{ij} in Dutch locales.
To work around these problems, which may cause bugs in shell scripts, set
the @env{LC_COLLATE} and @env{LC_CTYPE} environment variables to @samp{C}.
+
+@item @code{s/.*//} does not clear pattern space
+@cindex Non-bugs, localization-related
+@cindex @value{SSEDEXT}, emptying pattern space
+@cindex Emptying pattern space
+
+This happens if your input stream includes invalid multibyte
+sequences. @sc{posix} mandates that such sequences
+are @emph{not} matched by @samp{.}, so that @samp{s/.*//} will not clear
+pattern space as you would expect. In fact, there is no way to clear
+sed's buffers in the middle of the script in most multibyte locales
+(including UTF-8 locales). For this reason, @value{SSED} provides a `z'
+command (for `zap') as an extension.
+
+To work around these problems, which may cause bugs in shell scripts, set
+the @env{LC_COLLATE} and @env{LC_CTYPE} environment variables to @samp{C}.
@end ifclear
@end table
@@ -2898,24 +2959,25 @@ least significant 8 bits of the value. Any subsequent digits
stand for themselves. For example:
@example
- \040 @i{is another way of writing a space}
- \40 @i{is the same, provided there are fewer than 40}
- @i{previous capturing subpatterns}
- \7 @i{is always a back reference}
- \011 @i{is always a tab}
- \11 @i{might be a back reference, or another way of}
- @i{writing a tab}
- \0113 @i{is a tab followed by the character @samp{3}}
- \113 @i{is the character with octal code 113 (since there}
- @i{can be no more than 99 back references)}
- \377 @i{is a byte consisting entirely of 1 bits (@sc{ascii} 255)}
- \81 @i{is either a back reference, or a binary zero}
- @i{followed by the two characters @samp{81}}
+\040 @i{@r{is another way of writing a space}}
+\40 @i{@r{is the same, provided there are fewer than 40}}
+ @i{@r{previous capturing subpatterns}}
+\7 @i{@r{is always a back reference}}
+\011 @i{@r{is always a tab}}
+\11 @i{@r{might be a back reference, or another way of writing a tab}}
+\0113 @i{@r{is a tab followed by the character @samp{3}}}
+\113 @i{@r{is the character with octal code 113 (since there}}
+ @i{@r{can be no more than 99 back references)}}
+\377 @i{@r{is a byte consisting entirely of 1 bits (@sc{ascii} 255)}}
+\81 @i{@r{is either a back reference, or a binary zero}}
+ @i{@r{followed by the two characters @samp{81}}}
@end example
Note that octal values of 100 or greater must not be introduced
-duced by a leading zero, because no more than three octal
-digits are ever read.
+by a leading zero, because no more than three octal
+digits are ever read. Note that this applies only to the LHS
+pattern; it is not possible yet to specify more than 9 backreferences
+on the RHS of the `s' command.
All the sequences that define a single byte value can be
used both inside and outside character classes. In addition,
@@ -3134,7 +3196,7 @@ square brackets, and @value{SSED} supports this notation as well.
For example,
@example
- [01[:alpha:]%]
+[01[:alpha:]%]
@end example
@noindent
@@ -3187,7 +3249,7 @@ Perl mode. Another Perl extension is negation, which is
indicated by a circumflex character after the colon. For example,
@example
- [12[:^digit:]]
+[12[:^digit:]]
@end example
@noindent
@@ -3221,10 +3283,10 @@ the options were set or unset at the start of matching. The
following patterns all behave in exactly the same way:
@example
- (?i)abc
- a(?i)bc
- ab(?i)c
- abc(?i)
+(?i)abc
+a(?i)bc
+ab(?i)c
+abc(?i)
@end example
which in turn is the same as specifying the pattern abc with
@@ -3240,7 +3302,7 @@ An option change inside a subpattern affects only that part
of the subpattern @emph{that follows} it, so
@example
- (a(?i)b)c
+(a(?i)b)c
@end example
@noindent
@@ -3252,7 +3314,7 @@ into subsequent branches within the same subpattern. For
example,
@example
- (a(?i)b|c)
+(a(?i)b|c)
@end example
@noindent
@@ -3286,7 +3348,7 @@ For example, if the string @samp{the red king} is matched against
the pattern
@example
- the ((red|white) (king|queen))
+the ((red|white) (king|queen))
@end example
@noindent
@@ -3302,7 +3364,7 @@ number of any subsequent capturing subpatterns. For example,
if the string @samp{the white queen} is matched against the pattern
@example
- the ((?:red|white) (king|queen))
+the ((?:red|white) (king|queen))
@end example
@noindent
@@ -3317,8 +3379,8 @@ option letters may appear between the @code{?} and the
@code{:}. Thus the two patterns
@example
- (?i:saturday|sunday)
- (?:(?i)saturday|sunday)
+(?i:saturday|sunday)
+(?:(?i)saturday|sunday)
@end example
@noindent
@@ -3360,7 +3422,7 @@ The numbers must be less than 65536, and the first must be
less than or equal to the second. For example:
@example
- z@{2,4@}
+z@{2,4@}
@end example
@noindent
@@ -3371,7 +3433,7 @@ second number and the comma are both omitted, the quantifier
specifies an exact number of required matches. Thus
@example
- [aeiou]@{3,@}
+[aeiou]@{3,@}
@end example
@noindent
@@ -3379,7 +3441,7 @@ matches at least 3 successive vowels, but may match many
more, while
@example
- \d@{8@}
+\d@{8@}
@end example
@noindent
@@ -3413,7 +3475,7 @@ subpattern that can match no characters with a quantifier
that has no upper limit, for example:
@example
- (a?)*
+(a?)*
@end example
Earlier versions of Perl used to give an error at
@@ -3434,14 +3496,14 @@ the sequences @code{/*} and @code{*/} and within the sequence, individual
comments by applying the pattern
@example
- /\*.*\*/
+/\*.*\*/
@end example
@noindent
to the string
@example
- /* first command */ not comment /* second comment */
+/* first command */ not comment /* second comment */
@end example
@noindent
@@ -3459,7 +3521,7 @@ mark with its use as a quantifier in its own right.
Because it has two uses, it can sometimes appear doubled, as in
@example
- \d??\d
+\d??\d
@end example
which matches one digit by preference, but can match two if
@@ -3469,11 +3531,11 @@ Note that greediness does not matter when specifying addresses,
but can be nevertheless used to improve performance.
@ignore
- If the PCRE_UNGREEDY option is set (an option which is not
- available in Perl), the quantifiers are not greedy by
- default, but individual ones can be made greedy by following
- them with a question mark. In other words, it inverts the
- default behaviour.
+If the PCRE_UNGREEDY option is set (an option which is not
+available in Perl), the quantifiers are not greedy by
+default, but individual ones can be made greedy by following
+them with a question mark. In other words, it inverts the
+default behaviour.
@end ignore
When a parenthesized subpattern is quantified with a minimum
@@ -3494,7 +3556,7 @@ is the substring that matched the final iteration. For example,
after
@example
- (tweedle[dume]@{3@}\s*)+
+(tweedle[dume]@{3@}\s*)+
@end example
@noindent
@@ -3505,7 +3567,7 @@ values may have been set in previous iterations. For example,
after
@example
- /(a|(b))+/
+/(a|(b))+/
@end example
matches @samp{aba}, the value of the second captured substring is
@@ -3534,7 +3596,7 @@ subpattern in the current subject string, rather than
anything matching the subpattern itself. So the pattern
@example
- (sens|respons)e and \1ibility
+(sens|respons)e and \1ibility
@end example
@noindent
@@ -3544,7 +3606,7 @@ matching is in force at the time of the back reference, the
case of letters is relevant. For example,
@example
- ((?i)blah)\s+\1
+((?i)blah)\s+\1
@end example
@noindent
@@ -3558,7 +3620,7 @@ particular match, any back references to it always fail. For
example, the pattern
@example
- (a|(bc))\2
+(a|(bc))\2
@end example
@noindent
@@ -3571,6 +3633,9 @@ character, some delimiter must be used to terminate the back
reference. If the @code{X} modifier option is set, this can be
whitespace. Otherwise an empty comment can be used, or the
following character can be expressed in hexadecimal or octal.
+Note that this applies only to the LHS pattern; it is
+not possible yet to specify more than 9 backreferences on the
+RHS of the `s' command.
A back reference that occurs inside the parentheses to which
it refers fails when the subpattern is first used, so, for
@@ -3579,7 +3644,7 @@ can be useful inside repeated subpatterns. For example, the
pattern
@example
- (a|b\1)+
+(a|b\1)+
@end example
@noindent
@@ -3611,7 +3676,7 @@ changed. Lookahead assertions start with @code{(?=} for positive
assertions and @code{(?!} for negative assertions. For example,
@example
- \w+(?=;)
+\w+(?=;)
@end example
@noindent
@@ -3619,7 +3684,7 @@ matches a word followed by a semicolon, but does not include
the semicolon in the match, and
@example
- foo(?!bar)
+foo(?!bar)
@end example
@noindent
@@ -3629,7 +3694,7 @@ matches any occurrence of @samp{foo} that is not followed by
Note that the apparently similar pattern
@example
- (?!foo)bar
+(?!foo)bar
@end example
@noindent
@@ -3642,7 +3707,7 @@ Lookbehind assertions start with @code{(?<=} for positive
assertions and @code{(?<!} for negative assertions. So,
@example
- (?<!foo)bar
+(?<!foo)bar
@end example
achieves the required effect of finding an occurrence of
@@ -3655,14 +3720,14 @@ compared with Perl 5.005, which requires all branches to match
the same length of string. Thus
@example
- (?<=dogs|cats|)
+(?<=dogs|cats|)
@end example
@noindent
is permitted, but the apparently equivalent regular expression
@example
- (?<!dogs?|cats?)
+(?<!dogs?|cats?)
@end example
@noindent
@@ -3671,7 +3736,7 @@ length strings are permitted only at the top level of
a lookbehind assertion: an assertion such as
@example
- (?<=ab(c|de))
+(?<=ab(c|de))
@end example
@noindent
@@ -3680,7 +3745,7 @@ match two different lengths, but it is acceptable if rewritten
to use two top-level branches:
@example
- (?<=abc|abde)
+(?<=abc|abde)
@end example
All this is required because lookbehind assertions simply
@@ -3696,7 +3761,7 @@ Several assertions (of any sort) may occur in succession.
For example,
@example
- (?<=\d@{3@})(?<!999)foo
+(?<=\d@{3@})(?<!999)foo
@end example
@noindent
@@ -3711,7 +3776,7 @@ of which are not @samp{999}. For example, it doesn't match
@samp{123abcfoo}. A pattern to do that is
@example
- (?<=\d@{3@}...)(?<!999)foo
+(?<=\d@{3@}...)(?<!999)foo
@end example
@noindent
@@ -3722,13 +3787,13 @@ characters are not @samp{999}. Actually, assertions can be
nested in any combination, so one can write this as
@example
- (?<=\d@{3@}(?!999)...)foo
+(?<=\d@{3@}(?!999)...)foo
@end example
or
@example
- (?<=\d@{3@}...(?<!999))foo
+(?<=\d@{3@}...(?<!999))foo
@end example
@noindent
@@ -3763,7 +3828,7 @@ Consider, for example, the pattern @code{\d+foo} when applied to
the subject line
@example
- 123456bar
+123456bar
@end example
After matching all 6 digits and then failing to match @samp{foo},
@@ -3777,7 +3842,7 @@ so the matcher would give up immediately on failing to match
parenthesis, starting with @code{(?>} as in this example:
@example
- (?>\d+)bar
+(?>\d+)bar
@end example
This kind of parenthesis ``locks up'' the part of the pattern
@@ -3802,7 +3867,7 @@ assertions to specify efficient matching at the end
of the subject string. Consider a simple pattern such as
@example
- abcd$
+abcd$
@end example
@noindent
@@ -3812,7 +3877,7 @@ each @samp{a} in the subject and then see if what follows matches
the rest of the pattern. If the pattern is specified as
@example
- ^.*abcd$
+^.*abcd$
@end example
@noindent
@@ -3824,7 +3889,7 @@ last two characters, and so on. Once again the search for
no better off. However, if the pattern is written as
@example
- ^(?>.*)(?<=abcd)
+^(?>.*)(?<=abcd)
@end example
there can be no backtracking for the .* item; it can match
@@ -3838,15 +3903,15 @@ that can itself be repeated an unlimited number of
times, the use of a once-only subpattern is the only way to
avoid some failing matches taking a very long time
indeed.@footnote{Actually, the matcher embedded in @value{SSED}
- tries to do something for this in the simplest cases,
- like @code{([^b]*b)*}. These cases are actually quite
- common: they happen for example in a regular expression
- like @code{\/\*([^*]*\*)*\/} which matches C comments.}
+tries to do something for this in the simplest cases,
+like @code{([^b]*b)*}. These cases are actually quite
+common: they happen for example in a regular expression
+like @code{\/\*([^*]*\*)*\/} which matches C comments.}
The pattern
@example
- (\D+|<\d+>)*[!?]
+(\D+|<\d+>)*[!?]
@end example
([^0-9<]+<(\d+>)?)*[!?]
@@ -3858,7 +3923,7 @@ an exclamation or question mark. When it matches, it runs quickly.
However, if it is applied to
@example
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
@end example
@noindent
@@ -3874,7 +3939,7 @@ match, and fail early if it is not present in the string.}
If the pattern is changed to
@example
- ((?>\D+)|<\d+>)*[!?]
+((?>\D+)|<\d+>)*[!?]
@end example
sequences of non-digits cannot be broken, and failure happens
@@ -3891,8 +3956,8 @@ whether a previous capturing subpattern matched or not. The
two possible forms of conditional subpattern are
@example
- (?(@var{condition})@var{yes-pattern})
- (?(@var{condition})@var{yes-pattern}|@var{no-pattern})
+(?(@var{condition})@var{yes-pattern})
+(?(@var{condition})@var{yes-pattern}|@var{no-pattern})
@end example
If the condition is satisfied, the yes-pattern is used; otherwise
@@ -3908,7 +3973,7 @@ white space to make it more readable (assume the @code{X} modifier)
and to divide it into three parts for ease of discussion:
@example
- ( \( )? [^()]+ (?(1) \) )
+( \( )? [^()]+ (?(1) \) )
@end example
The first part matches an optional opening parenthesis, and
@@ -3932,9 +3997,9 @@ non-significant white space, and with the two alternatives
on the second line:
@example
- (?(?=...[a-z])
- \d\d-[a-z]@{3@}-\d\d |
- \d\d-\d\d-\d\d )
+(?(?=...[a-z])
+ \d\d-[a-z]@{3@}-\d\d |
+ \d\d-\d\d-\d\d )
@end example
The condition is a positive lookahead assertion that matches
@@ -3963,7 +4028,7 @@ tern to solve the parentheses problem can be created like
this:
@example
- $re = qr@{\( (?: (?>[^()]+) | (?p@{$re@}) )* \)@}x;
+$re = qr@{\( (?: (?>[^()]+) | (?p@{$re@}) )* \)@}x;
@end example
The @code{(?p@{...@})} item interpolates Perl code at run time,
@@ -3975,7 +4040,7 @@ parentheses problem (assume the @code{X} modifier option is used
so that white space is ignored):
@example
- \( ( (?>[^()]+) | (?R) )* \)
+\( ( (?>[^()]+) | (?R) )* \)
@end example
First it matches an opening parenthesis. Then it matches any
@@ -3991,7 +4056,7 @@ the pattern to strings that do not match. For example, when
it is applied to
@example
- (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
+(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
@end example
it yields a ``no match'' response quickly. However, if a
@@ -4005,7 +4070,7 @@ the outermost level of the recursion at which the subpattern
value is set. If the pattern above is matched against
@example
- (ab(cd)ef)
+(ab(cd)ef)
@end example
@noindent
diff --git a/doc/sed.1 b/doc/sed.1
index b4e5077..3322d1d 100644
--- a/doc/sed.1
+++ b/doc/sed.1
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.28.
-.TH SED "1" "February 2006" "sed version 4.1.4" "User Commands"
+.TH SED "1" "April 2009" "sed version 4.2" "User Commands"
.SH NAME
sed \- stream editor for filtering and transforming text
.SH SYNOPSIS
@@ -32,6 +32,10 @@ add the script to the commands to be executed
.IP
add the contents of script-file to the commands to be executed
.HP
+\fB\-\-follow\-symlinks\fR
+.IP
+follow symlinks when processing in place
+.HP
\fB\-i[SUFFIX]\fR, \fB\-\-in\-place\fR[=\fISUFFIX\fR]
.IP
edit files in place (makes backup if extension supplied)
@@ -69,7 +73,9 @@ non-option argument is taken as the sed script to interpret. All
remaining arguments are names of input files; if no input files are
specified, then the standard input is read.
.PP
-E-mail bug reports to: bonzini@gnu.org .
+GNU sed home page: <http://www.gnu.org/software/sed/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>.
+E-mail bug reports to: <bug-gnu-utils@gnu.org>.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
.SH "COMMAND SYNOPSIS"
This is just a brief synopsis of \*(sd commands to serve as
@@ -113,15 +119,15 @@ Insert
.IR text ,
which has each embedded newline preceded by a backslash.
.TP
-q
+q [\fIexit-code\fR]
Immediately quit the \*(sd script without processing
-any more input,
-except that if auto-print is not disabled
-the current pattern space will be printed.
+any more input, except that if auto-print is not disabled
+the current pattern space will be printed. The exit code
+argument is a GNU extension.
.TP
-Q
+Q [\fIexit-code\fR]
Immediately quit the \*(sd script without processing
-any more input.
+any more input. This is a GNU extension.
.TP
.RI r\ filename
Append text read from
@@ -130,6 +136,8 @@ Append text read from
.RI R\ filename
Append a line read from
.IR filename .
+Each invocation of the command reads a line from the file.
+This is a GNU extension.
.SS
Commands which accept address ranges
.TP
@@ -159,7 +167,8 @@ command, then branch to
.IR label ;
if
.I label
-is omitted, branch to end of script.
+is omitted, branch to end of script. This is a GNU
+extension.
.TP
c \e
.TP
@@ -189,6 +198,12 @@ Exchange the contents of the hold and pattern spaces.
l
List out the current line in a ``visually unambiguous'' form.
.TP
+.RI l\ width
+List out the current line in a ``visually unambiguous'' form,
+breaking it at
+.I width
+characters. This is a GNU extension.
+.TP
n N
Read/append the next line of input into the pattern space.
.TP
@@ -221,6 +236,7 @@ Write the current pattern space to
.RI W\ filename
Write the first line of the current pattern space to
.IR filename .
+This is a GNU extension.
.TP
.RI y/ source / dest /
Transliterate the characters in the pattern space which appear in
@@ -277,7 +293,11 @@ line starting with line
.IR first .
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. (This is an extension.)
+starting with the second.
+.I first
+can be zero; in this case, \*(sd operates as if it were equal to
+.IR step .
+(This is an extension.)
.TP
$
Match the last line.
@@ -308,6 +328,9 @@ matches the very first line of input the
form will be at the end of its range, whereas the
.RI 1, addr2
form will still be at the beginning of its range.
+This works only when
+.I addr2
+is a regular expression.
.TP
.IR addr1 ,+ N
Will match
@@ -349,6 +372,11 @@ Copyright \(co 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
+.PP
+GNU sed home page: <http://www.gnu.org/software/sed/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>.
+E-mail bug reports to: <bug-gnu-utils@gnu.org>.
+Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.
.SH "SEE ALSO"
.BR awk (1),
.BR ed (1),
diff --git a/doc/sed.info b/doc/sed.info
index 2e0b20c..6eb30d6 100644
--- a/doc/sed.info
+++ b/doc/sed.info
@@ -1,4 +1,4 @@
-This is ../../doc/sed.info, produced by makeinfo version 4.5 from
+This is ../../doc/sed.info, produced by makeinfo version 4.8 from
../../doc/sed.texi.
INFO-DIR-SECTION Text creation and manipulation
@@ -7,7 +7,7 @@ START-INFO-DIR-ENTRY
END-INFO-DIR-ENTRY
-This file documents version 4.1.5 of GNU `sed', a stream editor.
+ This file documents version 4.2 of GNU `sed', a stream editor.
Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software
Foundation, Inc.
@@ -23,59 +23,2539 @@ Boston, MA 02110-1301, USA.
There are no Cover Texts and no Invariant Sections; this text, along
with its equivalent in the printed manual, constitutes the Title Page.
+
+
+File: sed.info, Node: Top, Next: Introduction, Up: (dir)
+
+sed, a stream editor
+********************
+
+This file documents version 4.2 of GNU `sed', a stream editor.
+
+ Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software
+Foundation, Inc.
+
+ This document is released under the terms of the GNU Free
+Documentation License as published by the Free Software Foundation;
+either version 1.1, or (at your option) any later version.
+
+ You should have received a copy of the GNU Free Documentation
+License along with GNU `sed'; see the file `COPYING.DOC'. If not,
+write to the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02110-1301, USA.
+
+ There are no Cover Texts and no Invariant Sections; this text, along
+with its equivalent in the printed manual, constitutes the Title Page.
+
+* Menu:
+
+* Introduction:: Introduction
+* Invoking sed:: Invocation
+* sed Programs:: `sed' programs
+* Examples:: Some sample scripts
+* Limitations:: Limitations and (non-)limitations of GNU `sed'
+* Other Resources:: Other resources for learning about `sed'
+* Reporting Bugs:: Reporting bugs
+
+* Extended regexps:: `egrep'-style regular expressions
+
+* Concept Index:: A menu with all the topics in this manual.
+* Command and Option Index:: A menu with all `sed' commands and
+ command-line options.
+
+--- The detailed node listing ---
+
+sed Programs:
+* Execution Cycle:: How `sed' works
+* Addresses:: Selecting lines with `sed'
+* Regular Expressions:: Overview of regular expression syntax
+* Common Commands:: Often used commands
+* The "s" Command:: `sed''s Swiss Army Knife
+* Other Commands:: Less frequently used commands
+* Programming Commands:: Commands for `sed' gurus
+* Extended Commands:: Commands specific of GNU `sed'
+* Escapes:: Specifying special characters
+
+Examples:
+* Centering lines::
+* Increment a number::
+* Rename files to lower case::
+* Print bash environment::
+* Reverse chars of lines::
+* tac:: Reverse lines of files
+* cat -n:: Numbering lines
+* cat -b:: Numbering non-blank lines
+* wc -c:: Counting chars
+* wc -w:: Counting words
+* wc -l:: Counting lines
+* head:: Printing the first lines
+* tail:: Printing the last lines
+* uniq:: Make duplicate lines unique
+* uniq -d:: Print duplicated lines of input
+* uniq -u:: Remove all duplicated lines
+* cat -s:: Squeezing blank lines
+
+
+File: sed.info, Node: Introduction, Next: Invoking sed, Prev: Top, Up: Top
+
+1 Introduction
+**************
+
+`sed' is a stream editor. A stream editor is used to perform basic text
+transformations on an input stream (a file or input from a pipeline).
+While in some ways similar to an editor which permits scripted edits
+(such as `ed'), `sed' works by making only one pass over the input(s),
+and is consequently more efficient. But it is `sed''s ability to
+filter text in a pipeline which particularly distinguishes it from
+other types of editors.
+
+
+File: sed.info, Node: Invoking sed, Next: sed Programs, Prev: Introduction, Up: Top
+
+2 Invocation
+************
+
+Normally `sed' is invoked like this:
+
+ sed SCRIPT INPUTFILE...
+
+ The full format for invoking `sed' is:
+
+ sed OPTIONS... [SCRIPT] [INPUTFILE...]
+
+ If you do not specify INPUTFILE, or if INPUTFILE is `-', `sed'
+filters the contents of the standard input. The SCRIPT is actually the
+first non-option parameter, which `sed' specially considers a script
+and not an input file if (and only if) none of the other OPTIONS
+specifies a script to be executed, that is if neither of the `-e' and
+`-f' options is specified.
+
+ `sed' may be invoked with the following command-line options:
+
+`--version'
+ Print out the version of `sed' that is being run and a copyright
+ notice, then exit.
+
+`--help'
+ Print a usage message briefly summarizing these command-line
+ options and the bug-reporting address, then exit.
+
+`-n'
+`--quiet'
+`--silent'
+ By default, `sed' prints out the pattern space at the end of each
+ cycle through the script (*note How `sed' works: Execution Cycle.).
+ These options disable this automatic printing, and `sed' only
+ produces output when explicitly told to via the `p' command.
+
+`-e SCRIPT'
+`--expression=SCRIPT'
+ Add the commands in SCRIPT to the set of commands to be run while
+ processing the input.
+
+`-f SCRIPT-FILE'
+`--file=SCRIPT-FILE'
+ Add the commands contained in the file SCRIPT-FILE to the set of
+ commands to be run while processing the input.
+
+`-i[SUFFIX]'
+`--in-place[=SUFFIX]'
+ This option specifies that files are to be edited in-place. GNU
+ `sed' does this by creating a temporary file and sending output to
+ this file rather than to the standard output.(1).
+
+ This option implies `-s'.
+
+ When the end of the file is reached, the temporary file is renamed
+ to the output file's original name. The extension, if supplied,
+ is used to modify the name of the old file before renaming the
+ temporary file, thereby making a backup copy(2)).
+
+ This rule is followed: if the extension doesn't contain a `*',
+ then it is appended to the end of the current filename as a
+ suffix; if the extension does contain one or more `*' characters,
+ then _each_ asterisk is replaced with the current filename. This
+ allows you to add a prefix to the backup file, instead of (or in
+ addition to) a suffix, or even to place backup copies of the
+ original files into another directory (provided the directory
+ already exists).
+
+ If no extension is supplied, the original file is overwritten
+ without making a backup.
+
+`-l N'
+`--line-length=N'
+ Specify the default line-wrap length for the `l' command. A
+ length of 0 (zero) means to never wrap long lines. If not
+ specified, it is taken to be 70.
+
+`--posix'
+ GNU `sed' includes several extensions to POSIX sed. In order to
+ simplify writing portable scripts, this option disables all the
+ extensions that this manual documents, including additional
+ commands. Most of the extensions accept `sed' programs that are
+ outside the syntax mandated by POSIX, but some of them (such as
+ the behavior of the `N' command described in *note Reporting
+ Bugs::) actually violate the standard. If you want to disable
+ only the latter kind of extension, you can set the
+ `POSIXLY_CORRECT' variable to a non-empty value.
+
+`-b'
+`--binary'
+ This option is available on every platform, but is only effective
+ where the operating system makes a distinction between text files
+ and binary files. When such a distinction is made--as is the case
+ for MS-DOS, Windows, Cygwin--text files are composed of lines
+ separated by a carriage return _and_ a line feed character, and
+ `sed' does not see the ending CR. When this option is specified,
+ `sed' will open input files in binary mode, thus not requesting
+ this special processing and considering lines to end at a line
+ feed.
+
+`--follow-symlinks'
+ This option is available only on platforms that support symbolic
+ links and has an effect only if option `-i' is specified. In this
+ case, if the file that is specified on the command line is a
+ symbolic link, `sed' will follow the link and edit the ultimate
+ destination of the link. The default behavior is to break the
+ symbolic link, so that the link destination will not be modified.
+
+`-r'
+`--regexp-extended'
+ Use extended regular expressions rather than basic regular
+ expressions. Extended regexps are those that `egrep' accepts;
+ they can be clearer because they usually have less backslashes,
+ but are a GNU extension and hence scripts that use them are not
+ portable. *Note Extended regular expressions: Extended regexps.
+
+`-s'
+`--separate'
+ By default, `sed' will consider the files specified on the command
+ line as a single continuous long stream. This GNU `sed' extension
+ allows the user to consider them as separate files: range
+ addresses (such as `/abc/,/def/') are not allowed to span several
+ files, line numbers are relative to the start of each file, `$'
+ refers to the last line of each file, and files invoked from the
+ `R' commands are rewound at the start of each file.
+
+`-u'
+`--unbuffered'
+ Buffer both input and output as minimally as practical. (This is
+ particularly useful if the input is coming from the likes of `tail
+ -f', and you wish to see the transformed output as soon as
+ possible.)
+
+
+ If no `-e', `-f', `--expression', or `--file' options are given on
+the command-line, then the first non-option argument on the command
+line is taken to be the SCRIPT to be executed.
+
+ If any command-line parameters remain after processing the above,
+these parameters are interpreted as the names of input files to be
+processed. A file name of `-' refers to the standard input stream.
+The standard input will be processed if no file names are specified.
+
+ ---------- Footnotes ----------
+
+ (1) This applies to commands such as `=', `a', `c', `i', `l', `p'.
+You can still write to the standard output by using the `w' or `W'
+commands together with the `/dev/stdout' special file
+
+ (2) Note that GNU `sed' creates the backup file whether or not any
+output is actually changed.
+
+
+File: sed.info, Node: sed Programs, Next: Examples, Prev: Invoking sed, Up: Top
+
+3 `sed' Programs
+****************
+
+A `sed' program consists of one or more `sed' commands, passed in by
+one or more of the `-e', `-f', `--expression', and `--file' options, or
+the first non-option argument if zero of these options are used. This
+document will refer to "the" `sed' script; this is understood to mean
+the in-order catenation of all of the SCRIPTs and SCRIPT-FILEs passed
+in.
+
+ Each `sed' command consists of an optional address or address range,
+followed by a one-character command name and any additional
+command-specific code.
+
+* Menu:
+
+* Execution Cycle:: How `sed' works
+* Addresses:: Selecting lines with `sed'
+* Regular Expressions:: Overview of regular expression syntax
+* Common Commands:: Often used commands
+* The "s" Command:: `sed''s Swiss Army Knife
+* Other Commands:: Less frequently used commands
+* Programming Commands:: Commands for `sed' gurus
+* Extended Commands:: Commands specific of GNU `sed'
+* Escapes:: Specifying special characters
+
+
+File: sed.info, Node: Execution Cycle, Next: Addresses, Up: sed Programs
+
+3.1 How `sed' Works
+===================
+
+`sed' maintains two data buffers: the active _pattern_ space, and the
+auxiliary _hold_ space. Both are initially empty.
+
+ `sed' operates by performing the following cycle on each lines of
+input: first, `sed' reads one line from the input stream, removes any
+trailing newline, and places it in the pattern space. Then commands
+are executed; each command can have an address associated to it:
+addresses are a kind of condition code, and a command is only executed
+if the condition is verified before the command is to be executed.
+
+ When the end of the script is reached, unless the `-n' option is in
+use, the contents of pattern space are printed out to the output
+stream, adding back the trailing newline if it was removed.(1) Then the
+next cycle starts for the next input line.
+
+ Unless special commands (like `D') are used, the pattern space is
+deleted between two cycles. The hold space, on the other hand, keeps
+its data between cycles (see commands `h', `H', `x', `g', `G' to move
+data between both buffers).
+
+ ---------- Footnotes ----------
+
+ (1) Actually, if `sed' prints a line without the terminating
+newline, it will nevertheless print the missing newline as soon as more
+text is sent to the same output stream, which gives the "least expected
+surprise" even though it does not make commands like `sed -n p' exactly
+identical to `cat'.
+
+
+File: sed.info, Node: Addresses, Next: Regular Expressions, Prev: Execution Cycle, Up: sed Programs
+
+3.2 Selecting lines with `sed'
+==============================
+
+Addresses in a `sed' script can be in any of the following forms:
+`NUMBER'
+ Specifying a line number will match only that line in the input.
+ (Note that `sed' counts lines continuously across all input files
+ unless `-i' or `-s' options are specified.)
+
+`FIRST~STEP'
+ This GNU extension matches every STEPth line starting with line
+ FIRST. In particular, lines will be selected when there exists a
+ non-negative N such that the current line-number equals FIRST + (N
+ * STEP). Thus, to select the odd-numbered lines, one would use
+ `1~2'; to pick every third line starting with the second, `2~3'
+ would be used; to pick every fifth line starting with the tenth,
+ use `10~5'; and `50~0' is just an obscure way of saying `50'.
+
+`$'
+ This address matches the last line of the last file of input, or
+ the last line of each file when the `-i' or `-s' options are
+ specified.
+
+`/REGEXP/'
+ This will select any line which matches the regular expression
+ REGEXP. If REGEXP itself includes any `/' characters, each must
+ be escaped by a backslash (`\').
+
+ The empty regular expression `//' repeats the last regular
+ expression match (the same holds if the empty regular expression is
+ passed to the `s' command). Note that modifiers to regular
+ expressions are evaluated when the regular expression is compiled,
+ thus it is invalid to specify them together with the empty regular
+ expression.
+
+`\%REGEXP%'
+ (The `%' may be replaced by any other single character.)
+
+ This also matches the regular expression REGEXP, but allows one to
+ use a different delimiter than `/'. This is particularly useful
+ if the REGEXP itself contains a lot of slashes, since it avoids
+ the tedious escaping of every `/'. If REGEXP itself includes any
+ delimiter characters, each must be escaped by a backslash (`\').
+
+`/REGEXP/I'
+`\%REGEXP%I'
+ The `I' modifier to regular-expression matching is a GNU extension
+ which causes the REGEXP to be matched in a case-insensitive manner.
+
+`/REGEXP/M'
+`\%REGEXP%M'
+ The `M' modifier to regular-expression matching is a GNU `sed'
+ extension which causes `^' and `$' to match respectively (in
+ addition to the normal behavior) the empty string after a newline,
+ and the empty string before a newline. There are special character
+ sequences (`\`' and `\'') which always match the beginning or the
+ end of the buffer. `M' stands for `multi-line'.
+
+
+ If no addresses are given, then all lines are matched; if one
+address is given, then only lines matching that address are matched.
+
+ An address range can be specified by specifying two addresses
+separated by a comma (`,'). An address range matches lines starting
+from where the first address matches, and continues until the second
+address matches (inclusively).
+
+ If the second address is a REGEXP, then checking for the ending
+match will start with the line _following_ the line which matched the
+first address: a range will always span at least two lines (except of
+course if the input stream ends).
+
+ If the second address is a NUMBER less than (or equal to) the line
+matching the first address, then only the one line is matched.
+
+ GNU `sed' also supports some special two-address forms; all these
+are GNU extensions:
+`0,/REGEXP/'
+ A line number of `0' can be used in an address specification like
+ `0,/REGEXP/' so that `sed' will try to match REGEXP in the first
+ input line too. In other words, `0,/REGEXP/' is similar to
+ `1,/REGEXP/', except that if ADDR2 matches the very first line of
+ input the `0,/REGEXP/' form will consider it to end the range,
+ whereas the `1,/REGEXP/' form will match the beginning of its
+ range and hence make the range span up to the _second_ occurrence
+ of the regular expression.
+
+ Note that this is the only place where the `0' address makes
+ sense; there is no 0-th line and commands which are given the `0'
+ address in any other way will give an error.
+
+`ADDR1,+N'
+ Matches ADDR1 and the N lines following ADDR1.
+
+`ADDR1,~N'
+ Matches ADDR1 and the lines following ADDR1 until the next line
+ whose input line number is a multiple of N.
+
+ Appending the `!' character to the end of an address specification
+negates the sense of the match. That is, if the `!' character follows
+an address range, then only lines which do _not_ match the address range
+will be selected. This also works for singleton addresses, and,
+perhaps perversely, for the null address.
+
+
+File: sed.info, Node: Regular Expressions, Next: Common Commands, Prev: Addresses, Up: sed Programs
+
+3.3 Overview of Regular Expression Syntax
+=========================================
+
+To know how to use `sed', people should understand regular expressions
+("regexp" for short). A regular expression is a pattern that is
+matched against a subject string from left to right. Most characters
+are "ordinary": they stand for themselves in a pattern, and match the
+corresponding characters in the subject. As a trivial example, the
+pattern
+
+ The quick brown fox
+
+matches a portion of a subject string that is identical to itself. The
+power of regular expressions comes from the ability to include
+alternatives and repetitions in the pattern. These are encoded in the
+pattern by the use of "special characters", which do not stand for
+themselves but instead are interpreted in some special way. Here is a
+brief description of regular expression syntax as used in `sed'.
+
+`CHAR'
+ A single ordinary character matches itself.
+
+`*'
+ Matches a sequence of zero or more instances of matches for the
+ preceding regular expression, which must be an ordinary character,
+ a special character preceded by `\', a `.', a grouped regexp (see
+ below), or a bracket expression. As a GNU extension, a postfixed
+ regular expression can also be followed by `*'; for example, `a**'
+ is equivalent to `a*'. POSIX 1003.1-2001 says that `*' stands for
+ itself when it appears at the start of a regular expression or
+ subexpression, but many nonGNU implementations do not support this
+ and portable scripts should instead use `\*' in these contexts.
+
+`\+'
+ As `*', but matches one or more. It is a GNU extension.
+
+`\?'
+ As `*', but only matches zero or one. It is a GNU extension.
+
+`\{I\}'
+ As `*', but matches exactly I sequences (I is a decimal integer;
+ for portability, keep it between 0 and 255 inclusive).
+
+`\{I,J\}'
+ Matches between I and J, inclusive, sequences.
+
+`\{I,\}'
+ Matches more than or equal to I sequences.
+
+`\(REGEXP\)'
+ Groups the inner REGEXP as a whole, this is used to:
+
+ * Apply postfix operators, like `\(abcd\)*': this will search
+ for zero or more whole sequences of `abcd', while `abcd*'
+ would search for `abc' followed by zero or more occurrences
+ of `d'. Note that support for `\(abcd\)*' is required by
+ POSIX 1003.1-2001, but many non-GNU implementations do not
+ support it and hence it is not universally portable.
+
+ * Use back references (see below).
+
+`.'
+ Matches any character, including newline.
+
+`^'
+ Matches the null string at beginning of the pattern space, i.e.
+ what appears after the circumflex must appear at the beginning of
+ the pattern space.
+
+ In most scripts, pattern space is initialized to the content of
+ each line (*note How `sed' works: Execution Cycle.). So, it is a
+ useful simplification to think of `^#include' as matching only
+ lines where `#include' is the first thing on line--if there are
+ spaces before, for example, the match fails. This simplification
+ is valid as long as the original content of pattern space is not
+ modified, for example with an `s' command.
+
+ `^' acts as a special character only at the beginning of the
+ regular expression or subexpression (that is, after `\(' or `\|').
+ Portable scripts should avoid `^' at the beginning of a
+ subexpression, though, as POSIX allows implementations that treat
+ `^' as an ordinary character in that context.
+
+`$'
+ It is the same as `^', but refers to end of pattern space. `$'
+ also acts as a special character only at the end of the regular
+ expression or subexpression (that is, before `\)' or `\|'), and
+ its use at the end of a subexpression is not portable.
+
+`[LIST]'
+`[^LIST]'
+ Matches any single character in LIST: for example, `[aeiou]'
+ matches all vowels. A list may include sequences like
+ `CHAR1-CHAR2', which matches any character between (inclusive)
+ CHAR1 and CHAR2.
+
+ A leading `^' reverses the meaning of LIST, so that it matches any
+ single character _not_ in LIST. To include `]' in the list, make
+ it the first character (after the `^' if needed), to include `-'
+ in the list, make it the first or last; to include `^' put it
+ after the first character.
+
+ The characters `$', `*', `.', `[', and `\' are normally not
+ special within LIST. For example, `[\*]' matches either `\' or
+ `*', because the `\' is not special here. However, strings like
+ `[.ch.]', `[=a=]', and `[:space:]' are special within LIST and
+ represent collating symbols, equivalence classes, and character
+ classes, respectively, and `[' is therefore special within LIST
+ when it is followed by `.', `=', or `:'. Also, when not in
+ `POSIXLY_CORRECT' mode, special escapes like `\n' and `\t' are
+ recognized within LIST. *Note Escapes::.
+
+`REGEXP1\|REGEXP2'
+ Matches either REGEXP1 or REGEXP2. Use parentheses to use complex
+ alternative regular expressions. The matching process tries each
+ alternative in turn, from left to right, and the first one that
+ succeeds is used. It is a GNU extension.
+
+`REGEXP1REGEXP2'
+ Matches the concatenation of REGEXP1 and REGEXP2. Concatenation
+ binds more tightly than `\|', `^', and `$', but less tightly than
+ the other regular expression operators.
+
+`\DIGIT'
+ Matches the DIGIT-th `\(...\)' parenthesized subexpression in the
+ regular expression. This is called a "back reference".
+ Subexpressions are implicity numbered by counting occurrences of
+ `\(' left-to-right.
+
+`\n'
+ Matches the newline character.
+
+`\CHAR'
+ Matches CHAR, where CHAR is one of `$', `*', `.', `[', `\', or `^'.
+ Note that the only C-like backslash sequences that you can
+ portably assume to be interpreted are `\n' and `\\'; in particular
+ `\t' is not portable, and matches a `t' under most implementations
+ of `sed', rather than a tab character.
+
+
+ Note that the regular expression matcher is greedy, i.e., matches
+are attempted from left to right and, if two or more matches are
+possible starting at the same character, it selects the longest.
+
+Examples:
+`abcdef'
+ Matches `abcdef'.
+
+`a*b'
+ Matches zero or more `a's followed by a single `b'. For example,
+ `b' or `aaaaab'.
+
+`a\?b'
+ Matches `b' or `ab'.
+
+`a\+b\+'
+ Matches one or more `a's followed by one or more `b's: `ab' is the
+ shortest possible match, but other examples are `aaaab' or
+ `abbbbb' or `aaaaaabbbbbbb'.
+
+`.*'
+`.\+'
+ These two both match all the characters in a string; however, the
+ first matches every string (including the empty string), while the
+ second matches only strings containing at least one character.
+
+`^main.*(.*)'
+ his matches a string starting with `main', followed by an opening
+ and closing parenthesis. The `n', `(' and `)' need not be
+ adjacent.
+
+`^#'
+ This matches a string beginning with `#'.
+
+`\\$'
+ This matches a string ending with a single backslash. The regexp
+ contains two backslashes for escaping.
+
+`\$'
+ Instead, this matches a string consisting of a single dollar sign,
+ because it is escaped.
+
+`[a-zA-Z0-9]'
+ In the C locale, this matches any ASCII letters or digits.
+
+`[^ tab]\+'
+ (Here `tab' stands for a single tab character.) This matches a
+ string of one or more characters, none of which is a space or a
+ tab. Usually this means a word.
+
+`^\(.*\)\n\1$'
+ This matches a string consisting of two equal substrings separated
+ by a newline.
+
+`.\{9\}A$'
+ This matches nine characters followed by an `A'.
+
+`^.\{15\}A'
+ This matches the start of a string that contains 16 characters,
+ the last of which is an `A'.
+
+
+
+File: sed.info, Node: Common Commands, Next: The "s" Command, Prev: Regular Expressions, Up: sed Programs
+
+3.4 Often-Used Commands
+=======================
+
+If you use `sed' at all, you will quite likely want to know these
+commands.
+
+`#'
+ [No addresses allowed.]
+
+ The `#' character begins a comment; the comment continues until
+ the next newline.
+
+ If you are concerned about portability, be aware that some
+ implementations of `sed' (which are not POSIX conformant) may only
+ support a single one-line comment, and then only when the very
+ first character of the script is a `#'.
+
+ Warning: if the first two characters of the `sed' script are `#n',
+ then the `-n' (no-autoprint) option is forced. If you want to put
+ a comment in the first line of your script and that comment begins
+ with the letter `n' and you do not want this behavior, then be
+ sure to either use a capital `N', or place at least one space
+ before the `n'.
+
+`q [EXIT-CODE]'
+ This command only accepts a single address.
+
+ Exit `sed' without processing any more commands or input. Note
+ that the current pattern space is printed if auto-print is not
+ disabled with the `-n' options. The ability to return an exit
+ code from the `sed' script is a GNU `sed' extension.
+
+`d'
+ Delete the pattern space; immediately start next cycle.
+
+`p'
+ Print out the pattern space (to the standard output). This
+ command is usually only used in conjunction with the `-n'
+ command-line option.
+
+`n'
+ If auto-print is not disabled, print the pattern space, then,
+ regardless, replace the pattern space with the next line of input.
+ If there is no more input then `sed' exits without processing any
+ more commands.
+
+`{ COMMANDS }'
+ A group of commands may be enclosed between `{' and `}' characters.
+ This is particularly useful when you want a group of commands to
+ be triggered by a single address (or address-range) match.
+
+
+
+File: sed.info, Node: The "s" Command, Next: Other Commands, Prev: Common Commands, Up: sed Programs
+
+3.5 The `s' Command
+===================
+
+The syntax of the `s' (as in substitute) command is
+`s/REGEXP/REPLACEMENT/FLAGS'. The `/' characters may be uniformly
+replaced by any other single character within any given `s' command.
+The `/' character (or whatever other character is used in its stead)
+can appear in the REGEXP or REPLACEMENT only if it is preceded by a `\'
+character.
+
+ The `s' command is probably the most important in `sed' and has a
+lot of different options. Its basic concept is simple: the `s' command
+attempts to match the pattern space against the supplied REGEXP; if the
+match is successful, then that portion of the pattern space which was
+matched is replaced with REPLACEMENT.
+
+ The REPLACEMENT can contain `\N' (N being a number from 1 to 9,
+inclusive) references, which refer to the portion of the match which is
+contained between the Nth `\(' and its matching `\)'. Also, the
+REPLACEMENT can contain unescaped `&' characters which reference the
+whole matched portion of the pattern space. Finally, as a GNU `sed'
+extension, you can include a special sequence made of a backslash and
+one of the letters `L', `l', `U', `u', or `E'. The meaning is as
+follows:
+
+`\L'
+ Turn the replacement to lowercase until a `\U' or `\E' is found,
+
+`\l'
+ Turn the next character to lowercase,
+
+`\U'
+ Turn the replacement to uppercase until a `\L' or `\E' is found,
+
+`\u'
+ Turn the next character to uppercase,
+
+`\E'
+ Stop case conversion started by `\L' or `\U'.
+
+ To include a literal `\', `&', or newline in the final replacement,
+be sure to precede the desired `\', `&', or newline in the REPLACEMENT
+with a `\'.
+
+ The `s' command can be followed by zero or more of the following
+FLAGS:
+
+`g'
+ Apply the replacement to _all_ matches to the REGEXP, not just the
+ first.
+
+`NUMBER'
+ Only replace the NUMBERth match of the REGEXP.
+
+ Note: the POSIX standard does not specify what should happen when
+ you mix the `g' and NUMBER modifiers, and currently there is no
+ widely agreed upon meaning across `sed' implementations. For GNU
+ `sed', the interaction is defined to be: ignore matches before the
+ NUMBERth, and then match and replace all matches from the NUMBERth
+ on.
+
+`p'
+ If the substitution was made, then print the new pattern space.
+
+ Note: when both the `p' and `e' options are specified, the
+ relative ordering of the two produces very different results. In
+ general, `ep' (evaluate then print) is what you want, but
+ operating the other way round can be useful for debugging. For
+ this reason, the current version of GNU `sed' interprets specially
+ the presence of `p' options both before and after `e', printing
+ the pattern space before and after evaluation, while in general
+ flags for the `s' command show their effect just once. This
+ behavior, although documented, might change in future versions.
+
+`w FILE-NAME'
+ If the substitution was made, then write out the result to the
+ named file. As a GNU `sed' extension, two special values of
+ FILE-NAME are supported: `/dev/stderr', which writes the result to
+ the standard error, and `/dev/stdout', which writes to the standard
+ output.(1)
+
+`e'
+ This command allows one to pipe input from a shell command into
+ pattern space. If a substitution was made, the command that is
+ found in pattern space is executed and pattern space is replaced
+ with its output. A trailing newline is suppressed; results are
+ undefined if the command to be executed contains a NUL character.
+ This is a GNU `sed' extension.
+
+`I'
+`i'
+ The `I' modifier to regular-expression matching is a GNU extension
+ which makes `sed' match REGEXP in a case-insensitive manner.
+
+`M'
+`m'
+ The `M' modifier to regular-expression matching is a GNU `sed'
+ extension which causes `^' and `$' to match respectively (in
+ addition to the normal behavior) the empty string after a newline,
+ and the empty string before a newline. There are special character
+ sequences (`\`' and `\'') which always match the beginning or the
+ end of the buffer. `M' stands for `multi-line'.
+
+
+ ---------- Footnotes ----------
+
+ (1) This is equivalent to `p' unless the `-i' option is being used.
+
+
+File: sed.info, Node: Other Commands, Next: Programming Commands, Prev: The "s" Command, Up: sed Programs
+
+3.6 Less Frequently-Used Commands
+=================================
+
+Though perhaps less frequently used than those in the previous section,
+some very small yet useful `sed' scripts can be built with these
+commands.
+
+`y/SOURCE-CHARS/DEST-CHARS/'
+ (The `/' characters may be uniformly replaced by any other single
+ character within any given `y' command.)
+
+ Transliterate any characters in the pattern space which match any
+ of the SOURCE-CHARS with the corresponding character in DEST-CHARS.
+
+ Instances of the `/' (or whatever other character is used in its
+ stead), `\', or newlines can appear in the SOURCE-CHARS or
+ DEST-CHARS lists, provide that each instance is escaped by a `\'.
+ The SOURCE-CHARS and DEST-CHARS lists _must_ contain the same
+ number of characters (after de-escaping).
+
+`a\'
+`TEXT'
+ As a GNU extension, this command accepts two addresses.
+
+ Queue the lines of text which follow this command (each but the
+ last ending with a `\', which are removed from the output) to be
+ output at the end of the current cycle, or when the next input
+ line is read.
+
+ Escape sequences in TEXT are processed, so you should use `\\' in
+ TEXT to print a single backslash.
+
+ As a GNU extension, if between the `a' and the newline there is
+ other than a whitespace-`\' sequence, then the text of this line,
+ starting at the first non-whitespace character after the `a', is
+ taken as the first line of the TEXT block. (This enables a
+ simplification in scripting a one-line add.) This extension also
+ works with the `i' and `c' commands.
+
+`i\'
+`TEXT'
+ As a GNU extension, this command accepts two addresses.
+
+ Immediately output the lines of text which follow this command
+ (each but the last ending with a `\', which are removed from the
+ output).
+
+`c\'
+`TEXT'
+ Delete the lines matching the address or address-range, and output
+ the lines of text which follow this command (each but the last
+ ending with a `\', which are removed from the output) in place of
+ the last line (or in place of each line, if no addresses were
+ specified). A new cycle is started after this command is done,
+ since the pattern space will have been deleted.
+
+`='
+ As a GNU extension, this command accepts two addresses.
+
+ Print out the current input line number (with a trailing newline).
+
+`l N'
+ Print the pattern space in an unambiguous form: non-printable
+ characters (and the `\' character) are printed in C-style escaped
+ form; long lines are split, with a trailing `\' character to
+ indicate the split; the end of each line is marked with a `$'.
+
+ N specifies the desired line-wrap length; a length of 0 (zero)
+ means to never wrap long lines. If omitted, the default as
+ specified on the command line is used. The N parameter is a GNU
+ `sed' extension.
+
+`r FILENAME'
+ As a GNU extension, this command accepts two addresses.
+
+ Queue the contents of FILENAME to be read and inserted into the
+ output stream at the end of the current cycle, or when the next
+ input line is read. Note that if FILENAME cannot be read, it is
+ treated as if it were an empty file, without any error indication.
+
+ As a GNU `sed' extension, the special value `/dev/stdin' is
+ supported for the file name, which reads the contents of the
+ standard input.
+
+`w FILENAME'
+ Write the pattern space to FILENAME. As a GNU `sed' extension,
+ two special values of FILE-NAME are supported: `/dev/stderr',
+ which writes the result to the standard error, and `/dev/stdout',
+ which writes to the standard output.(1)
+
+ The file will be created (or truncated) before the first input
+ line is read; all `w' commands (including instances of `w' flag on
+ successful `s' commands) which refer to the same FILENAME are
+ output without closing and reopening the file.
+
+`D'
+ Delete text in the pattern space up to the first newline. If any
+ text is left, restart cycle with the resultant pattern space
+ (without reading a new line of input), otherwise start a normal
+ new cycle.
+
+`N'
+ Add a newline to the pattern space, then append the next line of
+ input to the pattern space. If there is no more input then `sed'
+ exits without processing any more commands.
+
+`P'
+ Print out the portion of the pattern space up to the first newline.
+
+`h'
+ Replace the contents of the hold space with the contents of the
+ pattern space.
+
+`H'
+ Append a newline to the contents of the hold space, and then
+ append the contents of the pattern space to that of the hold space.
+
+`g'
+ Replace the contents of the pattern space with the contents of the
+ hold space.
+
+`G'
+ Append a newline to the contents of the pattern space, and then
+ append the contents of the hold space to that of the pattern space.
+
+`x'
+ Exchange the contents of the hold and pattern spaces.
+
+
+ ---------- Footnotes ----------
+
+ (1) This is equivalent to `p' unless the `-i' option is being used.
+
+
+File: sed.info, Node: Programming Commands, Next: Extended Commands, Prev: Other Commands, Up: sed Programs
+
+3.7 Commands for `sed' gurus
+============================
+
+In most cases, use of these commands indicates that you are probably
+better off programming in something like `awk' or Perl. But
+occasionally one is committed to sticking with `sed', and these
+commands can enable one to write quite convoluted scripts.
+
+`: LABEL'
+ [No addresses allowed.]
+
+ Specify the location of LABEL for branch commands. In all other
+ respects, a no-op.
+
+`b LABEL'
+ Unconditionally branch to LABEL. The LABEL may be omitted, in
+ which case the next cycle is started.
+
+`t LABEL'
+ Branch to LABEL only if there has been a successful `s'ubstitution
+ since the last input line was read or conditional branch was taken.
+ The LABEL may be omitted, in which case the next cycle is started.
+
+
+
+File: sed.info, Node: Extended Commands, Next: Escapes, Prev: Programming Commands, Up: sed Programs
+
+3.8 Commands Specific to GNU `sed'
+==================================
+
+These commands are specific to GNU `sed', so you must use them with
+care and only when you are sure that hindering portability is not evil.
+They allow you to check for GNU `sed' extensions or to do tasks that
+are required quite often, yet are unsupported by standard `sed's.
+
+`e [COMMAND]'
+ This command allows one to pipe input from a shell command into
+ pattern space. Without parameters, the `e' command executes the
+ command that is found in pattern space and replaces the pattern
+ space with the output; a trailing newline is suppressed.
+
+ If a parameter is specified, instead, the `e' command interprets
+ it as a command and sends its output to the output stream (like
+ `r' does). The command can run across multiple lines, all but the
+ last ending with a back-slash.
+
+ In both cases, the results are undefined if the command to be
+ executed contains a NUL character.
+
+`L N'
+ This GNU `sed' extension fills and joins lines in pattern space to
+ produce output lines of (at most) N characters, like `fmt' does;
+ if N is omitted, the default as specified on the command line is
+ used. This command is considered a failed experiment and unless
+ there is enough request (which seems unlikely) will be removed in
+ future versions.
+
+`Q [EXIT-CODE]'
+ This command only accepts a single address.
+
+ This command is the same as `q', but will not print the contents
+ of pattern space. Like `q', it provides the ability to return an
+ exit code to the caller.
+
+ This command can be useful because the only alternative ways to
+ accomplish this apparently trivial function are to use the `-n'
+ option (which can unnecessarily complicate your script) or
+ resorting to the following snippet, which wastes time by reading
+ the whole file without any visible effect:
+
+ :eat
+ $d Quit silently on the last line
+ N Read another line, silently
+ g Overwrite pattern space each time to save memory
+ b eat
+
+`R FILENAME'
+ Queue a line of FILENAME to be read and inserted into the output
+ stream at the end of the current cycle, or when the next input
+ line is read. Note that if FILENAME cannot be read, or if its end
+ is reached, no line is appended, without any error indication.
+
+ As with the `r' command, the special value `/dev/stdin' is
+ supported for the file name, which reads a line from the standard
+ input.
+
+`T LABEL'
+ Branch to LABEL only if there have been no successful
+ `s'ubstitutions since the last input line was read or conditional
+ branch was taken. The LABEL may be omitted, in which case the next
+ cycle is started.
+
+`v VERSION'
+ This command does nothing, but makes `sed' fail if GNU `sed'
+ extensions are not supported, simply because other versions of
+ `sed' do not implement it. In addition, you can specify the
+ version of `sed' that your script requires, such as `4.0.5'. The
+ default is `4.0' because that is the first version that
+ implemented this command.
+
+ This command enables all GNU extensions even if `POSIXLY_CORRECT'
+ is set in the environment.
+
+`W FILENAME'
+ Write to the given filename the portion of the pattern space up to
+ the first newline. Everything said under the `w' command about
+ file handling holds here too.
+
+`z'
+ This command empties the content of pattern space. It is usually
+ the same as `s/.*//', but is more efficient and works in the
+ presence of invalid multibyte sequences in the input stream.
+ POSIX mandates that such sequences are _not_ matched by `.', so
+ that there is no portable way to clear `sed''s buffers in the
+ middle of the script in most multibyte locales (including UTF-8
+ locales).
+
+
+File: sed.info, Node: Escapes, Prev: Extended Commands, Up: sed Programs
+
+3.9 GNU Extensions for Escapes in Regular Expressions
+=====================================================
+
+Until this chapter, we have only encountered escapes of the form `\^',
+which tell `sed' not to interpret the circumflex as a special
+character, but rather to take it literally. For example, `\*' matches
+a single asterisk rather than zero or more backslashes.
+
+ This chapter introduces another kind of escape(1)--that is, escapes
+that are applied to a character or sequence of characters that
+ordinarily are taken literally, and that `sed' replaces with a special
+character. This provides a way of encoding non-printable characters in
+patterns in a visible manner. There is no restriction on the
+appearance of non-printing characters in a `sed' script but when a
+script is being prepared in the shell or by text editing, it is usually
+easier to use one of the following escape sequences than the binary
+character it represents:
+
+ The list of these escapes is:
+
+`\a'
+ Produces or matches a BEL character, that is an "alert" (ASCII 7).
+
+`\f'
+ Produces or matches a form feed (ASCII 12).
+
+`\n'
+ Produces or matches a newline (ASCII 10).
+
+`\r'
+ Produces or matches a carriage return (ASCII 13).
+
+`\t'
+ Produces or matches a horizontal tab (ASCII 9).
+
+`\v'
+ Produces or matches a so called "vertical tab" (ASCII 11).
+
+`\cX'
+ Produces or matches `CONTROL-X', where X is any character. The
+ precise effect of `\cX' is as follows: if X is a lower case
+ letter, it is converted to upper case. Then bit 6 of the
+ character (hex 40) is inverted. Thus `\cz' becomes hex 1A, but
+ `\c{' becomes hex 3B, while `\c;' becomes hex 7B.
+
+`\dXXX'
+ Produces or matches a character whose decimal ASCII value is XXX.
+
+`\oXXX'
+ Produces or matches a character whose octal ASCII value is XXX.
+
+`\xXX'
+ Produces or matches a character whose hexadecimal ASCII value is
+ XX.
+
+ `\b' (backspace) was omitted because of the conflict with the
+existing "word boundary" meaning.
+
+ Other escapes match a particular character class and are valid only
+in regular expressions:
+
+`\w'
+ Matches any "word" character. A "word" character is any letter or
+ digit or the underscore character.
+
+`\W'
+ Matches any "non-word" character.
+
+`\b'
+ Matches a word boundary; that is it matches if the character to
+ the left is a "word" character and the character to the right is a
+ "non-word" character, or vice-versa.
+
+`\B'
+ Matches everywhere but on a word boundary; that is it matches if
+ the character to the left and the character to the right are
+ either both "word" characters or both "non-word" characters.
+
+`\`'
+ Matches only at the start of pattern space. This is different
+ from `^' in multi-line mode.
+
+`\''
+ Matches only at the end of pattern space. This is different from
+ `$' in multi-line mode.
+
+
+ ---------- Footnotes ----------
+
+ (1) All the escapes introduced here are GNU extensions, with the
+exception of `\n'. In basic regular expression mode, setting
+`POSIXLY_CORRECT' disables them inside bracket expressions.
+

-Indirect:
-sed.info-1: 935
-sed.info-2: 50405
+File: sed.info, Node: Examples, Next: Limitations, Prev: sed Programs, Up: Top
+
+4 Some Sample Scripts
+*********************
+
+Here are some `sed' scripts to guide you in the art of mastering `sed'.
+
+* Menu:
+
+Some exotic examples:
+* Centering lines::
+* Increment a number::
+* Rename files to lower case::
+* Print bash environment::
+* Reverse chars of lines::
+
+Emulating standard utilities:
+* tac:: Reverse lines of files
+* cat -n:: Numbering lines
+* cat -b:: Numbering non-blank lines
+* wc -c:: Counting chars
+* wc -w:: Counting words
+* wc -l:: Counting lines
+* head:: Printing the first lines
+* tail:: Printing the last lines
+* uniq:: Make duplicate lines unique
+* uniq -d:: Print duplicated lines of input
+* uniq -u:: Remove all duplicated lines
+* cat -s:: Squeezing blank lines
+
+
+File: sed.info, Node: Centering lines, Next: Increment a number, Up: Examples
+
+4.1 Centering Lines
+===================
+
+This script centers all lines of a file on a 80 columns width. To
+change that width, the number in `\{...\}' must be replaced, and the
+number of added spaces also must be changed.
+
+ Note how the buffer commands are used to separate parts in the
+regular expressions to be matched--this is a common technique.
+
+ #!/usr/bin/sed -f
+
+ # Put 80 spaces in the buffer
+ 1 {
+ x
+ s/^$/ /
+ s/^.*$/&&&&&&&&/
+ x
+ }
+
+ # del leading and trailing spaces
+ y/tab/ /
+ s/^ *//
+ s/ *$//
+
+ # add a newline and 80 spaces to end of line
+ G
+
+ # keep first 81 chars (80 + a newline)
+ s/^\(.\{81\}\).*$/\1/
+
+ # \2 matches half of the spaces, which are moved to the beginning
+ s/^\(.*\)\n\(.*\)\2/\2\1/
+
+
+File: sed.info, Node: Increment a number, Next: Rename files to lower case, Prev: Centering lines, Up: Examples
+
+4.2 Increment a Number
+======================
+
+This script is one of a few that demonstrate how to do arithmetic in
+`sed'. This is indeed possible,(1) but must be done manually.
+
+ To increment one number you just add 1 to last digit, replacing it
+by the following digit. There is one exception: when the digit is a
+nine the previous digits must be also incremented until you don't have
+a nine.
+
+ This solution by Bruno Haible is very clever and smart because it
+uses a single buffer; if you don't have this limitation, the algorithm
+used in *Note Numbering lines: cat -n, is faster. It works by
+replacing trailing nines with an underscore, then using multiple `s'
+commands to increment the last digit, and then again substituting
+underscores with zeros.
+
+ #!/usr/bin/sed -f
+
+ /[^0-9]/ d
+
+ # replace all leading 9s by _ (any other character except digits, could
+ # be used)
+ :d
+ s/9\(_*\)$/_\1/
+ td
+
+ # incr last digit only. The first line adds a most-significant
+ # digit of 1 if we have to add a digit.
+ #
+ # The `tn' commands are not necessary, but make the thing
+ # faster
+
+ s/^\(_*\)$/1\1/; tn
+ s/8\(_*\)$/9\1/; tn
+ s/7\(_*\)$/8\1/; tn
+ s/6\(_*\)$/7\1/; tn
+ s/5\(_*\)$/6\1/; tn
+ s/4\(_*\)$/5\1/; tn
+ s/3\(_*\)$/4\1/; tn
+ s/2\(_*\)$/3\1/; tn
+ s/1\(_*\)$/2\1/; tn
+ s/0\(_*\)$/1\1/; tn
+
+ :n
+ y/_/0/
+
+ ---------- Footnotes ----------
+
+ (1) `sed' guru Greg Ubben wrote an implementation of the `dc' RPN
+calculator! It is distributed together with sed.
+
+
+File: sed.info, Node: Rename files to lower case, Next: Print bash environment, Prev: Increment a number, Up: Examples
+
+4.3 Rename Files to Lower Case
+==============================
+
+This is a pretty strange use of `sed'. We transform text, and
+transform it to be shell commands, then just feed them to shell. Don't
+worry, even worse hacks are done when using `sed'; I have seen a script
+converting the output of `date' into a `bc' program!
+
+ The main body of this is the `sed' script, which remaps the name
+from lower to upper (or vice-versa) and even checks out if the remapped
+name is the same as the original name. Note how the script is
+parameterized using shell variables and proper quoting.
+
+ #! /bin/sh
+ # rename files to lower/upper case...
+ #
+ # usage:
+ # move-to-lower *
+ # move-to-upper *
+ # or
+ # move-to-lower -R .
+ # move-to-upper -R .
+ #
+
+ help()
+ {
+ cat << eof
+ Usage: $0 [-n] [-r] [-h] files...
+
+ -n do nothing, only see what would be done
+ -R recursive (use find)
+ -h this message
+ files files to remap to lower case
+
+ Examples:
+ $0 -n * (see if everything is ok, then...)
+ $0 *
+
+ $0 -R .
+
+ eof
+ }
+
+ apply_cmd='sh'
+ finder='echo "$@" | tr " " "\n"'
+ files_only=
+
+ while :
+ do
+ case "$1" in
+ -n) apply_cmd='cat' ;;
+ -R) finder='find "$@" -type f';;
+ -h) help ; exit 1 ;;
+ *) break ;;
+ esac
+ shift
+ done
+
+ if [ -z "$1" ]; then
+ echo Usage: $0 [-h] [-n] [-r] files...
+ exit 1
+ fi
+
+ LOWER='abcdefghijklmnopqrstuvwxyz'
+ UPPER='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+
+ case `basename $0` in
+ *upper*) TO=$UPPER; FROM=$LOWER ;;
+ *) FROM=$UPPER; TO=$LOWER ;;
+ esac
+
+ eval $finder | sed -n '
+
+ # remove all trailing slashes
+ s/\/*$//
+
+ # add ./ if there is no path, only a filename
+ /\//! s/^/.\//
+
+ # save path+filename
+ h
+
+ # remove path
+ s/.*\///
+
+ # do conversion only on filename
+ y/'$FROM'/'$TO'/
+
+ # now line contains original path+file, while
+ # hold space contains the new filename
+ x
+
+ # add converted file name to line, which now contains
+ # path/file-name\nconverted-file-name
+ G
+
+ # check if converted file name is equal to original file name,
+ # if it is, do not print nothing
+ /^.*\/\(.*\)\n\1/b
+
+ # now, transform path/fromfile\n, into
+ # mv path/fromfile path/tofile and print it
+ s/^\(.*\/\)\(.*\)\n\(.*\)$/mv "\1\2" "\1\3"/p
+
+ ' | $apply_cmd
+
+
+File: sed.info, Node: Print bash environment, Next: Reverse chars of lines, Prev: Rename files to lower case, Up: Examples
+
+4.4 Print `bash' Environment
+============================
+
+This script strips the definition of the shell functions from the
+output of the `set' Bourne-shell command.
+
+ #!/bin/sh
+
+ set | sed -n '
+ :x
+
+ # if no occurrence of "=()" print and load next line
+ /=()/! { p; b; }
+ / () $/! { p; b; }
+
+ # possible start of functions section
+ # save the line in case this is a var like FOO="() "
+ h
+
+ # if the next line has a brace, we quit because
+ # nothing comes after functions
+ n
+ /^{/ q
+
+ # print the old line
+ x; p
+
+ # work on the new line now
+ x; bx
+ '
+
+
+File: sed.info, Node: Reverse chars of lines, Next: tac, Prev: Print bash environment, Up: Examples
+
+4.5 Reverse Characters of Lines
+===============================
+
+This script can be used to reverse the position of characters in lines.
+The technique moves two characters at a time, hence it is faster than
+more intuitive implementations.
+
+ Note the `tx' command before the definition of the label. This is
+often needed to reset the flag that is tested by the `t' command.
+
+ Imaginative readers will find uses for this script. An example is
+reversing the output of `banner'.(1)
+
+ #!/usr/bin/sed -f
+
+ /../! b
+
+ # Reverse a line. Begin embedding the line between two newlines
+ s/^.*$/\
+ &\
+ /
+
+ # Move first character at the end. The regexp matches until
+ # there are zero or one characters between the markers
+ tx
+ :x
+ s/\(\n.\)\(.*\)\(.\n\)/\3\2\1/
+ tx
+
+ # Remove the newline markers
+ s/\n//g
+
+ ---------- Footnotes ----------
+
+ (1) This requires another script to pad the output of banner; for
+example
+
+ #! /bin/sh
+
+ banner -w $1 $2 $3 $4 |
+ sed -e :a -e '/^.\{0,'$1'\}$/ { s/$/ /; ba; }' |
+ ~/sedscripts/reverseline.sed
+
+
+File: sed.info, Node: tac, Next: cat -n, Prev: Reverse chars of lines, Up: Examples
+
+4.6 Reverse Lines of Files
+==========================
+
+This one begins a series of totally useless (yet interesting) scripts
+emulating various Unix commands. This, in particular, is a `tac'
+workalike.
+
+ Note that on implementations other than GNU `sed' this script might
+easily overflow internal buffers.
+
+ #!/usr/bin/sed -nf
+
+ # reverse all lines of input, i.e. first line became last, ...
+
+ # from the second line, the buffer (which contains all previous lines)
+ # is *appended* to current line, so, the order will be reversed
+ 1! G
+
+ # on the last line we're done -- print everything
+ $ p
+
+ # store everything on the buffer again
+ h
+
+
+File: sed.info, Node: cat -n, Next: cat -b, Prev: tac, Up: Examples
+
+4.7 Numbering Lines
+===================
+
+This script replaces `cat -n'; in fact it formats its output exactly
+like GNU `cat' does.
+
+ Of course this is completely useless and for two reasons: first,
+because somebody else did it in C, second, because the following
+Bourne-shell script could be used for the same purpose and would be
+much faster:
+
+ #! /bin/sh
+ sed -e "=" $@ | sed -e '
+ s/^/ /
+ N
+ s/^ *\(......\)\n/\1 /
+ '
+
+ It uses `sed' to print the line number, then groups lines two by two
+using `N'. Of course, this script does not teach as much as the one
+presented below.
+
+ The algorithm used for incrementing uses both buffers, so the line
+is printed as soon as possible and then discarded. The number is split
+so that changing digits go in a buffer and unchanged ones go in the
+other; the changed digits are modified in a single step (using a `y'
+command). The line number for the next line is then composed and
+stored in the hold space, to be used in the next iteration.
+
+ #!/usr/bin/sed -nf
+
+ # Prime the pump on the first line
+ x
+ /^$/ s/^.*$/1/
+
+ # Add the correct line number before the pattern
+ G
+ h
+
+ # Format it and print it
+ s/^/ /
+ s/^ *\(......\)\n/\1 /p
+
+ # Get the line number from hold space; add a zero
+ # if we're going to add a digit on the next line
+ g
+ s/\n.*$//
+ /^9*$/ s/^/0/
+
+ # separate changing/unchanged digits with an x
+ s/.9*$/x&/
+
+ # keep changing digits in hold space
+ h
+ s/^.*x//
+ y/0123456789/1234567890/
+ x
+
+ # keep unchanged digits in pattern space
+ s/x.*$//
+
+ # compose the new number, remove the newline implicitly added by G
+ G
+ s/\n//
+ h
+
+
+File: sed.info, Node: cat -b, Next: wc -c, Prev: cat -n, Up: Examples
+
+4.8 Numbering Non-blank Lines
+=============================
+
+Emulating `cat -b' is almost the same as `cat -n'--we only have to
+select which lines are to be numbered and which are not.
+
+ The part that is common to this script and the previous one is not
+commented to show how important it is to comment `sed' scripts
+properly...
+
+ #!/usr/bin/sed -nf
+
+ /^$/ {
+ p
+ b
+ }
+
+ # Same as cat -n from now
+ x
+ /^$/ s/^.*$/1/
+ G
+ h
+ s/^/ /
+ s/^ *\(......\)\n/\1 /p
+ x
+ s/\n.*$//
+ /^9*$/ s/^/0/
+ s/.9*$/x&/
+ h
+ s/^.*x//
+ y/0123456789/1234567890/
+ x
+ s/x.*$//
+ G
+ s/\n//
+ h
+
+
+File: sed.info, Node: wc -c, Next: wc -w, Prev: cat -b, Up: Examples
+
+4.9 Counting Characters
+=======================
+
+This script shows another way to do arithmetic with `sed'. In this
+case we have to add possibly large numbers, so implementing this by
+successive increments would not be feasible (and possibly even more
+complicated to contrive than this script).
+
+ The approach is to map numbers to letters, kind of an abacus
+implemented with `sed'. `a's are units, `b's are tens and so on: we
+simply add the number of characters on the current line as units, and
+then propagate the carry to tens, hundreds, and so on.
+
+ As usual, running totals are kept in hold space.
+
+ On the last line, we convert the abacus form back to decimal. For
+the sake of variety, this is done with a loop rather than with some 80
+`s' commands(1): first we convert units, removing `a's from the number;
+then we rotate letters so that tens become `a's, and so on until no
+more letters remain.
+
+ #!/usr/bin/sed -nf
+
+ # Add n+1 a's to hold space (+1 is for the newline)
+ s/./a/g
+ H
+ x
+ s/\n/a/
+
+ # Do the carry. The t's and b's are not necessary,
+ # but they do speed up the thing
+ t a
+ : a; s/aaaaaaaaaa/b/g; t b; b done
+ : b; s/bbbbbbbbbb/c/g; t c; b done
+ : c; s/cccccccccc/d/g; t d; b done
+ : d; s/dddddddddd/e/g; t e; b done
+ : e; s/eeeeeeeeee/f/g; t f; b done
+ : f; s/ffffffffff/g/g; t g; b done
+ : g; s/gggggggggg/h/g; t h; b done
+ : h; s/hhhhhhhhhh//g
+
+ : done
+ $! {
+ h
+ b
+ }
+
+ # On the last line, convert back to decimal
+
+ : loop
+ /a/! s/[b-h]*/&0/
+ s/aaaaaaaaa/9/
+ s/aaaaaaaa/8/
+ s/aaaaaaa/7/
+ s/aaaaaa/6/
+ s/aaaaa/5/
+ s/aaaa/4/
+ s/aaa/3/
+ s/aa/2/
+ s/a/1/
+
+ : next
+ y/bcdefgh/abcdefg/
+ /[a-h]/ b loop
+ p
+
+ ---------- Footnotes ----------
+
+ (1) Some implementations have a limit of 199 commands per script
+
+
+File: sed.info, Node: wc -w, Next: wc -l, Prev: wc -c, Up: Examples
+
+4.10 Counting Words
+===================
+
+This script is almost the same as the previous one, once each of the
+words on the line is converted to a single `a' (in the previous script
+each letter was changed to an `a').
+
+ It is interesting that real `wc' programs have optimized loops for
+`wc -c', so they are much slower at counting words rather than
+characters. This script's bottleneck, instead, is arithmetic, and
+hence the word-counting one is faster (it has to manage smaller
+numbers).
+
+ Again, the common parts are not commented to show the importance of
+commenting `sed' scripts.
+
+ #!/usr/bin/sed -nf
+
+ # Convert words to a's
+ s/[ tab][ tab]*/ /g
+ s/^/ /
+ s/ [^ ][^ ]*/a /g
+ s/ //g
+
+ # Append them to hold space
+ H
+ x
+ s/\n//
+
+ # From here on it is the same as in wc -c.
+ /aaaaaaaaaa/! bx; s/aaaaaaaaaa/b/g
+ /bbbbbbbbbb/! bx; s/bbbbbbbbbb/c/g
+ /cccccccccc/! bx; s/cccccccccc/d/g
+ /dddddddddd/! bx; s/dddddddddd/e/g
+ /eeeeeeeeee/! bx; s/eeeeeeeeee/f/g
+ /ffffffffff/! bx; s/ffffffffff/g/g
+ /gggggggggg/! bx; s/gggggggggg/h/g
+ s/hhhhhhhhhh//g
+ :x
+ $! { h; b; }
+ :y
+ /a/! s/[b-h]*/&0/
+ s/aaaaaaaaa/9/
+ s/aaaaaaaa/8/
+ s/aaaaaaa/7/
+ s/aaaaaa/6/
+ s/aaaaa/5/
+ s/aaaa/4/
+ s/aaa/3/
+ s/aa/2/
+ s/a/1/
+ y/bcdefgh/abcdefg/
+ /[a-h]/ by
+ p
+
+
+File: sed.info, Node: wc -l, Next: head, Prev: wc -w, Up: Examples
+
+4.11 Counting Lines
+===================
+
+No strange things are done now, because `sed' gives us `wc -l'
+functionality for free!!! Look:
+
+ #!/usr/bin/sed -nf
+ $=
+
+
+File: sed.info, Node: head, Next: tail, Prev: wc -l, Up: Examples
+
+4.12 Printing the First Lines
+=============================
+
+This script is probably the simplest useful `sed' script. It displays
+the first 10 lines of input; the number of displayed lines is right
+before the `q' command.
+
+ #!/usr/bin/sed -f
+ 10q
+
+
+File: sed.info, Node: tail, Next: uniq, Prev: head, Up: Examples
+
+4.13 Printing the Last Lines
+============================
+
+Printing the last N lines rather than the first is more complex but
+indeed possible. N is encoded in the second line, before the bang
+character.
+
+ This script is similar to the `tac' script in that it keeps the
+final output in the hold space and prints it at the end:
+
+ #!/usr/bin/sed -nf
+
+ 1! {; H; g; }
+ 1,10 !s/[^\n]*\n//
+ $p
+ h
+
+ Mainly, the scripts keeps a window of 10 lines and slides it by
+adding a line and deleting the oldest (the substitution command on the
+second line works like a `D' command but does not restart the loop).
+
+ The "sliding window" technique is a very powerful way to write
+efficient and complex `sed' scripts, because commands like `P' would
+require a lot of work if implemented manually.
+
+ To introduce the technique, which is fully demonstrated in the rest
+of this chapter and is based on the `N', `P' and `D' commands, here is
+an implementation of `tail' using a simple "sliding window."
+
+ This looks complicated but in fact the working is the same as the
+last script: after we have kicked in the appropriate number of lines,
+however, we stop using the hold space to keep inter-line state, and
+instead use `N' and `D' to slide pattern space by one line:
+
+ #!/usr/bin/sed -f
+
+ 1h
+ 2,10 {; H; g; }
+ $q
+ 1,9d
+ N
+ D
+
+ Note how the first, second and fourth line are inactive after the
+first ten lines of input. After that, all the script does is: exiting
+on the last line of input, appending the next input line to pattern
+space, and removing the first line.
+
+
+File: sed.info, Node: uniq, Next: uniq -d, Prev: tail, Up: Examples
+
+4.14 Make Duplicate Lines Unique
+================================
+
+This is an example of the art of using the `N', `P' and `D' commands,
+probably the most difficult to master.
+
+ #!/usr/bin/sed -f
+ h
+
+ :b
+ # On the last line, print and exit
+ $b
+ N
+ /^\(.*\)\n\1$/ {
+ # The two lines are identical. Undo the effect of
+ # the n command.
+ g
+ bb
+ }
+
+ # If the `N' command had added the last line, print and exit
+ $b
+
+ # The lines are different; print the first and go
+ # back working on the second.
+ P
+ D
+
+ As you can see, we mantain a 2-line window using `P' and `D'. This
+technique is often used in advanced `sed' scripts.
+
+
+File: sed.info, Node: uniq -d, Next: uniq -u, Prev: uniq, Up: Examples
+
+4.15 Print Duplicated Lines of Input
+====================================
+
+This script prints only duplicated lines, like `uniq -d'.
+
+ #!/usr/bin/sed -nf
+
+ $b
+ N
+ /^\(.*\)\n\1$/ {
+ # Print the first of the duplicated lines
+ s/.*\n//
+ p
+
+ # Loop until we get a different line
+ :b
+ $b
+ N
+ /^\(.*\)\n\1$/ {
+ s/.*\n//
+ bb
+ }
+ }
+
+ # The last line cannot be followed by duplicates
+ $b
+
+ # Found a different one. Leave it alone in the pattern space
+ # and go back to the top, hunting its duplicates
+ D
+
+
+File: sed.info, Node: uniq -u, Next: cat -s, Prev: uniq -d, Up: Examples
+
+4.16 Remove All Duplicated Lines
+================================
+
+This script prints only unique lines, like `uniq -u'.
+
+ #!/usr/bin/sed -f
+
+ # Search for a duplicate line --- until that, print what you find.
+ $b
+ N
+ /^\(.*\)\n\1$/ ! {
+ P
+ D
+ }
+
+ :c
+ # Got two equal lines in pattern space. At the
+ # end of the file we simply exit
+ $d
+
+ # Else, we keep reading lines with `N' until we
+ # find a different one
+ s/.*\n//
+ N
+ /^\(.*\)\n\1$/ {
+ bc
+ }
+
+ # Remove the last instance of the duplicate line
+ # and go back to the top
+ D
+
+
+File: sed.info, Node: cat -s, Prev: uniq -u, Up: Examples
+
+4.17 Squeezing Blank Lines
+==========================
+
+As a final example, here are three scripts, of increasing complexity
+and speed, that implement the same function as `cat -s', that is
+squeezing blank lines.
+
+ The first leaves a blank line at the beginning and end if there are
+some already.
+
+ #!/usr/bin/sed -f
+
+ # on empty lines, join with next
+ # Note there is a star in the regexp
+ :x
+ /^\n*$/ {
+ N
+ bx
+ }
+
+ # now, squeeze all '\n', this can be also done by:
+ # s/^\(\n\)*/\1/
+ s/\n*/\
+ /
+
+ This one is a bit more complex and removes all empty lines at the
+beginning. It does leave a single blank line at end if one was there.
+
+ #!/usr/bin/sed -f
+
+ # delete all leading empty lines
+ 1,/^./{
+ /./!d
+ }
+
+ # on an empty line we remove it and all the following
+ # empty lines, but one
+ :x
+ /./!{
+ N
+ s/^\n$//
+ tx
+ }
+
+ This removes leading and trailing blank lines. It is also the
+fastest. Note that loops are completely done with `n' and `b', without
+relying on `sed' to restart the the script automatically at the end of
+a line.
+
+ #!/usr/bin/sed -nf
+
+ # delete all (leading) blanks
+ /./!d
+
+ # get here: so there is a non empty
+ :x
+ # print it
+ p
+ # get next
+ n
+ # got chars? print it again, etc...
+ /./bx
+
+ # no, don't have chars: got an empty line
+ :z
+ # get next, if last line we finish here so no trailing
+ # empty lines are written
+ n
+ # also empty? then ignore it, and get next... this will
+ # remove ALL empty lines
+ /./!bz
+
+ # all empty lines were deleted/ignored, but we have a non empty. As
+ # what we want to do is to squeeze, insert a blank line artificially
+ i\
+
+ bx
+
+
+File: sed.info, Node: Limitations, Next: Other Resources, Prev: Examples, Up: Top
+
+5 GNU `sed''s Limitations and Non-limitations
+*********************************************
+
+For those who want to write portable `sed' scripts, be aware that some
+implementations have been known to limit line lengths (for the pattern
+and hold spaces) to be no more than 4000 bytes. The POSIX standard
+specifies that conforming `sed' implementations shall support at least
+8192 byte line lengths. GNU `sed' has no built-in limit on line length;
+as long as it can `malloc()' more (virtual) memory, you can feed or
+construct lines as long as you like.
+
+ However, recursion is used to handle subpatterns and indefinite
+repetition. This means that the available stack space may limit the
+size of the buffer that can be processed by certain patterns.
+
+
+File: sed.info, Node: Other Resources, Next: Reporting Bugs, Prev: Limitations, Up: Top
+
+6 Other Resources for Learning About `sed'
+******************************************
+
+In addition to several books that have been written about `sed' (either
+specifically or as chapters in books which discuss shell programming),
+one can find out more about `sed' (including suggestions of a few
+books) from the FAQ for the `sed-users' mailing list, available from:
+ `http://sed.sourceforge.net/sedfaq.html'
+
+ Also of interest are
+`http://www.student.northpark.edu/pemente/sed/index.htm' and
+`http://sed.sf.net/grabbag', which include `sed' tutorials and other
+`sed'-related goodies.
+
+ The `sed-users' mailing list itself maintained by Sven Guckes. To
+subscribe, visit `http://groups.yahoo.com' and search for the
+`sed-users' mailing list.
+
+
+File: sed.info, Node: Reporting Bugs, Next: Extended regexps, Prev: Other Resources, Up: Top
+
+7 Reporting Bugs
+****************
+
+Email bug reports to <bonzini@gnu.org>. Be sure to include the word
+"sed" somewhere in the `Subject:' field. Also, please include the
+output of `sed --version' in the body of your report if at all possible.
+
+ Please do not send a bug report like this:
+
+ while building frobme-1.3.4
+ $ configure
+ error--> sed: file sedscr line 1: Unknown option to 's'
+
+ If GNU `sed' doesn't configure your favorite package, take a few
+extra minutes to identify the specific problem and make a stand-alone
+test case. Unlike other programs such as C compilers, making such test
+cases for `sed' is quite simple.
+
+ A stand-alone test case includes all the data necessary to perform
+the test, and the specific invocation of `sed' that causes the problem.
+The smaller a stand-alone test case is, the better. A test case should
+not involve something as far removed from `sed' as "try to configure
+frobme-1.3.4". Yes, that is in principle enough information to look
+for the bug, but that is not a very practical prospect.
+
+ Here are a few commonly reported bugs that are not bugs.
+
+`N' command on the last line
+ Most versions of `sed' exit without printing anything when the `N'
+ command is issued on the last line of a file. GNU `sed' prints
+ pattern space before exiting unless of course the `-n' command
+ switch has been specified. This choice is by design.
+
+ For example, the behavior of
+ sed N foo bar
+ would depend on whether foo has an even or an odd number of
+ lines(1). Or, when writing a script to read the next few lines
+ following a pattern match, traditional implementations of `sed'
+ would force you to write something like
+ /foo/{ $!N; $!N; $!N; $!N; $!N; $!N; $!N; $!N; $!N }
+ instead of just
+ /foo/{ N;N;N;N;N;N;N;N;N; }
+
+ In any case, the simplest workaround is to use `$d;N' in scripts
+ that rely on the traditional behavior, or to set the
+ `POSIXLY_CORRECT' variable to a non-empty value.
+
+Regex syntax clashes (problems with backslashes)
+ `sed' uses the POSIX basic regular expression syntax. According to
+ the standard, the meaning of some escape sequences is undefined in
+ this syntax; notable in the case of `sed' are `\|', `\+', `\?',
+ `\`', `\'', `\<', `\>', `\b', `\B', `\w', and `\W'.
+
+ As in all GNU programs that use POSIX basic regular expressions,
+ `sed' interprets these escape sequences as special characters.
+ So, `x\+' matches one or more occurrences of `x'. `abc\|def'
+ matches either `abc' or `def'.
+
+ This syntax may cause problems when running scripts written for
+ other `sed's. Some `sed' programs have been written with the
+ assumption that `\|' and `\+' match the literal characters `|' and
+ `+'. Such scripts must be modified by removing the spurious
+ backslashes if they are to be used with modern implementations of
+ `sed', like GNU `sed'.
+
+ On the other hand, some scripts use s|abc\|def||g to remove
+ occurrences of _either_ `abc' or `def'. While this worked until
+ `sed' 4.0.x, newer versions interpret this as removing the string
+ `abc|def'. This is again undefined behavior according to POSIX,
+ and this interpretation is arguably more robust: older `sed's, for
+ example, required that the regex matcher parsed `\/' as `/' in the
+ common case of escaping a slash, which is again undefined
+ behavior; the new behavior avoids this, and this is good because
+ the regex matcher is only partially under our control.
+
+ In addition, this version of `sed' supports several escape
+ characters (some of which are multi-character) to insert
+ non-printable characters in scripts (`\a', `\c', `\d', `\o', `\r',
+ `\t', `\v', `\x'). These can cause similar problems with scripts
+ written for other `sed's.
+
+`-i' clobbers read-only files
+ In short, `sed -i' will let you delete the contents of a read-only
+ file, and in general the `-i' option (*note Invocation: Invoking
+ sed.) lets you clobber protected files. This is not a bug, but
+ rather a consequence of how the Unix filesystem works.
+
+ The permissions on a file say what can happen to the data in that
+ file, while the permissions on a directory say what can happen to
+ the list of files in that directory. `sed -i' will not ever open
+ for writing a file that is already on disk. Rather, it will work
+ on a temporary file that is finally renamed to the original name:
+ if you rename or delete files, you're actually modifying the
+ contents of the directory, so the operation depends on the
+ permissions of the directory, not of the file. For this same
+ reason, `sed' does not let you use `-i' on a writeable file in a
+ read-only directory, and will break hard or symbolic links when
+ `-i' is used on such a file.
+
+`0a' does not work (gives an error)
+ There is no line 0. 0 is a special address that is only used to
+ treat addresses like `0,/RE/' as active when the script starts: if
+ you write `1,/abc/d' and the first line includes the word `abc',
+ then that match would be ignored because address ranges must span
+ at least two lines (barring the end of the file); but what you
+ probably wanted is to delete every line up to the first one
+ including `abc', and this is obtained with `0,/abc/d'.
+
+`[a-z]' is case insensitive
+ You are encountering problems with locales. POSIX mandates that
+ `[a-z]' uses the current locale's collation order - in C parlance,
+ that means using `strcoll(3)' instead of `strcmp(3)'. Some
+ locales have a case-insensitive collation order, others don't.
+
+ Another problem is that `[a-z]' tries to use collation symbols.
+ This only happens if you are on the GNU system, using GNU libc's
+ regular expression matcher instead of compiling the one supplied
+ with GNU sed. In a Danish locale, for example, the regular
+ expression `^[a-z]$' matches the string `aa', because this is a
+ single collating symbol that comes after `a' and before `b'; `ll'
+ behaves similarly in Spanish locales, or `ij' in Dutch locales.
+
+ To work around these problems, which may cause bugs in shell
+ scripts, set the `LC_COLLATE' and `LC_CTYPE' environment variables
+ to `C'.
+
+`s/.*//' does not clear pattern space
+ This happens if your input stream includes invalid multibyte
+ sequences. POSIX mandates that such sequences are _not_ matched
+ by `.', so that `s/.*//' will not clear pattern space as you would
+ expect. In fact, there is no way to clear sed's buffers in the
+ middle of the script in most multibyte locales (including UTF-8
+ locales). For this reason, GNU `sed' provides a `z' command (for
+ `zap') as an extension.
+
+ To work around these problems, which may cause bugs in shell
+ scripts, set the `LC_COLLATE' and `LC_CTYPE' environment variables
+ to `C'.
+
+ ---------- Footnotes ----------
+
+ (1) which is the actual "bug" that prompted the change in behavior
+
+
+File: sed.info, Node: Extended regexps, Next: Concept Index, Prev: Reporting Bugs, Up: Top
+
+Appendix A Extended regular expressions
+***************************************
+
+The only difference between basic and extended regular expressions is in
+the behavior of a few characters: `?', `+', parentheses, and braces
+(`{}'). While basic regular expressions require these to be escaped if
+you want them to behave as special characters, when using extended
+regular expressions you must escape them if you want them _to match a
+literal character_.
+
+Examples:
+`abc?'
+ becomes `abc\?' when using extended regular expressions. It
+ matches the literal string `abc?'.
+
+`c\+'
+ becomes `c+' when using extended regular expressions. It matches
+ one or more `c's.
+
+`a\{3,\}'
+ becomes `a{3,}' when using extended regular expressions. It
+ matches three or more `a's.
+
+`\(abc\)\{2,3\}'
+ becomes `(abc){2,3}' when using extended regular expressions. It
+ matches either `abcabc' or `abcabcabc'.
+
+`\(abc*\)\1'
+ becomes `(abc*)\1' when using extended regular expressions.
+ Backreferences must still be escaped when using extended regular
+ expressions.
+
+
+File: sed.info, Node: Concept Index, Next: Command and Option Index, Prev: Extended regexps, Up: Top
+
+Concept Index
+*************
+
+This is a general index of all issues discussed in this manual, with the
+exception of the `sed' commands and command-line options.
+
+
+* Menu:
+
+* 0 address: Reporting Bugs. (line 103)
+* Additional reading about sed: Other Resources. (line 6)
+* ADDR1,+N: Addresses. (line 78)
+* ADDR1,~N: Addresses. (line 78)
+* Address, as a regular expression: Addresses. (line 27)
+* Address, last line: Addresses. (line 22)
+* Address, numeric: Addresses. (line 8)
+* Addresses, in sed scripts: Addresses. (line 6)
+* Append hold space to pattern space: Other Commands. (line 125)
+* Append next input line to pattern space: Other Commands. (line 105)
+* Append pattern space to hold space: Other Commands. (line 117)
+* Appending text after a line: Other Commands. (line 27)
+* Backreferences, in regular expressions: The "s" Command. (line 19)
+* Branch to a label, if s/// failed: Extended Commands. (line 63)
+* Branch to a label, if s/// succeeded: Programming Commands.
+ (line 22)
+* Branch to a label, unconditionally: Programming Commands.
+ (line 18)
+* Buffer spaces, pattern and hold: Execution Cycle. (line 6)
+* Bugs, reporting: Reporting Bugs. (line 6)
+* Case-insensitive matching: The "s" Command. (line 94)
+* Caveat -- #n on first line: Common Commands. (line 20)
+* Command groups: Common Commands. (line 50)
+* Comments, in scripts: Common Commands. (line 12)
+* Conditional branch <1>: Extended Commands. (line 63)
+* Conditional branch: Programming Commands.
+ (line 22)
+* Copy hold space into pattern space: Other Commands. (line 121)
+* Copy pattern space into hold space: Other Commands. (line 113)
+* Delete first line from pattern space: Other Commands. (line 99)
+* Disabling autoprint, from command line: Invoking sed. (line 34)
+* empty regular expression: Addresses. (line 31)
+* Emptying pattern space <1>: Reporting Bugs. (line 130)
+* Emptying pattern space: Extended Commands. (line 85)
+* Evaluate Bourne-shell commands: Extended Commands. (line 12)
+* Evaluate Bourne-shell commands, after substitution: The "s" Command.
+ (line 85)
+* Exchange hold space with pattern space: Other Commands. (line 129)
+* Excluding lines: Addresses. (line 101)
+* Extended regular expressions, choosing: Invoking sed. (line 113)
+* Extended regular expressions, syntax: Extended regexps. (line 6)
+* Files to be processed as input: Invoking sed. (line 141)
+* Flow of control in scripts: Programming Commands.
+ (line 11)
+* Global substitution: The "s" Command. (line 51)
+* GNU extensions, /dev/stderr file <1>: The "s" Command. (line 78)
+* GNU extensions, /dev/stderr file: Other Commands. (line 88)
+* GNU extensions, /dev/stdin file <1>: Extended Commands. (line 53)
+* GNU extensions, /dev/stdin file: Other Commands. (line 78)
+* GNU extensions, /dev/stdout file <1>: Invoking sed. (line 149)
+* GNU extensions, /dev/stdout file <2>: The "s" Command. (line 78)
+* GNU extensions, /dev/stdout file: Other Commands. (line 88)
+* GNU extensions, 0 address <1>: Reporting Bugs. (line 103)
+* GNU extensions, 0 address: Addresses. (line 78)
+* GNU extensions, 0,ADDR2 addressing: Addresses. (line 78)
+* GNU extensions, ADDR1,+N addressing: Addresses. (line 78)
+* GNU extensions, ADDR1,~N addressing: Addresses. (line 78)
+* GNU extensions, branch if s/// failed: Extended Commands. (line 63)
+* GNU extensions, case modifiers in s commands: The "s" Command.
+ (line 23)
+* GNU extensions, checking for their presence: Extended Commands.
+ (line 69)
+* GNU extensions, disabling: Invoking sed. (line 81)
+* GNU extensions, emptying pattern space <1>: Extended Commands.
+ (line 85)
+* GNU extensions, emptying pattern space: Reporting Bugs. (line 130)
+* GNU extensions, evaluating Bourne-shell commands <1>: Extended Commands.
+ (line 12)
+* GNU extensions, evaluating Bourne-shell commands: The "s" Command.
+ (line 85)
+* GNU extensions, extended regular expressions: Invoking sed. (line 113)
+* GNU extensions, g and NUMBER modifier interaction in s command: The "s" Command.
+ (line 57)
+* GNU extensions, I modifier <1>: Addresses. (line 49)
+* GNU extensions, I modifier: The "s" Command. (line 94)
+* GNU extensions, in-place editing <1>: Invoking sed. (line 51)
+* GNU extensions, in-place editing: Reporting Bugs. (line 85)
+* GNU extensions, L command: Extended Commands. (line 26)
+* GNU extensions, M modifier: The "s" Command. (line 99)
+* GNU extensions, modifiers and the empty regular expression: Addresses.
+ (line 31)
+* GNU extensions, N~M addresses: Addresses. (line 13)
+* GNU extensions, quitting silently: Extended Commands. (line 36)
+* GNU extensions, R command: Extended Commands. (line 53)
+* GNU extensions, reading a file a line at a time: Extended Commands.
+ (line 53)
+* GNU extensions, reformatting paragraphs: Extended Commands. (line 26)
+* GNU extensions, returning an exit code <1>: Extended Commands.
+ (line 36)
+* GNU extensions, returning an exit code: Common Commands. (line 30)
+* GNU extensions, setting line length: Other Commands. (line 65)
+* GNU extensions, special escapes <1>: Escapes. (line 6)
+* GNU extensions, special escapes: Reporting Bugs. (line 78)
+* GNU extensions, special two-address forms: Addresses. (line 78)
+* GNU extensions, subprocesses <1>: Extended Commands. (line 12)
+* GNU extensions, subprocesses: The "s" Command. (line 85)
+* GNU extensions, to basic regular expressions <1>: Regular Expressions.
+ (line 26)
+* GNU extensions, to basic regular expressions <2>: Reporting Bugs.
+ (line 51)
+* GNU extensions, to basic regular expressions: Regular Expressions.
+ (line 37)
+* GNU extensions, two addresses supported by most commands: Other Commands.
+ (line 25)
+* GNU extensions, unlimited line length: Limitations. (line 6)
+* GNU extensions, writing first line to a file: Extended Commands.
+ (line 80)
+* Goto, in scripts: Programming Commands.
+ (line 18)
+* Greedy regular expression matching: Regular Expressions. (line 143)
+* Grouping commands: Common Commands. (line 50)
+* Hold space, appending from pattern space: Other Commands. (line 117)
+* Hold space, appending to pattern space: Other Commands. (line 125)
+* Hold space, copy into pattern space: Other Commands. (line 121)
+* Hold space, copying pattern space into: Other Commands. (line 113)
+* Hold space, definition: Execution Cycle. (line 6)
+* Hold space, exchange with pattern space: Other Commands. (line 129)
+* In-place editing: Reporting Bugs. (line 85)
+* In-place editing, activating: Invoking sed. (line 51)
+* In-place editing, Perl-style backup file names: Invoking sed.
+ (line 62)
+* Inserting text before a line: Other Commands. (line 46)
+* Labels, in scripts: Programming Commands.
+ (line 14)
+* Last line, selecting: Addresses. (line 22)
+* Line length, setting <1>: Invoking sed. (line 76)
+* Line length, setting: Other Commands. (line 65)
+* Line number, printing: Other Commands. (line 62)
+* Line selection: Addresses. (line 6)
+* Line, selecting by number: Addresses. (line 8)
+* Line, selecting by regular expression match: Addresses. (line 27)
+* Line, selecting last: Addresses. (line 22)
+* List pattern space: Other Commands. (line 65)
+* Mixing g and NUMBER modifiers in the s command: The "s" Command.
+ (line 57)
+* Next input line, append to pattern space: Other Commands. (line 105)
+* Next input line, replace pattern space with: Common Commands.
+ (line 44)
+* Non-bugs, 0 address: Reporting Bugs. (line 103)
+* Non-bugs, in-place editing: Reporting Bugs. (line 85)
+* Non-bugs, localization-related: Reporting Bugs. (line 130)
+* Non-bugs, N command on the last line: Reporting Bugs. (line 31)
+* Non-bugs, regex syntax clashes: Reporting Bugs. (line 51)
+* Parenthesized substrings: The "s" Command. (line 19)
+* Pattern space, definition: Execution Cycle. (line 6)
+* Perl-style regular expressions, multiline: Addresses. (line 54)
+* Portability, comments: Common Commands. (line 15)
+* Portability, line length limitations: Limitations. (line 6)
+* Portability, N command on the last line: Reporting Bugs. (line 31)
+* POSIXLY_CORRECT behavior, bracket expressions: Regular Expressions.
+ (line 105)
+* POSIXLY_CORRECT behavior, enabling: Invoking sed. (line 84)
+* POSIXLY_CORRECT behavior, escapes: Escapes. (line 11)
+* POSIXLY_CORRECT behavior, N command: Reporting Bugs. (line 46)
+* Print first line from pattern space: Other Commands. (line 110)
+* Printing line number: Other Commands. (line 62)
+* Printing text unambiguously: Other Commands. (line 65)
+* Quitting <1>: Common Commands. (line 30)
+* Quitting: Extended Commands. (line 36)
+* Range of lines: Addresses. (line 65)
+* Range with start address of zero: Addresses. (line 78)
+* Read next input line: Common Commands. (line 44)
+* Read text from a file <1>: Other Commands. (line 78)
+* Read text from a file: Extended Commands. (line 53)
+* Reformat pattern space: Extended Commands. (line 26)
+* Reformatting paragraphs: Extended Commands. (line 26)
+* Replace hold space with copy of pattern space: Other Commands.
+ (line 113)
+* Replace pattern space with copy of hold space: Other Commands.
+ (line 121)
+* Replacing all text matching regexp in a line: The "s" Command.
+ (line 51)
+* Replacing only Nth match of regexp in a line: The "s" Command.
+ (line 55)
+* Replacing selected lines with other text: Other Commands. (line 52)
+* Requiring GNU sed: Extended Commands. (line 69)
+* Script structure: sed Programs. (line 6)
+* Script, from a file: Invoking sed. (line 46)
+* Script, from command line: Invoking sed. (line 41)
+* sed program structure: sed Programs. (line 6)
+* Selecting lines to process: Addresses. (line 6)
+* Selecting non-matching lines: Addresses. (line 101)
+* Several lines, selecting: Addresses. (line 65)
+* Slash character, in regular expressions: Addresses. (line 41)
+* Spaces, pattern and hold: Execution Cycle. (line 6)
+* Special addressing forms: Addresses. (line 78)
+* Standard input, processing as input: Invoking sed. (line 143)
+* Stream editor: Introduction. (line 6)
+* Subprocesses <1>: Extended Commands. (line 12)
+* Subprocesses: The "s" Command. (line 85)
+* Substitution of text, options: The "s" Command. (line 47)
+* Text, appending: Other Commands. (line 27)
+* Text, deleting: Common Commands. (line 36)
+* Text, insertion: Other Commands. (line 46)
+* Text, printing: Common Commands. (line 39)
+* Text, printing after substitution: The "s" Command. (line 65)
+* Text, writing to a file after substitution: The "s" Command.
+ (line 78)
+* Transliteration: Other Commands. (line 14)
+* Unbuffered I/O, choosing: Invoking sed. (line 131)
+* Usage summary, printing: Invoking sed. (line 28)
+* Version, printing: Invoking sed. (line 24)
+* Working on separate files: Invoking sed. (line 121)
+* Write first line to a file: Extended Commands. (line 80)
+* Write to a file: Other Commands. (line 88)
+* Zero, as range start address: Addresses. (line 78)
+
+
+File: sed.info, Node: Command and Option Index, Prev: Concept Index, Up: Top
+
+Command and Option Index
+************************
+
+This is an alphabetical list of all `sed' commands and command-line
+options.
+
+
+* Menu:
+
+* # (comments): Common Commands. (line 12)
+* --binary: Invoking sed. (line 93)
+* --expression: Invoking sed. (line 41)
+* --file: Invoking sed. (line 46)
+* --follow-symlinks: Invoking sed. (line 104)
+* --help: Invoking sed. (line 28)
+* --in-place: Invoking sed. (line 51)
+* --line-length: Invoking sed. (line 76)
+* --quiet: Invoking sed. (line 34)
+* --regexp-extended: Invoking sed. (line 113)
+* --silent: Invoking sed. (line 34)
+* --unbuffered: Invoking sed. (line 131)
+* --version: Invoking sed. (line 24)
+* -b: Invoking sed. (line 93)
+* -e: Invoking sed. (line 41)
+* -f: Invoking sed. (line 46)
+* -i: Invoking sed. (line 51)
+* -l: Invoking sed. (line 76)
+* -n: Invoking sed. (line 34)
+* -n, forcing from within a script: Common Commands. (line 20)
+* -r: Invoking sed. (line 113)
+* -u: Invoking sed. (line 131)
+* : (label) command: Programming Commands.
+ (line 14)
+* = (print line number) command: Other Commands. (line 62)
+* a (append text lines) command: Other Commands. (line 27)
+* b (branch) command: Programming Commands.
+ (line 18)
+* c (change to text lines) command: Other Commands. (line 52)
+* D (delete first line) command: Other Commands. (line 99)
+* d (delete) command: Common Commands. (line 36)
+* e (evaluate) command: Extended Commands. (line 12)
+* G (appending Get) command: Other Commands. (line 125)
+* g (get) command: Other Commands. (line 121)
+* H (append Hold) command: Other Commands. (line 117)
+* h (hold) command: Other Commands. (line 113)
+* i (insert text lines) command: Other Commands. (line 46)
+* L (fLow paragraphs) command: Extended Commands. (line 26)
+* l (list unambiguously) command: Other Commands. (line 65)
+* N (append Next line) command: Other Commands. (line 105)
+* n (next-line) command: Common Commands. (line 44)
+* P (print first line) command: Other Commands. (line 110)
+* p (print) command: Common Commands. (line 39)
+* q (quit) command: Common Commands. (line 30)
+* Q (silent Quit) command: Extended Commands. (line 36)
+* r (read file) command: Other Commands. (line 78)
+* R (read line) command: Extended Commands. (line 53)
+* s command, option flags: The "s" Command. (line 47)
+* T (test and branch if failed) command: Extended Commands. (line 63)
+* t (test and branch if successful) command: Programming Commands.
+ (line 22)
+* v (version) command: Extended Commands. (line 69)
+* w (write file) command: Other Commands. (line 88)
+* W (write first line) command: Extended Commands. (line 80)
+* x (eXchange) command: Other Commands. (line 129)
+* y (transliterate) command: Other Commands. (line 14)
+* z (Zap) command: Extended Commands. (line 85)
+* {} command grouping: Common Commands. (line 50)
+
+

Tag Table:
-(Indirect)
-Node: Top935
-Node: Introduction3816
-Node: Invoking sed4370
-Ref: Invoking sed-Footnote-19396
-Ref: Invoking sed-Footnote-29588
-Node: sed Programs9691
-Node: Execution Cycle10838
-Ref: Execution Cycle-Footnote-112011
-Node: Addresses12322
-Node: Regular Expressions17061
-Node: Common Commands24610
-Node: The "s" Command26608
-Ref: The "s" Command-Footnote-130940
-Node: Other Commands31012
-Ref: Other Commands-Footnote-136149
-Node: Programming Commands36221
-Node: Extended Commands37130
-Node: Escapes40705
-Ref: Escapes-Footnote-143711
-Node: Examples43902
-Node: Centering lines44997
-Node: Increment a number45909
-Ref: Increment a number-Footnote-147489
-Node: Rename files to lower case47609
-Node: Print bash environment50405
-Node: Reverse chars of lines51185
-Ref: Reverse chars of lines-Footnote-152202
-Node: tac52424
-Node: cat -n53206
-Node: cat -b55063
-Node: wc -c55815
-Ref: wc -c-Footnote-157748
-Node: wc -w57817
-Node: wc -l59289
-Node: head59526
-Node: tail59850
-Node: uniq61534
-Node: uniq -d62330
-Node: uniq -u63054
-Node: cat -s63778
-Node: Limitations65667
-Node: Other Resources66507
-Node: Reporting Bugs67433
-Ref: Reporting Bugs-Footnote-173962
-Node: Extended regexps74033
-Node: Concept Index75200
-Node: Command and Option Index85215
+Node: Top937
+Node: Introduction3858
+Node: Invoking sed4412
+Ref: Invoking sed-Footnote-110503
+Ref: Invoking sed-Footnote-210695
+Node: sed Programs10794
+Node: Execution Cycle11942
+Ref: Execution Cycle-Footnote-113120
+Node: Addresses13421
+Node: Regular Expressions18165
+Node: Common Commands26073
+Node: The "s" Command28076
+Ref: The "s" Command-Footnote-132413
+Node: Other Commands32485
+Ref: Other Commands-Footnote-137627
+Node: Programming Commands37699
+Node: Extended Commands38613
+Node: Escapes42621
+Ref: Escapes-Footnote-145632
+Node: Examples45823
+Node: Centering lines46919
+Node: Increment a number47811
+Ref: Increment a number-Footnote-149371
+Node: Rename files to lower case49491
+Node: Print bash environment52194
+Node: Reverse chars of lines52949
+Ref: Reverse chars of lines-Footnote-153950
+Node: tac54167
+Node: cat -n54934
+Node: cat -b56756
+Node: wc -c57503
+Ref: wc -c-Footnote-159411
+Node: wc -w59480
+Node: wc -l60944
+Node: head61188
+Node: tail61519
+Node: uniq63200
+Node: uniq -d63988
+Node: uniq -u64699
+Node: cat -s65410
+Node: Limitations67261
+Node: Other Resources68102
+Node: Reporting Bugs68947
+Ref: Reporting Bugs-Footnote-176083
+Node: Extended regexps76154
+Node: Concept Index77340
+Node: Command and Option Index92500

End Tag Table
diff --git a/doc/sed.info-1 b/doc/sed.info-1
deleted file mode 100644
index dce6cf1..0000000
--- a/doc/sed.info-1
+++ /dev/null
@@ -1,1353 +0,0 @@
-This is ../../doc/sed.info, produced by makeinfo version 4.5 from
-../../doc/sed.texi.
-
-INFO-DIR-SECTION Text creation and manipulation
-START-INFO-DIR-ENTRY
-* sed: (sed). Stream EDitor.
-
-END-INFO-DIR-ENTRY
-
-This file documents version 4.1.5 of GNU `sed', a stream editor.
-
- Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software
-Foundation, Inc.
-
- This document is released under the terms of the GNU Free
-Documentation License as published by the Free Software Foundation;
-either version 1.1, or (at your option) any later version.
-
- You should have received a copy of the GNU Free Documentation
-License along with GNU `sed'; see the file `COPYING.DOC'. If not,
-write to the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02110-1301, USA.
-
- There are no Cover Texts and no Invariant Sections; this text, along
-with its equivalent in the printed manual, constitutes the Title Page.
-
-File: sed.info, Node: Top, Next: Introduction, Up: (dir)
-
-
-
-This file documents version 4.1.5 of GNU `sed', a stream editor.
-
- Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software
-Foundation, Inc.
-
- This document is released under the terms of the GNU Free
-Documentation License as published by the Free Software Foundation;
-either version 1.1, or (at your option) any later version.
-
- You should have received a copy of the GNU Free Documentation
-License along with GNU `sed'; see the file `COPYING.DOC'. If not,
-write to the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02110-1301, USA.
-
- There are no Cover Texts and no Invariant Sections; this text, along
-with its equivalent in the printed manual, constitutes the Title Page.
-* Menu:
-
-* Introduction:: Introduction
-* Invoking sed:: Invocation
-* sed Programs:: `sed' programs
-* Examples:: Some sample scripts
-* Limitations:: Limitations and (non-)limitations of GNU `sed'
-* Other Resources:: Other resources for learning about `sed'
-* Reporting Bugs:: Reporting bugs
-
-* Extended regexps:: `egrep'-style regular expressions
-
-* Concept Index:: A menu with all the topics in this manual.
-* Command and Option Index:: A menu with all `sed' commands and
- command-line options.
-
---- The detailed node listing ---
-
-sed Programs:
-* Execution Cycle:: How `sed' works
-* Addresses:: Selecting lines with `sed'
-* Regular Expressions:: Overview of regular expression syntax
-* Common Commands:: Often used commands
-* The "s" Command:: `sed''s Swiss Army Knife
-* Other Commands:: Less frequently used commands
-* Programming Commands:: Commands for `sed' gurus
-* Extended Commands:: Commands specific of GNU `sed'
-* Escapes:: Specifying special characters
-
-Examples:
-* Centering lines::
-* Increment a number::
-* Rename files to lower case::
-* Print bash environment::
-* Reverse chars of lines::
-* tac:: Reverse lines of files
-* cat -n:: Numbering lines
-* cat -b:: Numbering non-blank lines
-* wc -c:: Counting chars
-* wc -w:: Counting words
-* wc -l:: Counting lines
-* head:: Printing the first lines
-* tail:: Printing the last lines
-* uniq:: Make duplicate lines unique
-* uniq -d:: Print duplicated lines of input
-* uniq -u:: Remove all duplicated lines
-* cat -s:: Squeezing blank lines
-
-
-File: sed.info, Node: Introduction, Next: Invoking sed, Prev: Top, Up: Top
-
-Introduction
-************
-
- `sed' is a stream editor. A stream editor is used to perform basic
-text transformations on an input stream (a file or input from a
-pipeline). While in some ways similar to an editor which permits
-scripted edits (such as `ed'), `sed' works by making only one pass over
-the input(s), and is consequently more efficient. But it is `sed''s
-ability to filter text in a pipeline which particularly distinguishes
-it from other types of editors.
-
-
-File: sed.info, Node: Invoking sed, Next: sed Programs, Prev: Introduction, Up: Top
-
-Invocation
-**********
-
- Normally `sed' is invoked like this:
-
- sed SCRIPT INPUTFILE...
-
- The full format for invoking `sed' is:
-
- sed OPTIONS... [SCRIPT] [INPUTFILE...]
-
- If you do not specify INPUTFILE, or if INPUTFILE is `-', `sed'
-filters the contents of the standard input. The SCRIPT is actually the
-first non-option parameter, which `sed' specially considers a script
-and not an input file if (and only if) none of the other OPTIONS
-specifies a script to be executed, that is if neither of the `-e' and
-`-f' options is specified.
-
- `sed' may be invoked with the following command-line options:
-
-`--version'
- Print out the version of `sed' that is being run and a copyright
- notice, then exit.
-
-`--help'
- Print a usage message briefly summarizing these command-line
- options and the bug-reporting address, then exit.
-
-`-n'
-`--quiet'
-`--silent'
- By default, `sed' prints out the pattern space at the end of each
- cycle through the script. These options disable this automatic
- printing, and `sed' only produces output when explicitly told to
- via the `p' command.
-
-`-i[SUFFIX]'
-`--in-place[=SUFFIX]'
- This option specifies that files are to be edited in-place. GNU
- `sed' does this by creating a temporary file and sending output to
- this file rather than to the standard output.(1).
-
- This option implies `-s'.
-
- When the end of the file is reached, the temporary file is renamed
- to the output file's original name. The extension, if supplied,
- is used to modify the name of the old file before renaming the
- temporary file, thereby making a backup copy(2)).
-
- This rule is followed: if the extension doesn't contain a `*',
- then it is appended to the end of the current filename as a
- suffix; if the extension does contain one or more `*' characters,
- then _each_ asterisk is replaced with the current filename. This
- allows you to add a prefix to the backup file, instead of (or in
- addition to) a suffix, or even to place backup copies of the
- original files into another directory (provided the directory
- already exists).
-
- If no extension is supplied, the original file is overwritten
- without making a backup.
-
-`-l N'
-`--line-length=N'
- Specify the default line-wrap length for the `l' command. A
- length of 0 (zero) means to never wrap long lines. If not
- specified, it is taken to be 70.
-
-`--posix'
- GNU `sed' includes several extensions to POSIX sed. In order to
- simplify writing portable scripts, this option disables all the
- extensions that this manual documents, including additional
- commands. Most of the extensions accept `sed' programs that are
- outside the syntax mandated by POSIX, but some of them (such as
- the behavior of the `N' command described in *note Reporting
- Bugs::) actually violate the standard. If you want to disable
- only the latter kind of extension, you can set the
- `POSIXLY_CORRECT' variable to a non-empty value.
-
-`-r'
-`--regexp-extended'
- Use extended regular expressions rather than basic regular
- expressions. Extended regexps are those that `egrep' accepts;
- they can be clearer because they usually have less backslashes,
- but are a GNU extension and hence scripts that use them are not
- portable. *Note Extended regular expressions: Extended regexps.
-
-`-s'
-`--separate'
- By default, `sed' will consider the files specified on the command
- line as a single continuous long stream. This GNU `sed' extension
- allows the user to consider them as separate files: range
- addresses (such as `/abc/,/def/') are not allowed to span several
- files, line numbers are relative to the start of each file, `$'
- refers to the last line of each file, and files invoked from the
- `R' commands are rewound at the start of each file.
-
-`-u'
-`--unbuffered'
- Buffer both input and output as minimally as practical. (This is
- particularly useful if the input is coming from the likes of `tail
- -f', and you wish to see the transformed output as soon as
- possible.)
-
-`-e SCRIPT'
-`--expression=SCRIPT'
- Add the commands in SCRIPT to the set of commands to be run while
- processing the input.
-
-`-f SCRIPT-FILE'
-`--file=SCRIPT-FILE'
- Add the commands contained in the file SCRIPT-FILE to the set of
- commands to be run while processing the input.
-
-
- If no `-e', `-f', `--expression', or `--file' options are given on
-the command-line, then the first non-option argument on the command
-line is taken to be the SCRIPT to be executed.
-
- If any command-line parameters remain after processing the above,
-these parameters are interpreted as the names of input files to be
-processed. A file name of `-' refers to the standard input stream.
-The standard input will be processed if no file names are specified.
-
- ---------- Footnotes ----------
-
- (1) This applies to commands such as `=', `a', `c', `i', `l', `p'.
-You can still write to the standard output by using the `w' or `W'
-commands together with the `/dev/stdout' special file
-
- (2) Note that GNU `sed' creates the backup file whether or not
-any output is actually changed.
-
-
-File: sed.info, Node: sed Programs, Next: Examples, Prev: Invoking sed, Up: Top
-
-`sed' Programs
-**************
-
- A `sed' program consists of one or more `sed' commands, passed in by
-one or more of the `-e', `-f', `--expression', and `--file' options, or
-the first non-option argument if zero of these options are used. This
-document will refer to "the" `sed' script; this is understood to mean
-the in-order catenation of all of the SCRIPTs and SCRIPT-FILEs passed
-in.
-
- Each `sed' command consists of an optional address or address range,
-followed by a one-character command name and any additional
-command-specific code.
-
-* Menu:
-
-* Execution Cycle:: How `sed' works
-* Addresses:: Selecting lines with `sed'
-* Regular Expressions:: Overview of regular expression syntax
-* Common Commands:: Often used commands
-* The "s" Command:: `sed''s Swiss Army Knife
-* Other Commands:: Less frequently used commands
-* Programming Commands:: Commands for `sed' gurus
-* Extended Commands:: Commands specific of GNU `sed'
-* Escapes:: Specifying special characters
-
-
-File: sed.info, Node: Execution Cycle, Next: Addresses, Up: sed Programs
-
-How `sed' Works
-===============
-
- `sed' maintains two data buffers: the active _pattern_ space, and
-the auxiliary _hold_ space. Both are initially empty.
-
- `sed' operates by performing the following cycle on each lines of
-input: first, `sed' reads one line from the input stream, removes any
-trailing newline, and places it in the pattern space. Then commands
-are executed; each command can have an address associated to it:
-addresses are a kind of condition code, and a command is only executed
-if the condition is verified before the command is to be executed.
-
- When the end of the script is reached, unless the `-n' option is in
-use, the contents of pattern space are printed out to the output
-stream, adding back the trailing newline if it was removed.(1) Then the
-next cycle starts for the next input line.
-
- Unless special commands (like `D') are used, the pattern space is
-deleted between two cycles. The hold space, on the other hand, keeps
-its data between cycles (see commands `h', `H', `x', `g', `G' to move
-data between both buffers).
-
- ---------- Footnotes ----------
-
- (1) Actually, if `sed' prints a line without the terminating
-newline, it will nevertheless print the missing newline as soon as
-more text is sent to the same output stream, which gives the "least
-expected surprise" even though it does not make commands like `sed -n
-p' exactly identical to `cat'.
-
-
-File: sed.info, Node: Addresses, Next: Regular Expressions, Prev: Execution Cycle, Up: sed Programs
-
-Selecting lines with `sed'
-==========================
-
- Addresses in a `sed' script can be in any of the following forms:
-`NUMBER'
- Specifying a line number will match only that line in the input.
- (Note that `sed' counts lines continuously across all input files
- unless `-i' or `-s' options are specified.)
-
-`FIRST~STEP'
- This GNU extension matches every STEPth line starting with line
- FIRST. In particular, lines will be selected when there exists a
- non-negative N such that the current line-number equals FIRST + (N
- * STEP). Thus, to select the odd-numbered lines, one would use
- `1~2'; to pick every third line starting with the second, `2~3'
- would be used; to pick every fifth line starting with the tenth,
- use `10~5'; and `50~0' is just an obscure way of saying `50'.
-
-`$'
- This address matches the last line of the last file of input, or
- the last line of each file when the `-i' or `-s' options are
- specified.
-
-`/REGEXP/'
- This will select any line which matches the regular expression
- REGEXP. If REGEXP itself includes any `/' characters, each must
- be escaped by a backslash (`\').
-
- The empty regular expression `//' repeats the last regular
- expression match (the same holds if the empty regular expression is
- passed to the `s' command). Note that modifiers to regular
- expressions are evaluated when the regular expression is compiled,
- thus it is invalid to specify them together with the empty regular
- expression.
-
-`\%REGEXP%'
- (The `%' may be replaced by any other single character.)
-
- This also matches the regular expression REGEXP, but allows one to
- use a different delimiter than `/'. This is particularly useful
- if the REGEXP itself contains a lot of slashes, since it avoids
- the tedious escaping of every `/'. If REGEXP itself includes any
- delimiter characters, each must be escaped by a backslash (`\').
-
-`/REGEXP/I'
-`\%REGEXP%I'
- The `I' modifier to regular-expression matching is a GNU extension
- which causes the REGEXP to be matched in a case-insensitive manner.
-
-`/REGEXP/M'
-`\%REGEXP%M'
- The `M' modifier to regular-expression matching is a GNU `sed'
- extension which causes `^' and `$' to match respectively (in
- addition to the normal behavior) the empty string after a newline,
- and the empty string before a newline. There are special character
- sequences (`\`' and `\'') which always match the beginning or the
- end of the buffer. `M' stands for `multi-line'.
-
-
- If no addresses are given, then all lines are matched; if one
-address is given, then only lines matching that address are matched.
-
- An address range can be specified by specifying two addresses
-separated by a comma (`,'). An address range matches lines starting
-from where the first address matches, and continues until the second
-address matches (inclusively).
-
- If the second address is a REGEXP, then checking for the ending
-match will start with the line _following_ the line which matched the
-first address: a range will always span at least two lines (except of
-course if the input stream ends).
-
- If the second address is a NUMBER less than (or equal to) the line
-matching the first address, then only the one line is matched.
-
- GNU `sed' also supports some special two-address forms; all these
-are GNU extensions:
-`0,/REGEXP/'
- A line number of `0' can be used in an address specification like
- `0,/REGEXP/' so that `sed' will try to match REGEXP in the first
- input line too. In other words, `0,/REGEXP/' is similar to
- `1,/REGEXP/', except that if ADDR2 matches the very first line of
- input the `0,/REGEXP/' form will consider it to end the range,
- whereas the `1,/REGEXP/' form will match the beginning of its
- range and hence make the range span up to the _second_ occurrence
- of the regular expression.
-
- Note that this is the only place where the `0' address makes
- sense; there is no 0-th line and commands which are given the `0'
- address in any other way will give an error.
-
-`ADDR1,+N'
- Matches ADDR1 and the N lines following ADDR1.
-
-`ADDR1,~N'
- Matches ADDR1 and the lines following ADDR1 until the next line
- whose input line number is a multiple of N.
-
- Appending the `!' character to the end of an address specification
-negates the sense of the match. That is, if the `!' character follows
-an address range, then only lines which do _not_ match the address range
-will be selected. This also works for singleton addresses, and,
-perhaps perversely, for the null address.
-
-
-File: sed.info, Node: Regular Expressions, Next: Common Commands, Prev: Addresses, Up: sed Programs
-
-Overview of Regular Expression Syntax
-=====================================
-
- To know how to use `sed', people should understand regular
-expressions ("regexp" for short). A regular expression is a pattern
-that is matched against a subject string from left to right. Most
-characters are "ordinary": they stand for themselves in a pattern, and
-match the corresponding characters in the subject. As a trivial
-example, the pattern
-
- The quick brown fox
-
-matches a portion of a subject string that is identical to itself. The
-power of regular expressions comes from the ability to include
-alternatives and repetitions in the pattern. These are encoded in the
-pattern by the use of "special characters", which do not stand for
-themselves but instead are interpreted in some special way. Here is a
-brief description of regular expression syntax as used in `sed'.
-
-`CHAR'
- A single ordinary character matches itself.
-
-`*'
- Matches a sequence of zero or more instances of matches for the
- preceding regular expression, which must be an ordinary character,
- a special character preceded by `\', a `.', a grouped regexp (see
- below), or a bracket expression. As a GNU extension, a postfixed
- regular expression can also be followed by `*'; for example, `a**'
- is equivalent to `a*'. POSIX 1003.1-2001 says that `*' stands for
- itself when it appears at the start of a regular expression or
- subexpression, but many nonGNU implementations do not support this
- and portable scripts should instead use `\*' in these contexts.
-
-`\+'
- As `*', but matches one or more. It is a GNU extension.
-
-`\?'
- As `*', but only matches zero or one. It is a GNU extension.
-
-`\{I\}'
- As `*', but matches exactly I sequences (I is a decimal integer;
- for portability, keep it between 0 and 255 inclusive).
-
-`\{I,J\}'
- Matches between I and J, inclusive, sequences.
-
-`\{I,\}'
- Matches more than or equal to I sequences.
-
-`\(REGEXP\)'
- Groups the inner REGEXP as a whole, this is used to:
-
- * Apply postfix operators, like `\(abcd\)*': this will search
- for zero or more whole sequences of `abcd', while `abcd*'
- would search for `abc' followed by zero or more occurrences
- of `d'. Note that support for `\(abcd\)*' is required by
- POSIX 1003.1-2001, but many non-GNU implementations do not
- support it and hence it is not universally portable.
-
- * Use back references (see below).
-
-`.'
- Matches any character, including newline.
-
-`^'
- Matches the null string at beginning of line, i.e. what appears
- after the circumflex must appear at the beginning of line.
- `^#include' will match only lines where `#include' is the first
- thing on line--if there are spaces before, for example, the match
- fails. `^' acts as a special character only at the beginning of
- the regular expression or subexpression (that is, after `\(' or
- `\|'). Portable scripts should avoid `^' at the beginning of a
- subexpression, though, as POSIX allows implementations that treat
- `^' as an ordinary character in that context.
-
-`$'
- It is the same as `^', but refers to end of line. `$' also acts
- as a special character only at the end of the regular expression
- or subexpression (that is, before `\)' or `\|'), and its use at
- the end of a subexpression is not portable.
-
-`[LIST]'
-`[^LIST]'
- Matches any single character in LIST: for example, `[aeiou]'
- matches all vowels. A list may include sequences like
- `CHAR1-CHAR2', which matches any character between (inclusive)
- CHAR1 and CHAR2.
-
- A leading `^' reverses the meaning of LIST, so that it matches any
- single character _not_ in LIST. To include `]' in the list, make
- it the first character (after the `^' if needed), to include `-'
- in the list, make it the first or last; to include `^' put it
- after the first character.
-
- The characters `$', `*', `.', `[', and `\' are normally not
- special within LIST. For example, `[\*]' matches either `\' or
- `*', because the `\' is not special here. However, strings like
- `[.ch.]', `[=a=]', and `[:space:]' are special within LIST and
- represent collating symbols, equivalence classes, and character
- classes, respectively, and `[' is therefore special within LIST
- when it is followed by `.', `=', or `:'. Also, when not in
- `POSIXLY_CORRECT' mode, special escapes like `\n' and `\t' are
- recognized within LIST. *Note Escapes::.
-
-`REGEXP1\|REGEXP2'
- Matches either REGEXP1 or REGEXP2. Use parentheses to use complex
- alternative regular expressions. The matching process tries each
- alternative in turn, from left to right, and the first one that
- succeeds is used. It is a GNU extension.
-
-`REGEXP1REGEXP2'
- Matches the concatenation of REGEXP1 and REGEXP2. Concatenation
- binds more tightly than `\|', `^', and `$', but less tightly than
- the other regular expression operators.
-
-`\DIGIT'
- Matches the DIGIT-th `\(...\)' parenthesized subexpression in the
- regular expression. This is called a "back reference".
- Subexpressions are implicity numbered by counting occurrences of
- `\(' left-to-right.
-
-`\n'
- Matches the newline character.
-
-`\CHAR'
- Matches CHAR, where CHAR is one of `$', `*', `.', `[', `\', or `^'.
- Note that the only C-like backslash sequences that you can
- portably assume to be interpreted are `\n' and `\\'; in particular
- `\t' is not portable, and matches a `t' under most implementations
- of `sed', rather than a tab character.
-
-
- Note that the regular expression matcher is greedy, i.e., matches
-are attempted from left to right and, if two or more matches are
-possible starting at the same character, it selects the longest.
-
-Examples:
-`abcdef'
- Matches `abcdef'.
-
-`a*b'
- Matches zero or more `a's followed by a single `b'. For example,
- `b' or `aaaaab'.
-
-`a\?b'
- Matches `b' or `ab'.
-
-`a\+b\+'
- Matches one or more `a's followed by one or more `b's: `ab' is the
- shortest possible match, but other examples are `aaaab' or
- `abbbbb' or `aaaaaabbbbbbb'.
-
-`.*'
-`.\+'
- These two both match all the characters in a string; however, the
- first matches every string (including the empty string), while the
- second matches only strings containing at least one character.
-
-`^main.*(.*)'
- his matches a string starting with `main', followed by an opening
- and closing parenthesis. The `n', `(' and `)' need not be
- adjacent.
-
-`^#'
- This matches a string beginning with `#'.
-
-`\\$'
- This matches a string ending with a single backslash. The regexp
- contains two backslashes for escaping.
-
-`\$'
- Instead, this matches a string consisting of a single dollar sign,
- because it is escaped.
-
-`[a-zA-Z0-9]'
- In the C locale, this matches any ASCII letters or digits.
-
-`[^ tab]\+'
- (Here `tab' stands for a single tab character.) This matches a
- string of one or more characters, none of which is a space or a
- tab. Usually this means a word.
-
-`^\(.*\)\n\1$'
- This matches a string consisting of two equal substrings separated
- by a newline.
-
-`.\{9\}A$'
- This matches nine characters followed by an `A'.
-
-`^.\{15\}A'
- This matches the start of a string that contains 16 characters,
- the last of which is an `A'.
-
-
-
-File: sed.info, Node: Common Commands, Next: The "s" Command, Prev: Regular Expressions, Up: sed Programs
-
-Often-Used Commands
-===================
-
- If you use `sed' at all, you will quite likely want to know these
-commands.
-
-`#'
- [No addresses allowed.]
-
- The `#' character begins a comment; the comment continues until
- the next newline.
-
- If you are concerned about portability, be aware that some
- implementations of `sed' (which are not POSIX conformant) may only
- support a single one-line comment, and then only when the very
- first character of the script is a `#'.
-
- Warning: if the first two characters of the `sed' script are `#n',
- then the `-n' (no-autoprint) option is forced. If you want to put
- a comment in the first line of your script and that comment begins
- with the letter `n' and you do not want this behavior, then be
- sure to either use a capital `N', or place at least one space
- before the `n'.
-
-`q [EXIT-CODE]'
- This command only accepts a single address.
-
- Exit `sed' without processing any more commands or input. Note
- that the current pattern space is printed if auto-print is not
- disabled with the `-n' options. The ability to return an exit
- code from the `sed' script is a GNU `sed' extension.
-
-`d'
- Delete the pattern space; immediately start next cycle.
-
-`p'
- Print out the pattern space (to the standard output). This
- command is usually only used in conjunction with the `-n'
- command-line option.
-
-`n'
- If auto-print is not disabled, print the pattern space, then,
- regardless, replace the pattern space with the next line of input.
- If there is no more input then `sed' exits without processing any
- more commands.
-
-`{ COMMANDS }'
- A group of commands may be enclosed between `{' and `}' characters.
- This is particularly useful when you want a group of commands to
- be triggered by a single address (or address-range) match.
-
-
-
-File: sed.info, Node: The "s" Command, Next: Other Commands, Prev: Common Commands, Up: sed Programs
-
-The `s' Command
-===============
-
- The syntax of the `s' (as in substitute) command is
-`s/REGEXP/REPLACEMENT/FLAGS'. The `/' characters may be uniformly
-replaced by any other single character within any given `s' command.
-The `/' character (or whatever other character is used in its stead)
-can appear in the REGEXP or REPLACEMENT only if it is preceded by a `\'
-character.
-
- The `s' command is probably the most important in `sed' and has a
-lot of different options. Its basic concept is simple: the `s' command
-attempts to match the pattern space against the supplied REGEXP; if the
-match is successful, then that portion of the pattern space which was
-matched is replaced with REPLACEMENT.
-
- The REPLACEMENT can contain `\N' (N being a number from 1 to 9,
-inclusive) references, which refer to the portion of the match which is
-contained between the Nth `\(' and its matching `\)'. Also, the
-REPLACEMENT can contain unescaped `&' characters which reference the
-whole matched portion of the pattern space. Finally, as a GNU `sed'
-extension, you can include a special sequence made of a backslash and
-one of the letters `L', `l', `U', `u', or `E'. The meaning is as
-follows:
-
-`\L'
- Turn the replacement to lowercase until a `\U' or `\E' is found,
-
-`\l'
- Turn the next character to lowercase,
-
-`\U'
- Turn the replacement to uppercase until a `\L' or `\E' is found,
-
-`\u'
- Turn the next character to uppercase,
-
-`\E'
- Stop case conversion started by `\L' or `\U'.
-
- To include a literal `\', `&', or newline in the final replacement,
-be sure to precede the desired `\', `&', or newline in the REPLACEMENT
-with a `\'.
-
- The `s' command can be followed by zero or more of the following
-FLAGS:
-
-`g'
- Apply the replacement to _all_ matches to the REGEXP, not just the
- first.
-
-`NUMBER'
- Only replace the NUMBERth match of the REGEXP.
-
- Note: the POSIX standard does not specify what should happen when
- you mix the `g' and NUMBER modifiers, and currently there is no
- widely agreed upon meaning across `sed' implementations. For GNU
- `sed', the interaction is defined to be: ignore matches before the
- NUMBERth, and then match and replace all matches from the NUMBERth
- on.
-
-`p'
- If the substitution was made, then print the new pattern space.
-
- Note: when both the `p' and `e' options are specified, the
- relative ordering of the two produces very different results. In
- general, `ep' (evaluate then print) is what you want, but
- operating the other way round can be useful for debugging. For
- this reason, the current version of GNU `sed' interprets specially
- the presence of `p' options both before and after `e', printing
- the pattern space before and after evaluation, while in general
- flags for the `s' command show their effect just once. This
- behavior, although documented, might change in future versions.
-
-`w FILE-NAME'
- If the substitution was made, then write out the result to the
- named file. As a GNU `sed' extension, two special values of
- FILE-NAME are supported: `/dev/stderr', which writes the result to
- the standard error, and `/dev/stdout', which writes to the standard
- output.(1)
-
-`e'
- This command allows one to pipe input from a shell command into
- pattern space. If a substitution was made, the command that is
- found in pattern space is executed and pattern space is replaced
- with its output. A trailing newline is suppressed; results are
- undefined if the command to be executed contains a NUL character.
- This is a GNU `sed' extension.
-
-`I'
-`i'
- The `I' modifier to regular-expression matching is a GNU extension
- which makes `sed' match REGEXP in a case-insensitive manner.
-
-`M'
-`m'
- The `M' modifier to regular-expression matching is a GNU `sed'
- extension which causes `^' and `$' to match respectively (in
- addition to the normal behavior) the empty string after a newline,
- and the empty string before a newline. There are special character
- sequences (`\`' and `\'') which always match the beginning or the
- end of the buffer. `M' stands for `multi-line'.
-
-
- ---------- Footnotes ----------
-
- (1) This is equivalent to `p' unless the `-i' option is being used.
-
-
-File: sed.info, Node: Other Commands, Next: Programming Commands, Prev: The "s" Command, Up: sed Programs
-
-Less Frequently-Used Commands
-=============================
-
- Though perhaps less frequently used than those in the previous
-section, some very small yet useful `sed' scripts can be built with
-these commands.
-
-`y/SOURCE-CHARS/DEST-CHARS/'
- (The `/' characters may be uniformly replaced by any other single
- character within any given `y' command.)
-
- Transliterate any characters in the pattern space which match any
- of the SOURCE-CHARS with the corresponding character in DEST-CHARS.
-
- Instances of the `/' (or whatever other character is used in its
- stead), `\', or newlines can appear in the SOURCE-CHARS or
- DEST-CHARS lists, provide that each instance is escaped by a `\'.
- The SOURCE-CHARS and DEST-CHARS lists _must_ contain the same
- number of characters (after de-escaping).
-
-`a\'
-`TEXT'
- As a GNU extension, this command accepts two addresses.
-
- Queue the lines of text which follow this command (each but the
- last ending with a `\', which are removed from the output) to be
- output at the end of the current cycle, or when the next input
- line is read.
-
- Escape sequences in TEXT are processed, so you should use `\\' in
- TEXT to print a single backslash.
-
- As a GNU extension, if between the `a' and the newline there is
- other than a whitespace-`\' sequence, then the text of this line,
- starting at the first non-whitespace character after the `a', is
- taken as the first line of the TEXT block. (This enables a
- simplification in scripting a one-line add.) This extension also
- works with the `i' and `c' commands.
-
-`i\'
-`TEXT'
- As a GNU extension, this command accepts two addresses.
-
- Immediately output the lines of text which follow this command
- (each but the last ending with a `\', which are removed from the
- output).
-
-`c\'
-`TEXT'
- Delete the lines matching the address or address-range, and output
- the lines of text which follow this command (each but the last
- ending with a `\', which are removed from the output) in place of
- the last line (or in place of each line, if no addresses were
- specified). A new cycle is started after this command is done,
- since the pattern space will have been deleted.
-
-`='
- As a GNU extension, this command accepts two addresses.
-
- Print out the current input line number (with a trailing newline).
-
-`l N'
- Print the pattern space in an unambiguous form: non-printable
- characters (and the `\' character) are printed in C-style escaped
- form; long lines are split, with a trailing `\' character to
- indicate the split; the end of each line is marked with a `$'.
-
- N specifies the desired line-wrap length; a length of 0 (zero)
- means to never wrap long lines. If omitted, the default as
- specified on the command line is used. The N parameter is a GNU
- `sed' extension.
-
-`r FILENAME'
- As a GNU extension, this command accepts two addresses.
-
- Queue the contents of FILENAME to be read and inserted into the
- output stream at the end of the current cycle, or when the next
- input line is read. Note that if FILENAME cannot be read, it is
- treated as if it were an empty file, without any error indication.
-
- As a GNU `sed' extension, the special value `/dev/stdin' is
- supported for the file name, which reads the contents of the
- standard input.
-
-`w FILENAME'
- Write the pattern space to FILENAME. As a GNU `sed' extension,
- two special values of FILE-NAME are supported: `/dev/stderr',
- which writes the result to the standard error, and `/dev/stdout',
- which writes to the standard output.(1)
-
- The file will be created (or truncated) before the first input
- line is read; all `w' commands (including instances of `w' flag on
- successful `s' commands) which refer to the same FILENAME are
- output without closing and reopening the file.
-
-`D'
- Delete text in the pattern space up to the first newline. If any
- text is left, restart cycle with the resultant pattern space
- (without reading a new line of input), otherwise start a normal
- new cycle.
-
-`N'
- Add a newline to the pattern space, then append the next line of
- input to the pattern space. If there is no more input then `sed'
- exits without processing any more commands.
-
-`P'
- Print out the portion of the pattern space up to the first newline.
-
-`h'
- Replace the contents of the hold space with the contents of the
- pattern space.
-
-`H'
- Append a newline to the contents of the hold space, and then
- append the contents of the pattern space to that of the hold space.
-
-`g'
- Replace the contents of the pattern space with the contents of the
- hold space.
-
-`G'
- Append a newline to the contents of the pattern space, and then
- append the contents of the hold space to that of the pattern space.
-
-`x'
- Exchange the contents of the hold and pattern spaces.
-
-
- ---------- Footnotes ----------
-
- (1) This is equivalent to `p' unless the `-i' option is being used.
-
-
-File: sed.info, Node: Programming Commands, Next: Extended Commands, Prev: Other Commands, Up: sed Programs
-
-Commands for `sed' gurus
-========================
-
- In most cases, use of these commands indicates that you are probably
-better off programming in something like `awk' or Perl. But
-occasionally one is committed to sticking with `sed', and these
-commands can enable one to write quite convoluted scripts.
-
-`: LABEL'
- [No addresses allowed.]
-
- Specify the location of LABEL for branch commands. In all other
- respects, a no-op.
-
-`b LABEL'
- Unconditionally branch to LABEL. The LABEL may be omitted, in
- which case the next cycle is started.
-
-`t LABEL'
- Branch to LABEL only if there has been a successful `s'ubstitution
- since the last input line was read or conditional branch was taken.
- The LABEL may be omitted, in which case the next cycle is started.
-
-
-
-File: sed.info, Node: Extended Commands, Next: Escapes, Prev: Programming Commands, Up: sed Programs
-
-Commands Specific to GNU `sed'
-==============================
-
- These commands are specific to GNU `sed', so you must use them with
-care and only when you are sure that hindering portability is not evil.
-They allow you to check for GNU `sed' extensions or to do tasks that
-are required quite often, yet are unsupported by standard `sed's.
-
-`e [COMMAND]'
- This command allows one to pipe input from a shell command into
- pattern space. Without parameters, the `e' command executes the
- command that is found in pattern space and replaces the pattern
- space with the output; a trailing newline is suppressed.
-
- If a parameter is specified, instead, the `e' command interprets
- it as a command and sends its output to the output stream (like
- `r' does). The command can run across multiple lines, all but the
- last ending with a back-slash.
-
- In both cases, the results are undefined if the command to be
- executed contains a NUL character.
-
-`L N'
- This GNU `sed' extension fills and joins lines in pattern space to
- produce output lines of (at most) N characters, like `fmt' does;
- if N is omitted, the default as specified on the command line is
- used. This command is considered a failed experiment and unless
- there is enough request (which seems unlikely) will be removed in
- future versions.
-
-`Q [EXIT-CODE]'
- This command only accepts a single address.
-
- This command is the same as `q', but will not print the contents
- of pattern space. Like `q', it provides the ability to return an
- exit code to the caller.
-
- This command can be useful because the only alternative ways to
- accomplish this apparently trivial function are to use the `-n'
- option (which can unnecessarily complicate your script) or
- resorting to the following snippet, which wastes time by reading
- the whole file without any visible effect:
-
- :eat
- $d Quit silently on the last line
- N Read another line, silently
- g Overwrite pattern space each time to save memory
- b eat
-
-`R FILENAME'
- Queue a line of FILENAME to be read and inserted into the output
- stream at the end of the current cycle, or when the next input
- line is read. Note that if FILENAME cannot be read, or if its end
- is reached, no line is appended, without any error indication.
-
- As with the `r' command, the special value `/dev/stdin' is
- supported for the file name, which reads a line from the standard
- input.
-
-`T LABEL'
- Branch to LABEL only if there have been no successful
- `s'ubstitutions since the last input line was read or conditional
- branch was taken. The LABEL may be omitted, in which case the next
- cycle is started.
-
-`v VERSION'
- This command does nothing, but makes `sed' fail if GNU `sed'
- extensions are not supported, simply because other versions of
- `sed' do not implement it. In addition, you can specify the
- version of `sed' that your script requires, such as `4.0.5'. The
- default is `4.0' because that is the first version that
- implemented this command.
-
- This command enables all GNU extensions even if `POSIXLY_CORRECT'
- is set in the environment.
-
-`W FILENAME'
- Write to the given filename the portion of the pattern space up to
- the first newline. Everything said under the `w' command about
- file handling holds here too.
-
-
-File: sed.info, Node: Escapes, Prev: Extended Commands, Up: sed Programs
-
-GNU Extensions for Escapes in Regular Expressions
-=================================================
-
- Until this chapter, we have only encountered escapes of the form
-`\^', which tell `sed' not to interpret the circumflex as a special
-character, but rather to take it literally. For example, `\*' matches
-a single asterisk rather than zero or more backslashes.
-
- This chapter introduces another kind of escape(1)--that is, escapes
-that are applied to a character or sequence of characters that
-ordinarily are taken literally, and that `sed' replaces with a special
-character. This provides a way of encoding non-printable characters in
-patterns in a visible manner. There is no restriction on the
-appearance of non-printing characters in a `sed' script but when a
-script is being prepared in the shell or by text editing, it is usually
-easier to use one of the following escape sequences than the binary
-character it represents:
-
- The list of these escapes is:
-
-`\a'
- Produces or matches a BEL character, that is an "alert" (ASCII 7).
-
-`\f'
- Produces or matches a form feed (ASCII 12).
-
-`\n'
- Produces or matches a newline (ASCII 10).
-
-`\r'
- Produces or matches a carriage return (ASCII 13).
-
-`\t'
- Produces or matches a horizontal tab (ASCII 9).
-
-`\v'
- Produces or matches a so called "vertical tab" (ASCII 11).
-
-`\cX'
- Produces or matches `CONTROL-X', where X is any character. The
- precise effect of `\cX' is as follows: if X is a lower case
- letter, it is converted to upper case. Then bit 6 of the
- character (hex 40) is inverted. Thus `\cz' becomes hex 1A, but
- `\c{' becomes hex 3B, while `\c;' becomes hex 7B.
-
-`\dXXX'
- Produces or matches a character whose decimal ASCII value is XXX.
-
-`\oXXX'
- Produces or matches a character whose octal ASCII value is XXX.
-
-`\xXX'
- Produces or matches a character whose hexadecimal ASCII value is
- XX.
-
- `\b' (backspace) was omitted because of the conflict with the
-existing "word boundary" meaning.
-
- Other escapes match a particular character class and are valid only
-in regular expressions:
-
-`\w'
- Matches any "word" character. A "word" character is any letter or
- digit or the underscore character.
-
-`\W'
- Matches any "non-word" character.
-
-`\b'
- Matches a word boundary; that is it matches if the character to
- the left is a "word" character and the character to the right is a
- "non-word" character, or vice-versa.
-
-`\B'
- Matches everywhere but on a word boundary; that is it matches if
- the character to the left and the character to the right are
- either both "word" characters or both "non-word" characters.
-
-`\`'
- Matches only at the start of pattern space. This is different
- from `^' in multi-line mode.
-
-`\''
- Matches only at the end of pattern space. This is different from
- `$' in multi-line mode.
-
-
- ---------- Footnotes ----------
-
- (1) All the escapes introduced here are GNU extensions, with the
-exception of `\n'. In basic regular expression mode, setting
-`POSIXLY_CORRECT' disables them inside bracket expressions.
-
-
-File: sed.info, Node: Examples, Next: Limitations, Prev: sed Programs, Up: Top
-
-Some Sample Scripts
-*******************
-
- Here are some `sed' scripts to guide you in the art of mastering
-`sed'.
-
-* Menu:
-
-Some exotic examples:
-* Centering lines::
-* Increment a number::
-* Rename files to lower case::
-* Print bash environment::
-* Reverse chars of lines::
-
-Emulating standard utilities:
-* tac:: Reverse lines of files
-* cat -n:: Numbering lines
-* cat -b:: Numbering non-blank lines
-* wc -c:: Counting chars
-* wc -w:: Counting words
-* wc -l:: Counting lines
-* head:: Printing the first lines
-* tail:: Printing the last lines
-* uniq:: Make duplicate lines unique
-* uniq -d:: Print duplicated lines of input
-* uniq -u:: Remove all duplicated lines
-* cat -s:: Squeezing blank lines
-
-
-File: sed.info, Node: Centering lines, Next: Increment a number, Up: Examples
-
-Centering Lines
-===============
-
- This script centers all lines of a file on a 80 columns width. To
-change that width, the number in `\{...\}' must be replaced, and the
-number of added spaces also must be changed.
-
- Note how the buffer commands are used to separate parts in the
-regular expressions to be matched--this is a common technique.
-
- #!/usr/bin/sed -f
-
- # Put 80 spaces in the buffer
- 1 {
- x
- s/^$/ /
- s/^.*$/&&&&&&&&/
- x
- }
-
- # del leading and trailing spaces
- y/tab/ /
- s/^ *//
- s/ *$//
-
- # add a newline and 80 spaces to end of line
- G
-
- # keep first 81 chars (80 + a newline)
- s/^\(.\{81\}\).*$/\1/
-
- # \2 matches half of the spaces, which are moved to the beginning
- s/^\(.*\)\n\(.*\)\2/\2\1/
-
-
-File: sed.info, Node: Increment a number, Next: Rename files to lower case, Prev: Centering lines, Up: Examples
-
-Increment a Number
-==================
-
- This script is one of a few that demonstrate how to do arithmetic in
-`sed'. This is indeed possible,(1) but must be done manually.
-
- To increment one number you just add 1 to last digit, replacing it
-by the following digit. There is one exception: when the digit is a
-nine the previous digits must be also incremented until you don't have
-a nine.
-
- This solution by Bruno Haible is very clever and smart because it
-uses a single buffer; if you don't have this limitation, the algorithm
-used in *Note Numbering lines: cat -n, is faster. It works by
-replacing trailing nines with an underscore, then using multiple `s'
-commands to increment the last digit, and then again substituting
-underscores with zeros.
-
- #!/usr/bin/sed -f
-
- /[^0-9]/ d
-
- # replace all leading 9s by _ (any other character except digits, could
- # be used)
- :d
- s/9\(_*\)$/_\1/
- td
-
- # incr last digit only. The first line adds a most-significant
- # digit of 1 if we have to add a digit.
- #
- # The `tn' commands are not necessary, but make the thing
- # faster
-
- s/^\(_*\)$/1\1/; tn
- s/8\(_*\)$/9\1/; tn
- s/7\(_*\)$/8\1/; tn
- s/6\(_*\)$/7\1/; tn
- s/5\(_*\)$/6\1/; tn
- s/4\(_*\)$/5\1/; tn
- s/3\(_*\)$/4\1/; tn
- s/2\(_*\)$/3\1/; tn
- s/1\(_*\)$/2\1/; tn
- s/0\(_*\)$/1\1/; tn
-
- :n
- y/_/0/
-
- ---------- Footnotes ----------
-
- (1) `sed' guru Greg Ubben wrote an implementation of the `dc' RPN
-calculator! It is distributed together with sed.
-
-
-File: sed.info, Node: Rename files to lower case, Next: Print bash environment, Prev: Increment a number, Up: Examples
-
-Rename Files to Lower Case
-==========================
-
- This is a pretty strange use of `sed'. We transform text, and
-transform it to be shell commands, then just feed them to shell. Don't
-worry, even worse hacks are done when using `sed'; I have seen a script
-converting the output of `date' into a `bc' program!
-
- The main body of this is the `sed' script, which remaps the name
-from lower to upper (or vice-versa) and even checks out if the remapped
-name is the same as the original name. Note how the script is
-parameterized using shell variables and proper quoting.
-
- #! /bin/sh
- # rename files to lower/upper case...
- #
- # usage:
- # move-to-lower *
- # move-to-upper *
- # or
- # move-to-lower -R .
- # move-to-upper -R .
- #
-
- help()
- {
- cat << eof
- Usage: $0 [-n] [-r] [-h] files...
-
- -n do nothing, only see what would be done
- -R recursive (use find)
- -h this message
- files files to remap to lower case
-
- Examples:
- $0 -n * (see if everything is ok, then...)
- $0 *
-
- $0 -R .
-
- eof
- }
-
- apply_cmd='sh'
- finder='echo "$@" | tr " " "\n"'
- files_only=
-
- while :
- do
- case "$1" in
- -n) apply_cmd='cat' ;;
- -R) finder='find "$@" -type f';;
- -h) help ; exit 1 ;;
- *) break ;;
- esac
- shift
- done
-
- if [ -z "$1" ]; then
- echo Usage: $0 [-h] [-n] [-r] files...
- exit 1
- fi
-
- LOWER='abcdefghijklmnopqrstuvwxyz'
- UPPER='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-
- case `basename $0` in
- *upper*) TO=$UPPER; FROM=$LOWER ;;
- *) FROM=$UPPER; TO=$LOWER ;;
- esac
-
- eval $finder | sed -n '
-
- # remove all trailing slashes
- s/\/*$//
-
- # add ./ if there is no path, only a filename
- /\//! s/^/.\//
-
- # save path+filename
- h
-
- # remove path
- s/.*\///
-
- # do conversion only on filename
- y/'$FROM'/'$TO'/
-
- # now line contains original path+file, while
- # hold space contains the new filename
- x
-
- # add converted file name to line, which now contains
- # path/file-name\nconverted-file-name
- G
-
- # check if converted file name is equal to original file name,
- # if it is, do not print nothing
- /^.*\/\(.*\)\n\1/b
-
- # now, transform path/fromfile\n, into
- # mv path/fromfile path/tofile and print it
- s/^\(.*\/\)\(.*\)\n\(.*\)$/mv "\1\2" "\1\3"/p
-
- ' | $apply_cmd
-
diff --git a/doc/sed.info-2 b/doc/sed.info-2
deleted file mode 100644
index ee74b14..0000000
--- a/doc/sed.info-2
+++ /dev/null
@@ -1,1087 +0,0 @@
-This is ../../doc/sed.info, produced by makeinfo version 4.5 from
-../../doc/sed.texi.
-
-INFO-DIR-SECTION Text creation and manipulation
-START-INFO-DIR-ENTRY
-* sed: (sed). Stream EDitor.
-
-END-INFO-DIR-ENTRY
-
-This file documents version 4.1.5 of GNU `sed', a stream editor.
-
- Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004 Free Software
-Foundation, Inc.
-
- This document is released under the terms of the GNU Free
-Documentation License as published by the Free Software Foundation;
-either version 1.1, or (at your option) any later version.
-
- You should have received a copy of the GNU Free Documentation
-License along with GNU `sed'; see the file `COPYING.DOC'. If not,
-write to the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02110-1301, USA.
-
- There are no Cover Texts and no Invariant Sections; this text, along
-with its equivalent in the printed manual, constitutes the Title Page.
-
-File: sed.info, Node: Print bash environment, Next: Reverse chars of lines, Prev: Rename files to lower case, Up: Examples
-
-Print `bash' Environment
-========================
-
- This script strips the definition of the shell functions from the
-output of the `set' Bourne-shell command.
-
- #!/bin/sh
-
- set | sed -n '
- :x
-
- # if no occurrence of "=()" print and load next line
- /=()/! { p; b; }
- / () $/! { p; b; }
-
- # possible start of functions section
- # save the line in case this is a var like FOO="() "
- h
-
- # if the next line has a brace, we quit because
- # nothing comes after functions
- n
- /^{/ q
-
- # print the old line
- x; p
-
- # work on the new line now
- x; bx
- '
-
-
-File: sed.info, Node: Reverse chars of lines, Next: tac, Prev: Print bash environment, Up: Examples
-
-Reverse Characters of Lines
-===========================
-
- This script can be used to reverse the position of characters in
-lines. The technique moves two characters at a time, hence it is
-faster than more intuitive implementations.
-
- Note the `tx' command before the definition of the label. This is
-often needed to reset the flag that is tested by the `t' command.
-
- Imaginative readers will find uses for this script. An example is
-reversing the output of `banner'.(1)
-
- #!/usr/bin/sed -f
-
- /../! b
-
- # Reverse a line. Begin embedding the line between two newlines
- s/^.*$/\
- &\
- /
-
- # Move first character at the end. The regexp matches until
- # there are zero or one characters between the markers
- tx
- :x
- s/\(\n.\)\(.*\)\(.\n\)/\3\2\1/
- tx
-
- # Remove the newline markers
- s/\n//g
-
- ---------- Footnotes ----------
-
- (1) This requires another script to pad the output of banner; for
-example
-
- #! /bin/sh
-
- banner -w $1 $2 $3 $4 |
- sed -e :a -e '/^.\{0,'$1'\}$/ { s/$/ /; ba; }' |
- ~/sedscripts/reverseline.sed
-
-
-File: sed.info, Node: tac, Next: cat -n, Prev: Reverse chars of lines, Up: Examples
-
-Reverse Lines of Files
-======================
-
- This one begins a series of totally useless (yet interesting)
-scripts emulating various Unix commands. This, in particular, is a
-`tac' workalike.
-
- Note that on implementations other than GNU `sed' this script might
-easily overflow internal buffers.
-
- #!/usr/bin/sed -nf
-
- # reverse all lines of input, i.e. first line became last, ...
-
- # from the second line, the buffer (which contains all previous lines)
- # is *appended* to current line, so, the order will be reversed
- 1! G
-
- # on the last line we're done -- print everything
- $ p
-
- # store everything on the buffer again
- h
-
-
-File: sed.info, Node: cat -n, Next: cat -b, Prev: tac, Up: Examples
-
-Numbering Lines
-===============
-
- This script replaces `cat -n'; in fact it formats its output exactly
-like GNU `cat' does.
-
- Of course this is completely useless and for two reasons: first,
-because somebody else did it in C, second, because the following
-Bourne-shell script could be used for the same purpose and would be
-much faster:
-
- #! /bin/sh
- sed -e "=" $@ | sed -e '
- s/^/ /
- N
- s/^ *\(......\)\n/\1 /
- '
-
- It uses `sed' to print the line number, then groups lines two by two
-using `N'. Of course, this script does not teach as much as the one
-presented below.
-
- The algorithm used for incrementing uses both buffers, so the line
-is printed as soon as possible and then discarded. The number is split
-so that changing digits go in a buffer and unchanged ones go in the
-other; the changed digits are modified in a single step (using a `y'
-command). The line number for the next line is then composed and
-stored in the hold space, to be used in the next iteration.
-
- #!/usr/bin/sed -nf
-
- # Prime the pump on the first line
- x
- /^$/ s/^.*$/1/
-
- # Add the correct line number before the pattern
- G
- h
-
- # Format it and print it
- s/^/ /
- s/^ *\(......\)\n/\1 /p
-
- # Get the line number from hold space; add a zero
- # if we're going to add a digit on the next line
- g
- s/\n.*$//
- /^9*$/ s/^/0/
-
- # separate changing/unchanged digits with an x
- s/.9*$/x&/
-
- # keep changing digits in hold space
- h
- s/^.*x//
- y/0123456789/1234567890/
- x
-
- # keep unchanged digits in pattern space
- s/x.*$//
-
- # compose the new number, remove the newline implicitly added by G
- G
- s/\n//
- h
-
-
-File: sed.info, Node: cat -b, Next: wc -c, Prev: cat -n, Up: Examples
-
-Numbering Non-blank Lines
-=========================
-
- Emulating `cat -b' is almost the same as `cat -n'--we only have to
-select which lines are to be numbered and which are not.
-
- The part that is common to this script and the previous one is not
-commented to show how important it is to comment `sed' scripts
-properly...
-
- #!/usr/bin/sed -nf
-
- /^$/ {
- p
- b
- }
-
- # Same as cat -n from now
- x
- /^$/ s/^.*$/1/
- G
- h
- s/^/ /
- s/^ *\(......\)\n/\1 /p
- x
- s/\n.*$//
- /^9*$/ s/^/0/
- s/.9*$/x&/
- h
- s/^.*x//
- y/0123456789/1234567890/
- x
- s/x.*$//
- G
- s/\n//
- h
-
-
-File: sed.info, Node: wc -c, Next: wc -w, Prev: cat -b, Up: Examples
-
-Counting Characters
-===================
-
- This script shows another way to do arithmetic with `sed'. In this
-case we have to add possibly large numbers, so implementing this by
-successive increments would not be feasible (and possibly even more
-complicated to contrive than this script).
-
- The approach is to map numbers to letters, kind of an abacus
-implemented with `sed'. `a's are units, `b's are tens and so on: we
-simply add the number of characters on the current line as units, and
-then propagate the carry to tens, hundreds, and so on.
-
- As usual, running totals are kept in hold space.
-
- On the last line, we convert the abacus form back to decimal. For
-the sake of variety, this is done with a loop rather than with some 80
-`s' commands(1): first we convert units, removing `a's from the number;
-then we rotate letters so that tens become `a's, and so on until no
-more letters remain.
-
- #!/usr/bin/sed -nf
-
- # Add n+1 a's to hold space (+1 is for the newline)
- s/./a/g
- H
- x
- s/\n/a/
-
- # Do the carry. The t's and b's are not necessary,
- # but they do speed up the thing
- t a
- : a; s/aaaaaaaaaa/b/g; t b; b done
- : b; s/bbbbbbbbbb/c/g; t c; b done
- : c; s/cccccccccc/d/g; t d; b done
- : d; s/dddddddddd/e/g; t e; b done
- : e; s/eeeeeeeeee/f/g; t f; b done
- : f; s/ffffffffff/g/g; t g; b done
- : g; s/gggggggggg/h/g; t h; b done
- : h; s/hhhhhhhhhh//g
-
- : done
- $! {
- h
- b
- }
-
- # On the last line, convert back to decimal
-
- : loop
- /a/! s/[b-h]*/&0/
- s/aaaaaaaaa/9/
- s/aaaaaaaa/8/
- s/aaaaaaa/7/
- s/aaaaaa/6/
- s/aaaaa/5/
- s/aaaa/4/
- s/aaa/3/
- s/aa/2/
- s/a/1/
-
- : next
- y/bcdefgh/abcdefg/
- /[a-h]/ b loop
- p
-
- ---------- Footnotes ----------
-
- (1) Some implementations have a limit of 199 commands per script
-
-
-File: sed.info, Node: wc -w, Next: wc -l, Prev: wc -c, Up: Examples
-
-Counting Words
-==============
-
- This script is almost the same as the previous one, once each of the
-words on the line is converted to a single `a' (in the previous script
-each letter was changed to an `a').
-
- It is interesting that real `wc' programs have optimized loops for
-`wc -c', so they are much slower at counting words rather than
-characters. This script's bottleneck, instead, is arithmetic, and
-hence the word-counting one is faster (it has to manage smaller
-numbers).
-
- Again, the common parts are not commented to show the importance of
-commenting `sed' scripts.
-
- #!/usr/bin/sed -nf
-
- # Convert words to a's
- s/[ tab][ tab]*/ /g
- s/^/ /
- s/ [^ ][^ ]*/a /g
- s/ //g
-
- # Append them to hold space
- H
- x
- s/\n//
-
- # From here on it is the same as in wc -c.
- /aaaaaaaaaa/! bx; s/aaaaaaaaaa/b/g
- /bbbbbbbbbb/! bx; s/bbbbbbbbbb/c/g
- /cccccccccc/! bx; s/cccccccccc/d/g
- /dddddddddd/! bx; s/dddddddddd/e/g
- /eeeeeeeeee/! bx; s/eeeeeeeeee/f/g
- /ffffffffff/! bx; s/ffffffffff/g/g
- /gggggggggg/! bx; s/gggggggggg/h/g
- s/hhhhhhhhhh//g
- :x
- $! { h; b; }
- :y
- /a/! s/[b-h]*/&0/
- s/aaaaaaaaa/9/
- s/aaaaaaaa/8/
- s/aaaaaaa/7/
- s/aaaaaa/6/
- s/aaaaa/5/
- s/aaaa/4/
- s/aaa/3/
- s/aa/2/
- s/a/1/
- y/bcdefgh/abcdefg/
- /[a-h]/ by
- p
-
-
-File: sed.info, Node: wc -l, Next: head, Prev: wc -w, Up: Examples
-
-Counting Lines
-==============
-
- No strange things are done now, because `sed' gives us `wc -l'
-functionality for free!!! Look:
-
- #!/usr/bin/sed -nf
- $=
-
-
-File: sed.info, Node: head, Next: tail, Prev: wc -l, Up: Examples
-
-Printing the First Lines
-========================
-
- This script is probably the simplest useful `sed' script. It
-displays the first 10 lines of input; the number of displayed lines is
-right before the `q' command.
-
- #!/usr/bin/sed -f
- 10q
-
-
-File: sed.info, Node: tail, Next: uniq, Prev: head, Up: Examples
-
-Printing the Last Lines
-=======================
-
- Printing the last N lines rather than the first is more complex but
-indeed possible. N is encoded in the second line, before the bang
-character.
-
- This script is similar to the `tac' script in that it keeps the
-final output in the hold space and prints it at the end:
-
- #!/usr/bin/sed -nf
-
- 1! {; H; g; }
- 1,10 !s/[^\n]*\n//
- $p
- h
-
- Mainly, the scripts keeps a window of 10 lines and slides it by
-adding a line and deleting the oldest (the substitution command on the
-second line works like a `D' command but does not restart the loop).
-
- The "sliding window" technique is a very powerful way to write
-efficient and complex `sed' scripts, because commands like `P' would
-require a lot of work if implemented manually.
-
- To introduce the technique, which is fully demonstrated in the rest
-of this chapter and is based on the `N', `P' and `D' commands, here is
-an implementation of `tail' using a simple "sliding window."
-
- This looks complicated but in fact the working is the same as the
-last script: after we have kicked in the appropriate number of lines,
-however, we stop using the hold space to keep inter-line state, and
-instead use `N' and `D' to slide pattern space by one line:
-
- #!/usr/bin/sed -f
-
- 1h
- 2,10 {; H; g; }
- $q
- 1,9d
- N
- D
-
- Note how the first, second and fourth line are inactive after the
-first ten lines of input. After that, all the script does is: exiting
-on the last line of input, appending the next input line to pattern
-space, and removing the first line.
-
-
-File: sed.info, Node: uniq, Next: uniq -d, Prev: tail, Up: Examples
-
-Make Duplicate Lines Unique
-===========================
-
- This is an example of the art of using the `N', `P' and `D'
-commands, probably the most difficult to master.
-
- #!/usr/bin/sed -f
- h
-
- :b
- # On the last line, print and exit
- $b
- N
- /^\(.*\)\n\1$/ {
- # The two lines are identical. Undo the effect of
- # the n command.
- g
- bb
- }
-
- # If the `N' command had added the last line, print and exit
- $b
-
- # The lines are different; print the first and go
- # back working on the second.
- P
- D
-
- As you can see, we mantain a 2-line window using `P' and `D'. This
-technique is often used in advanced `sed' scripts.
-
-
-File: sed.info, Node: uniq -d, Next: uniq -u, Prev: uniq, Up: Examples
-
-Print Duplicated Lines of Input
-===============================
-
- This script prints only duplicated lines, like `uniq -d'.
-
- #!/usr/bin/sed -nf
-
- $b
- N
- /^\(.*\)\n\1$/ {
- # Print the first of the duplicated lines
- s/.*\n//
- p
-
- # Loop until we get a different line
- :b
- $b
- N
- /^\(.*\)\n\1$/ {
- s/.*\n//
- bb
- }
- }
-
- # The last line cannot be followed by duplicates
- $b
-
- # Found a different one. Leave it alone in the pattern space
- # and go back to the top, hunting its duplicates
- D
-
-
-File: sed.info, Node: uniq -u, Next: cat -s, Prev: uniq -d, Up: Examples
-
-Remove All Duplicated Lines
-===========================
-
- This script prints only unique lines, like `uniq -u'.
-
- #!/usr/bin/sed -f
-
- # Search for a duplicate line --- until that, print what you find.
- $b
- N
- /^\(.*\)\n\1$/ ! {
- P
- D
- }
-
- :c
- # Got two equal lines in pattern space. At the
- # end of the file we simply exit
- $d
-
- # Else, we keep reading lines with `N' until we
- # find a different one
- s/.*\n//
- N
- /^\(.*\)\n\1$/ {
- bc
- }
-
- # Remove the last instance of the duplicate line
- # and go back to the top
- D
-
-
-File: sed.info, Node: cat -s, Prev: uniq -u, Up: Examples
-
-Squeezing Blank Lines
-=====================
-
- As a final example, here are three scripts, of increasing complexity
-and speed, that implement the same function as `cat -s', that is
-squeezing blank lines.
-
- The first leaves a blank line at the beginning and end if there are
-some already.
-
- #!/usr/bin/sed -f
-
- # on empty lines, join with next
- # Note there is a star in the regexp
- :x
- /^\n*$/ {
- N
- bx
- }
-
- # now, squeeze all '\n', this can be also done by:
- # s/^\(\n\)*/\1/
- s/\n*/\
- /
-
- This one is a bit more complex and removes all empty lines at the
-beginning. It does leave a single blank line at end if one was there.
-
- #!/usr/bin/sed -f
-
- # delete all leading empty lines
- 1,/^./{
- /./!d
- }
-
- # on an empty line we remove it and all the following
- # empty lines, but one
- :x
- /./!{
- N
- s/^\n$//
- tx
- }
-
- This removes leading and trailing blank lines. It is also the
-fastest. Note that loops are completely done with `n' and `b', without
-relying on `sed' to restart the the script automatically at the end of
-a line.
-
- #!/usr/bin/sed -nf
-
- # delete all (leading) blanks
- /./!d
-
- # get here: so there is a non empty
- :x
- # print it
- p
- # get next
- n
- # got chars? print it again, etc...
- /./bx
-
- # no, don't have chars: got an empty line
- :z
- # get next, if last line we finish here so no trailing
- # empty lines are written
- n
- # also empty? then ignore it, and get next... this will
- # remove ALL empty lines
- /./!bz
-
- # all empty lines were deleted/ignored, but we have a non empty. As
- # what we want to do is to squeeze, insert a blank line artificially
- i\
-
- bx
-
-
-File: sed.info, Node: Limitations, Next: Other Resources, Prev: Examples, Up: Top
-
-GNU `sed''s Limitations and Non-limitations
-*******************************************
-
- For those who want to write portable `sed' scripts, be aware that
-some implementations have been known to limit line lengths (for the
-pattern and hold spaces) to be no more than 4000 bytes. The POSIX
-standard specifies that conforming `sed' implementations shall support
-at least 8192 byte line lengths. GNU `sed' has no built-in limit on
-line length; as long as it can `malloc()' more (virtual) memory, you
-can feed or construct lines as long as you like.
-
- However, recursion is used to handle subpatterns and indefinite
-repetition. This means that the available stack space may limit the
-size of the buffer that can be processed by certain patterns.
-
-
-File: sed.info, Node: Other Resources, Next: Reporting Bugs, Prev: Limitations, Up: Top
-
-Other Resources for Learning About `sed'
-****************************************
-
- In addition to several books that have been written about `sed'
-(either specifically or as chapters in books which discuss shell
-programming), one can find out more about `sed' (including suggestions
-of a few books) from the FAQ for the `sed-users' mailing list,
-available from any of:
- `http://www.student.northpark.edu/pemente/sed/sedfaq.html'
- `http://sed.sf.net/grabbag/tutorials/sedfaq.html'
-
- Also of interest are
-`http://www.student.northpark.edu/pemente/sed/index.htm' and
-`http://sed.sf.net/grabbag', which include `sed' tutorials and other
-`sed'-related goodies.
-
- The `sed-users' mailing list itself maintained by Sven Guckes. To
-subscribe, visit `http://groups.yahoo.com' and search for the
-`sed-users' mailing list.
-
-
-File: sed.info, Node: Reporting Bugs, Next: Extended regexps, Prev: Other Resources, Up: Top
-
-Reporting Bugs
-**************
-
- Email bug reports to <bonzini@gnu.org>. Be sure to include the word
-"sed" somewhere in the `Subject:' field. Also, please include the
-output of `sed --version' in the body of your report if at all possible.
-
- Please do not send a bug report like this:
-
- while building frobme-1.3.4
- $ configure
- error--> sed: file sedscr line 1: Unknown option to 's'
-
- If GNU `sed' doesn't configure your favorite package, take a few
-extra minutes to identify the specific problem and make a stand-alone
-test case. Unlike other programs such as C compilers, making such test
-cases for `sed' is quite simple.
-
- A stand-alone test case includes all the data necessary to perform
-the test, and the specific invocation of `sed' that causes the problem.
-The smaller a stand-alone test case is, the better. A test case should
-not involve something as far removed from `sed' as "try to configure
-frobme-1.3.4". Yes, that is in principle enough information to look
-for the bug, but that is not a very practical prospect.
-
- Here are a few commonly reported bugs that are not bugs.
-
-`N' command on the last line
- Most versions of `sed' exit without printing anything when the `N'
- command is issued on the last line of a file. GNU `sed' prints
- pattern space before exiting unless of course the `-n' command
- switch has been specified. This choice is by design.
-
- For example, the behavior of
- sed N foo bar
-
- would depend on whether foo has an even or an odd number of
- lines(1). Or, when writing a script to read the next few lines
- following a pattern match, traditional implementations of `sed'
- would force you to write something like
- /foo/{ $!N; $!N; $!N; $!N; $!N; $!N; $!N; $!N; $!N }
-
- instead of just
- /foo/{ N;N;N;N;N;N;N;N;N; }
-
- In any case, the simplest workaround is to use `$d;N' in scripts
- that rely on the traditional behavior, or to set the
- `POSIXLY_CORRECT' variable to a non-empty value.
-
-Regex syntax clashes (problems with backslashes)
- `sed' uses the POSIX basic regular expression syntax. According to
- the standard, the meaning of some escape sequences is undefined in
- this syntax; notable in the case of `sed' are `\|', `\+', `\?',
- `\`', `\'', `\<', `\>', `\b', `\B', `\w', and `\W'.
-
- As in all GNU programs that use POSIX basic regular expressions,
- `sed' interprets these escape sequences as special characters.
- So, `x\+' matches one or more occurrences of `x'. `abc\|def'
- matches either `abc' or `def'.
-
- This syntax may cause problems when running scripts written for
- other `sed's. Some `sed' programs have been written with the
- assumption that `\|' and `\+' match the literal characters `|' and
- `+'. Such scripts must be modified by removing the spurious
- backslashes if they are to be used with modern implementations of
- `sed', like GNU `sed'.
-
- On the other hand, some scripts use s|abc\|def||g to remove
- occurrences of _either_ `abc' or `def'. While this worked until
- `sed' 4.0.x, newer versions interpret this as removing the string
- `abc|def'. This is again undefined behavior according to POSIX,
- and this interpretation is arguably more robust: older `sed's, for
- example, required that the regex matcher parsed `\/' as `/' in the
- common case of escaping a slash, which is again undefined
- behavior; the new behavior avoids this, and this is good because
- the regex matcher is only partially under our control.
-
- In addition, this version of `sed' supports several escape
- characters (some of which are multi-character) to insert
- non-printable characters in scripts (`\a', `\c', `\d', `\o', `\r',
- `\t', `\v', `\x'). These can cause similar problems with scripts
- written for other `sed's.
-
-`-i' clobbers read-only files
- In short, `sed -i' will let you delete the contents of a read-only
- file, and in general the `-i' option (*note Invocation: Invoking
- sed.) lets you clobber protected files. This is not a bug, but
- rather a consequence of how the Unix filesystem works.
-
- The permissions on a file say what can happen to the data in that
- file, while the permissions on a directory say what can happen to
- the list of files in that directory. `sed -i' will not ever open
- for writing a file that is already on disk. Rather, it will work
- on a temporary file that is finally renamed to the original name:
- if you rename or delete files, you're actually modifying the
- contents of the directory, so the operation depends on the
- permissions of the directory, not of the file. For this same
- reason, `sed' does not let you use `-i' on a writeable file in a
- read-only directory (but unbelievably nobody reports that as a
- bug...).
-
-`0a' does not work (gives an error)
- There is no line 0. 0 is a special address that is only used to
- treat addresses like `0,/RE/' as active when the script starts: if
- you write `1,/abc/d' and the first line includes the word `abc',
- then that match would be ignored because address ranges must span
- at least two lines (barring the end of the file); but what you
- probably wanted is to delete every line up to the first one
- including `abc', and this is obtained with `0,/abc/d'.
-
-`[a-z]' is case insensitive
- You are encountering problems with locales. POSIX mandates that
- `[a-z]' uses the current locale's collation order - in C parlance,
- that means using `strcoll(3)' instead of `strcmp(3)'. Some
- locales have a case-insensitive collation order, others don't: one
- of those that have problems is Estonian.
-
- Another problem is that `[a-z]' tries to use collation symbols.
- This only happens if you are on the GNU system, using GNU libc's
- regular expression matcher instead of compiling the one supplied
- with GNU sed. In a Danish locale, for example, the regular
- expression `^[a-z]$' matches the string `aa', because this is a
- single collating symbol that comes after `a' and before `b'; `ll'
- behaves similarly in Spanish locales, or `ij' in Dutch locales.
-
- To work around these problems, which may cause bugs in shell
- scripts, set the `LC_COLLATE' and `LC_CTYPE' environment variables
- to `C'.
-
- ---------- Footnotes ----------
-
- (1) which is the actual "bug" that prompted the change in behavior
-
-
-File: sed.info, Node: Extended regexps, Next: Concept Index, Prev: Reporting Bugs, Up: Top
-
-Extended regular expressions
-****************************
-
- The only difference between basic and extended regular expressions
-is in the behavior of a few characters: `?', `+', parentheses, and
-braces (`{}'). While basic regular expressions require these to be
-escaped if you want them to behave as special characters, when using
-extended regular expressions you must escape them if you want them _to
-match a literal character_.
-
-Examples:
-`abc?'
- becomes `abc\?' when using extended regular expressions. It
- matches the literal string `abc?'.
-
-`c\+'
- becomes `c+' when using extended regular expressions. It matches
- one or more `c's.
-
-`a\{3,\}'
- becomes `a{3,}' when using extended regular expressions. It
- matches three or more `a's.
-
-`\(abc\)\{2,3\}'
- becomes `(abc){2,3}' when using extended regular expressions. It
- matches either `abcabc' or `abcabcabc'.
-
-`\(abc*\)\1'
- becomes `(abc*)\1' when using extended regular expressions.
- Backreferences must still be escaped when using extended regular
- expressions.
-
-
-File: sed.info, Node: Concept Index, Next: Command and Option Index, Prev: Extended regexps, Up: Top
-
-Concept Index
-*************
-
- This is a general index of all issues discussed in this manual, with
-the exception of the `sed' commands and command-line options.
-
-* Menu:
-
-* Additional reading about sed: Other Resources.
-* ADDR1,+N: Addresses.
-* ADDR1,~N: Addresses.
-* Address, as a regular expression: Addresses.
-* Address, last line: Addresses.
-* Address, numeric: Addresses.
-* Addresses, in sed scripts: Addresses.
-* Append hold space to pattern space: Other Commands.
-* Append next input line to pattern space: Other Commands.
-* Append pattern space to hold space: Other Commands.
-* Appending text after a line: Other Commands.
-* Backreferences, in regular expressions: The "s" Command.
-* Branch to a label, if s/// failed: Extended Commands.
-* Branch to a label, if s/// succeeded: Programming Commands.
-* Branch to a label, unconditionally: Programming Commands.
-* Buffer spaces, pattern and hold: Execution Cycle.
-* Bugs, reporting: Reporting Bugs.
-* Case-insensitive matching: The "s" Command.
-* Caveat -- #n on first line: Common Commands.
-* Command groups: Common Commands.
-* Comments, in scripts: Common Commands.
-* Conditional branch <1>: Extended Commands.
-* Conditional branch: Programming Commands.
-* Copy hold space into pattern space: Other Commands.
-* Copy pattern space into hold space: Other Commands.
-* Delete first line from pattern space: Other Commands.
-* Disabling autoprint, from command line: Invoking sed.
-* empty regular expression: Addresses.
-* Evaluate Bourne-shell commands: Extended Commands.
-* Evaluate Bourne-shell commands, after substitution: The "s" Command.
-* Exchange hold space with pattern space: Other Commands.
-* Excluding lines: Addresses.
-* Extended regular expressions, choosing: Invoking sed.
-* Extended regular expressions, syntax: Extended regexps.
-* Files to be processed as input: Invoking sed.
-* Flow of control in scripts: Programming Commands.
-* Global substitution: The "s" Command.
-* GNU extensions, /dev/stderr file <1>: The "s" Command.
-* GNU extensions, /dev/stderr file: Other Commands.
-* GNU extensions, /dev/stdin file <1>: Other Commands.
-* GNU extensions, /dev/stdin file: Extended Commands.
-* GNU extensions, /dev/stdout file <1>: Invoking sed.
-* GNU extensions, /dev/stdout file <2>: The "s" Command.
-* GNU extensions, /dev/stdout file: Other Commands.
-* GNU extensions, 0 address: Addresses.
-* GNU extensions, 0,ADDR2 addressing: Addresses.
-* GNU extensions, ADDR1,+N addressing: Addresses.
-* GNU extensions, ADDR1,~N addressing: Addresses.
-* GNU extensions, branch if s/// failed: Extended Commands.
-* GNU extensions, case modifiers in s commands: The "s" Command.
-* GNU extensions, checking for their presence: Extended Commands.
-* GNU extensions, disabling: Invoking sed.
-* GNU extensions, evaluating Bourne-shell commands <1>: Extended Commands.
-* GNU extensions, evaluating Bourne-shell commands: The "s" Command.
-* GNU extensions, extended regular expressions: Invoking sed.
-* GNU extensions, g and NUMBER modifier interaction in s command: The "s" Command.
-* GNU extensions, I modifier <1>: Addresses.
-* GNU extensions, I modifier: The "s" Command.
-* GNU extensions, in-place editing <1>: Reporting Bugs.
-* GNU extensions, in-place editing: Invoking sed.
-* GNU extensions, L command: Extended Commands.
-* GNU extensions, M modifier: The "s" Command.
-* GNU extensions, modifiers and the empty regular expression: Addresses.
-* GNU extensions, N~M addresses: Addresses.
-* GNU extensions, quitting silently: Extended Commands.
-* GNU extensions, R command: Extended Commands.
-* GNU extensions, reading a file a line at a time: Extended Commands.
-* GNU extensions, reformatting paragraphs: Extended Commands.
-* GNU extensions, returning an exit code <1>: Common Commands.
-* GNU extensions, returning an exit code: Extended Commands.
-* GNU extensions, setting line length: Other Commands.
-* GNU extensions, special escapes <1>: Reporting Bugs.
-* GNU extensions, special escapes: Escapes.
-* GNU extensions, special two-address forms: Addresses.
-* GNU extensions, subprocesses <1>: The "s" Command.
-* GNU extensions, subprocesses: Extended Commands.
-* GNU extensions, to basic regular expressions <1>: Reporting Bugs.
-* GNU extensions, to basic regular expressions: Regular Expressions.
-* GNU extensions, two addresses supported by most commands: Other Commands.
-* GNU extensions, unlimited line length: Limitations.
-* GNU extensions, writing first line to a file: Extended Commands.
-* Goto, in scripts: Programming Commands.
-* Greedy regular expression matching: Regular Expressions.
-* Grouping commands: Common Commands.
-* Hold space, appending from pattern space: Other Commands.
-* Hold space, appending to pattern space: Other Commands.
-* Hold space, copy into pattern space: Other Commands.
-* Hold space, copying pattern space into: Other Commands.
-* Hold space, definition: Execution Cycle.
-* Hold space, exchange with pattern space: Other Commands.
-* In-place editing: Reporting Bugs.
-* In-place editing, activating: Invoking sed.
-* In-place editing, Perl-style backup file names: Invoking sed.
-* Inserting text before a line: Other Commands.
-* Labels, in scripts: Programming Commands.
-* Last line, selecting: Addresses.
-* Line length, setting <1>: Invoking sed.
-* Line length, setting: Other Commands.
-* Line number, printing: Other Commands.
-* Line selection: Addresses.
-* Line, selecting by number: Addresses.
-* Line, selecting by regular expression match: Addresses.
-* Line, selecting last: Addresses.
-* List pattern space: Other Commands.
-* Mixing g and NUMBER modifiers in the s command: The "s" Command.
-* Next input line, append to pattern space: Other Commands.
-* Next input line, replace pattern space with: Common Commands.
-* Non-bugs, in-place editing: Reporting Bugs.
-* Non-bugs, N command on the last line: Reporting Bugs.
-* Non-bugs, regex syntax clashes: Reporting Bugs.
-* Parenthesized substrings: The "s" Command.
-* Pattern space, definition: Execution Cycle.
-* Perl-style regular expressions, multiline: Addresses.
-* Portability, comments: Common Commands.
-* Portability, line length limitations: Limitations.
-* Portability, N command on the last line: Reporting Bugs.
-* POSIXLY_CORRECT behavior, bracket expressions: Regular Expressions.
-* POSIXLY_CORRECT behavior, enabling: Invoking sed.
-* POSIXLY_CORRECT behavior, escapes: Escapes.
-* POSIXLY_CORRECT behavior, N command: Reporting Bugs.
-* Print first line from pattern space: Other Commands.
-* Printing line number: Other Commands.
-* Printing text unambiguously: Other Commands.
-* Quitting <1>: Extended Commands.
-* Quitting: Common Commands.
-* Range of lines: Addresses.
-* Range with start address of zero: Addresses.
-* Read next input line: Common Commands.
-* Read text from a file <1>: Extended Commands.
-* Read text from a file: Other Commands.
-* Reformat pattern space: Extended Commands.
-* Reformatting paragraphs: Extended Commands.
-* Replace hold space with copy of pattern space: Other Commands.
-* Replace pattern space with copy of hold space: Other Commands.
-* Replacing all text matching regexp in a line: The "s" Command.
-* Replacing only Nth match of regexp in a line: The "s" Command.
-* Replacing selected lines with other text: Other Commands.
-* Requiring GNU sed: Extended Commands.
-* Script structure: sed Programs.
-* Script, from a file: Invoking sed.
-* Script, from command line: Invoking sed.
-* sed program structure: sed Programs.
-* Selecting lines to process: Addresses.
-* Selecting non-matching lines: Addresses.
-* Several lines, selecting: Addresses.
-* Slash character, in regular expressions: Addresses.
-* Spaces, pattern and hold: Execution Cycle.
-* Special addressing forms: Addresses.
-* Standard input, processing as input: Invoking sed.
-* Stream editor: Introduction.
-* Subprocesses <1>: Extended Commands.
-* Subprocesses: The "s" Command.
-* Substitution of text, options: The "s" Command.
-* Text, appending: Other Commands.
-* Text, deleting: Common Commands.
-* Text, insertion: Other Commands.
-* Text, printing: Common Commands.
-* Text, printing after substitution: The "s" Command.
-* Text, writing to a file after substitution: The "s" Command.
-* Transliteration: Other Commands.
-* Unbuffered I/O, choosing: Invoking sed.
-* Usage summary, printing: Invoking sed.
-* Version, printing: Invoking sed.
-* Working on separate files: Invoking sed.
-* Write first line to a file: Extended Commands.
-* Write to a file: Other Commands.
-* Zero, as range start address: Addresses.
-
-
-File: sed.info, Node: Command and Option Index, Prev: Concept Index, Up: Top
-
-Command and Option Index
-************************
-
- This is an alphabetical list of all `sed' commands and command-line
-options.
-
-* Menu:
-
-* # (comments): Common Commands.
-* --expression: Invoking sed.
-* --file: Invoking sed.
-* --help: Invoking sed.
-* --in-place: Invoking sed.
-* --line-length: Invoking sed.
-* --quiet: Invoking sed.
-* --regexp-extended: Invoking sed.
-* --silent: Invoking sed.
-* --unbuffered: Invoking sed.
-* --version: Invoking sed.
-* -e: Invoking sed.
-* -f: Invoking sed.
-* -i: Invoking sed.
-* -l: Invoking sed.
-* -n: Invoking sed.
-* -n, forcing from within a script: Common Commands.
-* -r: Invoking sed.
-* -u: Invoking sed.
-* : (label) command: Programming Commands.
-* = (print line number) command: Other Commands.
-* a (append text lines) command: Other Commands.
-* b (branch) command: Programming Commands.
-* c (change to text lines) command: Other Commands.
-* D (delete first line) command: Other Commands.
-* d (delete) command: Common Commands.
-* e (evaluate) command: Extended Commands.
-* G (appending Get) command: Other Commands.
-* g (get) command: Other Commands.
-* H (append Hold) command: Other Commands.
-* h (hold) command: Other Commands.
-* i (insert text lines) command: Other Commands.
-* L (fLow paragraphs) command: Extended Commands.
-* l (list unambiguously) command: Other Commands.
-* N (append Next line) command: Other Commands.
-* n (next-line) command: Common Commands.
-* P (print first line) command: Other Commands.
-* p (print) command: Common Commands.
-* q (quit) command: Common Commands.
-* Q (silent Quit) command: Extended Commands.
-* r (read file) command: Other Commands.
-* R (read line) command: Extended Commands.
-* s command, option flags: The "s" Command.
-* T (test and branch if failed) command: Extended Commands.
-* t (test and branch if successful) command: Programming Commands.
-* v (version) command: Extended Commands.
-* w (write file) command: Other Commands.
-* W (write first line) command: Extended Commands.
-* x (eXchange) command: Other Commands.
-* y (transliterate) command: Other Commands.
-* {} command grouping: Common Commands.
-
-
diff --git a/doc/sed.texi b/doc/sed.texi
index 02d80d6..72408e5 100644
--- a/doc/sed.texi
+++ b/doc/sed.texi
@@ -211,11 +211,28 @@ then exit.
@opindex --silent
@cindex Disabling autoprint, from command line
By default, @command{sed} prints out the pattern space
-at the end of each cycle through the script.
+at the end of each cycle through the script (@pxref{Execution Cycle, ,
+How @code{sed} works}).
These options disable this automatic printing,
and @command{sed} only produces output when explicitly told to
via the @code{p} command.
+@item -e @var{script}
+@itemx --expression=@var{script}
+@opindex -e
+@opindex --expression
+@cindex Script, from command line
+Add the commands in @var{script} to the set of commands to be
+run while processing the input.
+
+@item -f @var{script-file}
+@itemx --file=@var{script-file}
+@opindex -f
+@opindex --file
+@cindex Script, from a file
+Add the commands contained in the file @var{script-file}
+to the set of commands to be run while processing the input.
+
@item -i[@var{SUFFIX}]
@itemx --in-place[=@var{SUFFIX}]
@opindex -i
@@ -239,7 +256,7 @@ renamed to the output file's original name. The extension,
if supplied, is used to modify the name of the old file
before renaming the temporary file, thereby making a backup
copy@footnote{Note that @value{SSED} creates the backup
- file whether or not any output is actually changed.}).
+file whether or not any output is actually changed.}).
@cindex In-place editing, Perl-style backup file names
This rule is followed: if the extension doesn't contain a @code{*},
@@ -278,6 +295,29 @@ standard. If you want to disable only the latter kind of
extension, you can set the @code{POSIXLY_CORRECT} variable
to a non-empty value.
+@item -b
+@itemx --binary
+@opindex -b
+@opindex --binary
+This option is available on every platform, but is only effective where the
+operating system makes a distinction between text files and binary files.
+When such a distinction is made---as is the case for MS-DOS, Windows,
+Cygwin---text files are composed of lines separated by a carriage return
+@emph{and} a line feed character, and @command{sed} does not see the
+ending CR. When this option is specified, @command{sed} will open
+input files in binary mode, thus not requesting this special processing
+and considering lines to end at a line feed.
+
+@item --follow-symlinks
+@opindex --follow-symlinks
+This option is available only on platforms that support
+symbolic links and has an effect only if option @option{-i}
+is specified. In this case, if the file that is specified
+on the command line is a symbolic link, @command{sed} will
+follow the link and edit the ultimate destination of the
+link. The default behavior is to break the symbolic link,
+so that the link destination will not be modified.
+
@item -r
@itemx --regexp-extended
@opindex -r
@@ -327,22 +367,6 @@ Buffer both input and output as minimally as practical.
the likes of @samp{tail -f}, and you wish to see the transformed
output as soon as possible.)
-@item -e @var{script}
-@itemx --expression=@var{script}
-@opindex -e
-@opindex --expression
-@cindex Script, from command line
-Add the commands in @var{script} to the set of commands to be
-run while processing the input.
-
-@item -f @var{script-file}
-@itemx --file=@var{script-file}
-@opindex -f
-@opindex --file
-@cindex Script, from a file
-Add the commands contained in the file @var{script-file}
-to the set of commands to be run while processing the input.
-
@end table
If no @option{-e}, @option{-f}, @option{--expression}, or @option{--file}
@@ -411,11 +435,11 @@ executed.
When the end of the script is reached, unless the @option{-n} option
is in use, the contents of pattern space are printed out to the output
stream, adding back the trailing newline if it was removed.@footnote{Actually,
- if @command{sed} prints a line without the terminating newline, it will
- nevertheless print the missing newline as soon as more text is sent to
- the same output stream, which gives the ``least expected surprise''
- even though it does not make commands like @samp{sed -n p} exactly
- identical to @command{cat}.} Then the next cycle starts for the next
+if @command{sed} prints a line without the terminating newline, it will
+nevertheless print the missing newline as soon as more text is sent to
+the same output stream, which gives the ``least expected surprise''
+even though it does not make commands like @samp{sed -n p} exactly
+identical to @command{cat}.} Then the next cycle starts for the next
input line.
Unless special commands (like @samp{D}) are used, the pattern space is
@@ -622,7 +646,7 @@ themselves in a pattern, and match the corresponding characters
in the subject. As a trivial example, the pattern
@example
- The quick brown fox
+The quick brown fox
@end example
@noindent
@@ -693,21 +717,26 @@ Use back references (see below).
Matches any character, including newline.
@item ^
-Matches the null string at beginning of line, i.e. what
-appears after the circumflex must appear at the
-beginning of line. @code{^#include} will match only
-lines where @samp{#include} is the first thing on line---if
-there are spaces before, for example, the match fails.
-@code{^} acts as a special character only at the beginning
-of the regular expression or subexpression (that is,
-after @code{\(} or @code{\|}). Portable scripts should avoid
-@code{^} at the beginning of a subexpression, though, as
-@acronym{POSIX} allows implementations that treat @code{^} as
-an ordinary character in that context.
-
+Matches the null string at beginning of the pattern space, i.e. what
+appears after the circumflex must appear at the beginning of the
+pattern space.
+
+In most scripts, pattern space is initialized to the content of each
+line (@pxref{Execution Cycle, , How @code{sed} works}). So, it is a
+useful simplification to think of @code{^#include} as matching only
+lines where @samp{#include} is the first thing on line---if there are
+spaces before, for example, the match fails. This simplification is
+valid as long as the original content of pattern space is not modified,
+for example with an @code{s} command.
+
+@code{^} acts as a special character only at the beginning of the
+regular expression or subexpression (that is, after @code{\(} or
+@code{\|}). Portable scripts should avoid @code{^} at the beginning of
+a subexpression, though, as @acronym{POSIX} allows implementations that
+treat @code{^} as an ordinary character in that context.
@item $
-It is the same as @code{^}, but refers to end of line.
+It is the same as @code{^}, but refers to end of pattern space.
@code{$} also acts as a special character only at the end
of the regular expression or subexpression (that is, before @code{\)}
or @code{\|}), and its use at the end of a subexpression is not
@@ -1408,9 +1437,9 @@ wastes time by reading the whole file without any visible effect:
@example
:eat
-$d @i{Quit silently on the last line}
-N @i{Read another line, silently}
-g @i{Overwrite pattern space each time to save memory}
+$d @i{@r{Quit silently on the last line}}
+N @i{@r{Read another line, silently}}
+g @i{@r{Overwrite pattern space each time to save memory}}
b eat
@end example
@@ -1461,6 +1490,18 @@ This command enables all @value{SSEDEXT} even if
Write to the given filename the portion of the pattern space up to
the first newline. Everything said under the @code{w} command about
file handling holds here too.
+
+@item z
+@findex z (Zap) command
+@cindex @value{SSEDEXT}, emptying pattern space
+@cindex Emptying pattern space
+This command empties the content of pattern space. It is
+usually the same as @samp{s/.*//}, but is more efficient
+and works in the presence of invalid multibyte sequences
+in the input stream. @sc{posix} mandates that such sequences
+are @emph{not} matched by @samp{.}, so that there is no portable
+way to clear @command{sed}'s buffers in the middle of the
+script in most multibyte locales (including UTF-8 locales).
@end table
@node Escapes
@@ -1726,7 +1767,7 @@ transform it to be shell commands, then just feed them to shell.
Don't worry, even worse hacks are done when using @command{sed}; I have
seen a script converting the output of @command{date} into a @command{bc}
program!
-
+
The main body of this is the @command{sed} script, which remaps the name
from lower to upper (or vice-versa) and even checks out
if the remapped name is the same as the original name.
@@ -1751,7 +1792,7 @@ variables and proper quoting.
@group
help()
@{
- cat << eof
+ cat << eof
Usage: $0 [-n] [-r] [-h] files...
@end group
@@ -1812,7 +1853,7 @@ case `basename $0` in
*) FROM=$UPPER; TO=$LOWER ;;
esac
@end group
-
+
eval $finder | sed -n '
@group
@@ -2729,10 +2770,9 @@ In addition to several books that have been written about @command{sed}
(either specifically or as chapters in books which discuss
shell programming), one can find out more about @command{sed}
(including suggestions of a few books) from the FAQ
-for the @code{sed-users} mailing list, available from any of:
+for the @code{sed-users} mailing list, available from:
@display
- @uref{http://www.student.northpark.edu/pemente/sed/sedfaq.html}
- @uref{http://sed.sf.net/grabbag/tutorials/sedfaq.html}
+@uref{http://sed.sourceforge.net/sedfaq.html}
@end display
Also of interest are
@@ -2756,7 +2796,7 @@ of your report if at all possible.
Please do not send a bug report like this:
@example
-@i{while building frobme-1.3.4}
+@i{@i{@r{while building frobme-1.3.4}}}
$ configure
@error{} sed: file sedscr line 1: Unknown option to 's'
@end example
@@ -2805,7 +2845,7 @@ instead of just
@example
/foo/@{ N;N;N;N;N;N;N;N;N; @}
@end example
-
+
@cindex @code{POSIXLY_CORRECT} behavior, @code{N} command
In any case, the simplest workaround is to use @code{$d;N} in
scripts that rely on the traditional behavior, or to set
@@ -2873,10 +2913,14 @@ to the original name: if you rename or delete files, you're actually
modifying the contents of the directory, so the operation depends on
the permissions of the directory, not of the file. For this same
reason, @command{sed} does not let you use @option{-i} on a writeable file
-in a read-only directory (but unbelievably nobody reports that as a
-bug@dots{}).
+in a read-only directory, and will break hard or symbolic links when
+@option{-i} is used on such a file.
@item @code{0a} does not work (gives an error)
+@cindex @code{0} address
+@cindex @acronym{GNU} extensions, @code{0} address
+@cindex Non-bugs, @code{0} address
+
There is no line 0. 0 is a special address that is only used to treat
addresses like @code{0,/@var{RE}/} as active when the script starts: if
you write @code{1,/abc/d} and the first line includes the word @samp{abc},
@@ -2887,11 +2931,12 @@ is obtained with @code{0,/abc/d}.
@ifclear PERL
@item @code{[a-z]} is case insensitive
+@cindex Non-bugs, localization-related
+
You are encountering problems with locales. POSIX mandates that @code{[a-z]}
uses the current locale's collation order -- in C parlance, that means using
@code{strcoll(3)} instead of @code{strcmp(3)}. Some locales have a
-case-insensitive collation order, others don't: one of those that have
-problems is Estonian.
+case-insensitive collation order, others don't.
Another problem is that @code{[a-z]} tries to use collation symbols.
This only happens if you are on the @acronym{GNU} system, using
@@ -2904,6 +2949,22 @@ locales, or @samp{ij} in Dutch locales.
To work around these problems, which may cause bugs in shell scripts, set
the @env{LC_COLLATE} and @env{LC_CTYPE} environment variables to @samp{C}.
+
+@item @code{s/.*//} does not clear pattern space
+@cindex Non-bugs, localization-related
+@cindex @value{SSEDEXT}, emptying pattern space
+@cindex Emptying pattern space
+
+This happens if your input stream includes invalid multibyte
+sequences. @sc{posix} mandates that such sequences
+are @emph{not} matched by @samp{.}, so that @samp{s/.*//} will not clear
+pattern space as you would expect. In fact, there is no way to clear
+sed's buffers in the middle of the script in most multibyte locales
+(including UTF-8 locales). For this reason, @value{SSED} provides a `z'
+command (for `zap') as an extension.
+
+To work around these problems, which may cause bugs in shell scripts, set
+the @env{LC_COLLATE} and @env{LC_CTYPE} environment variables to @samp{C}.
@end ifclear
@end table
@@ -3065,24 +3126,25 @@ least significant 8 bits of the value. Any subsequent digits
stand for themselves. For example:
@example
- \040 @i{is another way of writing a space}
- \40 @i{is the same, provided there are fewer than 40}
- @i{previous capturing subpatterns}
- \7 @i{is always a back reference}
- \011 @i{is always a tab}
- \11 @i{might be a back reference, or another way of}
- @i{writing a tab}
- \0113 @i{is a tab followed by the character @samp{3}}
- \113 @i{is the character with octal code 113 (since there}
- @i{can be no more than 99 back references)}
- \377 @i{is a byte consisting entirely of 1 bits (@sc{ascii} 255)}
- \81 @i{is either a back reference, or a binary zero}
- @i{followed by the two characters @samp{81}}
+\040 @i{@r{is another way of writing a space}}
+\40 @i{@r{is the same, provided there are fewer than 40}}
+ @i{@r{previous capturing subpatterns}}
+\7 @i{@r{is always a back reference}}
+\011 @i{@r{is always a tab}}
+\11 @i{@r{might be a back reference, or another way of writing a tab}}
+\0113 @i{@r{is a tab followed by the character @samp{3}}}
+\113 @i{@r{is the character with octal code 113 (since there}}
+ @i{@r{can be no more than 99 back references)}}
+\377 @i{@r{is a byte consisting entirely of 1 bits (@sc{ascii} 255)}}
+\81 @i{@r{is either a back reference, or a binary zero}}
+ @i{@r{followed by the two characters @samp{81}}}
@end example
Note that octal values of 100 or greater must not be introduced
-duced by a leading zero, because no more than three octal
-digits are ever read.
+by a leading zero, because no more than three octal
+digits are ever read. Note that this applies only to the LHS
+pattern; it is not possible yet to specify more than 9 backreferences
+on the RHS of the `s' command.
All the sequences that define a single byte value can be
used both inside and outside character classes. In addition,
@@ -3301,7 +3363,7 @@ square brackets, and @value{SSED} supports this notation as well.
For example,
@example
- [01[:alpha:]%]
+[01[:alpha:]%]
@end example
@noindent
@@ -3354,7 +3416,7 @@ Perl mode. Another Perl extension is negation, which is
indicated by a circumflex character after the colon. For example,
@example
- [12[:^digit:]]
+[12[:^digit:]]
@end example
@noindent
@@ -3388,10 +3450,10 @@ the options were set or unset at the start of matching. The
following patterns all behave in exactly the same way:
@example
- (?i)abc
- a(?i)bc
- ab(?i)c
- abc(?i)
+(?i)abc
+a(?i)bc
+ab(?i)c
+abc(?i)
@end example
which in turn is the same as specifying the pattern abc with
@@ -3407,7 +3469,7 @@ An option change inside a subpattern affects only that part
of the subpattern @emph{that follows} it, so
@example
- (a(?i)b)c
+(a(?i)b)c
@end example
@noindent
@@ -3419,7 +3481,7 @@ into subsequent branches within the same subpattern. For
example,
@example
- (a(?i)b|c)
+(a(?i)b|c)
@end example
@noindent
@@ -3453,7 +3515,7 @@ For example, if the string @samp{the red king} is matched against
the pattern
@example
- the ((red|white) (king|queen))
+the ((red|white) (king|queen))
@end example
@noindent
@@ -3469,7 +3531,7 @@ number of any subsequent capturing subpatterns. For example,
if the string @samp{the white queen} is matched against the pattern
@example
- the ((?:red|white) (king|queen))
+the ((?:red|white) (king|queen))
@end example
@noindent
@@ -3484,8 +3546,8 @@ option letters may appear between the @code{?} and the
@code{:}. Thus the two patterns
@example
- (?i:saturday|sunday)
- (?:(?i)saturday|sunday)
+(?i:saturday|sunday)
+(?:(?i)saturday|sunday)
@end example
@noindent
@@ -3527,7 +3589,7 @@ The numbers must be less than 65536, and the first must be
less than or equal to the second. For example:
@example
- z@{2,4@}
+z@{2,4@}
@end example
@noindent
@@ -3538,7 +3600,7 @@ second number and the comma are both omitted, the quantifier
specifies an exact number of required matches. Thus
@example
- [aeiou]@{3,@}
+[aeiou]@{3,@}
@end example
@noindent
@@ -3546,7 +3608,7 @@ matches at least 3 successive vowels, but may match many
more, while
@example
- \d@{8@}
+\d@{8@}
@end example
@noindent
@@ -3580,7 +3642,7 @@ subpattern that can match no characters with a quantifier
that has no upper limit, for example:
@example
- (a?)*
+(a?)*
@end example
Earlier versions of Perl used to give an error at
@@ -3601,14 +3663,14 @@ the sequences @code{/*} and @code{*/} and within the sequence, individual
comments by applying the pattern
@example
- /\*.*\*/
+/\*.*\*/
@end example
@noindent
to the string
@example
- /* first command */ not comment /* second comment */
+/* first command */ not comment /* second comment */
@end example
@noindent
@@ -3626,7 +3688,7 @@ mark with its use as a quantifier in its own right.
Because it has two uses, it can sometimes appear doubled, as in
@example
- \d??\d
+\d??\d
@end example
which matches one digit by preference, but can match two if
@@ -3636,11 +3698,11 @@ Note that greediness does not matter when specifying addresses,
but can be nevertheless used to improve performance.
@ignore
- If the PCRE_UNGREEDY option is set (an option which is not
- available in Perl), the quantifiers are not greedy by
- default, but individual ones can be made greedy by following
- them with a question mark. In other words, it inverts the
- default behaviour.
+If the PCRE_UNGREEDY option is set (an option which is not
+available in Perl), the quantifiers are not greedy by
+default, but individual ones can be made greedy by following
+them with a question mark. In other words, it inverts the
+default behaviour.
@end ignore
When a parenthesized subpattern is quantified with a minimum
@@ -3661,7 +3723,7 @@ is the substring that matched the final iteration. For example,
after
@example
- (tweedle[dume]@{3@}\s*)+
+(tweedle[dume]@{3@}\s*)+
@end example
@noindent
@@ -3672,7 +3734,7 @@ values may have been set in previous iterations. For example,
after
@example
- /(a|(b))+/
+/(a|(b))+/
@end example
matches @samp{aba}, the value of the second captured substring is
@@ -3701,7 +3763,7 @@ subpattern in the current subject string, rather than
anything matching the subpattern itself. So the pattern
@example
- (sens|respons)e and \1ibility
+(sens|respons)e and \1ibility
@end example
@noindent
@@ -3711,7 +3773,7 @@ matching is in force at the time of the back reference, the
case of letters is relevant. For example,
@example
- ((?i)blah)\s+\1
+((?i)blah)\s+\1
@end example
@noindent
@@ -3725,7 +3787,7 @@ particular match, any back references to it always fail. For
example, the pattern
@example
- (a|(bc))\2
+(a|(bc))\2
@end example
@noindent
@@ -3738,6 +3800,9 @@ character, some delimiter must be used to terminate the back
reference. If the @code{X} modifier option is set, this can be
whitespace. Otherwise an empty comment can be used, or the
following character can be expressed in hexadecimal or octal.
+Note that this applies only to the LHS pattern; it is
+not possible yet to specify more than 9 backreferences on the
+RHS of the `s' command.
A back reference that occurs inside the parentheses to which
it refers fails when the subpattern is first used, so, for
@@ -3746,7 +3811,7 @@ can be useful inside repeated subpatterns. For example, the
pattern
@example
- (a|b\1)+
+(a|b\1)+
@end example
@noindent
@@ -3778,7 +3843,7 @@ changed. Lookahead assertions start with @code{(?=} for positive
assertions and @code{(?!} for negative assertions. For example,
@example
- \w+(?=;)
+\w+(?=;)
@end example
@noindent
@@ -3786,7 +3851,7 @@ matches a word followed by a semicolon, but does not include
the semicolon in the match, and
@example
- foo(?!bar)
+foo(?!bar)
@end example
@noindent
@@ -3796,7 +3861,7 @@ matches any occurrence of @samp{foo} that is not followed by
Note that the apparently similar pattern
@example
- (?!foo)bar
+(?!foo)bar
@end example
@noindent
@@ -3809,7 +3874,7 @@ Lookbehind assertions start with @code{(?<=} for positive
assertions and @code{(?<!} for negative assertions. So,
@example
- (?<!foo)bar
+(?<!foo)bar
@end example
achieves the required effect of finding an occurrence of
@@ -3822,14 +3887,14 @@ compared with Perl 5.005, which requires all branches to match
the same length of string. Thus
@example
- (?<=dogs|cats|)
+(?<=dogs|cats|)
@end example
@noindent
is permitted, but the apparently equivalent regular expression
@example
- (?<!dogs?|cats?)
+(?<!dogs?|cats?)
@end example
@noindent
@@ -3838,7 +3903,7 @@ length strings are permitted only at the top level of
a lookbehind assertion: an assertion such as
@example
- (?<=ab(c|de))
+(?<=ab(c|de))
@end example
@noindent
@@ -3847,7 +3912,7 @@ match two different lengths, but it is acceptable if rewritten
to use two top-level branches:
@example
- (?<=abc|abde)
+(?<=abc|abde)
@end example
All this is required because lookbehind assertions simply
@@ -3863,7 +3928,7 @@ Several assertions (of any sort) may occur in succession.
For example,
@example
- (?<=\d@{3@})(?<!999)foo
+(?<=\d@{3@})(?<!999)foo
@end example
@noindent
@@ -3878,7 +3943,7 @@ of which are not @samp{999}. For example, it doesn't match
@samp{123abcfoo}. A pattern to do that is
@example
- (?<=\d@{3@}...)(?<!999)foo
+(?<=\d@{3@}...)(?<!999)foo
@end example
@noindent
@@ -3889,13 +3954,13 @@ characters are not @samp{999}. Actually, assertions can be
nested in any combination, so one can write this as
@example
- (?<=\d@{3@}(?!999)...)foo
+(?<=\d@{3@}(?!999)...)foo
@end example
or
@example
- (?<=\d@{3@}...(?<!999))foo
+(?<=\d@{3@}...(?<!999))foo
@end example
@noindent
@@ -3930,7 +3995,7 @@ Consider, for example, the pattern @code{\d+foo} when applied to
the subject line
@example
- 123456bar
+123456bar
@end example
After matching all 6 digits and then failing to match @samp{foo},
@@ -3944,7 +4009,7 @@ so the matcher would give up immediately on failing to match
parenthesis, starting with @code{(?>} as in this example:
@example
- (?>\d+)bar
+(?>\d+)bar
@end example
This kind of parenthesis ``locks up'' the part of the pattern
@@ -3969,7 +4034,7 @@ assertions to specify efficient matching at the end
of the subject string. Consider a simple pattern such as
@example
- abcd$
+abcd$
@end example
@noindent
@@ -3979,7 +4044,7 @@ each @samp{a} in the subject and then see if what follows matches
the rest of the pattern. If the pattern is specified as
@example
- ^.*abcd$
+^.*abcd$
@end example
@noindent
@@ -3991,7 +4056,7 @@ last two characters, and so on. Once again the search for
no better off. However, if the pattern is written as
@example
- ^(?>.*)(?<=abcd)
+^(?>.*)(?<=abcd)
@end example
there can be no backtracking for the .* item; it can match
@@ -4005,15 +4070,15 @@ that can itself be repeated an unlimited number of
times, the use of a once-only subpattern is the only way to
avoid some failing matches taking a very long time
indeed.@footnote{Actually, the matcher embedded in @value{SSED}
- tries to do something for this in the simplest cases,
- like @code{([^b]*b)*}. These cases are actually quite
- common: they happen for example in a regular expression
- like @code{\/\*([^*]*\*)*\/} which matches C comments.}
+tries to do something for this in the simplest cases,
+like @code{([^b]*b)*}. These cases are actually quite
+common: they happen for example in a regular expression
+like @code{\/\*([^*]*\*)*\/} which matches C comments.}
The pattern
@example
- (\D+|<\d+>)*[!?]
+(\D+|<\d+>)*[!?]
@end example
([^0-9<]+<(\d+>)?)*[!?]
@@ -4025,7 +4090,7 @@ an exclamation or question mark. When it matches, it runs quickly.
However, if it is applied to
@example
- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
@end example
@noindent
@@ -4041,7 +4106,7 @@ match, and fail early if it is not present in the string.}
If the pattern is changed to
@example
- ((?>\D+)|<\d+>)*[!?]
+((?>\D+)|<\d+>)*[!?]
@end example
sequences of non-digits cannot be broken, and failure happens
@@ -4058,8 +4123,8 @@ whether a previous capturing subpattern matched or not. The
two possible forms of conditional subpattern are
@example
- (?(@var{condition})@var{yes-pattern})
- (?(@var{condition})@var{yes-pattern}|@var{no-pattern})
+(?(@var{condition})@var{yes-pattern})
+(?(@var{condition})@var{yes-pattern}|@var{no-pattern})
@end example
If the condition is satisfied, the yes-pattern is used; otherwise
@@ -4075,7 +4140,7 @@ white space to make it more readable (assume the @code{X} modifier)
and to divide it into three parts for ease of discussion:
@example
- ( \( )? [^()]+ (?(1) \) )
+( \( )? [^()]+ (?(1) \) )
@end example
The first part matches an optional opening parenthesis, and
@@ -4099,9 +4164,9 @@ non-significant white space, and with the two alternatives
on the second line:
@example
- (?(?=...[a-z])
- \d\d-[a-z]@{3@}-\d\d |
- \d\d-\d\d-\d\d )
+(?(?=...[a-z])
+ \d\d-[a-z]@{3@}-\d\d |
+ \d\d-\d\d-\d\d )
@end example
The condition is a positive lookahead assertion that matches
@@ -4130,7 +4195,7 @@ tern to solve the parentheses problem can be created like
this:
@example
- $re = qr@{\( (?: (?>[^()]+) | (?p@{$re@}) )* \)@}x;
+$re = qr@{\( (?: (?>[^()]+) | (?p@{$re@}) )* \)@}x;
@end example
The @code{(?p@{...@})} item interpolates Perl code at run time,
@@ -4142,7 +4207,7 @@ parentheses problem (assume the @code{X} modifier option is used
so that white space is ignored):
@example
- \( ( (?>[^()]+) | (?R) )* \)
+\( ( (?>[^()]+) | (?R) )* \)
@end example
First it matches an opening parenthesis. Then it matches any
@@ -4158,7 +4223,7 @@ the pattern to strings that do not match. For example, when
it is applied to
@example
- (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
+(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa()
@end example
it yields a ``no match'' response quickly. However, if a
@@ -4172,7 +4237,7 @@ the outermost level of the recursion at which the subpattern
value is set. If the pattern above is matched against
@example
- (ab(cd)ef)
+(ab(cd)ef)
@end example
@noindent
diff --git a/doc/sed.x b/doc/sed.x
index 10fe1ee..2d764df 100644
--- a/doc/sed.x
+++ b/doc/sed.x
@@ -67,15 +67,15 @@ Insert
.IR text ,
which has each embedded newline preceded by a backslash.
.TP
-q
+q [\fIexit-code\fR]
Immediately quit the \*(sd script without processing
-any more input,
-except that if auto-print is not disabled
-the current pattern space will be printed.
+any more input, except that if auto-print is not disabled
+the current pattern space will be printed. The exit code
+argument is a GNU extension.
.TP
-Q
+Q [\fIexit-code\fR]
Immediately quit the \*(sd script without processing
-any more input.
+any more input. This is a GNU extension.
.TP
.RI r\ filename
Append text read from
@@ -84,6 +84,8 @@ Append text read from
.RI R\ filename
Append a line read from
.IR filename .
+Each invocation of the command reads a line from the file.
+This is a GNU extension.
.SS
Commands which accept address ranges
.TP
@@ -113,7 +115,8 @@ command, then branch to
.IR label ;
if
.I label
-is omitted, branch to end of script.
+is omitted, branch to end of script. This is a GNU
+extension.
.TP
c \e
.TP
@@ -143,6 +146,12 @@ Exchange the contents of the hold and pattern spaces.
l
List out the current line in a ``visually unambiguous'' form.
.TP
+.RI l\ width
+List out the current line in a ``visually unambiguous'' form,
+breaking it at
+.I width
+characters. This is a GNU extension.
+.TP
n N
Read/append the next line of input into the pattern space.
.TP
@@ -175,6 +184,7 @@ Write the current pattern space to
.RI W\ filename
Write the first line of the current pattern space to
.IR filename .
+This is a GNU extension.
.TP
.RI y/ source / dest /
Transliterate the characters in the pattern space which appear in
@@ -231,7 +241,11 @@ line starting with line
.IR first .
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. (This is an extension.)
+starting with the second.
+.I first
+can be zero; in this case, \*(sd operates as if it were equal to
+.IR step .
+(This is an extension.)
.TP
$
Match the last line.
@@ -262,6 +276,9 @@ matches the very first line of input the
form will be at the end of its range, whereas the
.RI 1, addr2
form will still be at the beginning of its range.
+This works only when
+.I addr2
+is a regular expression.
.TP
.IR addr1 ,+ N
Will match
diff --git a/doc/stamp-vti b/doc/stamp-vti
index 16cb2b4..2a7ae14 100644
--- a/doc/stamp-vti
+++ b/doc/stamp-vti
@@ -1,4 +1,4 @@
-@set UPDATED 30 January 2006
-@set UPDATED-MONTH January 2006
-@set EDITION 4.1.5
-@set VERSION 4.1.5
+@set UPDATED 27 April 2009
+@set UPDATED-MONTH April 2009
+@set EDITION 4.2
+@set VERSION 4.2
diff --git a/doc/version.texi b/doc/version.texi
index 16cb2b4..2a7ae14 100644
--- a/doc/version.texi
+++ b/doc/version.texi
@@ -1,4 +1,4 @@
-@set UPDATED 30 January 2006
-@set UPDATED-MONTH January 2006
-@set EDITION 4.1.5
-@set VERSION 4.1.5
+@set UPDATED 27 April 2009
+@set UPDATED-MONTH April 2009
+@set EDITION 4.2
+@set VERSION 4.2
diff --git a/intl/ChangeLog b/intl/ChangeLog
deleted file mode 100644
index 586cc92..0000000
--- a/intl/ChangeLog
+++ /dev/null
@@ -1,4 +0,0 @@
-2002-01-31 GNU <bug-gnu-gettext@gnu.org>
-
- * Version 0.11 released.
-
diff --git a/intl/Makefile.in b/intl/Makefile.in
deleted file mode 100644
index 1a1f8f4..0000000
--- a/intl/Makefile.in
+++ /dev/null
@@ -1,337 +0,0 @@
-# Makefile for directory with message catalog handling in GNU NLS Utilities.
-# Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Library General Public License as published
-# by the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library 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.
-
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-top_builddir = ..
-VPATH = @srcdir@
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-transform = @program_transform_name@
-libdir = @libdir@
-includedir = @includedir@
-datadir = @datadir@
-localedir = $(datadir)/locale
-gettextsrcdir = $(datadir)/gettext/intl
-aliaspath = $(localedir)
-subdir = intl
-
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
-
-l = @INTL_LIBTOOL_SUFFIX_PREFIX@
-
-AR = ar
-CC = @CC@
-LIBTOOL = @LIBTOOL@
-RANLIB = @RANLIB@
-YACC = @INTLBISON@ -y -d
-YFLAGS = --name-prefix=__gettext
-
-DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
--DLIBDIR=\"$(libdir)\" -DIN_LIBINTL @DEFS@
-CPPFLAGS = @CPPFLAGS@
-CFLAGS = @CFLAGS@
-LDFLAGS = @LDFLAGS@
-
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
-
-HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h
-COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h
-SOURCES = $(COMSRCS) intl-compat.c
-COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
-finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
-explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
-plural-exp.c localcharset.c localename.c osdep.c os2compat.c
-OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
-finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
-explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
-plural.$lo plural-exp.$lo localcharset.$lo localename.$lo osdep.$lo
-GETTOBJS = intl-compat.$lo
-DISTFILES.common = Makefile.in \
-config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
-DISTFILES.generated = plural.c
-DISTFILES.normal = VERSION
-DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc
-DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
-COPYING.LIB-2 gettext.h libgettext.h plural-eval.c
-
-# Libtool's library version information for libintl.
-# Before making a gettext release, the gettext maintainer must change this
-# according to the libtool documentation, section "Library interface versions".
-# Maintainers of other packages that include the intl directory must *not*
-# change these values.
-LTV_CURRENT=2
-LTV_REVISION=0
-LTV_AGE=0
-
-.SUFFIXES:
-.SUFFIXES: .c .y .o .lo .sin .sed
-.c.o:
- $(COMPILE) $<
-.c.lo:
- $(LIBTOOL) --mode=compile $(COMPILE) $<
-
-.y.c:
- $(YACC) $(YFLAGS) --output $@ $<
- rm -f $*.h
-
-.sin.sed:
- sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
- mv t-$@ $@
-
-INCLUDES = -I.. -I. -I$(top_srcdir)/intl
-
-all: all-@USE_INCLUDED_LIBINTL@
-all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
-all-no: all-no-@BUILD_INCLUDED_LIBINTL@
-all-no-yes: libgnuintl.$la
-all-no-no:
-
-libintl.a libgnuintl.a: $(OBJECTS)
- rm -f $@
- $(AR) cru $@ $(OBJECTS)
- $(RANLIB) $@
-
-libintl.la libgnuintl.la: $(OBJECTS)
- $(LIBTOOL) --mode=link \
- $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
- $(OBJECTS) @LTLIBICONV@ -lc \
- -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
- -rpath $(libdir) \
- -no-undefined
-
-libintl.h: libgnuintl.h
- cp $(srcdir)/libgnuintl.h libintl.h
-
-charset.alias: config.charset
- $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
- mv t-$@ $@
-
-check: all
-
-# This installation goal is only used in GNU gettext. Packages which
-# only use the library should use install instead.
-
-# We must not install the libintl.h/libintl.a files if we are on a
-# system which has the GNU gettext() function in its C library or in a
-# separate library.
-# If you want to use the one which comes with this version of the
-# package, you have to use `configure --with-included-gettext'.
-install: install-exec install-data
-install-exec: all
- if test "$(PACKAGE)" = "gettext" \
- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
- $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
- $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
- $(LIBTOOL) --mode=install \
- $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
- else \
- : ; \
- fi
- if test '@USE_INCLUDED_LIBINTL@' = yes; then \
- test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
- temp=$(DESTDIR)$(libdir)/t-charset.alias; \
- dest=$(DESTDIR)$(libdir)/charset.alias; \
- if test -f $(DESTDIR)$(libdir)/charset.alias; then \
- orig=$(DESTDIR)$(libdir)/charset.alias; \
- sed -f ref-add.sed $$orig > $$temp; \
- $(INSTALL_DATA) $$temp $$dest; \
- rm -f $$temp; \
- else \
- if test @GLIBC21@ = no; then \
- orig=charset.alias; \
- sed -f ref-add.sed $$orig > $$temp; \
- $(INSTALL_DATA) $$temp $$dest; \
- rm -f $$temp; \
- fi; \
- fi; \
- $(mkinstalldirs) $(DESTDIR)$(localedir); \
- test -f $(DESTDIR)$(localedir)/locale.alias \
- && orig=$(DESTDIR)$(localedir)/locale.alias \
- || orig=$(srcdir)/locale.alias; \
- temp=$(DESTDIR)$(localedir)/t-locale.alias; \
- dest=$(DESTDIR)$(localedir)/locale.alias; \
- sed -f ref-add.sed $$orig > $$temp; \
- $(INSTALL_DATA) $$temp $$dest; \
- rm -f $$temp; \
- else \
- : ; \
- fi
-install-data: all
- if test "$(PACKAGE)" = "gettext"; then \
- $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
- $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
- $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
- dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
- for file in $$dists; do \
- $(INSTALL_DATA) $(srcdir)/$$file \
- $(DESTDIR)$(gettextsrcdir)/$$file; \
- done; \
- chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
- dists="$(DISTFILES.generated)"; \
- for file in $$dists; do \
- if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
- $(INSTALL_DATA) $$dir/$$file \
- $(DESTDIR)$(gettextsrcdir)/$$file; \
- done; \
- dists="$(DISTFILES.obsolete)"; \
- for file in $$dists; do \
- rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
- done; \
- else \
- : ; \
- fi
-
-install-strip: install
-
-installdirs:
- if test "$(PACKAGE)" = "gettext" \
- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
- $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
- else \
- : ; \
- fi
- if test '@USE_INCLUDED_LIBINTL@' = yes; then \
- test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
- $(mkinstalldirs) $(DESTDIR)$(localedir); \
- else \
- : ; \
- fi
- if test "$(PACKAGE)" = "gettext"; then \
- $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
- else \
- : ; \
- fi
-
-# Define this as empty until I found a useful application.
-installcheck:
-
-uninstall:
- if test "$(PACKAGE)" = "gettext" \
- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
- rm -f $(DESTDIR)$(includedir)/libintl.h; \
- $(LIBTOOL) --mode=uninstall \
- rm -f $(DESTDIR)$(libdir)/libintl.$la; \
- else \
- : ; \
- fi
- if test '@USE_INCLUDED_LIBINTL@' = yes; then \
- if test -f $(DESTDIR)$(libdir)/charset.alias; then \
- temp=$(DESTDIR)$(libdir)/t-charset.alias; \
- dest=$(DESTDIR)$(libdir)/charset.alias; \
- sed -f ref-del.sed $$dest > $$temp; \
- if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
- rm -f $$dest; \
- else \
- $(INSTALL_DATA) $$temp $$dest; \
- fi; \
- rm -f $$temp; \
- fi; \
- if test -f $(DESTDIR)$(localedir)/locale.alias; then \
- temp=$(DESTDIR)$(localedir)/t-locale.alias; \
- dest=$(DESTDIR)$(localedir)/locale.alias; \
- sed -f ref-del.sed $$dest > $$temp; \
- if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
- rm -f $$dest; \
- else \
- $(INSTALL_DATA) $$temp $$dest; \
- fi; \
- rm -f $$temp; \
- fi; \
- else \
- : ; \
- fi
- if test "$(PACKAGE)" = "gettext"; then \
- for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
- rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
- done; \
- else \
- : ; \
- fi
-
-info dvi:
-
-$(OBJECTS): ../config.h libgnuintl.h
-bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: gettextP.h gmo.h loadinfo.h
-dcigettext.$lo: hash-string.h
-explodename.$lo l10nflist.$lo: loadinfo.h
-dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: plural-exp.h
-dcigettext.$lo: eval-plural.h
-
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES)
- here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
-
-id: ID
-
-ID: $(HEADERS) $(SOURCES)
- here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
-
-
-mostlyclean:
- rm -f *.a *.la *.o *.lo core core.*
- rm -f libintl.h charset.alias ref-add.sed ref-del.sed
- rm -f -r .libs _libs
-
-clean: mostlyclean
-
-distclean: clean
- rm -f Makefile ID TAGS
- if test "$(PACKAGE)" = gettext; then \
- rm -f ChangeLog.inst $(DISTFILES.normal); \
- else \
- : ; \
- fi
-
-maintainer-clean: distclean
- @echo "This command is intended for maintainers to use;"
- @echo "it deletes files that may require special tools to rebuild."
-
-
-# GNU gettext needs not contain the file `VERSION' but contains some
-# other files which should not be distributed in other packages.
-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
-dist distdir: Makefile
- if test "$(PACKAGE)" = gettext; then \
- additional="$(DISTFILES.gettext)"; \
- else \
- additional="$(DISTFILES.normal)"; \
- fi; \
- $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
- for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
- if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
- cp -p $$dir/$$file $(distdir); \
- done
-
-Makefile: Makefile.in ../config.status
- cd .. \
- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/intl/VERSION b/intl/VERSION
deleted file mode 100644
index 5f40d9a..0000000
--- a/intl/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-GNU gettext library from gettext-0.11
diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c
deleted file mode 100644
index 7c36989..0000000
--- a/intl/bindtextdom.c
+++ /dev/null
@@ -1,369 +0,0 @@
-/* Implementation of the bindtextdomain(3) function
- Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-#include "gettextP.h"
-
-#ifdef _LIBC
-/* We have to handle multi-threaded applications. */
-# include <bits/libc-lock.h>
-#else
-/* Provide dummy implementation if this is outside glibc. */
-# define __libc_rwlock_define(CLASS, NAME)
-# define __libc_rwlock_wrlock(NAME)
-# define __libc_rwlock_unlock(NAME)
-#endif
-
-/* The internal variables in the standalone libintl.a must have different
- names than the internal variables in GNU libc, otherwise programs
- using libintl.a cannot be linked statically. */
-#if !defined _LIBC
-# define _nl_default_dirname _nl_default_dirname__
-# define _nl_domain_bindings _nl_domain_bindings__
-#endif
-
-/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
-#ifndef offsetof
-# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Contains the default location of the message catalogs. */
-extern const char _nl_default_dirname[];
-
-/* List with bindings of specific domains. */
-extern struct binding *_nl_domain_bindings;
-
-/* Lock variable to protect the global data in the gettext implementation. */
-__libc_rwlock_define (extern, _nl_state_lock)
-
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define BINDTEXTDOMAIN __bindtextdomain
-# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
-# ifndef strdup
-# define strdup(str) __strdup (str)
-# endif
-#else
-# define BINDTEXTDOMAIN bindtextdomain__
-# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
-#endif
-
-/* Prototypes for local functions. */
-static void set_binding_values PARAMS ((const char *domainname,
- const char **dirnamep,
- const char **codesetp));
-
-/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
- to be used for the DOMAINNAME message catalog.
- If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
- modified, only the current value is returned.
- If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
- modified nor returned. */
-static void
-set_binding_values (domainname, dirnamep, codesetp)
- const char *domainname;
- const char **dirnamep;
- const char **codesetp;
-{
- struct binding *binding;
- int modified;
-
- /* Some sanity checks. */
- if (domainname == NULL || domainname[0] == '\0')
- {
- if (dirnamep)
- *dirnamep = NULL;
- if (codesetp)
- *codesetp = NULL;
- return;
- }
-
- __libc_rwlock_wrlock (_nl_state_lock);
-
- modified = 0;
-
- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
- {
- int compare = strcmp (domainname, binding->domainname);
- if (compare == 0)
- /* We found it! */
- break;
- if (compare < 0)
- {
- /* It is not in the list. */
- binding = NULL;
- break;
- }
- }
-
- if (binding != NULL)
- {
- if (dirnamep)
- {
- const char *dirname = *dirnamep;
-
- if (dirname == NULL)
- /* The current binding has be to returned. */
- *dirnamep = binding->dirname;
- else
- {
- /* The domain is already bound. If the new value and the old
- one are equal we simply do nothing. Otherwise replace the
- old binding. */
- char *result = binding->dirname;
- if (strcmp (dirname, result) != 0)
- {
- if (strcmp (dirname, _nl_default_dirname) == 0)
- result = (char *) _nl_default_dirname;
- else
- {
-#if defined _LIBC || defined HAVE_STRDUP
- result = strdup (dirname);
-#else
- size_t len = strlen (dirname) + 1;
- result = (char *) malloc (len);
- if (__builtin_expect (result != NULL, 1))
- memcpy (result, dirname, len);
-#endif
- }
-
- if (__builtin_expect (result != NULL, 1))
- {
- if (binding->dirname != _nl_default_dirname)
- free (binding->dirname);
-
- binding->dirname = result;
- modified = 1;
- }
- }
- *dirnamep = result;
- }
- }
-
- if (codesetp)
- {
- const char *codeset = *codesetp;
-
- if (codeset == NULL)
- /* The current binding has be to returned. */
- *codesetp = binding->codeset;
- else
- {
- /* The domain is already bound. If the new value and the old
- one are equal we simply do nothing. Otherwise replace the
- old binding. */
- char *result = binding->codeset;
- if (result == NULL || strcmp (codeset, result) != 0)
- {
-#if defined _LIBC || defined HAVE_STRDUP
- result = strdup (codeset);
-#else
- size_t len = strlen (codeset) + 1;
- result = (char *) malloc (len);
- if (__builtin_expect (result != NULL, 1))
- memcpy (result, codeset, len);
-#endif
-
- if (__builtin_expect (result != NULL, 1))
- {
- if (binding->codeset != NULL)
- free (binding->codeset);
-
- binding->codeset = result;
- binding->codeset_cntr++;
- modified = 1;
- }
- }
- *codesetp = result;
- }
- }
- }
- else if ((dirnamep == NULL || *dirnamep == NULL)
- && (codesetp == NULL || *codesetp == NULL))
- {
- /* Simply return the default values. */
- if (dirnamep)
- *dirnamep = _nl_default_dirname;
- if (codesetp)
- *codesetp = NULL;
- }
- else
- {
- /* We have to create a new binding. */
- size_t len = strlen (domainname) + 1;
- struct binding *new_binding =
- (struct binding *) malloc (offsetof (struct binding, domainname) + len);
-
- if (__builtin_expect (new_binding == NULL, 0))
- goto failed;
-
- memcpy (new_binding->domainname, domainname, len);
-
- if (dirnamep)
- {
- const char *dirname = *dirnamep;
-
- if (dirname == NULL)
- /* The default value. */
- dirname = _nl_default_dirname;
- else
- {
- if (strcmp (dirname, _nl_default_dirname) == 0)
- dirname = _nl_default_dirname;
- else
- {
- char *result;
-#if defined _LIBC || defined HAVE_STRDUP
- result = strdup (dirname);
- if (__builtin_expect (result == NULL, 0))
- goto failed_dirname;
-#else
- size_t len = strlen (dirname) + 1;
- result = (char *) malloc (len);
- if (__builtin_expect (result == NULL, 0))
- goto failed_dirname;
- memcpy (result, dirname, len);
-#endif
- dirname = result;
- }
- }
- *dirnamep = dirname;
- new_binding->dirname = (char *) dirname;
- }
- else
- /* The default value. */
- new_binding->dirname = (char *) _nl_default_dirname;
-
- new_binding->codeset_cntr = 0;
-
- if (codesetp)
- {
- const char *codeset = *codesetp;
-
- if (codeset != NULL)
- {
- char *result;
-
-#if defined _LIBC || defined HAVE_STRDUP
- result = strdup (codeset);
- if (__builtin_expect (result == NULL, 0))
- goto failed_codeset;
-#else
- size_t len = strlen (codeset) + 1;
- result = (char *) malloc (len);
- if (__builtin_expect (result == NULL, 0))
- goto failed_codeset;
- memcpy (result, codeset, len);
-#endif
- codeset = result;
- new_binding->codeset_cntr++;
- }
- *codesetp = codeset;
- new_binding->codeset = (char *) codeset;
- }
- else
- new_binding->codeset = NULL;
-
- /* Now enqueue it. */
- if (_nl_domain_bindings == NULL
- || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
- {
- new_binding->next = _nl_domain_bindings;
- _nl_domain_bindings = new_binding;
- }
- else
- {
- binding = _nl_domain_bindings;
- while (binding->next != NULL
- && strcmp (domainname, binding->next->domainname) > 0)
- binding = binding->next;
-
- new_binding->next = binding->next;
- binding->next = new_binding;
- }
-
- modified = 1;
-
- /* Here we deal with memory allocation failures. */
- if (0)
- {
- failed_codeset:
- if (new_binding->dirname != _nl_default_dirname)
- free (new_binding->dirname);
- failed_dirname:
- free (new_binding);
- failed:
- if (dirnamep)
- *dirnamep = NULL;
- if (codesetp)
- *codesetp = NULL;
- }
- }
-
- /* If we modified any binding, we flush the caches. */
- if (modified)
- ++_nl_msg_cat_cntr;
-
- __libc_rwlock_unlock (_nl_state_lock);
-}
-
-/* Specify that the DOMAINNAME message catalog will be found
- in DIRNAME rather than in the system locale data base. */
-char *
-BINDTEXTDOMAIN (domainname, dirname)
- const char *domainname;
- const char *dirname;
-{
- set_binding_values (domainname, &dirname, NULL);
- return (char *) dirname;
-}
-
-/* Specify the character encoding in which the messages from the
- DOMAINNAME message catalog will be returned. */
-char *
-BIND_TEXTDOMAIN_CODESET (domainname, codeset)
- const char *domainname;
- const char *codeset;
-{
- set_binding_values (domainname, NULL, &codeset);
- return (char *) codeset;
-}
-
-#ifdef _LIBC
-/* Aliases for function names in GNU C Library. */
-weak_alias (__bindtextdomain, bindtextdomain);
-weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
-#endif
diff --git a/intl/config.charset b/intl/config.charset
deleted file mode 100755
index 263cbcf..0000000
--- a/intl/config.charset
+++ /dev/null
@@ -1,440 +0,0 @@
-#! /bin/sh
-# Output a system dependent table of character encoding aliases.
-#
-# Copyright (C) 2000-2002 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Library General Public License as published
-# by the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library 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.
-#
-# 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 used by which systems a MIME name?
-# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
-# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
-# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
-# ISO-8859-3 glibc yes
-# ISO-8859-4 osf solaris freebsd yes
-# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
-# ISO-8859-6 glibc aix hpux solaris yes
-# ISO-8859-7 glibc aix hpux irix osf solaris yes
-# ISO-8859-8 glibc aix hpux osf solaris yes
-# ISO-8859-9 glibc aix hpux irix osf solaris yes
-# ISO-8859-13 glibc
-# ISO-8859-15 glibc aix osf solaris freebsd
-# KOI8-R glibc solaris freebsd yes
-# KOI8-U glibc freebsd yes
-# 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 dos
-# CP869 dos
-# CP874 win32 dos
-# CP922 aix
-# CP932 aix win32 dos
-# CP943 aix
-# CP949 osf win32 dos
-# CP950 win32 dos
-# CP1046 aix
-# CP1124 aix
-# CP1129 aix
-# CP1250 win32
-# CP1251 glibc win32
-# CP1252 aix win32
-# CP1253 win32
-# CP1254 win32
-# CP1255 win32
-# CP1256 win32
-# CP1257 win32
-# GB2312 glibc aix hpux irix solaris freebsd yes
-# EUC-JP glibc aix hpux irix osf solaris freebsd yes
-# EUC-KR glibc aix hpux irix osf solaris freebsd yes
-# EUC-TW glibc aix hpux irix osf solaris
-# BIG5 glibc aix hpux osf solaris freebsd yes
-# BIG5-HKSCS glibc
-# GBK aix osf win32 dos
-# GB18030 glibc
-# SHIFT_JIS hpux osf solaris freebsd yes
-# JOHAB glibc win32
-# TIS-620 glibc aix hpux osf solaris
-# VISCII glibc yes
-# 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 glibc aix hpux osf solaris yes
-#
-# 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* | *-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-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 "BIG5 BIG5"
- echo "gb2312 GB2312"
- echo "cns11643 EUC-TW"
- echo "5601 EUC-KR"
- 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* | os2*)
- # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
- # localcharset.c falls back to using the full locale name
- # from the environment variables.
- # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
- # reuse FreeBSD's locale data for OS/2.
- echo "C ASCII"
- echo "US-ASCII ASCII"
- for l in la_LN lt_LN; do
- 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"
- ;;
- beos*)
- # BeOS has 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 <st001906@hrz1.hrz.tu-darmstadt.de>"
- echo "# and Bruno Haible <haible@clisp.cons.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_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 KOI8-R" # not CP866 ??
- echo "ru_RU KOI8-R" # not CP866 ??
- # 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/intl/dcgettext.c b/intl/dcgettext.c
deleted file mode 100644
index de3e0c0..0000000
--- a/intl/dcgettext.c
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Implementation of the dcgettext(3) function.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DCGETTEXT __dcgettext
-# define DCIGETTEXT __dcigettext
-#else
-# define DCGETTEXT dcgettext__
-# define DCIGETTEXT dcigettext__
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
-char *
-DCGETTEXT (domainname, msgid, category)
- const char *domainname;
- const char *msgid;
- int category;
-{
- return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__dcgettext, dcgettext);
-#endif
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
deleted file mode 100644
index 36d2c7f..0000000
--- a/intl/dcigettext.c
+++ /dev/null
@@ -1,1167 +0,0 @@
-/* Implementation of the internal dcigettext function.
- Copyright (C) 1995-1999, 2000-2002 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-/* Tell glibc's <string.h> to provide a prototype for mempcpy().
- This must come before <config.h> because <config.h> may include
- <features.h>, and once <features.h> has been included, it's too late. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <sys/types.h>
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-# define HAVE_ALLOCA 1
-#else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca
-char *alloca ();
-# endif
-# endif
-# endif
-#endif
-
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-#ifndef __set_errno
-# define __set_errno(val) errno = (val)
-#endif
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
-
-#include <locale.h>
-
-#if defined HAVE_SYS_PARAM_H || defined _LIBC
-# include <sys/param.h>
-#endif
-
-#include "gettextP.h"
-#include "plural-exp.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-#include "hash-string.h"
-
-/* Thread safetyness. */
-#ifdef _LIBC
-# include <bits/libc-lock.h>
-#else
-/* Provide dummy implementation if this is outside glibc. */
-# define __libc_lock_define_initialized(CLASS, NAME)
-# define __libc_lock_lock(NAME)
-# define __libc_lock_unlock(NAME)
-# define __libc_rwlock_define_initialized(CLASS, NAME)
-# define __libc_rwlock_rdlock(NAME)
-# define __libc_rwlock_unlock(NAME)
-#endif
-
-/* Alignment of types. */
-#if defined __GNUC__ && __GNUC__ >= 2
-# define alignof(TYPE) __alignof__ (TYPE)
-#else
-# define alignof(TYPE) \
- ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
-#endif
-
-/* The internal variables in the standalone libintl.a must have different
- names than the internal variables in GNU libc, otherwise programs
- using libintl.a cannot be linked statically. */
-#if !defined _LIBC
-# define _nl_default_default_domain _nl_default_default_domain__
-# define _nl_current_default_domain _nl_current_default_domain__
-# define _nl_default_dirname _nl_default_dirname__
-# define _nl_domain_bindings _nl_domain_bindings__
-#endif
-
-/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
-#ifndef offsetof
-# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
-#endif
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ANSI C functions. This is required by the standard
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
-# define getcwd __getcwd
-# ifndef stpcpy
-# define stpcpy __stpcpy
-# endif
-# define tfind __tfind
-#else
-# if !defined HAVE_GETCWD
-char *getwd ();
-# define getcwd(buf, max) getwd (buf)
-# else
-char *getcwd ();
-# endif
-# ifndef HAVE_STPCPY
-static char *stpcpy PARAMS ((char *dest, const char *src));
-# endif
-# ifndef HAVE_MEMPCPY
-static void *mempcpy PARAMS ((void *dest, const void *src, size_t n));
-# endif
-#endif
-
-/* Amount to increase buffer size by in each try. */
-#define PATH_INCR 32
-
-/* The following is from pathmax.h. */
-/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
- PATH_MAX but might cause redefinition warnings when sys/param.h is
- later included (as on MORE/BSD 4.3). */
-#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
-# include <limits.h>
-#endif
-
-#ifndef _POSIX_PATH_MAX
-# define _POSIX_PATH_MAX 255
-#endif
-
-#if !defined PATH_MAX && defined _PC_PATH_MAX
-# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
-#endif
-
-/* Don't include sys/param.h if it already has been. */
-#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
-# include <sys/param.h>
-#endif
-
-#if !defined PATH_MAX && defined MAXPATHLEN
-# define PATH_MAX MAXPATHLEN
-#endif
-
-#ifndef PATH_MAX
-# define PATH_MAX _POSIX_PATH_MAX
-#endif
-
-/* Pathname support.
- ISSLASH(C) tests whether C is a directory separator character.
- IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
- it may be concatenated to a directory pathname.
- IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
- */
-#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
- /* Win32, OS/2, DOS */
-# define ISSLASH(C) ((C) == '/' || (C) == '\\')
-# define HAS_DEVICE(P) \
- ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
- && (P)[1] == ':')
-# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
-# define IS_PATH_WITH_DIR(P) \
- (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
-#else
- /* Unix */
-# define ISSLASH(C) ((C) == '/')
-# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
-# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
-#endif
-
-/* This is the type used for the search tree where known translations
- are stored. */
-struct known_translation_t
-{
- /* Domain in which to search. */
- char *domainname;
-
- /* The category. */
- int category;
-
- /* State of the catalog counter at the point the string was found. */
- int counter;
-
- /* Catalog where the string was found. */
- struct loaded_l10nfile *domain;
-
- /* And finally the translation. */
- const char *translation;
- size_t translation_length;
-
- /* Pointer to the string in question. */
- char msgid[ZERO];
-};
-
-/* Root of the search tree with known translations. We can use this
- only if the system provides the `tsearch' function family. */
-#if defined HAVE_TSEARCH || defined _LIBC
-# include <search.h>
-
-static void *root;
-
-# ifdef _LIBC
-# define tsearch __tsearch
-# endif
-
-/* Function to compare two entries in the table of known translations. */
-static int transcmp PARAMS ((const void *p1, const void *p2));
-static int
-transcmp (p1, p2)
- const void *p1;
- const void *p2;
-{
- const struct known_translation_t *s1;
- const struct known_translation_t *s2;
- int result;
-
- s1 = (const struct known_translation_t *) p1;
- s2 = (const struct known_translation_t *) p2;
-
- result = strcmp (s1->msgid, s2->msgid);
- if (result == 0)
- {
- result = strcmp (s1->domainname, s2->domainname);
- if (result == 0)
- /* We compare the category last (though this is the cheapest
- operation) since it is hopefully always the same (namely
- LC_MESSAGES). */
- result = s1->category - s2->category;
- }
-
- return result;
-}
-#endif
-
-/* Name of the default domain used for gettext(3) prior any call to
- textdomain(3). The default value for this is "messages". */
-const char _nl_default_default_domain[] = "messages";
-
-/* Value used as the default domain for gettext(3). */
-const char *_nl_current_default_domain = _nl_default_default_domain;
-
-/* Contains the default location of the message catalogs. */
-#if defined __EMX__
-extern const char _nl_default_dirname[];
-#else
-const char _nl_default_dirname[] = LOCALEDIR;
-#endif
-
-/* List with bindings of specific domains created by bindtextdomain()
- calls. */
-struct binding *_nl_domain_bindings;
-
-/* Prototypes for local functions. */
-static char *plural_lookup PARAMS ((struct loaded_l10nfile *domain,
- unsigned long int n,
- const char *translation,
- size_t translation_len))
- internal_function;
-static const char *category_to_name PARAMS ((int category)) internal_function;
-static const char *guess_category_value PARAMS ((int category,
- const char *categoryname))
- internal_function;
-
-
-/* For those loosing systems which don't have `alloca' we have to add
- some additional code emulating it. */
-#ifdef HAVE_ALLOCA
-/* Nothing has to be done. */
-# define ADD_BLOCK(list, address) /* nothing */
-# define FREE_BLOCKS(list) /* nothing */
-#else
-struct block_list
-{
- void *address;
- struct block_list *next;
-};
-# define ADD_BLOCK(list, addr) \
- do { \
- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
- /* If we cannot get a free block we cannot add the new element to \
- the list. */ \
- if (newp != NULL) { \
- newp->address = (addr); \
- newp->next = (list); \
- (list) = newp; \
- } \
- } while (0)
-# define FREE_BLOCKS(list) \
- do { \
- while (list != NULL) { \
- struct block_list *old = list; \
- list = list->next; \
- free (old); \
- } \
- } while (0)
-# undef alloca
-# define alloca(size) (malloc (size))
-#endif /* have alloca */
-
-
-#ifdef _LIBC
-/* List of blocks allocated for translations. */
-typedef struct transmem_list
-{
- struct transmem_list *next;
- char data[ZERO];
-} transmem_block_t;
-static struct transmem_list *transmem_list;
-#else
-typedef unsigned char transmem_block_t;
-#endif
-
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DCIGETTEXT __dcigettext
-#else
-# define DCIGETTEXT dcigettext__
-#endif
-
-/* Lock variable to protect the global data in the gettext implementation. */
-#ifdef _LIBC
-__libc_rwlock_define_initialized (, _nl_state_lock)
-#endif
-
-/* Checking whether the binaries runs SUID must be done and glibc provides
- easier methods therefore we make a difference here. */
-#ifdef _LIBC
-# define ENABLE_SECURE __libc_enable_secure
-# define DETERMINE_SECURE
-#else
-# ifndef HAVE_GETUID
-# define getuid() 0
-# endif
-# ifndef HAVE_GETGID
-# define getgid() 0
-# endif
-# ifndef HAVE_GETEUID
-# define geteuid() getuid()
-# endif
-# ifndef HAVE_GETEGID
-# define getegid() getgid()
-# endif
-static int enable_secure;
-# define ENABLE_SECURE (enable_secure == 1)
-# define DETERMINE_SECURE \
- if (enable_secure == 0) \
- { \
- if (getuid () != geteuid () || getgid () != getegid ()) \
- enable_secure = 1; \
- else \
- enable_secure = -1; \
- }
-#endif
-
-/* Get the function to evaluate the plural expression. */
-#include "eval-plural.h"
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current
- CATEGORY locale and, if PLURAL is nonzero, search over string
- depending on the plural form determined by N. */
-char *
-DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- int plural;
- unsigned long int n;
- int category;
-{
-#ifndef HAVE_ALLOCA
- struct block_list *block_list = NULL;
-#endif
- struct loaded_l10nfile *domain;
- struct binding *binding;
- const char *categoryname;
- const char *categoryvalue;
- char *dirname, *xdomainname;
- char *single_locale;
- char *retval;
- size_t retlen;
- int saved_errno;
-#if defined HAVE_TSEARCH || defined _LIBC
- struct known_translation_t *search;
- struct known_translation_t **foundp = NULL;
- size_t msgid_len;
-#endif
- size_t domainname_len;
-
- /* If no real MSGID is given return NULL. */
- if (msgid1 == NULL)
- return NULL;
-
- __libc_rwlock_rdlock (_nl_state_lock);
-
- /* If DOMAINNAME is NULL, we are interested in the default domain. If
- CATEGORY is not LC_MESSAGES this might not make much sense but the
- definition left this undefined. */
- if (domainname == NULL)
- domainname = _nl_current_default_domain;
-
- /* OS/2 specific: backward compatibility with older libintl versions */
-#ifdef LC_MESSAGES_COMPAT
- if (category == LC_MESSAGES_COMPAT)
- category = LC_MESSAGES;
-#endif
-
-#if defined HAVE_TSEARCH || defined _LIBC
- msgid_len = strlen (msgid1) + 1;
-
- /* Try to find the translation among those which we found at
- some time. */
- search = (struct known_translation_t *)
- alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
- memcpy (search->msgid, msgid1, msgid_len);
- search->domainname = (char *) domainname;
- search->category = category;
-
- foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
- if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
- {
- /* Now deal with plural. */
- if (plural)
- retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
- (*foundp)->translation_length);
- else
- retval = (char *) (*foundp)->translation;
-
- __libc_rwlock_unlock (_nl_state_lock);
- return retval;
- }
-#endif
-
- /* Preserve the `errno' value. */
- saved_errno = errno;
-
- /* See whether this is a SUID binary or not. */
- DETERMINE_SECURE;
-
- /* First find matching binding. */
- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
- {
- int compare = strcmp (domainname, binding->domainname);
- if (compare == 0)
- /* We found it! */
- break;
- if (compare < 0)
- {
- /* It is not in the list. */
- binding = NULL;
- break;
- }
- }
-
- if (binding == NULL)
- dirname = (char *) _nl_default_dirname;
- else if (IS_ABSOLUTE_PATH (binding->dirname))
- dirname = binding->dirname;
- else
- {
- /* We have a relative path. Make it absolute now. */
- size_t dirname_len = strlen (binding->dirname) + 1;
- size_t path_max;
- char *ret;
-
- path_max = (unsigned int) PATH_MAX;
- path_max += 2; /* The getcwd docs say to do this. */
-
- for (;;)
- {
- dirname = (char *) alloca (path_max + dirname_len);
- ADD_BLOCK (block_list, dirname);
-
- __set_errno (0);
- ret = getcwd (dirname, path_max);
- if (ret != NULL || errno != ERANGE)
- break;
-
- path_max += path_max / 2;
- path_max += PATH_INCR;
- }
-
- if (ret == NULL)
- {
- /* We cannot get the current working directory. Don't signal an
- error but simply return the default string. */
- FREE_BLOCKS (block_list);
- __libc_rwlock_unlock (_nl_state_lock);
- __set_errno (saved_errno);
- return (plural == 0
- ? (char *) msgid1
- /* Use the Germanic plural rule. */
- : n == 1 ? (char *) msgid1 : (char *) msgid2);
- }
-
- stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
- }
-
- /* Now determine the symbolic name of CATEGORY and its value. */
- categoryname = category_to_name (category);
- categoryvalue = guess_category_value (category, categoryname);
-
- domainname_len = strlen (domainname);
- xdomainname = (char *) alloca (strlen (categoryname)
- + domainname_len + 5);
- ADD_BLOCK (block_list, xdomainname);
-
- stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
- domainname, domainname_len),
- ".mo");
-
- /* Creating working area. */
- single_locale = (char *) alloca (strlen (categoryvalue) + 1);
- ADD_BLOCK (block_list, single_locale);
-
-
- /* Search for the given string. This is a loop because we perhaps
- got an ordered list of languages to consider for the translation. */
- while (1)
- {
- /* Make CATEGORYVALUE point to the next element of the list. */
- while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
- ++categoryvalue;
- if (categoryvalue[0] == '\0')
- {
- /* The whole contents of CATEGORYVALUE has been searched but
- no valid entry has been found. We solve this situation
- by implicitly appending a "C" entry, i.e. no translation
- will take place. */
- single_locale[0] = 'C';
- single_locale[1] = '\0';
- }
- else
- {
- char *cp = single_locale;
- while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
- *cp++ = *categoryvalue++;
- *cp = '\0';
-
- /* When this is a SUID binary we must not allow accessing files
- outside the dedicated directories. */
- if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale))
- /* Ingore this entry. */
- continue;
- }
-
- /* If the current locale value is C (or POSIX) we don't load a
- domain. Return the MSGID. */
- if (strcmp (single_locale, "C") == 0
- || strcmp (single_locale, "POSIX") == 0)
- {
- FREE_BLOCKS (block_list);
- __libc_rwlock_unlock (_nl_state_lock);
- __set_errno (saved_errno);
- return (plural == 0
- ? (char *) msgid1
- /* Use the Germanic plural rule. */
- : n == 1 ? (char *) msgid1 : (char *) msgid2);
- }
-
-
- /* Find structure describing the message catalog matching the
- DOMAINNAME and CATEGORY. */
- domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
-
- if (domain != NULL)
- {
- retval = _nl_find_msg (domain, binding, msgid1, &retlen);
-
- if (retval == NULL)
- {
- int cnt;
-
- for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
- {
- retval = _nl_find_msg (domain->successor[cnt], binding,
- msgid1, &retlen);
-
- if (retval != NULL)
- {
- domain = domain->successor[cnt];
- break;
- }
- }
- }
-
- if (retval != NULL)
- {
- /* Found the translation of MSGID1 in domain DOMAIN:
- starting at RETVAL, RETLEN bytes. */
- FREE_BLOCKS (block_list);
- __set_errno (saved_errno);
-#if defined HAVE_TSEARCH || defined _LIBC
- if (foundp == NULL)
- {
- /* Create a new entry and add it to the search tree. */
- struct known_translation_t *newp;
-
- newp = (struct known_translation_t *)
- malloc (offsetof (struct known_translation_t, msgid)
- + msgid_len + domainname_len + 1);
- if (newp != NULL)
- {
- newp->domainname =
- mempcpy (newp->msgid, msgid1, msgid_len);
- memcpy (newp->domainname, domainname, domainname_len + 1);
- newp->category = category;
- newp->counter = _nl_msg_cat_cntr;
- newp->domain = domain;
- newp->translation = retval;
- newp->translation_length = retlen;
-
- /* Insert the entry in the search tree. */
- foundp = (struct known_translation_t **)
- tsearch (newp, &root, transcmp);
- if (foundp == NULL
- || __builtin_expect (*foundp != newp, 0))
- /* The insert failed. */
- free (newp);
- }
- }
- else
- {
- /* We can update the existing entry. */
- (*foundp)->counter = _nl_msg_cat_cntr;
- (*foundp)->domain = domain;
- (*foundp)->translation = retval;
- (*foundp)->translation_length = retlen;
- }
-#endif
- /* Now deal with plural. */
- if (plural)
- retval = plural_lookup (domain, n, retval, retlen);
-
- __libc_rwlock_unlock (_nl_state_lock);
- return retval;
- }
- }
- }
- /* NOTREACHED */
-}
-
-
-char *
-internal_function
-_nl_find_msg (domain_file, domainbinding, msgid, lengthp)
- struct loaded_l10nfile *domain_file;
- struct binding *domainbinding;
- const char *msgid;
- size_t *lengthp;
-{
- struct loaded_domain *domain;
- size_t act;
- char *result;
- size_t resultlen;
-
- if (domain_file->decided == 0)
- _nl_load_domain (domain_file, domainbinding);
-
- if (domain_file->data == NULL)
- return NULL;
-
- domain = (struct loaded_domain *) domain_file->data;
-
- /* Locate the MSGID and its translation. */
- if (domain->hash_size > 2 && domain->hash_tab != NULL)
- {
- /* Use the hashing table. */
- nls_uint32 len = strlen (msgid);
- nls_uint32 hash_val = hash_string (msgid);
- nls_uint32 idx = hash_val % domain->hash_size;
- nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
-
- while (1)
- {
- nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
-
- if (nstr == 0)
- /* Hash table entry is empty. */
- return NULL;
-
- /* Compare msgid with the original string at index nstr-1.
- We compare the lengths with >=, not ==, because plural entries
- are represented by strings with an embedded NUL. */
- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) >= len
- && (strcmp (msgid,
- domain->data + W (domain->must_swap,
- domain->orig_tab[nstr - 1].offset))
- == 0))
- {
- act = nstr - 1;
- goto found;
- }
-
- if (idx >= domain->hash_size - incr)
- idx -= domain->hash_size - incr;
- else
- idx += incr;
- }
- /* NOTREACHED */
- }
- else
- {
- /* Try the default method: binary search in the sorted array of
- messages. */
- size_t top, bottom;
-
- bottom = 0;
- top = domain->nstrings;
- while (bottom < top)
- {
- int cmp_val;
-
- act = (bottom + top) / 2;
- cmp_val = strcmp (msgid, (domain->data
- + W (domain->must_swap,
- domain->orig_tab[act].offset)));
- if (cmp_val < 0)
- top = act;
- else if (cmp_val > 0)
- bottom = act + 1;
- else
- goto found;
- }
- /* No translation was found. */
- return NULL;
- }
-
- found:
- /* The translation was found at index ACT. If we have to convert the
- string to use a different character set, this is the time. */
- result = ((char *) domain->data
- + W (domain->must_swap, domain->trans_tab[act].offset));
- resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
-
-#if defined _LIBC || HAVE_ICONV
- if (domain->codeset_cntr
- != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
- {
- /* The domain's codeset has changed through bind_textdomain_codeset()
- since the message catalog was initialized or last accessed. We
- have to reinitialize the converter. */
- _nl_free_domain_conv (domain);
- _nl_init_domain_conv (domain_file, domain, domainbinding);
- }
-
- if (
-# ifdef _LIBC
- domain->conv != (__gconv_t) -1
-# else
-# if HAVE_ICONV
- domain->conv != (iconv_t) -1
-# endif
-# endif
- )
- {
- /* We are supposed to do a conversion. First allocate an
- appropriate table with the same structure as the table
- of translations in the file, where we can put the pointers
- to the converted strings in.
- There is a slight complication with plural entries. They
- are represented by consecutive NUL terminated strings. We
- handle this case by converting RESULTLEN bytes, including
- NULs. */
-
- if (domain->conv_tab == NULL
- && ((domain->conv_tab = (char **) calloc (domain->nstrings,
- sizeof (char *)))
- == NULL))
- /* Mark that we didn't succeed allocating a table. */
- domain->conv_tab = (char **) -1;
-
- if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
- /* Nothing we can do, no more memory. */
- goto converted;
-
- if (domain->conv_tab[act] == NULL)
- {
- /* We haven't used this string so far, so it is not
- translated yet. Do this now. */
- /* We use a bit more efficient memory handling.
- We allocate always larger blocks which get used over
- time. This is faster than many small allocations. */
- __libc_lock_define_initialized (static, lock)
-# define INITIAL_BLOCK_SIZE 4080
- static unsigned char *freemem;
- static size_t freemem_size;
-
- const unsigned char *inbuf;
- unsigned char *outbuf;
- int malloc_count;
-# ifndef _LIBC
- transmem_block_t *transmem_list = NULL;
-# endif
-
- __libc_lock_lock (lock);
-
- inbuf = (const unsigned char *) result;
- outbuf = freemem + sizeof (size_t);
-
- malloc_count = 0;
- while (1)
- {
- transmem_block_t *newmem;
-# ifdef _LIBC
- size_t non_reversible;
- int res;
-
- if (freemem_size < sizeof (size_t))
- goto resize_freemem;
-
- res = __gconv (domain->conv,
- &inbuf, inbuf + resultlen,
- &outbuf,
- outbuf + freemem_size - sizeof (size_t),
- &non_reversible);
-
- if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
- break;
-
- if (res != __GCONV_FULL_OUTPUT)
- {
- __libc_lock_unlock (lock);
- goto converted;
- }
-
- inbuf = result;
-# else
-# if HAVE_ICONV
- const char *inptr = (const char *) inbuf;
- size_t inleft = resultlen;
- char *outptr = (char *) outbuf;
- size_t outleft;
-
- if (freemem_size < sizeof (size_t))
- goto resize_freemem;
-
- outleft = freemem_size - sizeof (size_t);
- if (iconv (domain->conv,
- (ICONV_CONST char **) &inptr, &inleft,
- &outptr, &outleft)
- != (size_t) (-1))
- {
- outbuf = (unsigned char *) outptr;
- break;
- }
- if (errno != E2BIG)
- {
- __libc_lock_unlock (lock);
- goto converted;
- }
-# endif
-# endif
-
- resize_freemem:
- /* We must allocate a new buffer or resize the old one. */
- if (malloc_count > 0)
- {
- ++malloc_count;
- freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
- newmem = (transmem_block_t *) realloc (transmem_list,
- freemem_size);
-# ifdef _LIBC
- if (newmem != NULL)
- transmem_list = transmem_list->next;
- else
- {
- struct transmem_list *old = transmem_list;
-
- transmem_list = transmem_list->next;
- free (old);
- }
-# endif
- }
- else
- {
- malloc_count = 1;
- freemem_size = INITIAL_BLOCK_SIZE;
- newmem = (transmem_block_t *) malloc (freemem_size);
- }
- if (__builtin_expect (newmem == NULL, 0))
- {
- freemem = NULL;
- freemem_size = 0;
- __libc_lock_unlock (lock);
- goto converted;
- }
-
-# ifdef _LIBC
- /* Add the block to the list of blocks we have to free
- at some point. */
- newmem->next = transmem_list;
- transmem_list = newmem;
-
- freemem = newmem->data;
- freemem_size -= offsetof (struct transmem_list, data);
-# else
- transmem_list = newmem;
- freemem = newmem;
-# endif
-
- outbuf = freemem + sizeof (size_t);
- }
-
- /* We have now in our buffer a converted string. Put this
- into the table of conversions. */
- *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
- domain->conv_tab[act] = (char *) freemem;
- /* Shrink freemem, but keep it aligned. */
- freemem_size -= outbuf - freemem;
- freemem = outbuf;
- freemem += freemem_size & (alignof (size_t) - 1);
- freemem_size = freemem_size & ~ (alignof (size_t) - 1);
-
- __libc_lock_unlock (lock);
- }
-
- /* Now domain->conv_tab[act] contains the translation of all
- the plural variants. */
- result = domain->conv_tab[act] + sizeof (size_t);
- resultlen = *(size_t *) domain->conv_tab[act];
- }
-
- converted:
- /* The result string is converted. */
-
-#endif /* _LIBC || HAVE_ICONV */
-
- *lengthp = resultlen;
- return result;
-}
-
-
-/* Look up a plural variant. */
-static char *
-internal_function
-plural_lookup (domain, n, translation, translation_len)
- struct loaded_l10nfile *domain;
- unsigned long int n;
- const char *translation;
- size_t translation_len;
-{
- struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
- unsigned long int index;
- const char *p;
-
- index = plural_eval (domaindata->plural, n);
- if (index >= domaindata->nplurals)
- /* This should never happen. It means the plural expression and the
- given maximum value do not match. */
- index = 0;
-
- /* Skip INDEX strings at TRANSLATION. */
- p = translation;
- while (index-- > 0)
- {
-#ifdef _LIBC
- p = __rawmemchr (p, '\0');
-#else
- p = strchr (p, '\0');
-#endif
- /* And skip over the NUL byte. */
- p++;
-
- if (p >= translation + translation_len)
- /* This should never happen. It means the plural expression
- evaluated to a value larger than the number of variants
- available for MSGID1. */
- return (char *) translation;
- }
- return (char *) p;
-}
-
-
-/* Return string representation of locale CATEGORY. */
-static const char *
-internal_function
-category_to_name (category)
- int category;
-{
- const char *retval;
-
- switch (category)
- {
-#ifdef LC_COLLATE
- case LC_COLLATE:
- retval = "LC_COLLATE";
- break;
-#endif
-#ifdef LC_CTYPE
- case LC_CTYPE:
- retval = "LC_CTYPE";
- break;
-#endif
-#ifdef LC_MONETARY
- case LC_MONETARY:
- retval = "LC_MONETARY";
- break;
-#endif
-#ifdef LC_NUMERIC
- case LC_NUMERIC:
- retval = "LC_NUMERIC";
- break;
-#endif
-#ifdef LC_TIME
- case LC_TIME:
- retval = "LC_TIME";
- break;
-#endif
-#ifdef LC_MESSAGES
- case LC_MESSAGES:
- retval = "LC_MESSAGES";
- break;
-#endif
-#ifdef LC_RESPONSE
- case LC_RESPONSE:
- retval = "LC_RESPONSE";
- break;
-#endif
-#ifdef LC_ALL
- case LC_ALL:
- /* This might not make sense but is perhaps better than any other
- value. */
- retval = "LC_ALL";
- break;
-#endif
- default:
- /* If you have a better idea for a default value let me know. */
- retval = "LC_XXX";
- }
-
- return retval;
-}
-
-/* Guess value of current locale from value of the environment variables. */
-static const char *
-internal_function
-guess_category_value (category, categoryname)
- int category;
- const char *categoryname;
-{
- const char *language;
- const char *retval;
-
- /* The highest priority value is the `LANGUAGE' environment
- variable. But we don't use the value if the currently selected
- locale is the C locale. This is a GNU extension. */
- language = getenv ("LANGUAGE");
- if (language != NULL && language[0] == '\0')
- language = NULL;
-
- /* We have to proceed with the POSIX methods of looking to `LC_ALL',
- `LC_xxx', and `LANG'. On some systems this can be done by the
- `setlocale' function itself. */
-#ifdef _LIBC
- retval = setlocale (category, NULL);
-#else
- retval = _nl_locale_name (category, categoryname);
-#endif
-
- /* Ignore LANGUAGE if the locale is set to "C" because
- 1. "C" locale usually uses the ASCII encoding, and most international
- messages use non-ASCII characters. These characters get displayed
- as question marks (if using glibc's iconv()) or as invalid 8-bit
- characters (because other iconv()s refuse to convert most non-ASCII
- characters to ASCII). In any case, the output is ugly.
- 2. The precise output of some programs in the "C" locale is specified
- by POSIX and should not depend on environment variables like
- "LANGUAGE". We allow such programs to use gettext(). */
- return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
-}
-
-/* @@ begin of epilog @@ */
-
-/* We don't want libintl.a to depend on any other library. So we
- avoid the non-standard function stpcpy. In GNU C Library this
- function is available, though. Also allow the symbol HAVE_STPCPY
- to be defined. */
-#if !_LIBC && !HAVE_STPCPY
-static char *
-stpcpy (dest, src)
- char *dest;
- const char *src;
-{
- while ((*dest++ = *src++) != '\0')
- /* Do nothing. */ ;
- return dest - 1;
-}
-#endif
-
-#if !_LIBC && !HAVE_MEMPCPY
-static void *
-mempcpy (dest, src, n)
- void *dest;
- const void *src;
- size_t n;
-{
- return (void *) ((char *) memcpy (dest, src, n) + n);
-}
-#endif
-
-
-#ifdef _LIBC
-/* If we want to free all resources we have to do some work at
- program's end. */
-static void __attribute__ ((unused))
-free_mem (void)
-{
- void *old;
-
- while (_nl_domain_bindings != NULL)
- {
- struct binding *oldp = _nl_domain_bindings;
- _nl_domain_bindings = _nl_domain_bindings->next;
- if (oldp->dirname != _nl_default_dirname)
- /* Yes, this is a pointer comparison. */
- free (oldp->dirname);
- free (oldp->codeset);
- free (oldp);
- }
-
- if (_nl_current_default_domain != _nl_default_default_domain)
- /* Yes, again a pointer comparison. */
- free ((char *) _nl_current_default_domain);
-
- /* Remove the search tree with the known translations. */
- __tdestroy (root, free);
- root = NULL;
-
- while (transmem_list != NULL)
- {
- old = transmem_list;
- transmem_list = transmem_list->next;
- free (old);
- }
-}
-
-text_set_element (__libc_subfreeres, free_mem);
-#endif
diff --git a/intl/dcngettext.c b/intl/dcngettext.c
deleted file mode 100644
index 9b05358..0000000
--- a/intl/dcngettext.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Implementation of the dcngettext(3) function.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DCNGETTEXT __dcngettext
-# define DCIGETTEXT __dcigettext
-#else
-# define DCNGETTEXT dcngettext__
-# define DCIGETTEXT dcigettext__
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
-char *
-DCNGETTEXT (domainname, msgid1, msgid2, n, category)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
- int category;
-{
- return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__dcngettext, dcngettext);
-#endif
diff --git a/intl/dgettext.c b/intl/dgettext.c
deleted file mode 100644
index d4ec011..0000000
--- a/intl/dgettext.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Implementation of the dgettext(3) function.
- Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <locale.h>
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DGETTEXT __dgettext
-# define DCGETTEXT __dcgettext
-#else
-# define DGETTEXT dgettext__
-# define DCGETTEXT dcgettext__
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog of the current
- LC_MESSAGES locale. */
-char *
-DGETTEXT (domainname, msgid)
- const char *domainname;
- const char *msgid;
-{
- return DCGETTEXT (domainname, msgid, LC_MESSAGES);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__dgettext, dgettext);
-#endif
diff --git a/intl/dngettext.c b/intl/dngettext.c
deleted file mode 100644
index f47a8ce..0000000
--- a/intl/dngettext.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* Implementation of the dngettext(3) function.
- Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <locale.h>
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define DNGETTEXT __dngettext
-# define DCNGETTEXT __dcngettext
-#else
-# define DNGETTEXT dngettext__
-# define DCNGETTEXT dcngettext__
-#endif
-
-/* Look up MSGID in the DOMAINNAME message catalog of the current
- LC_MESSAGES locale and skip message according to the plural form. */
-char *
-DNGETTEXT (domainname, msgid1, msgid2, n)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
-{
- return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__dngettext, dngettext);
-#endif
diff --git a/intl/eval-plural.h b/intl/eval-plural.h
deleted file mode 100644
index fdf5501..0000000
--- a/intl/eval-plural.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* Plural expression evaluation.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef STATIC
-#define STATIC static
-#endif
-
-/* Evaluate the plural expression and return an index value. */
-STATIC unsigned long int plural_eval PARAMS ((struct expression *pexp,
- unsigned long int n))
- internal_function;
-
-STATIC
-unsigned long int
-internal_function
-plural_eval (pexp, n)
- struct expression *pexp;
- unsigned long int n;
-{
- switch (pexp->nargs)
- {
- case 0:
- switch (pexp->operation)
- {
- case var:
- return n;
- case num:
- return pexp->val.num;
- default:
- break;
- }
- /* NOTREACHED */
- break;
- case 1:
- {
- /* pexp->operation must be lnot. */
- unsigned long int arg = plural_eval (pexp->val.args[0], n);
- return ! arg;
- }
- case 2:
- {
- unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
- if (pexp->operation == lor)
- return leftarg || plural_eval (pexp->val.args[1], n);
- else if (pexp->operation == land)
- return leftarg && plural_eval (pexp->val.args[1], n);
- else
- {
- unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
-
- switch (pexp->operation)
- {
- case mult:
- return leftarg * rightarg;
- case divide:
- return leftarg / rightarg;
- case module:
- return leftarg % rightarg;
- case plus:
- return leftarg + rightarg;
- case minus:
- return leftarg - rightarg;
- case less_than:
- return leftarg < rightarg;
- case greater_than:
- return leftarg > rightarg;
- case less_or_equal:
- return leftarg <= rightarg;
- case greater_or_equal:
- return leftarg >= rightarg;
- case equal:
- return leftarg == rightarg;
- case not_equal:
- return leftarg != rightarg;
- default:
- break;
- }
- }
- /* NOTREACHED */
- break;
- }
- case 3:
- {
- /* pexp->operation must be qmop. */
- unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
- return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
- }
- }
- /* NOTREACHED */
- return 0;
-}
diff --git a/intl/explodename.c b/intl/explodename.c
deleted file mode 100644
index c47ef63..0000000
--- a/intl/explodename.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-
-#include "loadinfo.h"
-
-/* On some strange systems still no definition of NULL is found. Sigh! */
-#ifndef NULL
-# if defined __STDC__ && __STDC__
-# define NULL ((void *) 0)
-# else
-# define NULL 0
-# endif
-#endif
-
-/* @@ end of prolog @@ */
-
-char *
-_nl_find_language (name)
- const char *name;
-{
- while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
- && name[0] != '+' && name[0] != ',')
- ++name;
-
- return (char *) name;
-}
-
-
-int
-_nl_explode_name (name, language, modifier, territory, codeset,
- normalized_codeset, special, sponsor, revision)
- char *name;
- const char **language;
- const char **modifier;
- const char **territory;
- const char **codeset;
- const char **normalized_codeset;
- const char **special;
- const char **sponsor;
- const char **revision;
-{
- enum { undecided, xpg, cen } syntax;
- char *cp;
- int mask;
-
- *modifier = NULL;
- *territory = NULL;
- *codeset = NULL;
- *normalized_codeset = NULL;
- *special = NULL;
- *sponsor = NULL;
- *revision = NULL;
-
- /* Now we determine the single parts of the locale name. First
- look for the language. Termination symbols are `_' and `@' if
- we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
- mask = 0;
- syntax = undecided;
- *language = cp = name;
- cp = _nl_find_language (*language);
-
- if (*language == cp)
- /* This does not make sense: language has to be specified. Use
- this entry as it is without exploding. Perhaps it is an alias. */
- cp = strchr (*language, '\0');
- else if (cp[0] == '_')
- {
- /* Next is the territory. */
- cp[0] = '\0';
- *territory = ++cp;
-
- while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
- && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
- ++cp;
-
- mask |= TERRITORY;
-
- if (cp[0] == '.')
- {
- /* Next is the codeset. */
- syntax = xpg;
- cp[0] = '\0';
- *codeset = ++cp;
-
- while (cp[0] != '\0' && cp[0] != '@')
- ++cp;
-
- mask |= XPG_CODESET;
-
- if (*codeset != cp && (*codeset)[0] != '\0')
- {
- *normalized_codeset = _nl_normalize_codeset (*codeset,
- cp - *codeset);
- if (strcmp (*codeset, *normalized_codeset) == 0)
- free ((char *) *normalized_codeset);
- else
- mask |= XPG_NORM_CODESET;
- }
- }
- }
-
- if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
- {
- /* Next is the modifier. */
- syntax = cp[0] == '@' ? xpg : cen;
- cp[0] = '\0';
- *modifier = ++cp;
-
- while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
- && cp[0] != ',' && cp[0] != '_')
- ++cp;
-
- mask |= XPG_MODIFIER | CEN_AUDIENCE;
- }
-
- if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
- {
- syntax = cen;
-
- if (cp[0] == '+')
- {
- /* Next is special application (CEN syntax). */
- cp[0] = '\0';
- *special = ++cp;
-
- while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
- ++cp;
-
- mask |= CEN_SPECIAL;
- }
-
- if (cp[0] == ',')
- {
- /* Next is sponsor (CEN syntax). */
- cp[0] = '\0';
- *sponsor = ++cp;
-
- while (cp[0] != '\0' && cp[0] != '_')
- ++cp;
-
- mask |= CEN_SPONSOR;
- }
-
- if (cp[0] == '_')
- {
- /* Next is revision (CEN syntax). */
- cp[0] = '\0';
- *revision = ++cp;
-
- mask |= CEN_REVISION;
- }
- }
-
- /* For CEN syntax values it might be important to have the
- separator character in the file name, not for XPG syntax. */
- if (syntax == xpg)
- {
- if (*territory != NULL && (*territory)[0] == '\0')
- mask &= ~TERRITORY;
-
- if (*codeset != NULL && (*codeset)[0] == '\0')
- mask &= ~XPG_CODESET;
-
- if (*modifier != NULL && (*modifier)[0] == '\0')
- mask &= ~XPG_MODIFIER;
- }
-
- return mask;
-}
diff --git a/intl/finddomain.c b/intl/finddomain.c
deleted file mode 100644
index 48a651d..0000000
--- a/intl/finddomain.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/* Handle list of needed message catalogs
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- Written by Ulrich Drepper <drepper@gnu.org>, 1995.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-/* List of already loaded domains. */
-static struct loaded_l10nfile *_nl_loaded_domains;
-
-
-/* Return a data structure describing the message catalog described by
- the DOMAINNAME and CATEGORY parameters with respect to the currently
- established bindings. */
-struct loaded_l10nfile *
-internal_function
-_nl_find_domain (dirname, locale, domainname, domainbinding)
- const char *dirname;
- char *locale;
- const char *domainname;
- struct binding *domainbinding;
-{
- struct loaded_l10nfile *retval;
- const char *language;
- const char *modifier;
- const char *territory;
- const char *codeset;
- const char *normalized_codeset;
- const char *special;
- const char *sponsor;
- const char *revision;
- const char *alias_value;
- int mask;
-
- /* LOCALE can consist of up to four recognized parts for the XPG syntax:
-
- language[_territory[.codeset]][@modifier]
-
- and six parts for the CEN syntax:
-
- language[_territory][+audience][+special][,[sponsor][_revision]]
-
- Beside the first part all of them are allowed to be missing. If
- the full specified locale is not found, the less specific one are
- looked for. The various parts will be stripped off according to
- the following order:
- (1) revision
- (2) sponsor
- (3) special
- (4) codeset
- (5) normalized codeset
- (6) territory
- (7) audience/modifier
- */
-
- /* If we have already tested for this locale entry there has to
- be one data set in the list of loaded domains. */
- retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
- strlen (dirname) + 1, 0, locale, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, domainname, 0);
- if (retval != NULL)
- {
- /* We know something about this locale. */
- int cnt;
-
- if (retval->decided == 0)
- _nl_load_domain (retval, domainbinding);
-
- if (retval->data != NULL)
- return retval;
-
- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
- {
- if (retval->successor[cnt]->decided == 0)
- _nl_load_domain (retval->successor[cnt], domainbinding);
-
- if (retval->successor[cnt]->data != NULL)
- break;
- }
- return cnt >= 0 ? retval : NULL;
- /* NOTREACHED */
- }
-
- /* See whether the locale value is an alias. If yes its value
- *overwrites* the alias name. No test for the original value is
- done. */
- alias_value = _nl_expand_alias (locale);
- if (alias_value != NULL)
- {
-#if defined _LIBC || defined HAVE_STRDUP
- locale = strdup (alias_value);
- if (locale == NULL)
- return NULL;
-#else
- size_t len = strlen (alias_value) + 1;
- locale = (char *) malloc (len);
- if (locale == NULL)
- return NULL;
-
- memcpy (locale, alias_value, len);
-#endif
- }
-
- /* Now we determine the single parts of the locale name. First
- look for the language. Termination symbols are `_' and `@' if
- we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
- mask = _nl_explode_name (locale, &language, &modifier, &territory,
- &codeset, &normalized_codeset, &special,
- &sponsor, &revision);
-
- /* Create all possible locale entries which might be interested in
- generalization. */
- retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
- strlen (dirname) + 1, mask, language, territory,
- codeset, normalized_codeset, modifier, special,
- sponsor, revision, domainname, 1);
- if (retval == NULL)
- /* This means we are out of core. */
- return NULL;
-
- if (retval->decided == 0)
- _nl_load_domain (retval, domainbinding);
- if (retval->data == NULL)
- {
- int cnt;
- for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
- {
- if (retval->successor[cnt]->decided == 0)
- _nl_load_domain (retval->successor[cnt], domainbinding);
- if (retval->successor[cnt]->data != NULL)
- break;
- }
- }
-
- /* The room for an alias was dynamically allocated. Free it now. */
- if (alias_value != NULL)
- free (locale);
-
- /* The space for normalized_codeset is dynamically allocated. Free it. */
- if (mask & XPG_NORM_CODESET)
- free ((void *) normalized_codeset);
-
- return retval;
-}
-
-
-#ifdef _LIBC
-static void __attribute__ ((unused))
-free_mem (void)
-{
- struct loaded_l10nfile *runp = _nl_loaded_domains;
-
- while (runp != NULL)
- {
- struct loaded_l10nfile *here = runp;
- if (runp->data != NULL)
- _nl_unload_domain ((struct loaded_domain *) runp->data);
- runp = runp->next;
- free ((char *) here->filename);
- free (here);
- }
-}
-
-text_set_element (__libc_subfreeres, free_mem);
-#endif
diff --git a/intl/gettext.c b/intl/gettext.c
deleted file mode 100644
index 79be831..0000000
--- a/intl/gettext.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Implementation of gettext(3) function.
- Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef _LIBC
-# define __need_NULL
-# include <stddef.h>
-#else
-# include <stdlib.h> /* Just for NULL. */
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define GETTEXT __gettext
-# define DCGETTEXT __dcgettext
-#else
-# define GETTEXT gettext__
-# define DCGETTEXT dcgettext__
-#endif
-
-/* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
-char *
-GETTEXT (msgid)
- const char *msgid;
-{
- return DCGETTEXT (NULL, msgid, LC_MESSAGES);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__gettext, gettext);
-#endif
diff --git a/intl/gettextP.h b/intl/gettextP.h
deleted file mode 100644
index ed6df97..0000000
--- a/intl/gettextP.h
+++ /dev/null
@@ -1,201 +0,0 @@
-/* Header describing internals of libintl library.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifndef _GETTEXTP_H
-#define _GETTEXTP_H
-
-#include <stddef.h> /* Get size_t. */
-
-#ifdef _LIBC
-# include "../iconv/gconv_int.h"
-#else
-# if HAVE_ICONV
-# include <iconv.h>
-# endif
-#endif
-
-#include "loadinfo.h"
-
-#include "gmo.h" /* Get nls_uint32. */
-
-/* @@ end of prolog @@ */
-
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-/* Tell the compiler when a conditional or integer expression is
- almost always true or almost always false. */
-#ifndef HAVE_BUILTIN_EXPECT
-# define __builtin_expect(expr, val) (expr)
-#endif
-
-#ifndef W
-# define W(flag, data) ((flag) ? SWAP (data) : (data))
-#endif
-
-
-#ifdef _LIBC
-# include <byteswap.h>
-# define SWAP(i) bswap_32 (i)
-#else
-static inline nls_uint32
-SWAP (i)
- nls_uint32 i;
-{
- return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
-}
-#endif
-
-
-/* The representation of an opened message catalog. */
-struct loaded_domain
-{
- const char *data;
- int use_mmap;
- size_t mmap_size;
- int must_swap;
- nls_uint32 nstrings;
- struct string_desc *orig_tab;
- struct string_desc *trans_tab;
- nls_uint32 hash_size;
- nls_uint32 *hash_tab;
- int codeset_cntr;
-#ifdef _LIBC
- __gconv_t conv;
-#else
-# if HAVE_ICONV
- iconv_t conv;
-# endif
-#endif
- char **conv_tab;
-
- struct expression *plural;
- unsigned long int nplurals;
-};
-
-/* We want to allocate a string at the end of the struct. But ISO C
- doesn't allow zero sized arrays. */
-#ifdef __GNUC__
-# define ZERO 0
-#else
-# define ZERO 1
-#endif
-
-/* A set of settings bound to a message domain. Used to store settings
- from bindtextdomain() and bind_textdomain_codeset(). */
-struct binding
-{
- struct binding *next;
- char *dirname;
- int codeset_cntr; /* Incremented each time codeset changes. */
- char *codeset;
- char domainname[ZERO];
-};
-
-/* A counter which is incremented each time some previous translations
- become invalid.
- This variable is part of the external ABI of the GNU libintl. */
-extern int _nl_msg_cat_cntr;
-
-#ifndef _LIBC
-const char *_nl_locale_name PARAMS ((int category, const char *categoryname));
-#endif
-
-struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
- char *__locale,
- const char *__domainname,
- struct binding *__domainbinding))
- internal_function;
-void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain,
- struct binding *__domainbinding))
- internal_function;
-void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
- internal_function;
-const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file,
- struct loaded_domain *__domain,
- struct binding *__domainbinding))
- internal_function;
-void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain))
- internal_function;
-
-char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
- struct binding *domainbinding,
- const char *msgid, size_t *lengthp))
- internal_function;
-
-#ifdef _LIBC
-extern char *__gettext PARAMS ((const char *__msgid));
-extern char *__dgettext PARAMS ((const char *__domainname,
- const char *__msgid));
-extern char *__dcgettext PARAMS ((const char *__domainname,
- const char *__msgid, int __category));
-extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-extern char *__dngettext PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int n));
-extern char *__dcngettext PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int __n, int __category));
-extern char *__dcigettext PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- int __plural, unsigned long int __n,
- int __category));
-extern char *__textdomain PARAMS ((const char *__domainname));
-extern char *__bindtextdomain PARAMS ((const char *__domainname,
- const char *__dirname));
-extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
- const char *__codeset));
-#else
-extern char *gettext__ PARAMS ((const char *__msgid));
-extern char *dgettext__ PARAMS ((const char *__domainname,
- const char *__msgid));
-extern char *dcgettext__ PARAMS ((const char *__domainname,
- const char *__msgid, int __category));
-extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-extern char *dngettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
-extern char *dcngettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- unsigned long int __n, int __category));
-extern char *dcigettext__ PARAMS ((const char *__domainname,
- const char *__msgid1, const char *__msgid2,
- int __plural, unsigned long int __n,
- int __category));
-extern char *textdomain__ PARAMS ((const char *__domainname));
-extern char *bindtextdomain__ PARAMS ((const char *__domainname,
- const char *__dirname));
-extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
- const char *__codeset));
-#endif
-
-/* @@ begin of epilog @@ */
-
-#endif /* gettextP.h */
diff --git a/intl/gmo.h b/intl/gmo.h
deleted file mode 100644
index 547ee0d..0000000
--- a/intl/gmo.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* Description of GNU message catalog format: general file layout.
- Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifndef _GETTEXT_H
-#define _GETTEXT_H 1
-
-#include <limits.h>
-
-/* @@ end of prolog @@ */
-
-/* The magic number of the GNU message catalog format. */
-#define _MAGIC 0x950412de
-#define _MAGIC_SWAPPED 0xde120495
-
-/* Revision number of the currently used .mo (binary) file format. */
-#define MO_REVISION_NUMBER 0
-
-/* The following contortions are an attempt to use the C preprocessor
- to determine an unsigned integral type that is 32 bits wide. An
- alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
- as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
- when cross-compiling. */
-
-#if __STDC__
-# define UINT_MAX_32_BITS 4294967295U
-#else
-# define UINT_MAX_32_BITS 0xFFFFFFFF
-#endif
-
-/* If UINT_MAX isn't defined, assume it's a 32-bit type.
- This should be valid for all systems GNU cares about because
- that doesn't include 16-bit systems, and only modern systems
- (that certainly have <limits.h>) have 64+-bit integral types. */
-
-#ifndef UINT_MAX
-# define UINT_MAX UINT_MAX_32_BITS
-#endif
-
-#if UINT_MAX == UINT_MAX_32_BITS
-typedef unsigned nls_uint32;
-#else
-# if USHRT_MAX == UINT_MAX_32_BITS
-typedef unsigned short nls_uint32;
-# else
-# if ULONG_MAX == UINT_MAX_32_BITS
-typedef unsigned long nls_uint32;
-# else
- /* The following line is intended to throw an error. Using #error is
- not portable enough. */
- "Cannot determine unsigned 32-bit data type."
-# endif
-# endif
-#endif
-
-
-/* Header for binary .mo file format. */
-struct mo_file_header
-{
- /* The magic number. */
- nls_uint32 magic;
- /* The revision number of the file format. */
- nls_uint32 revision;
- /* The number of strings pairs. */
- nls_uint32 nstrings;
- /* Offset of table with start offsets of original strings. */
- nls_uint32 orig_tab_offset;
- /* Offset of table with start offsets of translation strings. */
- nls_uint32 trans_tab_offset;
- /* Size of hashing table. */
- nls_uint32 hash_tab_size;
- /* Offset of first hashing entry. */
- nls_uint32 hash_tab_offset;
-};
-
-struct string_desc
-{
- /* Length of addressed string. */
- nls_uint32 length;
- /* Offset of string in file. */
- nls_uint32 offset;
-};
-
-/* @@ begin of epilog @@ */
-
-#endif /* gettext.h */
diff --git a/intl/hash-string.h b/intl/hash-string.h
deleted file mode 100644
index 1c63776..0000000
--- a/intl/hash-string.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Description of GNU message catalog format: string hashing function.
- Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-/* @@ end of prolog @@ */
-
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-# define PARAMS(Args) Args
-# else
-# define PARAMS(Args) ()
-# endif
-#endif
-
-/* We assume to have `unsigned long int' value with at least 32 bits. */
-#define HASHWORDBITS 32
-
-
-/* Defines the so called `hashpjw' function by P.J. Weinberger
- [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
- 1986, 1987 Bell Telephone Laboratories, Inc.] */
-static unsigned long int hash_string PARAMS ((const char *__str_param));
-
-static inline unsigned long int
-hash_string (str_param)
- const char *str_param;
-{
- unsigned long int hval, g;
- const char *str = str_param;
-
- /* Compute the hash value for the given string. */
- hval = 0;
- while (*str != '\0')
- {
- hval <<= 4;
- hval += (unsigned long int) *str++;
- g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
- if (g != 0)
- {
- hval ^= g >> (HASHWORDBITS - 8);
- hval ^= g;
- }
- }
- return hval;
-}
diff --git a/intl/intl-compat.c b/intl/intl-compat.c
deleted file mode 100644
index 6b02d1e..0000000
--- a/intl/intl-compat.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
- Library.
- Copyright (C) 1995, 2000, 2001 Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "libgnuintl.h"
-#include "gettextP.h"
-
-/* @@ end of prolog @@ */
-
-/* This file redirects the gettext functions (without prefix or suffix) to
- those defined in the included GNU gettext library (with "__" suffix).
- It is compiled into libintl when the included GNU gettext library is
- configured --with-included-gettext.
-
- This redirection works also in the case that the system C library or
- the system libintl library contain gettext/textdomain/... functions.
- If it didn't, we would need to add preprocessor level redirections to
- libgnuintl.h of the following form:
-
-# define gettext gettext__
-# define dgettext dgettext__
-# define dcgettext dcgettext__
-# define ngettext ngettext__
-# define dngettext dngettext__
-# define dcngettext dcngettext__
-# define textdomain textdomain__
-# define bindtextdomain bindtextdomain__
-# define bind_textdomain_codeset bind_textdomain_codeset__
-
- How does this redirection work? There are two cases.
- A. When libintl.a is linked into an executable, it works because
- functions defined in the executable always override functions in
- the shared libraries.
- B. When libintl.so is used, it works because
- 1. those systems defining gettext/textdomain/... in the C library
- (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer) are
- ELF systems and define these symbols as weak, thus explicitly
- letting other shared libraries override it.
- 2. those systems defining gettext/textdomain/... in a standalone
- libintl.so library (namely, Solaris 2.3 and newer) have this
- shared library in /usr/lib, and the linker will search /usr/lib
- *after* the directory where the GNU gettext library is installed.
-
- A third case, namely when libintl.a is linked into a shared library
- whose name is not libintl.so, is not supported. In this case, on
- Solaris, when -lintl precedes the linker option for the shared library
- containing GNU gettext, the system's gettext would indeed override
- the GNU gettext. Anyone doing this kind of stuff must be clever enough
- to 1. compile libintl.a with -fPIC, 2. remove -lintl from his linker
- command line. */
-
-
-#undef gettext
-#undef dgettext
-#undef dcgettext
-#undef ngettext
-#undef dngettext
-#undef dcngettext
-#undef textdomain
-#undef bindtextdomain
-#undef bind_textdomain_codeset
-
-
-char *
-gettext (msgid)
- const char *msgid;
-{
- return gettext__ (msgid);
-}
-
-
-char *
-dgettext (domainname, msgid)
- const char *domainname;
- const char *msgid;
-{
- return dgettext__ (domainname, msgid);
-}
-
-
-char *
-dcgettext (domainname, msgid, category)
- const char *domainname;
- const char *msgid;
- int category;
-{
- return dcgettext__ (domainname, msgid, category);
-}
-
-
-char *
-ngettext (msgid1, msgid2, n)
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
-{
- return ngettext__ (msgid1, msgid2, n);
-}
-
-
-char *
-dngettext (domainname, msgid1, msgid2, n)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
-{
- return dngettext__ (domainname, msgid1, msgid2, n);
-}
-
-
-char *
-dcngettext (domainname, msgid1, msgid2, n, category)
- const char *domainname;
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
- int category;
-{
- return dcngettext__ (domainname, msgid1, msgid2, n, category);
-}
-
-
-char *
-textdomain (domainname)
- const char *domainname;
-{
- return textdomain__ (domainname);
-}
-
-
-char *
-bindtextdomain (domainname, dirname)
- const char *domainname;
- const char *dirname;
-{
- return bindtextdomain__ (domainname, dirname);
-}
-
-
-char *
-bind_textdomain_codeset (domainname, codeset)
- const char *domainname;
- const char *codeset;
-{
- return bind_textdomain_codeset__ (domainname, codeset);
-}
diff --git a/intl/l10nflist.c b/intl/l10nflist.c
deleted file mode 100644
index b4ef297..0000000
--- a/intl/l10nflist.c
+++ /dev/null
@@ -1,400 +0,0 @@
-/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-/* Tell glibc's <string.h> to provide a prototype for stpcpy().
- This must come before <config.h> because <config.h> may include
- <features.h>, and once <features.h> has been included, it's too late. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <string.h>
-
-#if defined _LIBC || defined HAVE_ARGZ_H
-# include <argz.h>
-#endif
-#include <ctype.h>
-#include <sys/types.h>
-#include <stdlib.h>
-
-#include "loadinfo.h"
-
-/* On some strange systems still no definition of NULL is found. Sigh! */
-#ifndef NULL
-# if defined __STDC__ && __STDC__
-# define NULL ((void *) 0)
-# else
-# define NULL 0
-# endif
-#endif
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ANSI C functions. This is required by the standard
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
-# ifndef stpcpy
-# define stpcpy(dest, src) __stpcpy(dest, src)
-# endif
-#else
-# ifndef HAVE_STPCPY
-static char *stpcpy PARAMS ((char *dest, const char *src));
-# endif
-#endif
-
-/* Define function which are usually not available. */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
-/* Returns the number of strings in ARGZ. */
-static size_t argz_count__ PARAMS ((const char *argz, size_t len));
-
-static size_t
-argz_count__ (argz, len)
- const char *argz;
- size_t len;
-{
- size_t count = 0;
- while (len > 0)
- {
- size_t part_len = strlen (argz);
- argz += part_len + 1;
- len -= part_len + 1;
- count++;
- }
- return count;
-}
-# undef __argz_count
-# define __argz_count(argz, len) argz_count__ (argz, len)
-#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
-/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
- except the last into the character SEP. */
-static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
-
-static void
-argz_stringify__ (argz, len, sep)
- char *argz;
- size_t len;
- int sep;
-{
- while (len > 0)
- {
- size_t part_len = strlen (argz);
- argz += part_len;
- len -= part_len + 1;
- if (len > 0)
- *argz++ = sep;
- }
-}
-# undef __argz_stringify
-# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
-#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
-
-#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
-static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
- const char *entry));
-
-static char *
-argz_next__ (argz, argz_len, entry)
- char *argz;
- size_t argz_len;
- const char *entry;
-{
- if (entry)
- {
- if (entry < argz + argz_len)
- entry = strchr (entry, '\0') + 1;
-
- return entry >= argz + argz_len ? NULL : (char *) entry;
- }
- else
- if (argz_len > 0)
- return argz;
- else
- return 0;
-}
-# undef __argz_next
-# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
-#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
-
-
-/* Return number of bits set in X. */
-static int pop PARAMS ((int x));
-
-static inline int
-pop (x)
- int x;
-{
- /* We assume that no more than 16 bits are used. */
- x = ((x & ~0x5555) >> 1) + (x & 0x5555);
- x = ((x & ~0x3333) >> 2) + (x & 0x3333);
- x = ((x >> 4) + x) & 0x0f0f;
- x = ((x >> 8) + x) & 0xff;
-
- return x;
-}
-
-
-struct loaded_l10nfile *
-_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
- territory, codeset, normalized_codeset, modifier, special,
- sponsor, revision, filename, do_allocate)
- struct loaded_l10nfile **l10nfile_list;
- const char *dirlist;
- size_t dirlist_len;
- int mask;
- const char *language;
- const char *territory;
- const char *codeset;
- const char *normalized_codeset;
- const char *modifier;
- const char *special;
- const char *sponsor;
- const char *revision;
- const char *filename;
- int do_allocate;
-{
- char *abs_filename;
- struct loaded_l10nfile *last = NULL;
- struct loaded_l10nfile *retval;
- char *cp;
- size_t entries;
- int cnt;
-
- /* Allocate room for the full file name. */
- abs_filename = (char *) malloc (dirlist_len
- + strlen (language)
- + ((mask & TERRITORY) != 0
- ? strlen (territory) + 1 : 0)
- + ((mask & XPG_CODESET) != 0
- ? strlen (codeset) + 1 : 0)
- + ((mask & XPG_NORM_CODESET) != 0
- ? strlen (normalized_codeset) + 1 : 0)
- + (((mask & XPG_MODIFIER) != 0
- || (mask & CEN_AUDIENCE) != 0)
- ? strlen (modifier) + 1 : 0)
- + ((mask & CEN_SPECIAL) != 0
- ? strlen (special) + 1 : 0)
- + (((mask & CEN_SPONSOR) != 0
- || (mask & CEN_REVISION) != 0)
- ? (1 + ((mask & CEN_SPONSOR) != 0
- ? strlen (sponsor) + 1 : 0)
- + ((mask & CEN_REVISION) != 0
- ? strlen (revision) + 1 : 0)) : 0)
- + 1 + strlen (filename) + 1);
-
- if (abs_filename == NULL)
- return NULL;
-
- retval = NULL;
- last = NULL;
-
- /* Construct file name. */
- memcpy (abs_filename, dirlist, dirlist_len);
- __argz_stringify (abs_filename, dirlist_len, PATH_SEPARATOR);
- cp = abs_filename + (dirlist_len - 1);
- *cp++ = '/';
- cp = stpcpy (cp, language);
-
- if ((mask & TERRITORY) != 0)
- {
- *cp++ = '_';
- cp = stpcpy (cp, territory);
- }
- if ((mask & XPG_CODESET) != 0)
- {
- *cp++ = '.';
- cp = stpcpy (cp, codeset);
- }
- if ((mask & XPG_NORM_CODESET) != 0)
- {
- *cp++ = '.';
- cp = stpcpy (cp, normalized_codeset);
- }
- if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
- {
- /* This component can be part of both syntaces but has different
- leading characters. For CEN we use `+', else `@'. */
- *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
- cp = stpcpy (cp, modifier);
- }
- if ((mask & CEN_SPECIAL) != 0)
- {
- *cp++ = '+';
- cp = stpcpy (cp, special);
- }
- if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
- {
- *cp++ = ',';
- if ((mask & CEN_SPONSOR) != 0)
- cp = stpcpy (cp, sponsor);
- if ((mask & CEN_REVISION) != 0)
- {
- *cp++ = '_';
- cp = stpcpy (cp, revision);
- }
- }
-
- *cp++ = '/';
- stpcpy (cp, filename);
-
- /* Look in list of already loaded domains whether it is already
- available. */
- last = NULL;
- for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
- if (retval->filename != NULL)
- {
- int compare = strcmp (retval->filename, abs_filename);
- if (compare == 0)
- /* We found it! */
- break;
- if (compare < 0)
- {
- /* It's not in the list. */
- retval = NULL;
- break;
- }
-
- last = retval;
- }
-
- if (retval != NULL || do_allocate == 0)
- {
- free (abs_filename);
- return retval;
- }
-
- retval = (struct loaded_l10nfile *)
- malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
- * (1 << pop (mask))
- * sizeof (struct loaded_l10nfile *)));
- if (retval == NULL)
- return NULL;
-
- retval->filename = abs_filename;
- retval->decided = (__argz_count (dirlist, dirlist_len) != 1
- || ((mask & XPG_CODESET) != 0
- && (mask & XPG_NORM_CODESET) != 0));
- retval->data = NULL;
-
- if (last == NULL)
- {
- retval->next = *l10nfile_list;
- *l10nfile_list = retval;
- }
- else
- {
- retval->next = last->next;
- last->next = retval;
- }
-
- entries = 0;
- /* If the DIRLIST is a real list the RETVAL entry corresponds not to
- a real file. So we have to use the DIRLIST separation mechanism
- of the inner loop. */
- cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
- for (; cnt >= 0; --cnt)
- if ((cnt & ~mask) == 0
- && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
- && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
- {
- /* Iterate over all elements of the DIRLIST. */
- char *dir = NULL;
-
- while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
- != NULL)
- retval->successor[entries++]
- = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
- language, territory, codeset,
- normalized_codeset, modifier, special,
- sponsor, revision, filename, 1);
- }
- retval->successor[entries] = NULL;
-
- return retval;
-}
-
-/* Normalize codeset name. There is no standard for the codeset
- names. Normalization allows the user to use any of the common
- names. The return value is dynamically allocated and has to be
- freed by the caller. */
-const char *
-_nl_normalize_codeset (codeset, name_len)
- const char *codeset;
- size_t name_len;
-{
- int len = 0;
- int only_digit = 1;
- char *retval;
- char *wp;
- size_t cnt;
-
- for (cnt = 0; cnt < name_len; ++cnt)
- if (isalnum ((unsigned char) codeset[cnt]))
- {
- ++len;
-
- if (isalpha ((unsigned char) codeset[cnt]))
- only_digit = 0;
- }
-
- retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
-
- if (retval != NULL)
- {
- if (only_digit)
- wp = stpcpy (retval, "iso");
- else
- wp = retval;
-
- for (cnt = 0; cnt < name_len; ++cnt)
- if (isalpha ((unsigned char) codeset[cnt]))
- *wp++ = tolower ((unsigned char) codeset[cnt]);
- else if (isdigit ((unsigned char) codeset[cnt]))
- *wp++ = codeset[cnt];
-
- *wp = '\0';
- }
-
- return (const char *) retval;
-}
-
-
-/* @@ begin of epilog @@ */
-
-/* We don't want libintl.a to depend on any other library. So we
- avoid the non-standard function stpcpy. In GNU C Library this
- function is available, though. Also allow the symbol HAVE_STPCPY
- to be defined. */
-#if !_LIBC && !HAVE_STPCPY
-static char *
-stpcpy (dest, src)
- char *dest;
- const char *src;
-{
- while ((*dest++ = *src++) != '\0')
- /* Do nothing. */ ;
- return dest - 1;
-}
-#endif
diff --git a/intl/libgnuintl.h b/intl/libgnuintl.h
deleted file mode 100644
index 70202f8..0000000
--- a/intl/libgnuintl.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* Message catalogs for internationalization.
- Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifndef _LIBINTL_H
-#define _LIBINTL_H 1
-
-#include <locale.h>
-
-/* The LC_MESSAGES locale category is the category used by the functions
- gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
- On systems that don't define it, use an arbitrary value instead.
- On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
- this file!) and then only defines LC_MESSAGES. To avoid a redefinition
- warning, don't define LC_MESSAGES in this case. */
-#if !defined LC_MESSAGES && !defined __LOCALE_H
-# define LC_MESSAGES 1729
-#endif
-
-/* We define an additional symbol to signal that we use the GNU
- implementation of gettext. */
-#define __USE_GNU_GETTEXT 1
-
-/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
- precedence over _conio_gettext. */
-#ifdef __DJGPP__
-# undef gettext
-# define gettext gettext
-#endif
-
-/* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers
- used by programs. Similarly, test __PROTOTYPES, not PROTOTYPES. */
-#ifndef _INTL_PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-# define _INTL_PARAMS(args) args
-# else
-# define _INTL_PARAMS(args) ()
-# endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
-extern char *gettext _INTL_PARAMS ((const char *__msgid));
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current
- LC_MESSAGES locale. */
-extern char *dgettext _INTL_PARAMS ((const char *__domainname,
- const char *__msgid));
-
-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
- locale. */
-extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
- const char *__msgid,
- int __category));
-
-
-/* Similar to `gettext' but select the plural form corresponding to the
- number N. */
-extern char *ngettext _INTL_PARAMS ((const char *__msgid1,
- const char *__msgid2,
- unsigned long int __n));
-
-/* Similar to `dgettext' but select the plural form corresponding to the
- number N. */
-extern char *dngettext _INTL_PARAMS ((const char *__domainname,
- const char *__msgid1,
- const char *__msgid2,
- unsigned long int __n));
-
-/* Similar to `dcgettext' but select the plural form corresponding to the
- number N. */
-extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
- const char *__msgid1,
- const char *__msgid2,
- unsigned long int __n,
- int __category));
-
-
-/* Set the current default message catalog to DOMAINNAME.
- If DOMAINNAME is null, return the current default.
- If DOMAINNAME is "", reset to the default of "messages". */
-extern char *textdomain _INTL_PARAMS ((const char *__domainname));
-
-/* Specify that the DOMAINNAME message catalog will be found
- in DIRNAME rather than in the system locale data base. */
-extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname,
- const char *__dirname));
-
-/* Specify the character encoding in which the messages from the
- DOMAINNAME message catalog will be returned. */
-extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname,
- const char *__codeset));
-
-
-/* Optimized version of the functions above. */
-#if defined __OPTIMIZED
-/* These are macros, but could also be inline functions. */
-
-# define gettext(msgid) \
- dgettext (NULL, msgid)
-
-# define dgettext(domainname, msgid) \
- dcgettext (domainname, msgid, LC_MESSAGES)
-
-# define ngettext(msgid1, msgid2, n) \
- dngettext (NULL, msgid1, msgid2, n)
-
-# define dngettext(domainname, msgid1, msgid2, n) \
- dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
-
-#endif /* Optimizing. */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* libintl.h */
diff --git a/intl/loadinfo.h b/intl/loadinfo.h
deleted file mode 100644
index 5f2c3d6..0000000
--- a/intl/loadinfo.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifndef _LOADINFO_H
-#define _LOADINFO_H 1
-
-/* Declarations of locale dependent catalog lookup functions.
- Implemented in
-
- localealias.c Possibly replace a locale name by another.
- explodename.c Split a locale name into its various fields.
- l10nflist.c Generate a list of filenames of possible message catalogs.
- finddomain.c Find and open the relevant message catalogs.
-
- The main function _nl_find_domain() in finddomain.c is declared
- in gettextP.h.
- */
-
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-/* Tell the compiler when a conditional or integer expression is
- almost always true or almost always false. */
-#ifndef HAVE_BUILTIN_EXPECT
-# define __builtin_expect(expr, val) (expr)
-#endif
-
-/* Separator in PATH like lists of pathnames. */
-#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
- /* Win32, OS/2, DOS */
-# define PATH_SEPARATOR ';'
-#else
- /* Unix */
-# define PATH_SEPARATOR ':'
-#endif
-
-/* Encoding of locale name parts. */
-#define CEN_REVISION 1
-#define CEN_SPONSOR 2
-#define CEN_SPECIAL 4
-#define XPG_NORM_CODESET 8
-#define XPG_CODESET 16
-#define TERRITORY 32
-#define CEN_AUDIENCE 64
-#define XPG_MODIFIER 128
-
-#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
-#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
-
-
-struct loaded_l10nfile
-{
- const char *filename;
- int decided;
-
- const void *data;
-
- struct loaded_l10nfile *next;
- struct loaded_l10nfile *successor[1];
-};
-
-
-/* Normalize codeset name. There is no standard for the codeset
- names. Normalization allows the user to use any of the common
- names. The return value is dynamically allocated and has to be
- freed by the caller. */
-extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
- size_t name_len));
-
-extern struct loaded_l10nfile *
-_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
- const char *dirlist, size_t dirlist_len, int mask,
- const char *language, const char *territory,
- const char *codeset,
- const char *normalized_codeset,
- const char *modifier, const char *special,
- const char *sponsor, const char *revision,
- const char *filename, int do_allocate));
-
-
-extern const char *_nl_expand_alias PARAMS ((const char *name));
-
-/* normalized_codeset is dynamically allocated and has to be freed by
- the caller. */
-extern int _nl_explode_name PARAMS ((char *name, const char **language,
- const char **modifier,
- const char **territory,
- const char **codeset,
- const char **normalized_codeset,
- const char **special,
- const char **sponsor,
- const char **revision));
-
-extern char *_nl_find_language PARAMS ((const char *name));
-
-#endif /* loadinfo.h */
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
deleted file mode 100644
index d8e9be4..0000000
--- a/intl/loadmsgcat.c
+++ /dev/null
@@ -1,445 +0,0 @@
-/* Load needed message catalogs.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-/* Tell glibc's <string.h> to provide a prototype for mempcpy().
- This must come before <config.h> because <config.h> may include
- <features.h>, and once <features.h> has been included, it's too late. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-# define HAVE_ALLOCA 1
-#else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca
-char *alloca ();
-# endif
-# endif
-# endif
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-#endif
-
-#ifdef _LIBC
-# include <langinfo.h>
-# include <locale.h>
-#endif
-
-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
- || (defined _LIBC && defined _POSIX_MAPPED_FILES)
-# include <sys/mman.h>
-# undef HAVE_MMAP
-# define HAVE_MMAP 1
-#else
-# undef HAVE_MMAP
-#endif
-
-#include "gmo.h"
-#include "gettextP.h"
-#include "plural-exp.h"
-
-#ifdef _LIBC
-# include "../locale/localeinfo.h"
-#endif
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ISO C functions. This is required by the standard
- because some ISO C functions will require linking with this object
- file and the name space must not be polluted. */
-# define open __open
-# define close __close
-# define read __read
-# define mmap __mmap
-# define munmap __munmap
-#endif
-
-/* For those losing systems which don't have `alloca' we have to add
- some additional code emulating it. */
-#ifdef HAVE_ALLOCA
-# define freea(p) /* nothing */
-#else
-# define alloca(n) malloc (n)
-# define freea(p) free (p)
-#endif
-
-/* For systems that distinguish between text and binary I/O.
- O_BINARY is usually declared in <fcntl.h>. */
-#if !defined O_BINARY && defined _O_BINARY
- /* For MSC-compatible compilers. */
-# define O_BINARY _O_BINARY
-# define O_TEXT _O_TEXT
-#endif
-#ifdef __BEOS__
- /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
-# undef O_BINARY
-# undef O_TEXT
-#endif
-/* On reasonable systems, binary I/O is the default. */
-#ifndef O_BINARY
-# define O_BINARY 0
-#endif
-
-/* We need a sign, whether a new catalog was loaded, which can be associated
- with all translations. This is important if the translations are
- cached by one of GCC's features. */
-int _nl_msg_cat_cntr;
-
-
-/* Initialize the codeset dependent parts of an opened message catalog.
- Return the header entry. */
-const char *
-internal_function
-_nl_init_domain_conv (domain_file, domain, domainbinding)
- struct loaded_l10nfile *domain_file;
- struct loaded_domain *domain;
- struct binding *domainbinding;
-{
- /* Find out about the character set the file is encoded with.
- This can be found (in textual form) in the entry "". If this
- entry does not exist or if this does not contain the `charset='
- information, we will assume the charset matches the one the
- current locale and we don't have to perform any conversion. */
- char *nullentry;
- size_t nullentrylen;
-
- /* Preinitialize fields, to avoid recursion during _nl_find_msg. */
- domain->codeset_cntr =
- (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
-#ifdef _LIBC
- domain->conv = (__gconv_t) -1;
-#else
-# if HAVE_ICONV
- domain->conv = (iconv_t) -1;
-# endif
-#endif
- domain->conv_tab = NULL;
-
- /* Get the header entry. */
- nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
-
- if (nullentry != NULL)
- {
-#if defined _LIBC || HAVE_ICONV
- const char *charsetstr;
-
- charsetstr = strstr (nullentry, "charset=");
- if (charsetstr != NULL)
- {
- size_t len;
- char *charset;
- const char *outcharset;
-
- charsetstr += strlen ("charset=");
- len = strcspn (charsetstr, " \t\n");
-
- charset = (char *) alloca (len + 1);
-# if defined _LIBC || HAVE_MEMPCPY
- *((char *) mempcpy (charset, charsetstr, len)) = '\0';
-# else
- memcpy (charset, charsetstr, len);
- charset[len] = '\0';
-# endif
-
- /* The output charset should normally be determined by the
- locale. But sometimes the locale is not used or not correctly
- set up, so we provide a possibility for the user to override
- this. Moreover, the value specified through
- bind_textdomain_codeset overrides both. */
- if (domainbinding != NULL && domainbinding->codeset != NULL)
- outcharset = domainbinding->codeset;
- else
- {
- outcharset = getenv ("OUTPUT_CHARSET");
- if (outcharset == NULL || outcharset[0] == '\0')
- {
-# ifdef _LIBC
- outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
-# else
-# if HAVE_ICONV
- extern const char *locale_charset PARAMS ((void));
- outcharset = locale_charset ();
-# endif
-# endif
- }
- }
-
-# ifdef _LIBC
- /* We always want to use transliteration. */
- outcharset = norm_add_slashes (outcharset, "TRANSLIT");
- charset = norm_add_slashes (charset, NULL);
- if (__gconv_open (outcharset, charset, &domain->conv,
- GCONV_AVOID_NOCONV)
- != __GCONV_OK)
- domain->conv = (__gconv_t) -1;
-# else
-# if HAVE_ICONV
- /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
- we want to use transliteration. */
-# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
- || _LIBICONV_VERSION >= 0x0105
- len = strlen (outcharset);
- {
- char *tmp = (char *) alloca (len + 10 + 1);
- memcpy (tmp, outcharset, len);
- memcpy (tmp + len, "//TRANSLIT", 10 + 1);
- outcharset = tmp;
- }
-# endif
- domain->conv = iconv_open (outcharset, charset);
-# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
- || _LIBICONV_VERSION >= 0x0105
- freea (outcharset);
-# endif
-# endif
-# endif
-
- freea (charset);
- }
-#endif /* _LIBC || HAVE_ICONV */
- }
-
- return nullentry;
-}
-
-/* Frees the codeset dependent parts of an opened message catalog. */
-void
-internal_function
-_nl_free_domain_conv (domain)
- struct loaded_domain *domain;
-{
- if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
- free (domain->conv_tab);
-
-#ifdef _LIBC
- if (domain->conv != (__gconv_t) -1)
- __gconv_close (domain->conv);
-#else
-# if HAVE_ICONV
- if (domain->conv != (iconv_t) -1)
- iconv_close (domain->conv);
-# endif
-#endif
-}
-
-/* Load the message catalogs specified by FILENAME. If it is no valid
- message catalog do nothing. */
-void
-internal_function
-_nl_load_domain (domain_file, domainbinding)
- struct loaded_l10nfile *domain_file;
- struct binding *domainbinding;
-{
- int fd;
- size_t size;
-#ifdef _LIBC
- struct stat64 st;
-#else
- struct stat st;
-#endif
- struct mo_file_header *data = (struct mo_file_header *) -1;
- int use_mmap = 0;
- struct loaded_domain *domain;
- const char *nullentry;
-
- domain_file->decided = 1;
- domain_file->data = NULL;
-
- /* Note that it would be useless to store domainbinding in domain_file
- because domainbinding might be == NULL now but != NULL later (after
- a call to bind_textdomain_codeset). */
-
- /* If the record does not represent a valid locale the FILENAME
- might be NULL. This can happen when according to the given
- specification the locale file name is different for XPG and CEN
- syntax. */
- if (domain_file->filename == NULL)
- return;
-
- /* Try to open the addressed file. */
- fd = open (domain_file->filename, O_RDONLY | O_BINARY);
- if (fd == -1)
- return;
-
- /* We must know about the size of the file. */
- if (
-#ifdef _LIBC
- __builtin_expect (fstat64 (fd, &st) != 0, 0)
-#else
- __builtin_expect (fstat (fd, &st) != 0, 0)
-#endif
- || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
- || __builtin_expect (size < sizeof (struct mo_file_header), 0))
- {
- /* Something went wrong. */
- close (fd);
- return;
- }
-
-#ifdef HAVE_MMAP
- /* Now we are ready to load the file. If mmap() is available we try
- this first. If not available or it failed we try to load it. */
- data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
- MAP_PRIVATE, fd, 0);
-
- if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
- {
- /* mmap() call was successful. */
- close (fd);
- use_mmap = 1;
- }
-#endif
-
- /* If the data is not yet available (i.e. mmap'ed) we try to load
- it manually. */
- if (data == (struct mo_file_header *) -1)
- {
- size_t to_read;
- char *read_ptr;
-
- data = (struct mo_file_header *) malloc (size);
- if (data == NULL)
- return;
-
- to_read = size;
- read_ptr = (char *) data;
- do
- {
- long int nb = (long int) read (fd, read_ptr, to_read);
- if (nb <= 0)
- {
-#ifdef EINTR
- if (nb == -1 && errno == EINTR)
- continue;
-#endif
- close (fd);
- return;
- }
- read_ptr += nb;
- to_read -= nb;
- }
- while (to_read > 0);
-
- close (fd);
- }
-
- /* Using the magic number we can test whether it really is a message
- catalog file. */
- if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
- 0))
- {
- /* The magic number is wrong: not a message catalog file. */
-#ifdef HAVE_MMAP
- if (use_mmap)
- munmap ((caddr_t) data, size);
- else
-#endif
- free (data);
- return;
- }
-
- domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
- if (domain == NULL)
- return;
- domain_file->data = domain;
-
- domain->data = (char *) data;
- domain->use_mmap = use_mmap;
- domain->mmap_size = size;
- domain->must_swap = data->magic != _MAGIC;
-
- /* Fill in the information about the available tables. */
- switch (W (domain->must_swap, data->revision))
- {
- case 0:
- domain->nstrings = W (domain->must_swap, data->nstrings);
- domain->orig_tab = (struct string_desc *)
- ((char *) data + W (domain->must_swap, data->orig_tab_offset));
- domain->trans_tab = (struct string_desc *)
- ((char *) data + W (domain->must_swap, data->trans_tab_offset));
- domain->hash_size = W (domain->must_swap, data->hash_tab_size);
- domain->hash_tab = (nls_uint32 *)
- ((char *) data + W (domain->must_swap, data->hash_tab_offset));
- break;
- default:
- /* This is an invalid revision. */
-#ifdef HAVE_MMAP
- if (use_mmap)
- munmap ((caddr_t) data, size);
- else
-#endif
- free (data);
- free (domain);
- domain_file->data = NULL;
- return;
- }
-
- /* Now initialize the character set converter from the character set
- the file is encoded with (found in the header entry) to the domain's
- specified character set or the locale's character set. */
- nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
-
- /* Also look for a plural specification. */
- EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
-}
-
-
-#ifdef _LIBC
-void
-internal_function
-_nl_unload_domain (domain)
- struct loaded_domain *domain;
-{
- if (domain->plural != &__gettext_germanic_plural)
- __gettext_free_exp (domain->plural);
-
- _nl_free_domain_conv (domain);
-
-# ifdef _POSIX_MAPPED_FILES
- if (domain->use_mmap)
- munmap ((caddr_t) domain->data, domain->mmap_size);
- else
-# endif /* _POSIX_MAPPED_FILES */
- free ((void *) domain->data);
-
- free (domain);
-}
-#endif
diff --git a/intl/locale.alias b/intl/locale.alias
deleted file mode 100644
index 213357b..0000000
--- a/intl/locale.alias
+++ /dev/null
@@ -1,78 +0,0 @@
-# Locale name alias data base.
-# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Library General Public License as published
-# by the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library 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.
-
-# The format of this file is the same as for the corresponding file of
-# the X Window System, which normally can be found in
-# /usr/lib/X11/locale/locale.alias
-# A single line contains two fields: an alias and a substitution value.
-# All entries are case independent.
-
-# Note: This file is far from being complete. If you have a value for
-# your own site which you think might be useful for others too, share
-# it with the rest of us. Send it using the `glibcbug' script to
-# bugs@gnu.org.
-
-# Packages using this file:
-
-bokmal no_NO.ISO-8859-1
-bokml no_NO.ISO-8859-1
-catalan ca_ES.ISO-8859-1
-croatian hr_HR.ISO-8859-2
-czech cs_CZ.ISO-8859-2
-danish da_DK.ISO-8859-1
-dansk da_DK.ISO-8859-1
-deutsch de_DE.ISO-8859-1
-dutch nl_NL.ISO-8859-1
-eesti et_EE.ISO-8859-1
-estonian et_EE.ISO-8859-1
-finnish fi_FI.ISO-8859-1
-franais fr_FR.ISO-8859-1
-french fr_FR.ISO-8859-1
-galego gl_ES.ISO-8859-1
-galician gl_ES.ISO-8859-1
-german de_DE.ISO-8859-1
-greek el_GR.ISO-8859-7
-hebrew he_IL.ISO-8859-8
-hrvatski hr_HR.ISO-8859-2
-hungarian hu_HU.ISO-8859-2
-icelandic is_IS.ISO-8859-1
-italian it_IT.ISO-8859-1
-japanese ja_JP.eucJP
-japanese.euc ja_JP.eucJP
-ja_JP ja_JP.eucJP
-ja_JP.ujis ja_JP.eucJP
-japanese.sjis ja_JP.SJIS
-korean ko_KR.eucKR
-korean.euc ko_KR.eucKR
-ko_KR ko_KR.eucKR
-lithuanian lt_LT.ISO-8859-13
-nb_NO no_NO.ISO-8859-1
-nb_NO.ISO-8859-1 no_NO.ISO-8859-1
-norwegian no_NO.ISO-8859-1
-nynorsk nn_NO.ISO-8859-1
-polish pl_PL.ISO-8859-2
-portuguese pt_PT.ISO-8859-1
-romanian ro_RO.ISO-8859-2
-russian ru_RU.ISO-8859-5
-slovak sk_SK.ISO-8859-2
-slovene sl_SI.ISO-8859-2
-slovenian sl_SI.ISO-8859-2
-spanish es_ES.ISO-8859-1
-swedish sv_SE.ISO-8859-1
-thai th_TH.TIS-620
-turkish tr_TR.ISO-8859-9
diff --git a/intl/localealias.c b/intl/localealias.c
deleted file mode 100644
index 68f1c0d..0000000
--- a/intl/localealias.c
+++ /dev/null
@@ -1,419 +0,0 @@
-/* Handle aliases for locale names.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-/* Tell glibc's <string.h> to provide a prototype for mempcpy().
- This must come before <config.h> because <config.h> may include
- <features.h>, and once <features.h> has been included, it's too late. */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <stdio.h>
-#if defined _LIBC || defined HAVE___FSETLOCKING
-# include <stdio_ext.h>
-#endif
-#include <sys/types.h>
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-# define HAVE_ALLOCA 1
-#else
-# if defined HAVE_ALLOCA_H || defined _LIBC
-# include <alloca.h>
-# else
-# ifdef _AIX
- #pragma alloca
-# else
-# ifndef alloca
-char *alloca ();
-# endif
-# endif
-# endif
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "gettextP.h"
-
-/* @@ end of prolog @@ */
-
-#ifdef _LIBC
-/* Rename the non ANSI C functions. This is required by the standard
- because some ANSI C functions will require linking with this object
- file and the name space must not be polluted. */
-# define strcasecmp __strcasecmp
-
-# ifndef mempcpy
-# define mempcpy __mempcpy
-# endif
-# define HAVE_MEMPCPY 1
-# define HAVE___FSETLOCKING 1
-
-/* We need locking here since we can be called from different places. */
-# include <bits/libc-lock.h>
-
-__libc_lock_define_initialized (static, lock);
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-/* Some optimizations for glibc. */
-#ifdef _LIBC
-# define FEOF(fp) feof_unlocked (fp)
-# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
-#else
-# define FEOF(fp) feof (fp)
-# define FGETS(buf, n, fp) fgets (buf, n, fp)
-#endif
-
-/* For those losing systems which don't have `alloca' we have to add
- some additional code emulating it. */
-#ifdef HAVE_ALLOCA
-# define freea(p) /* nothing */
-#else
-# define alloca(n) malloc (n)
-# define freea(p) free (p)
-#endif
-
-#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
-# undef fgets
-# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
-#endif
-#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
-# undef feof
-# define feof(s) feof_unlocked (s)
-#endif
-
-
-struct alias_map
-{
- const char *alias;
- const char *value;
-};
-
-
-static char *string_space;
-static size_t string_space_act;
-static size_t string_space_max;
-static struct alias_map *map;
-static size_t nmap;
-static size_t maxmap;
-
-
-/* Prototypes for local functions. */
-static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
- internal_function;
-static int extend_alias_table PARAMS ((void));
-static int alias_compare PARAMS ((const struct alias_map *map1,
- const struct alias_map *map2));
-
-
-const char *
-_nl_expand_alias (name)
- const char *name;
-{
- static const char *locale_alias_path;
- struct alias_map *retval;
- const char *result = NULL;
- size_t added;
-
-#ifdef _LIBC
- __libc_lock_lock (lock);
-#endif
-
- if (locale_alias_path == NULL)
- locale_alias_path = LOCALE_ALIAS_PATH;
-
- do
- {
- struct alias_map item;
-
- item.alias = name;
-
- if (nmap > 0)
- retval = (struct alias_map *) bsearch (&item, map, nmap,
- sizeof (struct alias_map),
- (int (*) PARAMS ((const void *,
- const void *))
- ) alias_compare);
- else
- retval = NULL;
-
- /* We really found an alias. Return the value. */
- if (retval != NULL)
- {
- result = retval->value;
- break;
- }
-
- /* Perhaps we can find another alias file. */
- added = 0;
- while (added == 0 && locale_alias_path[0] != '\0')
- {
- const char *start;
-
- while (locale_alias_path[0] == PATH_SEPARATOR)
- ++locale_alias_path;
- start = locale_alias_path;
-
- while (locale_alias_path[0] != '\0'
- && locale_alias_path[0] != PATH_SEPARATOR)
- ++locale_alias_path;
-
- if (start < locale_alias_path)
- added = read_alias_file (start, locale_alias_path - start);
- }
- }
- while (added != 0);
-
-#ifdef _LIBC
- __libc_lock_unlock (lock);
-#endif
-
- return result;
-}
-
-
-static size_t
-internal_function
-read_alias_file (fname, fname_len)
- const char *fname;
- int fname_len;
-{
- FILE *fp;
- char *full_fname;
- size_t added;
- static const char aliasfile[] = "/locale.alias";
-
- full_fname = (char *) alloca (fname_len + sizeof aliasfile);
-#ifdef HAVE_MEMPCPY
- mempcpy (mempcpy (full_fname, fname, fname_len),
- aliasfile, sizeof aliasfile);
-#else
- memcpy (full_fname, fname, fname_len);
- memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
-#endif
-
- fp = fopen (full_fname, "r");
- freea (full_fname);
- if (fp == NULL)
- return 0;
-
-#ifdef HAVE___FSETLOCKING
- /* No threads present. */
- __fsetlocking (fp, FSETLOCKING_BYCALLER);
-#endif
-
- added = 0;
- while (!FEOF (fp))
- {
- /* It is a reasonable approach to use a fix buffer here because
- a) we are only interested in the first two fields
- b) these fields must be usable as file names and so must not
- be that long
- */
- char buf[BUFSIZ];
- char *alias;
- char *value;
- char *cp;
-
- if (FGETS (buf, sizeof buf, fp) == NULL)
- /* EOF reached. */
- break;
-
- /* Possibly not the whole line fits into the buffer. Ignore
- the rest of the line. */
- if (strchr (buf, '\n') == NULL)
- {
- char altbuf[BUFSIZ];
- do
- if (FGETS (altbuf, sizeof altbuf, fp) == NULL)
- /* Make sure the inner loop will be left. The outer loop
- will exit at the `feof' test. */
- break;
- while (strchr (altbuf, '\n') == NULL);
- }
-
- cp = buf;
- /* Ignore leading white space. */
- while (isspace ((unsigned char) cp[0]))
- ++cp;
-
- /* A leading '#' signals a comment line. */
- if (cp[0] != '\0' && cp[0] != '#')
- {
- alias = cp++;
- while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
- ++cp;
- /* Terminate alias name. */
- if (cp[0] != '\0')
- *cp++ = '\0';
-
- /* Now look for the beginning of the value. */
- while (isspace ((unsigned char) cp[0]))
- ++cp;
-
- if (cp[0] != '\0')
- {
- size_t alias_len;
- size_t value_len;
-
- value = cp++;
- while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
- ++cp;
- /* Terminate value. */
- if (cp[0] == '\n')
- {
- /* This has to be done to make the following test
- for the end of line possible. We are looking for
- the terminating '\n' which do not overwrite here. */
- *cp++ = '\0';
- *cp = '\n';
- }
- else if (cp[0] != '\0')
- *cp++ = '\0';
-
- if (nmap >= maxmap)
- if (__builtin_expect (extend_alias_table (), 0))
- return added;
-
- alias_len = strlen (alias) + 1;
- value_len = strlen (value) + 1;
-
- if (string_space_act + alias_len + value_len > string_space_max)
- {
- /* Increase size of memory pool. */
- size_t new_size = (string_space_max
- + (alias_len + value_len > 1024
- ? alias_len + value_len : 1024));
- char *new_pool = (char *) realloc (string_space, new_size);
- if (new_pool == NULL)
- return added;
-
- if (__builtin_expect (string_space != new_pool, 0))
- {
- size_t i;
-
- for (i = 0; i < nmap; i++)
- {
- map[i].alias += new_pool - string_space;
- map[i].value += new_pool - string_space;
- }
- }
-
- string_space = new_pool;
- string_space_max = new_size;
- }
-
- map[nmap].alias = memcpy (&string_space[string_space_act],
- alias, alias_len);
- string_space_act += alias_len;
-
- map[nmap].value = memcpy (&string_space[string_space_act],
- value, value_len);
- string_space_act += value_len;
-
- ++nmap;
- ++added;
- }
- }
- }
-
- /* Should we test for ferror()? I think we have to silently ignore
- errors. --drepper */
- fclose (fp);
-
- if (added > 0)
- qsort (map, nmap, sizeof (struct alias_map),
- (int (*) PARAMS ((const void *, const void *))) alias_compare);
-
- return added;
-}
-
-
-static int
-extend_alias_table ()
-{
- size_t new_size;
- struct alias_map *new_map;
-
- new_size = maxmap == 0 ? 100 : 2 * maxmap;
- new_map = (struct alias_map *) realloc (map, (new_size
- * sizeof (struct alias_map)));
- if (new_map == NULL)
- /* Simply don't extend: we don't have any more core. */
- return -1;
-
- map = new_map;
- maxmap = new_size;
- return 0;
-}
-
-
-#ifdef _LIBC
-static void __attribute__ ((unused))
-free_mem (void)
-{
- if (string_space != NULL)
- free (string_space);
- if (map != NULL)
- free (map);
-}
-text_set_element (__libc_subfreeres, free_mem);
-#endif
-
-
-static int
-alias_compare (map1, map2)
- const struct alias_map *map1;
- const struct alias_map *map2;
-{
-#if defined _LIBC || defined HAVE_STRCASECMP
- return strcasecmp (map1->alias, map2->alias);
-#else
- const unsigned char *p1 = (const unsigned char *) map1->alias;
- const unsigned char *p2 = (const unsigned char *) map2->alias;
- unsigned char c1, c2;
-
- if (p1 == p2)
- return 0;
-
- do
- {
- /* I know this seems to be odd but the tolower() function in
- some systems libc cannot handle nonalpha characters. */
- c1 = isupper (*p1) ? tolower (*p1) : *p1;
- c2 = isupper (*p2) ? tolower (*p2) : *p2;
- if (c1 == '\0')
- break;
- ++p1;
- ++p2;
- }
- while (c1 == c2);
-
- return c1 - c2;
-#endif
-}
diff --git a/intl/localename.c b/intl/localename.c
deleted file mode 100644
index 87203cf..0000000
--- a/intl/localename.c
+++ /dev/null
@@ -1,696 +0,0 @@
-/* Determine the current selected locale.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
-/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <locale.h>
-
-#if defined _WIN32 || defined __WIN32__
-# undef WIN32 /* avoid warning on mingw32 */
-# define WIN32
-#endif
-
-#ifdef WIN32
-# define WIN32_LEAN_AND_MEAN
-# include <windows.h>
-/* Mingw headers don't have latest language and sublanguage codes. */
-# ifndef LANG_AFRIKAANS
-# define LANG_AFRIKAANS 0x36
-# endif
-# ifndef LANG_ALBANIAN
-# define LANG_ALBANIAN 0x1c
-# endif
-# ifndef LANG_ARABIC
-# define LANG_ARABIC 0x01
-# endif
-# ifndef LANG_ARMENIAN
-# define LANG_ARMENIAN 0x2b
-# endif
-# ifndef LANG_ASSAMESE
-# define LANG_ASSAMESE 0x4d
-# endif
-# ifndef LANG_AZERI
-# define LANG_AZERI 0x2c
-# endif
-# ifndef LANG_BASQUE
-# define LANG_BASQUE 0x2d
-# endif
-# ifndef LANG_BELARUSIAN
-# define LANG_BELARUSIAN 0x23
-# endif
-# ifndef LANG_BENGALI
-# define LANG_BENGALI 0x45
-# endif
-# ifndef LANG_CATALAN
-# define LANG_CATALAN 0x03
-# endif
-# ifndef LANG_ESTONIAN
-# define LANG_ESTONIAN 0x25
-# endif
-# ifndef LANG_FAEROESE
-# define LANG_FAEROESE 0x38
-# endif
-# ifndef LANG_FARSI
-# define LANG_FARSI 0x29
-# endif
-# ifndef LANG_GEORGIAN
-# define LANG_GEORGIAN 0x37
-# endif
-# ifndef LANG_GUJARATI
-# define LANG_GUJARATI 0x47
-# endif
-# ifndef LANG_HEBREW
-# define LANG_HEBREW 0x0d
-# endif
-# ifndef LANG_HINDI
-# define LANG_HINDI 0x39
-# endif
-# ifndef LANG_INDONESIAN
-# define LANG_INDONESIAN 0x21
-# endif
-# ifndef LANG_KANNADA
-# define LANG_KANNADA 0x4b
-# endif
-# ifndef LANG_KASHMIRI
-# define LANG_KASHMIRI 0x60
-# endif
-# ifndef LANG_KAZAK
-# define LANG_KAZAK 0x3f
-# endif
-# ifndef LANG_KONKANI
-# define LANG_KONKANI 0x57
-# endif
-# ifndef LANG_LATVIAN
-# define LANG_LATVIAN 0x26
-# endif
-# ifndef LANG_LITHUANIAN
-# define LANG_LITHUANIAN 0x27
-# endif
-# ifndef LANG_MACEDONIAN
-# define LANG_MACEDONIAN 0x2f
-# endif
-# ifndef LANG_MALAY
-# define LANG_MALAY 0x3e
-# endif
-# ifndef LANG_MALAYALAM
-# define LANG_MALAYALAM 0x4c
-# endif
-# ifndef LANG_MANIPURI
-# define LANG_MANIPURI 0x58
-# endif
-# ifndef LANG_MARATHI
-# define LANG_MARATHI 0x4e
-# endif
-# ifndef LANG_NEPALI
-# define LANG_NEPALI 0x61
-# endif
-# ifndef LANG_ORIYA
-# define LANG_ORIYA 0x48
-# endif
-# ifndef LANG_PUNJABI
-# define LANG_PUNJABI 0x46
-# endif
-# ifndef LANG_SANSKRIT
-# define LANG_SANSKRIT 0x4f
-# endif
-# ifndef LANG_SERBIAN
-# define LANG_SERBIAN 0x1a
-# endif
-# ifndef LANG_SINDHI
-# define LANG_SINDHI 0x59
-# endif
-# ifndef LANG_SLOVAK
-# define LANG_SLOVAK 0x1b
-# endif
-# ifndef LANG_SWAHILI
-# define LANG_SWAHILI 0x41
-# endif
-# ifndef LANG_SORBIAN
-# define LANG_SORBIAN 0x2e
-# endif
-# ifndef LANG_TAMIL
-# define LANG_TAMIL 0x49
-# endif
-# ifndef LANG_TATAR
-# define LANG_TATAR 0x44
-# endif
-# ifndef LANG_TELUGU
-# define LANG_TELUGU 0x4a
-# endif
-# ifndef LANG_THAI
-# define LANG_THAI 0x1e
-# endif
-# ifndef LANG_UKRAINIAN
-# define LANG_UKRAINIAN 0x22
-# endif
-# ifndef LANG_URDU
-# define LANG_URDU 0x20
-# endif
-# ifndef LANG_UZBEK
-# define LANG_UZBEK 0x43
-# endif
-# ifndef LANG_VIETNAMESE
-# define LANG_VIETNAMESE 0x2a
-# endif
-# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
-# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
-# endif
-# ifndef SUBLANG_ARABIC_IRAQ
-# define SUBLANG_ARABIC_IRAQ 0x02
-# endif
-# ifndef SUBLANG_ARABIC_EGYPT
-# define SUBLANG_ARABIC_EGYPT 0x03
-# endif
-# ifndef SUBLANG_ARABIC_LIBYA
-# define SUBLANG_ARABIC_LIBYA 0x04
-# endif
-# ifndef SUBLANG_ARABIC_ALGERIA
-# define SUBLANG_ARABIC_ALGERIA 0x05
-# endif
-# ifndef SUBLANG_ARABIC_MOROCCO
-# define SUBLANG_ARABIC_MOROCCO 0x06
-# endif
-# ifndef SUBLANG_ARABIC_TUNISIA
-# define SUBLANG_ARABIC_TUNISIA 0x07
-# endif
-# ifndef SUBLANG_ARABIC_OMAN
-# define SUBLANG_ARABIC_OMAN 0x08
-# endif
-# ifndef SUBLANG_ARABIC_YEMEN
-# define SUBLANG_ARABIC_YEMEN 0x09
-# endif
-# ifndef SUBLANG_ARABIC_SYRIA
-# define SUBLANG_ARABIC_SYRIA 0x0a
-# endif
-# ifndef SUBLANG_ARABIC_JORDAN
-# define SUBLANG_ARABIC_JORDAN 0x0b
-# endif
-# ifndef SUBLANG_ARABIC_LEBANON
-# define SUBLANG_ARABIC_LEBANON 0x0c
-# endif
-# ifndef SUBLANG_ARABIC_KUWAIT
-# define SUBLANG_ARABIC_KUWAIT 0x0d
-# endif
-# ifndef SUBLANG_ARABIC_UAE
-# define SUBLANG_ARABIC_UAE 0x0e
-# endif
-# ifndef SUBLANG_ARABIC_BAHRAIN
-# define SUBLANG_ARABIC_BAHRAIN 0x0f
-# endif
-# ifndef SUBLANG_ARABIC_QATAR
-# define SUBLANG_ARABIC_QATAR 0x10
-# endif
-# ifndef SUBLANG_AZERI_LATIN
-# define SUBLANG_AZERI_LATIN 0x01
-# endif
-# ifndef SUBLANG_AZERI_CYRILLIC
-# define SUBLANG_AZERI_CYRILLIC 0x02
-# endif
-# ifndef SUBLANG_CHINESE_MACAU
-# define SUBLANG_CHINESE_MACAU 0x05
-# endif
-# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
-# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
-# endif
-# ifndef SUBLANG_ENGLISH_JAMAICA
-# define SUBLANG_ENGLISH_JAMAICA 0x08
-# endif
-# ifndef SUBLANG_ENGLISH_CARIBBEAN
-# define SUBLANG_ENGLISH_CARIBBEAN 0x09
-# endif
-# ifndef SUBLANG_ENGLISH_BELIZE
-# define SUBLANG_ENGLISH_BELIZE 0x0a
-# endif
-# ifndef SUBLANG_ENGLISH_TRINIDAD
-# define SUBLANG_ENGLISH_TRINIDAD 0x0b
-# endif
-# ifndef SUBLANG_ENGLISH_ZIMBABWE
-# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
-# endif
-# ifndef SUBLANG_ENGLISH_PHILIPPINES
-# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
-# endif
-# ifndef SUBLANG_FRENCH_LUXEMBOURG
-# define SUBLANG_FRENCH_LUXEMBOURG 0x05
-# endif
-# ifndef SUBLANG_FRENCH_MONACO
-# define SUBLANG_FRENCH_MONACO 0x06
-# endif
-# ifndef SUBLANG_GERMAN_LUXEMBOURG
-# define SUBLANG_GERMAN_LUXEMBOURG 0x04
-# endif
-# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
-# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
-# endif
-# ifndef SUBLANG_KASHMIRI_INDIA
-# define SUBLANG_KASHMIRI_INDIA 0x02
-# endif
-# ifndef SUBLANG_MALAY_MALAYSIA
-# define SUBLANG_MALAY_MALAYSIA 0x01
-# endif
-# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
-# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
-# endif
-# ifndef SUBLANG_NEPALI_INDIA
-# define SUBLANG_NEPALI_INDIA 0x02
-# endif
-# ifndef SUBLANG_SERBIAN_LATIN
-# define SUBLANG_SERBIAN_LATIN 0x02
-# endif
-# ifndef SUBLANG_SERBIAN_CYRILLIC
-# define SUBLANG_SERBIAN_CYRILLIC 0x03
-# endif
-# ifndef SUBLANG_SPANISH_GUATEMALA
-# define SUBLANG_SPANISH_GUATEMALA 0x04
-# endif
-# ifndef SUBLANG_SPANISH_COSTA_RICA
-# define SUBLANG_SPANISH_COSTA_RICA 0x05
-# endif
-# ifndef SUBLANG_SPANISH_PANAMA
-# define SUBLANG_SPANISH_PANAMA 0x06
-# endif
-# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
-# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
-# endif
-# ifndef SUBLANG_SPANISH_VENEZUELA
-# define SUBLANG_SPANISH_VENEZUELA 0x08
-# endif
-# ifndef SUBLANG_SPANISH_COLOMBIA
-# define SUBLANG_SPANISH_COLOMBIA 0x09
-# endif
-# ifndef SUBLANG_SPANISH_PERU
-# define SUBLANG_SPANISH_PERU 0x0a
-# endif
-# ifndef SUBLANG_SPANISH_ARGENTINA
-# define SUBLANG_SPANISH_ARGENTINA 0x0b
-# endif
-# ifndef SUBLANG_SPANISH_ECUADOR
-# define SUBLANG_SPANISH_ECUADOR 0x0c
-# endif
-# ifndef SUBLANG_SPANISH_CHILE
-# define SUBLANG_SPANISH_CHILE 0x0d
-# endif
-# ifndef SUBLANG_SPANISH_URUGUAY
-# define SUBLANG_SPANISH_URUGUAY 0x0e
-# endif
-# ifndef SUBLANG_SPANISH_PARAGUAY
-# define SUBLANG_SPANISH_PARAGUAY 0x0f
-# endif
-# ifndef SUBLANG_SPANISH_BOLIVIA
-# define SUBLANG_SPANISH_BOLIVIA 0x10
-# endif
-# ifndef SUBLANG_SPANISH_EL_SALVADOR
-# define SUBLANG_SPANISH_EL_SALVADOR 0x11
-# endif
-# ifndef SUBLANG_SPANISH_HONDURAS
-# define SUBLANG_SPANISH_HONDURAS 0x12
-# endif
-# ifndef SUBLANG_SPANISH_NICARAGUA
-# define SUBLANG_SPANISH_NICARAGUA 0x13
-# endif
-# ifndef SUBLANG_SPANISH_PUERTO_RICO
-# define SUBLANG_SPANISH_PUERTO_RICO 0x14
-# endif
-# ifndef SUBLANG_SWEDISH_FINLAND
-# define SUBLANG_SWEDISH_FINLAND 0x02
-# endif
-# ifndef SUBLANG_URDU_PAKISTAN
-# define SUBLANG_URDU_PAKISTAN 0x01
-# endif
-# ifndef SUBLANG_URDU_INDIA
-# define SUBLANG_URDU_INDIA 0x02
-# endif
-# ifndef SUBLANG_UZBEK_LATIN
-# define SUBLANG_UZBEK_LATIN 0x01
-# endif
-# ifndef SUBLANG_UZBEK_CYRILLIC
-# define SUBLANG_UZBEK_CYRILLIC 0x02
-# endif
-#endif
-
-/* 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 __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
-# define HAVE_LOCALE_NULL
-#endif
-
-/* Determine the current locale's name, and canonicalize it into XPG syntax
- language[_territory[.codeset]][@modifier]
- The codeset part in the result is not reliable; the locale_charset()
- should be used for codeset information instead.
- The result must not be freed; it is statically allocated. */
-
-const char *
-_nl_locale_name (category, categoryname)
- int category;
- const char *categoryname;
-{
- const char *retval;
-
-#ifndef WIN32
-
- /* 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
- retval = setlocale (category, NULL);
-# else
- /* Setting of LC_ALL overwrites all other. */
- retval = getenv ("LC_ALL");
- if (retval == NULL || retval[0] == '\0')
- {
- /* Next comes the name of the desired category. */
- retval = getenv (categoryname);
- if (retval == NULL || retval[0] == '\0')
- {
- /* Last possibility is the LANG environment variable. */
- retval = getenv ("LANG");
- if (retval == NULL || retval[0] == '\0')
- /* We use C as the default domain. POSIX says this is
- implementation defined. */
- retval = "C";
- }
- }
-# endif
-
- return retval;
-
-#else /* WIN32 */
-
- /* Return an XPG style locale name language[_territory][@modifier].
- Don't even bother determining the codeset; it's not useful in this
- context, because message catalogs are not specific to a single
- codeset. */
-
- LCID lcid;
- LANGID langid;
- int primary, sub;
-
- /* Let the user override the system settings through environment
- variables, as on POSIX systems. */
- retval = getenv ("LC_ALL");
- if (retval != NULL && retval[0] != '\0')
- return retval;
- retval = getenv (categoryname);
- if (retval != NULL && retval[0] != '\0')
- return retval;
- retval = getenv ("LANG");
- if (retval != NULL && retval[0] != '\0')
- return retval;
-
- /* Use native Win32 API locale ID. */
- lcid = GetThreadLocale ();
-
- /* Strip off the sorting rules, keep only the language part. */
- langid = LANGIDFROMLCID (lcid);
-
- /* Split into language and territory part. */
- primary = PRIMARYLANGID (langid);
- sub = SUBLANGID (langid);
- switch (primary)
- {
- case LANG_AFRIKAANS: return "af_ZA";
- case LANG_ALBANIAN: return "sq_AL";
- case LANG_ARABIC:
- switch (sub)
- {
- case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
- case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
- case SUBLANG_ARABIC_EGYPT: return "ar_EG";
- case SUBLANG_ARABIC_LIBYA: return "ar_LY";
- case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
- case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
- case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
- case SUBLANG_ARABIC_OMAN: return "ar_OM";
- case SUBLANG_ARABIC_YEMEN: return "ar_YE";
- case SUBLANG_ARABIC_SYRIA: return "ar_SY";
- case SUBLANG_ARABIC_JORDAN: return "ar_JO";
- case SUBLANG_ARABIC_LEBANON: return "ar_LB";
- case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
- case SUBLANG_ARABIC_UAE: return "ar_AE";
- case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
- case SUBLANG_ARABIC_QATAR: return "ar_QA";
- }
- return "ar";
- case LANG_ARMENIAN: return "hy_AM";
- case LANG_ASSAMESE: return "as_IN";
- case LANG_AZERI:
- switch (sub)
- {
- /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
- case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
- case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
- }
- return "az";
- case LANG_BASQUE:
- return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
- case LANG_BELARUSIAN: return "be_BY";
- case LANG_BENGALI: return "bn_IN";
- case LANG_BULGARIAN: return "bg_BG";
- case LANG_CATALAN: return "ca_ES";
- case LANG_CHINESE:
- switch (sub)
- {
- case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
- case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
- case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
- case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
- case SUBLANG_CHINESE_MACAU: return "zh_MO";
- }
- return "zh";
- case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN
- * What used to be called Serbo-Croatian
- * should really now be two separate
- * languages because of political reasons.
- * (Says tml, who knows nothing about Serbian
- * or Croatian.)
- * (I can feel those flames coming already.)
- */
- switch (sub)
- {
- /* FIXME: How to distinguish Croatian and Latin Serbian locales? */
- case SUBLANG_SERBIAN_LATIN: return "sr_YU";
- case SUBLANG_SERBIAN_CYRILLIC: return "sr_YU@cyrillic";
- default: return "hr_HR";
- }
- case LANG_CZECH: return "cs_CZ";
- case LANG_DANISH: return "da_DK";
- case LANG_DUTCH:
- switch (sub)
- {
- case SUBLANG_DUTCH: return "nl_NL";
- case SUBLANG_DUTCH_BELGIAN: return "nl_BE";
- }
- return "nl";
- case LANG_ENGLISH:
- switch (sub)
- {
- /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
- * English was the language spoken in England.
- * Oh well.
- */
- case SUBLANG_ENGLISH_US: return "en_US";
- case SUBLANG_ENGLISH_UK: return "en_GB";
- case SUBLANG_ENGLISH_AUS: return "en_AU";
- case SUBLANG_ENGLISH_CAN: return "en_CA";
- case SUBLANG_ENGLISH_NZ: return "en_NZ";
- case SUBLANG_ENGLISH_EIRE: return "en_IE";
- case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
- case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
- case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
- case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
- case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
- case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
- case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
- }
- return "en";
- case LANG_ESTONIAN: return "et_EE";
- case LANG_FAEROESE: return "fo_FO";
- case LANG_FARSI: return "fa_IR";
- case LANG_FINNISH: return "fi_FI";
- case LANG_FRENCH:
- switch (sub)
- {
- case SUBLANG_FRENCH: return "fr_FR";
- case SUBLANG_FRENCH_BELGIAN: return "fr_BE";
- case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
- case SUBLANG_FRENCH_SWISS: return "fr_CH";
- case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
- case SUBLANG_FRENCH_MONACO: return "fr_MC";
- }
- return "fr";
- case LANG_GEORGIAN: return "ka_GE";
- case LANG_GERMAN:
- switch (sub)
- {
- case SUBLANG_GERMAN: return "de_DE";
- case SUBLANG_GERMAN_SWISS: return "de_CH";
- case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
- case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
- case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
- }
- return "de";
- case LANG_GREEK: return "el_GR";
- case LANG_GUJARATI: return "gu_IN";
- case LANG_HEBREW: return "he_IL";
- case LANG_HINDI: return "hi_IN";
- case LANG_HUNGARIAN: return "hu_HU";
- case LANG_ICELANDIC: return "is_IS";
- case LANG_INDONESIAN: return "id_ID";
- case LANG_ITALIAN:
- switch (sub)
- {
- case SUBLANG_ITALIAN: return "it_IT";
- case SUBLANG_ITALIAN_SWISS: return "it_CH";
- }
- return "it";
- case LANG_JAPANESE: return "ja_JP";
- case LANG_KANNADA: return "kn_IN";
- case LANG_KASHMIRI:
- switch (sub)
- {
- case SUBLANG_DEFAULT: return "ks_PK";
- case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
- }
- return "ks";
- case LANG_KAZAK: return "kk_KZ";
- case LANG_KONKANI:
- /* FIXME: Adjust this when such locales appear on Unix. */
- return "kok_IN";
- case LANG_KOREAN: return "ko_KR";
- case LANG_LATVIAN: return "lv_LV";
- case LANG_LITHUANIAN: return "lt_LT";
- case LANG_MACEDONIAN: return "mk_MK";
- case LANG_MALAY:
- switch (sub)
- {
- case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
- case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
- }
- return "ms";
- case LANG_MALAYALAM: return "ml_IN";
- case LANG_MANIPURI:
- /* FIXME: Adjust this when such locales appear on Unix. */
- return "mni_IN";
- case LANG_MARATHI: return "mr_IN";
- case LANG_NEPALI:
- switch (sub)
- {
- case SUBLANG_DEFAULT: return "ne_NP";
- case SUBLANG_NEPALI_INDIA: return "ne_IN";
- }
- return "ne";
- case LANG_NORWEGIAN:
- switch (sub)
- {
- case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
- case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
- }
- return "no";
- case LANG_ORIYA: return "or_IN";
- case LANG_POLISH: return "pl_PL";
- case LANG_PORTUGUESE:
- switch (sub)
- {
- case SUBLANG_PORTUGUESE: return "pt_PT";
- /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
- Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
- case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
- }
- return "pt";
- case LANG_PUNJABI: return "pa_IN";
- case LANG_ROMANIAN: return "ro_RO";
- case LANG_RUSSIAN:
- return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */
- case LANG_SANSKRIT: return "sa_IN";
- case LANG_SINDHI: return "sd";
- case LANG_SLOVAK: return "sk_SK";
- case LANG_SLOVENIAN: return "sl_SI";
- case LANG_SORBIAN:
- /* FIXME: Adjust this when such locales appear on Unix. */
- return "wen_DE";
- case LANG_SPANISH:
- switch (sub)
- {
- case SUBLANG_SPANISH: return "es_ES";
- case SUBLANG_SPANISH_MEXICAN: return "es_MX";
- case SUBLANG_SPANISH_MODERN:
- return "es_ES@modern"; /* not seen on Unix */
- case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
- case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
- case SUBLANG_SPANISH_PANAMA: return "es_PA";
- case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
- case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
- case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
- case SUBLANG_SPANISH_PERU: return "es_PE";
- case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
- case SUBLANG_SPANISH_ECUADOR: return "es_EC";
- case SUBLANG_SPANISH_CHILE: return "es_CL";
- case SUBLANG_SPANISH_URUGUAY: return "es_UY";
- case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
- case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
- case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
- case SUBLANG_SPANISH_HONDURAS: return "es_HN";
- case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
- case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
- }
- return "es";
- case LANG_SWAHILI: return "sw";
- case LANG_SWEDISH:
- switch (sub)
- {
- case SUBLANG_DEFAULT: return "sv_SE";
- case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
- }
- return "sv";
- case LANG_TAMIL:
- return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
- case LANG_TATAR: return "tt";
- case LANG_TELUGU: return "te_IN";
- case LANG_THAI: return "th_TH";
- case LANG_TURKISH: return "tr_TR";
- case LANG_UKRAINIAN: return "uk_UA";
- case LANG_URDU:
- switch (sub)
- {
- case SUBLANG_URDU_PAKISTAN: return "ur_PK";
- case SUBLANG_URDU_INDIA: return "ur_IN";
- }
- return "ur";
- case LANG_UZBEK:
- switch (sub)
- {
- /* FIXME: Adjust this when Uzbek locales appear on Unix. */
- case SUBLANG_UZBEK_LATIN: return "uz_UZ@latin";
- case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
- }
- return "uz";
- case LANG_VIETNAMESE: return "vi_VN";
- default: return "C";
- }
-
-#endif
-}
diff --git a/intl/ngettext.c b/intl/ngettext.c
deleted file mode 100644
index afea335..0000000
--- a/intl/ngettext.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Implementation of ngettext(3) function.
- Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef _LIBC
-# define __need_NULL
-# include <stddef.h>
-#else
-# include <stdlib.h> /* Just for NULL. */
-#endif
-
-#include "gettextP.h"
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-
-#include <locale.h>
-
-/* @@ end of prolog @@ */
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define NGETTEXT __ngettext
-# define DCNGETTEXT __dcngettext
-#else
-# define NGETTEXT ngettext__
-# define DCNGETTEXT dcngettext__
-#endif
-
-/* Look up MSGID in the current default message catalog for the current
- LC_MESSAGES locale. If not found, returns MSGID itself (the default
- text). */
-char *
-NGETTEXT (msgid1, msgid2, n)
- const char *msgid1;
- const char *msgid2;
- unsigned long int n;
-{
- return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__ngettext, ngettext);
-#endif
diff --git a/intl/os2compat.c b/intl/os2compat.c
deleted file mode 100644
index 3c77d73..0000000
--- a/intl/os2compat.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* OS/2 compatibility functions.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#define OS2_AWARE
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-/* A version of getenv() that works from DLLs */
-extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
-
-char *
-_nl_getenv (const char *name)
-{
- unsigned char *value;
- if (DosScanEnv (name, &value))
- return NULL;
- else
- return value;
-}
-
-char _nl_default_dirname[] = /* a 260+1 bytes large buffer */
- "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
- "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
- "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
- "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
- "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
- "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
- "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
- "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
- "\0\0\0\0"
-#define LOCALEDIR_MAX 260
-
-char *_os2_libdir = NULL;
-char *_os2_localealiaspath = NULL;
-char *_os2_localedir = NULL;
-
-static __attribute__((constructor)) void
-os2_initialize ()
-{
- char *root = getenv ("UNIXROOT");
- char *gnulocaledir = getenv ("GNULOCALEDIR");
-
- _os2_libdir = gnulocaledir;
- if (!_os2_libdir)
- {
- if (root)
- {
- size_t sl = strlen (root);
- _os2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
- memcpy (_os2_libdir, root, sl);
- memcpy (_os2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
- }
- else
- _os2_libdir = LIBDIR;
- }
-
- _os2_localealiaspath = gnulocaledir;
- if (!_os2_localealiaspath)
- {
- if (root)
- {
- size_t sl = strlen (root);
- _os2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
- memcpy (_os2_localealiaspath, root, sl);
- memcpy (_os2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
- }
- else
- _os2_localealiaspath = LOCALE_ALIAS_PATH;
- }
-
- _os2_localedir = gnulocaledir;
- if (!_os2_localedir)
- {
- if (root)
- {
- size_t sl = strlen (root);
- _os2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
- memcpy (_os2_localedir, root, sl);
- memcpy (_os2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
- }
- else
- _os2_localedir = LOCALEDIR;
- }
-
- {
- extern const char _nl_default_dirname__[];
- if (strlen (_os2_localedir) <= LOCALEDIR_MAX)
- strcpy (_nl_default_dirname__, _os2_localedir);
- }
-}
diff --git a/intl/os2compat.h b/intl/os2compat.h
deleted file mode 100644
index 33175b7..0000000
--- a/intl/os2compat.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* OS/2 compatibility defines.
- This file is intended to be included from config.h
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-/* When included from os2compat.h we need all the original definitions */
-#ifndef OS2_AWARE
-
-#undef LIBDIR
-#define LIBDIR _os2_libdir
-extern char *_os2_libdir;
-
-#undef LOCALEDIR
-#define LOCALEDIR _os2_localedir
-extern char *_os2_localedir;
-
-#undef LOCALE_ALIAS_PATH
-#define LOCALE_ALIAS_PATH _os2_localealiaspath
-extern char *_os2_localealiaspath;
-
-#endif
-
-#undef HAVE_STRCASECMP
-#define HAVE_STRCASECMP 1
-#define strcasecmp stricmp
-#define strncasecmp strnicmp
-
-/* We have our own getenv() which works even if library is compiled as DLL */
-#define getenv _nl_getenv
-
-/* Older versions of gettext used -1 as the value of LC_MESSAGES */
-#define LC_MESSAGES_COMPAT (-1)
diff --git a/intl/osdep.c b/intl/osdep.c
deleted file mode 100644
index d2d8575..0000000
--- a/intl/osdep.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* OS dependent parts of libintl.
- Copyright (C) 2001-2002 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#if defined __EMX__
-# include "os2compat.c"
-#else
-/* Avoid AIX compiler warning. */
-typedef int dummy;
-#endif
diff --git a/intl/plural-exp.c b/intl/plural-exp.c
deleted file mode 100644
index 0660896..0000000
--- a/intl/plural-exp.c
+++ /dev/null
@@ -1,156 +0,0 @@
-/* Expression parsing for plural form selection.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "plural-exp.h"
-
-#if (defined __GNUC__ && !defined __APPLE_CC__) \
- || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
-
-/* These structs are the constant expression for the germanic plural
- form determination. It represents the expression "n != 1". */
-static const struct expression plvar =
-{
- .nargs = 0,
- .operation = var,
-};
-static const struct expression plone =
-{
- .nargs = 0,
- .operation = num,
- .val =
- {
- .num = 1
- }
-};
-struct expression GERMANIC_PLURAL =
-{
- .nargs = 2,
- .operation = not_equal,
- .val =
- {
- .args =
- {
- [0] = (struct expression *) &plvar,
- [1] = (struct expression *) &plone
- }
- }
-};
-
-# define INIT_GERMANIC_PLURAL()
-
-#else
-
-/* For compilers without support for ISO C 99 struct/union initializers:
- Initialization at run-time. */
-
-static struct expression plvar;
-static struct expression plone;
-struct expression GERMANIC_PLURAL;
-
-static void
-init_germanic_plural ()
-{
- if (plone.val.num == 0)
- {
- plvar.nargs = 0;
- plvar.operation = var;
-
- plone.nargs = 0;
- plone.operation = num;
- plone.val.num = 1;
-
- GERMANIC_PLURAL.nargs = 2;
- GERMANIC_PLURAL.operation = not_equal;
- GERMANIC_PLURAL.val.args[0] = &plvar;
- GERMANIC_PLURAL.val.args[1] = &plone;
- }
-}
-
-# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
-
-#endif
-
-void
-internal_function
-EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp)
- const char *nullentry;
- struct expression **pluralp;
- unsigned long int *npluralsp;
-{
- if (nullentry != NULL)
- {
- const char *plural;
- const char *nplurals;
-
- plural = strstr (nullentry, "plural=");
- nplurals = strstr (nullentry, "nplurals=");
- if (plural == NULL || nplurals == NULL)
- goto no_plural;
- else
- {
- char *endp;
- unsigned long int n;
- struct parse_args args;
-
- /* First get the number. */
- nplurals += 9;
- while (*nplurals != '\0' && isspace ((unsigned char) *nplurals))
- ++nplurals;
- if (!(*nplurals >= '0' && *nplurals <= '9'))
- goto no_plural;
-#if defined HAVE_STRTOUL || defined _LIBC
- n = strtoul (nplurals, &endp, 10);
-#else
- for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
- n = n * 10 + (*endp - '0');
-#endif
- if (nplurals == endp)
- goto no_plural;
- *npluralsp = n;
-
- /* Due to the restrictions bison imposes onto the interface of the
- scanner function we have to put the input string and the result
- passed up from the parser into the same structure which address
- is passed down to the parser. */
- plural += 7;
- args.cp = plural;
- if (PLURAL_PARSE (&args) != 0)
- goto no_plural;
- *pluralp = args.res;
- }
- }
- else
- {
- /* By default we are using the Germanic form: singular form only
- for `one', the plural form otherwise. Yes, this is also what
- English is using since English is a Germanic language. */
- no_plural:
- INIT_GERMANIC_PLURAL ();
- *pluralp = &GERMANIC_PLURAL;
- *npluralsp = 2;
- }
-}
diff --git a/intl/plural-exp.h b/intl/plural-exp.h
deleted file mode 100644
index 62fc413..0000000
--- a/intl/plural-exp.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/* Expression parsing and evaluation for plural form selection.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifndef _PLURAL_EXP_H
-#define _PLURAL_EXP_H
-
-#ifndef PARAMS
-# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
-# define PARAMS(args) args
-# else
-# define PARAMS(args) ()
-# endif
-#endif
-
-#ifndef internal_function
-# define internal_function
-#endif
-
-
-/* This is the representation of the expressions to determine the
- plural form. */
-struct expression
-{
- int nargs; /* Number of arguments. */
- enum operator
- {
- /* Without arguments: */
- var, /* The variable "n". */
- num, /* Decimal number. */
- /* Unary operators: */
- lnot, /* Logical NOT. */
- /* Binary operators: */
- mult, /* Multiplication. */
- divide, /* Division. */
- module, /* Modulo operation. */
- plus, /* Addition. */
- minus, /* Subtraction. */
- less_than, /* Comparison. */
- greater_than, /* Comparison. */
- less_or_equal, /* Comparison. */
- greater_or_equal, /* Comparison. */
- equal, /* Comparison for equality. */
- not_equal, /* Comparison for inequality. */
- land, /* Logical AND. */
- lor, /* Logical OR. */
- /* Ternary operators: */
- qmop /* Question mark operator. */
- } operation;
- union
- {
- unsigned long int num; /* Number value for `num'. */
- struct expression *args[3]; /* Up to three arguments. */
- } val;
-};
-
-/* This is the data structure to pass information to the parser and get
- the result in a thread-safe way. */
-struct parse_args
-{
- const char *cp;
- struct expression *res;
-};
-
-
-/* Names for the libintl functions are a problem. This source code is used
- 1. in the GNU C Library library,
- 2. in the GNU libintl library,
- 3. in the GNU gettext tools.
- The function names in each situation must be different, to allow for
- binary incompatible changes in 'struct expression'. Furthermore,
- 1. in the GNU C Library library, the names have a __ prefix,
- 2.+3. in the GNU libintl library and in the GNU gettext tools, the names
- must follow ANSI C and not start with __.
- So we have to distinguish the three cases. */
-#ifdef _LIBC
-# define FREE_EXPRESSION __gettext_free_exp
-# define PLURAL_PARSE __gettextparse
-# define GERMANIC_PLURAL __gettext_germanic_plural
-# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
-#elif defined (IN_LIBINTL)
-# define FREE_EXPRESSION gettext_free_exp__
-# define PLURAL_PARSE gettextparse__
-# define GERMANIC_PLURAL gettext_germanic_plural__
-# define EXTRACT_PLURAL_EXPRESSION gettext_extract_plural__
-#else
-# define FREE_EXPRESSION free_plural_expression
-# define PLURAL_PARSE parse_plural_expression
-# define GERMANIC_PLURAL germanic_plural
-# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
-#endif
-
-extern void FREE_EXPRESSION PARAMS ((struct expression *exp))
- internal_function;
-extern int PLURAL_PARSE PARAMS ((void *arg));
-extern struct expression GERMANIC_PLURAL;
-extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry,
- struct expression **pluralp,
- unsigned long int *npluralsp))
- internal_function;
-
-#if !defined (_LIBC) && !defined (IN_LIBINTL)
-extern unsigned long int plural_eval PARAMS ((struct expression *pexp,
- unsigned long int n));
-#endif
-
-#endif /* _PLURAL_EXP_H */
diff --git a/intl/plural.c b/intl/plural.c
deleted file mode 100644
index 175c2db..0000000
--- a/intl/plural.c
+++ /dev/null
@@ -1,1322 +0,0 @@
-
-/* A Bison parser, made from plural.y
- by GNU Bison version 1.28 */
-
-#define YYBISON 1 /* Identify Bison output. */
-
-#define yyparse __gettextparse
-#define yylex __gettextlex
-#define yyerror __gettexterror
-#define yylval __gettextlval
-#define yychar __gettextchar
-#define yydebug __gettextdebug
-#define yynerrs __gettextnerrs
-#define EQUOP2 257
-#define CMPOP2 258
-#define ADDOP2 259
-#define MULOP2 260
-#define NUMBER 261
-
-#line 1 "plural.y"
-
-/* Expression parsing for plural form selection.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-/* The bison generated parser uses alloca. AIX 3 forces us to put this
- declaration at the beginning of the file. The declaration in bison's
- skeleton file comes too late. This must come before <config.h>
- because <config.h> may include arbitrary system headers. */
-#if defined _AIX && !defined __GNUC__
- #pragma alloca
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stddef.h>
-#include <stdlib.h>
-#include "plural-exp.h"
-
-/* The main function generated by the parser is called __gettextparse,
- but we want it to be called PLURAL_PARSE. */
-#ifndef _LIBC
-# define __gettextparse PLURAL_PARSE
-#endif
-
-#define YYLEX_PARAM &((struct parse_args *) arg)->cp
-#define YYPARSE_PARAM arg
-
-#line 49 "plural.y"
-typedef union {
- unsigned long int num;
- enum operator op;
- struct expression *exp;
-} YYSTYPE;
-#line 55 "plural.y"
-
-/* Prototypes for local functions. */
-static struct expression *new_exp PARAMS ((int nargs, enum operator op,
- struct expression * const *args));
-static inline struct expression *new_exp_0 PARAMS ((enum operator op));
-static inline struct expression *new_exp_1 PARAMS ((enum operator op,
- struct expression *right));
-static struct expression *new_exp_2 PARAMS ((enum operator op,
- struct expression *left,
- struct expression *right));
-static inline struct expression *new_exp_3 PARAMS ((enum operator op,
- struct expression *bexp,
- struct expression *tbranch,
- struct expression *fbranch));
-static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
-static void yyerror PARAMS ((const char *str));
-
-/* Allocation of expressions. */
-
-static struct expression *
-new_exp (nargs, op, args)
- int nargs;
- enum operator op;
- struct expression * const *args;
-{
- int i;
- struct expression *newp;
-
- /* If any of the argument could not be malloc'ed, just return NULL. */
- for (i = nargs - 1; i >= 0; i--)
- if (args[i] == NULL)
- goto fail;
-
- /* Allocate a new expression. */
- newp = (struct expression *) malloc (sizeof (*newp));
- if (newp != NULL)
- {
- newp->nargs = nargs;
- newp->operation = op;
- for (i = nargs - 1; i >= 0; i--)
- newp->val.args[i] = args[i];
- return newp;
- }
-
- fail:
- for (i = nargs - 1; i >= 0; i--)
- FREE_EXPRESSION (args[i]);
-
- return NULL;
-}
-
-static inline struct expression *
-new_exp_0 (op)
- enum operator op;
-{
- return new_exp (0, op, NULL);
-}
-
-static inline struct expression *
-new_exp_1 (op, right)
- enum operator op;
- struct expression *right;
-{
- struct expression *args[1];
-
- args[0] = right;
- return new_exp (1, op, args);
-}
-
-static struct expression *
-new_exp_2 (op, left, right)
- enum operator op;
- struct expression *left;
- struct expression *right;
-{
- struct expression *args[2];
-
- args[0] = left;
- args[1] = right;
- return new_exp (2, op, args);
-}
-
-static inline struct expression *
-new_exp_3 (op, bexp, tbranch, fbranch)
- enum operator op;
- struct expression *bexp;
- struct expression *tbranch;
- struct expression *fbranch;
-{
- struct expression *args[3];
-
- args[0] = bexp;
- args[1] = tbranch;
- args[2] = fbranch;
- return new_exp (3, op, args);
-}
-
-#include <stdio.h>
-
-#ifndef __cplusplus
-#ifndef __STDC__
-#define const
-#endif
-#endif
-
-
-
-#define YYFINAL 27
-#define YYFLAG -32768
-#define YYNTBASE 16
-
-#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
-
-static const char yytranslate[] = { 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 10, 2, 2, 2, 2, 5, 2, 14,
- 15, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 12, 2, 2,
- 2, 2, 3, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 13,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 4, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 1, 6, 7, 8, 9,
- 11
-};
-
-#if YYDEBUG != 0
-static const short yyprhs[] = { 0,
- 0, 2, 8, 12, 16, 20, 24, 28, 32, 35,
- 37, 39
-};
-
-static const short yyrhs[] = { 17,
- 0, 17, 3, 17, 12, 17, 0, 17, 4, 17,
- 0, 17, 5, 17, 0, 17, 6, 17, 0, 17,
- 7, 17, 0, 17, 8, 17, 0, 17, 9, 17,
- 0, 10, 17, 0, 13, 0, 11, 0, 14, 17,
- 15, 0
-};
-
-#endif
-
-#if YYDEBUG != 0
-static const short yyrline[] = { 0,
- 174, 182, 186, 190, 194, 198, 202, 206, 210, 214,
- 218, 223
-};
-#endif
-
-
-#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
-
-static const char * const yytname[] = { "$","error","$undefined.","'?'","'|'",
-"'&'","EQUOP2","CMPOP2","ADDOP2","MULOP2","'!'","NUMBER","':'","'n'","'('","')'",
-"start","exp", NULL
-};
-#endif
-
-static const short yyr1[] = { 0,
- 16, 17, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17
-};
-
-static const short yyr2[] = { 0,
- 1, 5, 3, 3, 3, 3, 3, 3, 2, 1,
- 1, 3
-};
-
-static const short yydefact[] = { 0,
- 0, 11, 10, 0, 1, 9, 0, 0, 0, 0,
- 0, 0, 0, 0, 12, 0, 3, 4, 5, 6,
- 7, 8, 0, 2, 0, 0, 0
-};
-
-static const short yydefgoto[] = { 25,
- 5
-};
-
-static const short yypact[] = { -9,
- -9,-32768,-32768, -9, 34,-32768, 11, -9, -9, -9,
- -9, -9, -9, -9,-32768, 24, 39, 43, 16, 26,
- -3,-32768, -9, 34, 21, 53,-32768
-};
-
-static const short yypgoto[] = {-32768,
- -1
-};
-
-
-#define YYLAST 53
-
-
-static const short yytable[] = { 6,
- 1, 2, 7, 3, 4, 14, 16, 17, 18, 19,
- 20, 21, 22, 8, 9, 10, 11, 12, 13, 14,
- 26, 24, 12, 13, 14, 15, 8, 9, 10, 11,
- 12, 13, 14, 13, 14, 23, 8, 9, 10, 11,
- 12, 13, 14, 10, 11, 12, 13, 14, 11, 12,
- 13, 14, 27
-};
-
-static const short yycheck[] = { 1,
- 10, 11, 4, 13, 14, 9, 8, 9, 10, 11,
- 12, 13, 14, 3, 4, 5, 6, 7, 8, 9,
- 0, 23, 7, 8, 9, 15, 3, 4, 5, 6,
- 7, 8, 9, 8, 9, 12, 3, 4, 5, 6,
- 7, 8, 9, 5, 6, 7, 8, 9, 6, 7,
- 8, 9, 0
-};
-#define YYPURE 1
-
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/usr/local/share/bison.simple"
-/* This file comes from bison-1.28. */
-
-/* Skeleton output parser for bison,
- Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* This is the parser code that is written into each bison parser
- when the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
-#ifndef YYSTACK_USE_ALLOCA
-#ifdef alloca
-#define YYSTACK_USE_ALLOCA
-#else /* alloca not defined */
-#ifdef __GNUC__
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#else /* not GNU C. */
-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
-#define YYSTACK_USE_ALLOCA
-#include <alloca.h>
-#else /* not sparc */
-/* We think this test detects Watcom and Microsoft C. */
-/* This used to test MSDOS, but that is a bad idea
- since that symbol is in the user namespace. */
-#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
-#if 0 /* No need for malloc.h, which pollutes the namespace;
- instead, just don't use alloca. */
-#include <malloc.h>
-#endif
-#else /* not MSDOS, or __TURBOC__ */
-#if defined(_AIX)
-/* I don't know what this was needed for, but it pollutes the namespace.
- So I turned it off. rms, 2 May 1997. */
-/* #include <malloc.h> */
- #pragma alloca
-#define YYSTACK_USE_ALLOCA
-#else /* not MSDOS, or __TURBOC__, or _AIX */
-#if 0
-#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up,
- and on HPUX 10. Eventually we can turn this on. */
-#define YYSTACK_USE_ALLOCA
-#define alloca __builtin_alloca
-#endif /* __hpux */
-#endif
-#endif /* not _AIX */
-#endif /* not MSDOS, or __TURBOC__ */
-#endif /* not sparc */
-#endif /* not GNU C */
-#endif /* alloca not defined */
-#endif /* YYSTACK_USE_ALLOCA not defined */
-
-#ifdef YYSTACK_USE_ALLOCA
-#define YYSTACK_ALLOC alloca
-#else
-#define YYSTACK_ALLOC malloc
-#endif
-
-/* Note: there must be only one dollar sign in this file.
- It is replaced by the list of actions, each action
- as one case of the switch. */
-
-#define yyerrok (yyerrstatus = 0)
-#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY -2
-#define YYEOF 0
-#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
-/* Like YYERROR except do call yyerror.
- This remains here temporarily to ease the
- transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
-#define YYFAIL goto yyerrlab
-#define YYRECOVERING() (!!yyerrstatus)
-#define YYBACKUP(token, value) \
-do \
- if (yychar == YYEMPTY && yylen == 1) \
- { yychar = (token), yylval = (value); \
- yychar1 = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
- goto yybackup; \
- } \
- else \
- { yyerror ("syntax error: cannot back up"); YYERROR; } \
-while (0)
-
-#define YYTERROR 1
-#define YYERRCODE 256
-
-#ifndef YYPURE
-#define YYLEX yylex()
-#endif
-
-#ifdef YYPURE
-#ifdef YYLSP_NEEDED
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, &yylloc, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval, &yylloc)
-#endif
-#else /* not YYLSP_NEEDED */
-#ifdef YYLEX_PARAM
-#define YYLEX yylex(&yylval, YYLEX_PARAM)
-#else
-#define YYLEX yylex(&yylval)
-#endif
-#endif /* not YYLSP_NEEDED */
-#endif
-
-/* If nonreentrant, generate the variables here */
-
-#ifndef YYPURE
-
-int yychar; /* the lookahead symbol */
-YYSTYPE yylval; /* the semantic value of the */
- /* lookahead symbol */
-
-#ifdef YYLSP_NEEDED
-YYLTYPE yylloc; /* location data for the lookahead */
- /* symbol */
-#endif
-
-int yynerrs; /* number of parse errors so far */
-#endif /* not YYPURE */
-
-#if YYDEBUG != 0
-int yydebug; /* nonzero means print parse trace */
-/* Since this is uninitialized, it does not stop multiple parsers
- from coexisting. */
-#endif
-
-/* YYINITDEPTH indicates the initial size of the parser's stacks */
-
-#ifndef YYINITDEPTH
-#define YYINITDEPTH 200
-#endif
-
-/* YYMAXDEPTH is the maximum size the stacks can grow to
- (effective only if the built-in stack extension method is used). */
-
-#if YYMAXDEPTH == 0
-#undef YYMAXDEPTH
-#endif
-
-#ifndef YYMAXDEPTH
-#define YYMAXDEPTH 10000
-#endif
-
-/* Define __yy_memcpy. Note that the size argument
- should be passed with type unsigned int, because that is what the non-GCC
- definitions require. With GCC, __builtin_memcpy takes an arg
- of type size_t, but it can handle unsigned int. */
-
-#if __GNUC__ > 1 /* GNU C and GNU C++ define this. */
-#define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT)
-#else /* not GNU C or C++ */
-#ifndef __cplusplus
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (to, from, count)
- char *to;
- char *from;
- unsigned int count;
-{
- register char *f = from;
- register char *t = to;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#else /* __cplusplus */
-
-/* This is the most reliable way to avoid incompatibilities
- in available built-in functions on various systems. */
-static void
-__yy_memcpy (char *to, char *from, unsigned int count)
-{
- register char *t = to;
- register char *f = from;
- register int i = count;
-
- while (i-- > 0)
- *t++ = *f++;
-}
-
-#endif
-#endif
-
-#line 217 "/usr/local/share/bison.simple"
-
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
- into yyparse. The argument should have type void *.
- It should actually point to an object.
- Grammar actions can access the variable by casting it
- to the proper pointer type. */
-
-#ifdef YYPARSE_PARAM
-#ifdef __cplusplus
-#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL
-#else /* not __cplusplus */
-#define YYPARSE_PARAM_ARG YYPARSE_PARAM
-#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
-#endif /* not __cplusplus */
-#else /* not YYPARSE_PARAM */
-#define YYPARSE_PARAM_ARG
-#define YYPARSE_PARAM_DECL
-#endif /* not YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-#ifdef YYPARSE_PARAM
-int yyparse (void *);
-#else
-int yyparse (void);
-#endif
-#endif
-
-int
-yyparse(YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
-{
- register int yystate;
- register int yyn;
- register short *yyssp;
- register YYSTYPE *yyvsp;
- int yyerrstatus; /* number of tokens to shift before error messages enabled */
- int yychar1 = 0; /* lookahead token as an internal (translated) token number */
-
- short yyssa[YYINITDEPTH]; /* the state stack */
- YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */
-
- short *yyss = yyssa; /* refer to the stacks thru separate pointers */
- YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */
-
-#ifdef YYLSP_NEEDED
- YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-
-#define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
-#else
-#define YYPOPSTACK (yyvsp--, yyssp--)
-#endif
-
- int yystacksize = YYINITDEPTH;
- int yyfree_stacks = 0;
-
-#ifdef YYPURE
- int yychar;
- YYSTYPE yylval;
- int yynerrs;
-#ifdef YYLSP_NEEDED
- YYLTYPE yylloc;
-#endif
-#endif
-
- YYSTYPE yyval; /* the variable used to return */
- /* semantic values from the action */
- /* routines */
-
- int yylen;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Starting parse\n");
-#endif
-
- yystate = 0;
- yyerrstatus = 0;
- yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
-
- /* Initialize stack pointers.
- Waste one element of value and location stack
- so that they stay on the same level as the state stack.
- The wasted elements are never initialized. */
-
- yyssp = yyss - 1;
- yyvsp = yyvs;
-#ifdef YYLSP_NEEDED
- yylsp = yyls;
-#endif
-
-/* Push a new state, which is found in yystate . */
-/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks. */
-yynewstate:
-
- *++yyssp = yystate;
-
- if (yyssp >= yyss + yystacksize - 1)
- {
- /* Give user a chance to reallocate the stack */
- /* Use copies of these so that the &'s don't force the real ones into memory. */
- YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
-#ifdef YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
-#endif
-
- /* Get the current used size of the three stacks, in elements. */
- int size = yyssp - yyss + 1;
-
-#ifdef yyoverflow
- /* Each stack pointer address is followed by the size of
- the data in use in that stack, in bytes. */
-#ifdef YYLSP_NEEDED
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yyls1, size * sizeof (*yylsp),
- &yystacksize);
-#else
- yyoverflow("parser stack overflow",
- &yyss1, size * sizeof (*yyssp),
- &yyvs1, size * sizeof (*yyvsp),
- &yystacksize);
-#endif
-
- yyss = yyss1; yyvs = yyvs1;
-#ifdef YYLSP_NEEDED
- yyls = yyls1;
-#endif
-#else /* no yyoverflow */
- /* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- {
- yyerror("parser stack overflow");
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 2;
- }
- yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
- yystacksize = YYMAXDEPTH;
-#ifndef YYSTACK_USE_ALLOCA
- yyfree_stacks = 1;
-#endif
- yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
- __yy_memcpy ((char *)yyss, (char *)yyss1,
- size * (unsigned int) sizeof (*yyssp));
- yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
- __yy_memcpy ((char *)yyvs, (char *)yyvs1,
- size * (unsigned int) sizeof (*yyvsp));
-#ifdef YYLSP_NEEDED
- yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
- __yy_memcpy ((char *)yyls, (char *)yyls1,
- size * (unsigned int) sizeof (*yylsp));
-#endif
-#endif /* no yyoverflow */
-
- yyssp = yyss + size - 1;
- yyvsp = yyvs + size - 1;
-#ifdef YYLSP_NEEDED
- yylsp = yyls + size - 1;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Stack size increased to %d\n", yystacksize);
-#endif
-
- if (yyssp >= yyss + yystacksize - 1)
- YYABORT;
- }
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Entering state %d\n", yystate);
-#endif
-
- goto yybackup;
- yybackup:
-
-/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
-/* yyresume: */
-
- /* First try to decide what to do without reference to lookahead token. */
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yydefault;
-
- /* Not known => get a lookahead token if don't already have one. */
-
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
-
- if (yychar == YYEMPTY)
- {
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Reading a token: ");
-#endif
- yychar = YYLEX;
- }
-
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
- {
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Now at end of input.\n");
-#endif
- }
- else
- {
- yychar1 = YYTRANSLATE(yychar);
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise meaning
- of a token, for further debugging info. */
-#ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
-#endif
- fprintf (stderr, ")\n");
- }
-#endif
- }
-
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
- goto yydefault;
-
- yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrlab;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrlab;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Shift the lookahead token. */
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
-#endif
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- /* count tokens shifted since error; after three, turn off error status. */
- if (yyerrstatus) yyerrstatus--;
-
- yystate = yyn;
- goto yynewstate;
-
-/* Do the default action for the current state. */
-yydefault:
-
- yyn = yydefact[yystate];
- if (yyn == 0)
- goto yyerrlab;
-
-/* Do a reduction. yyn is the number of a rule to reduce with. */
-yyreduce:
- yylen = yyr2[yyn];
- if (yylen > 0)
- yyval = yyvsp[1-yylen]; /* implement default value of the action */
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- int i;
-
- fprintf (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
-
- /* Print the symbols being reduced, and their result. */
- for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
- fprintf (stderr, "%s ", yytname[yyrhs[i]]);
- fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
-#endif
-
-
- switch (yyn) {
-
-case 1:
-#line 175 "plural.y"
-{
- if (yyvsp[0].exp == NULL)
- YYABORT;
- ((struct parse_args *) arg)->res = yyvsp[0].exp;
- ;
- break;}
-case 2:
-#line 183 "plural.y"
-{
- yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 3:
-#line 187 "plural.y"
-{
- yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 4:
-#line 191 "plural.y"
-{
- yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 5:
-#line 195 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 6:
-#line 199 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 7:
-#line 203 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 8:
-#line 207 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- ;
- break;}
-case 9:
-#line 211 "plural.y"
-{
- yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
- ;
- break;}
-case 10:
-#line 215 "plural.y"
-{
- yyval.exp = new_exp_0 (var);
- ;
- break;}
-case 11:
-#line 219 "plural.y"
-{
- if ((yyval.exp = new_exp_0 (num)) != NULL)
- yyval.exp->val.num = yyvsp[0].num;
- ;
- break;}
-case 12:
-#line 224 "plural.y"
-{
- yyval.exp = yyvsp[-1].exp;
- ;
- break;}
-}
- /* the action file gets copied in in place of this dollarsign */
-#line 543 "/usr/local/share/bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-#ifdef YYLSP_NEEDED
- yylsp -= yylen;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
- *++yyvsp = yyval;
-
-#ifdef YYLSP_NEEDED
- yylsp++;
- if (yylen == 0)
- {
- yylsp->first_line = yylloc.first_line;
- yylsp->first_column = yylloc.first_column;
- yylsp->last_line = (yylsp-1)->last_line;
- yylsp->last_column = (yylsp-1)->last_column;
- yylsp->text = 0;
- }
- else
- {
- yylsp->last_line = (yylsp+yylen-1)->last_line;
- yylsp->last_column = (yylsp+yylen-1)->last_column;
- }
-#endif
-
- /* Now "shift" the result of the reduction.
- Determine what state that goes to,
- based on the state we popped back to
- and the rule number reduced by. */
-
- yyn = yyr1[yyn];
-
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
- yystate = yytable[yystate];
- else
- yystate = yydefgoto[yyn - YYNTBASE];
-
- goto yynewstate;
-
-yyerrlab: /* here on detecting error */
-
- if (! yyerrstatus)
- /* If not already recovering from an error, report this error. */
- {
- ++yynerrs;
-
-#ifdef YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (yyn > YYFLAG && yyn < YYLAST)
- {
- int size = 0;
- char *msg;
- int x, count;
-
- count = 0;
- /* Start X at -yyn if nec to avoid negative indexes in yycheck. */
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- size += strlen(yytname[x]) + 15, count++;
- msg = (char *) malloc(size + 15);
- if (msg != 0)
- {
- strcpy(msg, "parse error");
-
- if (count < 5)
- {
- count = 0;
- for (x = (yyn < 0 ? -yyn : 0);
- x < (sizeof(yytname) / sizeof(char *)); x++)
- if (yycheck[x + yyn] == x)
- {
- strcat(msg, count == 0 ? ", expecting `" : " or `");
- strcat(msg, yytname[x]);
- strcat(msg, "'");
- count++;
- }
- }
- yyerror(msg);
- free(msg);
- }
- else
- yyerror ("parse error; also virtual memory exceeded");
- }
- else
-#endif /* YYERROR_VERBOSE */
- yyerror("parse error");
- }
-
- goto yyerrlab1;
-yyerrlab1: /* here on error raised explicitly by an action */
-
- if (yyerrstatus == 3)
- {
- /* if just tried and failed to reuse lookahead token after an error, discard it. */
-
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
-#endif
-
- yychar = YYEMPTY;
- }
-
- /* Else will try to reuse lookahead token
- after shifting the error token. */
-
- yyerrstatus = 3; /* Each real token shifted decrements this */
-
- goto yyerrhandle;
-
-yyerrdefault: /* current state does not do anything special for the error token. */
-
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
- yyn = yydefact[yystate]; /* If its default is to accept any token, ok. Otherwise pop it.*/
- if (yyn) goto yydefault;
-#endif
-
-yyerrpop: /* pop the current state because it cannot handle the error token */
-
- if (yyssp == yyss) YYABORT;
- yyvsp--;
- yystate = *--yyssp;
-#ifdef YYLSP_NEEDED
- yylsp--;
-#endif
-
-#if YYDEBUG != 0
- if (yydebug)
- {
- short *ssp1 = yyss - 1;
- fprintf (stderr, "Error: state stack now");
- while (ssp1 != yyssp)
- fprintf (stderr, " %d", *++ssp1);
- fprintf (stderr, "\n");
- }
-#endif
-
-yyerrhandle:
-
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
-
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
-
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
- }
- else if (yyn == 0)
- goto yyerrpop;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
-#if YYDEBUG != 0
- if (yydebug)
- fprintf(stderr, "Shifting error token, ");
-#endif
-
- *++yyvsp = yylval;
-#ifdef YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
-
- yystate = yyn;
- goto yynewstate;
-
- yyacceptlab:
- /* YYACCEPT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 0;
-
- yyabortlab:
- /* YYABORT comes here. */
- if (yyfree_stacks)
- {
- free (yyss);
- free (yyvs);
-#ifdef YYLSP_NEEDED
- free (yyls);
-#endif
- }
- return 1;
-}
-#line 229 "plural.y"
-
-
-void
-internal_function
-FREE_EXPRESSION (exp)
- struct expression *exp;
-{
- if (exp == NULL)
- return;
-
- /* Handle the recursive case. */
- switch (exp->nargs)
- {
- case 3:
- FREE_EXPRESSION (exp->val.args[2]);
- /* FALLTHROUGH */
- case 2:
- FREE_EXPRESSION (exp->val.args[1]);
- /* FALLTHROUGH */
- case 1:
- FREE_EXPRESSION (exp->val.args[0]);
- /* FALLTHROUGH */
- default:
- break;
- }
-
- free (exp);
-}
-
-
-static int
-yylex (lval, pexp)
- YYSTYPE *lval;
- const char **pexp;
-{
- const char *exp = *pexp;
- int result;
-
- while (1)
- {
- if (exp[0] == '\0')
- {
- *pexp = exp;
- return YYEOF;
- }
-
- if (exp[0] != ' ' && exp[0] != '\t')
- break;
-
- ++exp;
- }
-
- result = *exp++;
- switch (result)
- {
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- {
- unsigned long int n = result - '0';
- while (exp[0] >= '0' && exp[0] <= '9')
- {
- n *= 10;
- n += exp[0] - '0';
- ++exp;
- }
- lval->num = n;
- result = NUMBER;
- }
- break;
-
- case '=':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = equal;
- result = EQUOP2;
- }
- else
- result = YYERRCODE;
- break;
-
- case '!':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = not_equal;
- result = EQUOP2;
- }
- break;
-
- case '&':
- case '|':
- if (exp[0] == result)
- ++exp;
- else
- result = YYERRCODE;
- break;
-
- case '<':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = less_or_equal;
- }
- else
- lval->op = less_than;
- result = CMPOP2;
- break;
-
- case '>':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = greater_or_equal;
- }
- else
- lval->op = greater_than;
- result = CMPOP2;
- break;
-
- case '*':
- lval->op = mult;
- result = MULOP2;
- break;
-
- case '/':
- lval->op = divide;
- result = MULOP2;
- break;
-
- case '%':
- lval->op = module;
- result = MULOP2;
- break;
-
- case '+':
- lval->op = plus;
- result = ADDOP2;
- break;
-
- case '-':
- lval->op = minus;
- result = ADDOP2;
- break;
-
- case 'n':
- case '?':
- case ':':
- case '(':
- case ')':
- /* Nothing, just return the character. */
- break;
-
- case ';':
- case '\n':
- case '\0':
- /* Be safe and let the user call this function again. */
- --exp;
- result = YYEOF;
- break;
-
- default:
- result = YYERRCODE;
-#if YYDEBUG != 0
- --exp;
-#endif
- break;
- }
-
- *pexp = exp;
-
- return result;
-}
-
-
-static void
-yyerror (str)
- const char *str;
-{
- /* Do nothing. We don't print error messages here. */
-}
diff --git a/intl/plural.y b/intl/plural.y
deleted file mode 100644
index 75a1c01..0000000
--- a/intl/plural.y
+++ /dev/null
@@ -1,409 +0,0 @@
-%{
-/* Expression parsing for plural form selection.
- Copyright (C) 2000, 2001 Free Software Foundation, Inc.
- Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-/* The bison generated parser uses alloca. AIX 3 forces us to put this
- declaration at the beginning of the file. The declaration in bison's
- skeleton file comes too late. This must come before <config.h>
- because <config.h> may include arbitrary system headers. */
-#if defined _AIX && !defined __GNUC__
- #pragma alloca
-#endif
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stddef.h>
-#include <stdlib.h>
-#include "plural-exp.h"
-
-/* The main function generated by the parser is called __gettextparse,
- but we want it to be called PLURAL_PARSE. */
-#ifndef _LIBC
-# define __gettextparse PLURAL_PARSE
-#endif
-
-#define YYLEX_PARAM &((struct parse_args *) arg)->cp
-#define YYPARSE_PARAM arg
-%}
-%pure_parser
-%expect 7
-
-%union {
- unsigned long int num;
- enum operator op;
- struct expression *exp;
-}
-
-%{
-/* Prototypes for local functions. */
-static struct expression *new_exp PARAMS ((int nargs, enum operator op,
- struct expression * const *args));
-static inline struct expression *new_exp_0 PARAMS ((enum operator op));
-static inline struct expression *new_exp_1 PARAMS ((enum operator op,
- struct expression *right));
-static struct expression *new_exp_2 PARAMS ((enum operator op,
- struct expression *left,
- struct expression *right));
-static inline struct expression *new_exp_3 PARAMS ((enum operator op,
- struct expression *bexp,
- struct expression *tbranch,
- struct expression *fbranch));
-static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
-static void yyerror PARAMS ((const char *str));
-
-/* Allocation of expressions. */
-
-static struct expression *
-new_exp (nargs, op, args)
- int nargs;
- enum operator op;
- struct expression * const *args;
-{
- int i;
- struct expression *newp;
-
- /* If any of the argument could not be malloc'ed, just return NULL. */
- for (i = nargs - 1; i >= 0; i--)
- if (args[i] == NULL)
- goto fail;
-
- /* Allocate a new expression. */
- newp = (struct expression *) malloc (sizeof (*newp));
- if (newp != NULL)
- {
- newp->nargs = nargs;
- newp->operation = op;
- for (i = nargs - 1; i >= 0; i--)
- newp->val.args[i] = args[i];
- return newp;
- }
-
- fail:
- for (i = nargs - 1; i >= 0; i--)
- FREE_EXPRESSION (args[i]);
-
- return NULL;
-}
-
-static inline struct expression *
-new_exp_0 (op)
- enum operator op;
-{
- return new_exp (0, op, NULL);
-}
-
-static inline struct expression *
-new_exp_1 (op, right)
- enum operator op;
- struct expression *right;
-{
- struct expression *args[1];
-
- args[0] = right;
- return new_exp (1, op, args);
-}
-
-static struct expression *
-new_exp_2 (op, left, right)
- enum operator op;
- struct expression *left;
- struct expression *right;
-{
- struct expression *args[2];
-
- args[0] = left;
- args[1] = right;
- return new_exp (2, op, args);
-}
-
-static inline struct expression *
-new_exp_3 (op, bexp, tbranch, fbranch)
- enum operator op;
- struct expression *bexp;
- struct expression *tbranch;
- struct expression *fbranch;
-{
- struct expression *args[3];
-
- args[0] = bexp;
- args[1] = tbranch;
- args[2] = fbranch;
- return new_exp (3, op, args);
-}
-
-%}
-
-/* This declares that all operators have the same associativity and the
- precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
- There is no unary minus and no bitwise operators.
- Operators with the same syntactic behaviour have been merged into a single
- token, to save space in the array generated by bison. */
-%right '?' /* ? */
-%left '|' /* || */
-%left '&' /* && */
-%left EQUOP2 /* == != */
-%left CMPOP2 /* < > <= >= */
-%left ADDOP2 /* + - */
-%left MULOP2 /* * / % */
-%right '!' /* ! */
-
-%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
-%token <num> NUMBER
-%type <exp> exp
-
-%%
-
-start: exp
- {
- if ($1 == NULL)
- YYABORT;
- ((struct parse_args *) arg)->res = $1;
- }
- ;
-
-exp: exp '?' exp ':' exp
- {
- $$ = new_exp_3 (qmop, $1, $3, $5);
- }
- | exp '|' exp
- {
- $$ = new_exp_2 (lor, $1, $3);
- }
- | exp '&' exp
- {
- $$ = new_exp_2 (land, $1, $3);
- }
- | exp EQUOP2 exp
- {
- $$ = new_exp_2 ($2, $1, $3);
- }
- | exp CMPOP2 exp
- {
- $$ = new_exp_2 ($2, $1, $3);
- }
- | exp ADDOP2 exp
- {
- $$ = new_exp_2 ($2, $1, $3);
- }
- | exp MULOP2 exp
- {
- $$ = new_exp_2 ($2, $1, $3);
- }
- | '!' exp
- {
- $$ = new_exp_1 (lnot, $2);
- }
- | 'n'
- {
- $$ = new_exp_0 (var);
- }
- | NUMBER
- {
- if (($$ = new_exp_0 (num)) != NULL)
- $$->val.num = $1;
- }
- | '(' exp ')'
- {
- $$ = $2;
- }
- ;
-
-%%
-
-void
-internal_function
-FREE_EXPRESSION (exp)
- struct expression *exp;
-{
- if (exp == NULL)
- return;
-
- /* Handle the recursive case. */
- switch (exp->nargs)
- {
- case 3:
- FREE_EXPRESSION (exp->val.args[2]);
- /* FALLTHROUGH */
- case 2:
- FREE_EXPRESSION (exp->val.args[1]);
- /* FALLTHROUGH */
- case 1:
- FREE_EXPRESSION (exp->val.args[0]);
- /* FALLTHROUGH */
- default:
- break;
- }
-
- free (exp);
-}
-
-
-static int
-yylex (lval, pexp)
- YYSTYPE *lval;
- const char **pexp;
-{
- const char *exp = *pexp;
- int result;
-
- while (1)
- {
- if (exp[0] == '\0')
- {
- *pexp = exp;
- return YYEOF;
- }
-
- if (exp[0] != ' ' && exp[0] != '\t')
- break;
-
- ++exp;
- }
-
- result = *exp++;
- switch (result)
- {
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- {
- unsigned long int n = result - '0';
- while (exp[0] >= '0' && exp[0] <= '9')
- {
- n *= 10;
- n += exp[0] - '0';
- ++exp;
- }
- lval->num = n;
- result = NUMBER;
- }
- break;
-
- case '=':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = equal;
- result = EQUOP2;
- }
- else
- result = YYERRCODE;
- break;
-
- case '!':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = not_equal;
- result = EQUOP2;
- }
- break;
-
- case '&':
- case '|':
- if (exp[0] == result)
- ++exp;
- else
- result = YYERRCODE;
- break;
-
- case '<':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = less_or_equal;
- }
- else
- lval->op = less_than;
- result = CMPOP2;
- break;
-
- case '>':
- if (exp[0] == '=')
- {
- ++exp;
- lval->op = greater_or_equal;
- }
- else
- lval->op = greater_than;
- result = CMPOP2;
- break;
-
- case '*':
- lval->op = mult;
- result = MULOP2;
- break;
-
- case '/':
- lval->op = divide;
- result = MULOP2;
- break;
-
- case '%':
- lval->op = module;
- result = MULOP2;
- break;
-
- case '+':
- lval->op = plus;
- result = ADDOP2;
- break;
-
- case '-':
- lval->op = minus;
- result = ADDOP2;
- break;
-
- case 'n':
- case '?':
- case ':':
- case '(':
- case ')':
- /* Nothing, just return the character. */
- break;
-
- case ';':
- case '\n':
- case '\0':
- /* Be safe and let the user call this function again. */
- --exp;
- result = YYEOF;
- break;
-
- default:
- result = YYERRCODE;
-#if YYDEBUG != 0
- --exp;
-#endif
- break;
- }
-
- *pexp = exp;
-
- return result;
-}
-
-
-static void
-yyerror (str)
- const char *str;
-{
- /* Do nothing. We don't print error messages here. */
-}
diff --git a/intl/textdomain.c b/intl/textdomain.c
deleted file mode 100644
index a065bf4..0000000
--- a/intl/textdomain.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* Implementation of the textdomain(3) function.
- Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library 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. */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#ifdef _LIBC
-# include <libintl.h>
-#else
-# include "libgnuintl.h"
-#endif
-#include "gettextP.h"
-
-#ifdef _LIBC
-/* We have to handle multi-threaded applications. */
-# include <bits/libc-lock.h>
-#else
-/* Provide dummy implementation if this is outside glibc. */
-# define __libc_rwlock_define(CLASS, NAME)
-# define __libc_rwlock_wrlock(NAME)
-# define __libc_rwlock_unlock(NAME)
-#endif
-
-/* The internal variables in the standalone libintl.a must have different
- names than the internal variables in GNU libc, otherwise programs
- using libintl.a cannot be linked statically. */
-#if !defined _LIBC
-# define _nl_default_default_domain _nl_default_default_domain__
-# define _nl_current_default_domain _nl_current_default_domain__
-#endif
-
-/* @@ end of prolog @@ */
-
-/* Name of the default text domain. */
-extern const char _nl_default_default_domain[];
-
-/* Default text domain in which entries for gettext(3) are to be found. */
-extern const char *_nl_current_default_domain;
-
-
-/* Names for the libintl functions are a problem. They must not clash
- with existing names and they should follow ANSI C. But this source
- code is also used in GNU C Library where the names have a __
- prefix. So we have to make a difference here. */
-#ifdef _LIBC
-# define TEXTDOMAIN __textdomain
-# ifndef strdup
-# define strdup(str) __strdup (str)
-# endif
-#else
-# define TEXTDOMAIN textdomain__
-#endif
-
-/* Lock variable to protect the global data in the gettext implementation. */
-__libc_rwlock_define (extern, _nl_state_lock)
-
-/* Set the current default message catalog to DOMAINNAME.
- If DOMAINNAME is null, return the current default.
- If DOMAINNAME is "", reset to the default of "messages". */
-char *
-TEXTDOMAIN (domainname)
- const char *domainname;
-{
- char *new_domain;
- char *old_domain;
-
- /* A NULL pointer requests the current setting. */
- if (domainname == NULL)
- return (char *) _nl_current_default_domain;
-
- __libc_rwlock_wrlock (_nl_state_lock);
-
- old_domain = (char *) _nl_current_default_domain;
-
- /* If domain name is the null string set to default domain "messages". */
- if (domainname[0] == '\0'
- || strcmp (domainname, _nl_default_default_domain) == 0)
- {
- _nl_current_default_domain = _nl_default_default_domain;
- new_domain = (char *) _nl_current_default_domain;
- }
- else if (strcmp (domainname, old_domain) == 0)
- /* This can happen and people will use it to signal that some
- environment variable changed. */
- new_domain = old_domain;
- else
- {
- /* If the following malloc fails `_nl_current_default_domain'
- will be NULL. This value will be returned and so signals we
- are out of core. */
-#if defined _LIBC || defined HAVE_STRDUP
- new_domain = strdup (domainname);
-#else
- size_t len = strlen (domainname) + 1;
- new_domain = (char *) malloc (len);
- if (new_domain != NULL)
- memcpy (new_domain, domainname, len);
-#endif
-
- if (new_domain != NULL)
- _nl_current_default_domain = new_domain;
- }
-
- /* We use this possibility to signal a change of the loaded catalogs
- since this is most likely the case and there is no other easy we
- to do it. Do it only when the call was successful. */
- if (new_domain != NULL)
- {
- ++_nl_msg_cat_cntr;
-
- if (old_domain != new_domain && old_domain != _nl_default_default_domain)
- free (old_domain);
- }
-
- __libc_rwlock_unlock (_nl_state_lock);
-
- return new_domain;
-}
-
-#ifdef _LIBC
-/* Alias for function name in GNU C Library. */
-weak_alias (__textdomain, textdomain);
-#endif
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 8bc60d4..73c1b33 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,16 +1,8 @@
## Process this file with automake to produce Makefile.in
-noinst_LIBRARIES = libsed.a
-noinst_HEADERS = getopt.h utils.h obstack.h regex_.h regex_internal.h \
- strverscmp.h stdbool_.h
-libsed_a_SOURCES = getopt1.c getopt.c utils.c
+include gnulib.mk
-EXTRA_DIST = memmove.c strerror.c regcomp.c regexec.c regex_internal.c
+SUFFIXES += .a .o .c .y .l .h .sh .elc .el
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/intl -I$(top_srcdir) \
- -I$(top_builddir)/lib -I$(top_builddir)/intl
+AM_CPPFLAGS += -I$(top_srcdir)/lib -I$(top_srcdir) -I$(top_builddir)/lib
-libsed_a_LIBADD = @LIBOBJS@ @ALLOCA@
-libsed_a_DEPENDENCIES = $(libsed_a_LIBADD)
-
-DISTCLEANFILES = regex.h stdbool.h
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 3cef6a0..588327e 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,18 +14,24 @@
@SET_MAKE@
+# Copyright (C) 2002-2009 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libsed --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-libtool --macro-prefix=gl acl alloca btowc extensions getline getopt gettext localcharset mbrlen mbrtowc mbsinit mkstemp obstack pathmax regex stat-macros stdbool strerror strverscmp unlocked-io verify wcrtomb wctob
+
-SOURCES = $(libsed_a_SOURCES)
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -39,103 +45,372 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-subdir = lib
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/regex_.h $(srcdir)/stdbool_.h \
- alloca.c getline.c memchr.c memcmp.c memmove.c mkstemp.c \
- obstack.c obstack.h regex.c strerror.c strverscmp.c
+ $(srcdir)/Makefile.in $(srcdir)/gnulib.mk alloca.c
+subdir = lib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/codeset.m4 \
- $(top_srcdir)/config/getline.m4 \
- $(top_srcdir)/config/gettext-ver.m4 \
- $(top_srcdir)/config/gettext.m4 \
- $(top_srcdir)/config/glibc21.m4 $(top_srcdir)/config/iconv.m4 \
- $(top_srcdir)/config/lcmessage.m4 \
- $(top_srcdir)/config/lib-ld.m4 \
- $(top_srcdir)/config/lib-link.m4 \
- $(top_srcdir)/config/lib-prefix.m4 \
- $(top_srcdir)/config/progtest.m4 \
- $(top_srcdir)/config/stdbool.m4 \
- $(top_srcdir)/config/strverscmp.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+ $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
+ $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
+ $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getline.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+ $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/mbrlen.m4 \
+ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \
+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mkstemp.m4 \
+ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
+ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/realloc.m4 \
+ $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/ssize_t.m4 \
+ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
+ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \
+ $(top_srcdir)/m4/strverscmp.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
+ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/tempname.m4 \
+ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/wchar.m4 \
+ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+ $(top_srcdir)/m4/wctype.m4 $(top_srcdir)/m4/wint_t.m4 \
+ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = stdbool.h regex.h
+CONFIG_CLEAN_FILES =
LIBRARIES = $(noinst_LIBRARIES)
AR = ar
ARFLAGS = cru
libsed_a_AR = $(AR) $(ARFLAGS)
-am_libsed_a_OBJECTS = getopt1.$(OBJEXT) getopt.$(OBJEXT) \
- utils.$(OBJEXT)
+am__DEPENDENCIES_1 =
+am_libsed_a_OBJECTS = set-mode-acl.$(OBJEXT) copy-acl.$(OBJEXT) \
+ file-has-acl.$(OBJEXT) localcharset.$(OBJEXT) \
+ xalloc-die.$(OBJEXT)
libsed_a_OBJECTS = $(am_libsed_a_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libsed_a_SOURCES)
-DIST_SOURCES = $(libsed_a_SOURCES)
+SOURCES = $(libsed_a_SOURCES) $(EXTRA_libsed_a_SOURCES)
+DIST_SOURCES = $(libsed_a_SOURCES) $(EXTRA_libsed_a_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
HEADERS = $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
+ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BUILD_HTML_FALSE = @BUILD_HTML_FALSE@
-BUILD_HTML_TRUE = @BUILD_HTML_TRUE@
-BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
-CATOBJEXT = @CATOBJEXT@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
-GENCAT = @GENCAT@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WRITE = @GNULIB_WRITE@
+GREP = @GREP@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRNDUP = @HAVE_STRNDUP@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
HAVE__BOOL = @HAVE__BOOL@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
+LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
+LIB_ACL = @LIB_ACL@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
-MAKEINFO_HTML_FALSE = @MAKEINFO_HTML_FALSE@
-MAKEINFO_HTML_TRUE = @MAKEINFO_HTML_TRUE@
-MKINSTALLDIRS = @MKINSTALLDIRS@
+MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -145,25 +420,92 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
SED_FEATURE_VERSION = @SED_FEATURE_VERSION@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
STRIP = @STRIP@
-TEST_REGEX_FALSE = @TEST_REGEX_FALSE@
-TEST_REGEX_TRUE = @TEST_REGEX_TRUE@
-TEXI2HTML = @TEXI2HTML@
-TEXI2HTML_HTML_FALSE = @TEXI2HTML_HTML_FALSE@
-TEXI2HTML_HTML_TRUE = @TEXI2HTML_HTML_TRUE@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+SYS_STAT_H = @SYS_STAT_H@
+SYS_TIME_H = @SYS_TIME_H@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+USE_ACL = @USE_ACL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+VOID_UNSETENV = @VOID_UNSETENV@
+WCHAR_H = @WCHAR_H@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XFAIL_TESTS = @XFAIL_TESTS@
XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -175,45 +517,109 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.5 gnits
+SUBDIRS =
+noinst_HEADERS =
noinst_LIBRARIES = libsed.a
-noinst_HEADERS = getopt.h utils.h obstack.h regex_.h regex_internal.h \
- strverscmp.h stdbool_.h
+noinst_LTLIBRARIES =
-libsed_a_SOURCES = getopt1.c getopt.c utils.c
-EXTRA_DIST = memmove.c strerror.c regcomp.c regexec.c regex_internal.c
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/intl -I$(top_srcdir) \
- -I$(top_builddir)/lib -I$(top_builddir)/intl
-
-libsed_a_LIBADD = @LIBOBJS@ @ALLOCA@
-libsed_a_DEPENDENCIES = $(libsed_a_LIBADD)
-DISTCLEANFILES = regex.h stdbool.h
-all: all-am
+# This is for those projects which use "gettextize --intl" to put a source-code
+# copy of libintl into their package. In such projects, every Makefile.am needs
+# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
+# For the Makefile.ams in other directories it is the maintainer's
+# responsibility; for the one from gnulib we do it here.
+# This option has no effect when the user disables NLS (because then the intl
+# directory contains no libintl.h file) or when the project does not use
+# "gettextize --intl".
+#AM_CPPFLAGS += -I$(top_builddir)/intl
+EXTRA_DIST = acl-internal.h acl.h acl_entries.c alloca.c alloca.in.h \
+ btowc.c errno.in.h error.c error.h exitfail.c exitfail.h \
+ getdelim.c getline.c getopt.c getopt.in.h getopt1.c \
+ getopt_int.h $(top_srcdir)/build-aux/config.rpath \
+ gettimeofday.c $(top_srcdir)/build-aux/config.rpath intprops.h \
+ $(top_srcdir)/build-aux/link-warning.h config.charset \
+ ref-add.sin ref-del.sin lstat.c malloc.c malloc.c mbrlen.c \
+ mbrtowc.c mbsinit.c mkstemp.c obstack.c obstack.h pathmax.h \
+ quote.c quote.h quotearg.c quotearg.h realloc.c regcomp.c \
+ regex.c regex.h regex_internal.c regex_internal.h regexec.c \
+ stat-macros.h stdbool.in.h stdint.in.h stdio-write.c \
+ stdio.in.h stdlib.in.h streq.h strerror.c string.in.h \
+ strverscmp.c sys_stat.in.h sys_time.in.h tempname.c tempname.h \
+ unistd.in.h unlocked-io.h wchar.in.h wcrtomb.c wctob.c \
+ wctype.in.h xalloc.h xmalloc.c
+BUILT_SOURCES = $(ALLOCA_H) configmake.h $(ERRNO_H) $(GETOPT_H) \
+ $(STDBOOL_H) $(STDINT_H) stdio.h stdlib.h string.h \
+ $(SYS_STAT_H) $(SYS_TIME_H) unistd.h $(WCHAR_H) $(WCTYPE_H)
+SUFFIXES = .sed .sin .a .o .c .y .l .h .sh .elc .el
+MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t errno.h \
+ errno.h-t getopt.h getopt.h-t stdbool.h stdbool.h-t stdint.h \
+ stdint.h-t stdio.h stdio.h-t stdlib.h stdlib.h-t string.h \
+ string.h-t sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t \
+ unistd.h unistd.h-t wchar.h wchar.h-t wctype.h wctype.h-t
+MOSTLYCLEANDIRS = sys
+CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \
+ ref-del.sed
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) \
+ -I$(top_builddir)/lib
+AM_CFLAGS =
+libsed_a_SOURCES = set-mode-acl.c copy-acl.c file-has-acl.c gettext.h \
+ localcharset.h localcharset.c verify.h xalloc-die.c
+libsed_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@
+libsed_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@
+EXTRA_libsed_a_SOURCES = acl_entries.c alloca.c btowc.c error.c \
+ exitfail.c getdelim.c getline.c getopt.c getopt1.c \
+ gettimeofday.c lstat.c malloc.c malloc.c mbrlen.c mbrtowc.c \
+ mbsinit.c mkstemp.c obstack.c quote.c quotearg.c realloc.c \
+ regcomp.c regex.c regex_internal.c regexec.c stdio-write.c \
+ strerror.c strverscmp.c tempname.c wcrtomb.c wctob.c xmalloc.c
+LINK_WARNING_H = $(top_srcdir)/build-aux/link-warning.h
+charset_alias = $(DESTDIR)$(libdir)/charset.alias
+charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-.SUFFIXES: .c .o .obj
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+.SUFFIXES: .sed .sin .a .o .c .y .l .h .sh .elc .el .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/gnulib.mk $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -242,8 +648,6 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-stdbool.h: $(top_builddir)/config.status $(srcdir)/stdbool_.h
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
@@ -252,6 +656,15 @@ libsed.a: $(libsed_a_OBJECTS) $(libsed_a_DEPENDENCIES)
$(libsed_a_AR) libsed.a $(libsed_a_OBJECTS) $(libsed_a_LIBADD)
$(RANLIB) libsed.a
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -259,70 +672,175 @@ distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getline.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memchr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memcmp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/memmove.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/mkstemp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/obstack.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/regex.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strerror.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strverscmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acl_entries.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/copy-acl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file-has-acl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrlen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obstack.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/set-mode-acl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio-write.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strverscmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctob.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-uninstall-info-am:
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -336,22 +854,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -362,27 +879,49 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
+ list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ distdir=`$(am__cd) $(distdir) && pwd`; \
+ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
+ (cd $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$top_distdir" \
+ distdir="$$distdir/$$subdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
check-am: all-am
-check: check-am
-all-am: Makefile $(LIBRARIES) $(HEADERS)
-installdirs:
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local
+installdirs: installdirs-recursive
+installdirs-am:
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-installcheck: installcheck-am
+installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
@@ -391,66 +930,635 @@ distclean-generic:
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
-clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
+clean-am: clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
+ mostlyclean-am
-distclean: distclean-am
+distclean: distclean-recursive
-rm -rf $(DEPDIR) ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
-dvi: dvi-am
+dvi: dvi-recursive
dvi-am:
-html: html-am
+html: html-recursive
-info: info-am
+info: info-recursive
info-am:
install-data-am:
-install-exec-am:
+install-dvi: install-dvi-recursive
+
+install-exec-am: install-exec-local
+
+install-html: install-html-recursive
-install-info: install-info-am
+install-info: install-info-recursive
install-man:
+install-pdf: install-pdf-recursive
+
+install-ps: install-ps-recursive
+
installcheck-am:
-maintainer-clean: maintainer-clean-am
+maintainer-clean: maintainer-clean-recursive
-rm -rf $(DEPDIR) ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
-mostlyclean: mostlyclean-am
+mostlyclean: mostlyclean-recursive
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-local
-pdf: pdf-am
+pdf: pdf-recursive
pdf-am:
-ps: ps-am
+ps: ps-recursive
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am: uninstall-local
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-noinstLIBRARIES ctags distclean distclean-compile \
- distclean-generic distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-man install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
+ install-strip
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am all-local check check-am clean clean-generic \
+ clean-noinstLIBRARIES clean-noinstLTLIBRARIES ctags \
+ ctags-recursive distclean distclean-compile distclean-generic \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-exec-local \
+ install-html install-html-am install-info install-info-am \
+ install-man install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip installcheck installcheck-am \
+ installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
- mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-info-am
+ mostlyclean-generic mostlyclean-local pdf pdf-am ps ps-am tags \
+ tags-recursive uninstall uninstall-am uninstall-local
+
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+alloca.h: alloca.in.h
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ cat $(srcdir)/alloca.in.h; \
+ } > $@-t
+ mv -f $@-t $@
+
+# Retrieve values of the variables through 'configure' followed by
+# 'make', not directly through 'configure', so that a user who
+# sets some of these variables consistently on the 'make' command
+# line gets correct results.
+#
+# One advantage of this approach, compared to the classical
+# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
+# is that it protects against the use of undefined variables.
+# If, say, $(libdir) is not set in the Makefile, LIBDIR is not
+# defined by this module, and code using LIBDIR gives a
+# compilation error.
+#
+# Another advantage is that 'make' output is shorter.
+#
+# Listed in the same order as the GNU makefile conventions.
+# The Automake-defined pkg* macros are appended, in the order
+# listed in the Automake 1.10a+ documentation.
+configmake.h: Makefile
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ echo '#define PREFIX "$(prefix)"'; \
+ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
+ echo '#define BINDIR "$(bindir)"'; \
+ echo '#define SBINDIR "$(sbindir)"'; \
+ echo '#define LIBEXECDIR "$(libexecdir)"'; \
+ echo '#define DATAROOTDIR "$(datarootdir)"'; \
+ echo '#define DATADIR "$(datadir)"'; \
+ echo '#define SYSCONFDIR "$(sysconfdir)"'; \
+ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
+ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+ echo '#define INCLUDEDIR "$(includedir)"'; \
+ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
+ echo '#define DOCDIR "$(docdir)"'; \
+ echo '#define INFODIR "$(infodir)"'; \
+ echo '#define HTMLDIR "$(htmldir)"'; \
+ echo '#define DVIDIR "$(dvidir)"'; \
+ echo '#define PDFDIR "$(pdfdir)"'; \
+ echo '#define PSDIR "$(psdir)"'; \
+ echo '#define LIBDIR "$(libdir)"'; \
+ echo '#define LISPDIR "$(lispdir)"'; \
+ echo '#define LOCALEDIR "$(localedir)"'; \
+ echo '#define MANDIR "$(mandir)"'; \
+ echo '#define MANEXT "$(manext)"'; \
+ echo '#define PKGDATADIR "$(pkgdatadir)"'; \
+ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
+ echo '#define PKGLIBDIR "$(pkglibdir)"'; \
+ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+ } | sed '/""/d' > $@-t
+ mv $@-t $@
+
+# We need the following in order to create <errno.h> when the system
+# doesn't have one that is POSIX compliant.
+errno.h: errno.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
+ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
+ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
+ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
+ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
+ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
+ < $(srcdir)/errno.in.h; \
+ } > $@-t
+ mv $@-t $@
+
+# We need the following in order to create <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+getopt.h: getopt.in.h
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ cat $(srcdir)/getopt.in.h; \
+ } > $@-t
+ mv -f $@-t $@
+
+# We need the following in order to install a simple file in $(libdir)
+# which is shared with other installed packages. We use a list of referencing
+# packages so that "make uninstall" will remove the file if and only if it
+# is not used by another installed package.
+# On systems with glibc-2.1 or newer, the file is redundant, therefore we
+# avoid installing it.
+
+all-local: charset.alias ref-add.sed ref-del.sed
+install-exec-local: all-local
+ if test $(GLIBC21) = no; then \
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+ darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+ esac ; \
+ else \
+ need_charset_alias=false ; \
+ fi ; \
+ if $$need_charset_alias; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
+ fi ; \
+ if test -f $(charset_alias); then \
+ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ else \
+ if $$need_charset_alias; then \
+ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ fi ; \
+ fi
+
+uninstall-local: all-local
+ if test -f $(charset_alias); then \
+ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+ if grep '^# Packages using this file: $$' $(charset_tmp) \
+ > /dev/null; then \
+ rm -f $(charset_alias); \
+ else \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
+ fi; \
+ rm -f $(charset_tmp); \
+ fi
+
+charset.alias: config.charset
+ rm -f t-$@ $@
+ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@
+ mv t-$@ $@
+.sin.sed:
+ rm -f t-$@ $@
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@
+ mv t-$@ $@
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+stdbool.h: stdbool.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
+ } > $@-t
+ mv $@-t $@
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+stdint.h: stdint.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
+ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
+ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
+ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
+ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
+ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
+ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
+ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
+ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
+ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+ < $(srcdir)/stdint.in.h; \
+ } > $@-t
+ mv $@-t $@
+
+# We need the following in order to create <stdio.h> when the system
+# doesn't have one that works with the given compiler.
+stdio.h: stdio.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
+ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
+ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
+ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
+ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
+ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
+ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
+ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
+ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
+ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
+ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
+ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
+ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
+ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
+ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
+ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
+ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
+ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
+ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
+ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
+ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
+ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
+ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
+ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
+ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
+ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
+ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
+ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
+ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
+ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
+ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
+ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
+ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
+ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
+ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
+ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
+ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
+ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
+ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
+ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
+ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
+ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
+ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
+ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
+ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
+ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
+ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
+ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
+ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/stdio.in.h; \
+ } > $@-t
+ mv $@-t $@
+
+# We need the following in order to create <stdlib.h> when the system
+# doesn't have one that works with the given compiler.
+stdlib.h: stdlib.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
+ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
+ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
+ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
+ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
+ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
+ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
+ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
+ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
+ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
+ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
+ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
+ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
+ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
+ -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \
+ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+ -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \
+ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+ -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \
+ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
+ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+ -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \
+ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
+ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
+ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
+ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
+ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
+ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
+ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+ -e 's|@''VOID_UNSETENV''@|$(VOID_UNSETENV)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/stdlib.in.h; \
+ } > $@-t
+ mv $@-t $@
+
+# We need the following in order to create <string.h> when the system
+# doesn't have one that works with the given compiler.
+string.h: string.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
+ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
+ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
+ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
+ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
+ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
+ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
+ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
+ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
+ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
+ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
+ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
+ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
+ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
+ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
+ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
+ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
+ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
+ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
+ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
+ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
+ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
+ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
+ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
+ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
+ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
+ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
+ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
+ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
+ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
+ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
+ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
+ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
+ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
+ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
+ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
+ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
+ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
+ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
+ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
+ -e 's|@''HAVE_STRNDUP''@|$(HAVE_STRNDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
+ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
+ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
+ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
+ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+ -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \
+ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
+ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
+ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/string.in.h; \
+ } > $@-t
+ mv $@-t $@
+
+# We need the following in order to create <sys/stat.h> when the system
+# has one that is incomplete.
+sys/stat.h: sys_stat.in.h
+ @MKDIR_P@ sys
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
+ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
+ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
+ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
+ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
+ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/sys_stat.in.h; \
+ } > $@-t
+ mv $@-t $@
+
+# We need the following in order to create <sys/time.h> when the system
+# doesn't have one that works with the given compiler.
+sys/time.h: sys_time.in.h
+ @MKDIR_P@ sys
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
+ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+ < $(srcdir)/sys_time.in.h; \
+ } > $@-t
+ mv $@-t $@
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+unistd.h: unistd.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
+ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
+ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
+ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
+ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
+ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
+ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
+ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
+ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
+ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
+ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
+ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
+ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
+ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
+ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
+ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
+ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
+ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
+ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
+ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
+ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
+ -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
+ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
+ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
+ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \
+ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
+ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
+ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
+ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
+ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
+ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
+ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
+ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/unistd.in.h; \
+ } > $@-t
+ mv $@-t $@
+
+# We need the following in order to create <wchar.h> when the system
+# version does not work standalone.
+wchar.h: wchar.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
+ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
+ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
+ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
+ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
+ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
+ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
+ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
+ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
+ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
+ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
+ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
+ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
+ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
+ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
+ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
+ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
+ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
+ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
+ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
+ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
+ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
+ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
+ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
+ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
+ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
+ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
+ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
+ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
+ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
+ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
+ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
+ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/wchar.in.h; \
+ } > $@-t
+ mv $@-t $@
+
+# We need the following in order to create <wctype.h> when the system
+# doesn't have one that works with the given compiler.
+wctype.h: wctype.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
+ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
+ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+ < $(srcdir)/wctype.in.h; \
+ } > $@-t
+ mv $@-t $@
+
+mostlyclean-local: mostlyclean-generic
+ @for dir in '' $(MOSTLYCLEANDIRS); do \
+ if test -n "$$dir" && test -d $$dir; then \
+ echo "rmdir $$dir"; rmdir $$dir; \
+ fi; \
+ done; \
+ :
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
new file mode 100644
index 0000000..33a47e5
--- /dev/null
+++ b/lib/acl-internal.h
@@ -0,0 +1,218 @@
+/* Internal implementation of access control lists.
+
+ Copyright (C) 2002-2003, 2005-2008 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
+
+#include "acl.h"
+
+#include <stdbool.h>
+#include <stdlib.h>
+
+/* All systems define the ACL related API in <sys/acl.h>. */
+#if HAVE_SYS_ACL_H
+# include <sys/acl.h>
+#endif
+#if defined HAVE_ACL && ! defined GETACLCNT && defined ACL_CNT
+# define GETACLCNT ACL_CNT
+#endif
+
+/* On Linux, additional ACL related API is available in <acl/libacl.h>. */
+#ifdef HAVE_ACL_LIBACL_H
+# include <acl/libacl.h>
+#endif
+
+#include "error.h"
+#include "quote.h"
+
+#include <errno.h>
+#ifndef ENOSYS
+# define ENOSYS (-1)
+#endif
+#ifndef ENOTSUP
+# define ENOTSUP (-1)
+#endif
+
+#ifndef HAVE_FCHMOD
+# define HAVE_FCHMOD false
+# define fchmod(fd, mode) (-1)
+#endif
+
+
+#if USE_ACL
+
+# if HAVE_ACL_GET_FILE
+/* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
+/* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
+
+# ifndef MIN_ACL_ENTRIES
+# define MIN_ACL_ENTRIES 4
+# endif
+
+/* POSIX 1003.1e (draft 17) */
+# ifdef HAVE_ACL_GET_FD
+/* Most platforms have a 1-argument acl_get_fd, only OSF/1 has a 2-argument
+ macro(!). */
+# if HAVE_ACL_FREE_TEXT /* OSF/1 */
+static inline acl_t
+rpl_acl_get_fd (int fd)
+{
+ return acl_get_fd (fd, ACL_TYPE_ACCESS);
+}
+# undef acl_get_fd
+# define acl_get_fd rpl_acl_get_fd
+# endif
+# else
+# define HAVE_ACL_GET_FD false
+# undef acl_get_fd
+# define acl_get_fd(fd) (NULL)
+# endif
+
+/* POSIX 1003.1e (draft 17) */
+# ifdef HAVE_ACL_SET_FD
+/* Most platforms have a 2-argument acl_set_fd, only OSF/1 has a 3-argument
+ macro(!). */
+# if HAVE_ACL_FREE_TEXT /* OSF/1 */
+static inline int
+rpl_acl_set_fd (int fd, acl_t acl)
+{
+ return acl_set_fd (fd, ACL_TYPE_ACCESS, acl);
+}
+# undef acl_set_fd
+# define acl_set_fd rpl_acl_set_fd
+# endif
+# else
+# define HAVE_ACL_SET_FD false
+# undef acl_set_fd
+# define acl_set_fd(fd, acl) (-1)
+# endif
+
+/* POSIX 1003.1e (draft 13) */
+# if ! HAVE_ACL_FREE_TEXT
+# define acl_free_text(buf) acl_free (buf)
+# endif
+
+/* Linux-specific */
+# ifndef HAVE_ACL_EXTENDED_FILE
+# define HAVE_ACL_EXTENDED_FILE false
+# define acl_extended_file(name) (-1)
+# endif
+
+/* Linux-specific */
+# ifndef HAVE_ACL_FROM_MODE
+# define HAVE_ACL_FROM_MODE false
+# define acl_from_mode(mode) (NULL)
+# endif
+
+/* Set to 1 if a file's mode is implicit by the ACL.
+ Set to 0 if a file's mode is stored independently from the ACL. */
+# if HAVE_ACL_COPY_EXT_NATIVE && HAVE_ACL_CREATE_ENTRY_NP /* MacOS X */
+# define MODE_INSIDE_ACL 0
+# else
+# define MODE_INSIDE_ACL 1
+# endif
+
+# if defined __APPLE__ && defined __MACH__ /* MacOS X */
+# define ACL_NOT_WELL_SUPPORTED(Err) \
+ ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == ENOENT)
+# elif defined EOPNOTSUPP /* Tru64 NFS */
+# define ACL_NOT_WELL_SUPPORTED(Err) \
+ ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY || (Err) == EOPNOTSUPP)
+# else
+# define ACL_NOT_WELL_SUPPORTED(Err) \
+ ((Err) == ENOTSUP || (Err) == ENOSYS || (Err) == EINVAL || (Err) == EBUSY)
+# endif
+
+/* Define a replacement for acl_entries if needed. (Only Linux has it.) */
+# if !HAVE_ACL_ENTRIES
+# define acl_entries rpl_acl_entries
+extern int acl_entries (acl_t);
+# endif
+
+# if HAVE_ACL_TYPE_EXTENDED /* MacOS X */
+/* ACL is an ACL, from a file, stored as type ACL_TYPE_EXTENDED.
+ Return 1 if the given ACL is non-trivial.
+ Return 0 if it is trivial. */
+extern int acl_extended_nontrivial (acl_t);
+# else
+/* ACL is an ACL, from a file, stored as type ACL_TYPE_ACCESS.
+ Return 1 if the given ACL is non-trivial.
+ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.
+ Return -1 and set errno upon failure to determine it. */
+extern int acl_access_nontrivial (acl_t);
+# endif
+
+# elif HAVE_ACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+
+/* Set to 1 if a file's mode is implicit by the ACL.
+ Set to 0 if a file's mode is stored independently from the ACL. */
+# if defined __CYGWIN__ /* Cygwin */
+# define MODE_INSIDE_ACL 0
+# else /* Solaris */
+# define MODE_INSIDE_ACL 1
+# endif
+
+# if !defined ACL_NO_TRIVIAL /* Solaris <= 10, Cygwin */
+
+/* Return 1 if the given ACL is non-trivial.
+ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
+extern int acl_nontrivial (int count, aclent_t *entries);
+
+# ifdef ACE_GETACL /* Solaris 10 */
+
+/* Test an ACL retrieved with ACE_GETACL.
+ Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
+ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
+extern int acl_ace_nontrivial (int count, ace_t *entries);
+
+/* Definitions for when the built executable is executed on Solaris 10
+ (newer version) or Solaris 11. */
+/* For a_type. */
+# define ACE_ACCESS_ALLOWED_ACE_TYPE 0 /* replaces ALLOW */
+# define ACE_ACCESS_DENIED_ACE_TYPE 1 /* replaces DENY */
+/* For a_flags. */
+# define NEW_ACE_OWNER 0x1000
+# define NEW_ACE_GROUP 0x2000
+# define NEW_ACE_IDENTIFIER_GROUP 0x0040
+# define ACE_EVERYONE 0x4000
+/* For a_access_mask. */
+# define NEW_ACE_READ_DATA 0x001 /* corresponds to 'r' */
+# define NEW_ACE_WRITE_DATA 0x002 /* corresponds to 'w' */
+# define NEW_ACE_EXECUTE 0x004 /* corresponds to 'x' */
+
+# endif
+
+# endif
+
+# elif HAVE_GETACL /* HP-UX */
+
+/* Return 1 if the given ACL is non-trivial.
+ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
+extern int acl_nontrivial (int count, struct acl_entry *entries, struct stat *sb);
+
+# elif HAVE_ACLX_GET && 0 /* AIX */
+
+/* TODO */
+
+# elif HAVE_STATACL /* older AIX */
+
+/* Return 1 if the given ACL is non-trivial.
+ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
+extern int acl_nontrivial (struct acl *a);
+
+# endif
+
+#endif
diff --git a/lib/acl.h b/lib/acl.h
new file mode 100644
index 0000000..fcb00f5
--- /dev/null
+++ b/lib/acl.h
@@ -0,0 +1,27 @@
+/* acl.c - access control lists
+
+ Copyright (C) 2002, 2008 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert. */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+int file_has_acl (char const *, struct stat const *);
+int copy_acl (char const *, int, char const *, int, mode_t);
+int set_acl (char const *, int, mode_t);
+int qset_acl (char const *, int, mode_t);
+int chmod_or_fchmod (char const *, int, mode_t);
diff --git a/lib/acl_entries.c b/lib/acl_entries.c
new file mode 100644
index 0000000..a931fff
--- /dev/null
+++ b/lib/acl_entries.c
@@ -0,0 +1,58 @@
+/* Return the number of entries in an ACL.
+
+ Copyright (C) 2002-2003, 2005-2008 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert and Andreas Gruenbacher. */
+
+#include <config.h>
+
+#include "acl-internal.h"
+
+/* This file assumes POSIX-draft like ACLs
+ (Linux, FreeBSD, MacOS X, IRIX, Tru64). */
+
+/* Return the number of entries in ACL. */
+
+int
+acl_entries (acl_t acl)
+{
+ int count = 0;
+
+ if (acl != NULL)
+ {
+#if HAVE_ACL_FIRST_ENTRY /* Linux, FreeBSD, MacOS X */
+ acl_entry_t ace;
+ int at_end;
+
+ for (at_end = acl_get_entry (acl, ACL_FIRST_ENTRY, &ace);
+ !at_end;
+ at_end = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
+ count++;
+#else /* IRIX, Tru64 */
+# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */
+ /* Don't use acl_get_entry: it is undocumented. */
+ count = acl->acl_cnt;
+# endif
+# if HAVE_ACL_FREE_TEXT /* Tru64 */
+ /* Don't use acl_get_entry: it takes only one argument and does not
+ work. */
+ count = acl->acl_num;
+# endif
+#endif
+ }
+
+ return count;
+}
diff --git a/lib/alloca.c b/lib/alloca.c
index c1699c4..0af8467 100644
--- a/lib/alloca.c
+++ b/lib/alloca.c
@@ -1,3 +1,5 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* alloca.c -- allocate automatically reclaimed memory
(Mostly) portable public-domain implementation -- D A Gwyn
@@ -21,19 +23,22 @@
allocating any. It is a good idea to use alloca(0) in
your main control loop, etc. to force garbage collection. */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
-#ifdef HAVE_STRING_H
+#include <alloca.h>
+
#include <string.h>
-#endif
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
#ifdef emacs
-#include "blockinput.h"
+# include "lisp.h"
+# include "blockinput.h"
+# ifdef EMACS_FREE
+# undef free
+# define free EMACS_FREE
+# endif
+#else
+# define memory_full() abort ()
#endif
/* If compiling with GCC 2, this file's not needed. */
@@ -41,56 +46,33 @@
/* If someone has defined alloca as a macro,
there must be some other way alloca is supposed to work. */
-#ifndef alloca
+# ifndef alloca
-#ifdef emacs
-#ifdef static
+# ifdef emacs
+# ifdef static
/* actually, only want this if static is defined as ""
-- this is for usg, in which emacs must undefine static
in order to make unexec workable
*/
-#ifndef STACK_DIRECTION
+# ifndef STACK_DIRECTION
you
lose
-- must know STACK_DIRECTION at compile-time
-#endif /* STACK_DIRECTION undefined */
-#endif /* static */
-#endif /* emacs */
+/* Using #error here is not wise since this file should work for
+ old and obscure compilers. */
+# endif /* STACK_DIRECTION undefined */
+# endif /* static */
+# endif /* emacs */
/* If your stack is a linked list of frames, you have to
provide an "address metric" ADDRESS_FUNCTION macro. */
-#if defined (CRAY) && defined (CRAY_STACKSEG_END)
+# if defined (CRAY) && defined (CRAY_STACKSEG_END)
long i00afunc ();
-#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
-#else
-#define ADDRESS_FUNCTION(arg) &(arg)
-#endif
-
-#if __STDC__
-typedef void *pointer;
-#else
-typedef char *pointer;
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-/* Different portions of Emacs need to call different versions of
- malloc. The Emacs executable needs alloca to call xmalloc, because
- ordinary malloc isn't protected from input signals. On the other
- hand, the utilities in lib-src need alloca to call malloc; some of
- them are very simple, and don't have an xmalloc routine.
-
- Non-Emacs programs expect this to call xmalloc.
-
- Callers below should use malloc. */
-
-#ifndef emacs
-#define malloc xmalloc
-#endif
-extern pointer malloc ();
+# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
+# else
+# define ADDRESS_FUNCTION(arg) &(arg)
+# endif
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
@@ -100,21 +82,21 @@ extern pointer malloc ();
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
-#ifndef STACK_DIRECTION
-#define STACK_DIRECTION 0 /* Direction unknown. */
-#endif
+# ifndef STACK_DIRECTION
+# define STACK_DIRECTION 0 /* Direction unknown. */
+# endif
-#if STACK_DIRECTION != 0
+# if STACK_DIRECTION != 0
-#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
+# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
-#else /* STACK_DIRECTION == 0; need run-time code. */
+# else /* STACK_DIRECTION == 0; need run-time code. */
static int stack_dir; /* 1 or -1 once known. */
-#define STACK_DIR stack_dir
+# define STACK_DIR stack_dir
static void
-find_stack_direction ()
+find_stack_direction (void)
{
static char *addr = NULL; /* Address of first `dummy', once known. */
auto char dummy; /* To get stack address. */
@@ -135,7 +117,7 @@ find_stack_direction ()
}
}
-#endif /* STACK_DIRECTION == 0 */
+# endif /* STACK_DIRECTION == 0 */
/* An "alloca header" is used to:
(a) chain together all alloca'ed blocks;
@@ -144,9 +126,9 @@ find_stack_direction ()
It is very important that sizeof(header) agree with malloc
alignment chunk size. The following default should work okay. */
-#ifndef ALIGN_SIZE
-#define ALIGN_SIZE sizeof(double)
-#endif
+# ifndef ALIGN_SIZE
+# define ALIGN_SIZE sizeof(double)
+# endif
typedef union hdr
{
@@ -167,17 +149,16 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
caller, but that method cannot be made to work for some
implementations of C, for example under Gould's UTX/32. */
-pointer
-alloca (size)
- unsigned size;
+void *
+alloca (size_t size)
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
-#if STACK_DIRECTION == 0
+# if STACK_DIRECTION == 0
if (STACK_DIR == 0) /* Unknown growth direction. */
find_stack_direction ();
-#endif
+# endif
/* Reclaim garbage, defined as all alloca'd storage that
was allocated from deeper in the stack than currently. */
@@ -185,9 +166,9 @@ alloca (size)
{
register header *hp; /* Traverses linked list. */
-#ifdef emacs
+# ifdef emacs
BLOCK_INPUT;
-#endif
+# endif
for (hp = last_alloca_header; hp != NULL;)
if ((STACK_DIR > 0 && hp->h.deep > depth)
@@ -195,7 +176,7 @@ alloca (size)
{
register header *np = hp->h.next;
- free ((pointer) hp); /* Collect garbage. */
+ free (hp); /* Collect garbage. */
hp = np; /* -> next header. */
}
@@ -204,9 +185,9 @@ alloca (size)
last_alloca_header = hp; /* -> last valid storage. */
-#ifdef emacs
+# ifdef emacs
UNBLOCK_INPUT;
-#endif
+# endif
}
if (size == 0)
@@ -215,32 +196,38 @@ alloca (size)
/* Allocate combined header + user data storage. */
{
- register pointer new = malloc (sizeof (header) + size);
/* Address of header. */
+ register header *new;
+
+ size_t combined_size = sizeof (header) + size;
+ if (combined_size < sizeof (header))
+ memory_full ();
+
+ new = malloc (combined_size);
- if (new == 0)
- abort();
+ if (! new)
+ memory_full ();
- ((header *) new)->h.next = last_alloca_header;
- ((header *) new)->h.deep = depth;
+ new->h.next = last_alloca_header;
+ new->h.deep = depth;
- last_alloca_header = (header *) new;
+ last_alloca_header = new;
/* User storage begins just after header. */
- return (pointer) ((char *) new + sizeof (header));
+ return (void *) (new + 1);
}
}
-#if defined (CRAY) && defined (CRAY_STACKSEG_END)
+# if defined (CRAY) && defined (CRAY_STACKSEG_END)
-#ifdef DEBUG_I00AFUNC
-#include <stdio.h>
-#endif
+# ifdef DEBUG_I00AFUNC
+# include <stdio.h>
+# endif
-#ifndef CRAY_STACK
-#define CRAY_STACK
-#ifndef CRAY2
+# ifndef CRAY_STACK
+# define CRAY_STACK
+# ifndef CRAY2
/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
struct stack_control_header
{
@@ -292,7 +279,7 @@ struct stack_segment_linkage
long sss7;
};
-#else /* CRAY2 */
+# else /* CRAY2 */
/* The following structure defines the vector of words
returned by the STKSTAT library routine. */
struct stk_stat
@@ -345,10 +332,10 @@ struct stk_trailer
long unknown14;
};
-#endif /* CRAY2 */
-#endif /* not CRAY_STACK */
+# endif /* CRAY2 */
+# endif /* not CRAY_STACK */
-#ifdef CRAY2
+# ifdef CRAY2
/* Determine a "stack measure" for an arbitrary ADDRESS.
I doubt that "lint" will like this much. */
@@ -419,7 +406,7 @@ i00afunc (long *address)
return (result);
}
-#else /* not CRAY2 */
+# else /* not CRAY2 */
/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
Determine the number of the cell within the stack,
given the address of the cell. The purpose of this
@@ -464,9 +451,9 @@ i00afunc (long address)
while (!(this_segment <= address && address <= stkl))
{
-#ifdef DEBUG_I00AFUNC
+# ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
-#endif
+# endif
if (pseg == 0)
break;
stkl = stkl - pseg;
@@ -485,9 +472,9 @@ i00afunc (long address)
while (pseg != 0)
{
-#ifdef DEBUG_I00AFUNC
+# ifdef DEBUG_I00AFUNC
fprintf (stderr, "%011o %011o\n", pseg, size);
-#endif
+# endif
stkl = stkl - pseg;
ssptr = (struct stack_segment_linkage *) stkl;
size = ssptr->sssize;
@@ -497,8 +484,8 @@ i00afunc (long address)
return (result);
}
-#endif /* not CRAY2 */
-#endif /* CRAY */
+# endif /* not CRAY2 */
+# endif /* CRAY */
-#endif /* no alloca */
-#endif /* not GCC version 2 */
+# endif /* no alloca */
+#endif /* not GCC version 3 */
diff --git a/lib/alloca.in.h b/lib/alloca.in.h
new file mode 100644
index 0000000..c65b4de
--- /dev/null
+++ b/lib/alloca.in.h
@@ -0,0 +1,58 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Memory allocation on the stack.
+
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2008 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA. */
+
+/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
+ means there is a real alloca function. */
+#ifndef _GL_ALLOCA_H
+#define _GL_ALLOCA_H
+
+/* alloca (N) returns a pointer to N bytes of memory
+ allocated on the stack, which will last until the function returns.
+ Use of alloca should be avoided:
+ - inside arguments of function calls - undefined behaviour,
+ - in inline functions - the allocation may actually last until the
+ calling function returns,
+ - for huge N (say, N >= 65536) - you never know how large (or small)
+ the stack is, and when the stack cannot fulfill the memory allocation
+ request, the program just crashes.
+ */
+
+#ifndef alloca
+# ifdef __GNUC__
+# define alloca __builtin_alloca
+# elif defined _AIX
+# define alloca __alloca
+# elif defined _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# elif defined __DECC && defined __VMS
+# define alloca __ALLOCA
+# else
+# include <stddef.h>
+# ifdef __cplusplus
+extern "C"
+# endif
+void *alloca (size_t);
+# endif
+#endif
+
+#endif /* _GL_ALLOCA_H */
diff --git a/lib/btowc.c b/lib/btowc.c
new file mode 100644
index 0000000..7f3b966
--- /dev/null
+++ b/lib/btowc.c
@@ -0,0 +1,38 @@
+/* Convert unibyte character to wide character.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include <stdio.h>
+
+wint_t
+btowc (int c)
+{
+ if (c != EOF)
+ {
+ char buf[1];
+ wchar_t wc;
+
+ buf[0] = c;
+ if (mbtowc (&wc, buf, 1) >= 0)
+ return wc;
+ }
+ return WEOF;
+}
diff --git a/lib/config.charset b/lib/config.charset
new file mode 100755
index 0000000..7f91212
--- /dev/null
+++ b/lib/config.charset
@@ -0,0 +1,683 @@
+#! /bin/sh
+# Output a system dependent table of character encoding aliases.
+#
+# Copyright (C) 2000-2004, 2006-2009 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU 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.
+#
+# 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
+# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin
+# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
+# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
+# ISO-8859-3 Y glibc solaris
+# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin
+# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
+# ISO-8859-6 Y glibc aix hpux solaris
+# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin
+# ISO-8859-8 Y glibc aix hpux osf solaris
+# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
+# ISO-8859-13 glibc netbsd openbsd darwin
+# ISO-8859-14 glibc
+# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin
+# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin
+# KOI8-U Y glibc freebsd netbsd openbsd darwin
+# 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 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 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
+# EUC-TW glibc aix hpux irix osf solaris netbsd
+# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin
+# BIG5-HKSCS glibc solaris darwin
+# GBK glibc aix osf solaris darwin 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
+# VISCII Y glibc
+# TCVN5712-1 glibc
+# ARMSCII-8 glibc darwin
+# GEORGIAN-PS glibc
+# 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
+#
+# 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* | os2*)
+ # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
+ # reuse FreeBSD's locale data for OS/2.
+ echo "C ASCII"
+ echo "US-ASCII ASCII"
+ for l in la_LN lt_LN; do
+ 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/copy-acl.c b/lib/copy-acl.c
new file mode 100644
index 0000000..af85a08
--- /dev/null
+++ b/lib/copy-acl.c
@@ -0,0 +1,553 @@
+/* copy-acl.c - copy access control list from one file to another file
+
+ Copyright (C) 2002-2003, 2005-2008 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
+
+#include <config.h>
+
+#include "acl.h"
+
+#include "acl-internal.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+
+/* Copy access control lists from one file to another. If SOURCE_DESC is
+ a valid file descriptor, use file descriptor operations, else use
+ filename based operations on SRC_NAME. Likewise for DEST_DESC and
+ DST_NAME.
+ If access control lists are not available, fchmod the target file to
+ MODE. Also sets the non-permission bits of the destination file
+ (S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
+ Return 0 if successful.
+ Return -2 and set errno for an error relating to the source file.
+ Return -1 and set errno for an error relating to the destination file. */
+
+static int
+qcopy_acl (const char *src_name, int source_desc, const char *dst_name,
+ int dest_desc, mode_t mode)
+{
+#if USE_ACL && HAVE_ACL_GET_FILE
+ /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
+ /* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
+# if MODE_INSIDE_ACL
+ /* Linux, FreeBSD, IRIX, Tru64 */
+
+ acl_t acl;
+ int ret;
+
+ if (HAVE_ACL_GET_FD && source_desc != -1)
+ acl = acl_get_fd (source_desc);
+ else
+ acl = acl_get_file (src_name, ACL_TYPE_ACCESS);
+ if (acl == NULL)
+ {
+ if (ACL_NOT_WELL_SUPPORTED (errno))
+ return qset_acl (dst_name, dest_desc, mode);
+ else
+ return -2;
+ }
+
+ if (HAVE_ACL_SET_FD && dest_desc != -1)
+ ret = acl_set_fd (dest_desc, acl);
+ else
+ ret = acl_set_file (dst_name, ACL_TYPE_ACCESS, acl);
+ if (ret != 0)
+ {
+ int saved_errno = errno;
+
+ if (ACL_NOT_WELL_SUPPORTED (errno) && !acl_access_nontrivial (acl))
+ {
+ acl_free (acl);
+ return chmod_or_fchmod (dst_name, dest_desc, mode);
+ }
+ else
+ {
+ acl_free (acl);
+ chmod_or_fchmod (dst_name, dest_desc, mode);
+ errno = saved_errno;
+ return -1;
+ }
+ }
+ else
+ acl_free (acl);
+
+ if (mode & (S_ISUID | S_ISGID | S_ISVTX))
+ {
+ /* We did not call chmod so far, and either the mode and the ACL are
+ separate or special bits are to be set which don't fit into ACLs. */
+
+ if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
+ return -1;
+ }
+
+ if (S_ISDIR (mode))
+ {
+ acl = acl_get_file (src_name, ACL_TYPE_DEFAULT);
+ if (acl == NULL)
+ return -2;
+
+ if (acl_set_file (dst_name, ACL_TYPE_DEFAULT, acl))
+ {
+ int saved_errno = errno;
+
+ acl_free (acl);
+ errno = saved_errno;
+ return -1;
+ }
+ else
+ acl_free (acl);
+ }
+ return 0;
+
+# else /* !MODE_INSIDE_ACL */
+ /* MacOS X */
+
+# if !HAVE_ACL_TYPE_EXTENDED
+# error Must have ACL_TYPE_EXTENDED
+# endif
+
+ /* On MacOS X, acl_get_file (name, ACL_TYPE_ACCESS)
+ and acl_get_file (name, ACL_TYPE_DEFAULT)
+ always return NULL / EINVAL. You have to use
+ acl_get_file (name, ACL_TYPE_EXTENDED)
+ or acl_get_fd (open (name, ...))
+ to retrieve an ACL.
+ On the other hand,
+ acl_set_file (name, ACL_TYPE_ACCESS, acl)
+ and acl_set_file (name, ACL_TYPE_DEFAULT, acl)
+ have the same effect as
+ acl_set_file (name, ACL_TYPE_EXTENDED, acl):
+ Each of these calls sets the file's ACL. */
+
+ acl_t acl;
+ int ret;
+
+ if (HAVE_ACL_GET_FD && source_desc != -1)
+ acl = acl_get_fd (source_desc);
+ else
+ acl = acl_get_file (src_name, ACL_TYPE_EXTENDED);
+ if (acl == NULL)
+ {
+ if (ACL_NOT_WELL_SUPPORTED (errno))
+ return qset_acl (dst_name, dest_desc, mode);
+ else
+ return -2;
+ }
+
+ if (HAVE_ACL_SET_FD && dest_desc != -1)
+ ret = acl_set_fd (dest_desc, acl);
+ else
+ ret = acl_set_file (dst_name, ACL_TYPE_EXTENDED, acl);
+ if (ret != 0)
+ {
+ int saved_errno = errno;
+
+ if (ACL_NOT_WELL_SUPPORTED (errno) && !acl_extended_nontrivial (acl))
+ {
+ acl_free (acl);
+ return chmod_or_fchmod (dst_name, dest_desc, mode);
+ }
+ else
+ {
+ acl_free (acl);
+ chmod_or_fchmod (dst_name, dest_desc, mode);
+ errno = saved_errno;
+ return -1;
+ }
+ }
+ else
+ acl_free (acl);
+
+ /* Since !MODE_INSIDE_ACL, we have to call chmod explicitly. */
+ return chmod_or_fchmod (dst_name, dest_desc, mode);
+
+# endif
+
+#elif USE_ACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+
+# if defined ACL_NO_TRIVIAL
+ /* Solaris 10 (newer version), which has additional API declared in
+ <sys/acl.h> (acl_t) and implemented in libsec (acl_set, acl_trivial,
+ acl_fromtext, ...). */
+
+ int ret;
+ acl_t *aclp = NULL;
+ ret = (source_desc < 0
+ ? acl_get (src_name, ACL_NO_TRIVIAL, &aclp)
+ : facl_get (source_desc, ACL_NO_TRIVIAL, &aclp));
+ if (ret != 0 && errno != ENOSYS)
+ return -2;
+
+ ret = qset_acl (dst_name, dest_desc, mode);
+ if (ret != 0)
+ return -1;
+
+ if (aclp)
+ {
+ ret = (dest_desc < 0
+ ? acl_set (dst_name, aclp)
+ : facl_set (dest_desc, aclp));
+ if (ret != 0)
+ {
+ int saved_errno = errno;
+
+ acl_free (aclp);
+ errno = saved_errno;
+ return -1;
+ }
+ acl_free (aclp);
+ }
+
+ return 0;
+
+# else /* Solaris, Cygwin, general case */
+
+ /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
+ of Unixware. The acl() call returns the access and default ACL both
+ at once. */
+# ifdef ACE_GETACL
+ int ace_count;
+ ace_t *ace_entries;
+# endif
+ int count;
+ aclent_t *entries;
+ int did_chmod;
+ int saved_errno;
+ int ret;
+
+# ifdef ACE_GETACL
+ /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
+ file systems (whereas the other ones are used in UFS file systems).
+ There is an API
+ pathconf (name, _PC_ACL_ENABLED)
+ fpathconf (desc, _PC_ACL_ENABLED)
+ that allows to determine which of the two kinds of ACLs is supported
+ for the given file. But some file systems may implement this call
+ incorrectly, so better not use it.
+ When fetching the source ACL, we simply fetch both ACL types.
+ When setting the destination ACL, we try either ACL types, assuming
+ that the kernel will translate the ACL from one form to the other.
+ (See in <http://docs.sun.com/app/docs/doc/819-2241/6n4huc7ia?l=en&a=view>
+ the description of ENOTSUP.) */
+ for (;;)
+ {
+ ace_count = (source_desc != -1
+ ? facl (source_desc, ACE_GETACLCNT, 0, NULL)
+ : acl (src_name, ACE_GETACLCNT, 0, NULL));
+
+ if (ace_count < 0)
+ {
+ if (errno == ENOSYS || errno == EINVAL)
+ {
+ ace_count = 0;
+ ace_entries = NULL;
+ break;
+ }
+ else
+ return -2;
+ }
+
+ if (ace_count == 0)
+ {
+ ace_entries = NULL;
+ break;
+ }
+
+ ace_entries = (ace_t *) malloc (ace_count * sizeof (ace_t));
+ if (ace_entries == NULL)
+ {
+ errno = ENOMEM;
+ return -2;
+ }
+
+ if ((source_desc != -1
+ ? facl (source_desc, ACE_GETACL, ace_count, ace_entries)
+ : acl (src_name, ACE_GETACL, ace_count, ace_entries))
+ == ace_count)
+ break;
+ /* Huh? The number of ACL entries changed since the last call.
+ Repeat. */
+ }
+# endif
+
+ for (;;)
+ {
+ count = (source_desc != -1
+ ? facl (source_desc, GETACLCNT, 0, NULL)
+ : acl (src_name, GETACLCNT, 0, NULL));
+
+ if (count < 0)
+ {
+ if (errno == ENOSYS || errno == ENOTSUP)
+ {
+ count = 0;
+ entries = NULL;
+ break;
+ }
+ else
+ return -2;
+ }
+
+ if (count == 0)
+ {
+ entries = NULL;
+ break;
+ }
+
+ entries = (aclent_t *) malloc (count * sizeof (aclent_t));
+ if (entries == NULL)
+ {
+ errno = ENOMEM;
+ return -2;
+ }
+
+ if ((source_desc != -1
+ ? facl (source_desc, GETACL, count, entries)
+ : acl (src_name, GETACL, count, entries))
+ == count)
+ break;
+ /* Huh? The number of ACL entries changed since the last call.
+ Repeat. */
+ }
+
+ /* Is there an ACL of either kind? */
+# ifdef ACE_GETACL
+ if (ace_count == 0)
+# endif
+ if (count == 0)
+ return qset_acl (dst_name, dest_desc, mode);
+
+ did_chmod = 0; /* set to 1 once the mode bits in 0777 have been set */
+ saved_errno = 0; /* the first non-ignorable error code */
+
+ if (!MODE_INSIDE_ACL)
+ {
+ /* On Cygwin, it is necessary to call chmod before acl, because
+ chmod can change the contents of the ACL (in ways that don't
+ change the allowed accesses, but still visible). */
+ if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
+ saved_errno = errno;
+ did_chmod = 1;
+ }
+
+ /* If both ace_entries and entries are available, try SETACL before
+ ACE_SETACL, because SETACL cannot fail with ENOTSUP whereas ACE_SETACL
+ can. */
+
+ if (count > 0)
+ {
+ ret = (dest_desc != -1
+ ? facl (dest_desc, SETACL, count, entries)
+ : acl (dst_name, SETACL, count, entries));
+ if (ret < 0 && saved_errno == 0)
+ {
+ saved_errno = errno;
+ if (errno == ENOSYS && !acl_nontrivial (count, entries))
+ saved_errno = 0;
+ }
+ else
+ did_chmod = 1;
+ }
+ free (entries);
+
+# ifdef ACE_GETACL
+ if (ace_count > 0)
+ {
+ ret = (dest_desc != -1
+ ? facl (dest_desc, ACE_SETACL, ace_count, ace_entries)
+ : acl (dst_name, ACE_SETACL, ace_count, ace_entries));
+ if (ret < 0 && saved_errno == 0)
+ {
+ saved_errno = errno;
+ if ((errno == ENOSYS || errno == EINVAL || errno == ENOTSUP)
+ && !acl_ace_nontrivial (ace_count, ace_entries))
+ saved_errno = 0;
+ }
+ }
+ free (ace_entries);
+# endif
+
+ if (MODE_INSIDE_ACL
+ && did_chmod <= ((mode & (S_ISUID | S_ISGID | S_ISVTX)) ? 1 : 0))
+ {
+ /* We did not call chmod so far, and either the mode and the ACL are
+ separate or special bits are to be set which don't fit into ACLs. */
+
+ if (chmod_or_fchmod (dst_name, dest_desc, mode) != 0)
+ {
+ if (saved_errno == 0)
+ saved_errno = errno;
+ }
+ }
+
+ if (saved_errno)
+ {
+ errno = saved_errno;
+ return -1;
+ }
+ return 0;
+
+# endif
+
+#elif USE_ACL && HAVE_GETACL /* HP-UX */
+
+ int count;
+ struct acl_entry entries[NACLENTRIES];
+ int ret;
+
+ for (;;)
+ {
+ count = (source_desc != -1
+ ? fgetacl (source_desc, 0, NULL)
+ : getacl (src_name, 0, NULL));
+
+ if (count < 0)
+ {
+ if (errno == ENOSYS || errno == EOPNOTSUPP)
+ {
+ count = 0;
+ break;
+ }
+ else
+ return -2;
+ }
+
+ if (count == 0)
+ break;
+
+ if (count > NACLENTRIES)
+ /* If NACLENTRIES cannot be trusted, use dynamic memory allocation. */
+ abort ();
+
+ if ((source_desc != -1
+ ? fgetacl (source_desc, count, entries)
+ : getacl (src_name, count, entries))
+ == count)
+ break;
+ /* Huh? The number of ACL entries changed since the last call.
+ Repeat. */
+ }
+
+ if (count == 0)
+ return qset_acl (dst_name, dest_desc, mode);
+
+ ret = (dest_desc != -1
+ ? fsetacl (dest_desc, count, entries)
+ : setacl (dst_name, count, entries));
+ if (ret < 0)
+ {
+ int saved_errno = errno;
+
+ if (errno == ENOSYS || errno == EOPNOTSUPP)
+ {
+ struct stat source_statbuf;
+
+ if ((source_desc != -1
+ ? fstat (source_desc, &source_statbuf)
+ : stat (src_name, &source_statbuf)) == 0)
+ {
+ if (!acl_nontrivial (count, entries, &source_statbuf))
+ return chmod_or_fchmod (dst_name, dest_desc, mode);
+ }
+ else
+ saved_errno = errno;
+ }
+
+ chmod_or_fchmod (dst_name, dest_desc, mode);
+ errno = saved_errno;
+ return -1;
+ }
+
+ if (mode & (S_ISUID | S_ISGID | S_ISVTX))
+ {
+ /* We did not call chmod so far, and either the mode and the ACL are
+ separate or special bits are to be set which don't fit into ACLs. */
+
+ return chmod_or_fchmod (dst_name, dest_desc, mode);
+ }
+ return 0;
+
+#elif USE_ACL && HAVE_ACLX_GET && 0 /* AIX */
+
+ /* TODO */
+
+#elif USE_ACL && HAVE_STATACL /* older AIX */
+
+ union { struct acl a; char room[4096]; } u;
+ int ret;
+
+ if ((source_desc != -1
+ ? fstatacl (source_desc, STX_NORMAL, &u.a, sizeof (u))
+ : statacl (src_name, STX_NORMAL, &u.a, sizeof (u)))
+ < 0)
+ return -2;
+
+ ret = (dest_desc != -1
+ ? fchacl (dest_desc, &u.a, u.a.acl_len)
+ : chacl (dst_name, &u.a, u.a.acl_len));
+ if (ret < 0)
+ {
+ int saved_errno = errno;
+
+ chmod_or_fchmod (dst_name, dest_desc, mode);
+ errno = saved_errno;
+ return -1;
+ }
+
+ /* No need to call chmod_or_fchmod at this point, since the mode bits
+ S_ISUID, S_ISGID, S_ISVTX are also stored in the ACL. */
+
+ return 0;
+
+#else
+
+ return qset_acl (dst_name, dest_desc, mode);
+
+#endif
+}
+
+
+/* Copy access control lists from one file to another. If SOURCE_DESC is
+ a valid file descriptor, use file descriptor operations, else use
+ filename based operations on SRC_NAME. Likewise for DEST_DESC and
+ DST_NAME.
+ If access control lists are not available, fchmod the target file to
+ MODE. Also sets the non-permission bits of the destination file
+ (S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
+ Return 0 if successful, otherwise output a diagnostic and return -1. */
+
+int
+copy_acl (const char *src_name, int source_desc, const char *dst_name,
+ int dest_desc, mode_t mode)
+{
+ int ret = qcopy_acl (src_name, source_desc, dst_name, dest_desc, mode);
+ switch (ret)
+ {
+ case -2:
+ error (0, errno, "%s", quote (src_name));
+ return -1;
+
+ case -1:
+ error (0, errno, _("preserving permissions for %s"), quote (dst_name));
+ return -1;
+
+ default:
+ return 0;
+ }
+}
diff --git a/lib/errno.in.h b/lib/errno.in.h
new file mode 100644
index 0000000..f873039
--- /dev/null
+++ b/lib/errno.in.h
@@ -0,0 +1,157 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* A POSIX-like <errno.h>.
+
+ Copyright (C) 2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_ERRNO_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
+
+#ifndef _GL_ERRNO_H
+#define _GL_ERRNO_H
+
+
+/* On native Windows platforms, many macros are not defined. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */
+# define EWOULDBLOCK EAGAIN
+
+/* Values >= 100 seem safe to use. */
+# define ETXTBSY 100
+# define GNULIB_defined_ETXTBSY 1
+
+/* These are intentionally the same values as the WSA* error numbers, defined
+ in <winsock2.h>. */
+# define EINPROGRESS 10036
+# define EALREADY 10037
+# define ENOTSOCK 10038
+# define EDESTADDRREQ 10039
+# define EMSGSIZE 10040
+# define EPROTOTYPE 10041
+# define ENOPROTOOPT 10042
+# define EPROTONOSUPPORT 10043
+# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */
+# define EOPNOTSUPP 10045
+# define EPFNOSUPPORT 10046 /* not required by POSIX */
+# define EAFNOSUPPORT 10047
+# define EADDRINUSE 10048
+# define EADDRNOTAVAIL 10049
+# define ENETDOWN 10050
+# define ENETUNREACH 10051
+# define ENETRESET 10052
+# define ECONNABORTED 10053
+# define ECONNRESET 10054
+# define ENOBUFS 10055
+# define EISCONN 10056
+# define ENOTCONN 10057
+# define ESHUTDOWN 10058 /* not required by POSIX */
+# define ETOOMANYREFS 10059 /* not required by POSIX */
+# define ETIMEDOUT 10060
+# define ECONNREFUSED 10061
+# define ELOOP 10062
+# define EHOSTDOWN 10064 /* not required by POSIX */
+# define EHOSTUNREACH 10065
+# define EPROCLIM 10067 /* not required by POSIX */
+# define EUSERS 10068 /* not required by POSIX */
+# define EDQUOT 10069
+# define ESTALE 10070
+# define EREMOTE 10071 /* not required by POSIX */
+# define GNULIB_defined_ESOCK 1
+
+# endif
+
+
+/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
+ EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */
+# if @EMULTIHOP_HIDDEN@
+# define EMULTIHOP @EMULTIHOP_VALUE@
+# define GNULIB_defined_EMULTIHOP 1
+# endif
+# if @ENOLINK_HIDDEN@
+# define ENOLINK @ENOLINK_VALUE@
+# define GNULIB_defined_ENOLINK 1
+# endif
+# if @EOVERFLOW_HIDDEN@
+# define EOVERFLOW @EOVERFLOW_VALUE@
+# define GNULIB_defined_EOVERFLOW 1
+# endif
+
+
+/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
+ EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
+ Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
+ HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
+
+ Note: When one of these systems defines some of these macros some day,
+ binaries will have to be recompiled so that they recognizes the new
+ errno values from the system. */
+
+# ifndef ENOMSG
+# define ENOMSG 2000
+# define GNULIB_defined_ENOMSG 1
+# endif
+
+# ifndef EIDRM
+# define EIDRM 2001
+# define GNULIB_defined_EIDRM 1
+# endif
+
+# ifndef ENOLINK
+# define ENOLINK 2002
+# define GNULIB_defined_ENOLINK 1
+# endif
+
+# ifndef EPROTO
+# define EPROTO 2003
+# define GNULIB_defined_EPROTO 1
+# endif
+
+# ifndef EMULTIHOP
+# define EMULTIHOP 2004
+# define GNULIB_defined_EMULTIHOP 1
+# endif
+
+# ifndef EBADMSG
+# define EBADMSG 2005
+# define GNULIB_defined_EBADMSG 1
+# endif
+
+# ifndef EOVERFLOW
+# define EOVERFLOW 2006
+# define GNULIB_defined_EOVERFLOW 1
+# endif
+
+# ifndef ENOTSUP
+# define ENOTSUP 2007
+# define GNULIB_defined_ENOTSUP 1
+# endif
+
+# ifndef ECANCELED
+# define ECANCELED 2008
+# define GNULIB_defined_ECANCELED 1
+# endif
+
+
+#endif /* _GL_ERRNO_H */
+#endif /* _GL_ERRNO_H */
diff --git a/lib/error.c b/lib/error.c
new file mode 100644
index 0000000..3177bd5
--- /dev/null
+++ b/lib/error.c
@@ -0,0 +1,338 @@
+/* Error handler for noninteractive utilities
+ Copyright (C) 1990-1998, 2000-2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
+
+#if !_LIBC
+# include <config.h>
+#endif
+
+#include "error.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !_LIBC && ENABLE_NLS
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+# include <stdbool.h>
+# include <stdint.h>
+# include <wchar.h>
+# define mbsrtowcs __mbsrtowcs
+#endif
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+#ifndef _
+# define _(String) String
+#endif
+
+/* If NULL, error will flush stdout, then print on stderr the program
+ name, a colon and a space. Otherwise, error will call this
+ function without parameters instead. */
+void (*error_print_progname) (void);
+
+/* This variable is incremented each time `error' is called. */
+unsigned int error_message_count;
+
+#ifdef _LIBC
+/* In the GNU C library, there is a predefined variable for this. */
+
+# define program_name program_invocation_name
+# include <errno.h>
+# include <limits.h>
+# include <libio/libioP.h>
+
+/* In GNU libc we want do not want to use the common name `error' directly.
+ Instead make it a weak alias. */
+extern void __error (int status, int errnum, const char *message, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+extern void __error_at_line (int status, int errnum, const char *file_name,
+ unsigned int line_number, const char *message,
+ ...)
+ __attribute__ ((__format__ (__printf__, 5, 6)));;
+# define error __error
+# define error_at_line __error_at_line
+
+# include <libio/iolibio.h>
+# define fflush(s) INTUSE(_IO_fflush) (s)
+# undef putc
+# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
+
+# include <bits/libc-lock.h>
+
+#else /* not _LIBC */
+
+# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
+# ifndef HAVE_DECL_STRERROR_R
+"this configure-time declaration test was not run"
+# endif
+char *strerror_r ();
+# endif
+
+/* The calling program should define program_name and set it to the
+ name of the executing program. */
+extern char *program_name;
+
+# if HAVE_STRERROR_R || defined strerror_r
+# define __strerror_r strerror_r
+# endif /* HAVE_STRERROR_R || defined strerror_r */
+#endif /* not _LIBC */
+
+static void
+print_errno_message (int errnum)
+{
+ char const *s;
+
+#if defined HAVE_STRERROR_R || _LIBC
+ char errbuf[1024];
+# if STRERROR_R_CHAR_P || _LIBC
+ s = __strerror_r (errnum, errbuf, sizeof errbuf);
+# else
+ if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
+ s = errbuf;
+ else
+ s = 0;
+# endif
+#else
+ s = strerror (errnum);
+#endif
+
+#if !_LIBC
+ if (! s)
+ s = _("Unknown system error");
+#endif
+
+#if _LIBC
+ __fxprintf (NULL, ": %s", s);
+#else
+ fprintf (stderr, ": %s", s);
+#endif
+}
+
+static void
+error_tail (int status, int errnum, const char *message, va_list args)
+{
+#if _LIBC
+ if (_IO_fwide (stderr, 0) > 0)
+ {
+# define ALLOCA_LIMIT 2000
+ size_t len = strlen (message) + 1;
+ wchar_t *wmessage = NULL;
+ mbstate_t st;
+ size_t res;
+ const char *tmp;
+ bool use_malloc = false;
+
+ while (1)
+ {
+ if (__libc_use_alloca (len * sizeof (wchar_t)))
+ wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
+ else
+ {
+ if (!use_malloc)
+ wmessage = NULL;
+
+ wchar_t *p = (wchar_t *) realloc (wmessage,
+ len * sizeof (wchar_t));
+ if (p == NULL)
+ {
+ free (wmessage);
+ fputws_unlocked (L"out of memory\n", stderr);
+ return;
+ }
+ wmessage = p;
+ use_malloc = true;
+ }
+
+ memset (&st, '\0', sizeof (st));
+ tmp = message;
+
+ res = mbsrtowcs (wmessage, &tmp, len, &st);
+ if (res != len)
+ break;
+
+ if (__builtin_expect (len >= SIZE_MAX / 2, 0))
+ {
+ /* This really should not happen if everything is fine. */
+ res = (size_t) -1;
+ break;
+ }
+
+ len *= 2;
+ }
+
+ if (res == (size_t) -1)
+ {
+ /* The string cannot be converted. */
+ if (use_malloc)
+ {
+ free (wmessage);
+ use_malloc = false;
+ }
+ wmessage = (wchar_t *) L"???";
+ }
+
+ __vfwprintf (stderr, wmessage, args);
+
+ if (use_malloc)
+ free (wmessage);
+ }
+ else
+#endif
+ vfprintf (stderr, message, args);
+ va_end (args);
+
+ ++error_message_count;
+ if (errnum)
+ print_errno_message (errnum);
+#if _LIBC
+ __fxprintf (NULL, "\n");
+#else
+ putc ('\n', stderr);
+#endif
+ fflush (stderr);
+ if (status)
+ exit (status);
+}
+
+
+/* Print the program name and error message MESSAGE, which is a printf-style
+ format string with optional args.
+ If ERRNUM is nonzero, print its corresponding system error message.
+ Exit with status STATUS if it is nonzero. */
+void
+error (int status, int errnum, const char *message, ...)
+{
+ va_list args;
+
+#if defined _LIBC && defined __libc_ptf_call
+ /* We do not want this call to be cut short by a thread
+ cancellation. Therefore disable cancellation for now. */
+ int state = PTHREAD_CANCEL_ENABLE;
+ __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
+ 0);
+#endif
+
+ fflush (stdout);
+#ifdef _LIBC
+ _IO_flockfile (stderr);
+#endif
+ if (error_print_progname)
+ (*error_print_progname) ();
+ else
+ {
+#if _LIBC
+ __fxprintf (NULL, "%s: ", program_name);
+#else
+ fprintf (stderr, "%s: ", program_name);
+#endif
+ }
+
+ va_start (args, message);
+ error_tail (status, errnum, message, args);
+
+#ifdef _LIBC
+ _IO_funlockfile (stderr);
+# ifdef __libc_ptf_call
+ __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+# endif
+#endif
+}
+
+/* Sometimes we want to have at most one error per line. This
+ variable controls whether this mode is selected or not. */
+int error_one_per_line;
+
+void
+error_at_line (int status, int errnum, const char *file_name,
+ unsigned int line_number, const char *message, ...)
+{
+ va_list args;
+
+ if (error_one_per_line)
+ {
+ static const char *old_file_name;
+ static unsigned int old_line_number;
+
+ if (old_line_number == line_number
+ && (file_name == old_file_name
+ || strcmp (old_file_name, file_name) == 0))
+ /* Simply return and print nothing. */
+ return;
+
+ old_file_name = file_name;
+ old_line_number = line_number;
+ }
+
+#if defined _LIBC && defined __libc_ptf_call
+ /* We do not want this call to be cut short by a thread
+ cancellation. Therefore disable cancellation for now. */
+ int state = PTHREAD_CANCEL_ENABLE;
+ __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
+ 0);
+#endif
+
+ fflush (stdout);
+#ifdef _LIBC
+ _IO_flockfile (stderr);
+#endif
+ if (error_print_progname)
+ (*error_print_progname) ();
+ else
+ {
+#if _LIBC
+ __fxprintf (NULL, "%s:", program_name);
+#else
+ fprintf (stderr, "%s:", program_name);
+#endif
+ }
+
+#if _LIBC
+ __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
+ file_name, line_number);
+#else
+ fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
+ file_name, line_number);
+#endif
+
+ va_start (args, message);
+ error_tail (status, errnum, message, args);
+
+#ifdef _LIBC
+ _IO_funlockfile (stderr);
+# ifdef __libc_ptf_call
+ __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+# endif
+#endif
+}
+
+#ifdef _LIBC
+/* Make the weak alias. */
+# undef error
+# undef error_at_line
+weak_alias (__error, error)
+weak_alias (__error_at_line, error_at_line)
+#endif
diff --git a/lib/error.h b/lib/error.h
new file mode 100644
index 0000000..6d49681
--- /dev/null
+++ b/lib/error.h
@@ -0,0 +1,65 @@
+/* Declaration for error-reporting function
+ Copyright (C) 1995, 1996, 1997, 2003, 2006, 2008 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _ERROR_H
+#define _ERROR_H 1
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+# define __attribute__(Spec) /* empty */
+# endif
+/* The __-protected variants of `format' and `printf' attributes
+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __format__ format
+# define __printf__ printf
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Print a message with `fprintf (stderr, FORMAT, ...)';
+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+ If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
+
+extern void error (int __status, int __errnum, const char *__format, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+
+extern void error_at_line (int __status, int __errnum, const char *__fname,
+ unsigned int __lineno, const char *__format, ...)
+ __attribute__ ((__format__ (__printf__, 5, 6)));
+
+/* If NULL, error will flush stdout, then print on stderr the program
+ name, a colon and a space. Otherwise, error will call this
+ function without parameters instead. */
+extern void (*error_print_progname) (void);
+
+/* This variable is incremented each time `error' is called. */
+extern unsigned int error_message_count;
+
+/* Sometimes we want to have at most one error per line. This
+ variable controls whether this mode is selected or not. */
+extern int error_one_per_line;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* error.h */
diff --git a/lib/exitfail.c b/lib/exitfail.c
new file mode 100644
index 0000000..6d1fe4a
--- /dev/null
+++ b/lib/exitfail.c
@@ -0,0 +1,24 @@
+/* Failure exit status
+
+ Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "exitfail.h"
+
+#include <stdlib.h>
+
+int volatile exit_failure = EXIT_FAILURE;
diff --git a/lib/exitfail.h b/lib/exitfail.h
new file mode 100644
index 0000000..713f259
--- /dev/null
+++ b/lib/exitfail.h
@@ -0,0 +1,18 @@
+/* Failure exit status
+
+ Copyright (C) 2002 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+extern int volatile exit_failure;
diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c
new file mode 100644
index 0000000..d2ad48f
--- /dev/null
+++ b/lib/file-has-acl.c
@@ -0,0 +1,520 @@
+/* Test whether a file has a nontrivial access control list.
+
+ Copyright (C) 2002-2003, 2005-2008 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert, Andreas Grünbacher, and Bruno Haible. */
+
+#include <config.h>
+
+#include "acl.h"
+
+#include "acl-internal.h"
+
+
+#if USE_ACL && HAVE_ACL_GET_FILE
+
+# if HAVE_ACL_TYPE_EXTENDED /* MacOS X */
+
+/* ACL is an ACL, from a file, stored as type ACL_TYPE_EXTENDED.
+ Return 1 if the given ACL is non-trivial.
+ Return 0 if it is trivial. */
+int
+acl_extended_nontrivial (acl_t acl)
+{
+ /* acl is non-trivial if it is non-empty. */
+ return (acl_entries (acl) > 0);
+}
+
+# else /* Linux, FreeBSD, IRIX, Tru64 */
+
+/* ACL is an ACL, from a file, stored as type ACL_TYPE_ACCESS.
+ Return 1 if the given ACL is non-trivial.
+ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode.
+ Return -1 and set errno upon failure to determine it. */
+int
+acl_access_nontrivial (acl_t acl)
+{
+ /* acl is non-trivial if it has some entries other than for "user::",
+ "group::", and "other::". Normally these three should be present
+ 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 */
+
+ acl_entry_t ace;
+ int at_end;
+
+ for (at_end = acl_get_entry (acl, ACL_FIRST_ENTRY, &ace);
+ !at_end;
+ at_end = acl_get_entry (acl, ACL_NEXT_ENTRY, &ace))
+ {
+ acl_tag_t tag;
+ if (acl_get_tag_type (ace, &tag) < 0)
+ return -1;
+ if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ || tag == ACL_OTHER))
+ return 1;
+ }
+ return 0;
+
+# else /* IRIX, Tru64 */
+# if HAVE_ACL_TO_SHORT_TEXT /* IRIX */
+ /* Don't use acl_get_entry: it is undocumented. */
+
+ int count = acl->acl_cnt;
+ int i;
+
+ for (i = 0; i < count; i++)
+ {
+ acl_entry_t ace = &acl->acl_entry[i];
+ acl_tag_t tag = ace->ae_tag;
+
+ if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ
+ || tag == ACL_OTHER_OBJ))
+ return 1;
+ }
+ return 0;
+
+# endif
+# if HAVE_ACL_FREE_TEXT /* Tru64 */
+ /* Don't use acl_get_entry: it takes only one argument and does not work. */
+
+ int count = acl->acl_num;
+ acl_entry_t ace;
+
+ for (ace = acl->acl_first; count > 0; ace = ace->next, count--)
+ {
+ acl_tag_t tag;
+ acl_perm_t perm;
+
+ tag = ace->entry->acl_type;
+ if (!(tag == ACL_USER_OBJ || tag == ACL_GROUP_OBJ || tag == ACL_OTHER))
+ return 1;
+
+ perm = ace->entry->acl_perm;
+ /* On Tru64, perm can also contain non-standard bits such as
+ PERM_INSERT, PERM_DELETE, PERM_MODIFY, PERM_LOOKUP, ... */
+ if ((perm & ~(ACL_READ | ACL_WRITE | ACL_EXECUTE)) != 0)
+ return 1;
+ }
+ return 0;
+
+# endif
+# endif
+}
+
+# endif
+
+
+#elif USE_ACL && HAVE_ACL && defined GETACL /* Solaris, Cygwin, not HP-UX */
+
+# if !defined ACL_NO_TRIVIAL /* Solaris <= 10, Cygwin */
+
+/* Test an ACL retrieved with GETACL.
+ Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
+ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
+int
+acl_nontrivial (int count, aclent_t *entries)
+{
+ int i;
+
+ for (i = 0; i < count; i++)
+ {
+ aclent_t *ace = &entries[i];
+
+ /* Note: If ace->a_type = USER_OBJ, ace->a_id is the st_uid from stat().
+ If ace->a_type = GROUP_OBJ, ace->a_id is the st_gid from stat().
+ We don't need to check ace->a_id in these cases. */
+ if (!(ace->a_type == USER_OBJ
+ || ace->a_type == GROUP_OBJ
+ || ace->a_type == OTHER_OBJ
+ /* Note: Cygwin does not return a CLASS_OBJ ("mask:") entry
+ sometimes. */
+ || ace->a_type == CLASS_OBJ))
+ return 1;
+ }
+ return 0;
+}
+
+# ifdef ACE_GETACL
+
+/* Test an ACL retrieved with ACE_GETACL.
+ Return 1 if the given ACL, consisting of COUNT entries, is non-trivial.
+ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
+int
+acl_ace_nontrivial (int count, ace_t *entries)
+{
+ int i;
+
+ /* The flags in the ace_t structure changed in a binary incompatible way
+ when ACL_NO_TRIVIAL etc. were introduced in <sys/acl.h> version 1.15.
+ How to distinguish the two conventions at runtime?
+ In the old convention, usually three ACEs have a_flags = ACE_OWNER /
+ ACE_GROUP / ACE_OTHER, in the range 0x0100..0x0400. In the new
+ convention, these values are not used. */
+ int old_convention = 0;
+
+ for (i = 0; i < count; i++)
+ if (entries[i].a_flags & (ACE_OWNER | ACE_GROUP | ACE_OTHER))
+ {
+ old_convention = 1;
+ break;
+ }
+
+ if (old_convention)
+ /* Running on Solaris 10. */
+ for (i = 0; i < count; i++)
+ {
+ ace_t *ace = &entries[i];
+
+ /* Note:
+ If ace->a_flags = ACE_OWNER, ace->a_who is the st_uid from stat().
+ If ace->a_flags = ACE_GROUP, ace->a_who is the st_gid from stat().
+ We don't need to check ace->a_who in these cases. */
+ if (!(ace->a_type == ALLOW
+ && (ace->a_flags == ACE_OWNER
+ || ace->a_flags == ACE_GROUP
+ || ace->a_flags == ACE_OTHER)))
+ return 1;
+ }
+ else
+ /* Running on Solaris 10 (newer version) or Solaris 11. */
+ for (i = 0; i < count; i++)
+ {
+ ace_t *ace = &entries[i];
+
+ if (!(ace->a_type == ACE_ACCESS_ALLOWED_ACE_TYPE
+ && (ace->a_flags == NEW_ACE_OWNER
+ || ace->a_flags
+ == (NEW_ACE_GROUP | NEW_ACE_IDENTIFIER_GROUP)
+ || ace->a_flags == ACE_EVERYONE)
+ && (ace->a_access_mask
+ & ~(NEW_ACE_READ_DATA | NEW_ACE_WRITE_DATA | NEW_ACE_EXECUTE))
+ == 0))
+ return 1;
+ }
+
+ return 0;
+}
+
+# endif
+
+# endif
+
+#elif USE_ACL && HAVE_GETACL /* HP-UX */
+
+/* Return 1 if the given ACL is non-trivial.
+ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
+int
+acl_nontrivial (int count, struct acl_entry *entries, struct stat *sb)
+{
+ int i;
+
+ for (i = 0; i < count; i++)
+ {
+ struct acl_entry *ace = &entries[i];
+
+ if (!((ace->uid == sb->st_uid && ace->gid == ACL_NSGROUP)
+ || (ace->uid == ACL_NSUSER && ace->gid == sb->st_gid)
+ || (ace->uid == ACL_NSUSER && ace->gid == ACL_NSGROUP)))
+ return 1;
+ }
+ return 0;
+}
+
+#elif USE_ACL && HAVE_ACLX_GET && 0 /* AIX */
+
+/* TODO */
+
+#elif USE_ACL && HAVE_STATACL /* older AIX */
+
+/* Return 1 if the given ACL is non-trivial.
+ Return 0 if it is trivial, i.e. equivalent to a simple stat() mode. */
+int
+acl_nontrivial (struct acl *a)
+{
+ /* The normal way to iterate through an ACL is like this:
+ struct acl_entry *ace;
+ for (ace = a->acl_ext; ace != acl_last (a); ace = acl_nxt (ace))
+ {
+ struct ace_id *aei;
+ switch (ace->ace_type)
+ {
+ case ACC_PERMIT:
+ case ACC_DENY:
+ case ACC_SPECIFY:
+ ...;
+ }
+ for (aei = ace->ace_id; aei != id_last (ace); aei = id_nxt (aei))
+ ...
+ }
+ */
+ return (acl_last (a) != a->acl_ext ? 1 : 0);
+}
+
+#endif
+
+
+/* Return 1 if NAME has a nontrivial access control list, 0 if NAME
+ only has no or a base access control list, and -1 (setting errno)
+ on error. SB must be set to the stat buffer of FILE. */
+
+int
+file_has_acl (char const *name, struct stat const *sb)
+{
+#if USE_ACL
+ if (! S_ISLNK (sb->st_mode))
+ {
+# if HAVE_ACL_GET_FILE
+
+ /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */
+ /* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
+ int ret;
+
+ if (HAVE_ACL_EXTENDED_FILE) /* Linux */
+ {
+ /* On Linux, acl_extended_file is an optimized function: It only
+ makes two calls to getxattr(), one for ACL_TYPE_ACCESS, one for
+ ACL_TYPE_DEFAULT. */
+ ret = acl_extended_file (name);
+ }
+ else /* FreeBSD, MacOS X, IRIX, Tru64 */
+ {
+# if HAVE_ACL_TYPE_EXTENDED /* MacOS X */
+ /* On MacOS X, acl_get_file (name, ACL_TYPE_ACCESS)
+ and acl_get_file (name, ACL_TYPE_DEFAULT)
+ always return NULL / EINVAL. There is no point in making
+ these two useless calls. The real ACL is retrieved through
+ acl_get_file (name, ACL_TYPE_EXTENDED). */
+ acl_t acl = acl_get_file (name, ACL_TYPE_EXTENDED);
+ if (acl)
+ {
+ ret = acl_extended_nontrivial (acl);
+ acl_free (acl);
+ }
+ else
+ ret = -1;
+# else /* FreeBSD, IRIX, Tru64 */
+ acl_t acl = acl_get_file (name, ACL_TYPE_ACCESS);
+ if (acl)
+ {
+ int saved_errno;
+
+ ret = acl_access_nontrivial (acl);
+ saved_errno = errno;
+ acl_free (acl);
+ errno = saved_errno;
+# if HAVE_ACL_FREE_TEXT /* Tru64 */
+ /* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always
+ returns NULL with errno not set. There is no point in
+ making this call. */
+# else /* FreeBSD, IRIX */
+ /* On Linux, FreeBSD, IRIX, acl_get_file (name, ACL_TYPE_ACCESS)
+ and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory
+ either both succeed or both fail; it depends on the
+ filesystem. Therefore there is no point in making the second
+ call if the first one already failed. */
+ if (ret == 0 && S_ISDIR (sb->st_mode))
+ {
+ acl = acl_get_file (name, ACL_TYPE_DEFAULT);
+ if (acl)
+ {
+ ret = (0 < acl_entries (acl));
+ acl_free (acl);
+ }
+ else
+ ret = -1;
+ }
+# endif
+ }
+ else
+ ret = -1;
+# endif
+ }
+ if (ret < 0)
+ return ACL_NOT_WELL_SUPPORTED (errno) ? 0 : -1;
+ return ret;
+
+# elif HAVE_ACL && defined GETACLCNT /* Solaris, Cygwin, not HP-UX */
+
+# if defined ACL_NO_TRIVIAL
+
+ /* Solaris 10 (newer version), which has additional API declared in
+ <sys/acl.h> (acl_t) and implemented in libsec (acl_set, acl_trivial,
+ acl_fromtext, ...). */
+ return acl_trivial (name);
+
+# else /* Solaris, Cygwin, general case */
+
+ /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versions
+ of Unixware. The acl() call returns the access and default ACL both
+ at once. */
+ int count;
+ {
+ aclent_t *entries;
+
+ for (;;)
+ {
+ count = acl (name, GETACLCNT, 0, NULL);
+
+ if (count < 0)
+ {
+ if (errno == ENOSYS || errno == ENOTSUP)
+ break;
+ else
+ return -1;
+ }
+
+ if (count == 0)
+ break;
+
+ /* Don't use MIN_ACL_ENTRIES: It's set to 4 on Cygwin, but Cygwin
+ returns only 3 entries for files with no ACL. But this is safe:
+ If there are more than 4 entries, there cannot be only the
+ "user::", "group::", "other:", and "mask:" entries. */
+ if (count > 4)
+ return 1;
+
+ entries = (aclent_t *) malloc (count * sizeof (aclent_t));
+ if (entries == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+ if (acl (name, GETACL, count, entries) == count)
+ {
+ if (acl_nontrivial (count, entries))
+ {
+ free (entries);
+ return 1;
+ }
+ free (entries);
+ break;
+ }
+ /* Huh? The number of ACL entries changed since the last call.
+ Repeat. */
+ free (entries);
+ }
+ }
+
+# ifdef ACE_GETACL
+ /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
+ file systems (whereas the other ones are used in UFS file systems). */
+ {
+ ace_t *entries;
+
+ for (;;)
+ {
+ count = acl (name, ACE_GETACLCNT, 0, NULL);
+
+ if (count < 0)
+ {
+ if (errno == ENOSYS || errno == EINVAL)
+ break;
+ else
+ return -1;
+ }
+
+ if (count == 0)
+ break;
+
+ /* If there are more than 3 entries, there cannot be only the
+ ACE_OWNER, ACE_GROUP, ACE_OTHER entries. */
+ if (count > 3)
+ return 1;
+
+ entries = (ace_t *) malloc (count * sizeof (ace_t));
+ if (entries == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+ if (acl (name, ACE_GETACL, count, entries) == count)
+ {
+ if (acl_ace_nontrivial (count, entries))
+ {
+ free (entries);
+ return 1;
+ }
+ free (entries);
+ break;
+ }
+ /* Huh? The number of ACL entries changed since the last call.
+ Repeat. */
+ free (entries);
+ }
+ }
+# endif
+
+ return 0;
+# endif
+
+# elif HAVE_GETACL /* HP-UX */
+
+ int count;
+ struct acl_entry entries[NACLENTRIES];
+
+ for (;;)
+ {
+ count = getacl (name, 0, NULL);
+
+ if (count < 0)
+ return (errno == ENOSYS || errno == EOPNOTSUPP ? 0 : -1);
+
+ if (count == 0)
+ return 0;
+
+ if (count > NACLENTRIES)
+ /* If NACLENTRIES cannot be trusted, use dynamic memory
+ allocation. */
+ abort ();
+
+ /* If there are more than 3 entries, there cannot be only the
+ (uid,%), (%,gid), (%,%) entries. */
+ if (count > 3)
+ return 1;
+
+ if (getacl (name, count, entries) == count)
+ {
+ struct stat statbuf;
+
+ if (stat (name, &statbuf) < 0)
+ return -1;
+
+ return acl_nontrivial (count, entries, &statbuf);
+ }
+ /* Huh? The number of ACL entries changed since the last call.
+ Repeat. */
+ }
+
+# elif HAVE_ACLX_GET && 0 /* AIX */
+
+ /* TODO: use aclx_get(), and then? */
+
+# elif HAVE_STATACL /* older AIX */
+
+ union { struct acl a; char room[4096]; } u;
+
+ if (statacl (name, STX_NORMAL, &u.a, sizeof (u)) < 0)
+ return -1;
+
+ return acl_nontrivial (&u.a);
+
+# endif
+ }
+#endif
+
+ return 0;
+}
diff --git a/lib/getdelim.c b/lib/getdelim.c
new file mode 100644
index 0000000..4cd1c11
--- /dev/null
+++ b/lib/getdelim.c
@@ -0,0 +1,137 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* getdelim.c --- Implementation of replacement getdelim function.
+ Copyright (C) 1994, 1996, 1997, 1998, 2001, 2003, 2005, 2006, 2007, 2008 Free
+ Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 3, or (at
+ your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301, USA. */
+
+/* Ported from glibc by Simon Josefsson. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <limits.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+#ifndef SSIZE_MAX
+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
+#endif
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+# define getc_maybe_unlocked(fp) getc(fp)
+#elif !HAVE_FLOCKFILE || !HAVE_FUNLOCKFILE || !HAVE_DECL_GETC_UNLOCKED
+# undef flockfile
+# undef funlockfile
+# define flockfile(x) ((void) 0)
+# define funlockfile(x) ((void) 0)
+# define getc_maybe_unlocked(fp) getc(fp)
+#else
+# define getc_maybe_unlocked(fp) getc_unlocked(fp)
+#endif
+
+/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and
+ NUL-terminate it). *LINEPTR is a pointer returned from malloc (or
+ NULL), pointing to *N characters of space. It is realloc'ed as
+ necessary. Returns the number of characters read (not including
+ the null terminator), or -1 on error or EOF. */
+
+ssize_t
+getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
+{
+ ssize_t result;
+ size_t cur_len = 0;
+
+ if (lineptr == NULL || n == NULL || fp == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ flockfile (fp);
+
+ if (*lineptr == NULL || *n == 0)
+ {
+ char *new_lineptr;
+ *n = 120;
+ new_lineptr = (char *) realloc (*lineptr, *n);
+ if (new_lineptr == NULL)
+ {
+ result = -1;
+ goto unlock_return;
+ }
+ *lineptr = new_lineptr;
+ }
+
+ for (;;)
+ {
+ int i;
+
+ i = getc_maybe_unlocked (fp);
+ if (i == EOF)
+ {
+ result = -1;
+ break;
+ }
+
+ /* Make enough space for len+1 (for final NUL) bytes. */
+ if (cur_len + 1 >= *n)
+ {
+ size_t needed_max =
+ SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX;
+ size_t needed = 2 * *n + 1; /* Be generous. */
+ char *new_lineptr;
+
+ if (needed_max < needed)
+ needed = needed_max;
+ if (cur_len + 1 >= needed)
+ {
+ result = -1;
+ errno = EOVERFLOW;
+ goto unlock_return;
+ }
+
+ new_lineptr = (char *) realloc (*lineptr, needed);
+ if (new_lineptr == NULL)
+ {
+ result = -1;
+ goto unlock_return;
+ }
+
+ *lineptr = new_lineptr;
+ *n = needed;
+ }
+
+ (*lineptr)[cur_len] = i;
+ cur_len++;
+
+ if (i == delimiter)
+ break;
+ }
+ (*lineptr)[cur_len] = '\0';
+ result = cur_len ? cur_len : result;
+
+ unlock_return:
+ funlockfile (fp); /* doesn't set errno */
+
+ return result;
+}
diff --git a/lib/getline.c b/lib/getline.c
index defaeda..6be04ef 100644
--- a/lib/getline.c
+++ b/lib/getline.c
@@ -1,110 +1,31 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* getline.c --- Implementation of replacement getline function.
+ Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
-#undef _GNU_SOURCE
+ This program is free software; you can redistribute 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.
-#include <sys/types.h>
-#include <stdio.h>
-
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#else
-# include <string.h>
-#endif /* HAVE_STRINGS_H */
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif /* HAVE_STDLIB_H */
+ 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. */
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
+/* Written by Simon Josefsson. */
-#include <limits.h>
-#include <errno.h>
+#include <config.h>
-/* Read up to (and including) a '\n' from STREAM into *LINEPTR
- (and null-terminate it). *LINEPTR is a pointer returned from malloc (or
- NULL), pointing to *N characters of space. It is realloc'd as
- necessary. Returns the number of characters read (not including the
- null terminator), or -1 on error or EOF. */
+#include <stdio.h>
-size_t
-getline (lineptr, n, stream)
- char **lineptr;
- size_t *n;
- FILE *stream;
+ssize_t
+getline (char **lineptr, size_t *n, FILE *stream)
{
- char *line, *p;
- long size, copy;
-
- if (lineptr == NULL || n == NULL)
- {
- errno = EINVAL;
- return (size_t) -1;
- }
-
- if (ferror (stream))
- return (size_t) -1;
-
- /* Make sure we have a line buffer to start with. */
- if (*lineptr == NULL || *n < 2) /* !seen and no buf yet need 2 chars. */
- {
-#ifndef MAX_CANON
-#define MAX_CANON 256
-#endif
- if (!*lineptr)
- line = (char *) malloc (MAX_CANON);
- else
- line = (char *) realloc (*lineptr, MAX_CANON);
- if (line == NULL)
- return (size_t) -1;
- *lineptr = line;
- *n = MAX_CANON;
- }
-
- line = *lineptr;
- size = *n;
-
- copy = size;
- p = line;
-
- while (1)
- {
- long len;
-
- while (--copy > 0)
- {
- register int c = getc (stream);
- if (c == EOF)
- goto lose;
- else if ((*p++ = c) == '\n')
- goto win;
- }
-
- /* Need to enlarge the line buffer. */
- len = p - line;
- size *= 2;
- line = (char *) realloc (line, size);
- if (line == NULL)
- goto lose;
- *lineptr = line;
- *n = size;
- p = line + len;
- copy = size - len;
- }
-
- lose:
- if (p == *lineptr)
- return (size_t) -1;
-
- /* Return a partial line since we got an error in the middle. */
- win:
-#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(MSDOS) || defined(__EMX__)
- if (p - 2 >= *lineptr && p[-2] == '\r')
- p[-2] = p[-1], --p;
-#endif
- *p = '\0';
- return p - *lineptr;
+ return getdelim (lineptr, n, '\n', stream);
}
diff --git a/lib/getopt.c b/lib/getopt.c
index d7719dc..f1e6d1f 100644
--- a/lib/getopt.c
+++ b/lib/getopt.c
@@ -2,17 +2,14 @@
NOTE: getopt is now part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it!
+ Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001,2002,2003,2004,2006,2008
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
- Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98
- Free Software Foundation, Inc.
-
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -20,91 +17,49 @@
GNU 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 <http://www.gnu.org/licenses/>. */
-/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
- Ditto for AIX 3.2 and <stdlib.h>. */
-#ifndef _NO_PROTO
-# define _NO_PROTO
-#endif
-
-#ifdef HAVE_CONFIG_H
+#ifndef _LIBC
# include <config.h>
#endif
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-# ifndef const
-# define const
-# endif
-#endif
+#include "getopt.h"
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-# include <gnu-versions.h>
-# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-# define ELIDE_CODE
-# endif
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
#endif
-#ifndef ELIDE_CODE
-
-
-/* This needs to come after some library #include
- to get __GNU_LIBRARY__ defined. */
-#ifdef __GNU_LIBRARY__
-/* Don't include stdlib.h for non-GNU C libraries because some of them
- contain conflicting prototypes for getopt. */
-# include <stdlib.h>
-# include <unistd.h>
-#endif /* GNU C library. */
-
-#ifdef VMS
-# include <unixlib.h>
-# if HAVE_STRING_H - 0
-# include <string.h>
-# endif
+#if defined _LIBC && defined USE_IN_LIBIO
+# include <wchar.h>
#endif
-#ifndef _
-/* This is for other GNU distributions with internationalized messages.
- When compiling libc, the _ macro is predefined. */
-# ifdef HAVE_LIBINTL_H
-# include <libintl.h>
-# define _(msgid) gettext (msgid)
-# else
-# define _(msgid) (msgid)
-# endif
+#ifndef attribute_hidden
+# define attribute_hidden
#endif
-/* This version of `getopt' appears to the caller like standard Unix `getopt'
- but it behaves differently for the user, since it allows the user
- to intersperse the options with the other arguments.
+/* Unlike standard Unix `getopt', functions like `getopt_long'
+ let the user intersperse the options with the other arguments.
- As `getopt' works, it permutes the elements of ARGV so that,
+ As `getopt_long' works, it permutes the elements of ARGV so that,
when it is done, all the options precede everything else. Thus
all application programs are extended to handle flexible argument order.
- Setting the environment variable POSIXLY_CORRECT disables permutation.
- Then the behavior is completely standard.
+ Using `getopt' or setting the environment variable POSIXLY_CORRECT
+ disables permutation.
+ Then the application's behavior is completely standard.
GNU application programs can use a third alternative mode in which
they can distinguish the relative order of options and other arguments. */
-#include "getopt.h"
+#include "getopt_int.h"
/* For communication from `getopt' to the caller.
When `getopt' finds an option that takes an argument,
@@ -112,7 +67,7 @@
Also, when `ordering' is RETURN_IN_ORDER,
each non-option ARGV-element is returned here. */
-char *optarg = NULL;
+char *optarg;
/* Index in ARGV of the next element to be scanned.
This is used for communication to and from the caller
@@ -129,21 +84,6 @@ char *optarg = NULL;
/* 1003.2 says this must be 1 before any call. */
int optind = 1;
-/* Formerly, initialization of getopt depended on optind==0, which
- causes problems with re-calling getopt as programs generally don't
- know that. */
-
-int __getopt_initialized = 0;
-
-/* The next char to be scanned in the option-element
- in which the last option character we returned was found.
- This allows us to pick up the scan where we left off.
-
- If this is zero, or a null string, it means resume the scan
- by advancing to the next ARGV-element. */
-
-static char *nextchar;
-
/* Callers store zero here to inhibit the error message
for unrecognized options. */
@@ -155,135 +95,41 @@ int opterr = 1;
int optopt = '?';
-/* Describe how to deal with options that follow non-option ARGV-elements.
-
- If the caller did not specify anything,
- the default is REQUIRE_ORDER if the environment variable
- POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
- REQUIRE_ORDER means don't recognize them as options;
- stop option processing when the first non-option is seen.
- This is what Unix does.
- This mode of operation is selected by either setting the environment
- variable POSIXLY_CORRECT, or using `+' as the first character
- of the list of option characters.
+/* Keep a global copy of all internal members of getopt_data. */
- PERMUTE is the default. We permute the contents of ARGV as we scan,
- so that eventually all the non-options are at the end. This allows options
- to be given in any order, even with programs that were not written to
- expect this.
+static struct _getopt_data getopt_data;
- RETURN_IN_ORDER is an option available to programs that were written
- to expect options and other ARGV-elements in any order and that care about
- the ordering of the two. We describe each non-option ARGV-element
- as if it were the argument of an option with character code 1.
- Using `-' as the first character of the list of option characters
- selects this mode of operation.
-
- The special argument `--' forces an end of option-scanning regardless
- of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- `--' can cause `getopt' to return -1 with `optind' != ARGC. */
-
-static enum
-{
- REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
-} ordering;
-
-/* Value of POSIXLY_CORRECT environment variable. */
-static char *posixly_correct;
-#ifdef __GNU_LIBRARY__
-/* We want to avoid inclusion of string.h with non-GNU libraries
- because there are many ways it can cause trouble.
- On some systems, it contains special magic macros that don't work
- in GCC. */
-# include <string.h>
-# define my_index strchr
-#else
-
-/* Avoid depending on library functions or files
- whose names are inconsistent. */
-
-#ifndef getenv
+#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV
extern char *getenv ();
#endif
-#ifndef strncmp
-extern int strncmp ();
-#endif
-
-static char *
-my_index (str, chr)
- const char *str;
- int chr;
-{
- while (*str)
- {
- if (*str == chr)
- return (char *) str;
- str++;
- }
- return 0;
-}
-
-/* If using GCC, we can safely declare strlen this way.
- If not using GCC, it is ok not to declare it. */
-#ifdef __GNUC__
-/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
- That was relevant to code that was here before. */
-# if (!defined __STDC__ || !__STDC__) && !defined strlen
-/* gcc with -traditional declares the built-in strlen to return int,
- and has done so at least since version 2.4.5. -- rms. */
-extern int strlen (const char *);
-# endif /* not __STDC__ */
-#endif /* __GNUC__ */
-
-#endif /* not __GNU_LIBRARY__ */
-/* Handle permutation of arguments. */
-
-/* Describe the part of ARGV that contains non-options that have
- been skipped. `first_nonopt' is the index in ARGV of the first of them;
- `last_nonopt' is the index after the last of them. */
-
-static int first_nonopt;
-static int last_nonopt;
-
#ifdef _LIBC
+/* Stored original parameters.
+ XXX This is no good solution. We should rather copy the args so
+ that we can compare them later. But we must not use malloc(3). */
+extern int __libc_argc;
+extern char **__libc_argv;
+
/* Bash 2.0 gives us an environment variable containing flags
indicating ARGV elements that should not be considered arguments. */
+# ifdef USE_NONOPTION_FLAGS
/* Defined in getopt_init.c */
extern char *__getopt_nonoption_flags;
+# endif
-static int nonoption_flags_max_len;
-static int nonoption_flags_len;
-
-static int original_argc;
-static char *const *original_argv;
-
-/* Make sure the environment variable bash 2.0 puts in the environment
- is valid for the getopt call we must make sure that the ARGV passed
- to getopt is that one passed to the process. */
-static void
-__attribute__ ((unused))
-store_args_and_env (int argc, char *const *argv)
-{
- /* XXX This is no good solution. We should rather copy the args so
- that we can compare them later. But we must not use malloc(3). */
- original_argc = argc;
- original_argv = argv;
-}
-# ifdef text_set_element
-text_set_element (__libc_subinit, store_args_and_env);
-# endif /* text_set_element */
-
-# define SWAP_FLAGS(ch1, ch2) \
- if (nonoption_flags_len > 0) \
+# ifdef USE_NONOPTION_FLAGS
+# define SWAP_FLAGS(ch1, ch2) \
+ if (d->__nonoption_flags_len > 0) \
{ \
char __tmp = __getopt_nonoption_flags[ch1]; \
__getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
__getopt_nonoption_flags[ch2] = __tmp; \
}
+# else
+# define SWAP_FLAGS(ch1, ch2)
+# endif
#else /* !_LIBC */
# define SWAP_FLAGS(ch1, ch2)
#endif /* _LIBC */
@@ -297,17 +143,12 @@ text_set_element (__libc_subinit, store_args_and_env);
`first_nonopt' and `last_nonopt' are relocated so that they describe
the new indices of the non-options in ARGV after they are moved. */
-#if defined __STDC__ && __STDC__
-static void exchange (char **);
-#endif
-
static void
-exchange (argv)
- char **argv;
+exchange (char **argv, struct _getopt_data *d)
{
- int bottom = first_nonopt;
- int middle = last_nonopt;
- int top = optind;
+ int bottom = d->__first_nonopt;
+ int middle = d->__last_nonopt;
+ int top = d->optind;
char *tem;
/* Exchange the shorter segment with the far end of the longer segment.
@@ -315,23 +156,23 @@ exchange (argv)
It leaves the longer segment in the right place overall,
but it consists of two parts that need to be swapped next. */
-#ifdef _LIBC
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
/* First make sure the handling of the `__getopt_nonoption_flags'
string can work normally. Our top argument must be in the range
of the string. */
- if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
+ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
{
/* We must extend the array. The user plays games with us and
presents new arguments. */
char *new_str = malloc (top + 1);
if (new_str == NULL)
- nonoption_flags_len = nonoption_flags_max_len = 0;
+ d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
else
{
memset (__mempcpy (new_str, __getopt_nonoption_flags,
- nonoption_flags_max_len),
- '\0', top + 1 - nonoption_flags_max_len);
- nonoption_flags_max_len = top + 1;
+ d->__nonoption_flags_max_len),
+ '\0', top + 1 - d->__nonoption_flags_max_len);
+ d->__nonoption_flags_max_len = top + 1;
__getopt_nonoption_flags = new_str;
}
}
@@ -377,76 +218,71 @@ exchange (argv)
/* Update records for the slots the non-options now occupy. */
- first_nonopt += (optind - last_nonopt);
- last_nonopt = optind;
+ d->__first_nonopt += (d->optind - d->__last_nonopt);
+ d->__last_nonopt = d->optind;
}
/* Initialize the internal data when the first call is made. */
-#if defined __STDC__ && __STDC__
-static const char *_getopt_initialize (int, char *const *, const char *);
-#endif
static const char *
-_getopt_initialize (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
+_getopt_initialize (int argc, char **argv, const char *optstring,
+ int posixly_correct, struct _getopt_data *d)
{
/* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped
non-option ARGV-elements is empty. */
- first_nonopt = last_nonopt = optind;
+ d->__first_nonopt = d->__last_nonopt = d->optind;
- nextchar = NULL;
+ d->__nextchar = NULL;
- posixly_correct = getenv ("POSIXLY_CORRECT");
+ d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT");
/* Determine how to handle the ordering of options and nonoptions. */
if (optstring[0] == '-')
{
- ordering = RETURN_IN_ORDER;
+ d->__ordering = RETURN_IN_ORDER;
++optstring;
}
else if (optstring[0] == '+')
{
- ordering = REQUIRE_ORDER;
+ d->__ordering = REQUIRE_ORDER;
++optstring;
}
- else if (posixly_correct != NULL)
- ordering = REQUIRE_ORDER;
+ else if (d->__posixly_correct)
+ d->__ordering = REQUIRE_ORDER;
else
- ordering = PERMUTE;
+ d->__ordering = PERMUTE;
-#ifdef _LIBC
- if (posixly_correct == NULL
- && argc == original_argc && argv == original_argv)
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ if (!d->__posixly_correct
+ && argc == __libc_argc && argv == __libc_argv)
{
- if (nonoption_flags_max_len == 0)
+ if (d->__nonoption_flags_max_len == 0)
{
if (__getopt_nonoption_flags == NULL
|| __getopt_nonoption_flags[0] == '\0')
- nonoption_flags_max_len = -1;
+ d->__nonoption_flags_max_len = -1;
else
{
const char *orig_str = __getopt_nonoption_flags;
- int len = nonoption_flags_max_len = strlen (orig_str);
- if (nonoption_flags_max_len < argc)
- nonoption_flags_max_len = argc;
+ int len = d->__nonoption_flags_max_len = strlen (orig_str);
+ if (d->__nonoption_flags_max_len < argc)
+ d->__nonoption_flags_max_len = argc;
__getopt_nonoption_flags =
- (char *) malloc (nonoption_flags_max_len);
+ (char *) malloc (d->__nonoption_flags_max_len);
if (__getopt_nonoption_flags == NULL)
- nonoption_flags_max_len = -1;
+ d->__nonoption_flags_max_len = -1;
else
memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
- '\0', nonoption_flags_max_len - len);
+ '\0', d->__nonoption_flags_max_len - len);
}
}
- nonoption_flags_len = nonoption_flags_max_len;
+ d->__nonoption_flags_len = d->__nonoption_flags_max_len;
}
else
- nonoption_flags_len = 0;
+ d->__nonoption_flags_len = 0;
#endif
return optstring;
@@ -494,10 +330,6 @@ _getopt_initialize (argc, argv, optstring)
`flag' field is nonzero, the value of the option's `val' field
if the `flag' field is zero.
- The elements of ARGV aren't really const, because we permute them.
- But we pretend they're const in the prototype to be compatible
- with other systems.
-
LONGOPTS is a vector of `struct option' terminated by an
element containing a name which is zero.
@@ -506,66 +338,74 @@ _getopt_initialize (argc, argv, optstring)
recent call.
If LONG_ONLY is nonzero, '-' as well as '--' can introduce
- long-named options. */
+ long-named options.
+
+ If POSIXLY_CORRECT is nonzero, behave as if the POSIXLY_CORRECT
+ environment variable were set. */
int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
- int argc;
- char *const *argv;
- const char *optstring;
- const struct option *longopts;
- int *longind;
- int long_only;
+_getopt_internal_r (int argc, char **argv, const char *optstring,
+ const struct option *longopts, int *longind,
+ int long_only, int posixly_correct, struct _getopt_data *d)
{
- optarg = NULL;
+ int print_errors = d->opterr;
+ if (optstring[0] == ':')
+ print_errors = 0;
+
+ if (argc < 1)
+ return -1;
+
+ d->optarg = NULL;
- if (optind == 0 || !__getopt_initialized)
+ if (d->optind == 0 || !d->__initialized)
{
- if (optind == 0)
- optind = 1; /* Don't scan ARGV[0], the program name. */
- optstring = _getopt_initialize (argc, argv, optstring);
- __getopt_initialized = 1;
+ if (d->optind == 0)
+ d->optind = 1; /* Don't scan ARGV[0], the program name. */
+ optstring = _getopt_initialize (argc, argv, optstring,
+ posixly_correct, d);
+ d->__initialized = 1;
}
/* Test whether ARGV[optind] points to a non-option argument.
Either it does not have option syntax, or there is an environment flag
from the shell indicating it is not an option. The later information
is only used when the used in the GNU libc. */
-#ifdef _LIBC
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \
- || (optind < nonoption_flags_len \
- && __getopt_nonoption_flags[optind] == '1'))
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
+ || (d->optind < d->__nonoption_flags_len \
+ && __getopt_nonoption_flags[d->optind] == '1'))
#else
-# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
#endif
- if (nextchar == NULL || *nextchar == '\0')
+ if (d->__nextchar == NULL || *d->__nextchar == '\0')
{
/* Advance to the next ARGV-element. */
/* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
moved back by the user (who may also have changed the arguments). */
- if (last_nonopt > optind)
- last_nonopt = optind;
- if (first_nonopt > optind)
- first_nonopt = optind;
+ if (d->__last_nonopt > d->optind)
+ d->__last_nonopt = d->optind;
+ if (d->__first_nonopt > d->optind)
+ d->__first_nonopt = d->optind;
- if (ordering == PERMUTE)
+ if (d->__ordering == PERMUTE)
{
/* If we have just processed some options following some non-options,
exchange them so that the options come first. */
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (last_nonopt != optind)
- first_nonopt = optind;
+ if (d->__first_nonopt != d->__last_nonopt
+ && d->__last_nonopt != d->optind)
+ exchange ((char **) argv, d);
+ else if (d->__last_nonopt != d->optind)
+ d->__first_nonopt = d->optind;
/* Skip any additional non-options
and extend the range of non-options previously skipped. */
- while (optind < argc && NONOPTION_P)
- optind++;
- last_nonopt = optind;
+ while (d->optind < argc && NONOPTION_P)
+ d->optind++;
+ d->__last_nonopt = d->optind;
}
/* The special ARGV-element `--' means premature end of options.
@@ -573,28 +413,29 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
then exchange with previous non-options as if it were an option,
then skip everything else like a non-option. */
- if (optind != argc && !strcmp (argv[optind], "--"))
+ if (d->optind != argc && !strcmp (argv[d->optind], "--"))
{
- optind++;
+ d->optind++;
- if (first_nonopt != last_nonopt && last_nonopt != optind)
- exchange ((char **) argv);
- else if (first_nonopt == last_nonopt)
- first_nonopt = optind;
- last_nonopt = argc;
+ if (d->__first_nonopt != d->__last_nonopt
+ && d->__last_nonopt != d->optind)
+ exchange ((char **) argv, d);
+ else if (d->__first_nonopt == d->__last_nonopt)
+ d->__first_nonopt = d->optind;
+ d->__last_nonopt = argc;
- optind = argc;
+ d->optind = argc;
}
/* If we have done all the ARGV-elements, stop the scan
and back over any non-options that we skipped and permuted. */
- if (optind == argc)
+ if (d->optind == argc)
{
/* Set the next-arg-index to point at the non-options
that we previously skipped, so the caller will digest them. */
- if (first_nonopt != last_nonopt)
- optind = first_nonopt;
+ if (d->__first_nonopt != d->__last_nonopt)
+ d->optind = d->__first_nonopt;
return -1;
}
@@ -603,17 +444,17 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
if (NONOPTION_P)
{
- if (ordering == REQUIRE_ORDER)
+ if (d->__ordering == REQUIRE_ORDER)
return -1;
- optarg = argv[optind++];
+ d->optarg = argv[d->optind++];
return 1;
}
/* We have found another option-ARGV-element.
Skip the initial punctuation. */
- nextchar = (argv[optind] + 1
- + (longopts != NULL && argv[optind][1] == '-'));
+ d->__nextchar = (argv[d->optind] + 1
+ + (longopts != NULL && argv[d->optind][1] == '-'));
}
/* Decode the current option-ARGV-element. */
@@ -632,8 +473,9 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
This distinction seems to be the most useful approach. */
if (longopts != NULL
- && (argv[optind][1] == '-'
- || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
+ && (argv[d->optind][1] == '-'
+ || (long_only && (argv[d->optind][2]
+ || !strchr (optstring, argv[d->optind][1])))))
{
char *nameend;
const struct option *p;
@@ -643,15 +485,15 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
int indfound = -1;
int option_index;
- for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
+ for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
/* Do nothing. */ ;
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
+ if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
{
- if ((unsigned int) (nameend - nextchar)
+ if ((unsigned int) (nameend - d->__nextchar)
== (unsigned int) strlen (p->name))
{
/* Exact match found. */
@@ -666,68 +508,160 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
pfound = p;
indfound = option_index;
}
- else
+ else if (long_only
+ || pfound->has_arg != p->has_arg
+ || pfound->flag != p->flag
+ || pfound->val != p->val)
/* Second or later nonexact match found. */
ambig = 1;
}
if (ambig && !exact)
{
- if (opterr)
- fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
- argv[0], argv[optind]);
- nextchar += strlen (nextchar);
- optind++;
- optopt = 0;
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"),
+ argv[0], argv[d->optind]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
+ argv[0], argv[d->optind]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optind++;
+ d->optopt = 0;
return '?';
}
if (pfound != NULL)
{
option_index = indfound;
- optind++;
+ d->optind++;
if (*nameend)
{
/* Don't test has_arg with >, because some C compilers don't
allow it to be used on enums. */
if (pfound->has_arg)
- optarg = nameend + 1;
+ d->optarg = nameend + 1;
else
{
- if (opterr)
- if (argv[optind - 1][1] == '-')
- /* --option */
- fprintf (stderr,
- _("%s: option `--%s' doesn't allow an argument\n"),
- argv[0], pfound->name);
- else
- /* +option or -option */
- fprintf (stderr,
- _("%s: option `%c%s' doesn't allow an argument\n"),
- argv[0], argv[optind - 1][0], pfound->name);
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+ if (argv[d->optind - 1][1] == '-')
+ {
+ /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("\
+%s: option `--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+#else
+ fprintf (stderr, _("\
+%s: option `--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+#endif
+ }
+ else
+ {
+ /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("\
+%s: option `%c%s' doesn't allow an argument\n"),
+ argv[0], argv[d->optind - 1][0],
+ pfound->name);
+#else
+ fprintf (stderr, _("\
+%s: option `%c%s' doesn't allow an argument\n"),
+ argv[0], argv[d->optind - 1][0],
+ pfound->name);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
- nextchar += strlen (nextchar);
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
- optopt = pfound->val;
+ free (buf);
+ }
+#endif
+ }
+
+ d->__nextchar += strlen (d->__nextchar);
+
+ d->optopt = pfound->val;
return '?';
}
}
else if (pfound->has_arg == 1)
{
- if (optind < argc)
- optarg = argv[optind++];
+ if (d->optind < argc)
+ d->optarg = argv[d->optind++];
else
{
- if (opterr)
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
- nextchar += strlen (nextchar);
- optopt = pfound->val;
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option `%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optopt = pfound->val;
return optstring[0] == ':' ? ':' : '?';
}
}
- nextchar += strlen (nextchar);
+ d->__nextchar += strlen (d->__nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)
@@ -742,23 +676,59 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
or the option starts with '--' or is not a valid short
option, then it's an error.
Otherwise interpret it as a short option. */
- if (!long_only || argv[optind][1] == '-'
- || my_index (optstring, *nextchar) == NULL)
+ if (!long_only || argv[d->optind][1] == '-'
+ || strchr (optstring, *d->__nextchar) == NULL)
{
- if (opterr)
+ if (print_errors)
{
- if (argv[optind][1] == '-')
- /* --option */
- fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
- argv[0], nextchar);
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+ if (argv[d->optind][1] == '-')
+ {
+ /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"),
+ argv[0], d->__nextchar);
+#else
+ fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
+ argv[0], d->__nextchar);
+#endif
+ }
else
- /* +option or -option */
- fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
- argv[0], argv[optind][0], nextchar);
+ {
+ /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"),
+ argv[0], argv[d->optind][0], d->__nextchar);
+#else
+ fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
+ argv[0], argv[d->optind][0], d->__nextchar);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#endif
}
- nextchar = (char *) "";
- optind++;
- optopt = 0;
+ d->__nextchar = (char *) "";
+ d->optind++;
+ d->optopt = 0;
return '?';
}
}
@@ -766,26 +736,60 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
/* Look at and handle the next short option-character. */
{
- char c = *nextchar++;
- char *temp = my_index (optstring, c);
+ char c = *d->__nextchar++;
+ char *temp = strchr (optstring, c);
/* Increment `optind' when we start to process its last character. */
- if (*nextchar == '\0')
- ++optind;
+ if (*d->__nextchar == '\0')
+ ++d->optind;
if (temp == NULL || c == ':')
{
- if (opterr)
+ if (print_errors)
{
- if (posixly_correct)
- /* 1003.2 specifies the format of this message. */
- fprintf (stderr, _("%s: illegal option -- %c\n"),
- argv[0], c);
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+ if (d->__posixly_correct)
+ {
+ /* 1003.2 specifies the format of this message. */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: illegal option -- %c\n"),
+ argv[0], c);
+#else
+ fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c);
+#endif
+ }
else
- fprintf (stderr, _("%s: invalid option -- %c\n"),
- argv[0], c);
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: invalid option -- %c\n"),
+ argv[0], c);
+#else
+ fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#endif
}
- optopt = c;
+ d->optopt = c;
return '?';
}
/* Convenience. Treat POSIX -W foo same as long option --foo */
@@ -800,22 +804,43 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
int option_index;
/* This is an option that requires an argument. */
- if (*nextchar != '\0')
+ if (*d->__nextchar != '\0')
{
- optarg = nextchar;
+ d->optarg = d->__nextchar;
/* If we end this ARGV-element by taking the rest as an arg,
we must advance to the next element now. */
- optind++;
+ d->optind++;
}
- else if (optind == argc)
+ else if (d->optind == argc)
{
- if (opterr)
+ if (print_errors)
{
/* 1003.2 specifies the format of this message. */
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf,
+ _("%s: option requires an argument -- %c\n"),
+ argv[0], c) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
fprintf (stderr, _("%s: option requires an argument -- %c\n"),
argv[0], c);
+#endif
}
- optopt = c;
+ d->optopt = c;
if (optstring[0] == ':')
c = ':';
else
@@ -823,22 +848,23 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
return c;
}
else
- /* We already incremented `optind' once;
+ /* We already incremented `d->optind' once;
increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
+ d->optarg = argv[d->optind++];
/* optarg is now the argument, see if it's in the
table of longopts. */
- for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
+ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
+ nameend++)
/* Do nothing. */ ;
/* Test all long options for either exact match
or abbreviated matches. */
for (p = longopts, option_index = 0; p->name; p++, option_index++)
- if (!strncmp (p->name, nextchar, nameend - nextchar))
+ if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
{
- if ((unsigned int) (nameend - nextchar) == strlen (p->name))
+ if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name))
{
/* Exact match found. */
pfound = p;
@@ -858,11 +884,33 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
}
if (ambig && !exact)
{
- if (opterr)
- fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
- argv[0], argv[optind]);
- nextchar += strlen (nextchar);
- optind++;
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"),
+ argv[0], argv[d->optind]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
+ argv[0], argv[d->optind]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optind++;
return '?';
}
if (pfound != NULL)
@@ -873,33 +921,81 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
/* Don't test has_arg with >, because some C compilers don't
allow it to be used on enums. */
if (pfound->has_arg)
- optarg = nameend + 1;
+ d->optarg = nameend + 1;
else
{
- if (opterr)
- fprintf (stderr, _("\
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option `-W %s' doesn't allow an argument\n"),
+ argv[0], pfound->name) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("\
%s: option `-W %s' doesn't allow an argument\n"),
- argv[0], pfound->name);
+ argv[0], pfound->name);
+#endif
+ }
- nextchar += strlen (nextchar);
+ d->__nextchar += strlen (d->__nextchar);
return '?';
}
}
else if (pfound->has_arg == 1)
{
- if (optind < argc)
- optarg = argv[optind++];
+ if (d->optind < argc)
+ d->optarg = argv[d->optind++];
else
{
- if (opterr)
- fprintf (stderr,
- _("%s: option `%s' requires an argument\n"),
- argv[0], argv[optind - 1]);
- nextchar += strlen (nextchar);
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option `%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option `%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
return optstring[0] == ':' ? ':' : '?';
}
}
- nextchar += strlen (nextchar);
+ d->__nextchar += strlen (d->__nextchar);
if (longind != NULL)
*longind = option_index;
if (pfound->flag)
@@ -909,7 +1005,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
}
return pfound->val;
}
- nextchar = NULL;
+ d->__nextchar = NULL;
return 'W'; /* Let the application handle it. */
}
if (temp[1] == ':')
@@ -917,35 +1013,56 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
if (temp[2] == ':')
{
/* This is an option that accepts an argument optionally. */
- if (*nextchar != '\0')
+ if (*d->__nextchar != '\0')
{
- optarg = nextchar;
- optind++;
+ d->optarg = d->__nextchar;
+ d->optind++;
}
else
- optarg = NULL;
- nextchar = NULL;
+ d->optarg = NULL;
+ d->__nextchar = NULL;
}
else
{
/* This is an option that requires an argument. */
- if (*nextchar != '\0')
+ if (*d->__nextchar != '\0')
{
- optarg = nextchar;
+ d->optarg = d->__nextchar;
/* If we end this ARGV-element by taking the rest as an arg,
we must advance to the next element now. */
- optind++;
+ d->optind++;
}
- else if (optind == argc)
+ else if (d->optind == argc)
{
- if (opterr)
+ if (print_errors)
{
/* 1003.2 specifies the format of this message. */
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option requires an argument -- %c\n"),
+ argv[0], c) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
fprintf (stderr,
- _("%s: option requires an argument -- %c\n"),
- argv[0], c);
+ _("%s: option requires an argument -- %c\n"),
+ argv[0], c);
+#endif
}
- optopt = c;
+ d->optopt = c;
if (optstring[0] == ':')
c = ':';
else
@@ -954,8 +1071,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
else
/* We already incremented `optind' once;
increment it again when taking next ARGV-elt as argument. */
- optarg = argv[optind++];
- nextchar = NULL;
+ d->optarg = argv[d->optind++];
+ d->__nextchar = NULL;
}
}
return c;
@@ -963,18 +1080,40 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
}
int
-getopt (argc, argv, optstring)
- int argc;
- char *const *argv;
- const char *optstring;
+_getopt_internal (int argc, char **argv, const char *optstring,
+ const struct option *longopts, int *longind,
+ int long_only, int posixly_correct)
+{
+ int result;
+
+ getopt_data.optind = optind;
+ getopt_data.opterr = opterr;
+
+ result = _getopt_internal_r (argc, argv, optstring, longopts, longind,
+ long_only, posixly_correct, &getopt_data);
+
+ optind = getopt_data.optind;
+ optarg = getopt_data.optarg;
+ optopt = getopt_data.optopt;
+
+ return result;
+}
+
+/* glibc gets a LSB-compliant getopt.
+ Standalone applications get a POSIX-compliant getopt. */
+#if _LIBC
+enum { POSIXLY_CORRECT = 0 };
+#else
+enum { POSIXLY_CORRECT = 1 };
+#endif
+
+int
+getopt (int argc, char *const *argv, const char *optstring)
{
- return _getopt_internal (argc, argv, optstring,
- (const struct option *) 0,
- (int *) 0,
- 0);
+ return _getopt_internal (argc, (char **) argv, optstring, NULL, NULL, 0,
+ POSIXLY_CORRECT);
}
-#endif /* Not ELIDE_CODE. */
#ifdef TEST
@@ -982,9 +1121,7 @@ getopt (argc, argv, optstring)
the above definition of `getopt'. */
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
int digit_optind = 0;
diff --git a/lib/getopt.h b/lib/getopt.h
deleted file mode 100644
index 7056f3d..0000000
--- a/lib/getopt.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/* Declarations for getopt.
- Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
-
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifndef _GETOPT_H
-#define _GETOPT_H 1
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-extern char *optarg;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns -1, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-extern int optind;
-
-/* Callers store zero here to inhibit the error message `getopt' prints
- for unrecognized options. */
-
-extern int opterr;
-
-/* Set to an option character which was unrecognized. */
-
-extern int optopt;
-
-/* Describe the long-named options requested by the application.
- The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
- of `struct option' terminated by an element containing a name which is
- zero.
-
- The field `has_arg' is:
- no_argument (or 0) if the option does not take an argument,
- required_argument (or 1) if the option requires an argument,
- optional_argument (or 2) if the option takes an optional argument.
-
- If the field `flag' is not NULL, it points to a variable that is set
- to the value given in the field `val' when the option is found, but
- left unchanged if the option is not found.
-
- To have a long-named option do something other than set an `int' to
- a compiled-in constant, such as set a value from `optarg', set the
- option's `flag' field to zero and its `val' field to a nonzero
- value (the equivalent single-letter option character, if there is
- one). For long options that have a zero `flag' field, `getopt'
- returns the contents of the `val' field. */
-
-struct option
-{
-#if defined (__STDC__) && __STDC__
- const char *name;
-#else
- char *name;
-#endif
- /* has_arg can't be an enum because some compilers complain about
- type mismatches in all the code that assumes it is an int. */
- int has_arg;
- int *flag;
- int val;
-};
-
-/* Names for the values of the `has_arg' field of `struct option'. */
-
-#define no_argument 0
-#define required_argument 1
-#define optional_argument 2
-
-#if defined (__STDC__) && __STDC__
-#ifdef __GNU_LIBRARY__
-/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in stdlib.h. To avoid compilation
- errors, only prototype getopt for the GNU C library. */
-extern int getopt (int argc, char *const *argv, const char *shortopts);
-#else /* not __GNU_LIBRARY__ */
-extern int getopt ();
-#endif /* __GNU_LIBRARY__ */
-extern int getopt_long (int argc, char *const *argv, const char *shortopts,
- const struct option *longopts, int *longind);
-extern int getopt_long_only (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind);
-
-/* Internal only. Users should not call this directly. */
-extern int _getopt_internal (int argc, char *const *argv,
- const char *shortopts,
- const struct option *longopts, int *longind,
- int long_only);
-#else /* not __STDC__ */
-extern int getopt ();
-extern int getopt_long ();
-extern int getopt_long_only ();
-
-extern int _getopt_internal ();
-#endif /* __STDC__ */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* getopt.h */
diff --git a/lib/getopt.in.h b/lib/getopt.in.h
new file mode 100644
index 0000000..d2d3e6e
--- /dev/null
+++ b/lib/getopt.in.h
@@ -0,0 +1,225 @@
+/* Declarations for getopt.
+ Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2005,2006,2007
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GETOPT_H
+
+#ifndef __need_getopt
+# define _GETOPT_H 1
+#endif
+
+/* Standalone applications should #define __GETOPT_PREFIX to an
+ identifier that prefixes the external functions and variables
+ defined in this header. When this happens, include the
+ headers that might declare getopt so that they will not cause
+ confusion if included after this file. Then systematically rename
+ identifiers so that they do not collide with the system functions
+ and variables. Renaming avoids problems with some compilers and
+ linkers. */
+#if defined __GETOPT_PREFIX && !defined __need_getopt
+# include <stdlib.h>
+# include <stdio.h>
+# include <unistd.h>
+# undef __need_getopt
+# undef getopt
+# undef getopt_long
+# undef getopt_long_only
+# undef optarg
+# undef opterr
+# undef optind
+# undef optopt
+# define __GETOPT_CONCAT(x, y) x ## y
+# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
+# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
+# define getopt __GETOPT_ID (getopt)
+# define getopt_long __GETOPT_ID (getopt_long)
+# define getopt_long_only __GETOPT_ID (getopt_long_only)
+# define optarg __GETOPT_ID (optarg)
+# define opterr __GETOPT_ID (opterr)
+# define optind __GETOPT_ID (optind)
+# define optopt __GETOPT_ID (optopt)
+#endif
+
+/* Standalone applications get correct prototypes for getopt_long and
+ getopt_long_only; they declare "char **argv". libc uses prototypes
+ with "char *const *argv" that are incorrect because getopt_long and
+ getopt_long_only can permute argv; this is required for backward
+ compatibility (e.g., for LSB 2.0.1).
+
+ This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
+ but it caused redefinition warnings if both unistd.h and getopt.h were
+ included, since unistd.h includes getopt.h having previously defined
+ __need_getopt.
+
+ The only place where __getopt_argv_const is used is in definitions
+ of getopt_long and getopt_long_only below, but these are visible
+ only if __need_getopt is not defined, so it is quite safe to rewrite
+ the conditional as follows:
+*/
+#if !defined __need_getopt
+# if defined __GETOPT_PREFIX
+# define __getopt_argv_const /* empty */
+# else
+# define __getopt_argv_const const
+# endif
+#endif
+
+/* If __GNU_LIBRARY__ is not already defined, either we are being used
+ standalone, or this is the first header included in the source file.
+ If we are being used with glibc, we need to include <features.h>, but
+ that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
+ not defined, include <ctype.h>, which will pull in <features.h> for us
+ if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
+ doesn't flood the namespace with stuff the way some other headers do.) */
+#if !defined __GNU_LIBRARY__
+# include <ctype.h>
+#endif
+
+#ifndef __THROW
+# ifndef __GNUC_PREREQ
+# define __GNUC_PREREQ(maj, min) (0)
+# endif
+# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# define __THROW throw ()
+# else
+# define __THROW
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized. */
+
+extern int optopt;
+
+#ifndef __need_getopt
+/* Describe the long-named options requested by the application.
+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+ of `struct option' terminated by an element containing a name which is
+ zero.
+
+ The field `has_arg' is:
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
+
+ If the field `flag' is not NULL, it points to a variable that is set
+ to the value given in the field `val' when the option is found, but
+ left unchanged if the option is not found.
+
+ To have a long-named option do something other than set an `int' to
+ a compiled-in constant, such as set a value from `optarg', set the
+ option's `flag' field to zero and its `val' field to a nonzero
+ value (the equivalent single-letter option character, if there is
+ one). For long options that have a zero `flag' field, `getopt'
+ returns the contents of the `val' field. */
+
+struct option
+{
+ const char *name;
+ /* has_arg can't be an enum because some compilers complain about
+ type mismatches in all the code that assumes it is an int. */
+ int has_arg;
+ int *flag;
+ int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'. */
+
+# define no_argument 0
+# define required_argument 1
+# define optional_argument 2
+#endif /* need getopt */
+
+
+/* Get definitions and prototypes for functions to process the
+ arguments in ARGV (ARGC of them, minus the program name) for
+ options given in OPTS.
+
+ Return the option character from OPTS just read. Return -1 when
+ there are no more options. For unrecognized options, or options
+ missing arguments, `optopt' is set to the option letter, and '?' is
+ returned.
+
+ The OPTS string is a list of characters which are recognized option
+ letters, optionally followed by colons, specifying that that letter
+ takes an argument, to be placed in `optarg'.
+
+ If a letter in OPTS is followed by two colons, its argument is
+ optional. This behavior is specific to the GNU `getopt'.
+
+ The argument `--' causes premature termination of argument
+ scanning, explicitly telling `getopt' that there are no more
+ options.
+
+ If OPTS begins with `-', then non-option arguments are treated as
+ arguments to the option '\1'. This behavior is specific to the GNU
+ `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in
+ the environment, then do not permute arguments. */
+
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ __THROW;
+
+#ifndef __need_getopt
+extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind)
+ __THROW;
+extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind)
+ __THROW;
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Make sure we later can get all the definitions and declarations. */
+#undef __need_getopt
+
+#endif /* getopt.h */
diff --git a/lib/getopt1.c b/lib/getopt1.c
index d79d9f2..ba115c4 100644
--- a/lib/getopt1.c
+++ b/lib/getopt1.c
@@ -1,14 +1,12 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
+ Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98,2004,2006,2009
Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,45 +14,18 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "getopt.h"
-
-#if !defined __STDC__ || !__STDC__
-/* This is a separate conditional since some stdc systems
- reject `defined (const)'. */
-#ifndef const
-#define const
-#endif
+#ifdef _LIBC
+# include <getopt.h>
+#else
+# include <config.h>
+# include "getopt.h"
#endif
+#include "getopt_int.h"
#include <stdio.h>
-/* Comment out all this code if we are using the GNU C Library, and are not
- actually compiling the library itself. This code is part of the GNU C
- Library, but also included in many other GNU distributions. Compiling
- and linking in this code is a waste when using the GNU C library
- (especially if it is a shared library). Rather than having every GNU
- program understand `configure --with-gnu-libc' and omit the object files,
- it is simpler to just do this in the source for each such file. */
-
-#define GETOPT_INTERFACE_VERSION 2
-#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
-#include <gnu-versions.h>
-#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
-#define ELIDE_CODE
-#endif
-#endif
-
-#ifndef ELIDE_CODE
-
-
/* This needs to come after some library #include
to get __GNU_LIBRARY__ defined. */
#ifdef __GNU_LIBRARY__
@@ -66,14 +37,20 @@
#endif
int
-getopt_long (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
+getopt_long (int argc, char *__getopt_argv_const *argv, const char *options,
+ const struct option *long_options, int *opt_index)
+{
+ return _getopt_internal (argc, (char **) argv, options, long_options,
+ opt_index, 0, 0);
+}
+
+int
+_getopt_long_r (int argc, char **argv, const char *options,
+ const struct option *long_options, int *opt_index,
+ struct _getopt_data *d)
{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
+ return _getopt_internal_r (argc, argv, options, long_options, opt_index,
+ 0, 0, d);
}
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
@@ -82,27 +59,30 @@ getopt_long (argc, argv, options, long_options, opt_index)
instead. */
int
-getopt_long_only (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
+getopt_long_only (int argc, char *__getopt_argv_const *argv,
+ const char *options,
+ const struct option *long_options, int *opt_index)
{
- return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
+ return _getopt_internal (argc, (char **) argv, options, long_options,
+ opt_index, 1, 0);
}
+int
+_getopt_long_only_r (int argc, char **argv, const char *options,
+ const struct option *long_options, int *opt_index,
+ struct _getopt_data *d)
+{
+ return _getopt_internal_r (argc, argv, options, long_options, opt_index,
+ 1, 0, d);
+}
-#endif /* Not ELIDE_CODE. */
#ifdef TEST
#include <stdio.h>
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int c;
int digit_optind = 0;
@@ -111,7 +91,7 @@ main (argc, argv)
{
int this_option_optind = optind ? optind : 1;
int option_index = 0;
- static struct option long_options[] =
+ static const struct option long_options[] =
{
{"add", 1, 0, 0},
{"append", 0, 0, 0},
diff --git a/lib/getopt_int.h b/lib/getopt_int.h
new file mode 100644
index 0000000..3c6628b
--- /dev/null
+++ b/lib/getopt_int.h
@@ -0,0 +1,130 @@
+/* Internal declarations for getopt.
+ Copyright (C) 1989-1994,1996-1999,2001,2003,2004
+ Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GETOPT_INT_H
+#define _GETOPT_INT_H 1
+
+extern int _getopt_internal (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ int __long_only, int __posixly_correct);
+
+
+/* Reentrant versions which can handle parsing multiple argument
+ vectors at the same time. */
+
+/* Data type for reentrant functions. */
+struct _getopt_data
+{
+ /* These have exactly the same meaning as the corresponding global
+ variables, except that they are used for the reentrant
+ versions of getopt. */
+ int optind;
+ int opterr;
+ int optopt;
+ char *optarg;
+
+ /* Internal members. */
+
+ /* True if the internal members have been initialized. */
+ int __initialized;
+
+ /* The next char to be scanned in the option-element
+ in which the last option character we returned was found.
+ This allows us to pick up the scan where we left off.
+
+ If this is zero, or a null string, it means resume the scan
+ by advancing to the next ARGV-element. */
+ char *__nextchar;
+
+ /* Describe how to deal with options that follow non-option ARGV-elements.
+
+ If the caller did not specify anything,
+ the default is REQUIRE_ORDER if the environment variable
+ POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+ REQUIRE_ORDER means don't recognize them as options;
+ stop option processing when the first non-option is seen.
+ This is what Unix does.
+ This mode of operation is selected by either setting the environment
+ variable POSIXLY_CORRECT, or using `+' as the first character
+ of the list of option characters, or by calling getopt.
+
+ PERMUTE is the default. We permute the contents of ARGV as we
+ scan, so that eventually all the non-options are at the end.
+ This allows options to be given in any order, even with programs
+ that were not written to expect this.
+
+ RETURN_IN_ORDER is an option available to programs that were
+ written to expect options and other ARGV-elements in any order
+ and that care about the ordering of the two. We describe each
+ non-option ARGV-element as if it were the argument of an option
+ with character code 1. Using `-' as the first character of the
+ list of option characters selects this mode of operation.
+
+ The special argument `--' forces an end of option-scanning regardless
+ of the value of `ordering'. In the case of RETURN_IN_ORDER, only
+ `--' can cause `getopt' to return -1 with `optind' != ARGC. */
+
+ enum
+ {
+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+ } __ordering;
+
+ /* If the POSIXLY_CORRECT environment variable is set
+ or getopt was called. */
+ int __posixly_correct;
+
+
+ /* Handle permutation of arguments. */
+
+ /* Describe the part of ARGV that contains non-options that have
+ been skipped. `first_nonopt' is the index in ARGV of the first
+ of them; `last_nonopt' is the index after the last of them. */
+
+ int __first_nonopt;
+ int __last_nonopt;
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ int __nonoption_flags_max_len;
+ int __nonoption_flags_len;
+# endif
+};
+
+/* The initializer is necessary to set OPTIND and OPTERR to their
+ default values and to clear the initialization flag. */
+#define _GETOPT_DATA_INITIALIZER { 1, 1 }
+
+extern int _getopt_internal_r (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ int __long_only, int __posixly_correct,
+ struct _getopt_data *__data);
+
+extern int _getopt_long_r (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ struct _getopt_data *__data);
+
+extern int _getopt_long_only_r (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts,
+ int *__longind,
+ struct _getopt_data *__data);
+
+#endif /* getopt_int.h */
diff --git a/lib/gettext.h b/lib/gettext.h
new file mode 100644
index 0000000..89b4feb
--- /dev/null
+++ b/lib/gettext.h
@@ -0,0 +1,272 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Convenience header for conditional use of GNU <libintl.h>.
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option. */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions. */
+# include <libintl.h>
+
+/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
+ the gettext() and ngettext() macros. This is an alternative to calling
+ textdomain(), and is useful for libraries. */
+# ifdef DEFAULT_TEXT_DOMAIN
+# undef gettext
+# define gettext(Msgid) \
+ dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
+# undef ngettext
+# define ngettext(Msgid1, Msgid2, N) \
+ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
+# endif
+
+#else
+
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+ chokes if dcgettext is defined as a macro. So include it now, to make
+ later inclusions of <locale.h> a NOP. We don't include <libintl.h>
+ as well because people using "gettext.h" will not include <libintl.h>,
+ and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+ is OK. */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
+/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
+ <libintl.h>, which chokes if dcgettext is defined as a macro. So include
+ it now, to make later inclusions of <libintl.h> a NOP. */
+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+# include <cstdlib>
+# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+# include <libintl.h>
+# endif
+#endif
+
+/* Disabled NLS.
+ The casts to 'const char *' serve the purpose of producing warnings
+ for invalid uses of the value returned from these functions.
+ On pre-ANSI systems without 'const', the config.h file is supposed to
+ contain "#define const". */
+# define gettext(Msgid) ((const char *) (Msgid))
+# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# define dcgettext(Domainname, Msgid, Category) \
+ ((void) (Category), dgettext (Domainname, Msgid))
+# define ngettext(Msgid1, Msgid2, N) \
+ ((N) == 1 \
+ ? ((void) (Msgid2), (const char *) (Msgid1)) \
+ : ((void) (Msgid1), (const char *) (Msgid2)))
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+ ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+ ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
+# define textdomain(Domainname) ((const char *) (Domainname))
+# define bindtextdomain(Domainname, Dirname) \
+ ((void) (Domainname), (const char *) (Dirname))
+# define bind_textdomain_codeset(Domainname, Codeset) \
+ ((void) (Domainname), (const char *) (Codeset))
+
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+ extraction of messages, but does not call gettext(). The run-time
+ translation is done at a different place in the code.
+ The argument, String, should be a literal string. Concatenated strings
+ and other string expressions won't work.
+ The macro's expansion is not parenthesized, so that it is suitable as
+ initializer for static 'char[]' or 'const char[]' variables. */
+#define gettext_noop(String) String
+
+/* The separator between msgctxt and msgid in a .mo file. */
+#define GETTEXT_CONTEXT_GLUE "\004"
+
+/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
+ MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
+ short and rarely need to change.
+ The letter 'p' stands for 'particular' or 'special'. */
+#ifdef DEFAULT_TEXT_DOMAIN
+# define pgettext(Msgctxt, Msgid) \
+ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#else
+# define pgettext(Msgctxt, Msgid) \
+ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#endif
+#define dpgettext(Domainname, Msgctxt, Msgid) \
+ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
+ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
+#ifdef DEFAULT_TEXT_DOMAIN
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#else
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#endif
+#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
+ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+pgettext_aux (const char *domain,
+ const char *msg_ctxt_id, const char *msgid,
+ int category)
+{
+ const char *translation = dcgettext (domain, msg_ctxt_id, category);
+ if (translation == msg_ctxt_id)
+ return msgid;
+ else
+ return translation;
+}
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+npgettext_aux (const char *domain,
+ const char *msg_ctxt_id, const char *msgid,
+ const char *msgid_plural, unsigned long int n,
+ int category)
+{
+ const char *translation =
+ dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+ if (translation == msg_ctxt_id || translation == msgid_plural)
+ return (n == 1 ? msgid : msgid_plural);
+ else
+ return translation;
+}
+
+/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
+ can be arbitrary expressions. But for string literals these macros are
+ less efficient than those above. */
+
+#include <string.h>
+
+#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
+ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
+ /* || __STDC_VERSION__ >= 199901L */ )
+
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+#include <stdlib.h>
+#endif
+
+#define pgettext_expr(Msgctxt, Msgid) \
+ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
+#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
+ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcpgettext_expr (const char *domain,
+ const char *msgctxt, const char *msgid,
+ int category)
+{
+ size_t msgctxt_len = strlen (msgctxt) + 1;
+ size_t msgid_len = strlen (msgid) + 1;
+ const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+ char buf[1024];
+ char *msg_ctxt_id =
+ (msgctxt_len + msgid_len <= sizeof (buf)
+ ? buf
+ : (char *) malloc (msgctxt_len + msgid_len));
+ if (msg_ctxt_id != NULL)
+#endif
+ {
+ memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+ msg_ctxt_id[msgctxt_len - 1] = '\004';
+ memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+ translation = dcgettext (domain, msg_ctxt_id, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ if (msg_ctxt_id != buf)
+ free (msg_ctxt_id);
+#endif
+ if (translation != msg_ctxt_id)
+ return translation;
+ }
+ return msgid;
+}
+
+#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
+ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcnpgettext_expr (const char *domain,
+ const char *msgctxt, const char *msgid,
+ const char *msgid_plural, unsigned long int n,
+ int category)
+{
+ size_t msgctxt_len = strlen (msgctxt) + 1;
+ size_t msgid_len = strlen (msgid) + 1;
+ const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+ char buf[1024];
+ char *msg_ctxt_id =
+ (msgctxt_len + msgid_len <= sizeof (buf)
+ ? buf
+ : (char *) malloc (msgctxt_len + msgid_len));
+ if (msg_ctxt_id != NULL)
+#endif
+ {
+ memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+ msg_ctxt_id[msgctxt_len - 1] = '\004';
+ memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+ translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ if (msg_ctxt_id != buf)
+ free (msg_ctxt_id);
+#endif
+ if (!(translation == msg_ctxt_id || translation == msgid_plural))
+ return translation;
+ }
+ return (n == 1 ? msgid : msgid_plural);
+}
+
+#endif /* _LIBGETTEXT_H */
diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c
new file mode 100644
index 0000000..1d977b1
--- /dev/null
+++ b/lib/gettimeofday.c
@@ -0,0 +1,147 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Provide gettimeofday for systems that don't have it or for which it's broken.
+
+ Copyright (C) 2001, 2002, 2003, 2005, 2006, 2007 Free Software
+ Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* written by Jim Meyering */
+
+#include <config.h>
+
+/* Specification. */
+#include <sys/time.h>
+
+#include <time.h>
+
+#if HAVE_SYS_TIMEB_H
+# include <sys/timeb.h>
+#endif
+
+#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
+
+/* Work around the bug in some systems whereby gettimeofday clobbers
+ the static buffer that localtime uses for its return value. The
+ gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
+ this problem. The tzset replacement is necessary for at least
+ Solaris 2.5, 2.5.1, and 2.6. */
+
+static struct tm tm_zero_buffer;
+static struct tm *localtime_buffer_addr = &tm_zero_buffer;
+
+#undef localtime
+extern struct tm *localtime (time_t const *);
+
+#undef gmtime
+extern struct tm *gmtime (time_t const *);
+
+/* This is a wrapper for localtime. It is used only on systems for which
+ gettimeofday clobbers the static buffer used for localtime's result.
+
+ On the first call, record the address of the static buffer that
+ localtime uses for its result. */
+
+struct tm *
+rpl_localtime (time_t const *timep)
+{
+ struct tm *tm = localtime (timep);
+
+ if (localtime_buffer_addr == &tm_zero_buffer)
+ localtime_buffer_addr = tm;
+
+ return tm;
+}
+
+/* Same as above, since gmtime and localtime use the same buffer. */
+struct tm *
+rpl_gmtime (time_t const *timep)
+{
+ struct tm *tm = gmtime (timep);
+
+ if (localtime_buffer_addr == &tm_zero_buffer)
+ localtime_buffer_addr = tm;
+
+ return tm;
+}
+
+#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */
+
+#if TZSET_CLOBBERS_LOCALTIME
+
+#undef tzset
+extern void tzset (void);
+
+/* This is a wrapper for tzset, for systems on which tzset may clobber
+ the static buffer used for localtime's result. */
+void
+rpl_tzset (void)
+{
+ /* Save and restore the contents of the buffer used for localtime's
+ result around the call to tzset. */
+ struct tm save = *localtime_buffer_addr;
+ tzset ();
+ *localtime_buffer_addr = save;
+}
+#endif
+
+/* This is a wrapper for gettimeofday. It is used only on systems
+ that lack this function, or whose implementation of this function
+ causes problems. */
+
+int
+rpl_gettimeofday (struct timeval *restrict tv, void *restrict tz)
+{
+#undef gettimeofday
+#if HAVE_GETTIMEOFDAY
+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
+ /* Save and restore the contents of the buffer used for localtime's
+ result around the call to gettimeofday. */
+ struct tm save = *localtime_buffer_addr;
+# endif
+
+ int result = gettimeofday (tv, tz);
+
+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
+ *localtime_buffer_addr = save;
+# endif
+
+ return result;
+
+#else
+
+# if HAVE__FTIME
+
+ struct _timeb timebuf;
+ _ftime (&timebuf);
+ tv->tv_sec = timebuf.time;
+ tv->tv_usec = timebuf.millitm * 1000;
+
+# else
+
+# if !defined OK_TO_USE_1S_CLOCK
+# error "Only 1-second nominal clock resolution found. Is that intended?" \
+ "If so, compile with the -DOK_TO_USE_1S_CLOCK option."
+# endif
+ tv->tv_sec = time (NULL);
+ tv->tv_usec = 0;
+
+# endif
+
+ return 0;
+
+#endif
+}
diff --git a/lib/gnulib.mk b/lib/gnulib.mk
new file mode 100644
index 0000000..462d885
--- /dev/null
+++ b/lib/gnulib.mk
@@ -0,0 +1,1052 @@
+## DO NOT EDIT! GENERATED AUTOMATICALLY!
+## Process this file with automake to produce Makefile.in.
+# Copyright (C) 2002-2009 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libsed --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-libtool --macro-prefix=gl acl alloca btowc extensions getline getopt gettext localcharset mbrlen mbrtowc mbsinit mkstemp obstack pathmax regex stat-macros stdbool strerror strverscmp unlocked-io verify wcrtomb wctob
+
+AUTOMAKE_OPTIONS = 1.5 gnits
+
+SUBDIRS =
+noinst_HEADERS =
+noinst_LIBRARIES =
+noinst_LTLIBRARIES =
+EXTRA_DIST =
+BUILT_SOURCES =
+SUFFIXES =
+MOSTLYCLEANFILES = core *.stackdump
+MOSTLYCLEANDIRS =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+AM_CPPFLAGS =
+AM_CFLAGS =
+
+noinst_LIBRARIES += libsed.a
+
+libsed_a_SOURCES =
+libsed_a_LIBADD = $(gl_LIBOBJS)
+libsed_a_DEPENDENCIES = $(gl_LIBOBJS)
+EXTRA_libsed_a_SOURCES =
+
+## begin gnulib module acl
+
+libsed_a_SOURCES += set-mode-acl.c copy-acl.c file-has-acl.c
+
+EXTRA_DIST += acl-internal.h acl.h acl_entries.c
+
+EXTRA_libsed_a_SOURCES += acl_entries.c
+
+## end gnulib module acl
+
+## begin gnulib module alloca
+
+
+EXTRA_DIST += alloca.c
+
+EXTRA_libsed_a_SOURCES += alloca.c
+
+libsed_a_LIBADD += @ALLOCA@
+libsed_a_DEPENDENCIES += @ALLOCA@
+## end gnulib module alloca
+
+## begin gnulib module alloca-opt
+
+BUILT_SOURCES += $(ALLOCA_H)
+
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+alloca.h: alloca.in.h
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ cat $(srcdir)/alloca.in.h; \
+ } > $@-t
+ mv -f $@-t $@
+MOSTLYCLEANFILES += alloca.h alloca.h-t
+
+EXTRA_DIST += alloca.in.h
+
+## end gnulib module alloca-opt
+
+## begin gnulib module btowc
+
+
+EXTRA_DIST += btowc.c
+
+EXTRA_libsed_a_SOURCES += btowc.c
+
+## end gnulib module btowc
+
+## begin gnulib module configmake
+
+# Retrieve values of the variables through 'configure' followed by
+# 'make', not directly through 'configure', so that a user who
+# sets some of these variables consistently on the 'make' command
+# line gets correct results.
+#
+# One advantage of this approach, compared to the classical
+# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
+# is that it protects against the use of undefined variables.
+# If, say, $(libdir) is not set in the Makefile, LIBDIR is not
+# defined by this module, and code using LIBDIR gives a
+# compilation error.
+#
+# Another advantage is that 'make' output is shorter.
+#
+# Listed in the same order as the GNU makefile conventions.
+# The Automake-defined pkg* macros are appended, in the order
+# listed in the Automake 1.10a+ documentation.
+configmake.h: Makefile
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ echo '#define PREFIX "$(prefix)"'; \
+ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
+ echo '#define BINDIR "$(bindir)"'; \
+ echo '#define SBINDIR "$(sbindir)"'; \
+ echo '#define LIBEXECDIR "$(libexecdir)"'; \
+ echo '#define DATAROOTDIR "$(datarootdir)"'; \
+ echo '#define DATADIR "$(datadir)"'; \
+ echo '#define SYSCONFDIR "$(sysconfdir)"'; \
+ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
+ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+ echo '#define INCLUDEDIR "$(includedir)"'; \
+ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
+ echo '#define DOCDIR "$(docdir)"'; \
+ echo '#define INFODIR "$(infodir)"'; \
+ echo '#define HTMLDIR "$(htmldir)"'; \
+ echo '#define DVIDIR "$(dvidir)"'; \
+ echo '#define PDFDIR "$(pdfdir)"'; \
+ echo '#define PSDIR "$(psdir)"'; \
+ echo '#define LIBDIR "$(libdir)"'; \
+ echo '#define LISPDIR "$(lispdir)"'; \
+ echo '#define LOCALEDIR "$(localedir)"'; \
+ echo '#define MANDIR "$(mandir)"'; \
+ echo '#define MANEXT "$(manext)"'; \
+ echo '#define PKGDATADIR "$(pkgdatadir)"'; \
+ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
+ echo '#define PKGLIBDIR "$(pkglibdir)"'; \
+ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+ } | sed '/""/d' > $@-t
+ mv $@-t $@
+BUILT_SOURCES += configmake.h
+CLEANFILES += configmake.h configmake.h-t
+
+## end gnulib module configmake
+
+## begin gnulib module errno
+
+BUILT_SOURCES += $(ERRNO_H)
+
+# We need the following in order to create <errno.h> when the system
+# doesn't have one that is POSIX compliant.
+errno.h: errno.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
+ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
+ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
+ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
+ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
+ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
+ < $(srcdir)/errno.in.h; \
+ } > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += errno.h errno.h-t
+
+EXTRA_DIST += errno.in.h
+
+## end gnulib module errno
+
+## begin gnulib module error
+
+
+EXTRA_DIST += error.c error.h
+
+EXTRA_libsed_a_SOURCES += error.c
+
+## end gnulib module error
+
+## begin gnulib module exitfail
+
+
+EXTRA_DIST += exitfail.c exitfail.h
+
+EXTRA_libsed_a_SOURCES += exitfail.c
+
+## end gnulib module exitfail
+
+## begin gnulib module getdelim
+
+
+EXTRA_DIST += getdelim.c
+
+EXTRA_libsed_a_SOURCES += getdelim.c
+
+## end gnulib module getdelim
+
+## begin gnulib module getline
+
+
+EXTRA_DIST += getline.c
+
+EXTRA_libsed_a_SOURCES += getline.c
+
+## end gnulib module getline
+
+## begin gnulib module getopt
+
+BUILT_SOURCES += $(GETOPT_H)
+
+# We need the following in order to create <getopt.h> when the system
+# doesn't have one that works with the given compiler.
+getopt.h: getopt.in.h
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ cat $(srcdir)/getopt.in.h; \
+ } > $@-t
+ mv -f $@-t $@
+MOSTLYCLEANFILES += getopt.h getopt.h-t
+
+EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h
+
+EXTRA_libsed_a_SOURCES += getopt.c getopt1.c
+
+## end gnulib module getopt
+
+## begin gnulib module gettext
+
+# This is for those projects which use "gettextize --intl" to put a source-code
+# copy of libintl into their package. In such projects, every Makefile.am needs
+# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
+# For the Makefile.ams in other directories it is the maintainer's
+# responsibility; for the one from gnulib we do it here.
+# This option has no effect when the user disables NLS (because then the intl
+# directory contains no libintl.h file) or when the project does not use
+# "gettextize --intl".
+#AM_CPPFLAGS += -I$(top_builddir)/intl
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end gnulib module gettext
+
+## begin gnulib module gettext-h
+
+libsed_a_SOURCES += gettext.h
+
+## end gnulib module gettext-h
+
+## begin gnulib module gettimeofday
+
+
+EXTRA_DIST += gettimeofday.c
+
+EXTRA_libsed_a_SOURCES += gettimeofday.c
+
+## end gnulib module gettimeofday
+
+## begin gnulib module havelib
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end gnulib module havelib
+
+## begin gnulib module intprops
+
+
+EXTRA_DIST += intprops.h
+
+## end gnulib module intprops
+
+## begin gnulib module link-warning
+
+LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/link-warning.h
+
+## end gnulib module link-warning
+
+## begin gnulib module localcharset
+
+libsed_a_SOURCES += localcharset.h 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: charset.alias ref-add.sed ref-del.sed
+
+charset_alias = $(DESTDIR)$(libdir)/charset.alias
+charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+install-exec-local: all-local
+ if test $(GLIBC21) = no; then \
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+ darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+ esac ; \
+ else \
+ need_charset_alias=false ; \
+ fi ; \
+ if $$need_charset_alias; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
+ fi ; \
+ if test -f $(charset_alias); then \
+ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ else \
+ if $$need_charset_alias; then \
+ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ fi ; \
+ fi
+
+uninstall-local: all-local
+ if test -f $(charset_alias); then \
+ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+ if grep '^# Packages using this file: $$' $(charset_tmp) \
+ > /dev/null; then \
+ rm -f $(charset_alias); \
+ else \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
+ fi; \
+ rm -f $(charset_tmp); \
+ fi
+
+charset.alias: config.charset
+ rm -f t-$@ $@
+ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@
+ mv t-$@ $@
+
+SUFFIXES += .sed .sin
+.sin.sed:
+ rm -f t-$@ $@
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@
+ mv t-$@ $@
+
+CLEANFILES += charset.alias ref-add.sed ref-del.sed
+
+EXTRA_DIST += config.charset ref-add.sin ref-del.sin
+
+## end gnulib module localcharset
+
+## begin gnulib module lstat
+
+
+EXTRA_DIST += lstat.c
+
+EXTRA_libsed_a_SOURCES += lstat.c
+
+## end gnulib module lstat
+
+## begin gnulib module malloc
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libsed_a_SOURCES += malloc.c
+
+## end gnulib module malloc
+
+## begin gnulib module malloc-posix
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libsed_a_SOURCES += malloc.c
+
+## end gnulib module malloc-posix
+
+## begin gnulib module mbrlen
+
+
+EXTRA_DIST += mbrlen.c
+
+EXTRA_libsed_a_SOURCES += mbrlen.c
+
+## end gnulib module mbrlen
+
+## begin gnulib module mbrtowc
+
+
+EXTRA_DIST += mbrtowc.c
+
+EXTRA_libsed_a_SOURCES += mbrtowc.c
+
+## end gnulib module mbrtowc
+
+## begin gnulib module mbsinit
+
+
+EXTRA_DIST += mbsinit.c
+
+EXTRA_libsed_a_SOURCES += mbsinit.c
+
+## end gnulib module mbsinit
+
+## begin gnulib module mkstemp
+
+
+EXTRA_DIST += mkstemp.c
+
+EXTRA_libsed_a_SOURCES += mkstemp.c
+
+## end gnulib module mkstemp
+
+## begin gnulib module obstack
+
+
+EXTRA_DIST += obstack.c obstack.h
+
+EXTRA_libsed_a_SOURCES += obstack.c
+
+## end gnulib module obstack
+
+## begin gnulib module pathmax
+
+
+EXTRA_DIST += pathmax.h
+
+## end gnulib module pathmax
+
+## begin gnulib module quote
+
+
+EXTRA_DIST += quote.c quote.h
+
+EXTRA_libsed_a_SOURCES += quote.c
+
+## end gnulib module quote
+
+## begin gnulib module quotearg
+
+
+EXTRA_DIST += quotearg.c quotearg.h
+
+EXTRA_libsed_a_SOURCES += quotearg.c
+
+## end gnulib module quotearg
+
+## begin gnulib module realloc-posix
+
+
+EXTRA_DIST += realloc.c
+
+EXTRA_libsed_a_SOURCES += realloc.c
+
+## end gnulib module realloc-posix
+
+## begin gnulib module regex
+
+
+EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c
+
+EXTRA_libsed_a_SOURCES += regcomp.c regex.c regex_internal.c regexec.c
+
+## end gnulib module regex
+
+## begin gnulib module stat-macros
+
+
+EXTRA_DIST += stat-macros.h
+
+## end gnulib module stat-macros
+
+## begin gnulib module stdbool
+
+BUILT_SOURCES += $(STDBOOL_H)
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+stdbool.h: stdbool.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
+ } > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += stdbool.h stdbool.h-t
+
+EXTRA_DIST += stdbool.in.h
+
+## end gnulib module stdbool
+
+## begin gnulib module stdint
+
+BUILT_SOURCES += $(STDINT_H)
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+stdint.h: stdint.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
+ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
+ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
+ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
+ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
+ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
+ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
+ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
+ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
+ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+ < $(srcdir)/stdint.in.h; \
+ } > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += stdint.h stdint.h-t
+
+EXTRA_DIST += stdint.in.h
+
+## end gnulib module stdint
+
+## begin gnulib module stdio
+
+BUILT_SOURCES += stdio.h
+
+# We need the following in order to create <stdio.h> when the system
+# doesn't have one that works with the given compiler.
+stdio.h: stdio.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
+ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
+ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
+ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
+ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
+ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
+ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
+ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
+ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
+ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
+ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
+ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
+ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
+ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
+ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
+ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
+ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
+ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
+ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
+ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
+ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
+ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
+ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
+ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
+ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
+ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
+ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
+ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
+ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
+ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
+ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
+ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
+ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
+ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
+ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
+ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
+ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
+ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
+ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
+ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
+ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
+ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
+ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
+ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
+ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
+ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
+ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
+ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
+ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/stdio.in.h; \
+ } > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += stdio.h stdio.h-t
+
+EXTRA_DIST += stdio-write.c stdio.in.h
+
+EXTRA_libsed_a_SOURCES += stdio-write.c
+
+## end gnulib module stdio
+
+## begin gnulib module stdlib
+
+BUILT_SOURCES += stdlib.h
+
+# We need the following in order to create <stdlib.h> when the system
+# doesn't have one that works with the given compiler.
+stdlib.h: stdlib.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
+ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
+ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
+ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
+ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
+ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
+ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
+ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
+ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
+ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
+ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
+ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
+ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
+ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
+ -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \
+ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+ -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \
+ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+ -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \
+ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
+ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+ -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \
+ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
+ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
+ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
+ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
+ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
+ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
+ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+ -e 's|@''VOID_UNSETENV''@|$(VOID_UNSETENV)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/stdlib.in.h; \
+ } > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += stdlib.h stdlib.h-t
+
+EXTRA_DIST += stdlib.in.h
+
+## end gnulib module stdlib
+
+## begin gnulib module streq
+
+
+EXTRA_DIST += streq.h
+
+## end gnulib module streq
+
+## begin gnulib module strerror
+
+
+EXTRA_DIST += strerror.c
+
+EXTRA_libsed_a_SOURCES += strerror.c
+
+## end gnulib module strerror
+
+## begin gnulib module string
+
+BUILT_SOURCES += string.h
+
+# We need the following in order to create <string.h> when the system
+# doesn't have one that works with the given compiler.
+string.h: string.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
+ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
+ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
+ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
+ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
+ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
+ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
+ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
+ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
+ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
+ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
+ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
+ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
+ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
+ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
+ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
+ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
+ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
+ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
+ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
+ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
+ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
+ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
+ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
+ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
+ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
+ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
+ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
+ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
+ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
+ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
+ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
+ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
+ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
+ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
+ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
+ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
+ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
+ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
+ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
+ -e 's|@''HAVE_STRNDUP''@|$(HAVE_STRNDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
+ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
+ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
+ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
+ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+ -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \
+ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
+ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
+ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/string.in.h; \
+ } > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += string.h string.h-t
+
+EXTRA_DIST += string.in.h
+
+## end gnulib module string
+
+## begin gnulib module strverscmp
+
+
+EXTRA_DIST += strverscmp.c
+
+EXTRA_libsed_a_SOURCES += strverscmp.c
+
+## end gnulib module strverscmp
+
+## begin gnulib module sys_stat
+
+BUILT_SOURCES += $(SYS_STAT_H)
+
+# We need the following in order to create <sys/stat.h> when the system
+# has one that is incomplete.
+sys/stat.h: sys_stat.in.h
+ @MKDIR_P@ sys
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
+ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
+ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
+ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
+ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
+ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/sys_stat.in.h; \
+ } > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
+MOSTLYCLEANDIRS += sys
+
+EXTRA_DIST += sys_stat.in.h
+
+## end gnulib module sys_stat
+
+## begin gnulib module sys_time
+
+BUILT_SOURCES += $(SYS_TIME_H)
+
+# We need the following in order to create <sys/time.h> when the system
+# doesn't have one that works with the given compiler.
+sys/time.h: sys_time.in.h
+ @MKDIR_P@ sys
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
+ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+ < $(srcdir)/sys_time.in.h; \
+ } > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += sys/time.h sys/time.h-t
+
+EXTRA_DIST += sys_time.in.h
+
+## end gnulib module sys_time
+
+## begin gnulib module tempname
+
+
+EXTRA_DIST += tempname.c tempname.h
+
+EXTRA_libsed_a_SOURCES += tempname.c
+
+## end gnulib module tempname
+
+## begin gnulib module unistd
+
+BUILT_SOURCES += unistd.h
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+unistd.h: unistd.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
+ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
+ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
+ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
+ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
+ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
+ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
+ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
+ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
+ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
+ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
+ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
+ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
+ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
+ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
+ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
+ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
+ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
+ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
+ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
+ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
+ -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
+ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
+ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
+ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \
+ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
+ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
+ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
+ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
+ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
+ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
+ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
+ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/unistd.in.h; \
+ } > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += unistd.h unistd.h-t
+
+EXTRA_DIST += unistd.in.h
+
+## end gnulib module unistd
+
+## begin gnulib module unlocked-io
+
+
+EXTRA_DIST += unlocked-io.h
+
+## end gnulib module unlocked-io
+
+## begin gnulib module verify
+
+libsed_a_SOURCES += verify.h
+
+## end gnulib module verify
+
+## begin gnulib module wchar
+
+BUILT_SOURCES += $(WCHAR_H)
+
+# We need the following in order to create <wchar.h> when the system
+# version does not work standalone.
+wchar.h: wchar.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
+ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
+ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
+ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
+ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
+ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
+ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
+ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
+ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
+ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
+ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
+ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
+ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
+ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
+ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
+ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
+ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
+ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
+ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
+ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
+ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
+ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
+ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
+ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
+ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
+ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
+ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
+ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
+ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
+ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
+ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
+ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
+ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+ -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+ < $(srcdir)/wchar.in.h; \
+ } > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += wchar.h wchar.h-t
+
+EXTRA_DIST += wchar.in.h
+
+## end gnulib module wchar
+
+## begin gnulib module wcrtomb
+
+
+EXTRA_DIST += wcrtomb.c
+
+EXTRA_libsed_a_SOURCES += wcrtomb.c
+
+## end gnulib module wcrtomb
+
+## begin gnulib module wctob
+
+
+EXTRA_DIST += wctob.c
+
+EXTRA_libsed_a_SOURCES += wctob.c
+
+## end gnulib module wctob
+
+## begin gnulib module wctype
+
+BUILT_SOURCES += $(WCTYPE_H)
+
+# We need the following in order to create <wctype.h> when the system
+# doesn't have one that works with the given compiler.
+wctype.h: wctype.in.h
+ rm -f $@-t $@
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
+ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
+ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+ < $(srcdir)/wctype.in.h; \
+ } > $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += wctype.h wctype.h-t
+
+EXTRA_DIST += wctype.in.h
+
+## end gnulib module wctype
+
+## begin gnulib module xalloc
+
+
+EXTRA_DIST += xalloc.h xmalloc.c
+
+EXTRA_libsed_a_SOURCES += xmalloc.c
+
+## end gnulib module xalloc
+
+## begin gnulib module xalloc-die
+
+libsed_a_SOURCES += xalloc-die.c
+
+## end gnulib module xalloc-die
+
+
+mostlyclean-local: mostlyclean-generic
+ @for dir in '' $(MOSTLYCLEANDIRS); do \
+ if test -n "$$dir" && test -d $$dir; then \
+ echo "rmdir $$dir"; rmdir $$dir; \
+ fi; \
+ done; \
+ :
diff --git a/lib/intprops.h b/lib/intprops.h
new file mode 100644
index 0000000..002161e
--- /dev/null
+++ b/lib/intprops.h
@@ -0,0 +1,77 @@
+/* intprops.h -- properties of integer types
+
+ Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#include <limits.h>
+
+/* The extra casts in the following macros work around compiler bugs,
+ e.g., in Cray C 5.0.3.0. */
+
+/* True if the arithmetic type T is an integer type. bool counts as
+ an integer. */
+#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
+
+/* True if negative values of the signed integer type T use two's
+ complement, ones' complement, or signed magnitude representation,
+ respectively. Much GNU code assumes two's complement, but some
+ people like to be portable to all possible C hosts. */
+#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the arithmetic type T is signed. */
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* The maximum and minimum values for the integer type T. These
+ macros have undefined behavior if T is signed and has padding bits.
+ If this is a problem for you, please let us know how to fix it for
+ your host. */
+#define TYPE_MINIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) 0 \
+ : TYPE_SIGNED_MAGNITUDE (t) \
+ ? ~ (t) 0 \
+ : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
+ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+
+/* Return zero if T can be determined to be an unsigned type.
+ Otherwise, return 1.
+ When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a
+ tighter bound. Otherwise, it overestimates the true bound by one byte
+ when applied to unsigned types of size 2, 4, 16, ... bytes.
+ The symbol signed_type_or_expr__ is private to this header file. */
+#if __GNUC__ >= 2
+# define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t))
+#else
+# define signed_type_or_expr__(t) 1
+#endif
+
+/* Bound on length of the string representing an integer type or expression T.
+ Subtract 1 for the sign bit if T is signed; log10 (2.0) < 146/485;
+ add 1 for integer division truncation; add 1 more for a minus sign
+ if needed. */
+#define INT_STRLEN_BOUND(t) \
+ ((sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) * 146 / 485 \
+ + signed_type_or_expr__ (t) + 1)
+
+/* Bound on buffer size needed to represent an integer type or expression T,
+ including the terminating null. */
+#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
diff --git a/intl/localcharset.c b/lib/localcharset.c
index fad6f63..b4998ee 100644
--- a/intl/localcharset.c
+++ b/lib/localcharset.c
@@ -1,61 +1,63 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2009 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public License as published
- by the Free Software Foundation; either version 2, or (at your option)
+ This program is free software; you can redistribute 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
- Library General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Library 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. */
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-/* Written by Bruno Haible <haible@clisp.cons.org>. */
+/* Written by Bruno Haible <bruno@clisp.org>. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
-#if HAVE_STDDEF_H
-# include <stddef.h>
-#endif
+/* Specification. */
+#include "localcharset.h"
+#include <stddef.h>
#include <stdio.h>
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
-#if HAVE_STDLIB_H
-# include <stdlib.h>
+#include <string.h>
+#include <stdlib.h>
+
+#if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET
+# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */
#endif
#if defined _WIN32 || defined __WIN32__
-# undef WIN32 /* avoid warning on mingw32 */
-# define WIN32
+# define WIN32_NATIVE
#endif
#if defined __EMX__
/* Assume EMX program runs on OS/2, even if compiled under DOS. */
-# define OS2
+# ifndef OS2
+# define OS2
+# endif
#endif
-#if !defined WIN32
+#if !defined WIN32_NATIVE
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
# else
-# if HAVE_SETLOCALE
+# if 0 /* see comment below */
# include <locale.h>
# endif
# endif
-#elif defined WIN32
+# ifdef __CYGWIN__
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# endif
+#elif defined WIN32_NATIVE
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
@@ -64,8 +66,19 @@
# include <os2.h>
#endif
-#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
- /* Win32, OS/2, DOS */
+#if ENABLE_RELOCATABLE
+# include "relocatable.h"
+#else
+# define relocate(pathname) (pathname)
+#endif
+
+/* Get LIBDIR. */
+#ifndef LIBDIR
+# include "configmake.h"
+#endif
+
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, Cygwin, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#endif
@@ -77,7 +90,7 @@
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
#endif
-#ifdef HAVE_GETC_UNLOCKED
+#if HAVE_DECL_GETC_UNLOCKED
# undef getc
# define getc getc_unlocked
#endif
@@ -98,19 +111,25 @@ static const char * volatile charset_aliases;
/* Return a pointer to the contents of the charset.alias file. */
static const char *
-get_charset_aliases ()
+get_charset_aliases (void)
{
const char *cp;
cp = charset_aliases;
if (cp == NULL)
{
-#if !defined WIN32
+#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
FILE *fp;
- const char *dir = LIBDIR;
+ 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 = relocate (LIBDIR);
+
/* Concatenate dir and base into freshly allocated file_name. */
{
size_t dir_len = strlen (dir);
@@ -132,15 +151,17 @@ get_charset_aliases ()
else
{
/* Parse the file's contents. */
- int c;
- char buf1[50+1];
- char buf2[50+1];
char *res_ptr = NULL;
size_t res_size = 0;
- size_t l1, l2;
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;
@@ -161,6 +182,7 @@ get_charset_aliases ()
break;
l1 = strlen (buf1);
l2 = strlen (buf2);
+ old_res_ptr = res_ptr;
if (res_size == 0)
{
res_size = l1 + 1 + l2 + 1;
@@ -175,6 +197,8 @@ get_charset_aliases ()
{
/* Out of memory. */
res_size = 0;
+ if (old_res_ptr != NULL)
+ free (old_res_ptr);
break;
}
strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
@@ -195,13 +219,92 @@ get_charset_aliases ()
#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
+
+# 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";
+# endif
+
+# if defined WIN32_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. */
-# if defined WIN32
cp = "CP936" "\0" "GBK" "\0"
- "CP1361" "\0" "JOHAB" "\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";
# endif
#endif
@@ -221,18 +324,65 @@ get_charset_aliases ()
STATIC
#endif
const char *
-locale_charset ()
+locale_charset (void)
{
const char *codeset;
const char *aliases;
-#if !(defined WIN32 || defined OS2)
+#if !(defined WIN32_NATIVE || defined OS2)
# if HAVE_LANGINFO_CODESET
/* Most systems support nl_langinfo (CODESET) nowadays. */
codeset = nl_langinfo (CODESET);
+# ifdef __CYGWIN__
+ /* Cygwin 2006 does not have locales. nl_langinfo (CODESET) always
+ returns "US-ASCII". As long as this is not fixed, return the suffix
+ of the locale name from the environment variables (if present) or
+ the codepage as a number. */
+ if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
+ {
+ const char *locale;
+ static char buf[2 + 10 + 1];
+
+ 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[0] != '\0')
+ {
+ /* If the locale name contains an encoding after the dot, return
+ it. */
+ const char *dot = strchr (locale, '.');
+
+ if (dot != NULL)
+ {
+ const char *modifier;
+
+ dot++;
+ /* Look for the possible @... trailer and remove it, if any. */
+ modifier = strchr (dot, '@');
+ if (modifier == NULL)
+ return dot;
+ if (modifier - dot < sizeof (buf))
+ {
+ memcpy (buf, dot, modifier - dot);
+ buf [modifier - dot] = '\0';
+ return buf;
+ }
+ }
+ }
+
+ /* Woe32 has a function returning the locale's codepage as a number. */
+ sprintf (buf, "CP%u", GetACP ());
+ codeset = buf;
+ }
+# endif
+
# else
/* On old systems which lack it, use setlocale or getenv. */
@@ -242,7 +392,7 @@ locale_charset ()
(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 HAVE_SETLOCALE && 0
+# if 0
locale = setlocale (LC_CTYPE, NULL);
# endif
if (locale == NULL || locale[0] == '\0')
@@ -263,11 +413,11 @@ locale_charset ()
# endif
-#elif defined WIN32
+#elif defined WIN32_NATIVE
static char buf[2 + 10 + 1];
- /* Win32 has a function returning the locale's codepage as a number. */
+ /* Woe32 has a function returning the locale's codepage as a number. */
sprintf (buf, "CP%u", GetACP ());
codeset = buf;
@@ -341,5 +491,11 @@ locale_charset ()
break;
}
+ /* 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";
+
return codeset;
}
diff --git a/lib/localcharset.h b/lib/localcharset.h
new file mode 100644
index 0000000..7f0b974
--- /dev/null
+++ b/lib/localcharset.h
@@ -0,0 +1,43 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Determine a canonical name for the current locale's character encoding.
+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
+ This file is part of the GNU CHARSET Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _LOCALCHARSET_H
+#define _LOCALCHARSET_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Determine the current locale's character encoding, and canonicalize it
+ into one of the canonical names listed in config.charset.
+ 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);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _LOCALCHARSET_H */
diff --git a/lib/lstat.c b/lib/lstat.c
new file mode 100644
index 0000000..3e07270
--- /dev/null
+++ b/lib/lstat.c
@@ -0,0 +1,82 @@
+/* Work around a bug of lstat on some systems
+
+ Copyright (C) 1997-1999, 2000-2006, 2008 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering */
+
+#include <config.h>
+
+/* Get the original definition of open. It might be defined as a macro. */
+#define __need_system_sys_stat_h
+#include <sys/types.h>
+#include <sys/stat.h>
+#undef __need_system_sys_stat_h
+
+static inline int
+orig_lstat (const char *filename, struct stat *buf)
+{
+ return lstat (filename, buf);
+}
+
+/* Specification. */
+#include <sys/stat.h>
+
+#include <string.h>
+#include <errno.h>
+
+/* lstat works differently on Linux and Solaris systems. POSIX (see
+ `pathname resolution' in the glossary) requires that programs like
+ `ls' take into consideration the fact that FILE has a trailing slash
+ when FILE is a symbolic link. On Linux and Solaris 10 systems, the
+ lstat function already has the desired semantics (in treating
+ `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)',
+ but on Solaris 9 and earlier it does not.
+
+ If FILE has a trailing slash and specifies a symbolic link,
+ then use stat() to get more info on the referent of FILE.
+ If the referent is a non-directory, then set errno to ENOTDIR
+ and return -1. Otherwise, return stat's result. */
+
+int
+rpl_lstat (const char *file, struct stat *sbuf)
+{
+ size_t len;
+ int lstat_result = orig_lstat (file, sbuf);
+
+ if (lstat_result != 0 || !S_ISLNK (sbuf->st_mode))
+ return lstat_result;
+
+ len = strlen (file);
+ if (len == 0 || file[len - 1] != '/')
+ return 0;
+
+ /* FILE refers to a symbolic link and the name ends with a slash.
+ Call stat() to get info about the link's referent. */
+
+ /* If stat fails, then we do the same. */
+ if (stat (file, sbuf) != 0)
+ return -1;
+
+ /* If FILE references a directory, return 0. */
+ if (S_ISDIR (sbuf->st_mode))
+ return 0;
+
+ /* Here, we know stat succeeded and FILE references a non-directory.
+ But it was specified via a name including a trailing slash.
+ Fail with errno set to ENOTDIR to indicate the contradiction. */
+ errno = ENOTDIR;
+ return -1;
+}
diff --git a/lib/malloc.c b/lib/malloc.c
new file mode 100644
index 0000000..4738df2
--- /dev/null
+++ b/lib/malloc.c
@@ -0,0 +1,59 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* malloc() function that is glibc compatible.
+
+ Copyright (C) 1997, 1998, 2006, 2007 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* written by Jim Meyering and Bruno Haible */
+
+#include <config.h>
+/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
+#ifdef malloc
+# define NEED_MALLOC_GNU
+# undef malloc
+#endif
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <errno.h>
+
+/* Call the system's malloc below. */
+#undef malloc
+
+/* Allocate an N-byte block of memory from the heap.
+ If N is zero, allocate a 1-byte block. */
+
+void *
+rpl_malloc (size_t n)
+{
+ void *result;
+
+#ifdef NEED_MALLOC_GNU
+ if (n == 0)
+ n = 1;
+#endif
+
+ result = malloc (n);
+
+#if !HAVE_MALLOC_POSIX
+ if (result == NULL)
+ errno = ENOMEM;
+#endif
+
+ return result;
+}
diff --git a/lib/mbrlen.c b/lib/mbrlen.c
new file mode 100644
index 0000000..32a0c81
--- /dev/null
+++ b/lib/mbrlen.c
@@ -0,0 +1,32 @@
+/* Recognize multibyte character.
+ Copyright (C) 1999-2000, 2008 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+
+static mbstate_t internal_state;
+
+size_t
+mbrlen (const char *s, size_t n, mbstate_t *ps)
+{
+ if (ps == NULL)
+ ps = &internal_state;
+ return mbrtowc (NULL, s, n, ps);
+}
diff --git a/lib/mbrtowc.c b/lib/mbrtowc.c
new file mode 100644
index 0000000..0fec5f1
--- /dev/null
+++ b/lib/mbrtowc.c
@@ -0,0 +1,386 @@
+/* Convert multibyte character to wide character.
+ Copyright (C) 1999-2002, 2005-2009 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#if GNULIB_defined_mbstate_t
+/* Implement mbrtowc() on top of mbtowc(). */
+
+# include <errno.h>
+# include <stdlib.h>
+
+# include "localcharset.h"
+# include "streq.h"
+# include "verify.h"
+
+
+verify (sizeof (mbstate_t) >= 4);
+
+static char internal_state[4];
+
+size_t
+mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
+{
+ char *pstate = (char *)ps;
+
+ if (pstate == NULL)
+ pstate = internal_state;
+
+ if (s == NULL)
+ {
+ pwc = NULL;
+ s = "";
+ n = 1;
+ }
+
+ if (n == 0)
+ return (size_t)(-2);
+
+ /* Here n > 0. */
+ {
+ size_t nstate = pstate[0];
+ char buf[4];
+ const char *p;
+ size_t m;
+
+ switch (nstate)
+ {
+ case 0:
+ p = s;
+ m = n;
+ break;
+ case 3:
+ buf[2] = pstate[3];
+ /*FALLTHROUGH*/
+ case 2:
+ buf[1] = pstate[2];
+ /*FALLTHROUGH*/
+ case 1:
+ buf[0] = pstate[1];
+ p = buf;
+ m = nstate;
+ buf[m++] = s[0];
+ if (n >= 2 && m < 4)
+ {
+ buf[m++] = s[1];
+ if (n >= 3 && m < 4)
+ buf[m++] = s[2];
+ }
+ break;
+ default:
+ errno = EINVAL;
+ return (size_t)(-1);
+ }
+
+ /* Here m > 0. */
+
+# if __GLIBC__
+ /* Work around bug <http://sourceware.org/bugzilla/show_bug.cgi?id=9674> */
+ mbtowc (NULL, NULL, 0);
+# endif
+ {
+ int res = mbtowc (pwc, p, m);
+
+ if (res >= 0)
+ {
+ if (pwc != NULL && ((*pwc == 0) != (res == 0)))
+ abort ();
+ if (nstate >= (res > 0 ? res : 1))
+ abort ();
+ res -= nstate;
+ pstate[0] = 0;
+ return res;
+ }
+
+ /* mbtowc does not distinguish between invalid and incomplete multibyte
+ sequences. But mbrtowc needs to make this distinction.
+ There are two possible approaches:
+ - Use iconv() and its return value.
+ - Use built-in knowledge about the possible encodings.
+ Given the low quality of implementation of iconv() on the systems that
+ lack mbrtowc(), we use the second approach.
+ The possible encodings are:
+ - 8-bit encodings,
+ - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS,
+ - UTF-8.
+ Use specialized code for each. */
+ 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 (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+ {
+ /* Cf. unistr/u8-mblen.c. */
+ unsigned char c = (unsigned char) p[0];
+
+ if (c >= 0xc2)
+ {
+ if (c < 0xe0)
+ {
+ if (m == 1)
+ goto incomplete;
+ }
+ else if (c < 0xf0)
+ {
+ if (m == 1)
+ goto incomplete;
+ if (m == 2)
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if ((c2 ^ 0x80) < 0x40
+ && (c >= 0xe1 || c2 >= 0xa0)
+ && (c != 0xed || c2 < 0xa0))
+ goto incomplete;
+ }
+ }
+ else if (c <= 0xf4)
+ {
+ if (m == 1)
+ goto incomplete;
+ else /* m == 2 || m == 3 */
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if ((c2 ^ 0x80) < 0x40
+ && (c >= 0xf1 || c2 >= 0x90)
+ && (c < 0xf4 || (c == 0xf4 && c2 < 0x90)))
+ {
+ if (m == 2)
+ goto incomplete;
+ else /* m == 3 */
+ {
+ unsigned char c3 = (unsigned char) p[2];
+
+ if ((c3 ^ 0x80) < 0x40)
+ goto incomplete;
+ }
+ }
+ }
+ }
+ }
+ goto invalid;
+ }
+
+ /* As a reference for this code, you can use the GNU libiconv
+ implementation. Look for uses of the RET_TOOFEW macro. */
+
+ if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f)
+ goto incomplete;
+ }
+ if (m == 2)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c == 0x8f)
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if (c2 >= 0xa1 && c2 < 0xff)
+ goto incomplete;
+ }
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+ || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+ || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c >= 0xa1 && c < 0xff)
+ goto incomplete;
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0xa1 && c < 0xff) || c == 0x8e)
+ goto incomplete;
+ }
+ else /* m == 2 || m == 3 */
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c == 0x8e)
+ goto incomplete;
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe))
+ goto incomplete;
+ }
+ else /* m == 2 || m == 3 */
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c >= 0x90 && c <= 0xe3)
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if (c2 >= 0x30 && c2 <= 0x39)
+ {
+ if (m == 2)
+ goto incomplete;
+ else /* m == 3 */
+ {
+ unsigned char c3 = (unsigned char) p[2];
+
+ if (c3 >= 0x81 && c3 <= 0xfe)
+ goto incomplete;
+ }
+ }
+ }
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea)
+ || (c >= 0xf0 && c <= 0xf9))
+ goto incomplete;
+ }
+ goto invalid;
+ }
+
+ /* An unknown multibyte encoding. */
+ goto incomplete;
+ }
+
+ incomplete:
+ {
+ size_t k = nstate;
+ /* Here 0 <= k < m < 4. */
+ pstate[++k] = s[0];
+ if (k < m)
+ {
+ pstate[++k] = s[1];
+ if (k < m)
+ pstate[++k] = s[2];
+ }
+ if (k != m)
+ abort ();
+ }
+ pstate[0] = m;
+ return (size_t)(-2);
+
+ invalid:
+ errno = EILSEQ;
+ /* The conversion state is undefined, says POSIX. */
+ return (size_t)(-1);
+ }
+ }
+}
+
+#else
+/* Override the system's mbrtowc() function. */
+
+# undef mbrtowc
+
+size_t
+rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
+{
+# if MBRTOWC_NULL_ARG_BUG || MBRTOWC_RETVAL_BUG
+ if (s == NULL)
+ {
+ pwc = NULL;
+ s = "";
+ n = 1;
+ }
+# endif
+
+# if MBRTOWC_RETVAL_BUG
+ {
+ static mbstate_t internal_state;
+
+ /* Override mbrtowc's internal state. We can not call mbsinit() on the
+ hidden internal state, but we can call it on our variable. */
+ if (ps == NULL)
+ ps = &internal_state;
+
+ if (!mbsinit (ps))
+ {
+ /* Parse the rest of the multibyte character byte for byte. */
+ size_t count = 0;
+ for (; n > 0; s++, n--)
+ {
+ wchar_t wc;
+ size_t ret = mbrtowc (&wc, s, 1, ps);
+
+ if (ret == (size_t)(-1))
+ return (size_t)(-1);
+ count++;
+ if (ret != (size_t)(-2))
+ {
+ /* The multibyte character has been completed. */
+ if (pwc != NULL)
+ *pwc = wc;
+ return (wc == 0 ? 0 : count);
+ }
+ }
+ return (size_t)(-2);
+ }
+ }
+# endif
+
+# if MBRTOWC_NUL_RETVAL_BUG
+ {
+ wchar_t wc;
+ size_t ret = mbrtowc (&wc, s, n, ps);
+
+ if (ret != (size_t)(-1) && ret != (size_t)(-2))
+ {
+ if (pwc != NULL)
+ *pwc = wc;
+ if (wc == 0)
+ ret = 0;
+ }
+ return ret;
+ }
+# else
+ return mbrtowc (pwc, s, n, ps);
+# endif
+}
+
+#endif
diff --git a/lib/mbsinit.c b/lib/mbsinit.c
new file mode 100644
index 0000000..81fed5a
--- /dev/null
+++ b/lib/mbsinit.c
@@ -0,0 +1,47 @@
+/* Test for initial conversion state.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include "verify.h"
+
+/* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs()
+ and wcrtomb(), wcsrtombs().
+ We assume that
+ - sizeof (mbstate_t) >= 4,
+ - only stateless encodings are supported (such as UTF-8 and EUC-JP, but
+ not ISO-2022 variants),
+ - for each encoding, the number of bytes for a wide character is <= 4.
+ (This maximum is attained for UTF-8, GB18030, EUC-TW.)
+ We define the meaning of mbstate_t as follows:
+ - In mb -> wc direction, mbstate_t's first byte contains the number of
+ buffered bytes (in the range 0..3), followed by up to 3 buffered bytes.
+ - In wc -> mb direction, mbstate_t contains no information. In other
+ words, it is always in the initial state. */
+
+verify (sizeof (mbstate_t) >= 4);
+
+int
+mbsinit (const mbstate_t *ps)
+{
+ const char *pstate = (const char *)ps;
+
+ return pstate[0] == 0;
+}
diff --git a/lib/memchr.c b/lib/memchr.c
deleted file mode 100644
index 0e3e630..0000000
--- a/lib/memchr.c
+++ /dev/null
@@ -1,200 +0,0 @@
-/* Copyright (C) 1991, 1993, 1996, 1997 Free Software Foundation, Inc.
- Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
- with help from Dan Sahlin (dan@sics.se) and
- commentary by Jim Blandy (jimb@ai.mit.edu);
- adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
- and implemented by Roland McGrath (roland@ai.mit.edu).
-
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#undef __ptr_t
-#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
-# define __ptr_t void *
-#else /* Not C++ or ANSI C. */
-# define __ptr_t char *
-#endif /* C++ or ANSI C. */
-
-#if defined (_LIBC)
-# include <string.h>
-#endif
-
-#if defined (HAVE_LIMITS_H) || defined (_LIBC)
-# include <limits.h>
-#endif
-
-#define LONG_MAX_32_BITS 2147483647
-
-#ifndef LONG_MAX
-#define LONG_MAX LONG_MAX_32_BITS
-#endif
-
-#include <sys/types.h>
-
-#undef memchr
-
-
-/* Search no more than N bytes of S for C. */
-__ptr_t
-memchr (s, c, n)
- const __ptr_t s;
- int c;
- size_t n;
-{
- const unsigned char *char_ptr;
- const unsigned long int *longword_ptr;
- unsigned long int longword, magic_bits, charmask;
-
- c = (unsigned char) c;
-
- /* Handle the first few characters by reading one character at a time.
- Do this until CHAR_PTR is aligned on a longword boundary. */
- for (char_ptr = (const unsigned char *) s;
- n > 0 && ((unsigned long int) char_ptr
- & (sizeof (longword) - 1)) != 0;
- --n, ++char_ptr)
- if (*char_ptr == c)
- return (__ptr_t) char_ptr;
-
- /* All these elucidatory comments refer to 4-byte longwords,
- but the theory applies equally well to 8-byte longwords. */
-
- longword_ptr = (unsigned long int *) char_ptr;
-
- /* Bits 31, 24, 16, and 8 of this number are zero. Call these bits
- the "holes." Note that there is a hole just to the left of
- each byte, with an extra at the end:
-
- bits: 01111110 11111110 11111110 11111111
- bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD
-
- The 1-bits make sure that carries propagate to the next 0-bit.
- The 0-bits provide holes for carries to fall into. */
-
- if (sizeof (longword) != 4 && sizeof (longword) != 8)
- abort ();
-
-#if LONG_MAX <= LONG_MAX_32_BITS
- magic_bits = 0x7efefeff;
-#else
- magic_bits = ((unsigned long int) 0x7efefefe << 32) | 0xfefefeff;
-#endif
-
- /* Set up a longword, each of whose bytes is C. */
- charmask = c | (c << 8);
- charmask |= charmask << 16;
-#if LONG_MAX > LONG_MAX_32_BITS
- charmask |= charmask << 32;
-#endif
-
- /* Instead of the traditional loop which tests each character,
- we will test a longword at a time. The tricky part is testing
- if *any of the four* bytes in the longword in question are zero. */
- while (n >= sizeof (longword))
- {
- /* We tentatively exit the loop if adding MAGIC_BITS to
- LONGWORD fails to change any of the hole bits of LONGWORD.
-
- 1) Is this safe? Will it catch all the zero bytes?
- Suppose there is a byte with all zeros. Any carry bits
- propagating from its left will fall into the hole at its
- least significant bit and stop. Since there will be no
- carry from its most significant bit, the LSB of the
- byte to the left will be unchanged, and the zero will be
- detected.
-
- 2) Is this worthwhile? Will it ignore everything except
- zero bytes? Suppose every byte of LONGWORD has a bit set
- somewhere. There will be a carry into bit 8. If bit 8
- is set, this will carry into bit 16. If bit 8 is clear,
- one of bits 9-15 must be set, so there will be a carry
- into bit 16. Similarly, there will be a carry into bit
- 24. If one of bits 24-30 is set, there will be a carry
- into bit 31, so all of the hole bits will be changed.
-
- The one misfire occurs when bits 24-30 are clear and bit
- 31 is set; in this case, the hole at bit 31 is not
- changed. If we had access to the processor carry flag,
- we could close this loophole by putting the fourth hole
- at bit 32!
-
- So it ignores everything except 128's, when they're aligned
- properly.
-
- 3) But wait! Aren't we looking for C, not zero?
- Good point. So what we do is XOR LONGWORD with a longword,
- each of whose bytes is C. This turns each byte that is C
- into a zero. */
-
- longword = *longword_ptr++ ^ charmask;
-
- /* Add MAGIC_BITS to LONGWORD. */
- if ((((longword + magic_bits)
-
- /* Set those bits that were unchanged by the addition. */
- ^ ~longword)
-
- /* Look at only the hole bits. If any of the hole bits
- are unchanged, most likely one of the bytes was a
- zero. */
- & ~magic_bits) != 0)
- {
- /* Which of the bytes was C? If none of them were, it was
- a misfire; continue the search. */
-
- const unsigned char *cp = (const unsigned char *) (longword_ptr - 1);
-
- if (cp[0] == c)
- return (__ptr_t) cp;
- if (cp[1] == c)
- return (__ptr_t) &cp[1];
- if (cp[2] == c)
- return (__ptr_t) &cp[2];
- if (cp[3] == c)
- return (__ptr_t) &cp[3];
-#if LONG_MAX > 2147483647
- if (cp[4] == c)
- return (__ptr_t) &cp[4];
- if (cp[5] == c)
- return (__ptr_t) &cp[5];
- if (cp[6] == c)
- return (__ptr_t) &cp[6];
- if (cp[7] == c)
- return (__ptr_t) &cp[7];
-#endif
- }
-
- n -= sizeof (longword);
- }
-
- char_ptr = (const unsigned char *) longword_ptr;
-
- while (n-- > 0)
- {
- if (*char_ptr == c)
- return (__ptr_t) char_ptr;
- else
- ++char_ptr;
- }
-
- return 0;
-}
diff --git a/lib/memcmp.c b/lib/memcmp.c
deleted file mode 100644
index 76cf52e..0000000
--- a/lib/memcmp.c
+++ /dev/null
@@ -1,396 +0,0 @@
-/* Copyright (C) 1991, 1993, 1995, 1997, 1998 Free Software Foundation, Inc.
- Contributed by Torbjorn Granlund (tege@sics.se).
-
- NOTE: The canonical source of this file is maintained with the GNU C Library.
- Bugs can be reported to bug-glibc@gnu.org.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#undef __ptr_t
-#if defined __cplusplus || (defined __STDC__ && __STDC__)
-# define __ptr_t void *
-#else /* Not C++ or ANSI C. */
-# undef const
-# define const
-# define __ptr_t char *
-#endif /* C++ or ANSI C. */
-
-#ifndef __P
-# if defined __GNUC__ || (defined __STDC__ && __STDC__)
-# define __P(args) args
-# else
-# define __P(args) ()
-# endif /* GCC. */
-#endif /* Not __P. */
-
-#if defined HAVE_STRING_H || defined _LIBC
-# include <string.h>
-#endif
-
-#undef memcmp
-
-#ifdef _LIBC
-
-# include <memcopy.h>
-# include <endian.h>
-
-# if __BYTE_ORDER == __BIG_ENDIAN
-# define WORDS_BIGENDIAN
-# endif
-
-#else /* Not in the GNU C library. */
-
-# include <sys/types.h>
-
-/* Type to use for aligned memory operations.
- This should normally be the biggest type supported by a single load
- and store. Must be an unsigned type. */
-# define op_t unsigned long int
-# define OPSIZ (sizeof(op_t))
-
-/* Threshold value for when to enter the unrolled loops. */
-# define OP_T_THRES 16
-
-/* Type to use for unaligned operations. */
-typedef unsigned char byte;
-
-# ifndef WORDS_BIGENDIAN
-# define MERGE(w0, sh_1, w1, sh_2) (((w0) >> (sh_1)) | ((w1) << (sh_2)))
-# else
-# define MERGE(w0, sh_1, w1, sh_2) (((w0) << (sh_1)) | ((w1) >> (sh_2)))
-# endif
-
-#endif /* In the GNU C library. */
-
-#ifdef WORDS_BIGENDIAN
-# define CMP_LT_OR_GT(a, b) ((a) > (b) ? 1 : -1)
-#else
-# define CMP_LT_OR_GT(a, b) memcmp_bytes ((a), (b))
-#endif
-
-/* BE VERY CAREFUL IF YOU CHANGE THIS CODE! */
-
-/* The strategy of this memcmp is:
-
- 1. Compare bytes until one of the block pointers is aligned.
-
- 2. Compare using memcmp_common_alignment or
- memcmp_not_common_alignment, regarding the alignment of the other
- block after the initial byte operations. The maximum number of
- full words (of type op_t) are compared in this way.
-
- 3. Compare the few remaining bytes. */
-
-#ifndef WORDS_BIGENDIAN
-/* memcmp_bytes -- Compare A and B bytewise in the byte order of the machine.
- A and B are known to be different.
- This is needed only on little-endian machines. */
-
-static int memcmp_bytes __P((op_t, op_t));
-
-# ifdef __GNUC__
-__inline
-# endif
-static int
-memcmp_bytes (a, b)
- op_t a, b;
-{
- long int srcp1 = (long int) &a;
- long int srcp2 = (long int) &b;
- op_t a0, b0;
-
- do
- {
- a0 = ((byte *) srcp1)[0];
- b0 = ((byte *) srcp2)[0];
- srcp1 += 1;
- srcp2 += 1;
- }
- while (a0 == b0);
- return a0 - b0;
-}
-#endif
-
-static int memcmp_common_alignment __P((long, long, size_t));
-
-/* memcmp_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN `op_t'
- objects (not LEN bytes!). Both SRCP1 and SRCP2 should be aligned for
- memory operations on `op_t's. */
-#ifdef __GNUC__
-__inline
-#endif
-static int
-memcmp_common_alignment (srcp1, srcp2, len)
- long int srcp1;
- long int srcp2;
- size_t len;
-{
- op_t a0, a1;
- op_t b0, b1;
-
- switch (len % 4)
- {
- default: /* Avoid warning about uninitialized local variables. */
- case 2:
- a0 = ((op_t *) srcp1)[0];
- b0 = ((op_t *) srcp2)[0];
- srcp1 -= 2 * OPSIZ;
- srcp2 -= 2 * OPSIZ;
- len += 2;
- goto do1;
- case 3:
- a1 = ((op_t *) srcp1)[0];
- b1 = ((op_t *) srcp2)[0];
- srcp1 -= OPSIZ;
- srcp2 -= OPSIZ;
- len += 1;
- goto do2;
- case 0:
- if (OP_T_THRES <= 3 * OPSIZ && len == 0)
- return 0;
- a0 = ((op_t *) srcp1)[0];
- b0 = ((op_t *) srcp2)[0];
- goto do3;
- case 1:
- a1 = ((op_t *) srcp1)[0];
- b1 = ((op_t *) srcp2)[0];
- srcp1 += OPSIZ;
- srcp2 += OPSIZ;
- len -= 1;
- if (OP_T_THRES <= 3 * OPSIZ && len == 0)
- goto do0;
- /* Fall through. */
- }
-
- do
- {
- a0 = ((op_t *) srcp1)[0];
- b0 = ((op_t *) srcp2)[0];
- if (a1 != b1)
- return CMP_LT_OR_GT (a1, b1);
-
- do3:
- a1 = ((op_t *) srcp1)[1];
- b1 = ((op_t *) srcp2)[1];
- if (a0 != b0)
- return CMP_LT_OR_GT (a0, b0);
-
- do2:
- a0 = ((op_t *) srcp1)[2];
- b0 = ((op_t *) srcp2)[2];
- if (a1 != b1)
- return CMP_LT_OR_GT (a1, b1);
-
- do1:
- a1 = ((op_t *) srcp1)[3];
- b1 = ((op_t *) srcp2)[3];
- if (a0 != b0)
- return CMP_LT_OR_GT (a0, b0);
-
- srcp1 += 4 * OPSIZ;
- srcp2 += 4 * OPSIZ;
- len -= 4;
- }
- while (len != 0);
-
- /* This is the right position for do0. Please don't move
- it into the loop. */
- do0:
- if (a1 != b1)
- return CMP_LT_OR_GT (a1, b1);
- return 0;
-}
-
-static int memcmp_not_common_alignment __P((long, long, size_t));
-
-/* memcmp_not_common_alignment -- Compare blocks at SRCP1 and SRCP2 with LEN
- `op_t' objects (not LEN bytes!). SRCP2 should be aligned for memory
- operations on `op_t', but SRCP1 *should be unaligned*. */
-#ifdef __GNUC__
-__inline
-#endif
-static int
-memcmp_not_common_alignment (srcp1, srcp2, len)
- long int srcp1;
- long int srcp2;
- size_t len;
-{
- op_t a0, a1, a2, a3;
- op_t b0, b1, b2, b3;
- op_t x;
- int shl, shr;
-
- /* Calculate how to shift a word read at the memory operation
- aligned srcp1 to make it aligned for comparison. */
-
- shl = 8 * (srcp1 % OPSIZ);
- shr = 8 * OPSIZ - shl;
-
- /* Make SRCP1 aligned by rounding it down to the beginning of the `op_t'
- it points in the middle of. */
- srcp1 &= -OPSIZ;
-
- switch (len % 4)
- {
- default: /* Avoid warning about uninitialized local variables. */
- case 2:
- a1 = ((op_t *) srcp1)[0];
- a2 = ((op_t *) srcp1)[1];
- b2 = ((op_t *) srcp2)[0];
- srcp1 -= 1 * OPSIZ;
- srcp2 -= 2 * OPSIZ;
- len += 2;
- goto do1;
- case 3:
- a0 = ((op_t *) srcp1)[0];
- a1 = ((op_t *) srcp1)[1];
- b1 = ((op_t *) srcp2)[0];
- srcp2 -= 1 * OPSIZ;
- len += 1;
- goto do2;
- case 0:
- if (OP_T_THRES <= 3 * OPSIZ && len == 0)
- return 0;
- a3 = ((op_t *) srcp1)[0];
- a0 = ((op_t *) srcp1)[1];
- b0 = ((op_t *) srcp2)[0];
- srcp1 += 1 * OPSIZ;
- goto do3;
- case 1:
- a2 = ((op_t *) srcp1)[0];
- a3 = ((op_t *) srcp1)[1];
- b3 = ((op_t *) srcp2)[0];
- srcp1 += 2 * OPSIZ;
- srcp2 += 1 * OPSIZ;
- len -= 1;
- if (OP_T_THRES <= 3 * OPSIZ && len == 0)
- goto do0;
- /* Fall through. */
- }
-
- do
- {
- a0 = ((op_t *) srcp1)[0];
- b0 = ((op_t *) srcp2)[0];
- x = MERGE(a2, shl, a3, shr);
- if (x != b3)
- return CMP_LT_OR_GT (x, b3);
-
- do3:
- a1 = ((op_t *) srcp1)[1];
- b1 = ((op_t *) srcp2)[1];
- x = MERGE(a3, shl, a0, shr);
- if (x != b0)
- return CMP_LT_OR_GT (x, b0);
-
- do2:
- a2 = ((op_t *) srcp1)[2];
- b2 = ((op_t *) srcp2)[2];
- x = MERGE(a0, shl, a1, shr);
- if (x != b1)
- return CMP_LT_OR_GT (x, b1);
-
- do1:
- a3 = ((op_t *) srcp1)[3];
- b3 = ((op_t *) srcp2)[3];
- x = MERGE(a1, shl, a2, shr);
- if (x != b2)
- return CMP_LT_OR_GT (x, b2);
-
- srcp1 += 4 * OPSIZ;
- srcp2 += 4 * OPSIZ;
- len -= 4;
- }
- while (len != 0);
-
- /* This is the right position for do0. Please don't move
- it into the loop. */
- do0:
- x = MERGE(a2, shl, a3, shr);
- if (x != b3)
- return CMP_LT_OR_GT (x, b3);
- return 0;
-}
-
-int
-memcmp (s1, s2, len)
- const __ptr_t s1;
- const __ptr_t s2;
- size_t len;
-{
- op_t a0;
- op_t b0;
- long int srcp1 = (long int) s1;
- long int srcp2 = (long int) s2;
- op_t res;
-
- if (len >= OP_T_THRES)
- {
- /* There are at least some bytes to compare. No need to test
- for LEN == 0 in this alignment loop. */
- while (srcp2 % OPSIZ != 0)
- {
- a0 = ((byte *) srcp1)[0];
- b0 = ((byte *) srcp2)[0];
- srcp1 += 1;
- srcp2 += 1;
- res = a0 - b0;
- if (res != 0)
- return res;
- len -= 1;
- }
-
- /* SRCP2 is now aligned for memory operations on `op_t'.
- SRCP1 alignment determines if we can do a simple,
- aligned compare or need to shuffle bits. */
-
- if (srcp1 % OPSIZ == 0)
- res = memcmp_common_alignment (srcp1, srcp2, len / OPSIZ);
- else
- res = memcmp_not_common_alignment (srcp1, srcp2, len / OPSIZ);
- if (res != 0)
- return res;
-
- /* Number of bytes remaining in the interval [0..OPSIZ-1]. */
- srcp1 += len & -OPSIZ;
- srcp2 += len & -OPSIZ;
- len %= OPSIZ;
- }
-
- /* There are just a few bytes to compare. Use byte memory operations. */
- while (len != 0)
- {
- a0 = ((byte *) srcp1)[0];
- b0 = ((byte *) srcp2)[0];
- srcp1 += 1;
- srcp2 += 1;
- res = a0 - b0;
- if (res != 0)
- return res;
- len -= 1;
- }
-
- return 0;
-}
-
-#ifdef weak_alias
-# undef bcmp
-weak_alias (memcmp, bcmp)
-#endif
diff --git a/lib/memmove.c b/lib/memmove.c
deleted file mode 100644
index a0d730e..0000000
--- a/lib/memmove.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
- USA. */
-
-/* Last ditch effort to support memmove: if user doesn't have
- memmove or bcopy, we offer this sluggish implementation. */
-
-#include "config.h"
-#ifndef HAVE_MEMMOVE
-
-#include <sys/types.h>
-#ifdef HAVE_MEMORY_H
-# include <memory.h>
-#endif
-
-#ifndef VOID
-# define VOID void
-#endif
-
-VOID *
-memmove(dest, src, len)
- VOID *dest;
- const VOID *src;
- size_t len;
-{
-#ifdef HAVE_BCOPY
- bcopy(src, dest, len);
-
-#else /*!HAVE_BCOPY*/
- char *dp = dest;
- const char *sp = src;
-
-# ifdef HAVE_MEMCPY
- /* A special-case for non-overlapping regions, on the assumption
- that there is some hope that the sytem's memcpy() implementaion
- is better than our dumb fall-back one. */
- if ((dp < sp && dp+len < sp) || (sp < dp && sp+len < dp))
- return memcpy(dest, src, len);
-# endif
-
- /* I tried real hard to avoid getting to this point.
- You *really* ought to upgrade your system's libraries;
- the performance of this implementation sucks. */
- if (dp < sp)
- {
- while (len-- > 0)
- *dp++ = *sp++;
- }
- else
- {
- if (dp == sp)
- return dest;
- dp += len;
- sp += len;
- while (len-- > 0)
- *--dp = *--sp;
- }
-#endif /*!HAVE_BCOPY*/
-
- return dest;
-}
-
-#endif /*!HAVE_MEMMOVE*/
diff --git a/lib/mkstemp.c b/lib/mkstemp.c
index 5b00205..1b052f9 100644
--- a/lib/mkstemp.c
+++ b/lib/mkstemp.c
@@ -1,70 +1,44 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+/* Copyright (C) 1998, 1999, 2001, 2005, 2006, 2007 Free Software Foundation, Inc.
+ This file is derived from the one in the GNU C Library.
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#else
-# include <string.h>
-#endif /* HAVE_STRINGS_H */
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#endif /* HAVE_STDLIB_H */
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-#ifdef HAVE_SYS_FILE_H
-# include <sys/file.h>
-#endif /* HAVE_SYS_FILE_H */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_IO_H
-# include <io.h>
-#endif /* HAVE_IO_H */
+#if !_LIBC
+# include <config.h>
+#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
+#include <stdlib.h>
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif /* HAVE_FCNTL_H */
+#if !_LIBC
+# include "tempname.h"
+# define __gen_tempname gen_tempname
+# define __GT_FILE GT_FILE
+#endif
-#include <limits.h>
-#include <errno.h>
+#include <stdio.h>
-/* Generate a unique temporary file name from template. The last six characters of
- template must be XXXXXX and these are replaced with a string that makes the
- filename unique. */
+#ifndef __GT_FILE
+# define __GT_FILE 0
+#endif
+/* Generate a unique temporary file name from TEMPLATE.
+ The last six characters of TEMPLATE must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ Then open the file and return a fd. */
int
mkstemp (template)
char *template;
{
- int i, j, n, fd;
- char *data = template + strlen(template) - 6;
-
- if (data < template) {
- errno = EINVAL;
- return -1;
- }
-
- for (n = 0; n <= 5; n++)
- if (data[n] != 'X') {
- errno = EINVAL;
- return -1;
- }
-
- for (i = 0; i < INT_MAX; i++) {
- j = i ^ 827714841; /* Base 36 DOSSUX :-) */
- for (n = 5; n >= 0; n--) {
- data[n] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" [j % 36];
- j /= 36;
- }
-
- fd = open (template, O_CREAT|O_EXCL|O_RDWR, 0600);
- if (fd != -1)
- return fd;
- }
-
- errno = EEXIST;
- return -1;
+ return __gen_tempname (template, __GT_FILE);
}
diff --git a/lib/obstack.c b/lib/obstack.c
index 14e472b..5b87466 100644
--- a/lib/obstack.c
+++ b/lib/obstack.c
@@ -1,30 +1,30 @@
-/* obstack.c - subroutines used implicitly by object stack macros -*- C -*-
- Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc.
+/* obstack.c - subroutines used implicitly by object stack macros
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however. The master source lives in /gd/gnu/lib.
+ Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+ Foundation, Inc.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
+#ifdef _LIBC
+# include <obstack.h>
+# include <shlib-compat.h>
+#else
+# include <config.h>
+# include "obstack.h"
#endif
-#include "obstack.h"
-
/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
incremented whenever callers compiled using an old obstack.h can no
longer properly call the functions in this obstack.c. */
@@ -40,68 +40,76 @@
files, it is simpler to just do this in the source for each such file. */
#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
-#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
-#include <gnu-versions.h>
-#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
-#define ELIDE_CODE
-#endif
+#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
+# include <gnu-versions.h>
+# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
+# define ELIDE_CODE
+# endif
#endif
+#include <stddef.h>
#ifndef ELIDE_CODE
-
-#if defined (__STDC__) && __STDC__
-#define POINTER void *
-#else
-#define POINTER char *
-#endif
+# include <stdint.h>
/* Determine default alignment. */
-struct fooalign {char x; double d;};
-#define DEFAULT_ALIGNMENT \
- ((PTR_INT_TYPE) ((char *) &((struct fooalign *) 0)->d - (char *) 0))
+union fooround
+{
+ uintmax_t i;
+ long double d;
+ void *p;
+};
+struct fooalign
+{
+ char c;
+ union fooround u;
+};
/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
But in fact it might be less smart and round addresses to as much as
DEFAULT_ROUNDING. So we prepare for it to do that. */
-union fooround {long x; double d;};
-#define DEFAULT_ROUNDING (sizeof (union fooround))
-
-#ifdef original_glibc_code
-/**//* When we copy a long block of data, this is the unit to do it with. */
-/**//* On some machines, copying successive ints does not work; */
-/**//* in such a case, redefine COPYING_UNIT to `long' (if that works) */
-/**//* or `char' as a last resort. */
-/**/#ifndef COPYING_UNIT
-/**/#define COPYING_UNIT int
-/**/#endif
-#endif
+enum
+ {
+ DEFAULT_ALIGNMENT = offsetof (struct fooalign, u),
+ DEFAULT_ROUNDING = sizeof (union fooround)
+ };
+
+/* When we copy a long block of data, this is the unit to do it with.
+ On some machines, copying successive ints does not work;
+ in such a case, redefine COPYING_UNIT to `long' (if that works)
+ or `char' as a last resort. */
+# ifndef COPYING_UNIT
+# define COPYING_UNIT int
+# endif
+
/* The functions allocating more room by calling `obstack_chunk_alloc'
jump to the handler pointed to by `obstack_alloc_failed_handler'.
- This variable by default points to the internal function
+ This can be set to a user defined function which should either
+ abort gracefully or use longjump - but shouldn't return. This
+ variable by default points to the internal function
`print_and_abort'. */
-#if defined (__STDC__) && __STDC__
static void print_and_abort (void);
void (*obstack_alloc_failed_handler) (void) = print_and_abort;
-#else
-static void print_and_abort ();
-void (*obstack_alloc_failed_handler) () = print_and_abort;
-#endif
/* Exit value used when `print_and_abort' is used. */
-#if defined __GNU_LIBRARY__ || defined HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifndef EXIT_FAILURE
-#define EXIT_FAILURE 1
-#endif
+# include <stdlib.h>
+# ifdef _LIBC
int obstack_exit_failure = EXIT_FAILURE;
+# else
+# include "exitfail.h"
+# define obstack_exit_failure exit_failure
+# endif
-/* The non-GNU-C macros copy the obstack into this global variable
- to avoid multiple evaluation. */
-
-struct obstack *_obstack;
+# ifdef _LIBC
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
+/* A looong time ago (before 1994, anyway; we're not sure) this global variable
+ was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
+ library still exports it because somebody might use it. */
+struct obstack *_obstack_compat;
+compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
+# endif
+# endif
/* Define a macro that either calls functions with the traditional malloc/free
calling interface, or calls functions with the mmalloc/mfree interface
@@ -109,33 +117,18 @@ struct obstack *_obstack;
For free, do not use ?:, since some compilers, like the MIPS compilers,
do not allow (expr) ? void : void. */
-#if defined (__STDC__) && __STDC__
-#define CALL_CHUNKFUN(h, size) \
+# define CALL_CHUNKFUN(h, size) \
(((h) -> use_extra_arg) \
? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
: (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
-#define CALL_FREEFUN(h, old_chunk) \
+# define CALL_FREEFUN(h, old_chunk) \
do { \
if ((h) -> use_extra_arg) \
(*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
else \
(*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
} while (0)
-#else
-#define CALL_CHUNKFUN(h, size) \
- (((h) -> use_extra_arg) \
- ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
- : (*(struct _obstack_chunk *(*) ()) (h)->chunkfun) ((size)))
-
-#define CALL_FREEFUN(h, old_chunk) \
- do { \
- if ((h) -> use_extra_arg) \
- (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
- else \
- (*(void (*) ()) (h)->freefun) ((old_chunk)); \
- } while (0)
-#endif
/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
@@ -143,22 +136,14 @@ struct obstack *_obstack;
CHUNKFUN is the function to use to allocate chunks,
and FREEFUN the function to free them.
- Return nonzero if successful, zero if out of memory.
- To recover from an out of memory error,
- free up some memory, then call this again. */
+ Return nonzero if successful, calls obstack_alloc_failed_handler if
+ allocation fails. */
int
-_obstack_begin (h, size, alignment, chunkfun, freefun)
- struct obstack *h;
- int size;
- int alignment;
-#if defined (__STDC__) && __STDC__
- POINTER (*chunkfun) (long);
- void (*freefun) (void *);
-#else
- POINTER (*chunkfun) ();
- void (*freefun) ();
-#endif
+_obstack_begin (struct obstack *h,
+ int size, int alignment,
+ void *(*chunkfun) (long),
+ void (*freefun) (void *))
{
register struct _obstack_chunk *chunk; /* points to new chunk */
@@ -181,13 +166,8 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
size = 4096 - extra;
}
-#if defined (__STDC__) && __STDC__
h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
-#else
- h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
- h->freefun = freefun;
-#endif
h->chunk_size = size;
h->alignment_mask = alignment - 1;
h->use_extra_arg = 0;
@@ -195,7 +175,8 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
if (!chunk)
(*obstack_alloc_failed_handler) ();
- h->next_free = h->object_base = chunk->contents;
+ h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
+ alignment - 1);
h->chunk_limit = chunk->limit
= (char *) chunk + h->chunk_size;
chunk->prev = 0;
@@ -206,18 +187,10 @@ _obstack_begin (h, size, alignment, chunkfun, freefun)
}
int
-_obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
- struct obstack *h;
- int size;
- int alignment;
-#if defined (__STDC__) && __STDC__
- POINTER (*chunkfun) (POINTER, long);
- void (*freefun) (POINTER, POINTER);
-#else
- POINTER (*chunkfun) ();
- void (*freefun) ();
-#endif
- POINTER arg;
+_obstack_begin_1 (struct obstack *h, int size, int alignment,
+ void *(*chunkfun) (void *, long),
+ void (*freefun) (void *, void *),
+ void *arg)
{
register struct _obstack_chunk *chunk; /* points to new chunk */
@@ -240,13 +213,8 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
size = 4096 - extra;
}
-#if defined(__STDC__) && __STDC__
h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
-#else
- h->chunkfun = (struct _obstack_chunk * (*)()) chunkfun;
- h->freefun = freefun;
-#endif
h->chunk_size = size;
h->alignment_mask = alignment - 1;
h->extra_arg = arg;
@@ -255,7 +223,8 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
if (!chunk)
(*obstack_alloc_failed_handler) ();
- h->next_free = h->object_base = chunk->contents;
+ h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
+ alignment - 1);
h->chunk_limit = chunk->limit
= (char *) chunk + h->chunk_size;
chunk->prev = 0;
@@ -272,17 +241,18 @@ _obstack_begin_1 (h, size, alignment, chunkfun, freefun, arg)
to the beginning of the new one. */
void
-_obstack_newchunk (h, length)
- struct obstack *h;
- int length;
+_obstack_newchunk (struct obstack *h, int length)
{
register struct _obstack_chunk *old_chunk = h->chunk;
register struct _obstack_chunk *new_chunk;
register long new_size;
- register int obj_size = h->next_free - h->object_base;
+ register long obj_size = h->next_free - h->object_base;
+ register long i;
+ long already;
+ char *object_base;
/* Compute size for new chunk. */
- new_size = (obj_size + length) + (obj_size >> 3) + 100;
+ new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 100;
if (new_size < h->chunk_size)
new_size = h->chunk_size;
@@ -294,37 +264,61 @@ _obstack_newchunk (h, length)
new_chunk->prev = old_chunk;
new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
- _obstack_memcpy(new_chunk->contents, h->object_base, obj_size);
+ /* Compute an aligned object_base in the new chunk */
+ object_base =
+ __PTR_ALIGN ((char *) new_chunk, new_chunk->contents, h->alignment_mask);
- /* If the object just copied was the only data in OLD_CHUNK, */
- /* free that chunk and remove it from the chain. */
- /* But not if that chunk might contain an empty object. */
- if (h->object_base == old_chunk->contents && ! h->maybe_empty_object)
+ /* Move the existing object to the new chunk.
+ Word at a time is fast and is safe if the object
+ is sufficiently aligned. */
+ if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT)
+ {
+ for (i = obj_size / sizeof (COPYING_UNIT) - 1;
+ i >= 0; i--)
+ ((COPYING_UNIT *)object_base)[i]
+ = ((COPYING_UNIT *)h->object_base)[i];
+ /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT,
+ but that can cross a page boundary on a machine
+ which does not do strict alignment for COPYING_UNITS. */
+ already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT);
+ }
+ else
+ already = 0;
+ /* Copy remaining bytes one by one. */
+ for (i = already; i < obj_size; i++)
+ object_base[i] = h->object_base[i];
+
+ /* If the object just copied was the only data in OLD_CHUNK,
+ free that chunk and remove it from the chain.
+ But not if that chunk might contain an empty object. */
+ if (! h->maybe_empty_object
+ && (h->object_base
+ == __PTR_ALIGN ((char *) old_chunk, old_chunk->contents,
+ h->alignment_mask)))
{
new_chunk->prev = old_chunk->prev;
CALL_FREEFUN (h, old_chunk);
}
- h->object_base = new_chunk->contents;
+ h->object_base = object_base;
h->next_free = h->object_base + obj_size;
/* The new chunk certainly contains no empty object yet. */
h->maybe_empty_object = 0;
}
+# ifdef _LIBC
+libc_hidden_def (_obstack_newchunk)
+# endif
/* Return nonzero if object OBJ has been allocated from obstack H.
This is here for debugging.
If you use it in a program, you are probably losing. */
-#if defined (__STDC__) && __STDC__
/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
obstack.h because it is just for debugging. */
-int _obstack_allocated_p (struct obstack *h, POINTER obj);
-#endif
+int _obstack_allocated_p (struct obstack *h, void *obj);
int
-_obstack_allocated_p (h, obj)
- struct obstack *h;
- POINTER obj;
+_obstack_allocated_p (struct obstack *h, void *obj)
{
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
register struct _obstack_chunk *plp; /* point to previous chunk if any */
@@ -333,7 +327,7 @@ _obstack_allocated_p (h, obj)
/* We use >= rather than > since the object cannot be exactly at
the beginning of the chunk but might be an empty object exactly
at the end of an adjacent chunk. */
- while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
+ while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj))
{
plp = lp->prev;
lp = plp;
@@ -344,15 +338,10 @@ _obstack_allocated_p (h, obj)
/* Free objects in obstack H, including OBJ and everything allocate
more recently than OBJ. If OBJ is zero, free everything in H. */
-#undef obstack_free
-
-/* This function has two names with identical definitions.
- This is the first one, called from non-ANSI code. */
+# undef obstack_free
void
-_obstack_free (h, obj)
- struct obstack *h;
- POINTER obj;
+__obstack_free (struct obstack *h, void *obj)
{
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
register struct _obstack_chunk *plp; /* point to previous chunk if any */
@@ -361,7 +350,7 @@ _obstack_free (h, obj)
/* We use >= because there cannot be an object at the beginning of a chunk.
But there can be an empty object at that address
at the end of another chunk. */
- while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
+ while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj))
{
plp = lp->prev;
CALL_FREEFUN (h, lp);
@@ -381,43 +370,14 @@ _obstack_free (h, obj)
abort ();
}
-/* This function is used from ANSI code. */
-
-void
-obstack_free (h, obj)
- struct obstack *h;
- POINTER obj;
-{
- register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
-
- lp = h->chunk;
- /* We use >= because there cannot be an object at the beginning of a chunk.
- But there can be an empty object at that address
- at the end of another chunk. */
- while (lp != 0 && ((POINTER) lp >= obj || (POINTER) (lp)->limit < obj))
- {
- plp = lp->prev;
- CALL_FREEFUN (h, lp);
- lp = plp;
- /* If we switch chunks, we can't tell whether the new current
- chunk contains an empty object, so assume that it may. */
- h->maybe_empty_object = 1;
- }
- if (lp)
- {
- h->object_base = h->next_free = (char *) (obj);
- h->chunk_limit = lp->limit;
- h->chunk = lp;
- }
- else if (obj != 0)
- /* obj is not in any of the chunks! */
- abort ();
-}
+# ifdef _LIBC
+/* Older versions of libc used a function _obstack_free intended to be
+ called by non-GCC compilers. */
+strong_alias (obstack_free, _obstack_free)
+# endif
int
-_obstack_memory_used (h)
- struct obstack *h;
+_obstack_memory_used (struct obstack *h)
{
register struct _obstack_chunk* lp;
register int nbytes = 0;
@@ -430,144 +390,41 @@ _obstack_memory_used (h)
}
/* Define the error handler. */
-#ifndef _
-# ifdef HAVE_LIBINTL_H
+# ifdef _LIBC
# include <libintl.h>
-# ifndef _
-# define _(Str) gettext (Str)
-# endif
# else
-# define _(Str) (Str)
+# include "gettext.h"
+# endif
+# ifndef _
+# define _(msgid) gettext (msgid)
# endif
-#endif
-
-static void
-print_and_abort ()
-{
- fputs (_("memory exhausted\n"), stderr);
- exit (obstack_exit_failure);
-}
-
-#if 0
-/* These are now turned off because the applications do not use it
- and it uses bcopy via obstack_grow, which causes trouble on sysV. */
-
-/* Now define the functional versions of the obstack macros.
- Define them to simply use the corresponding macros to do the job. */
-
-#if defined (__STDC__) && __STDC__
-/* These function definitions do not work with non-ANSI preprocessors;
- they won't pass through the macro names in parentheses. */
-
-/* The function names appear in parentheses in order to prevent
- the macro-definitions of the names from being expanded there. */
-
-POINTER (obstack_base) (obstack)
- struct obstack *obstack;
-{
- return obstack_base (obstack);
-}
-
-POINTER (obstack_next_free) (obstack)
- struct obstack *obstack;
-{
- return obstack_next_free (obstack);
-}
-
-int (obstack_object_size) (obstack)
- struct obstack *obstack;
-{
- return obstack_object_size (obstack);
-}
-
-int (obstack_room) (obstack)
- struct obstack *obstack;
-{
- return obstack_room (obstack);
-}
-
-int (obstack_make_room) (obstack, length)
- struct obstack *obstack;
- int length;
-{
- return obstack_make_room (obstack, length);
-}
-
-void (obstack_grow) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
-{
- obstack_grow (obstack, pointer, length);
-}
-
-void (obstack_grow0) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
-{
- obstack_grow0 (obstack, pointer, length);
-}
-
-void (obstack_1grow) (obstack, character)
- struct obstack *obstack;
- int character;
-{
- obstack_1grow (obstack, character);
-}
-
-void (obstack_blank) (obstack, length)
- struct obstack *obstack;
- int length;
-{
- obstack_blank (obstack, length);
-}
-
-void (obstack_1grow_fast) (obstack, character)
- struct obstack *obstack;
- int character;
-{
- obstack_1grow_fast (obstack, character);
-}
-
-void (obstack_blank_fast) (obstack, length)
- struct obstack *obstack;
- int length;
-{
- obstack_blank_fast (obstack, length);
-}
-
-POINTER (obstack_finish) (obstack)
- struct obstack *obstack;
-{
- return obstack_finish (obstack);
-}
-POINTER (obstack_alloc) (obstack, length)
- struct obstack *obstack;
- int length;
-{
- return obstack_alloc (obstack, length);
-}
+# ifdef _LIBC
+# include <libio/iolibio.h>
+# endif
-POINTER (obstack_copy) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
-{
- return obstack_copy (obstack, pointer, length);
-}
+# ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+# define __attribute__(Spec) /* empty */
+# endif
+# endif
-POINTER (obstack_copy0) (obstack, pointer, length)
- struct obstack *obstack;
- POINTER pointer;
- int length;
+static void
+__attribute__ ((noreturn))
+print_and_abort (void)
{
- return obstack_copy0 (obstack, pointer, length);
+ /* Don't change any of these strings. Yes, it would be possible to add
+ the newline to the string and use fputs or so. But this must not
+ happen because the "memory exhausted" message appears in other places
+ like this and the translation should be reused instead of creating
+ a very similar string which requires a separate translation. */
+# ifdef _LIBC
+ (void) __fxprintf (NULL, "%s\n", _("memory exhausted"));
+# else
+ fprintf (stderr, "%s\n", _("memory exhausted"));
+# endif
+ exit (obstack_exit_failure);
}
-#endif /* __STDC__ */
-
-#endif /* 0 */
-
#endif /* !ELIDE_CODE */
diff --git a/lib/obstack.h b/lib/obstack.h
index f77825c..1bf4b2f 100644
--- a/lib/obstack.h
+++ b/lib/obstack.h
@@ -1,22 +1,20 @@
/* obstack.h - object stack macros
- Copyright (C) 1988,89,90,91,92,93,94,96,97,98,99 Free Software Foundation, Inc.
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however. The master source lives in /gd/gnu/lib.
+ Copyright (C) 1988-1994,1996-1999,2003,2004,2005,2006
+ 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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the 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,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
- 02110-1301 USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Summary:
@@ -106,53 +104,40 @@ Summary:
#ifndef _OBSTACK_H
#define _OBSTACK_H 1
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
#ifdef __cplusplus
extern "C" {
#endif
-/* We use subtraction of (char *) 0 instead of casting to int
- because on word-addressable machines a simple cast to int
- may ignore the byte-within-word field of the pointer. */
-
-#ifndef __PTR_TO_INT
-# define __PTR_TO_INT(P) ((P) - (char *) 0)
-#endif
-
-#ifndef __INT_TO_PTR
-# define __INT_TO_PTR(P) ((P) + (char *) 0)
-#endif
-
-/* We need the type of the resulting object. If __PTRDIFF_TYPE__ is
+/* We need the type of a pointer subtraction. If __PTRDIFF_TYPE__ is
defined, as with GNU C, use that; that way we don't pollute the
- namespace with <stddef.h>'s symbols. Otherwise, if <stddef.h> is
- available, include it and use ptrdiff_t. In traditional C, long is
- the best that we can do. */
+ namespace with <stddef.h>'s symbols. Otherwise, include <stddef.h>
+ and use ptrdiff_t. */
#ifdef __PTRDIFF_TYPE__
# define PTR_INT_TYPE __PTRDIFF_TYPE__
#else
-# ifdef HAVE_STDDEF_H
-# include <stddef.h>
-# define PTR_INT_TYPE ptrdiff_t
-# else
-# define PTR_INT_TYPE long
-# endif
+# include <stddef.h>
+# define PTR_INT_TYPE ptrdiff_t
#endif
-#if defined _LIBC || defined HAVE_STRING_H
-# include <string.h>
-# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
-#else
-# ifdef memcpy
-# define _obstack_memcpy(To, From, N) memcpy ((To), (From), (N))
-# else
-# define _obstack_memcpy(To, From, N) bcopy ((From), (To), (N))
-# endif
-#endif
+/* If B is the base of an object addressed by P, return the result of
+ aligning P to the next multiple of A + 1. B and P must be of type
+ char *. A + 1 must be a power of 2. */
+
+#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
+
+/* Similiar to _BPTR_ALIGN (B, P, A), except optimize the common case
+ where pointers can be converted to integers, aligned as integers,
+ and converted back again. If PTR_INT_TYPE is narrower than a
+ pointer (e.g., the AS/400), play it safe and compute the alignment
+ relative to B. Otherwise, use the faster strategy of computing the
+ alignment relative to 0. */
+
+#define __PTR_ALIGN(B, P, A) \
+ __BPTR_ALIGN (sizeof (PTR_INT_TYPE) < sizeof (void *) ? (B) : (char *) 0, \
+ P, A)
+
+#include <string.h>
struct _obstack_chunk /* Lives at front of each chunk. */
{
@@ -168,20 +153,18 @@ struct obstack /* control current object in current chunk */
char *object_base; /* address of object we are building */
char *next_free; /* where to add next char to current object */
char *chunk_limit; /* address of char after current chunk */
- PTR_INT_TYPE temp; /* Temporary for some macros. */
+ union
+ {
+ PTR_INT_TYPE tempint;
+ void *tempptr;
+ } temp; /* Temporary for some macros. */
int alignment_mask; /* Mask of alignment for each object. */
-#if defined __STDC__ && __STDC__
/* These prototypes vary based on `use_extra_arg', and we use
casts to the prototypeless function type in all assignments,
but having prototypes here quiets -Wstrict-prototypes. */
struct _obstack_chunk *(*chunkfun) (void *, long);
void (*freefun) (void *, struct _obstack_chunk *);
void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
-#else
- struct _obstack_chunk *(*chunkfun) (); /* User's fcn to allocate a chunk. */
- void (*freefun) (); /* User's function to free a chunk. */
- char *extra_arg; /* first arg for chunk alloc/dealloc funcs */
-#endif
unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
unsigned maybe_empty_object:1;/* There is a possibility that the current
chunk contains a zero-length object. This
@@ -194,77 +177,27 @@ struct obstack /* control current object in current chunk */
/* Declare the external functions we use; they are in obstack.c. */
-#if defined __STDC__ && __STDC__
extern void _obstack_newchunk (struct obstack *, int);
-extern void _obstack_free (struct obstack *, void *);
extern int _obstack_begin (struct obstack *, int, int,
void *(*) (long), void (*) (void *));
extern int _obstack_begin_1 (struct obstack *, int, int,
void *(*) (void *, long),
void (*) (void *, void *), void *);
extern int _obstack_memory_used (struct obstack *);
-#else
-extern void _obstack_newchunk ();
-extern void _obstack_free ();
-extern int _obstack_begin ();
-extern int _obstack_begin_1 ();
-extern int _obstack_memory_used ();
-#endif
-
-#if defined __STDC__ && __STDC__
-
-/* Do the function-declarations after the structs
- but before defining the macros. */
-
-void obstack_init (struct obstack *obstack);
-
-void * obstack_alloc (struct obstack *obstack, int size);
-
-void * obstack_copy (struct obstack *obstack, const void *address, int size);
-void * obstack_copy0 (struct obstack *obstack, const void *address, int size);
-
-void obstack_free (struct obstack *obstack, void *block);
-
-void obstack_blank (struct obstack *obstack, int size);
-
-void obstack_grow (struct obstack *obstack, const void *data, int size);
-void obstack_grow0 (struct obstack *obstack, const void *data, int size);
-
-void obstack_1grow (struct obstack *obstack, int data_char);
-void obstack_ptr_grow (struct obstack *obstack, const void *data);
-void obstack_int_grow (struct obstack *obstack, int data);
-
-void * obstack_finish (struct obstack *obstack);
-
-int obstack_object_size (struct obstack *obstack);
-
-int obstack_room (struct obstack *obstack);
-void obstack_make_room (struct obstack *obstack, int size);
-void obstack_1grow_fast (struct obstack *obstack, int data_char);
-void obstack_ptr_grow_fast (struct obstack *obstack, const void *data);
-void obstack_int_grow_fast (struct obstack *obstack, int data);
-void obstack_blank_fast (struct obstack *obstack, int size);
-
-void * obstack_base (struct obstack *obstack);
-void * obstack_next_free (struct obstack *obstack);
-int obstack_alignment_mask (struct obstack *obstack);
-int obstack_chunk_size (struct obstack *obstack);
-int obstack_memory_used (struct obstack *obstack);
-#endif /* __STDC__ */
-
-/* Non-ANSI C cannot really support alternative functions for these macros,
- so we do not declare them. */
+/* The default name of the function for freeing a chunk is 'obstack_free',
+ but gnulib users can override this by defining '__obstack_free'. */
+#ifndef __obstack_free
+# define __obstack_free obstack_free
+#endif
+extern void __obstack_free (struct obstack *obstack, void *block);
+
/* Error handler called when `obstack_chunk_alloc' failed to allocate
more memory. This can be set to a user defined function which
should either abort gracefully or use longjump - but shouldn't
return. The default action is to print a message and abort. */
-#if defined __STDC__ && __STDC__
extern void (*obstack_alloc_failed_handler) (void);
-#else
-extern void (*obstack_alloc_failed_handler) ();
-#endif
/* Exit value used when `print_and_abort' is used. */
extern int obstack_exit_failure;
@@ -273,7 +206,7 @@ extern int obstack_exit_failure;
Note that this might not be the final address of the object
because a new chunk might be needed to hold the final size. */
-#define obstack_base(h) ((h)->object_base)
+#define obstack_base(h) ((void *) (h)->object_base)
/* Size for allocating ordinary chunks. */
@@ -287,67 +220,34 @@ extern int obstack_exit_failure;
#define obstack_alignment_mask(h) ((h)->alignment_mask)
-/* To prevent prototype warnings provide complete argument list in
- standard C version. */
-#if defined __STDC__ && __STDC__
-
-# define obstack_init(h) \
+/* To prevent prototype warnings provide complete argument list. */
+#define obstack_init(h) \
_obstack_begin ((h), 0, 0, \
- (void *(*) (long)) obstack_chunk_alloc, \
+ (void *(*) (long)) obstack_chunk_alloc, \
(void (*) (void *)) obstack_chunk_free)
-# define obstack_begin(h, size) \
+#define obstack_begin(h, size) \
_obstack_begin ((h), (size), 0, \
- (void *(*) (long)) obstack_chunk_alloc, \
+ (void *(*) (long)) obstack_chunk_alloc, \
(void (*) (void *)) obstack_chunk_free)
-# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
_obstack_begin ((h), (size), (alignment), \
- (void *(*) (long)) (chunkfun), \
+ (void *(*) (long)) (chunkfun), \
(void (*) (void *)) (freefun))
-# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
+#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
_obstack_begin_1 ((h), (size), (alignment), \
(void *(*) (void *, long)) (chunkfun), \
(void (*) (void *, void *)) (freefun), (arg))
-# define obstack_chunkfun(h, newchunkfun) \
+#define obstack_chunkfun(h, newchunkfun) \
((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
-# define obstack_freefun(h, newfreefun) \
+#define obstack_freefun(h, newfreefun) \
((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
-#else
-
-# define obstack_init(h) \
- _obstack_begin ((h), 0, 0, \
- (void *(*) ()) obstack_chunk_alloc, \
- (void (*) ()) obstack_chunk_free)
-
-# define obstack_begin(h, size) \
- _obstack_begin ((h), (size), 0, \
- (void *(*) ()) obstack_chunk_alloc, \
- (void (*) ()) obstack_chunk_free)
-
-# define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
- _obstack_begin ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), \
- (void (*) ()) (freefun))
-
-# define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
- _obstack_begin_1 ((h), (size), (alignment), \
- (void *(*) ()) (chunkfun), \
- (void (*) ()) (freefun), (arg))
-
-# define obstack_chunkfun(h, newchunkfun) \
- ((h) -> chunkfun = (struct _obstack_chunk *(*)()) (newchunkfun))
-
-# define obstack_freefun(h, newfreefun) \
- ((h) -> freefun = (void (*)()) (newfreefun))
-
-#endif
-
-#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = achar)
+#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
#define obstack_blank_fast(h,n) ((h)->next_free += (n))
@@ -368,12 +268,12 @@ extern int obstack_exit_failure;
# define obstack_object_size(OBSTACK) \
__extension__ \
- ({ struct obstack *__o = (OBSTACK); \
+ ({ struct obstack const *__o = (OBSTACK); \
(unsigned) (__o->next_free - __o->object_base); })
# define obstack_room(OBSTACK) \
__extension__ \
- ({ struct obstack *__o = (OBSTACK); \
+ ({ struct obstack const *__o = (OBSTACK); \
(unsigned) (__o->chunk_limit - __o->next_free); })
# define obstack_make_room(OBSTACK,length) \
@@ -386,8 +286,11 @@ __extension__ \
# define obstack_empty_p(OBSTACK) \
__extension__ \
- ({ struct obstack *__o = (OBSTACK); \
- (__o->chunk->prev == 0 && __o->next_free - __o->chunk->contents == 0); })
+ ({ struct obstack const *__o = (OBSTACK); \
+ (__o->chunk->prev == 0 \
+ && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
+ __o->chunk->contents, \
+ __o->alignment_mask)); })
# define obstack_grow(OBSTACK,where,length) \
__extension__ \
@@ -395,7 +298,7 @@ __extension__ \
int __len = (length); \
if (__o->next_free + __len > __o->chunk_limit) \
_obstack_newchunk (__o, __len); \
- _obstack_memcpy (__o->next_free, (where), __len); \
+ memcpy (__o->next_free, where, __len); \
__o->next_free += __len; \
(void) 0; })
@@ -405,7 +308,7 @@ __extension__ \
int __len = (length); \
if (__o->next_free + __len + 1 > __o->chunk_limit) \
_obstack_newchunk (__o, __len + 1); \
- _obstack_memcpy (__o->next_free, (where), __len); \
+ memcpy (__o->next_free, where, __len); \
__o->next_free += __len; \
*(__o->next_free)++ = 0; \
(void) 0; })
@@ -415,7 +318,7 @@ __extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + 1 > __o->chunk_limit) \
_obstack_newchunk (__o, 1); \
- *(__o->next_free)++ = (datum); \
+ obstack_1grow_fast (__o, datum); \
(void) 0; })
/* These assume that the obstack alignment is good enough for pointers
@@ -427,22 +330,28 @@ __extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
_obstack_newchunk (__o, sizeof (void *)); \
- ((*((void **)__o->next_free) = (datum)), (__o->next_free += sizeof (void *))); \
- (void) 0; })
+ obstack_ptr_grow_fast (__o, datum); }) \
# define obstack_int_grow(OBSTACK,datum) \
__extension__ \
({ struct obstack *__o = (OBSTACK); \
if (__o->next_free + sizeof (int) > __o->chunk_limit) \
_obstack_newchunk (__o, sizeof (int)); \
- ((*((int *)__o->next_free) = (datum)), (__o->next_free += sizeof (int ))); \
- (void) 0; })
+ obstack_int_grow_fast (__o, datum); })
-# define obstack_ptr_grow_fast(h,aptr) \
- (((*((void **) (h)->next_free) = (aptr)), ( (h)->next_free += sizeof (void *))))
+# define obstack_ptr_grow_fast(OBSTACK,aptr) \
+__extension__ \
+({ struct obstack *__o1 = (OBSTACK); \
+ *(const void **) __o1->next_free = (aptr); \
+ __o1->next_free += sizeof (const void *); \
+ (void) 0; })
-# define obstack_int_grow_fast(h,aint) \
- (((*((int *) (h)->next_free) = (aint)), ( (h)->next_free += sizeof (int ))))
+# define obstack_int_grow_fast(OBSTACK,aint) \
+__extension__ \
+({ struct obstack *__o1 = (OBSTACK); \
+ *(int *) __o1->next_free = (aint); \
+ __o1->next_free += sizeof (int); \
+ (void) 0; })
# define obstack_blank(OBSTACK,length) \
__extension__ \
@@ -450,7 +359,7 @@ __extension__ \
int __len = (length); \
if (__o->chunk_limit - __o->next_free < __len) \
_obstack_newchunk (__o, __len); \
- __o->next_free += __len; \
+ obstack_blank_fast (__o, __len); \
(void) 0; })
# define obstack_alloc(OBSTACK,length) \
@@ -473,21 +382,20 @@ __extension__ \
/* The local variable is named __o1 to avoid a name conflict
when obstack_blank is called. */
-# define obstack_finish(OBSTACK) \
+# define obstack_finish(OBSTACK) \
__extension__ \
({ struct obstack *__o1 = (OBSTACK); \
- void *value; \
- value = (void *) __o1->object_base; \
- if (__o1->next_free == value) \
+ void *__value = (void *) __o1->object_base; \
+ if (__o1->next_free == __value) \
__o1->maybe_empty_object = 1; \
__o1->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT (__o1->next_free)+__o1->alignment_mask)\
- & ~ (__o1->alignment_mask)); \
+ = __PTR_ALIGN (__o1->object_base, __o1->next_free, \
+ __o1->alignment_mask); \
if (__o1->next_free - (char *)__o1->chunk \
> __o1->chunk_limit - (char *)__o1->chunk) \
__o1->next_free = __o1->chunk_limit; \
__o1->object_base = __o1->next_free; \
- value; })
+ __value; })
# define obstack_free(OBSTACK, OBJ) \
__extension__ \
@@ -495,7 +403,7 @@ __extension__ \
void *__obj = (OBJ); \
if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
__o->next_free = __o->object_base = (char *)__obj; \
- else (obstack_free) (__o, __obj); })
+ else (__obstack_free) (__o, __obj); })
#else /* not __GNUC__ or not __STDC__ */
@@ -506,7 +414,10 @@ __extension__ \
(unsigned) ((h)->chunk_limit - (h)->next_free)
# define obstack_empty_p(h) \
- ((h)->chunk->prev == 0 && (h)->next_free - (h)->chunk->contents == 0)
+ ((h)->chunk->prev == 0 \
+ && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
+ (h)->chunk->contents, \
+ (h)->alignment_mask))
/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
so that we can avoid having void expressions
@@ -515,51 +426,51 @@ __extension__ \
but some compilers won't accept it. */
# define obstack_make_room(h,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0))
+( (h)->temp.tempint = (length), \
+ (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0))
# define obstack_grow(h,where,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- _obstack_memcpy ((h)->next_free, (where), (h)->temp), \
- (h)->next_free += (h)->temp)
+( (h)->temp.tempint = (length), \
+ (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
+ memcpy ((h)->next_free, where, (h)->temp.tempint), \
+ (h)->next_free += (h)->temp.tempint)
# define obstack_grow0(h,where,length) \
-( (h)->temp = (length), \
- (((h)->next_free + (h)->temp + 1 > (h)->chunk_limit) \
- ? (_obstack_newchunk ((h), (h)->temp + 1), 0) : 0), \
- _obstack_memcpy ((h)->next_free, (where), (h)->temp), \
- (h)->next_free += (h)->temp, \
+( (h)->temp.tempint = (length), \
+ (((h)->next_free + (h)->temp.tempint + 1 > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), (h)->temp.tempint + 1), 0) : 0), \
+ memcpy ((h)->next_free, where, (h)->temp.tempint), \
+ (h)->next_free += (h)->temp.tempint, \
*((h)->next_free)++ = 0)
# define obstack_1grow(h,datum) \
( (((h)->next_free + 1 > (h)->chunk_limit) \
? (_obstack_newchunk ((h), 1), 0) : 0), \
- (*((h)->next_free)++ = (datum)))
+ obstack_1grow_fast (h, datum))
# define obstack_ptr_grow(h,datum) \
( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
- (*((const char **) (((h)->next_free+=sizeof(char *))-sizeof(char *))) = (datum)))
+ obstack_ptr_grow_fast (h, datum))
# define obstack_int_grow(h,datum) \
( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
- (*((int *) (((h)->next_free+=sizeof(int))-sizeof(int))) = (datum)))
+ obstack_int_grow_fast (h, datum))
# define obstack_ptr_grow_fast(h,aptr) \
- (((*((const char **) (h)->next_free) = (aptr)), ( (h)->next_free += sizeof (const char *))))
+ (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
# define obstack_int_grow_fast(h,aint) \
- (((*((int *) (h)->next_free) = (aint)), ( (h)->next_free += sizeof (int ))))
+ (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint))
# define obstack_blank(h,length) \
-( (h)->temp = (length), \
- (((h)->chunk_limit - (h)->next_free < (h)->temp) \
- ? (_obstack_newchunk ((h), (h)->temp), 0) : 0), \
- ((h)->next_free += (h)->temp))
+( (h)->temp.tempint = (length), \
+ (((h)->chunk_limit - (h)->next_free < (h)->temp.tempint) \
+ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
+ obstack_blank_fast (h, (h)->temp.tempint))
# define obstack_alloc(h,length) \
(obstack_blank ((h), (length)), obstack_finish ((h)))
@@ -570,35 +481,27 @@ __extension__ \
# define obstack_copy0(h,where,length) \
(obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
-# define obstack_finish(h) \
+# define obstack_finish(h) \
( ((h)->next_free == (h)->object_base \
? (((h)->maybe_empty_object = 1), 0) \
: 0), \
- (h)->temp = __PTR_TO_INT ((h)->object_base), \
+ (h)->temp.tempptr = (h)->object_base, \
(h)->next_free \
- = __INT_TO_PTR ((__PTR_TO_INT ((h)->next_free)+(h)->alignment_mask) \
- & ~ ((h)->alignment_mask)), \
+ = __PTR_ALIGN ((h)->object_base, (h)->next_free, \
+ (h)->alignment_mask), \
(((h)->next_free - (char *) (h)->chunk \
> (h)->chunk_limit - (char *) (h)->chunk) \
? ((h)->next_free = (h)->chunk_limit) : 0), \
(h)->object_base = (h)->next_free, \
- __INT_TO_PTR ((h)->temp))
+ (h)->temp.tempptr)
-# if defined __STDC__ && __STDC__
-# define obstack_free(h,obj) \
-( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
- (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
- ? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0)))
-# else
-# define obstack_free(h,obj) \
-( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \
- (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\
+# define obstack_free(h,obj) \
+( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \
+ ((((h)->temp.tempint > 0 \
+ && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \
? (int) ((h)->next_free = (h)->object_base \
- = (h)->temp + (char *) (h)->chunk) \
- : (_obstack_free ((h), (h)->temp + (char *) (h)->chunk), 0)))
-# endif
+ = (h)->temp.tempint + (char *) (h)->chunk) \
+ : (((__obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
#endif /* not __GNUC__ or not __STDC__ */
diff --git a/lib/pathmax.h b/lib/pathmax.h
new file mode 100644
index 0000000..5776be5
--- /dev/null
+++ b/lib/pathmax.h
@@ -0,0 +1,49 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Define PATH_MAX somehow. Requires sys/types.h.
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _PATHMAX_H
+# define _PATHMAX_H
+
+# include <unistd.h>
+
+# include <limits.h>
+
+# ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 256
+# endif
+
+# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF
+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \
+ : pathconf ("/", _PC_PATH_MAX))
+# endif
+
+/* Don't include sys/param.h if it already has been. */
+# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+# include <sys/param.h>
+# endif
+
+# if !defined PATH_MAX && defined MAXPATHLEN
+# define PATH_MAX MAXPATHLEN
+# endif
+
+# ifndef PATH_MAX
+# define PATH_MAX _POSIX_PATH_MAX
+# endif
+
+#endif /* _PATHMAX_H */
diff --git a/lib/quote.c b/lib/quote.c
new file mode 100644
index 0000000..5e8b764
--- /dev/null
+++ b/lib/quote.c
@@ -0,0 +1,40 @@
+/* quote.c - quote arguments for output
+
+ Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005, 2006 Free
+ Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert <eggert@twinsun.com> */
+
+#include <config.h>
+
+#include "quotearg.h"
+#include "quote.h"
+
+/* Return an unambiguous printable representation of NAME,
+ allocated in slot N, suitable for diagnostics. */
+char const *
+quote_n (int n, char const *name)
+{
+ return quotearg_n_style (n, locale_quoting_style, name);
+}
+
+/* Return an unambiguous printable representation of NAME,
+ suitable for diagnostics. */
+char const *
+quote (char const *name)
+{
+ return quote_n (0, name);
+}
diff --git a/lib/quote.h b/lib/quote.h
new file mode 100644
index 0000000..c3660b1
--- /dev/null
+++ b/lib/quote.h
@@ -0,0 +1,21 @@
+/* quote.h - prototypes for quote.c
+
+ Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+char const *quote_n (int n, char const *name);
+char const *quote (char const *name);
diff --git a/lib/quotearg.c b/lib/quotearg.c
new file mode 100644
index 0000000..339bf34
--- /dev/null
+++ b/lib/quotearg.c
@@ -0,0 +1,799 @@
+/* quotearg.c - quote arguments for output
+
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007,
+ 2008 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert <eggert@twinsun.com> */
+
+#include <config.h>
+
+#include "quotearg.h"
+
+#include "xalloc.h"
+
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+#define INT_BITS (sizeof (int) * CHAR_BIT)
+
+struct quoting_options
+{
+ /* Basic quoting style. */
+ enum quoting_style style;
+
+ /* Additional flags. Bitwise combination of enum quoting_flags. */
+ int flags;
+
+ /* Quote the characters indicated by this bit vector even if the
+ quoting style would not normally require them to be quoted. */
+ unsigned int quote_these_too[(UCHAR_MAX / INT_BITS) + 1];
+};
+
+/* Names of quoting styles. */
+char const *const quoting_style_args[] =
+{
+ "literal",
+ "shell",
+ "shell-always",
+ "c",
+ "c-maybe",
+ "escape",
+ "locale",
+ "clocale",
+ 0
+};
+
+/* Correspondences to quoting style names. */
+enum quoting_style const quoting_style_vals[] =
+{
+ literal_quoting_style,
+ shell_quoting_style,
+ shell_always_quoting_style,
+ c_quoting_style,
+ c_maybe_quoting_style,
+ escape_quoting_style,
+ locale_quoting_style,
+ clocale_quoting_style
+};
+
+/* The default quoting options. */
+static struct quoting_options default_quoting_options;
+
+/* Allocate a new set of quoting options, with contents initially identical
+ to O if O is not null, or to the default if O is null.
+ It is the caller's responsibility to free the result. */
+struct quoting_options *
+clone_quoting_options (struct quoting_options *o)
+{
+ int e = errno;
+ struct quoting_options *p = xmemdup (o ? o : &default_quoting_options,
+ sizeof *o);
+ errno = e;
+ return p;
+}
+
+/* Get the value of O's quoting style. If O is null, use the default. */
+enum quoting_style
+get_quoting_style (struct quoting_options *o)
+{
+ return (o ? o : &default_quoting_options)->style;
+}
+
+/* In O (or in the default if O is null),
+ set the value of the quoting style to S. */
+void
+set_quoting_style (struct quoting_options *o, enum quoting_style s)
+{
+ (o ? o : &default_quoting_options)->style = s;
+}
+
+/* In O (or in the default if O is null),
+ set the value of the quoting options for character C to I.
+ Return the old value. Currently, the only values defined for I are
+ 0 (the default) and 1 (which means to quote the character even if
+ it would not otherwise be quoted). */
+int
+set_char_quoting (struct quoting_options *o, char c, int i)
+{
+ unsigned char uc = c;
+ unsigned int *p =
+ (o ? o : &default_quoting_options)->quote_these_too + uc / INT_BITS;
+ int shift = uc % INT_BITS;
+ int r = (*p >> shift) & 1;
+ *p ^= ((i & 1) ^ r) << shift;
+ return r;
+}
+
+/* In O (or in the default if O is null),
+ set the value of the quoting options flag to I, which can be a
+ bitwise combination of enum quoting_flags, or 0 for default
+ behavior. Return the old value. */
+int
+set_quoting_flags (struct quoting_options *o, int i)
+{
+ int r;
+ if (!o)
+ o = &default_quoting_options;
+ r = o->flags;
+ o->flags = i;
+ return r;
+}
+
+/* Return quoting options for STYLE, with no extra quoting. */
+static struct quoting_options
+quoting_options_from_style (enum quoting_style style)
+{
+ struct quoting_options o;
+ o.style = style;
+ o.flags = 0;
+ memset (o.quote_these_too, 0, sizeof o.quote_these_too);
+ return o;
+}
+
+/* MSGID approximates a quotation mark. Return its translation if it
+ has one; otherwise, return either it or "\"", depending on S. */
+static char const *
+gettext_quote (char const *msgid, enum quoting_style s)
+{
+ char const *translation = _(msgid);
+ if (translation == msgid && s == clocale_quoting_style)
+ translation = "\"";
+ return translation;
+}
+
+/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
+ argument ARG (of size ARGSIZE), using QUOTING_STYLE, FLAGS, and
+ QUOTE_THESE_TOO to control quoting.
+ Terminate the output with a null character, and return the written
+ size of the output, not counting the terminating null.
+ If BUFFERSIZE is too small to store the output string, return the
+ value that would have been returned had BUFFERSIZE been large enough.
+ If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE.
+
+ This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG,
+ ARGSIZE, O), except it breaks O into its component pieces and is
+ not careful about errno. */
+
+static size_t
+quotearg_buffer_restyled (char *buffer, size_t buffersize,
+ char const *arg, size_t argsize,
+ enum quoting_style quoting_style, int flags,
+ unsigned int const *quote_these_too)
+{
+ size_t i;
+ size_t len = 0;
+ char const *quote_string = 0;
+ size_t quote_string_len = 0;
+ bool backslash_escapes = false;
+ bool unibyte_locale = MB_CUR_MAX == 1;
+ bool elide_outer_quotes = (flags & QA_ELIDE_OUTER_QUOTES) != 0;
+
+#define STORE(c) \
+ do \
+ { \
+ if (len < buffersize) \
+ buffer[len] = (c); \
+ len++; \
+ } \
+ while (0)
+
+ switch (quoting_style)
+ {
+ case c_maybe_quoting_style:
+ quoting_style = c_quoting_style;
+ elide_outer_quotes = true;
+ /* Fall through. */
+ case c_quoting_style:
+ if (!elide_outer_quotes)
+ STORE ('"');
+ backslash_escapes = true;
+ quote_string = "\"";
+ quote_string_len = 1;
+ break;
+
+ case escape_quoting_style:
+ backslash_escapes = true;
+ elide_outer_quotes = false;
+ break;
+
+ case locale_quoting_style:
+ case clocale_quoting_style:
+ {
+ /* TRANSLATORS:
+ Get translations for open and closing quotation marks.
+
+ The message catalog should translate "`" to a left
+ quotation mark suitable for the locale, and similarly for
+ "'". If the catalog has no translation,
+ locale_quoting_style quotes `like this', and
+ clocale_quoting_style quotes "like this".
+
+ For example, an American English Unicode locale should
+ translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
+ should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
+ MARK). A British English Unicode locale should instead
+ translate these to U+2018 (LEFT SINGLE QUOTATION MARK) and
+ U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
+
+ If you don't know what to put here, please see
+ <http://en.wikipedia.org/wiki/Quotation_mark#Glyphs>
+ and use glyphs suitable for your language. */
+
+ char const *left = gettext_quote (N_("`"), quoting_style);
+ char const *right = gettext_quote (N_("'"), quoting_style);
+ if (!elide_outer_quotes)
+ for (quote_string = left; *quote_string; quote_string++)
+ STORE (*quote_string);
+ backslash_escapes = true;
+ quote_string = right;
+ quote_string_len = strlen (quote_string);
+ }
+ break;
+
+ case shell_quoting_style:
+ quoting_style = shell_always_quoting_style;
+ elide_outer_quotes = true;
+ /* Fall through. */
+ case shell_always_quoting_style:
+ if (!elide_outer_quotes)
+ STORE ('\'');
+ quote_string = "'";
+ quote_string_len = 1;
+ break;
+
+ case literal_quoting_style:
+ elide_outer_quotes = false;
+ break;
+
+ default:
+ abort ();
+ }
+
+ for (i = 0; ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); i++)
+ {
+ unsigned char c;
+ unsigned char esc;
+
+ if (backslash_escapes
+ && quote_string_len
+ && i + quote_string_len <= argsize
+ && memcmp (arg + i, quote_string, quote_string_len) == 0)
+ {
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ STORE ('\\');
+ }
+
+ c = arg[i];
+ switch (c)
+ {
+ case '\0':
+ if (backslash_escapes)
+ {
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ STORE ('\\');
+ if (i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9')
+ {
+ STORE ('0');
+ STORE ('0');
+ }
+ c = '0';
+ }
+ else if (flags & QA_ELIDE_NULL_BYTES)
+ continue;
+ break;
+
+ case '?':
+ switch (quoting_style)
+ {
+ case shell_always_quoting_style:
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ break;
+
+ case c_quoting_style:
+ if ((flags & QA_SPLIT_TRIGRAPHS)
+ && i + 2 < argsize && arg[i + 1] == '?')
+ switch (arg[i + 2])
+ {
+ case '!': case '\'':
+ case '(': case ')': case '-': case '/':
+ case '<': case '=': case '>':
+ /* Escape the second '?' in what would otherwise be
+ a trigraph. */
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ c = arg[i + 2];
+ i += 2;
+ STORE ('?');
+ STORE ('"');
+ STORE ('"');
+ STORE ('?');
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case '\a': esc = 'a'; goto c_escape;
+ case '\b': esc = 'b'; goto c_escape;
+ case '\f': esc = 'f'; goto c_escape;
+ case '\n': esc = 'n'; goto c_and_shell_escape;
+ case '\r': esc = 'r'; goto c_and_shell_escape;
+ case '\t': esc = 't'; goto c_and_shell_escape;
+ case '\v': esc = 'v'; goto c_escape;
+ case '\\': esc = c;
+ /* No need to escape the escape if we are trying to elide
+ outer quotes and nothing else is problematic. */
+ if (backslash_escapes && elide_outer_quotes && quote_string_len)
+ goto store_c;
+
+ c_and_shell_escape:
+ if (quoting_style == shell_always_quoting_style
+ && elide_outer_quotes)
+ goto force_outer_quoting_style;
+ /* Fall through. */
+ c_escape:
+ if (backslash_escapes)
+ {
+ c = esc;
+ goto store_escape;
+ }
+ break;
+
+ case '{': case '}': /* sometimes special if isolated */
+ if (! (argsize == SIZE_MAX ? arg[1] == '\0' : argsize == 1))
+ break;
+ /* Fall through. */
+ case '#': case '~':
+ if (i != 0)
+ break;
+ /* Fall through. */
+ case ' ':
+ case '!': /* special in bash */
+ case '"': case '$': case '&':
+ case '(': case ')': case '*': case ';':
+ case '<':
+ case '=': /* sometimes special in 0th or (with "set -k") later args */
+ case '>': case '[':
+ case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
+ case '`': case '|':
+ /* A shell special character. In theory, '$' and '`' could
+ be the first bytes of multibyte characters, which means
+ we should check them with mbrtowc, but in practice this
+ doesn't happen so it's not worth worrying about. */
+ if (quoting_style == shell_always_quoting_style
+ && elide_outer_quotes)
+ goto force_outer_quoting_style;
+ break;
+
+ case '\'':
+ if (quoting_style == shell_always_quoting_style)
+ {
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ STORE ('\'');
+ STORE ('\\');
+ STORE ('\'');
+ }
+ break;
+
+ case '%': case '+': case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9': case ':':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z': case ']': case '_': case 'a': case 'b':
+ case 'c': case 'd': case 'e': case 'f': case 'g': case 'h':
+ case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
+ case 'o': case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
+ /* These characters don't cause problems, no matter what the
+ quoting style is. They cannot start multibyte sequences. */
+ break;
+
+ default:
+ /* If we have a multibyte sequence, copy it until we reach
+ its end, find an error, or come back to the initial shift
+ state. For C-like styles, if the sequence has
+ unprintable characters, escape the whole sequence, since
+ we can't easily escape single characters within it. */
+ {
+ /* Length of multibyte sequence found so far. */
+ size_t m;
+
+ bool printable;
+
+ if (unibyte_locale)
+ {
+ m = 1;
+ printable = isprint (c) != 0;
+ }
+ else
+ {
+ mbstate_t mbstate;
+ memset (&mbstate, 0, sizeof mbstate);
+
+ m = 0;
+ printable = true;
+ if (argsize == SIZE_MAX)
+ argsize = strlen (arg);
+
+ do
+ {
+ wchar_t w;
+ size_t bytes = mbrtowc (&w, &arg[i + m],
+ argsize - (i + m), &mbstate);
+ if (bytes == 0)
+ break;
+ else if (bytes == (size_t) -1)
+ {
+ printable = false;
+ break;
+ }
+ else if (bytes == (size_t) -2)
+ {
+ printable = false;
+ while (i + m < argsize && arg[i + m])
+ m++;
+ break;
+ }
+ else
+ {
+ /* Work around a bug with older shells that "see" a '\'
+ that is really the 2nd byte of a multibyte character.
+ In practice the problem is limited to ASCII
+ chars >= '@' that are shell special chars. */
+ if ('[' == 0x5b && elide_outer_quotes
+ && quoting_style == shell_always_quoting_style)
+ {
+ size_t j;
+ for (j = 1; j < bytes; j++)
+ switch (arg[i + m + j])
+ {
+ case '[': case '\\': case '^':
+ case '`': case '|':
+ goto force_outer_quoting_style;
+
+ default:
+ break;
+ }
+ }
+
+ if (! iswprint (w))
+ printable = false;
+ m += bytes;
+ }
+ }
+ while (! mbsinit (&mbstate));
+ }
+
+ if (1 < m || (backslash_escapes && ! printable))
+ {
+ /* Output a multibyte sequence, or an escaped
+ unprintable unibyte character. */
+ size_t ilim = i + m;
+
+ for (;;)
+ {
+ if (backslash_escapes && ! printable)
+ {
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ STORE ('\\');
+ STORE ('0' + (c >> 6));
+ STORE ('0' + ((c >> 3) & 7));
+ c = '0' + (c & 7);
+ }
+ if (ilim <= i + 1)
+ break;
+ STORE (c);
+ c = arg[++i];
+ }
+
+ goto store_c;
+ }
+ }
+ }
+
+ if (! ((backslash_escapes || elide_outer_quotes)
+ && quote_these_too
+ && quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS))))
+ goto store_c;
+
+ store_escape:
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ STORE ('\\');
+
+ store_c:
+ STORE (c);
+ }
+
+ if (len == 0 && quoting_style == shell_always_quoting_style
+ && elide_outer_quotes)
+ goto force_outer_quoting_style;
+
+ if (quote_string && !elide_outer_quotes)
+ for (; *quote_string; quote_string++)
+ STORE (*quote_string);
+
+ if (len < buffersize)
+ buffer[len] = '\0';
+ return len;
+
+ force_outer_quoting_style:
+ /* Don't reuse quote_these_too, since the addition of outer quotes
+ sufficiently quotes the specified characters. */
+ return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
+ quoting_style,
+ flags & ~QA_ELIDE_OUTER_QUOTES, NULL);
+}
+
+/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
+ argument ARG (of size ARGSIZE), using O to control quoting.
+ If O is null, use the default.
+ Terminate the output with a null character, and return the written
+ size of the output, not counting the terminating null.
+ If BUFFERSIZE is too small to store the output string, return the
+ value that would have been returned had BUFFERSIZE been large enough.
+ If ARGSIZE is SIZE_MAX, use the string length of the argument for
+ ARGSIZE. */
+size_t
+quotearg_buffer (char *buffer, size_t buffersize,
+ char const *arg, size_t argsize,
+ struct quoting_options const *o)
+{
+ struct quoting_options const *p = o ? o : &default_quoting_options;
+ int e = errno;
+ size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
+ p->style, p->flags, p->quote_these_too);
+ errno = e;
+ return r;
+}
+
+/* Equivalent to quotearg_alloc (ARG, ARGSIZE, NULL, O). */
+char *
+quotearg_alloc (char const *arg, size_t argsize,
+ struct quoting_options const *o)
+{
+ return quotearg_alloc_mem (arg, argsize, NULL, o);
+}
+
+/* Like quotearg_buffer (..., ARG, ARGSIZE, O), except return newly
+ allocated storage containing the quoted string, and store the
+ resulting size into *SIZE, if non-NULL. The result can contain
+ embedded null bytes only if ARGSIZE is not SIZE_MAX, SIZE is not
+ NULL, and set_quoting_flags has not set the null byte elision
+ flag. */
+char *
+quotearg_alloc_mem (char const *arg, size_t argsize, size_t *size,
+ struct quoting_options const *o)
+{
+ struct quoting_options const *p = o ? o : &default_quoting_options;
+ int e = errno;
+ /* Elide embedded null bytes if we can't return a size. */
+ int flags = p->flags | (size ? 0 : QA_ELIDE_NULL_BYTES);
+ size_t bufsize = quotearg_buffer_restyled (0, 0, arg, argsize, p->style,
+ flags, p->quote_these_too) + 1;
+ char *buf = xcharalloc (bufsize);
+ quotearg_buffer_restyled (buf, bufsize, arg, argsize, p->style, flags,
+ p->quote_these_too);
+ errno = e;
+ if (size)
+ *size = bufsize - 1;
+ return buf;
+}
+
+/* A storage slot with size and pointer to a value. */
+struct slotvec
+{
+ size_t size;
+ char *val;
+};
+
+/* Preallocate a slot 0 buffer, so that the caller can always quote
+ one small component of a "memory exhausted" message in slot 0. */
+static char slot0[256];
+static unsigned int nslots = 1;
+static struct slotvec slotvec0 = {sizeof slot0, slot0};
+static struct slotvec *slotvec = &slotvec0;
+
+void
+quotearg_free (void)
+{
+ struct slotvec *sv = slotvec;
+ unsigned int i;
+ for (i = 1; i < nslots; i++)
+ free (sv[i].val);
+ if (sv[0].val != slot0)
+ {
+ free (sv[0].val);
+ slotvec0.size = sizeof slot0;
+ slotvec0.val = slot0;
+ }
+ if (sv != &slotvec0)
+ {
+ free (sv);
+ slotvec = &slotvec0;
+ }
+ nslots = 1;
+}
+
+/* Use storage slot N to return a quoted version of argument ARG.
+ ARG is of size ARGSIZE, but if that is SIZE_MAX, ARG is a
+ null-terminated string.
+ OPTIONS specifies the quoting options.
+ The returned value points to static storage that can be
+ reused by the next call to this function with the same value of N.
+ N must be nonnegative. N is deliberately declared with type "int"
+ to allow for future extensions (using negative values). */
+static char *
+quotearg_n_options (int n, char const *arg, size_t argsize,
+ struct quoting_options const *options)
+{
+ int e = errno;
+
+ unsigned int n0 = n;
+ struct slotvec *sv = slotvec;
+
+ if (n < 0)
+ abort ();
+
+ if (nslots <= n0)
+ {
+ /* FIXME: technically, the type of n1 should be `unsigned int',
+ but that evokes an unsuppressible warning from gcc-4.0.1 and
+ older. If gcc ever provides an option to suppress that warning,
+ revert to the original type, so that the test in xalloc_oversized
+ is once again performed only at compile time. */
+ size_t n1 = n0 + 1;
+ bool preallocated = (sv == &slotvec0);
+
+ if (xalloc_oversized (n1, sizeof *sv))
+ xalloc_die ();
+
+ slotvec = sv = xrealloc (preallocated ? NULL : sv, n1 * sizeof *sv);
+ if (preallocated)
+ *sv = slotvec0;
+ memset (sv + nslots, 0, (n1 - nslots) * sizeof *sv);
+ nslots = n1;
+ }
+
+ {
+ size_t size = sv[n].size;
+ char *val = sv[n].val;
+ /* Elide embedded null bytes since we don't return a size. */
+ int flags = options->flags | QA_ELIDE_NULL_BYTES;
+ size_t qsize = quotearg_buffer_restyled (val, size, arg, argsize,
+ options->style, flags,
+ options->quote_these_too);
+
+ if (size <= qsize)
+ {
+ sv[n].size = size = qsize + 1;
+ if (val != slot0)
+ free (val);
+ sv[n].val = val = xcharalloc (size);
+ quotearg_buffer_restyled (val, size, arg, argsize, options->style,
+ flags, options->quote_these_too);
+ }
+
+ errno = e;
+ return val;
+ }
+}
+
+char *
+quotearg_n (int n, char const *arg)
+{
+ return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options);
+}
+
+char *
+quotearg_n_mem (int n, char const *arg, size_t argsize)
+{
+ return quotearg_n_options (n, arg, argsize, &default_quoting_options);
+}
+
+char *
+quotearg (char const *arg)
+{
+ return quotearg_n (0, arg);
+}
+
+char *
+quotearg_mem (char const *arg, size_t argsize)
+{
+ return quotearg_n_mem (0, arg, argsize);
+}
+
+char *
+quotearg_n_style (int n, enum quoting_style s, char const *arg)
+{
+ struct quoting_options const o = quoting_options_from_style (s);
+ return quotearg_n_options (n, arg, SIZE_MAX, &o);
+}
+
+char *
+quotearg_n_style_mem (int n, enum quoting_style s,
+ char const *arg, size_t argsize)
+{
+ struct quoting_options const o = quoting_options_from_style (s);
+ return quotearg_n_options (n, arg, argsize, &o);
+}
+
+char *
+quotearg_style (enum quoting_style s, char const *arg)
+{
+ return quotearg_n_style (0, s, arg);
+}
+
+char *
+quotearg_style_mem (enum quoting_style s, char const *arg, size_t argsize)
+{
+ return quotearg_n_style_mem (0, s, arg, argsize);
+}
+
+char *
+quotearg_char_mem (char const *arg, size_t argsize, char ch)
+{
+ struct quoting_options options;
+ options = default_quoting_options;
+ set_char_quoting (&options, ch, 1);
+ return quotearg_n_options (0, arg, argsize, &options);
+}
+
+char *
+quotearg_char (char const *arg, char ch)
+{
+ return quotearg_char_mem (arg, SIZE_MAX, ch);
+}
+
+char *
+quotearg_colon (char const *arg)
+{
+ return quotearg_char (arg, ':');
+}
+
+char *
+quotearg_colon_mem (char const *arg, size_t argsize)
+{
+ return quotearg_char_mem (arg, argsize, ':');
+}
diff --git a/lib/quotearg.h b/lib/quotearg.h
new file mode 100644
index 0000000..7700107
--- /dev/null
+++ b/lib/quotearg.h
@@ -0,0 +1,305 @@
+/* quotearg.h - quote arguments for output
+
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2008 Free
+ Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert <eggert@twinsun.com> */
+
+#ifndef QUOTEARG_H_
+# define QUOTEARG_H_ 1
+
+# include <stddef.h>
+
+/* Basic quoting styles. For each style, an example is given on the
+ input strings "simple", "\0 \t\n'\"\033?""?/\\", and "a:b", using
+ quotearg_buffer, quotearg_mem, and quotearg_colon_mem with that
+ style and the default flags and quoted characters. Note that the
+ examples are shown here as valid C strings rather than what
+ displays on a terminal (with "??/" as a trigraph for "\\"). */
+enum quoting_style
+ {
+ /* Output names as-is (ls --quoting-style=literal). Can result in
+ embedded null bytes if QA_ELIDE_NULL_BYTES is not in
+ effect.
+
+ quotearg_buffer:
+ "simple", "\0 \t\n'\"\033??/\\", "a:b"
+ quotearg:
+ "simple", " \t\n'\"\033??/\\", "a:b"
+ quotearg_colon:
+ "simple", " \t\n'\"\033??/\\", "a:b"
+ */
+ literal_quoting_style,
+
+ /* Quote names for the shell if they contain shell metacharacters
+ or would cause ambiguous output (ls --quoting-style=shell).
+ Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not
+ in effect.
+
+ quotearg_buffer:
+ "simple", "'\0 \t\n'\\''\"\033??/\\'", "a:b"
+ quotearg:
+ "simple", "' \t\n'\\''\"\033??/\\'", "a:b"
+ quotearg_colon:
+ "simple", "' \t\n'\\''\"\033??/\\'", "'a:b'"
+ */
+ shell_quoting_style,
+
+ /* Quote names for the shell, even if they would normally not
+ require quoting (ls --quoting-style=shell-always). Can result
+ in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect.
+ Behaves like shell_quoting_style if QA_ELIDE_OUTER_QUOTES is in
+ effect.
+
+ quotearg_buffer:
+ "'simple'", "'\0 \t\n'\\''\"\033??/\\'", "'a:b'"
+ quotearg:
+ "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'"
+ quotearg_colon:
+ "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'"
+ */
+ shell_always_quoting_style,
+
+ /* Quote names as for a C language string (ls --quoting-style=c).
+ Behaves like c_maybe_quoting_style if QA_ELIDE_OUTER_QUOTES is
+ in effect. Split into consecutive strings if
+ QA_SPLIT_TRIGRAPHS.
+
+ quotearg_buffer:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+ quotearg:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+ quotearg_colon:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\""
+ */
+ c_quoting_style,
+
+ /* Like c_quoting_style except omit the surrounding double-quote
+ characters if no quoted characters are encountered.
+
+ quotearg_buffer:
+ "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b"
+ quotearg:
+ "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b"
+ quotearg_colon:
+ "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+ */
+ c_maybe_quoting_style,
+
+ /* Like c_quoting_style except always omit the surrounding
+ double-quote characters (ls --quoting-style=escape).
+
+ quotearg_buffer:
+ "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b"
+ quotearg:
+ "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b"
+ quotearg_colon:
+ "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a\\:b"
+ */
+ escape_quoting_style,
+
+ /* Like clocale_quoting_style, but quote `like this' instead of
+ "like this" in the default C locale (ls --quoting-style=locale).
+
+ LC_MESSAGES=C
+ quotearg_buffer:
+ "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'"
+ quotearg:
+ "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'"
+ quotearg_colon:
+ "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a\\:b'"
+
+ LC_MESSAGES=pt_PT.utf8
+ quotearg_buffer:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+ quotearg:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+ quotearg_colon:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273"
+ */
+ locale_quoting_style,
+
+ /* Like c_quoting_style except use quotation marks appropriate for
+ the locale (ls --quoting-style=clocale).
+
+ LC_MESSAGES=C
+ quotearg_buffer:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+ quotearg:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+ quotearg_colon:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\""
+
+ LC_MESSAGES=pt_PT.utf8
+ quotearg_buffer:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+ quotearg:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+ quotearg_colon:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273"
+ */
+ clocale_quoting_style
+ };
+
+/* Flags for use in set_quoting_flags. */
+enum quoting_flags
+ {
+ /* Always elide null bytes from styles that do not quote them,
+ even when the length of the result is available to the
+ caller. */
+ QA_ELIDE_NULL_BYTES = 0x01,
+
+ /* Omit the surrounding quote characters if no escaped characters
+ are encountered. Note that if no other character needs
+ escaping, then neither does the escape character. */
+ QA_ELIDE_OUTER_QUOTES = 0x02,
+
+ /* In the c_quoting_style and c_maybe_quoting_style, split ANSI
+ trigraph sequences into concatenated strings (for example,
+ "?""?/" rather than "??/", which could be confused with
+ "\\"). */
+ QA_SPLIT_TRIGRAPHS = 0x04
+ };
+
+/* For now, --quoting-style=literal is the default, but this may change. */
+# ifndef DEFAULT_QUOTING_STYLE
+# define DEFAULT_QUOTING_STYLE literal_quoting_style
+# endif
+
+/* Names of quoting styles and their corresponding values. */
+extern char const *const quoting_style_args[];
+extern enum quoting_style const quoting_style_vals[];
+
+struct quoting_options;
+
+/* The functions listed below set and use a hidden variable
+ that contains the default quoting style options. */
+
+/* Allocate a new set of quoting options, with contents initially identical
+ to O if O is not null, or to the default if O is null.
+ It is the caller's responsibility to free the result. */
+struct quoting_options *clone_quoting_options (struct quoting_options *o);
+
+/* Get the value of O's quoting style. If O is null, use the default. */
+enum quoting_style get_quoting_style (struct quoting_options *o);
+
+/* In O (or in the default if O is null),
+ set the value of the quoting style to S. */
+void set_quoting_style (struct quoting_options *o, enum quoting_style s);
+
+/* In O (or in the default if O is null),
+ set the value of the quoting options for character C to I.
+ Return the old value. Currently, the only values defined for I are
+ 0 (the default) and 1 (which means to quote the character even if
+ it would not otherwise be quoted). */
+int set_char_quoting (struct quoting_options *o, char c, int i);
+
+/* In O (or in the default if O is null),
+ set the value of the quoting options flag to I, which can be a
+ bitwise combination of enum quoting_flags, or 0 for default
+ behavior. Return the old value. */
+int set_quoting_flags (struct quoting_options *o, int i);
+
+/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
+ argument ARG (of size ARGSIZE), using O to control quoting.
+ If O is null, use the default.
+ Terminate the output with a null character, and return the written
+ size of the output, not counting the terminating null.
+ If BUFFERSIZE is too small to store the output string, return the
+ value that would have been returned had BUFFERSIZE been large enough.
+ If ARGSIZE is -1, use the string length of the argument for ARGSIZE.
+ On output, BUFFER might contain embedded null bytes if ARGSIZE was
+ not -1, the style of O does not use backslash escapes, and the
+ flags of O do not request elision of null bytes.*/
+size_t quotearg_buffer (char *buffer, size_t buffersize,
+ char const *arg, size_t argsize,
+ struct quoting_options const *o);
+
+/* Like quotearg_buffer, except return the result in a newly allocated
+ buffer. It is the caller's responsibility to free the result. The
+ result will not contain embedded null bytes. */
+char *quotearg_alloc (char const *arg, size_t argsize,
+ struct quoting_options const *o);
+
+/* Like quotearg_alloc, except that the length of the result,
+ excluding the terminating null byte, is stored into SIZE if it is
+ non-NULL. The result might contain embedded null bytes if ARGSIZE
+ was not -1, SIZE was not NULL, the style of O does not use
+ backslash escapes, and the flags of O do not request elision of
+ null bytes.*/
+char *quotearg_alloc_mem (char const *arg, size_t argsize,
+ size_t *size, struct quoting_options const *o);
+
+/* Use storage slot N to return a quoted version of the string ARG.
+ Use the default quoting options.
+ The returned value points to static storage that can be
+ reused by the next call to this function with the same value of N.
+ N must be nonnegative. The output of all functions in the
+ quotearg_n family are guaranteed to not contain embedded null
+ bytes.*/
+char *quotearg_n (int n, char const *arg);
+
+/* Equivalent to quotearg_n (0, ARG). */
+char *quotearg (char const *arg);
+
+/* Use storage slot N to return a quoted version of the argument ARG
+ of size ARGSIZE. This is like quotearg_n (N, ARG), except it can
+ quote null bytes. */
+char *quotearg_n_mem (int n, char const *arg, size_t argsize);
+
+/* Equivalent to quotearg_n_mem (0, ARG, ARGSIZE). */
+char *quotearg_mem (char const *arg, size_t argsize);
+
+/* Use style S and storage slot N to return a quoted version of the string ARG.
+ This is like quotearg_n (N, ARG), except that it uses S with no other
+ options to specify the quoting method. */
+char *quotearg_n_style (int n, enum quoting_style s, char const *arg);
+
+/* Use style S and storage slot N to return a quoted version of the
+ argument ARG of size ARGSIZE. This is like quotearg_n_style
+ (N, S, ARG), except it can quote null bytes. */
+char *quotearg_n_style_mem (int n, enum quoting_style s,
+ char const *arg, size_t argsize);
+
+/* Equivalent to quotearg_n_style (0, S, ARG). */
+char *quotearg_style (enum quoting_style s, char const *arg);
+
+/* Equivalent to quotearg_n_style_mem (0, S, ARG, ARGSIZE). */
+char *quotearg_style_mem (enum quoting_style s,
+ char const *arg, size_t argsize);
+
+/* Like quotearg (ARG), except also quote any instances of CH. */
+char *quotearg_char (char const *arg, char ch);
+
+/* Like quotearg_char (ARG, CH), except it can quote null bytes. */
+char *quotearg_char_mem (char const *arg, size_t argsize, char ch);
+
+/* Equivalent to quotearg_char (ARG, ':'). */
+char *quotearg_colon (char const *arg);
+
+/* Like quotearg_colon (ARG), except it can quote null bytes. */
+char *quotearg_colon_mem (char const *arg, size_t argsize);
+
+/* Free any dynamically allocated memory. */
+void quotearg_free (void);
+
+#endif /* !QUOTEARG_H_ */
diff --git a/lib/realloc.c b/lib/realloc.c
new file mode 100644
index 0000000..b61c2ca
--- /dev/null
+++ b/lib/realloc.c
@@ -0,0 +1,87 @@
+/* realloc() function that is glibc compatible.
+
+ Copyright (C) 1997, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering and Bruno Haible */
+
+#include <config.h>
+
+/* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */
+#ifdef realloc
+# define NEED_REALLOC_GNU 1
+#endif
+
+/* Infer the properties of the system's malloc function.
+ Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
+#if GNULIB_MALLOC_GNU && !defined malloc
+# define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1
+#endif
+
+/* Below we want to call the system's malloc and realloc.
+ Undefine the symbols here so that including <stdlib.h> provides a
+ declaration of malloc(), not of rpl_malloc(), and likewise for realloc. */
+#undef malloc
+#undef realloc
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <errno.h>
+
+/* Below we want to call the system's malloc and realloc.
+ Undefine the symbols, if they were defined by gnulib's <stdlib.h>
+ replacement. */
+#undef malloc
+#undef realloc
+
+/* Change the size of an allocated block of memory P to N bytes,
+ with error checking. If N is zero, change it to 1. If P is NULL,
+ use malloc. */
+
+void *
+rpl_realloc (void *p, size_t n)
+{
+ void *result;
+
+#if NEED_REALLOC_GNU
+ if (n == 0)
+ {
+ n = 1;
+
+ /* In theory realloc might fail, so don't rely on it to free. */
+ free (p);
+ p = NULL;
+ }
+#endif
+
+ if (p == NULL)
+ {
+#if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE
+ if (n == 0)
+ n = 1;
+#endif
+ result = malloc (n);
+ }
+ else
+ result = realloc (p, n);
+
+#if !HAVE_REALLOC_POSIX
+ if (result == NULL)
+ errno = ENOMEM;
+#endif
+
+ return result;
+}
diff --git a/intl/ref-add.sin b/lib/ref-add.sin
index 3678c28..222d752 100644
--- a/intl/ref-add.sin
+++ b/lib/ref-add.sin
@@ -2,20 +2,19 @@
#
# Copyright (C) 2000 Free Software Foundation, Inc.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Library General Public License as published
-# by the Free Software Foundation; either version 2, or (at your option)
+# This program is free software; you can redistribute 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
-# Library General Public License for more details.
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU Library 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.
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Written by Bruno Haible <haible@clisp.cons.org>.
#
diff --git a/intl/ref-del.sin b/lib/ref-del.sin
index 0c12d8e..1bf073e 100644
--- a/intl/ref-del.sin
+++ b/lib/ref-del.sin
@@ -2,20 +2,19 @@
#
# Copyright (C) 2000 Free Software Foundation, Inc.
#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU Library General Public License as published
-# by the Free Software Foundation; either version 2, or (at your option)
+# This program is free software; you can redistribute 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
-# Library General Public License for more details.
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# You should have received a copy of the GNU Library 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.
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# Written by Bruno Haible <haible@clisp.cons.org>.
#
diff --git a/lib/regcomp.c b/lib/regcomp.c
index d35ae5f..a4e3f2d 100644
--- a/lib/regcomp.c
+++ b/lib/regcomp.c
@@ -1,22 +1,24 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ 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. */
static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
size_t length, reg_syntax_t syntax);
@@ -46,14 +48,14 @@ static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg,
static reg_errcode_t calc_first (void *extra, bin_tree_t *node);
static reg_errcode_t calc_next (void *extra, bin_tree_t *node);
static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node);
-static int duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint);
-static int search_duplicated_node (const re_dfa_t *dfa, int org_node,
+static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint);
+static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node,
unsigned int constraint);
static reg_errcode_t calc_eclosure (re_dfa_t *dfa);
static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa,
- int node, int root);
+ Idx node, bool root);
static reg_errcode_t calc_inveclosure (re_dfa_t *dfa);
-static int fetch_number (re_string_t *input, re_token_t *token,
+static Idx fetch_number (re_string_t *input, re_token_t *token,
reg_syntax_t syntax);
static int peek_token (re_token_t *token, re_string_t *input,
reg_syntax_t syntax) internal_function;
@@ -61,16 +63,16 @@ static bin_tree_t *parse (re_string_t *regexp, regex_t *preg,
reg_syntax_t syntax, reg_errcode_t *err);
static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg,
re_token_t *token, reg_syntax_t syntax,
- int nest, reg_errcode_t *err);
+ Idx nest, reg_errcode_t *err);
static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg,
re_token_t *token, reg_syntax_t syntax,
- int nest, reg_errcode_t *err);
+ Idx nest, reg_errcode_t *err);
static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg,
re_token_t *token, reg_syntax_t syntax,
- int nest, reg_errcode_t *err);
+ Idx nest, reg_errcode_t *err);
static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg,
re_token_t *token, reg_syntax_t syntax,
- int nest, reg_errcode_t *err);
+ Idx nest, reg_errcode_t *err);
static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp,
re_dfa_t *dfa, re_token_t *token,
reg_syntax_t syntax, reg_errcode_t *err);
@@ -82,19 +84,19 @@ static reg_errcode_t parse_bracket_element (bracket_elem_t *elem,
re_token_t *token, int token_len,
re_dfa_t *dfa,
reg_syntax_t syntax,
- int accept_hyphen);
+ bool accept_hyphen);
static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem,
re_string_t *regexp,
re_token_t *token);
#ifdef RE_ENABLE_I18N
static reg_errcode_t build_equiv_class (bitset_t sbcset,
re_charset_t *mbcset,
- int *equiv_class_alloc,
+ Idx *equiv_class_alloc,
const unsigned char *name);
static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
bitset_t sbcset,
re_charset_t *mbcset,
- int *char_class_alloc,
+ Idx *char_class_alloc,
const unsigned char *class_name,
reg_syntax_t syntax);
#else /* not RE_ENABLE_I18N */
@@ -109,7 +111,7 @@ static bin_tree_t *build_charclass_op (re_dfa_t *dfa,
RE_TRANSLATE_TYPE trans,
const unsigned char *class_name,
const unsigned char *extra,
- int non_match, reg_errcode_t *err);
+ bool non_match, reg_errcode_t *err);
static bin_tree_t *create_tree (re_dfa_t *dfa,
bin_tree_t *left, bin_tree_t *right,
re_token_type_t type);
@@ -126,7 +128,7 @@ static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node);
POSIX doesn't require that we do anything for REG_NOERROR,
but why not be nice? */
-const char __re_error_msgid[] attribute_hidden =
+static const char __re_error_msgid[] =
{
#define REG_NOERROR_IDX 0
gettext_noop ("Success") /* REG_NOERROR */
@@ -180,7 +182,7 @@ const char __re_error_msgid[] attribute_hidden =
gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
};
-const size_t __re_error_msgid_idx[] attribute_hidden =
+static const size_t __re_error_msgid_idx[] =
{
REG_NOERROR_IDX,
REG_NOMATCH_IDX,
@@ -210,11 +212,17 @@ const size_t __re_error_msgid_idx[] attribute_hidden =
Assumes the `allocated' (and perhaps `buffer') and `translate' fields
are set in BUFP on entry. */
+#ifdef _LIBC
const char *
re_compile_pattern (pattern, length, bufp)
const char *pattern;
size_t length;
struct re_pattern_buffer *bufp;
+#else /* size_t might promote */
+const char *
+re_compile_pattern (const char *pattern, size_t length,
+ struct re_pattern_buffer *bufp)
+#endif
{
reg_errcode_t ret;
@@ -288,7 +296,7 @@ weak_alias (__re_compile_fastmap, re_compile_fastmap)
static inline void
__attribute ((always_inline))
-re_set_fastmap (char *fastmap, int icase, int ch)
+re_set_fastmap (char *fastmap, bool icase, int ch)
{
fastmap[ch] = 1;
if (icase)
@@ -303,11 +311,11 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
char *fastmap)
{
re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
- int node_cnt;
- int icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE));
+ Idx node_cnt;
+ bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE));
for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt)
{
- int node = init_state->nodes.elems[node_cnt];
+ Idx node = init_state->nodes.elems[node_cnt];
re_token_type_t type = dfa->nodes[node].type;
if (type == CHARACTER)
@@ -316,7 +324,8 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
#ifdef RE_ENABLE_I18N
if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
{
- unsigned char *buf = alloca (dfa->mb_cur_max), *p;
+ unsigned char buf[MB_LEN_MAX];
+ unsigned char *p;
wchar_t wc;
mbstate_t state;
@@ -327,11 +336,11 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
&& dfa->nodes[node].mb_partial)
*p++ = dfa->nodes[node].opr.c;
memset (&state, '\0', sizeof (state));
- if (mbrtowc (&wc, (const char *) buf, p - buf,
- &state) == p - buf
+ if (__mbrtowc (&wc, (const char *) buf, p - buf,
+ &state) == p - buf
&& (__wcrtomb ((char *) buf, towlower (wc), &state)
!= (size_t) -1))
- re_set_fastmap (fastmap, 0, buf[0]);
+ re_set_fastmap (fastmap, false, buf[0]);
}
#endif
}
@@ -350,45 +359,65 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
#ifdef RE_ENABLE_I18N
else if (type == COMPLEX_BRACKET)
{
- int i;
re_charset_t *cset = dfa->nodes[node].opr.mbcset;
- if (cset->non_match || cset->ncoll_syms || cset->nequiv_classes
- || cset->nranges || cset->nchar_classes)
- {
+ Idx i;
+
# ifdef _LIBC
- if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0)
+ /* See if we have to try all bytes which start multiple collation
+ elements.
+ e.g. In da_DK, we want to catch 'a' since "aa" is a valid
+ collation element, and don't catch 'b' since 'b' is
+ the only collation element which starts from 'b' (and
+ it is caught by SIMPLE_BRACKET). */
+ if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0
+ && (cset->ncoll_syms || cset->nranges))
{
- /* In this case we want to catch the bytes which are
- the first byte of any collation elements.
- e.g. In da_DK, we want to catch 'a' since "aa"
- is a valid collation element, and don't catch
- 'b' since 'b' is the only collation element
- which starts from 'b'. */
const int32_t *table = (const int32_t *)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
for (i = 0; i < SBC_MAX; ++i)
if (table[i] < 0)
re_set_fastmap (fastmap, icase, i);
}
-# else
- if (dfa->mb_cur_max > 1)
- for (i = 0; i < SBC_MAX; ++i)
- if (__btowc (i) == WEOF)
- re_set_fastmap (fastmap, icase, i);
-# endif /* not _LIBC */
+# endif /* _LIBC */
+
+ /* See if we have to start the match at all multibyte characters,
+ i.e. where we would not find an invalid sequence. This only
+ applies to multibyte character sets; for single byte character
+ sets, the SIMPLE_BRACKET again suffices. */
+ if (dfa->mb_cur_max > 1
+ && (cset->nchar_classes || cset->non_match
+# ifdef _LIBC
+ || cset->nequiv_classes
+# endif /* _LIBC */
+ ))
+ {
+ unsigned char c = 0;
+ do
+ {
+ mbstate_t mbs;
+ memset (&mbs, 0, sizeof (mbs));
+ if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2)
+ re_set_fastmap (fastmap, false, (int) c);
+ }
+ while (++c != 0);
}
- for (i = 0; i < cset->nmbchars; ++i)
+
+ else
{
- char buf[256];
- mbstate_t state;
- memset (&state, '\0', sizeof (state));
- if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
- re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
- if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
+ /* ... Else catch all bytes which can start the mbchars. */
+ for (i = 0; i < cset->nmbchars; ++i)
{
- if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
- != (size_t) -1)
- re_set_fastmap (fastmap, 0, *(unsigned char *) buf);
+ char buf[256];
+ mbstate_t state;
+ memset (&state, '\0', sizeof (state));
+ if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
+ re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
+ if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
+ {
+ if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
+ != (size_t) -1)
+ re_set_fastmap (fastmap, false, *(unsigned char *) buf);
+ }
}
}
}
@@ -445,8 +474,8 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
int
regcomp (preg, pattern, cflags)
- regex_t *__restrict preg;
- const char *__restrict pattern;
+ regex_t *_Restrict_ preg;
+ const char *_Restrict_ pattern;
int cflags;
{
reg_errcode_t ret;
@@ -505,12 +534,18 @@ weak_alias (__regcomp, regcomp)
/* Returns a message corresponding to an error code, ERRCODE, returned
from either regcomp or regexec. We don't use PREG here. */
+#ifdef _LIBC
size_t
regerror (errcode, preg, errbuf, errbuf_size)
int errcode;
- const regex_t *__restrict preg;
- char *__restrict errbuf;
+ const regex_t *_Restrict_ preg;
+ char *_Restrict_ errbuf;
size_t errbuf_size;
+#else /* size_t might promote */
+size_t
+regerror (int errcode, const regex_t *_Restrict_ preg,
+ char *_Restrict_ errbuf, size_t errbuf_size)
+#endif
{
const char *msg;
size_t msg_size;
@@ -530,17 +565,13 @@ regerror (errcode, preg, errbuf, errbuf_size)
if (BE (errbuf_size != 0, 1))
{
+ size_t cpy_size = msg_size;
if (BE (msg_size > errbuf_size, 0))
{
-#if defined HAVE_MEMPCPY || defined _LIBC
- *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
-#else
- memcpy (errbuf, msg, errbuf_size - 1);
- errbuf[errbuf_size - 1] = 0;
-#endif
+ cpy_size = errbuf_size - 1;
+ errbuf[cpy_size] = '\0';
}
- else
- memcpy (errbuf, msg, msg_size);
+ memcpy (errbuf, msg, cpy_size);
}
return msg_size;
@@ -558,7 +589,19 @@ weak_alias (__regerror, regerror)
static const bitset_t utf8_sb_map =
{
/* Set the first 128 bits. */
- [0 ... 0x80 / BITSET_WORD_BITS - 1] = BITSET_WORD_MAX
+# if 4 * BITSET_WORD_BITS < ASCII_CHARS
+# error "bitset_word_t is narrower than 32 bits"
+# elif 3 * BITSET_WORD_BITS < ASCII_CHARS
+ BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX,
+# elif 2 * BITSET_WORD_BITS < ASCII_CHARS
+ BITSET_WORD_MAX, BITSET_WORD_MAX,
+# elif 1 * BITSET_WORD_BITS < ASCII_CHARS
+ BITSET_WORD_MAX,
+# endif
+ (BITSET_WORD_MAX
+ >> (SBC_MAX % BITSET_WORD_BITS == 0
+ ? 0
+ : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS))
};
#endif
@@ -566,7 +609,7 @@ static const bitset_t utf8_sb_map =
static void
free_dfa_content (re_dfa_t *dfa)
{
- int i, j;
+ Idx i, j;
if (dfa->nodes)
for (i = 0; i < dfa->nodes_len; ++i)
@@ -756,7 +799,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
__libc_lock_init (dfa->lock);
err = re_string_construct (&regexp, pattern, length, preg->translate,
- syntax & RE_ICASE, dfa);
+ (syntax & RE_ICASE) != 0, dfa);
if (BE (err != REG_NOERROR, 0))
{
re_compile_internal_free_return:
@@ -808,18 +851,29 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
static reg_errcode_t
init_dfa (re_dfa_t *dfa, size_t pat_len)
{
- unsigned int table_size;
-#ifndef _LIBC
- char *codeset_name;
+ __re_size_t table_size;
+#ifdef RE_ENABLE_I18N
+ size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t));
+#else
+ size_t max_i18n_object_size = 0;
#endif
+ size_t max_object_size =
+ MAX (sizeof (struct re_state_table_entry),
+ MAX (sizeof (re_token_t),
+ MAX (sizeof (re_node_set),
+ MAX (sizeof (regmatch_t),
+ max_i18n_object_size))));
memset (dfa, '\0', sizeof (re_dfa_t));
/* Force allocation of str_tree_storage the first time. */
dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE;
- /* Avoid overflows. */
- if (pat_len == SIZE_MAX)
+ /* Avoid overflows. The extra "/ 2" is for the table_size doubling
+ calculation below, and for similar doubling calculations
+ elsewhere. And it's <= rather than <, because some of the
+ doubling calculations add 1 afterwards. */
+ if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0))
return REG_ESPACE;
dfa->nodes_alloc = pat_len + 1;
@@ -841,22 +895,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII)
!= 0);
#else
-# ifdef HAVE_LANGINFO_CODESET
- codeset_name = nl_langinfo (CODESET);
-# else
- codeset_name = getenv ("LC_ALL");
- if (codeset_name == NULL || codeset_name[0] == '\0')
- codeset_name = getenv ("LC_CTYPE");
- if (codeset_name == NULL || codeset_name[0] == '\0')
- codeset_name = getenv ("LANG");
- if (codeset_name == NULL)
- codeset_name = "";
- else if (strchr (codeset_name, '.') != NULL)
- codeset_name = strchr (codeset_name, '.') + 1;
-# endif
-
- if (strcasecmp (codeset_name, "UTF-8") == 0
- || strcasecmp (codeset_name, "UTF8") == 0)
+ if (strcmp (locale_charset (), "UTF-8") == 0)
dfa->is_utf8 = 1;
/* We check exhaustively in the loop below if this charset is a
@@ -938,7 +977,7 @@ free_workarea_compile (regex_t *preg)
static reg_errcode_t
create_initial_state (re_dfa_t *dfa)
{
- int first, i;
+ Idx first, i;
reg_errcode_t err;
re_node_set init_nodes;
@@ -957,10 +996,10 @@ create_initial_state (re_dfa_t *dfa)
if (dfa->nbackref > 0)
for (i = 0; i < init_nodes.nelem; ++i)
{
- int node_idx = init_nodes.elems[i];
+ Idx node_idx = init_nodes.elems[i];
re_token_type_t type = dfa->nodes[node_idx].type;
- int clexp_idx;
+ Idx clexp_idx;
if (type != OP_BACK_REF)
continue;
for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx)
@@ -976,7 +1015,7 @@ create_initial_state (re_dfa_t *dfa)
if (type == OP_BACK_REF)
{
- int dest_idx = dfa->edests[node_idx].elems[0];
+ Idx dest_idx = dfa->edests[node_idx].elems[0];
if (!re_node_set_contains (&init_nodes, dest_idx))
{
re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx);
@@ -1020,17 +1059,20 @@ create_initial_state (re_dfa_t *dfa)
static void
optimize_utf8 (re_dfa_t *dfa)
{
- int node, i, mb_chars = 0, has_period = 0;
+ Idx node;
+ int i;
+ bool mb_chars = false;
+ bool has_period = false;
for (node = 0; node < dfa->nodes_len; ++node)
switch (dfa->nodes[node].type)
{
case CHARACTER:
- if (dfa->nodes[node].opr.c >= 0x80)
- mb_chars = 1;
+ if (dfa->nodes[node].opr.c >= ASCII_CHARS)
+ mb_chars = true;
break;
case ANCHOR:
- switch (dfa->nodes[node].opr.idx)
+ switch (dfa->nodes[node].opr.ctx_type)
{
case LINE_FIRST:
case LINE_LAST:
@@ -1038,12 +1080,14 @@ optimize_utf8 (re_dfa_t *dfa)
case BUF_LAST:
break;
default:
- /* Word anchors etc. cannot be handled. */
+ /* Word anchors etc. cannot be handled. It's okay to test
+ opr.ctx_type since constraints (for all DFA nodes) are
+ created by ORing one or more opr.ctx_type values. */
return;
}
break;
case OP_PERIOD:
- has_period = 1;
+ has_period = true;
break;
case OP_BACK_REF:
case OP_ALT:
@@ -1055,11 +1099,18 @@ optimize_utf8 (re_dfa_t *dfa)
case COMPLEX_BRACKET:
return;
case SIMPLE_BRACKET:
- /* Just double check. The non-ASCII range starts at 0x80. */
- assert (0x80 % BITSET_WORD_BITS == 0);
- for (i = 0x80 / BITSET_WORD_BITS; i < BITSET_WORDS; ++i)
- if (dfa->nodes[node].opr.sbcset[i])
- return;
+ /* Just double check. */
+ {
+ int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0
+ ? 0
+ : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS);
+ for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i)
+ {
+ if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0)
+ return;
+ rshift = 0;
+ }
+ }
break;
default:
abort ();
@@ -1069,7 +1120,7 @@ optimize_utf8 (re_dfa_t *dfa)
for (node = 0; node < dfa->nodes_len; ++node)
{
if (dfa->nodes[node].type == CHARACTER
- && dfa->nodes[node].opr.c >= 0x80)
+ && dfa->nodes[node].opr.c >= ASCII_CHARS)
dfa->nodes[node].mb_partial = 0;
else if (dfa->nodes[node].type == OP_PERIOD)
dfa->nodes[node].type = OP_UTF8_PERIOD;
@@ -1092,18 +1143,18 @@ analyze (regex_t *preg)
reg_errcode_t ret;
/* Allocate arrays. */
- dfa->nexts = re_malloc (int, dfa->nodes_alloc);
- dfa->org_indices = re_malloc (int, dfa->nodes_alloc);
+ dfa->nexts = re_malloc (Idx, dfa->nodes_alloc);
+ 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))
return REG_ESPACE;
- dfa->subexp_map = re_malloc (int, preg->re_nsub);
+ dfa->subexp_map = re_malloc (Idx, preg->re_nsub);
if (dfa->subexp_map != NULL)
{
- int i;
+ Idx i;
for (i = 0; i < preg->re_nsub; i++)
dfa->subexp_map[i] = i;
preorder (dfa->str_tree, optimize_subexps, dfa);
@@ -1228,7 +1279,7 @@ optimize_subexps (void *extra, bin_tree_t *node)
else if (node->token.type == SUBEXP
&& node->left && node->left->token.type == SUBEXP)
{
- int other_idx = node->left->token.opr.idx;
+ Idx other_idx = node->left->token.opr.idx;
node->left = node->left->left;
if (node->left)
@@ -1236,7 +1287,7 @@ optimize_subexps (void *extra, bin_tree_t *node)
dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx];
if (other_idx < BITSET_WORD_BITS)
- dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx);
+ dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx);
}
return REG_NOERROR;
@@ -1316,8 +1367,10 @@ 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 (BE (node->node_idx == REG_MISSING, 0))
return REG_ESPACE;
+ if (node->token.type == ANCHOR)
+ dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
}
return REG_NOERROR;
}
@@ -1350,7 +1403,7 @@ static reg_errcode_t
link_nfa_nodes (void *extra, bin_tree_t *node)
{
re_dfa_t *dfa = (re_dfa_t *) extra;
- int idx = node->node_idx;
+ Idx idx = node->node_idx;
reg_errcode_t err = REG_NOERROR;
switch (node->token.type)
@@ -1365,7 +1418,7 @@ link_nfa_nodes (void *extra, bin_tree_t *node)
case OP_DUP_ASTERISK:
case OP_ALT:
{
- int left, right;
+ Idx left, right;
dfa->has_plural_match = 1;
if (node->left != NULL)
left = node->left->first->node_idx;
@@ -1375,8 +1428,8 @@ link_nfa_nodes (void *extra, bin_tree_t *node)
right = node->right->first->node_idx;
else
right = node->next->node_idx;
- assert (left > -1);
- assert (right > -1);
+ assert (REG_VALID_INDEX (left));
+ assert (REG_VALID_INDEX (right));
err = re_node_set_init_2 (dfa->edests + idx, left, right);
}
break;
@@ -1408,14 +1461,15 @@ link_nfa_nodes (void *extra, bin_tree_t *node)
static reg_errcode_t
internal_function
-duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node,
- int root_node, unsigned int init_constraint)
+duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
+ Idx root_node, unsigned int init_constraint)
{
- int org_node, clone_node, ret;
+ Idx org_node, clone_node;
+ bool ok;
unsigned int constraint = init_constraint;
for (org_node = top_org_node, clone_node = top_clone_node;;)
{
- int org_dest, clone_dest;
+ Idx org_dest, clone_dest;
if (dfa->nodes[org_node].type == OP_BACK_REF)
{
/* If the back reference epsilon-transit, its destination must
@@ -1425,11 +1479,11 @@ duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int 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 (BE (clone_dest == REG_MISSING, 0))
return REG_ESPACE;
dfa->nexts[clone_node] = dfa->nexts[org_node];
- ret = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (ret < 0, 0))
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
return REG_ESPACE;
}
else if (dfa->edests[org_node].nelem == 0)
@@ -1446,27 +1500,23 @@ duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node,
destination. */
org_dest = dfa->edests[org_node].elems[0];
re_node_set_empty (dfa->edests + clone_node);
- if (dfa->nodes[org_node].type == ANCHOR)
+ clone_dest = search_duplicated_node (dfa, org_dest, constraint);
+ /* If the node is root_node itself, it means the epsilon closure
+ has a loop. Then tie it to the destination of the root_node. */
+ if (org_node == root_node && clone_node != org_node)
{
- /* In case of the node has another constraint, append it. */
- if (org_node == root_node && clone_node != org_node)
- {
- /* ...but if the node is root_node itself, it means the
- epsilon closure have a loop, then tie it to the
- destination of the root_node. */
- ret = re_node_set_insert (dfa->edests + clone_node,
- org_dest);
- if (BE (ret < 0, 0))
- return REG_ESPACE;
- break;
- }
- constraint |= dfa->nodes[org_node].opr.ctx_type;
+ ok = re_node_set_insert (dfa->edests + clone_node, org_dest);
+ if (BE (! ok, 0))
+ 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 (BE (clone_dest == REG_MISSING, 0))
return REG_ESPACE;
- ret = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (ret < 0, 0))
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
return REG_ESPACE;
}
else /* dfa->edests[org_node].nelem == 2 */
@@ -1477,15 +1527,15 @@ duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node,
re_node_set_empty (dfa->edests + clone_node);
/* Search for a duplicated node which satisfies the constraint. */
clone_dest = search_duplicated_node (dfa, org_dest, constraint);
- if (clone_dest == -1)
+ if (clone_dest == REG_MISSING)
{
- /* There are no such a duplicated node, create a new one. */
+ /* 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 (BE (clone_dest == REG_MISSING, 0))
return REG_ESPACE;
- ret = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (ret < 0, 0))
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
return REG_ESPACE;
err = duplicate_node_closure (dfa, org_dest, clone_dest,
root_node, constraint);
@@ -1494,19 +1544,19 @@ duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node,
}
else
{
- /* There are a duplicated node which satisfy the constraint,
+ /* There is a duplicated node which satisfy the constraint,
use it to avoid infinite loop. */
- ret = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (ret < 0, 0))
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
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 (BE (clone_dest == REG_MISSING, 0))
return REG_ESPACE;
- ret = re_node_set_insert (dfa->edests + clone_node, clone_dest);
- if (BE (ret < 0, 0))
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
return REG_ESPACE;
}
org_node = org_dest;
@@ -1518,33 +1568,32 @@ duplicate_node_closure (re_dfa_t *dfa, int top_org_node, int top_clone_node,
/* Search for a node which is duplicated from the node ORG_NODE, and
satisfies the constraint CONSTRAINT. */
-static int
-search_duplicated_node (const re_dfa_t *dfa, int org_node,
+static Idx
+search_duplicated_node (const re_dfa_t *dfa, Idx org_node,
unsigned int constraint)
{
- int idx;
+ Idx idx;
for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx)
{
if (org_node == dfa->org_indices[idx]
&& constraint == dfa->nodes[idx].constraint)
return idx; /* Found. */
}
- return -1; /* Not found. */
+ return REG_MISSING; /* Not found. */
}
/* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT.
- Return the index of the new node, or -1 if insufficient storage is
+ Return the index of the new node, or REG_MISSING if insufficient storage is
available. */
-static int
-duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint)
+static Idx
+duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint)
{
- int dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
- if (BE (dup_idx != -1, 1))
+ Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
+ if (BE (dup_idx != REG_MISSING, 1))
{
dfa->nodes[dup_idx].constraint = constraint;
- if (dfa->nodes[org_idx].type == ANCHOR)
- dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].opr.ctx_type;
+ dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint;
dfa->nodes[dup_idx].duplicated = 1;
/* Store the index of the original node. */
@@ -1556,17 +1605,18 @@ duplicate_node (re_dfa_t *dfa, int org_idx, unsigned int constraint)
static reg_errcode_t
calc_inveclosure (re_dfa_t *dfa)
{
- int src, idx, ret;
+ Idx src, idx;
+ bool ok;
for (idx = 0; idx < dfa->nodes_len; ++idx)
re_node_set_init_empty (dfa->inveclosures + idx);
for (src = 0; src < dfa->nodes_len; ++src)
{
- int *elems = dfa->eclosures[src].elems;
+ Idx *elems = dfa->eclosures[src].elems;
for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx)
{
- ret = re_node_set_insert_last (dfa->inveclosures + elems[idx], src);
- if (BE (ret == -1, 0))
+ ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src);
+ if (BE (! ok, 0))
return REG_ESPACE;
}
}
@@ -1579,11 +1629,12 @@ calc_inveclosure (re_dfa_t *dfa)
static reg_errcode_t
calc_eclosure (re_dfa_t *dfa)
{
- int node_idx, incomplete;
+ Idx node_idx;
+ bool incomplete;
#ifdef DEBUG
assert (dfa->nodes_len > 0);
#endif
- incomplete = 0;
+ incomplete = false;
/* For each nodes, calculate epsilon closure. */
for (node_idx = 0; ; ++node_idx)
{
@@ -1593,25 +1644,25 @@ calc_eclosure (re_dfa_t *dfa)
{
if (!incomplete)
break;
- incomplete = 0;
+ incomplete = false;
node_idx = 0;
}
#ifdef DEBUG
- assert (dfa->eclosures[node_idx].nelem != -1);
+ assert (dfa->eclosures[node_idx].nelem != REG_MISSING);
#endif
/* If we have already calculated, skip it. */
if (dfa->eclosures[node_idx].nelem != 0)
continue;
/* Calculate epsilon closure of `node_idx'. */
- err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, 1);
+ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true);
if (BE (err != REG_NOERROR, 0))
return err;
if (dfa->eclosures[node_idx].nelem == 0)
{
- incomplete = 1;
+ incomplete = true;
re_node_set_free (&eclosure_elem);
}
}
@@ -1621,32 +1672,30 @@ calc_eclosure (re_dfa_t *dfa)
/* Calculate epsilon closure of NODE. */
static reg_errcode_t
-calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root)
+calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
{
reg_errcode_t err;
- unsigned int constraint;
- int i, incomplete;
+ Idx i;
+ bool incomplete;
+ bool ok;
re_node_set eclosure;
- incomplete = 0;
+ incomplete = false;
err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1);
if (BE (err != REG_NOERROR, 0))
return err;
/* This indicates that we are calculating this node now.
We reference this value to avoid infinite loop. */
- dfa->eclosures[node].nelem = -1;
+ dfa->eclosures[node].nelem = REG_MISSING;
- constraint = ((dfa->nodes[node].type == ANCHOR)
- ? dfa->nodes[node].opr.ctx_type : 0);
- /* If the current node has constraints, duplicate all nodes.
- Since they must inherit the constraints. */
- if (constraint
+ /* If the current node has constraints, duplicate all nodes
+ since they must inherit the constraints. */
+ if (dfa->nodes[node].constraint
&& dfa->edests[node].nelem
&& !dfa->nodes[dfa->edests[node].elems[0]].duplicated)
{
- int org_node, cur_node;
- org_node = cur_node = node;
- err = duplicate_node_closure (dfa, node, node, node, constraint);
+ err = duplicate_node_closure (dfa, node, node, node,
+ dfa->nodes[node].constraint);
if (BE (err != REG_NOERROR, 0))
return err;
}
@@ -1656,19 +1705,19 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root)
for (i = 0; i < dfa->edests[node].nelem; ++i)
{
re_node_set eclosure_elem;
- int edest = dfa->edests[node].elems[i];
+ Idx edest = dfa->edests[node].elems[i];
/* If calculating the epsilon closure of `edest' is in progress,
return intermediate result. */
- if (dfa->eclosures[edest].nelem == -1)
+ if (dfa->eclosures[edest].nelem == REG_MISSING)
{
- incomplete = 1;
+ incomplete = true;
continue;
}
/* If we haven't calculated the epsilon closure of `edest' yet,
calculate now. Otherwise use calculated epsilon closure. */
if (dfa->eclosures[edest].nelem == 0)
{
- err = calc_eclosure_iter (&eclosure_elem, dfa, edest, 0);
+ err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false);
if (BE (err != REG_NOERROR, 0))
return err;
}
@@ -1680,13 +1729,15 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, int node, int root)
the epsilon closure of this node is also incomplete. */
if (dfa->eclosures[edest].nelem == 0)
{
- incomplete = 1;
+ incomplete = true;
re_node_set_free (&eclosure_elem);
}
}
/* Epsilon closures include itself. */
- re_node_set_insert (&eclosure, node);
+ ok = re_node_set_insert (&eclosure, node);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
if (incomplete && !root)
dfa->eclosures[node].nelem = 0;
else
@@ -2082,7 +2133,7 @@ parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
static bin_tree_t *
parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
- reg_syntax_t syntax, int nest, reg_errcode_t *err)
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
{
re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
bin_tree_t *tree, *branch = NULL;
@@ -2123,9 +2174,9 @@ parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
static bin_tree_t *
parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
- reg_syntax_t syntax, int nest, reg_errcode_t *err)
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
{
- bin_tree_t *tree, *exp;
+ bin_tree_t *tree, *expr;
re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
tree = parse_expression (regexp, preg, token, syntax, nest, err);
if (BE (*err != REG_NOERROR && tree == NULL, 0))
@@ -2134,14 +2185,14 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
while (token->type != OP_ALT && token->type != END_OF_RE
&& (nest == 0 || token->type != OP_CLOSE_SUBEXP))
{
- exp = parse_expression (regexp, preg, token, syntax, nest, err);
- if (BE (*err != REG_NOERROR && exp == NULL, 0))
+ expr = parse_expression (regexp, preg, token, syntax, nest, err);
+ if (BE (*err != REG_NOERROR && expr == NULL, 0))
{
return NULL;
}
- if (tree != NULL && exp != NULL)
+ if (tree != NULL && expr != NULL)
{
- tree = create_tree (dfa, tree, exp, CONCAT);
+ tree = create_tree (dfa, tree, expr, CONCAT);
if (tree == NULL)
{
*err = REG_ESPACE;
@@ -2149,8 +2200,8 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
}
}
else if (tree == NULL)
- tree = exp;
- /* Otherwise exp == NULL, we don't need to create new tree. */
+ tree = expr;
+ /* Otherwise expr == NULL, we don't need to create new tree. */
}
return tree;
}
@@ -2163,7 +2214,7 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
static bin_tree_t *
parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
- reg_syntax_t syntax, int nest, reg_errcode_t *err)
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
{
re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
bin_tree_t *tree;
@@ -2379,7 +2430,7 @@ parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
static bin_tree_t *
parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
- reg_syntax_t syntax, int nest, reg_errcode_t *err)
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
{
re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
bin_tree_t *tree;
@@ -2420,14 +2471,14 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err)
{
bin_tree_t *tree = NULL, *old_tree = NULL;
- int i, start, end, start_idx = re_string_cur_idx (regexp);
+ Idx i, start, end, start_idx = re_string_cur_idx (regexp);
re_token_t start_token = *token;
if (token->type == OP_OPEN_DUP_NUM)
{
end = 0;
start = fetch_number (regexp, token, syntax);
- if (start == -1)
+ if (start == REG_MISSING)
{
if (token->type == CHARACTER && token->opr.c == ',')
start = 0; /* We treat "{,m}" as "{0,m}". */
@@ -2437,14 +2488,14 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
return NULL;
}
}
- if (BE (start != -2, 1))
+ if (BE (start != REG_ERROR, 1))
{
/* We treat "{n}" as "{n,n}". */
end = ((token->type == OP_CLOSE_DUP_NUM) ? start
: ((token->type == CHARACTER && token->opr.c == ',')
- ? fetch_number (regexp, token, syntax) : -2));
+ ? fetch_number (regexp, token, syntax) : REG_ERROR));
}
- if (BE (start == -2 || end == -2, 0))
+ if (BE (start == REG_ERROR || end == REG_ERROR, 0))
{
/* Invalid sequence. */
if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0))
@@ -2466,7 +2517,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
return elem;
}
- if (BE (end != -1 && start > end, 0))
+ if (BE (end != REG_MISSING && start > end, 0))
{
/* First number greater than second. */
*err = REG_BADBR;
@@ -2476,7 +2527,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
else
{
start = (token->type == OP_DUP_PLUS) ? 1 : 0;
- end = (token->type == OP_DUP_QUESTION) ? 1 : -1;
+ end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING;
}
fetch_token (token, regexp, syntax);
@@ -2514,24 +2565,26 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
if (elem->token.type == SUBEXP)
postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
- tree = create_tree (dfa, elem, NULL, (end == -1 ? OP_DUP_ASTERISK : OP_ALT));
+ tree = create_tree (dfa, elem, NULL,
+ (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT));
if (BE (tree == NULL, 0))
goto parse_dup_op_espace;
- /* This loop is actually executed only when end != -1,
+ /* This loop is actually executed only when end != REG_MISSING,
to rewrite <re>{0,n} as (<re>(<re>...<re>?)?)?... We have
already created the start+1-th copy. */
- for (i = start + 2; i <= end; ++i)
- {
- elem = duplicate_tree (elem, dfa);
- tree = create_tree (dfa, tree, elem, CONCAT);
- if (BE (elem == NULL || tree == NULL, 0))
- goto parse_dup_op_espace;
-
- tree = create_tree (dfa, tree, NULL, OP_ALT);
- if (BE (tree == NULL, 0))
- goto parse_dup_op_espace;
- }
+ if ((Idx) -1 < 0 || end != REG_MISSING)
+ for (i = start + 2; i <= end; ++i)
+ {
+ elem = duplicate_tree (elem, dfa);
+ tree = create_tree (dfa, tree, elem, CONCAT);
+ if (BE (elem == NULL || tree == NULL, 0))
+ goto parse_dup_op_espace;
+
+ tree = create_tree (dfa, tree, NULL, OP_ALT);
+ if (BE (tree == NULL, 0))
+ goto parse_dup_op_espace;
+ }
if (old_tree)
tree = create_tree (dfa, old_tree, tree, CONCAT);
@@ -2558,7 +2611,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
static reg_errcode_t
internal_function
# ifdef RE_ENABLE_I18N
-build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
+build_range_exp (bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc,
bracket_elem_t *start_elem, bracket_elem_t *end_elem)
# else /* not RE_ENABLE_I18N */
build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem,
@@ -2616,7 +2669,7 @@ build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem,
{
/* There is not enough space, need realloc. */
wchar_t *new_array_start, *new_array_end;
- int new_nranges;
+ Idx new_nranges;
/* +1 in case of mbcset->nranges is 0. */
new_nranges = 2 * mbcset->nranges + 1;
@@ -2678,12 +2731,11 @@ build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem,
static reg_errcode_t
internal_function
+build_collating_symbol (bitset_t sbcset,
# ifdef RE_ENABLE_I18N
-build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
- int *coll_sym_alloc, const unsigned char *name)
-# else /* not RE_ENABLE_I18N */
-build_collating_symbol (bitset_t sbcset, const unsigned char *name)
-# endif /* not RE_ENABLE_I18N */
+ re_charset_t *mbcset, Idx *coll_sym_alloc,
+# endif
+ const unsigned char *name)
{
size_t name_len = strlen ((const char *) name);
if (BE (name_len != 1, 0))
@@ -2825,7 +2877,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
__attribute ((always_inline))
build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
re_charset_t *mbcset;
- int *range_alloc;
+ Idx *range_alloc;
bitset_t sbcset;
bracket_elem_t *start_elem, *end_elem;
{
@@ -2860,7 +2912,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
/* There is not enough space, need realloc. */
uint32_t *new_array_start;
uint32_t *new_array_end;
- int new_nranges;
+ Idx new_nranges;
/* +1 in case of mbcset->nranges is 0. */
new_nranges = 2 * mbcset->nranges + 1;
@@ -2908,7 +2960,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
__attribute ((always_inline))
build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
re_charset_t *mbcset;
- int *coll_sym_alloc;
+ Idx *coll_sym_alloc;
bitset_t sbcset;
const unsigned char *name;
{
@@ -2940,7 +2992,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
{
/* Not enough, realloc it. */
/* +1 in case of mbcset->ncoll_syms is 0. */
- int new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1;
+ Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1;
/* Use realloc since mbcset->coll_syms is NULL
if *alloc == 0. */
int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t,
@@ -2970,13 +3022,13 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
re_bitset_ptr_t sbcset;
#ifdef RE_ENABLE_I18N
re_charset_t *mbcset;
- int coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0;
- int equiv_class_alloc = 0, char_class_alloc = 0;
+ Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0;
+ Idx equiv_class_alloc = 0, char_class_alloc = 0;
#endif /* not RE_ENABLE_I18N */
- int non_match = 0;
+ bool non_match = false;
bin_tree_t *work_tree;
int token_len;
- int first_round = 1;
+ bool first_round = true;
#ifdef _LIBC
collseqmb = (const unsigned char *)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB);
@@ -3019,9 +3071,9 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
#ifdef RE_ENABLE_I18N
mbcset->non_match = 1;
#endif /* not RE_ENABLE_I18N */
- non_match = 1;
+ non_match = true;
if (syntax & RE_HAT_LISTS_NOT_NEWLINE)
- bitset_set (sbcset, '\0');
+ 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))
@@ -3041,7 +3093,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE];
unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE];
reg_errcode_t ret;
- int token_len2 = 0, is_range_exp = 0;
+ int token_len2 = 0;
+ bool is_range_exp = false;
re_token_t token2;
start_elem.opr.name = start_name_buf;
@@ -3052,7 +3105,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
*err = ret;
goto parse_bracket_exp_free_return;
}
- first_round = 0;
+ first_round = false;
/* Get information about the next token. We need it in any case. */
token_len = peek_token_bracket (token, regexp, syntax);
@@ -3081,15 +3134,15 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
token->type = CHARACTER;
}
else
- is_range_exp = 1;
+ is_range_exp = true;
}
}
- if (is_range_exp == 1)
+ if (is_range_exp == true)
{
end_elem.opr.name = end_name_buf;
ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2,
- dfa, syntax, 1);
+ dfa, syntax, true);
if (BE (ret != REG_NOERROR, 0))
{
*err = ret;
@@ -3259,7 +3312,7 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
static reg_errcode_t
parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
re_token_t *token, int token_len, re_dfa_t *dfa,
- reg_syntax_t syntax, int accept_hyphen)
+ reg_syntax_t syntax, bool accept_hyphen)
{
#ifdef RE_ENABLE_I18N
int cur_char_size;
@@ -3346,7 +3399,7 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
static reg_errcode_t
#ifdef RE_ENABLE_I18N
build_equiv_class (bitset_t sbcset, re_charset_t *mbcset,
- int *equiv_class_alloc, const unsigned char *name)
+ Idx *equiv_class_alloc, const unsigned char *name)
#else /* not RE_ENABLE_I18N */
build_equiv_class (bitset_t sbcset, const unsigned char *name)
#endif /* not RE_ENABLE_I18N */
@@ -3407,7 +3460,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
{
/* Not enough, realloc it. */
/* +1 in case of mbcset->nequiv_classes is 0. */
- int new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1;
+ Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1;
/* Use realloc since the array is NULL if *alloc == 0. */
int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes,
int32_t,
@@ -3438,7 +3491,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
static reg_errcode_t
#ifdef RE_ENABLE_I18N
build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
- re_charset_t *mbcset, int *char_class_alloc,
+ re_charset_t *mbcset, Idx *char_class_alloc,
const unsigned char *class_name, reg_syntax_t syntax)
#else /* not RE_ENABLE_I18N */
build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
@@ -3460,7 +3513,7 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
{
/* Not enough, realloc it. */
/* +1 in case of mbcset->nchar_classes is 0. */
- int new_char_class_alloc = 2 * mbcset->nchar_classes + 1;
+ Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1;
/* 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);
@@ -3477,13 +3530,13 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
if (BE (trans != NULL, 0)) \
{ \
for (i = 0; i < SBC_MAX; ++i) \
- if (ctype_func (i)) \
+ if (ctype_func (i)) \
bitset_set (sbcset, trans[i]); \
} \
else \
{ \
for (i = 0; i < SBC_MAX; ++i) \
- if (ctype_func (i)) \
+ if (ctype_func (i)) \
bitset_set (sbcset, i); \
} \
} while (0)
@@ -3521,13 +3574,13 @@ build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
static bin_tree_t *
build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
const unsigned char *class_name,
- const unsigned char *extra, int non_match,
+ const unsigned char *extra, bool non_match,
reg_errcode_t *err)
{
re_bitset_ptr_t sbcset;
#ifdef RE_ENABLE_I18N
re_charset_t *mbcset;
- int alloc = 0;
+ Idx alloc = 0;
#endif /* not RE_ENABLE_I18N */
reg_errcode_t ret;
re_token_t br_token;
@@ -3551,10 +3604,6 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
if (non_match)
{
#ifdef RE_ENABLE_I18N
- /*
- if (syntax & RE_HAT_LISTS_NOT_NEWLINE)
- bitset_set(cset->sbcset, '\0');
- */
mbcset->non_match = 1;
#endif /* not RE_ENABLE_I18N */
}
@@ -3632,25 +3681,27 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
/* This is intended for the expressions like "a{1,3}".
Fetch a number from `input', and return the number.
- Return -1, if the number field is empty like "{,1}".
- Return -2, If an error is occured. */
+ Return REG_MISSING if the number field is empty like "{,1}".
+ Return REG_ERROR if an error occurred. */
-static int
+static Idx
fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
{
- int num = -1;
+ Idx num = REG_MISSING;
unsigned char c;
while (1)
{
fetch_token (token, input, syntax);
c = token->opr.c;
if (BE (token->type == END_OF_RE, 0))
- return -2;
+ return REG_ERROR;
if (token->type == OP_CLOSE_DUP_NUM || c == ',')
break;
- num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2)
- ? -2 : ((num == -1) ? c - '0' : num * 10 + c - '0'));
- num = (num > RE_DUP_MAX) ? -2 : num;
+ num = ((token->type != CHARACTER || c < '0' || '9' < c
+ || num == REG_ERROR)
+ ? REG_ERROR
+ : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0'));
+ num = (num > RE_DUP_MAX) ? REG_ERROR : num;
}
return num;
}
@@ -3709,7 +3760,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
tree->token.opt_subexp = 0;
tree->first = NULL;
tree->next = NULL;
- tree->node_idx = -1;
+ tree->node_idx = REG_MISSING;
if (left != NULL)
left->parent = tree;
@@ -3724,7 +3775,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
static reg_errcode_t
mark_opt_subexp (void *extra, bin_tree_t *node)
{
- int idx = (int) (long) extra;
+ Idx idx = (Idx) (long) extra;
if (node->token.type == SUBEXP && node->token.opr.idx == idx)
node->token.opt_subexp = 1;
diff --git a/lib/regex.c b/lib/regex.c
index d2d4f28..4b13ec5 100644
--- a/lib/regex.c
+++ b/lib/regex.c
@@ -1,29 +1,28 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ 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. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include <config.h>
/* Make sure noone compiles this code with a C++ compiler. */
-#ifdef __cplusplus
+#if defined __cplusplus && defined _LIBC
# error "This is C code, use a C compiler"
#endif
diff --git a/lib/regex_.h b/lib/regex.h
index f6c145d..f1d584d 100644
--- a/lib/regex_.h
+++ b/lib/regex.h
@@ -1,23 +1,24 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005
+ Copyright (C) 1985,1989-93,1995-98,2000,2001,2002,2003,2005,2006
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 Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ 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. */
#ifndef _REGEX_H
#define _REGEX_H 1
@@ -29,13 +30,55 @@
extern "C" {
#endif
-/* POSIX says that <sys/types.h> must be included (by the caller) before
- <regex.h>. */
+/* Define __USE_GNU_REGEX to declare GNU extensions that violate the
+ POSIX name space rules. */
+#undef __USE_GNU_REGEX
+#if (defined _GNU_SOURCE \
+ || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE \
+ && !defined _XOPEN_SOURCE))
+# define __USE_GNU_REGEX 1
+#endif
+
+#ifdef _REGEX_LARGE_OFFSETS
+
+/* Use types and values that are wide enough to represent signed and
+ unsigned byte offsets in memory. This currently works only when
+ the regex code is used outside of the GNU C library; it is not yet
+ supported within glibc itself, and glibc users should not define
+ _REGEX_LARGE_OFFSETS. */
+
+/* The type of the offset of a byte within a string.
+ For historical reasons POSIX 1003.1-2004 requires that regoff_t be
+ at least as wide as off_t. However, many common POSIX platforms set
+ regoff_t to the more-sensible ssize_t and the Open Group has
+ signalled its intention to change the requirement to be that
+ regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN
+ 60 (2005-08-25). We don't know of any hosts where ssize_t or
+ ptrdiff_t is wider than ssize_t, so ssize_t is safe. */
+typedef ssize_t regoff_t;
+
+/* The type of nonnegative object indexes. Traditionally, GNU regex
+ uses 'int' for these. Code that uses __re_idx_t should work
+ regardless of whether the type is signed. */
+typedef size_t __re_idx_t;
+
+/* The type of object sizes. */
+typedef size_t __re_size_t;
+
+/* The type of object sizes, in places where the traditional code
+ uses unsigned long int. */
+typedef size_t __re_long_size_t;
+
+#else
+
+/* Use types that are binary-compatible with the traditional GNU regex
+ implementation, which mishandles strings longer than INT_MAX. */
+
+typedef int regoff_t;
+typedef int __re_idx_t;
+typedef unsigned int __re_size_t;
+typedef unsigned long int __re_long_size_t;
-#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
-/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
- should be there. */
-# include <stddef.h>
#endif
/* The following two types have to be signed and unsigned integer type
@@ -52,20 +95,22 @@ typedef unsigned long int active_reg_t;
add or remove a bit, only one other definition need change. */
typedef unsigned long int reg_syntax_t;
+#ifdef __USE_GNU_REGEX
+
/* If this bit is not set, then \ inside a bracket expression is literal.
If set, then such a \ quotes the following character. */
-#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
+# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
/* If this bit is not set, then + and ? are operators, and \+ and \? are
literals.
If set, then \+ and \? are operators and + and ? are literals. */
-#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
+# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
/* If this bit is set, then character classes are supported. They are:
[:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
[:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
If not set, then character classes are not supported. */
-#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
+# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
/* If this bit is set, then ^ and $ are always anchors (outside bracket
expressions, of course).
@@ -79,7 +124,7 @@ typedef unsigned long int reg_syntax_t;
POSIX draft 11.2 says that * etc. in leading positions is undefined.
We already implemented a previous draft which made those constructs
invalid, though, so we haven't changed the code back. */
-#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
+# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
/* If this bit is set, then special characters are always special
regardless of where they are in the pattern.
@@ -87,71 +132,71 @@ typedef unsigned long int reg_syntax_t;
some contexts; otherwise they are ordinary. Specifically,
* + ? and intervals are only special when not after the beginning,
open-group, or alternation operator. */
-#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
+# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
/* If this bit is set, then *, +, ?, and { cannot be first in an re or
immediately after an alternation or begin-group operator. */
-#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
+# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
/* If this bit is set, then . matches newline.
If not set, then it doesn't. */
-#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
+# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
/* If this bit is set, then . doesn't match NUL.
If not set, then it does. */
-#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
+# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
/* If this bit is set, nonmatching lists [^...] do not match newline.
If not set, they do. */
-#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
+# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
/* If this bit is set, either \{...\} or {...} defines an
interval, depending on RE_NO_BK_BRACES.
If not set, \{, \}, {, and } are literals. */
-#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
+# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
/* If this bit is set, +, ? and | aren't recognized as operators.
If not set, they are. */
-#define RE_LIMITED_OPS (RE_INTERVALS << 1)
+# define RE_LIMITED_OPS (RE_INTERVALS << 1)
/* If this bit is set, newline is an alternation operator.
If not set, newline is literal. */
-#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
+# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
/* If this bit is set, then `{...}' defines an interval, and \{ and \}
are literals.
If not set, then `\{...\}' defines an interval. */
-#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
+# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
/* If this bit is set, (...) defines a group, and \( and \) are literals.
If not set, \(...\) defines a group, and ( and ) are literals. */
-#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
+# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
/* If this bit is set, then \<digit> matches <digit>.
If not set, then \<digit> is a back-reference. */
-#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
+# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
/* If this bit is set, then | is an alternation operator, and \| is literal.
If not set, then \| is an alternation operator, and | is literal. */
-#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
+# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
/* If this bit is set, then an ending range point collating higher
than the starting range point, as in [z-a], is invalid.
If not set, then when ending range point collates higher than the
starting range point, the range is ignored. */
-#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
+# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
/* If this bit is set, then an unmatched ) is ordinary.
If not set, then an unmatched ) is invalid. */
-#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
+# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
/* If this bit is set, succeed as soon as we match the whole pattern,
without further backtracking. */
-#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
+# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
/* If this bit is set, do not process the GNU regex operators.
If not set, then the GNU regex operators are recognized. */
-#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
+# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
/* If this bit is set, turn on internal regex debugging.
If not set, and debugging was on, turn it off.
@@ -159,29 +204,31 @@ typedef unsigned long int reg_syntax_t;
We define this bit always, so that all that's needed to turn on
debugging is to recompile regex.c; the calling code can always have
this bit set, and it won't affect anything in the normal case. */
-#define RE_DEBUG (RE_NO_GNU_OPS << 1)
+# define RE_DEBUG (RE_NO_GNU_OPS << 1)
/* If this bit is set, a syntactically invalid interval is treated as
a string of ordinary characters. For example, the ERE 'a{1' is
treated as 'a\{1'. */
-#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
+# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
/* If this bit is set, then ignore case when matching.
If not set, then case is significant. */
-#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
+# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
/* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only
for ^, because it is difficult to scan the regex backwards to find
whether ^ should be special. */
-#define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
+# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
/* If this bit is set, then \{ cannot be first in an bre or
immediately after an alternation or begin-group operator. */
-#define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
+# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
/* If this bit is set, then no_sub will be set to 1 during
re_compile_pattern. */
-#define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
+# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
+
+#endif /* defined __USE_GNU_REGEX */
/* This global variable defines the particular regexp syntax to use (for
some interfaces). When a regexp is compiled, the syntax used is
@@ -189,63 +236,64 @@ typedef unsigned long int reg_syntax_t;
already-compiled regexps. */
extern reg_syntax_t re_syntax_options;
+#ifdef __USE_GNU_REGEX
/* Define combinations of the above bits for the standard possibilities.
(The [[[ comments delimit what gets put into the Texinfo file, so
don't delete them!) */
/* [[[begin syntaxes]]] */
-#define RE_SYNTAX_EMACS 0
+# define RE_SYNTAX_EMACS 0
-#define RE_SYNTAX_AWK \
+# define RE_SYNTAX_AWK \
(RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
| RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
| RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
| RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
-#define RE_SYNTAX_GNU_AWK \
+# define RE_SYNTAX_GNU_AWK \
((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
& ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \
| RE_CONTEXT_INVALID_OPS ))
-#define RE_SYNTAX_POSIX_AWK \
+# define RE_SYNTAX_POSIX_AWK \
(RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
| RE_INTERVALS | RE_NO_GNU_OPS)
-#define RE_SYNTAX_GREP \
+# define RE_SYNTAX_GREP \
(RE_BK_PLUS_QM | RE_CHAR_CLASSES \
| RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
| RE_NEWLINE_ALT)
-#define RE_SYNTAX_EGREP \
+# define RE_SYNTAX_EGREP \
(RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
| RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
| RE_NEWLINE_ALT | RE_NO_BK_PARENS \
| RE_NO_BK_VBAR)
-#define RE_SYNTAX_POSIX_EGREP \
+# define RE_SYNTAX_POSIX_EGREP \
(RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
| RE_INVALID_INTERVAL_ORD)
/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
-#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
+# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
-#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
+# define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
/* Syntax bits common to both basic and extended POSIX regex syntax. */
-#define _RE_SYNTAX_POSIX_COMMON \
+# define _RE_SYNTAX_POSIX_COMMON \
(RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
| RE_INTERVALS | RE_NO_EMPTY_RANGES)
-#define RE_SYNTAX_POSIX_BASIC \
+# define RE_SYNTAX_POSIX_BASIC \
(_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
isn't minimal, since other operators, such as \`, aren't disabled. */
-#define RE_SYNTAX_POSIX_MINIMAL_BASIC \
+# define RE_SYNTAX_POSIX_MINIMAL_BASIC \
(_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
-#define RE_SYNTAX_POSIX_EXTENDED \
+# define RE_SYNTAX_POSIX_EXTENDED \
(_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
| RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
| RE_NO_BK_PARENS | RE_NO_BK_VBAR \
@@ -253,21 +301,34 @@ extern reg_syntax_t re_syntax_options;
/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is
removed and RE_NO_BK_REFS is added. */
-#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
+# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
(_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
| RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
| RE_NO_BK_PARENS | RE_NO_BK_REFS \
| RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
/* [[[end syntaxes]]] */
+
+#endif /* defined __USE_GNU_REGEX */
-/* Maximum number of duplicates an interval can allow. Some systems
- (erroneously) define this in other header files, but we want our
+#ifdef __USE_GNU_REGEX
+
+/* Maximum number of duplicates an interval can allow. POSIX-conforming
+ systems might define this in <limits.h>, but we want our
value, so remove any previous define. */
-#ifdef RE_DUP_MAX
-# undef RE_DUP_MAX
-#endif
-/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */
-#define RE_DUP_MAX (0x7fff)
+# ifdef RE_DUP_MAX
+# undef RE_DUP_MAX
+# endif
+
+/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored
+ the counter as a 2-byte signed integer. This is no longer true, so
+ RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to
+ ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined.
+ However, there would be a huge performance problem if someone
+ actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains
+ its historical value. */
+# define RE_DUP_MAX (0x7fff)
+
+#endif /* defined __USE_GNU_REGEX */
/* POSIX `cflags' bits (i.e., information for `regcomp'). */
@@ -278,16 +339,16 @@ extern reg_syntax_t re_syntax_options;
/* If this bit is set, then ignore case when matching.
If not set, then case is significant. */
-#define REG_ICASE (REG_EXTENDED << 1)
+#define REG_ICASE (1 << 1)
/* If this bit is set, then anchors do not match at newline
characters in the string.
If not set, then anchors do match at newlines. */
-#define REG_NEWLINE (REG_ICASE << 1)
+#define REG_NEWLINE (1 << 2)
/* If this bit is set, then report only success or fail in regexec.
If not set, then returns differ between not matching and errors. */
-#define REG_NOSUB (REG_NEWLINE << 1)
+#define REG_NOSUB (1 << 3)
/* POSIX `eflags' bits (i.e., information for regexec). */
@@ -308,73 +369,112 @@ extern reg_syntax_t re_syntax_options;
/* If any error codes are removed, changed, or added, update the
- `re_error_msg' table in regex.c. */
+ `__re_error_msgid' table in regcomp.c. */
+
typedef enum
{
-#ifdef _XOPEN_SOURCE
- REG_ENOSYS = -1, /* This will never happen for this implementation. */
-#endif
-
- REG_NOERROR = 0, /* Success. */
- REG_NOMATCH, /* Didn't find a match (for regexec). */
+ _REG_ENOSYS = -1, /* This will never happen for this implementation. */
+ _REG_NOERROR = 0, /* Success. */
+ _REG_NOMATCH, /* Didn't find a match (for regexec). */
/* POSIX regcomp return error codes. (In the order listed in the
standard.) */
- REG_BADPAT, /* Invalid pattern. */
- REG_ECOLLATE, /* Inalid collating element. */
- REG_ECTYPE, /* Invalid character class name. */
- REG_EESCAPE, /* Trailing backslash. */
- REG_ESUBREG, /* Invalid back reference. */
- REG_EBRACK, /* Unmatched left bracket. */
- REG_EPAREN, /* Parenthesis imbalance. */
- REG_EBRACE, /* Unmatched \{. */
- REG_BADBR, /* Invalid contents of \{\}. */
- REG_ERANGE, /* Invalid range end. */
- REG_ESPACE, /* Ran out of memory. */
- REG_BADRPT, /* No preceding re for repetition op. */
+ _REG_BADPAT, /* Invalid pattern. */
+ _REG_ECOLLATE, /* Invalid collating element. */
+ _REG_ECTYPE, /* Invalid character class name. */
+ _REG_EESCAPE, /* Trailing backslash. */
+ _REG_ESUBREG, /* Invalid back reference. */
+ _REG_EBRACK, /* Unmatched left bracket. */
+ _REG_EPAREN, /* Parenthesis imbalance. */
+ _REG_EBRACE, /* Unmatched \{. */
+ _REG_BADBR, /* Invalid contents of \{\}. */
+ _REG_ERANGE, /* Invalid range end. */
+ _REG_ESPACE, /* Ran out of memory. */
+ _REG_BADRPT, /* No preceding re for repetition op. */
/* Error codes we've added. */
- REG_EEND, /* Premature end. */
- REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
- REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
+ _REG_EEND, /* Premature end. */
+ _REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
+ _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
} reg_errcode_t;
+
+#ifdef _XOPEN_SOURCE
+# define REG_ENOSYS _REG_ENOSYS
+#endif
+#define REG_NOERROR _REG_NOERROR
+#define REG_NOMATCH _REG_NOMATCH
+#define REG_BADPAT _REG_BADPAT
+#define REG_ECOLLATE _REG_ECOLLATE
+#define REG_ECTYPE _REG_ECTYPE
+#define REG_EESCAPE _REG_EESCAPE
+#define REG_ESUBREG _REG_ESUBREG
+#define REG_EBRACK _REG_EBRACK
+#define REG_EPAREN _REG_EPAREN
+#define REG_EBRACE _REG_EBRACE
+#define REG_BADBR _REG_BADBR
+#define REG_ERANGE _REG_ERANGE
+#define REG_ESPACE _REG_ESPACE
+#define REG_BADRPT _REG_BADRPT
+#define REG_EEND _REG_EEND
+#define REG_ESIZE _REG_ESIZE
+#define REG_ERPAREN _REG_ERPAREN
+/* struct re_pattern_buffer normally uses member names like `buffer'
+ that POSIX does not allow. In POSIX mode these members have names
+ with leading `re_' (e.g., `re_buffer'). */
+#ifdef __USE_GNU_REGEX
+# define _REG_RE_NAME(id) id
+# define _REG_RM_NAME(id) id
+#else
+# define _REG_RE_NAME(id) re_##id
+# define _REG_RM_NAME(id) rm_##id
+#endif
+
+/* The user can specify the type of the re_translate member by
+ defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned
+ char *. This pollutes the POSIX name space, so in POSIX mode just
+ use unsigned char *. */
+#ifdef __USE_GNU_REGEX
+# ifndef RE_TRANSLATE_TYPE
+# define RE_TRANSLATE_TYPE unsigned char *
+# endif
+# define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE
+#else
+# define REG_TRANSLATE_TYPE unsigned char *
+#endif
+
/* This data structure represents a compiled pattern. Before calling
the pattern compiler, the fields `buffer', `allocated', `fastmap',
`translate', and `no_sub' can be set. After the pattern has been
compiled, the `re_nsub' field is available. All other fields are
private to the regex routines. */
-#ifndef RE_TRANSLATE_TYPE
-# define RE_TRANSLATE_TYPE unsigned char *
-#endif
-
struct re_pattern_buffer
{
/* Space that holds the compiled pattern. It is declared as
`unsigned char *' because its elements are sometimes used as
array indexes. */
- unsigned char *buffer;
+ unsigned char *_REG_RE_NAME (buffer);
/* Number of bytes to which `buffer' points. */
- unsigned long int allocated;
+ __re_long_size_t _REG_RE_NAME (allocated);
/* Number of bytes actually used in `buffer'. */
- unsigned long int used;
+ __re_long_size_t _REG_RE_NAME (used);
/* Syntax setting with which the pattern was compiled. */
- reg_syntax_t syntax;
+ reg_syntax_t _REG_RE_NAME (syntax);
/* Pointer to a fastmap, if any, otherwise zero. re_search uses the
fastmap, if there is one, to skip over impossible starting points
for matches. */
- char *fastmap;
+ char *_REG_RE_NAME (fastmap);
/* Either a translate table to apply to all characters before
comparing them, or zero for no translation. The translation is
applied to a pattern when it is compiled and to a string when it
is matched. */
- RE_TRANSLATE_TYPE translate;
+ REG_TRANSLATE_TYPE _REG_RE_NAME (translate);
/* Number of subexpressions found by the compiler. */
size_t re_nsub;
@@ -383,56 +483,56 @@ struct re_pattern_buffer
Well, in truth it's used only in `re_search_2', to see whether or
not we should use the fastmap, so we don't set this absolutely
perfectly; see `re_compile_fastmap' (the `duplicate' case). */
- unsigned can_be_null : 1;
+ unsigned int _REG_RE_NAME (can_be_null) : 1;
/* If REGS_UNALLOCATED, allocate space in the `regs' structure
for `max (RE_NREGS, re_nsub + 1)' groups.
If REGS_REALLOCATE, reallocate space if necessary.
If REGS_FIXED, use what's there. */
-#define REGS_UNALLOCATED 0
-#define REGS_REALLOCATE 1
-#define REGS_FIXED 2
- unsigned regs_allocated : 2;
+#ifdef __USE_GNU_REGEX
+# define REGS_UNALLOCATED 0
+# define REGS_REALLOCATE 1
+# define REGS_FIXED 2
+#endif
+ unsigned int _REG_RE_NAME (regs_allocated) : 2;
/* Set to zero when `regex_compile' compiles a pattern; set to one
by `re_compile_fastmap' if it updates the fastmap. */
- unsigned fastmap_accurate : 1;
+ unsigned int _REG_RE_NAME (fastmap_accurate) : 1;
/* If set, `re_match_2' does not return information about
subexpressions. */
- unsigned no_sub : 1;
+ unsigned int _REG_RE_NAME (no_sub) : 1;
/* If set, a beginning-of-line anchor doesn't match at the beginning
of the string. */
- unsigned not_bol : 1;
+ unsigned int _REG_RE_NAME (not_bol) : 1;
/* Similarly for an end-of-line anchor. */
- unsigned not_eol : 1;
+ unsigned int _REG_RE_NAME (not_eol) : 1;
/* If true, an anchor at a newline matches. */
- unsigned newline_anchor : 1;
+ unsigned int _REG_RE_NAME (newline_anchor) : 1;
+
+/* [[[end pattern_buffer]]] */
};
typedef struct re_pattern_buffer regex_t;
-/* Type for byte offsets within the string. POSIX mandates this. */
-typedef int regoff_t;
-
-
/* 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;
+ __re_size_t _REG_RM_NAME (num_regs);
+ regoff_t *_REG_RM_NAME (start);
+ regoff_t *_REG_RM_NAME (end);
};
/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
`re_match_2' returns information about at least this many registers
the first time a `regs' structure is passed. */
-#ifndef RE_NREGS
+#if !defined RE_NREGS && defined __USE_GNU_REGEX
# define RE_NREGS 30
#endif
@@ -470,30 +570,35 @@ extern int re_compile_fastmap (struct re_pattern_buffer *__buffer);
characters. Return the starting position of the match, -1 for no
match, or -2 for an internal error. Also return register
information in REGS (if REGS and BUFFER->no_sub are nonzero). */
-extern int re_search (struct re_pattern_buffer *__buffer, const char *__string,
- int __length, int __start, int __range,
- struct re_registers *__regs);
+extern regoff_t re_search (struct re_pattern_buffer *__buffer,
+ const char *__string, __re_idx_t __length,
+ __re_idx_t __start, regoff_t __range,
+ struct re_registers *__regs);
/* Like `re_search', but search in the concatenation of STRING1 and
STRING2. Also, stop searching at index START + STOP. */
-extern int re_search_2 (struct re_pattern_buffer *__buffer,
- const char *__string1, int __length1,
- const char *__string2, int __length2, int __start,
- int __range, struct re_registers *__regs, int __stop);
+extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
+ const char *__string1, __re_idx_t __length1,
+ const char *__string2, __re_idx_t __length2,
+ __re_idx_t __start, regoff_t __range,
+ struct re_registers *__regs,
+ __re_idx_t __stop);
/* Like `re_search', but return how many characters in STRING the regexp
in BUFFER matched, starting at position START. */
-extern int re_match (struct re_pattern_buffer *__buffer, const char *__string,
- int __length, int __start, struct re_registers *__regs);
+extern regoff_t re_match (struct re_pattern_buffer *__buffer,
+ const char *__string, __re_idx_t __length,
+ __re_idx_t __start, struct re_registers *__regs);
/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
-extern int re_match_2 (struct re_pattern_buffer *__buffer,
- const char *__string1, int __length1,
- const char *__string2, int __length2, int __start,
- struct re_registers *__regs, int __stop);
+extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
+ const char *__string1, __re_idx_t __length1,
+ const char *__string2, __re_idx_t __length2,
+ __re_idx_t __start, struct re_registers *__regs,
+ __re_idx_t __stop);
/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
@@ -510,7 +615,7 @@ extern int re_match_2 (struct re_pattern_buffer *__buffer,
freeing the old data. */
extern void re_set_registers (struct re_pattern_buffer *__buffer,
struct re_registers *__regs,
- unsigned int __num_regs,
+ __re_size_t __num_regs,
regoff_t *__starts, regoff_t *__ends);
#if defined _REGEX_RE_COMP || defined _LIBC
@@ -522,37 +627,45 @@ extern int re_exec (const char *);
#endif
/* GCC 2.95 and later have "__restrict"; C99 compilers have
- "restrict", and "configure" may have defined "restrict". */
-#ifndef __restrict
-# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
-# if defined restrict || 199901L <= __STDC_VERSION__
-# define __restrict restrict
-# else
-# define __restrict
-# endif
+ "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__)
+# define _Restrict_ __restrict
+# else
+# define _Restrict_
# endif
#endif
-/* gcc 3.1 and up support the [restrict] syntax. */
-#ifndef __restrict_arr
-# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
-# define __restrict_arr __restrict
+/* 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. */
+#ifndef _Restrict_arr_
+# if ((199901L <= __STDC_VERSION__ \
+ || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \
+ && !__STRICT_ANSI__)) \
+ && !defined __GNUG__)
+# define _Restrict_arr_ _Restrict_
# else
-# define __restrict_arr
+# define _Restrict_arr_
# endif
#endif
/* POSIX compatibility. */
-extern int regcomp (regex_t *__restrict __preg,
- const char *__restrict __pattern,
+extern int regcomp (regex_t *_Restrict_ __preg,
+ const char *_Restrict_ __pattern,
int __cflags);
-extern int regexec (const regex_t *__restrict __preg,
- const char *__restrict __string, size_t __nmatch,
- regmatch_t __pmatch[__restrict_arr],
+extern int regexec (const regex_t *_Restrict_ __preg,
+ const char *_Restrict_ __string, size_t __nmatch,
+ regmatch_t __pmatch[_Restrict_arr_],
int __eflags);
-extern size_t regerror (int __errcode, const regex_t *__restrict __preg,
- char *__restrict __errbuf, size_t __errbuf_size);
+extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg,
+ char *_Restrict_ __errbuf, size_t __errbuf_size);
extern void regfree (regex_t *__preg);
diff --git a/lib/regex_internal.c b/lib/regex_internal.c
index a0b3fa7..8a5a286 100644
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -1,34 +1,36 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ 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. */
-static void re_string_construct_common (const char *str, int len,
+static void re_string_construct_common (const char *str, Idx len,
re_string_t *pstr,
- RE_TRANSLATE_TYPE trans, int icase,
+ RE_TRANSLATE_TYPE trans, bool icase,
const re_dfa_t *dfa) internal_function;
static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
const re_node_set *nodes,
- unsigned int hash) internal_function;
+ re_hashval_t hash) internal_function;
static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
const re_node_set *nodes,
unsigned int context,
- unsigned int hash) internal_function;
+ re_hashval_t hash) internal_function;
/* Functions for string operation. */
@@ -37,11 +39,11 @@ static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
static reg_errcode_t
internal_function
-re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len,
- RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
+re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len,
+ RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
{
reg_errcode_t ret;
- int init_buf_len;
+ Idx init_buf_len;
/* Ensure at least one character fits into the buffers. */
if (init_len < dfa->mb_cur_max)
@@ -65,8 +67,8 @@ re_string_allocate (re_string_t *pstr, const char *str, int len, int init_len,
static reg_errcode_t
internal_function
-re_string_construct (re_string_t *pstr, const char *str, int len,
- RE_TRANSLATE_TYPE trans, int icase, const re_dfa_t *dfa)
+re_string_construct (re_string_t *pstr, const char *str, Idx len,
+ RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
{
reg_errcode_t ret;
memset (pstr, '\0', sizeof (re_string_t));
@@ -128,18 +130,25 @@ re_string_construct (re_string_t *pstr, const char *str, int len,
static reg_errcode_t
internal_function
-re_string_realloc_buffers (re_string_t *pstr, int new_buf_len)
+re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
{
#ifdef RE_ENABLE_I18N
if (pstr->mb_cur_max > 1)
{
- wint_t *new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
+ wint_t *new_wcs;
+
+ /* Avoid overflow. */
+ size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
+ if (BE (SIZE_MAX / max_object_size < new_buf_len, 0))
+ return REG_ESPACE;
+
+ new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
if (BE (new_wcs == NULL, 0))
return REG_ESPACE;
pstr->wcs = new_wcs;
if (pstr->offsets != NULL)
{
- int *new_offsets = re_realloc (pstr->offsets, int, new_buf_len);
+ Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len);
if (BE (new_offsets == NULL, 0))
return REG_ESPACE;
pstr->offsets = new_offsets;
@@ -161,15 +170,15 @@ re_string_realloc_buffers (re_string_t *pstr, int new_buf_len)
static void
internal_function
-re_string_construct_common (const char *str, int len, re_string_t *pstr,
- RE_TRANSLATE_TYPE trans, int icase,
+re_string_construct_common (const char *str, Idx len, re_string_t *pstr,
+ RE_TRANSLATE_TYPE trans, bool icase,
const re_dfa_t *dfa)
{
pstr->raw_mbs = (const unsigned char *) str;
pstr->len = len;
pstr->raw_len = len;
pstr->trans = trans;
- pstr->icase = icase ? 1 : 0;
+ pstr->icase = icase;
pstr->mbs_allocated = (trans != NULL || icase);
pstr->mb_cur_max = dfa->mb_cur_max;
pstr->is_utf8 = dfa->is_utf8;
@@ -202,7 +211,7 @@ build_wcs_buffer (re_string_t *pstr)
unsigned char buf[64];
#endif
mbstate_t prev_st;
- int byte_idx, end_idx, remain_len;
+ Idx byte_idx, end_idx, remain_len;
size_t mbclen;
/* Build the buffers from pstr->valid_len to either pstr->len or
@@ -229,7 +238,7 @@ 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);
+ mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
if (BE (mbclen == (size_t) -2, 0))
{
/* The buffer doesn't have enough space, finish to build. */
@@ -259,12 +268,12 @@ build_wcs_buffer (re_string_t *pstr)
/* Build wide character buffer PSTR->WCS like build_wcs_buffer,
but for REG_ICASE. */
-static int
+static reg_errcode_t
internal_function
build_wcs_upper_buffer (re_string_t *pstr)
{
mbstate_t prev_st;
- int src_idx, byte_idx, end_idx, remain_len;
+ Idx src_idx, byte_idx, end_idx, remain_len;
size_t mbclen;
#ifdef _LIBC
char buf[MB_LEN_MAX];
@@ -299,10 +308,10 @@ build_wcs_upper_buffer (re_string_t *pstr)
remain_len = end_idx - byte_idx;
prev_st = pstr->cur_state;
- mbclen = mbrtowc (&wc,
- ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx
- + byte_idx), remain_len, &pstr->cur_state);
- if (BE (mbclen + 2 > 2, 1))
+ 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))
{
wchar_t wcu = wc;
if (iswlower (wc))
@@ -369,8 +378,8 @@ 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 + 2 > 2, 1))
+ mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+ if (BE (mbclen < (size_t) -2, 1))
{
wchar_t wcu = wc;
if (iswlower (wc))
@@ -393,7 +402,7 @@ build_wcs_upper_buffer (re_string_t *pstr)
if (pstr->offsets == NULL)
{
- pstr->offsets = re_malloc (int, pstr->bufs_len);
+ pstr->offsets = re_malloc (Idx, pstr->bufs_len);
if (pstr->offsets == NULL)
return REG_ESPACE;
@@ -475,34 +484,41 @@ build_wcs_upper_buffer (re_string_t *pstr)
/* Skip characters until the index becomes greater than NEW_RAW_IDX.
Return the index. */
-static int
+static Idx
internal_function
-re_string_skip_chars (re_string_t *pstr, int new_raw_idx, wint_t *last_wc)
+re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc)
{
mbstate_t prev_st;
- int rawbuf_idx;
+ Idx rawbuf_idx;
size_t mbclen;
- wchar_t wc = 0;
+ wint_t wc = WEOF;
/* Skip the characters which are not necessary to check. */
for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len;
rawbuf_idx < new_raw_idx;)
{
- int remain_len;
+ wchar_t wc2;
+ Idx remain_len;
remain_len = pstr->len - rawbuf_idx;
prev_st = pstr->cur_state;
- mbclen = mbrtowc (&wc, (const char *) pstr->raw_mbs + rawbuf_idx,
- remain_len, &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))
{
- /* We treat these cases as a singlebyte character. */
+ /* We treat these cases as a single byte character. */
+ if (mbclen == 0 || remain_len == 0)
+ wc = L'\0';
+ else
+ wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx);
mbclen = 1;
pstr->cur_state = prev_st;
}
+ else
+ wc = wc2;
/* Then proceed the next character. */
rawbuf_idx += mbclen;
}
- *last_wc = (wint_t) wc;
+ *last_wc = wc;
return rawbuf_idx;
}
#endif /* RE_ENABLE_I18N */
@@ -514,7 +530,7 @@ static void
internal_function
build_upper_buffer (re_string_t *pstr)
{
- int char_idx, end_idx;
+ Idx char_idx, end_idx;
end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx)
@@ -537,7 +553,7 @@ static void
internal_function
re_string_translate_buffer (re_string_t *pstr)
{
- int buf_idx, end_idx;
+ Idx buf_idx, end_idx;
end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx)
@@ -556,10 +572,13 @@ re_string_translate_buffer (re_string_t *pstr)
static reg_errcode_t
internal_function
-re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
+re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
{
- int offset = idx - pstr->raw_mbs_idx;
- if (BE (offset < 0, 0))
+ Idx offset;
+
+ if (BE (pstr->raw_mbs_idx <= idx, 0))
+ offset = idx - pstr->raw_mbs_idx;
+ else
{
/* Reset buffer. */
#ifdef RE_ENABLE_I18N
@@ -581,35 +600,99 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
if (BE (offset != 0, 1))
{
- /* Are the characters which are already checked remain? */
- if (BE (offset < pstr->valid_raw_len, 1)
-#ifdef RE_ENABLE_I18N
- /* Handling this would enlarge the code too much.
- Accept a slowdown in that case. */
- && pstr->offsets_needed == 0
-#endif
- )
+ /* Should the already checked characters be kept? */
+ if (BE (offset < pstr->valid_raw_len, 1))
{
/* Yes, move them to the front of the buffer. */
- pstr->tip_context = re_string_context_at (pstr, offset - 1, eflags);
#ifdef RE_ENABLE_I18N
- if (pstr->mb_cur_max > 1)
- memmove (pstr->wcs, pstr->wcs + offset,
- (pstr->valid_len - offset) * sizeof (wint_t));
+ if (BE (pstr->offsets_needed, 0))
+ {
+ Idx low = 0, high = pstr->valid_len, mid;
+ do
+ {
+ mid = (high + low) / 2;
+ if (pstr->offsets[mid] > offset)
+ high = mid;
+ else if (pstr->offsets[mid] < offset)
+ low = mid + 1;
+ else
+ break;
+ }
+ while (low < high);
+ if (pstr->offsets[mid] < offset)
+ ++mid;
+ pstr->tip_context = re_string_context_at (pstr, mid - 1,
+ eflags);
+ /* This can be quite complicated, so handle specially
+ only the common and easy case where the character with
+ different length representation of lower and upper
+ case is present at or after offset. */
+ if (pstr->valid_len > offset
+ && mid == offset && pstr->offsets[mid] == offset)
+ {
+ memmove (pstr->wcs, pstr->wcs + offset,
+ (pstr->valid_len - offset) * sizeof (wint_t));
+ memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset);
+ pstr->valid_len -= offset;
+ pstr->valid_raw_len -= offset;
+ for (low = 0; low < pstr->valid_len; low++)
+ pstr->offsets[low] = pstr->offsets[low + offset] - offset;
+ }
+ else
+ {
+ /* Otherwise, just find out how long the partial multibyte
+ character at offset is and fill it with WEOF/255. */
+ pstr->len = pstr->raw_len - idx + offset;
+ pstr->stop = pstr->raw_stop - idx + offset;
+ pstr->offsets_needed = 0;
+ while (mid > 0 && pstr->offsets[mid - 1] == offset)
+ --mid;
+ while (mid < pstr->valid_len)
+ if (pstr->wcs[mid] != WEOF)
+ break;
+ else
+ ++mid;
+ if (mid == pstr->valid_len)
+ pstr->valid_len = 0;
+ else
+ {
+ pstr->valid_len = pstr->offsets[mid] - offset;
+ if (pstr->valid_len)
+ {
+ for (low = 0; low < pstr->valid_len; ++low)
+ pstr->wcs[low] = WEOF;
+ memset (pstr->mbs, 255, pstr->valid_len);
+ }
+ }
+ pstr->valid_raw_len = pstr->valid_len;
+ }
+ }
+ else
+#endif
+ {
+ pstr->tip_context = re_string_context_at (pstr, offset - 1,
+ eflags);
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ memmove (pstr->wcs, pstr->wcs + offset,
+ (pstr->valid_len - offset) * sizeof (wint_t));
#endif /* RE_ENABLE_I18N */
- if (BE (pstr->mbs_allocated, 0))
- memmove (pstr->mbs, pstr->mbs + offset,
- pstr->valid_len - offset);
- pstr->valid_len -= offset;
- pstr->valid_raw_len -= offset;
+ if (BE (pstr->mbs_allocated, 0))
+ memmove (pstr->mbs, pstr->mbs + offset,
+ pstr->valid_len - offset);
+ pstr->valid_len -= offset;
+ pstr->valid_raw_len -= offset;
#if DEBUG
- assert (pstr->valid_len > 0);
+ assert (pstr->valid_len > 0);
#endif
+ }
}
else
{
- /* No, skip all characters until IDX. */
#ifdef RE_ENABLE_I18N
+ /* No, skip all characters until IDX. */
+ Idx prev_valid_len = pstr->valid_len;
+
if (BE (pstr->offsets_needed, 0))
{
pstr->len = pstr->raw_len - idx + offset;
@@ -618,21 +701,22 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
}
#endif
pstr->valid_len = 0;
- pstr->valid_raw_len = 0;
#ifdef RE_ENABLE_I18N
if (pstr->mb_cur_max > 1)
{
- int wcs_idx;
+ Idx wcs_idx;
wint_t wc = WEOF;
if (pstr->is_utf8)
{
- const unsigned char *raw, *p, *q, *end;
+ const unsigned char *raw, *p, *end;
/* Special case UTF-8. Multi-byte chars start with any
byte other than 0x80 - 0xbf. */
raw = pstr->raw_mbs + pstr->raw_mbs_idx;
end = raw + (offset - pstr->mb_cur_max);
+ if (end < pstr->raw_mbs)
+ end = pstr->raw_mbs;
p = raw + offset - 1;
#ifdef _LIBC
/* We know the wchar_t encoding is UCS4, so for the simple
@@ -640,7 +724,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
if (isascii (*p) && BE (pstr->trans == NULL, 1))
{
memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
- pstr->valid_len = 0;
+ /* pstr->valid_len = 0; */
wc = (wchar_t) *p;
}
else
@@ -650,23 +734,21 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
{
mbstate_t cur_state;
wchar_t wc2;
- int mlen = raw + pstr->len - p;
+ Idx mlen = raw + pstr->len - p;
unsigned char buf[6];
size_t mbclen;
- q = p;
if (BE (pstr->trans != NULL, 0))
{
int i = mlen < 6 ? mlen : 6;
while (--i >= 0)
buf[i] = pstr->trans[p[i]];
- q = buf;
}
/* XXX Don't use mbrtowc, we know which conversion
to use (UTF-8 -> UCS4). */
memset (&cur_state, 0, sizeof (cur_state));
- mbclen = mbrtowc (&wc2, (const char *) p, mlen,
- &cur_state);
+ mbclen = __mbrtowc (&wc2, (const char *) p, mlen,
+ &cur_state);
if (raw + offset - p <= mbclen
&& mbclen < (size_t) -2)
{
@@ -681,6 +763,16 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
if (wc == WEOF)
pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx;
+ if (wc == WEOF)
+ pstr->tip_context
+ = re_string_context_at (pstr, prev_valid_len - 1, eflags);
+ else
+ pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0)
+ && IS_WIDE_WORD_CHAR (wc))
+ ? CONTEXT_WORD
+ : ((IS_WIDE_NEWLINE (wc)
+ && pstr->newline_anchor)
+ ? CONTEXT_NEWLINE : 0));
if (BE (pstr->valid_len, 0))
{
for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx)
@@ -689,17 +781,12 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
memset (pstr->mbs, 255, pstr->valid_len);
}
pstr->valid_raw_len = pstr->valid_len;
- pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0)
- && IS_WIDE_WORD_CHAR (wc))
- ? CONTEXT_WORD
- : ((IS_WIDE_NEWLINE (wc)
- && pstr->newline_anchor)
- ? CONTEXT_NEWLINE : 0));
}
else
#endif /* RE_ENABLE_I18N */
{
int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1];
+ pstr->valid_raw_len = 0;
if (pstr->trans)
c = pstr->trans[c];
pstr->tip_context = (bitset_contain (pstr->word_char, c)
@@ -721,7 +808,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
{
if (pstr->icase)
{
- int ret = build_wcs_upper_buffer (pstr);
+ reg_errcode_t ret = build_wcs_upper_buffer (pstr);
if (BE (ret != REG_NOERROR, 0))
return ret;
}
@@ -746,9 +833,10 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
static unsigned char
internal_function __attribute ((pure))
-re_string_peek_byte_case (const re_string_t *pstr, int idx)
+re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
{
- int ch, off;
+ int ch;
+ Idx off;
/* Handle the common (easiest) cases first. */
if (BE (!pstr->mbs_allocated, 1))
@@ -790,7 +878,8 @@ re_string_fetch_byte_case (re_string_t *pstr)
#ifdef RE_ENABLE_I18N
if (pstr->offsets_needed)
{
- int off, ch;
+ Idx off;
+ int ch;
/* For tr_TR.UTF-8 [[:islower:]] there is
[[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip
@@ -833,10 +922,10 @@ re_string_destruct (re_string_t *pstr)
static unsigned int
internal_function
-re_string_context_at (const re_string_t *input, int idx, int eflags)
+re_string_context_at (const re_string_t *input, Idx idx, int eflags)
{
int c;
- if (BE (idx < 0, 0))
+ if (BE (! REG_VALID_INDEX (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;
@@ -847,15 +936,15 @@ re_string_context_at (const re_string_t *input, int idx, int eflags)
if (input->mb_cur_max > 1)
{
wint_t wc;
- int wc_idx = idx;
+ Idx wc_idx = idx;
while(input->wcs[wc_idx] == WEOF)
{
#ifdef DEBUG
/* It must not happen. */
- assert (wc_idx >= 0);
+ assert (REG_VALID_INDEX (wc_idx));
#endif
--wc_idx;
- if (wc_idx < 0)
+ if (! REG_VALID_INDEX (wc_idx))
return input->tip_context;
}
wc = input->wcs[wc_idx];
@@ -878,11 +967,11 @@ re_string_context_at (const re_string_t *input, int idx, int eflags)
static reg_errcode_t
internal_function
-re_node_set_alloc (re_node_set *set, int size)
+re_node_set_alloc (re_node_set *set, Idx size)
{
set->alloc = size;
set->nelem = 0;
- set->elems = re_malloc (int, size);
+ set->elems = re_malloc (Idx, size);
if (BE (set->elems == NULL, 0))
return REG_ESPACE;
return REG_NOERROR;
@@ -890,11 +979,11 @@ re_node_set_alloc (re_node_set *set, int size)
static reg_errcode_t
internal_function
-re_node_set_init_1 (re_node_set *set, int elem)
+re_node_set_init_1 (re_node_set *set, Idx elem)
{
set->alloc = 1;
set->nelem = 1;
- set->elems = re_malloc (int, 1);
+ set->elems = re_malloc (Idx, 1);
if (BE (set->elems == NULL, 0))
{
set->alloc = set->nelem = 0;
@@ -906,10 +995,10 @@ re_node_set_init_1 (re_node_set *set, int elem)
static reg_errcode_t
internal_function
-re_node_set_init_2 (re_node_set *set, int elem1, int elem2)
+re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2)
{
set->alloc = 2;
- set->elems = re_malloc (int, 2);
+ set->elems = re_malloc (Idx, 2);
if (BE (set->elems == NULL, 0))
return REG_ESPACE;
if (elem1 == elem2)
@@ -942,13 +1031,13 @@ re_node_set_init_copy (re_node_set *dest, const re_node_set *src)
if (src->nelem > 0)
{
dest->alloc = dest->nelem;
- dest->elems = re_malloc (int, dest->alloc);
+ dest->elems = re_malloc (Idx, dest->alloc);
if (BE (dest->elems == NULL, 0))
{
dest->alloc = dest->nelem = 0;
return REG_ESPACE;
}
- memcpy (dest->elems, src->elems, src->nelem * sizeof (int));
+ memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
}
else
re_node_set_init_empty (dest);
@@ -964,7 +1053,7 @@ internal_function
re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
const re_node_set *src2)
{
- int i1, i2, is, id, delta, sbase;
+ Idx i1, i2, is, id, delta, sbase;
if (src1->nelem == 0 || src2->nelem == 0)
return REG_NOERROR;
@@ -972,8 +1061,8 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
conservative estimate. */
if (src1->nelem + src2->nelem + dest->nelem > dest->alloc)
{
- int new_alloc = src1->nelem + src2->nelem + dest->alloc;
- int *new_elems = re_realloc (dest->elems, int, new_alloc);
+ 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))
return REG_ESPACE;
dest->elems = new_elems;
@@ -991,25 +1080,25 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
if (src1->elems[i1] == src2->elems[i2])
{
/* Try to find the item in DEST. Maybe we could binary search? */
- while (id >= 0 && dest->elems[id] > src1->elems[i1])
+ while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1])
--id;
- if (id < 0 || dest->elems[id] != src1->elems[i1])
+ if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1])
dest->elems[--sbase] = src1->elems[i1];
- if (--i1 < 0 || --i2 < 0)
+ if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2))
break;
}
/* Lower the highest of the two items. */
else if (src1->elems[i1] < src2->elems[i2])
{
- if (--i2 < 0)
+ if (! REG_VALID_INDEX (--i2))
break;
}
else
{
- if (--i1 < 0)
+ if (! REG_VALID_INDEX (--i1))
break;
}
}
@@ -1022,7 +1111,7 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
DEST elements are already in place; this is more or
less the same loop that is in re_node_set_merge. */
dest->nelem += delta;
- if (delta > 0 && id >= 0)
+ if (delta > 0 && REG_VALID_INDEX (id))
for (;;)
{
if (dest->elems[is] > dest->elems[id])
@@ -1036,13 +1125,13 @@ re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
{
/* Slide from the bottom. */
dest->elems[id + delta] = dest->elems[id];
- if (--id < 0)
+ if (! REG_VALID_INDEX (--id))
break;
}
}
/* Copy remaining SRC elements. */
- memcpy (dest->elems, dest->elems + sbase, delta * sizeof (int));
+ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx));
return REG_NOERROR;
}
@@ -1055,11 +1144,11 @@ internal_function
re_node_set_init_union (re_node_set *dest, const re_node_set *src1,
const re_node_set *src2)
{
- int i1, i2, id;
+ Idx i1, i2, id;
if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0)
{
dest->alloc = src1->nelem + src2->nelem;
- dest->elems = re_malloc (int, dest->alloc);
+ dest->elems = re_malloc (Idx, dest->alloc);
if (BE (dest->elems == NULL, 0))
return REG_ESPACE;
}
@@ -1087,13 +1176,13 @@ re_node_set_init_union (re_node_set *dest, const re_node_set *src1,
if (i1 < src1->nelem)
{
memcpy (dest->elems + id, src1->elems + i1,
- (src1->nelem - i1) * sizeof (int));
+ (src1->nelem - i1) * sizeof (Idx));
id += src1->nelem - i1;
}
else if (i2 < src2->nelem)
{
memcpy (dest->elems + id, src2->elems + i2,
- (src2->nelem - i2) * sizeof (int));
+ (src2->nelem - i2) * sizeof (Idx));
id += src2->nelem - i2;
}
dest->nelem = id;
@@ -1107,13 +1196,13 @@ static reg_errcode_t
internal_function
re_node_set_merge (re_node_set *dest, const re_node_set *src)
{
- int is, id, sbase, delta;
+ Idx is, id, sbase, delta;
if (src == NULL || src->nelem == 0)
return REG_NOERROR;
if (dest->alloc < 2 * src->nelem + dest->nelem)
{
- int new_alloc = 2 * (src->nelem + dest->alloc);
- int *new_buffer = re_realloc (dest->elems, int, new_alloc);
+ Idx new_alloc = 2 * (src->nelem + dest->alloc);
+ Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc);
if (BE (new_buffer == NULL, 0))
return REG_ESPACE;
dest->elems = new_buffer;
@@ -1123,14 +1212,15 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
if (BE (dest->nelem == 0, 0))
{
dest->nelem = src->nelem;
- memcpy (dest->elems, src->elems, src->nelem * sizeof (int));
+ memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
return REG_NOERROR;
}
/* Copy into the top of DEST the items of SRC that are not
found in DEST. Maybe we could binary search in DEST? */
for (sbase = dest->nelem + 2 * src->nelem,
- is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; )
+ is = src->nelem - 1, id = dest->nelem - 1;
+ REG_VALID_INDEX (is) && REG_VALID_INDEX (id); )
{
if (dest->elems[id] == src->elems[is])
is--, id--;
@@ -1140,11 +1230,11 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
--id;
}
- if (is >= 0)
+ if (REG_VALID_INDEX (is))
{
/* If DEST is exhausted, the remaining items of SRC must be unique. */
sbase -= is + 1;
- memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (int));
+ memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx));
}
id = dest->nelem - 1;
@@ -1169,11 +1259,11 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
{
/* Slide from the bottom. */
dest->elems[id + delta] = dest->elems[id];
- if (--id < 0)
+ if (! REG_VALID_INDEX (--id))
{
/* Copy remaining SRC elements. */
memcpy (dest->elems, dest->elems + sbase,
- delta * sizeof (int));
+ delta * sizeof (Idx));
break;
}
}
@@ -1184,38 +1274,33 @@ re_node_set_merge (re_node_set *dest, const re_node_set *src)
/* Insert the new element ELEM to the re_node_set* SET.
SET should not already have ELEM.
- return -1 if an error is occured, return 1 otherwise. */
+ Return true if successful. */
-static int
+static bool
internal_function
-re_node_set_insert (re_node_set *set, int elem)
+re_node_set_insert (re_node_set *set, Idx elem)
{
- int idx;
+ Idx idx;
/* In case the set is empty. */
if (set->alloc == 0)
- {
- if (BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1))
- return 1;
- else
- return -1;
- }
+ return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1);
if (BE (set->nelem, 0) == 0)
{
/* We already guaranteed above that set->alloc != 0. */
set->elems[0] = elem;
++set->nelem;
- return 1;
+ return true;
}
/* Realloc if we need. */
if (set->alloc == set->nelem)
{
- int *new_elems;
+ Idx *new_elems;
set->alloc = set->alloc * 2;
- new_elems = re_realloc (set->elems, int, set->alloc);
+ new_elems = re_realloc (set->elems, Idx, set->alloc);
if (BE (new_elems == NULL, 0))
- return -1;
+ return false;
set->elems = new_elems;
}
@@ -1236,57 +1321,57 @@ re_node_set_insert (re_node_set *set, int elem)
/* Insert the new element. */
set->elems[idx] = elem;
++set->nelem;
- return 1;
+ return true;
}
/* Insert the new element ELEM to the re_node_set* SET.
SET should not already have any element greater than or equal to ELEM.
- Return -1 if an error is occured, return 1 otherwise. */
+ Return true if successful. */
-static int
+static bool
internal_function
-re_node_set_insert_last (re_node_set *set, int elem)
+re_node_set_insert_last (re_node_set *set, Idx elem)
{
/* Realloc if we need. */
if (set->alloc == set->nelem)
{
- int *new_elems;
+ Idx *new_elems;
set->alloc = (set->alloc + 1) * 2;
- new_elems = re_realloc (set->elems, int, set->alloc);
+ new_elems = re_realloc (set->elems, Idx, set->alloc);
if (BE (new_elems == NULL, 0))
- return -1;
+ return false;
set->elems = new_elems;
}
/* Insert the new element. */
set->elems[set->nelem++] = elem;
- return 1;
+ return true;
}
/* Compare two node sets SET1 and SET2.
- return 1 if SET1 and SET2 are equivalent, return 0 otherwise. */
+ Return true if SET1 and SET2 are equivalent. */
-static int
+static bool
internal_function __attribute ((pure))
re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
{
- int i;
+ Idx i;
if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem)
- return 0;
- for (i = set1->nelem ; --i >= 0 ; )
+ return false;
+ for (i = set1->nelem ; REG_VALID_INDEX (--i) ; )
if (set1->elems[i] != set2->elems[i])
- return 0;
- return 1;
+ return false;
+ return true;
}
/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */
-static int
+static Idx
internal_function __attribute ((pure))
-re_node_set_contains (const re_node_set *set, int elem)
+re_node_set_contains (const re_node_set *set, Idx elem)
{
- unsigned int idx, right, mid;
- if (set->nelem <= 0)
+ __re_size_t idx, right, mid;
+ if (! REG_VALID_NONZERO_INDEX (set->nelem))
return 0;
/* Binary search the element. */
@@ -1305,7 +1390,7 @@ re_node_set_contains (const re_node_set *set, int elem)
static void
internal_function
-re_node_set_remove_at (re_node_set *set, int idx)
+re_node_set_remove_at (re_node_set *set, Idx idx)
{
if (idx < 0 || idx >= set->nelem)
return;
@@ -1316,35 +1401,38 @@ re_node_set_remove_at (re_node_set *set, int idx)
/* Add the token TOKEN to dfa->nodes, and return the index of the token.
- Or return -1, if an error will be occured. */
+ Or return REG_MISSING if an error occurred. */
-static int
+static Idx
internal_function
re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
{
- int type = token.type;
if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0))
{
size_t new_nodes_alloc = dfa->nodes_alloc * 2;
- int *new_nexts, *new_indices;
+ Idx *new_nexts, *new_indices;
re_node_set *new_edests, *new_eclosures;
re_token_t *new_nodes;
+ size_t max_object_size =
+ MAX (sizeof (re_token_t),
+ MAX (sizeof (re_node_set),
+ sizeof (Idx)));
/* Avoid overflows. */
- if (BE (new_nodes_alloc < dfa->nodes_alloc, 0))
- return -1;
+ if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0))
+ return REG_MISSING;
new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
if (BE (new_nodes == NULL, 0))
- return -1;
+ return REG_MISSING;
dfa->nodes = new_nodes;
- new_nexts = re_realloc (dfa->nexts, int, new_nodes_alloc);
- new_indices = re_realloc (dfa->org_indices, int, new_nodes_alloc);
+ 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))
- return -1;
+ return REG_MISSING;
dfa->nexts = new_nexts;
dfa->org_indices = new_indices;
dfa->edests = new_edests;
@@ -1354,21 +1442,24 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
dfa->nodes[dfa->nodes_len] = token;
dfa->nodes[dfa->nodes_len].constraint = 0;
#ifdef RE_ENABLE_I18N
+ {
+ int type = token.type;
dfa->nodes[dfa->nodes_len].accept_mb =
(type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
+ }
#endif
- dfa->nexts[dfa->nodes_len] = -1;
+ dfa->nexts[dfa->nodes_len] = REG_MISSING;
re_node_set_init_empty (dfa->edests + dfa->nodes_len);
re_node_set_init_empty (dfa->eclosures + dfa->nodes_len);
return dfa->nodes_len++;
}
-static inline unsigned int
+static inline re_hashval_t
internal_function
calc_state_hash (const re_node_set *nodes, unsigned int context)
{
- unsigned int hash = nodes->nelem + context;
- int i;
+ re_hashval_t hash = nodes->nelem + context;
+ Idx i;
for (i = 0 ; i < nodes->nelem ; i++)
hash += nodes->elems[i];
return hash;
@@ -1388,10 +1479,14 @@ internal_function
re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
const re_node_set *nodes)
{
- unsigned int hash;
+ re_hashval_t hash;
re_dfastate_t *new_state;
struct re_state_table_entry *spot;
- int i;
+ Idx i;
+#ifdef lint
+ /* Suppress bogus uninitialized-variable warnings. */
+ *err = REG_NOERROR;
+#endif
if (BE (nodes->nelem == 0, 0))
{
*err = REG_NOERROR;
@@ -1432,10 +1527,14 @@ internal_function
re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
const re_node_set *nodes, unsigned int context)
{
- unsigned int hash;
+ re_hashval_t hash;
re_dfastate_t *new_state;
struct re_state_table_entry *spot;
- int i;
+ Idx i;
+#ifdef lint
+ /* Suppress bogus uninitialized-variable warnings. */
+ *err = REG_NOERROR;
+#endif
if (nodes->nelem == 0)
{
*err = REG_NOERROR;
@@ -1466,11 +1565,11 @@ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
static reg_errcode_t
register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
- unsigned int hash)
+ re_hashval_t hash)
{
struct re_state_table_entry *spot;
reg_errcode_t err;
- int i;
+ Idx i;
newstate->hash = hash;
err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem);
@@ -1478,15 +1577,16 @@ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
return REG_ESPACE;
for (i = 0; i < newstate->nodes.nelem; i++)
{
- int elem = newstate->nodes.elems[i];
+ Idx elem = newstate->nodes.elems[i];
if (!IS_EPSILON_NODE (dfa->nodes[elem].type))
- re_node_set_insert_last (&newstate->non_eps_nodes, elem);
+ if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0))
+ return REG_ESPACE;
}
spot = dfa->state_table + (hash & dfa->state_hash_mask);
if (BE (spot->alloc <= spot->num, 0))
{
- int new_alloc = 2 * spot->num + 2;
+ 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))
@@ -1520,9 +1620,9 @@ free_state (re_dfastate_t *state)
static re_dfastate_t *
internal_function
create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
- unsigned int hash)
+ re_hashval_t hash)
{
- int i;
+ Idx i;
reg_errcode_t err;
re_dfastate_t *newstate;
@@ -1570,9 +1670,9 @@ create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
static re_dfastate_t *
internal_function
create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
- unsigned int context, unsigned int hash)
+ unsigned int context, re_hashval_t hash)
{
- int i, nctx_nodes = 0;
+ Idx i, nctx_nodes = 0;
reg_errcode_t err;
re_dfastate_t *newstate;
@@ -1591,11 +1691,9 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
for (i = 0 ; i < nodes->nelem ; i++)
{
- unsigned int constraint = 0;
re_token_t *node = dfa->nodes + nodes->elems[i];
re_token_type_t type = node->type;
- if (node->constraint)
- constraint = node->constraint;
+ unsigned int constraint = node->constraint;
if (type == CHARACTER && !constraint)
continue;
@@ -1608,8 +1706,6 @@ create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
newstate->halt = 1;
else if (type == OP_BACK_REF)
newstate->has_backref = 1;
- else if (type == ANCHOR)
- constraint = node->opr.ctx_type;
if (constraint)
{
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index f22c13c..a5070dc 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -1,58 +1,57 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ 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. */
#ifndef _REGEX_INTERNAL_H
#define _REGEX_INTERNAL_H 1
#include <assert.h>
#include <ctype.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#if defined HAVE_LANGINFO_H || defined HAVE_LANGINFO_CODESET || defined _LIBC
+#ifdef _LIBC
# include <langinfo.h>
+#else
+# include "localcharset.h"
#endif
#if defined HAVE_LOCALE_H || defined _LIBC
# include <locale.h>
#endif
-#if defined HAVE_WCHAR_H || defined _LIBC
-# include <wchar.h>
-#endif /* HAVE_WCHAR_H || _LIBC */
-#if defined HAVE_WCTYPE_H || defined _LIBC
-# include <wctype.h>
-#endif /* HAVE_WCTYPE_H || _LIBC */
-#if defined HAVE_STDBOOL_H || defined _LIBC
-# include <stdbool.h>
-#endif /* HAVE_STDBOOL_H || _LIBC */
+
+#include <wchar.h>
+#include <wctype.h>
+#include <stdint.h>
#if defined _LIBC
# include <bits/libc-lock.h>
#else
-# define __libc_lock_define(CLASS,NAME)
# define __libc_lock_init(NAME) do { } while (0)
# define __libc_lock_lock(NAME) do { } while (0)
# define __libc_lock_unlock(NAME) do { } while (0)
#endif
/* In case that the system doesn't have isblank(). */
-#if !defined _LIBC && !defined HAVE_ISBLANK && !defined isblank
+#if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK))
# define isblank(ch) ((ch) == ' ' || (ch) == '\t')
#endif
@@ -83,7 +82,12 @@
# define gettext_noop(String) String
#endif
-#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_WCRTOMB && HAVE_MBRTOWC && HAVE_WCSCOLL) || _LIBC
+/* For loser systems without the definition. */
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC
# define RE_ENABLE_I18N
#endif
@@ -91,11 +95,16 @@
# define BE(expr, val) __builtin_expect (expr, val)
#else
# define BE(expr, val) (expr)
-# define inline
+# ifdef _LIBC
+# define inline
+# endif
#endif
-/* Number of single byte character. */
-#define SBC_MAX 256
+/* Number of ASCII characters. */
+#define ASCII_CHARS 0x80
+
+/* Number of single byte characters. */
+#define SBC_MAX (UCHAR_MAX + 1)
#define COLL_ELEM_LEN_MAX 8
@@ -108,48 +117,86 @@
# define __wctype wctype
# define __iswctype iswctype
# define __btowc btowc
-# define __mempcpy mempcpy
# define __wcrtomb wcrtomb
+# define __mbrtowc mbrtowc
# define __regfree regfree
# define attribute_hidden
#endif /* not _LIBC */
-#ifdef __GNUC__
+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
# define __attribute(arg) __attribute__ (arg)
#else
# define __attribute(arg)
#endif
-#ifndef SIZE_MAX
-#define SIZE_MAX ((size_t)-1)
+typedef __re_idx_t Idx;
+
+/* Special return value for failure to match. */
+#define REG_MISSING ((Idx) -1)
+
+/* Special return value for internal error. */
+#define REG_ERROR ((Idx) -2)
+
+/* Test whether N is a valid index, and is not one of the above. */
+#ifdef _REGEX_LARGE_OFFSETS
+# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR)
+#else
+# define REG_VALID_INDEX(n) (0 <= (n))
#endif
-extern const char __re_error_msgid[] attribute_hidden;
-extern const size_t __re_error_msgid_idx[] attribute_hidden;
+/* Test whether N is a valid nonzero index. */
+#ifdef _REGEX_LARGE_OFFSETS
+# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1))
+#else
+# define REG_VALID_NONZERO_INDEX(n) (0 < (n))
+#endif
+
+/* A hash value, suitable for computing hash tables. */
+typedef __re_size_t re_hashval_t;
/* An integer used to represent a set of bits. It must be unsigned,
and must be at least as wide as unsigned int. */
typedef unsigned long int bitset_word_t;
/* All bits set in a bitset_word_t. */
#define BITSET_WORD_MAX ULONG_MAX
-/* Number of bits in a bitset_word_t. */
-#define BITSET_WORD_BITS (sizeof (bitset_word_t) * CHAR_BIT)
-/* Number of bitset_word_t in a bit_set. */
-#define BITSET_WORDS (SBC_MAX / BITSET_WORD_BITS)
+
+/* Number of bits in a bitset_word_t. For portability to hosts with
+ padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)';
+ instead, deduce it directly from BITSET_WORD_MAX. Avoid
+ greater-than-32-bit integers and unconditional shifts by more than
+ 31 bits, as they're not portable. */
+#if BITSET_WORD_MAX == 0xffffffffUL
+# define BITSET_WORD_BITS 32
+#elif BITSET_WORD_MAX >> 31 >> 4 == 1
+# define BITSET_WORD_BITS 36
+#elif BITSET_WORD_MAX >> 31 >> 16 == 1
+# define BITSET_WORD_BITS 48
+#elif BITSET_WORD_MAX >> 31 >> 28 == 1
+# define BITSET_WORD_BITS 60
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1
+# define BITSET_WORD_BITS 64
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1
+# define BITSET_WORD_BITS 72
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1
+# define BITSET_WORD_BITS 128
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1
+# define BITSET_WORD_BITS 256
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1
+# define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */
+# if BITSET_WORD_BITS <= SBC_MAX
+# error "Invalid SBC_MAX"
+# endif
+#else
+# error "Add case for new bitset_word_t size"
+#endif
+
+/* Number of bitset_word_t values in a bitset_t. */
+#define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS)
+
typedef bitset_word_t bitset_t[BITSET_WORDS];
typedef bitset_word_t *re_bitset_ptr_t;
typedef const bitset_word_t *re_const_bitset_ptr_t;
-#define bitset_set(set,i) \
- (set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS)
-#define bitset_clear(set,i) \
- (set[i / BITSET_WORD_BITS] &= ~((bitset_word_t) 1 << i % BITSET_WORD_BITS))
-#define bitset_contain(set,i) \
- (set[i / BITSET_WORD_BITS] & ((bitset_word_t) 1 << i % BITSET_WORD_BITS))
-#define bitset_empty(set) memset (set, '\0', sizeof (bitset_t))
-#define bitset_set_all(set) memset (set, '\xff', sizeof (bitset_t))
-#define bitset_copy(dest,src) memcpy (dest, src, sizeof (bitset_t))
-
#define PREV_WORD_CONSTRAINT 0x0001
#define PREV_NOTWORD_CONSTRAINT 0x0002
#define NEXT_WORD_CONSTRAINT 0x0004
@@ -177,9 +224,9 @@ typedef enum
typedef struct
{
- int alloc;
- int nelem;
- int *elems;
+ Idx alloc;
+ Idx nelem;
+ Idx *elems;
} re_node_set;
typedef enum
@@ -265,19 +312,19 @@ typedef struct
unsigned int non_match : 1;
/* # of multibyte characters. */
- int nmbchars;
+ Idx nmbchars;
/* # of collating symbols. */
- int ncoll_syms;
+ Idx ncoll_syms;
/* # of equivalence classes. */
- int nequiv_classes;
+ Idx nequiv_classes;
/* # of range expressions. */
- int nranges;
+ Idx nranges;
/* # of character classes. */
- int nchar_classes;
+ Idx nchar_classes;
} re_charset_t;
#endif /* RE_ENABLE_I18N */
@@ -290,10 +337,10 @@ typedef struct
#ifdef RE_ENABLE_I18N
re_charset_t *mbcset; /* for COMPLEX_BRACKET */
#endif /* RE_ENABLE_I18N */
- int idx; /* for BACK_REF */
+ Idx idx; /* for BACK_REF */
re_context_type ctx_type; /* for ANCHOR */
} opr;
-#if __GNUC__ >= 2
+#if __GNUC__ >= 2 && !__STRICT_ANSI__
re_token_type_t type : 8;
#else
re_token_type_t type;
@@ -324,30 +371,30 @@ struct re_string_t
#ifdef RE_ENABLE_I18N
/* Store the wide character string which is corresponding to MBS. */
wint_t *wcs;
- int *offsets;
+ Idx *offsets;
mbstate_t cur_state;
#endif
/* Index in RAW_MBS. Each character mbs[i] corresponds to
raw_mbs[raw_mbs_idx + i]. */
- int raw_mbs_idx;
+ Idx raw_mbs_idx;
/* The length of the valid characters in the buffers. */
- int valid_len;
+ Idx valid_len;
/* The corresponding number of bytes in raw_mbs array. */
- int valid_raw_len;
+ Idx valid_raw_len;
/* The length of the buffers MBS and WCS. */
- int bufs_len;
+ Idx bufs_len;
/* The index in MBS, which is updated by re_string_fetch_byte. */
- int cur_idx;
+ Idx cur_idx;
/* length of RAW_MBS array. */
- int raw_len;
+ Idx raw_len;
/* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */
- int len;
+ Idx len;
/* End of the buffer may be shorter than its length in the cases such
as re_match_2, re_search_2. Then, we use STOP for end of the buffer
instead of LEN. */
- int raw_stop;
+ Idx raw_stop;
/* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */
- int stop;
+ Idx stop;
/* The context of mbs[0]. We store the context independently, since
the context of mbs[0] may be different from raw_mbs[0], which is
@@ -357,7 +404,7 @@ struct re_string_t
RE_TRANSLATE_TYPE trans;
/* Copy of re_dfa_t's word_char. */
re_const_bitset_ptr_t word_char;
- /* 1 if REG_ICASE. */
+ /* true if REG_ICASE. */
unsigned char icase;
unsigned char is_utf8;
unsigned char map_notascii;
@@ -374,7 +421,7 @@ struct re_dfa_t;
typedef struct re_dfa_t re_dfa_t;
#ifndef _LIBC
-# ifdef __i386__
+# if defined __i386__ && !defined __EMX__
# define internal_function __attribute ((regparm (3), stdcall))
# else
# define internal_function
@@ -382,15 +429,16 @@ typedef struct re_dfa_t re_dfa_t;
#endif
static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
- int new_buf_len)
+ Idx new_buf_len)
internal_function;
#ifdef RE_ENABLE_I18N
static void build_wcs_buffer (re_string_t *pstr) internal_function;
-static int build_wcs_upper_buffer (re_string_t *pstr) internal_function;
+static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr)
+ internal_function;
#endif /* RE_ENABLE_I18N */
static void build_upper_buffer (re_string_t *pstr) internal_function;
static void re_string_translate_buffer (re_string_t *pstr) internal_function;
-static unsigned int re_string_context_at (const re_string_t *input, int idx,
+static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
int eflags)
internal_function __attribute ((pure));
#define re_string_peek_byte(pstr, offset) \
@@ -425,6 +473,10 @@ static unsigned int re_string_context_at (const re_string_t *input, int idx,
# endif
#endif
+#ifndef MAX
+# define MAX(a,b) ((a) < (b) ? (b) : (a))
+#endif
+
#define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t)))
#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t)))
#define re_free(p) free (p)
@@ -441,7 +493,7 @@ struct bin_tree_t
/* `node_idx' is the index in dfa->nodes, if `type' == 0.
Otherwise `type' indicate the type of this node. */
- int node_idx;
+ Idx node_idx;
};
typedef struct bin_tree_t bin_tree_t;
@@ -485,7 +537,7 @@ typedef struct bin_tree_storage_t bin_tree_storage_t;
struct re_dfastate_t
{
- unsigned int hash;
+ re_hashval_t hash;
re_node_set nodes;
re_node_set non_eps_nodes;
re_node_set inveclosure;
@@ -505,8 +557,8 @@ typedef struct re_dfastate_t re_dfastate_t;
struct re_state_table_entry
{
- int num;
- int alloc;
+ Idx num;
+ Idx alloc;
re_dfastate_t **array;
};
@@ -514,8 +566,8 @@ struct re_state_table_entry
typedef struct
{
- int next_idx;
- int alloc;
+ Idx next_idx;
+ Idx alloc;
re_dfastate_t **array;
} state_array_t;
@@ -523,8 +575,8 @@ typedef struct
typedef struct
{
- int node;
- int str_idx; /* The position NODE match at. */
+ Idx node;
+ Idx str_idx; /* The position NODE match at. */
state_array_t path;
} re_sub_match_last_t;
@@ -534,20 +586,20 @@ typedef struct
typedef struct
{
- int str_idx;
- int node;
+ Idx str_idx;
+ Idx node;
state_array_t *path;
- int alasts; /* Allocation size of LASTS. */
- int nlasts; /* The number of LASTS. */
+ Idx alasts; /* Allocation size of LASTS. */
+ Idx nlasts; /* The number of LASTS. */
re_sub_match_last_t **lasts;
} re_sub_match_top_t;
struct re_backref_cache_entry
{
- int node;
- int str_idx;
- int subexp_from;
- int subexp_to;
+ Idx node;
+ Idx str_idx;
+ Idx subexp_from;
+ Idx subexp_to;
char more;
char unused;
unsigned short int eps_reachable_subexps_map;
@@ -565,18 +617,18 @@ typedef struct
/* EFLAGS of the argument of regexec. */
int eflags;
/* Where the matching ends. */
- int match_last;
- int last_node;
+ Idx match_last;
+ Idx last_node;
/* The state log used by the matcher. */
re_dfastate_t **state_log;
- int state_log_top;
+ Idx state_log_top;
/* Back reference cache. */
- int nbkref_ents;
- int abkref_ents;
+ Idx nbkref_ents;
+ Idx abkref_ents;
struct re_backref_cache_entry *bkref_ents;
int max_mb_elem_len;
- int nsub_tops;
- int asub_tops;
+ Idx nsub_tops;
+ Idx asub_tops;
re_sub_match_top_t **sub_tops;
} re_match_context_t;
@@ -584,23 +636,23 @@ typedef struct
{
re_dfastate_t **sifted_states;
re_dfastate_t **limited_states;
- int last_node;
- int last_str_idx;
+ Idx last_node;
+ Idx last_str_idx;
re_node_set limits;
} re_sift_context_t;
struct re_fail_stack_ent_t
{
- int idx;
- int node;
+ Idx idx;
+ Idx node;
regmatch_t *regs;
re_node_set eps_via_nodes;
};
struct re_fail_stack_t
{
- int num;
- int alloc;
+ Idx num;
+ Idx alloc;
struct re_fail_stack_ent_t *stack;
};
@@ -609,8 +661,8 @@ struct re_dfa_t
re_token_t *nodes;
size_t nodes_alloc;
size_t nodes_len;
- int *nexts;
- int *org_indices;
+ Idx *nexts;
+ Idx *org_indices;
re_node_set *edests;
re_node_set *eclosures;
re_node_set *inveclosures;
@@ -625,9 +677,9 @@ struct re_dfa_t
int str_tree_storage_idx;
/* number of subexpressions `re_nsub' is in regex_t. */
- unsigned int state_hash_mask;
- int init_node;
- int nbackref; /* The number of backreference in this dfa. */
+ re_hashval_t state_hash_mask;
+ Idx init_node;
+ Idx nbackref; /* The number of backreference in this dfa. */
/* Bitmap expressing which backreference is used. */
bitset_word_t used_bkref_map;
@@ -644,11 +696,13 @@ struct re_dfa_t
int mb_cur_max;
bitset_t word_char;
reg_syntax_t syntax;
- int *subexp_map;
+ Idx *subexp_map;
#ifdef DEBUG
char* re_str;
#endif
+#ifdef _LIBC
__libc_lock_define (, lock)
+#endif
};
#define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
@@ -679,13 +733,57 @@ typedef struct
} bracket_elem_t;
-/* Inline functions for bitset operation. */
+/* Inline functions for bitset_t operation. */
+
+static inline void
+bitset_set (bitset_t set, Idx i)
+{
+ set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS;
+}
+
+static inline void
+bitset_clear (bitset_t set, Idx i)
+{
+ set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS);
+}
+
+static inline bool
+bitset_contain (const bitset_t set, Idx i)
+{
+ return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1;
+}
+
+static inline void
+bitset_empty (bitset_t set)
+{
+ memset (set, '\0', sizeof (bitset_t));
+}
+
+static inline void
+bitset_set_all (bitset_t set)
+{
+ memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS));
+ if (SBC_MAX % BITSET_WORD_BITS != 0)
+ set[BITSET_WORDS - 1] =
+ ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1;
+}
+
+static inline void
+bitset_copy (bitset_t dest, const bitset_t src)
+{
+ memcpy (dest, src, sizeof (bitset_t));
+}
+
static inline void
bitset_not (bitset_t set)
{
int bitset_i;
- for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i)
+ for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i)
set[bitset_i] = ~set[bitset_i];
+ if (SBC_MAX % BITSET_WORD_BITS != 0)
+ set[BITSET_WORDS - 1] =
+ ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1)
+ & ~set[BITSET_WORDS - 1]);
}
static inline void
@@ -708,7 +806,7 @@ bitset_mask (bitset_t dest, const bitset_t src)
/* Inline functions for re_string. */
static inline int
internal_function __attribute ((pure))
-re_string_char_size_at (const re_string_t *pstr, int idx)
+re_string_char_size_at (const re_string_t *pstr, Idx idx)
{
int byte_idx;
if (pstr->mb_cur_max == 1)
@@ -721,7 +819,7 @@ re_string_char_size_at (const re_string_t *pstr, int idx)
static inline wint_t
internal_function __attribute ((pure))
-re_string_wchar_at (const re_string_t *pstr, int idx)
+re_string_wchar_at (const re_string_t *pstr, Idx idx)
{
if (pstr->mb_cur_max == 1)
return (wint_t) pstr->mbs[idx];
@@ -730,7 +828,7 @@ re_string_wchar_at (const re_string_t *pstr, int idx)
static int
internal_function __attribute ((pure))
-re_string_elem_size_at (const re_string_t *pstr, int idx)
+re_string_elem_size_at (const re_string_t *pstr, Idx idx)
{
# ifdef _LIBC
const unsigned char *p, *extra;
diff --git a/lib/regexec.c b/lib/regexec.c
index bdfa355..4853551 100644
--- a/lib/regexec.c
+++ b/lib/regexec.c
@@ -1,126 +1,131 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Extended regular expression matching and search library.
- Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ 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. */
static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
- int n) internal_function;
+ Idx n) internal_function;
static void match_ctx_clean (re_match_context_t *mctx) internal_function;
static void match_ctx_free (re_match_context_t *cache) internal_function;
-static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, int node,
- int str_idx, int from, int to)
+static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node,
+ Idx str_idx, Idx from, Idx to)
internal_function;
-static int search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx)
+static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
internal_function;
-static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, int node,
- int str_idx) internal_function;
+static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node,
+ Idx str_idx) internal_function;
static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop,
- int node, int str_idx)
+ Idx node, Idx str_idx)
internal_function;
static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
- re_dfastate_t **limited_sts, int last_node,
- int last_str_idx)
+ re_dfastate_t **limited_sts, Idx last_node,
+ Idx last_str_idx)
internal_function;
static reg_errcode_t re_search_internal (const regex_t *preg,
- const char *string, int length,
- int start, int range, int stop,
+ const char *string, Idx length,
+ Idx start, Idx last_start, Idx stop,
size_t nmatch, regmatch_t pmatch[],
int eflags) internal_function;
-static int re_search_2_stub (struct re_pattern_buffer *bufp,
- const char *string1, int length1,
- const char *string2, int length2,
- int start, int range, struct re_registers *regs,
- int stop, int ret_len) internal_function;
-static int re_search_stub (struct re_pattern_buffer *bufp,
- const char *string, int length, int start,
- int range, int stop, struct re_registers *regs,
- int ret_len) internal_function;
-static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
- int nregs, int regs_allocated) internal_function;
+static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp,
+ const char *string1, Idx length1,
+ const char *string2, Idx length2,
+ Idx start, regoff_t range,
+ struct re_registers *regs,
+ Idx stop, bool ret_len) internal_function;
+static regoff_t re_search_stub (struct re_pattern_buffer *bufp,
+ const char *string, Idx length, Idx start,
+ regoff_t range, Idx stop,
+ struct re_registers *regs,
+ bool ret_len) internal_function;
+static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
+ Idx nregs, int regs_allocated)
+ internal_function;
static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx)
internal_function;
-static int check_matching (re_match_context_t *mctx, int fl_longest_match,
- int *p_match_first) internal_function;
-static int check_halt_state_context (const re_match_context_t *mctx,
- const re_dfastate_t *state, int idx)
+static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match,
+ Idx *p_match_first) internal_function;
+static Idx check_halt_state_context (const re_match_context_t *mctx,
+ const re_dfastate_t *state, Idx idx)
internal_function;
static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
- regmatch_t *prev_idx_match, int cur_node,
- int cur_idx, int nmatch) internal_function;
+ regmatch_t *prev_idx_match, Idx cur_node,
+ Idx cur_idx, Idx nmatch) internal_function;
static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs,
- int str_idx, int dest_node, int nregs,
+ Idx str_idx, Idx dest_node, Idx nregs,
regmatch_t *regs,
re_node_set *eps_via_nodes)
internal_function;
static reg_errcode_t set_regs (const regex_t *preg,
const re_match_context_t *mctx,
size_t nmatch, regmatch_t *pmatch,
- int fl_backtrack) internal_function;
+ bool fl_backtrack) internal_function;
static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs)
internal_function;
#ifdef RE_ENABLE_I18N
static int sift_states_iter_mb (const re_match_context_t *mctx,
re_sift_context_t *sctx,
- int node_idx, int str_idx, int max_str_idx)
+ Idx node_idx, Idx str_idx, Idx max_str_idx)
internal_function;
#endif /* RE_ENABLE_I18N */
static reg_errcode_t sift_states_backward (const re_match_context_t *mctx,
re_sift_context_t *sctx)
internal_function;
static reg_errcode_t build_sifted_states (const re_match_context_t *mctx,
- re_sift_context_t *sctx, int str_idx,
+ re_sift_context_t *sctx, Idx str_idx,
re_node_set *cur_dest)
internal_function;
static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx,
re_sift_context_t *sctx,
- int str_idx,
+ Idx str_idx,
re_node_set *dest_nodes)
internal_function;
static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa,
re_node_set *dest_nodes,
const re_node_set *candidates)
internal_function;
-static int check_dst_limits (const re_match_context_t *mctx,
- re_node_set *limits,
- int dst_node, int dst_idx, int src_node,
- int src_idx) internal_function;
+static bool check_dst_limits (const re_match_context_t *mctx,
+ const re_node_set *limits,
+ Idx dst_node, Idx dst_idx, Idx src_node,
+ Idx src_idx) internal_function;
static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx,
- int boundaries, int subexp_idx,
- int from_node, int bkref_idx)
+ int boundaries, Idx subexp_idx,
+ Idx from_node, Idx bkref_idx)
internal_function;
static int check_dst_limits_calc_pos (const re_match_context_t *mctx,
- int limit, int subexp_idx,
- int node, int str_idx,
- int bkref_idx) internal_function;
+ Idx limit, Idx subexp_idx,
+ Idx node, Idx str_idx,
+ Idx bkref_idx) internal_function;
static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa,
re_node_set *dest_nodes,
const re_node_set *candidates,
re_node_set *limits,
struct re_backref_cache_entry *bkref_ents,
- int str_idx) internal_function;
+ Idx str_idx) internal_function;
static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx,
re_sift_context_t *sctx,
- int str_idx, const re_node_set *candidates)
+ Idx str_idx, const re_node_set *candidates)
internal_function;
static reg_errcode_t merge_state_array (const re_dfa_t *dfa,
re_dfastate_t **dst,
- re_dfastate_t **src, int num)
+ re_dfastate_t **src, Idx num)
internal_function;
static re_dfastate_t *find_recover_state (reg_errcode_t *err,
re_match_context_t *mctx) internal_function;
@@ -133,7 +138,7 @@ static re_dfastate_t *merge_state_with_log (reg_errcode_t *err,
internal_function;
static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx,
re_node_set *cur_nodes,
- int str_idx) internal_function;
+ Idx str_idx) internal_function;
#if 0
static re_dfastate_t *transit_state_sb (reg_errcode_t *err,
re_match_context_t *mctx,
@@ -149,41 +154,41 @@ static reg_errcode_t transit_state_bkref (re_match_context_t *mctx,
const re_node_set *nodes)
internal_function;
static reg_errcode_t get_subexp (re_match_context_t *mctx,
- int bkref_node, int bkref_str_idx)
+ Idx bkref_node, Idx bkref_str_idx)
internal_function;
static reg_errcode_t get_subexp_sub (re_match_context_t *mctx,
const re_sub_match_top_t *sub_top,
re_sub_match_last_t *sub_last,
- int bkref_node, int bkref_str)
+ Idx bkref_node, Idx bkref_str)
internal_function;
-static int find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
- int subexp_idx, int type) internal_function;
+static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
+ Idx subexp_idx, int type) internal_function;
static reg_errcode_t check_arrival (re_match_context_t *mctx,
- state_array_t *path, int top_node,
- int top_str, int last_node, int last_str,
+ state_array_t *path, Idx top_node,
+ Idx top_str, Idx last_node, Idx last_str,
int type) internal_function;
static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx,
- int str_idx,
+ Idx str_idx,
re_node_set *cur_nodes,
re_node_set *next_nodes)
internal_function;
static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa,
re_node_set *cur_nodes,
- int ex_subexp, int type)
+ Idx ex_subexp, int type)
internal_function;
static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa,
re_node_set *dst_nodes,
- int target, int ex_subexp,
+ Idx target, Idx ex_subexp,
int type) internal_function;
static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx,
- re_node_set *cur_nodes, int cur_str,
- int subexp_num, int type)
+ re_node_set *cur_nodes, Idx cur_str,
+ Idx subexp_num, int type)
internal_function;
-static int build_trtable (const re_dfa_t *dfa,
- re_dfastate_t *state) internal_function;
+static bool build_trtable (const re_dfa_t *dfa,
+ re_dfastate_t *state) internal_function;
#ifdef RE_ENABLE_I18N
-static int check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
- const re_string_t *input, int idx)
+static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
+ const re_string_t *input, Idx idx)
internal_function;
# ifdef _LIBC
static unsigned int find_collation_sequence_value (const unsigned char *mbs,
@@ -191,12 +196,12 @@ static unsigned int find_collation_sequence_value (const unsigned char *mbs,
internal_function;
# endif /* _LIBC */
#endif /* RE_ENABLE_I18N */
-static int group_nodes_into_DFAstates (const re_dfa_t *dfa,
+static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa,
const re_dfastate_t *state,
re_node_set *states_node,
bitset_t *states_ch) internal_function;
-static int check_node_accept (const re_match_context_t *mctx,
- const re_token_t *node, int idx)
+static bool check_node_accept (const re_match_context_t *mctx,
+ const re_token_t *node, Idx idx)
internal_function;
static reg_errcode_t extend_buffers (re_match_context_t *mctx)
internal_function;
@@ -219,15 +224,17 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx)
int
regexec (preg, string, nmatch, pmatch, eflags)
- const regex_t *__restrict preg;
- const char *__restrict string;
+ const regex_t *_Restrict_ preg;
+ const char *_Restrict_ string;
size_t nmatch;
- regmatch_t pmatch[];
+ regmatch_t pmatch[_Restrict_arr_];
int eflags;
{
reg_errcode_t err;
- int start, length;
+ Idx start, length;
+#ifdef _LIBC
re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+#endif
if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND))
return REG_BADPAT;
@@ -245,10 +252,10 @@ regexec (preg, string, nmatch, pmatch, eflags)
__libc_lock_lock (dfa->lock);
if (preg->no_sub)
- err = re_search_internal (preg, string, length, start, length - start,
+ err = re_search_internal (preg, string, length, start, length,
length, 0, NULL, eflags);
else
- err = re_search_internal (preg, string, length, start, length - start,
+ err = re_search_internal (preg, string, length, start, length,
length, nmatch, pmatch, eflags);
__libc_lock_unlock (dfa->lock);
return err != REG_NOERROR;
@@ -263,8 +270,8 @@ __typeof__ (__regexec) __compat_regexec;
int
attribute_compat_text_section
-__compat_regexec (const regex_t *__restrict preg,
- const char *__restrict string, size_t nmatch,
+__compat_regexec (const regex_t *_Restrict_ preg,
+ const char *_Restrict_ string, size_t nmatch,
regmatch_t pmatch[], int eflags)
{
return regexec (preg, string, nmatch, pmatch,
@@ -295,7 +302,7 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
concerned.
If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match
- and all groups is stroed in REGS. (For the "_2" variants, the offsets are
+ and all groups is stored in REGS. (For the "_2" variants, the offsets are
computed relative to the concatenation, not relative to the individual
strings.)
@@ -303,81 +310,84 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
return the position of the start of the match. Return value -1 means no
match was found and -2 indicates an internal error. */
-int
+regoff_t
re_match (bufp, string, length, start, regs)
struct re_pattern_buffer *bufp;
const char *string;
- int length, start;
+ Idx length, start;
struct re_registers *regs;
{
- return re_search_stub (bufp, string, length, start, 0, length, regs, 1);
+ return re_search_stub (bufp, string, length, start, 0, length, regs, true);
}
#ifdef _LIBC
weak_alias (__re_match, re_match)
#endif
-int
+regoff_t
re_search (bufp, string, length, start, range, regs)
struct re_pattern_buffer *bufp;
const char *string;
- int length, start, range;
+ Idx length, start;
+ regoff_t range;
struct re_registers *regs;
{
- return re_search_stub (bufp, string, length, start, range, length, regs, 0);
+ return re_search_stub (bufp, string, length, start, range, length, regs,
+ false);
}
#ifdef _LIBC
weak_alias (__re_search, re_search)
#endif
-int
+regoff_t
re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
struct re_pattern_buffer *bufp;
const char *string1, *string2;
- int length1, length2, start, stop;
+ Idx length1, length2, start, stop;
struct re_registers *regs;
{
return re_search_2_stub (bufp, string1, length1, string2, length2,
- start, 0, regs, stop, 1);
+ start, 0, regs, stop, true);
}
#ifdef _LIBC
weak_alias (__re_match_2, re_match_2)
#endif
-int
+regoff_t
re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
struct re_pattern_buffer *bufp;
const char *string1, *string2;
- int length1, length2, start, range, stop;
+ Idx length1, length2, start, stop;
+ regoff_t range;
struct re_registers *regs;
{
return re_search_2_stub (bufp, string1, length1, string2, length2,
- start, range, regs, stop, 0);
+ start, range, regs, stop, false);
}
#ifdef _LIBC
weak_alias (__re_search_2, re_search_2)
#endif
-static int
-re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
- stop, ret_len)
- struct re_pattern_buffer *bufp;
- const char *string1, *string2;
- int length1, length2, start, range, stop, ret_len;
- struct re_registers *regs;
+static regoff_t
+internal_function
+re_search_2_stub (struct re_pattern_buffer *bufp,
+ const char *string1, Idx length1,
+ const char *string2, Idx length2,
+ Idx start, regoff_t range, struct re_registers *regs,
+ Idx stop, bool ret_len)
{
const char *str;
- int rval;
- int len = length1 + length2;
- int free_str = 0;
+ regoff_t rval;
+ Idx len = length1 + length2;
+ char *s = NULL;
- if (BE (length1 < 0 || length2 < 0 || stop < 0, 0))
+ if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0))
return -2;
/* Concatenate the strings. */
if (length2 > 0)
if (length1 > 0)
{
- char *s = re_malloc (char, len);
+ s = re_malloc (char, len);
if (BE (s == NULL, 0))
return -2;
@@ -388,7 +398,6 @@ re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
memcpy (s + length1, string2, length2);
#endif
str = s;
- free_str = 1;
}
else
str = string2;
@@ -397,36 +406,39 @@ re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
rval = re_search_stub (bufp, str, len, start, range, stop, regs,
ret_len);
- if (free_str)
- re_free ((char *) str);
+ re_free (s);
return rval;
}
/* The parameters have the same meaning as those of re_search.
Additional parameters:
- If RET_LEN is nonzero the length of the match is returned (re_match style);
+ If RET_LEN is true the length of the match is returned (re_match style);
otherwise the position of the match is returned. */
-static int
-re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
- struct re_pattern_buffer *bufp;
- const char *string;
- int length, start, range, stop, ret_len;
- struct re_registers *regs;
+static regoff_t
+internal_function
+re_search_stub (struct re_pattern_buffer *bufp,
+ const char *string, Idx length,
+ Idx start, regoff_t range, Idx stop, struct re_registers *regs,
+ bool ret_len)
{
reg_errcode_t result;
regmatch_t *pmatch;
- int nregs, rval;
+ Idx nregs;
+ regoff_t rval;
int eflags = 0;
+#ifdef _LIBC
re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+#endif
+ Idx last_start = start + range;
/* Check for out-of-range. */
if (BE (start < 0 || start > length, 0))
return -1;
- if (BE (start + range > length, 0))
- range = length - start;
- else if (BE (start + range < 0, 0))
- range = -start;
+ if (BE (length < last_start || (0 <= range && last_start < start), 0))
+ last_start = length;
+ else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0))
+ last_start = 0;
__libc_lock_lock (dfa->lock);
@@ -434,7 +446,7 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
eflags |= (bufp->not_eol) ? REG_NOTEOL : 0;
/* Compile fastmap if we haven't yet. */
- if (range > 0 && bufp->fastmap != NULL && !bufp->fastmap_accurate)
+ if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate)
re_compile_fastmap (bufp);
if (BE (bufp->no_sub, 0))
@@ -443,8 +455,8 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
/* 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 + 1, 0))
+ else if (BE (bufp->regs_allocated == REGS_FIXED
+ && regs->num_regs <= bufp->re_nsub, 0))
{
nregs = regs->num_regs;
if (BE (nregs < 1, 0))
@@ -463,7 +475,7 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
goto out;
}
- result = re_search_internal (bufp, string, length, start, range, stop,
+ result = re_search_internal (bufp, string, length, start, last_start, stop,
nregs, pmatch, eflags);
rval = 0;
@@ -496,15 +508,14 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
return rval;
}
-static unsigned
-re_copy_regs (regs, pmatch, nregs, regs_allocated)
- struct re_registers *regs;
- regmatch_t *pmatch;
- int nregs, regs_allocated;
+static unsigned int
+internal_function
+re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
+ int regs_allocated)
{
int rval = REGS_REALLOCATE;
- int i;
- int need_regs = nregs + 1;
+ Idx i;
+ Idx need_regs = nregs + 1;
/* We need one extra element beyond `num_regs' for the `-1' marker GNU code
uses. */
@@ -512,9 +523,14 @@ re_copy_regs (regs, pmatch, nregs, regs_allocated)
if (regs_allocated == REGS_UNALLOCATED)
{ /* No. So allocate them with malloc. */
regs->start = re_malloc (regoff_t, need_regs);
- regs->end = re_malloc (regoff_t, need_regs);
- if (BE (regs->start == NULL, 0) || BE (regs->end == NULL, 0))
+ if (BE (regs->start == NULL, 0))
return REGS_UNALLOCATED;
+ regs->end = re_malloc (regoff_t, need_regs);
+ if (BE (regs->end == NULL, 0))
+ {
+ re_free (regs->start);
+ return REGS_UNALLOCATED;
+ }
regs->num_regs = need_regs;
}
else if (regs_allocated == REGS_REALLOCATE)
@@ -524,9 +540,15 @@ re_copy_regs (regs, pmatch, nregs, regs_allocated)
if (BE (need_regs > regs->num_regs, 0))
{
regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs);
- regoff_t *new_end = re_realloc (regs->end, regoff_t, need_regs);
- if (BE (new_start == NULL, 0) || BE (new_end == NULL, 0))
+ regoff_t *new_end;
+ if (BE (new_start == NULL, 0))
return REGS_UNALLOCATED;
+ new_end = re_realloc (regs->end, regoff_t, need_regs);
+ if (BE (new_end == NULL, 0))
+ {
+ re_free (new_start);
+ return REGS_UNALLOCATED;
+ }
regs->start = new_start;
regs->end = new_end;
regs->num_regs = need_regs;
@@ -569,7 +591,7 @@ void
re_set_registers (bufp, regs, num_regs, starts, ends)
struct re_pattern_buffer *bufp;
struct re_registers *regs;
- unsigned num_regs;
+ __re_size_t num_regs;
regoff_t *starts, *ends;
{
if (num_regs)
@@ -583,7 +605,7 @@ re_set_registers (bufp, regs, num_regs, starts, ends)
{
bufp->regs_allocated = REGS_UNALLOCATED;
regs->num_regs = 0;
- regs->start = regs->end = (regoff_t *) 0;
+ regs->start = regs->end = NULL;
}
}
#ifdef _LIBC
@@ -609,35 +631,40 @@ re_exec (s)
/* Searches for a compiled pattern PREG in the string STRING, whose
length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same
- mingings with regexec. START, and RANGE have the same meanings
- with re_search.
+ meaning as with regexec. LAST_START is START + RANGE, where
+ START and RANGE have the same meaning as with re_search.
Return REG_NOERROR if we find a match, and REG_NOMATCH if not,
otherwise return the error code.
Note: We assume front end functions already check ranges.
- (START + RANGE >= 0 && START + RANGE <= LENGTH) */
+ (0 <= LAST_START && LAST_START <= LENGTH) */
static reg_errcode_t
-re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
- eflags)
- const regex_t *preg;
- const char *string;
- int length, start, range, stop, eflags;
- size_t nmatch;
- regmatch_t pmatch[];
+internal_function
+re_search_internal (const regex_t *preg,
+ const char *string, Idx length,
+ Idx start, Idx last_start, Idx stop,
+ size_t nmatch, regmatch_t pmatch[],
+ int eflags)
{
reg_errcode_t err;
const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
- int left_lim, right_lim, incr;
- int fl_longest_match, match_first, match_kind, match_last = -1;
- int extra_nmatch;
- int sb, ch;
+ Idx left_lim, right_lim;
+ int incr;
+ bool fl_longest_match;
+ int match_kind;
+ Idx match_first;
+ Idx match_last = REG_MISSING;
+ Idx extra_nmatch;
+ bool sb;
+ int ch;
#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
re_match_context_t mctx = { .dfa = dfa };
#else
re_match_context_t mctx;
#endif
- char *fastmap = (preg->fastmap != NULL && preg->fastmap_accurate
- && range && !preg->can_be_null) ? preg->fastmap : NULL;
+ char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate
+ && start != last_start && !preg->can_be_null)
+ ? preg->fastmap : NULL);
RE_TRANSLATE_TYPE t = preg->translate;
#if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
@@ -656,7 +683,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
#ifdef DEBUG
/* We assume front-end functions already check them. */
- assert (start + range >= 0 && start + range <= length);
+ assert (0 <= last_start && last_start <= length);
#endif
/* If initial states with non-begbuf contexts have no elements,
@@ -667,16 +694,17 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
&& (dfa->init_state_nl->nodes.nelem == 0
|| !preg->newline_anchor))
{
- if (start != 0 && start + range != 0)
+ if (start != 0 && last_start != 0)
return REG_NOMATCH;
- start = range = 0;
+ start = last_start = 0;
}
/* We must check the longest matching, if nmatch > 0. */
fl_longest_match = (nmatch != 0 || dfa->nbackref);
err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1,
- preg->translate, preg->syntax & RE_ICASE, dfa);
+ preg->translate, (preg->syntax & RE_ICASE) != 0,
+ dfa);
if (BE (err != REG_NOERROR, 0))
goto free_return;
mctx.input.stop = stop;
@@ -693,6 +721,13 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
multi character collating element. */
if (nmatch > 1 || dfa->has_mb_node)
{
+ /* Avoid overflow. */
+ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0))
+ {
+ 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))
{
@@ -708,14 +743,14 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
: CONTEXT_NEWLINE | CONTEXT_BEGBUF;
/* Check incrementally whether of not the input string match. */
- incr = (range < 0) ? -1 : 1;
- left_lim = (range < 0) ? start + range : start;
- right_lim = (range < 0) ? start : start + range;
+ incr = (last_start < start) ? -1 : 1;
+ left_lim = (last_start < start) ? last_start : start;
+ right_lim = (last_start < start) ? start : last_start;
sb = dfa->mb_cur_max == 1;
match_kind =
(fastmap
? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0)
- | (range >= 0 ? 2 : 0)
+ | (start <= last_start ? 2 : 0)
| (t != NULL ? 1 : 0))
: 8);
@@ -782,8 +817,8 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
{
/* If MATCH_FIRST is out of the valid range, reconstruct the
buffers. */
- unsigned int offset = match_first - mctx.input.raw_mbs_idx;
- if (BE (offset >= (unsigned int) mctx.input.valid_raw_len, 0))
+ __re_size_t offset = match_first - mctx.input.raw_mbs_idx;
+ if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0))
{
err = re_string_reconstruct (&mctx.input, match_first,
eflags);
@@ -825,10 +860,10 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
/* We assume that the matching starts from 0. */
mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0;
match_last = check_matching (&mctx, fl_longest_match,
- range >= 0 ? &match_first : NULL);
- if (match_last != -1)
+ start <= last_start ? &match_first : NULL);
+ if (match_last != REG_MISSING)
{
- if (BE (match_last == -2, 0))
+ if (BE (match_last == REG_ERROR, 0))
{
err = REG_ESPACE;
goto free_return;
@@ -850,7 +885,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
break;
if (BE (err != REG_NOMATCH, 0))
goto free_return;
- match_last = -1;
+ match_last = REG_MISSING;
}
else
break; /* We found a match. */
@@ -861,14 +896,14 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
}
#ifdef DEBUG
- assert (match_last != -1);
+ assert (match_last != REG_MISSING);
assert (err == REG_NOERROR);
#endif
/* Set pmatch[] if we need. */
if (nmatch > 0)
{
- int reg_idx;
+ Idx reg_idx;
/* Initialize registers. */
for (reg_idx = 1; reg_idx < nmatch; ++reg_idx)
@@ -877,6 +912,9 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
/* Set the points where matching start/end. */
pmatch[0].rm_so = 0;
pmatch[0].rm_eo = mctx.match_last;
+ /* FIXME: This function should fail if mctx.match_last exceeds
+ the maximum possible regoff_t value. We need a new error
+ code REG_OVERFLOW. */
if (!preg->no_sub && nmatch > 1)
{
@@ -936,11 +974,11 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
}
static reg_errcode_t
-prune_impossible_nodes (mctx)
- re_match_context_t *mctx;
+internal_function
+prune_impossible_nodes (re_match_context_t *mctx)
{
const re_dfa_t *const dfa = mctx->dfa;
- int halt_node, match_last;
+ Idx halt_node, match_last;
reg_errcode_t ret;
re_dfastate_t **sifted_states;
re_dfastate_t **lim_states = NULL;
@@ -950,6 +988,11 @@ prune_impossible_nodes (mctx)
#endif
match_last = mctx->match_last;
halt_node = mctx->last_node;
+
+ /* Avoid overflow. */
+ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0))
+ return REG_ESPACE;
+
sifted_states = re_malloc (re_dfastate_t *, match_last + 1);
if (BE (sifted_states == NULL, 0))
{
@@ -979,7 +1022,7 @@ prune_impossible_nodes (mctx)
do
{
--match_last;
- if (match_last < 0)
+ if (! REG_VALID_INDEX (match_last))
{
ret = REG_NOMATCH;
goto free_return;
@@ -1004,6 +1047,11 @@ prune_impossible_nodes (mctx)
re_node_set_free (&sctx.limits);
if (BE (ret != REG_NOERROR, 0))
goto free_return;
+ if (sifted_states[0] == NULL)
+ {
+ ret = REG_NOMATCH;
+ goto free_return;
+ }
}
re_free (mctx->state_log);
mctx->state_log = sifted_states;
@@ -1024,7 +1072,7 @@ prune_impossible_nodes (mctx)
static inline re_dfastate_t *
__attribute ((always_inline)) internal_function
acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
- int idx)
+ Idx idx)
{
const re_dfa_t *const dfa = mctx->dfa;
if (dfa->init_state->has_constraint)
@@ -1055,27 +1103,27 @@ acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
}
/* Check whether the regular expression match input string INPUT or not,
- and return the index where the matching end, return -1 if not match,
- or return -2 in case of an error.
+ and return the index where the matching end. Return REG_MISSING if
+ there is no match, and return REG_ERROR in case of an error.
FL_LONGEST_MATCH means we want the POSIX longest matching.
If P_MATCH_FIRST is not NULL, and the match fails, it is set to the
next place where we may want to try matching.
Note that the matcher assume that the maching starts from the current
index of the buffer. */
-static int
+static Idx
internal_function
-check_matching (re_match_context_t *mctx, int fl_longest_match,
- int *p_match_first)
+check_matching (re_match_context_t *mctx, bool fl_longest_match,
+ Idx *p_match_first)
{
const re_dfa_t *const dfa = mctx->dfa;
reg_errcode_t err;
- int match = 0;
- int match_last = -1;
- int cur_str_idx = re_string_cur_idx (&mctx->input);
+ Idx match = 0;
+ Idx match_last = REG_MISSING;
+ Idx cur_str_idx = re_string_cur_idx (&mctx->input);
re_dfastate_t *cur_state;
- int at_init_state = p_match_first != NULL;
- int next_start_idx = cur_str_idx;
+ bool at_init_state = p_match_first != NULL;
+ Idx next_start_idx = cur_str_idx;
err = REG_NOERROR;
cur_state = acquire_init_state_context (&err, mctx, cur_str_idx);
@@ -1083,7 +1131,7 @@ check_matching (re_match_context_t *mctx, int fl_longest_match,
if (BE (cur_state == NULL, 0))
{
assert (err == REG_ESPACE);
- return -2;
+ return REG_ERROR;
}
if (mctx->state_log != NULL)
@@ -1094,7 +1142,7 @@ check_matching (re_match_context_t *mctx, int fl_longest_match,
later. E.g. Processing back references. */
if (BE (dfa->nbackref, 0))
{
- at_init_state = 0;
+ at_init_state = false;
err = check_subexp_matching_top (mctx, &cur_state->nodes, 0);
if (BE (err != REG_NOERROR, 0))
return err;
@@ -1127,7 +1175,7 @@ check_matching (re_match_context_t *mctx, int fl_longest_match,
while (!re_string_eoi (&mctx->input))
{
re_dfastate_t *old_state = cur_state;
- int next_char_idx = re_string_cur_idx (&mctx->input) + 1;
+ Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1;
if (BE (next_char_idx >= mctx->input.bufs_len, 0)
|| (BE (next_char_idx >= mctx->input.valid_len, 0)
@@ -1137,7 +1185,7 @@ check_matching (re_match_context_t *mctx, int fl_longest_match,
if (BE (err != REG_NOERROR, 0))
{
assert (err == REG_ESPACE);
- return -2;
+ return REG_ERROR;
}
}
@@ -1151,7 +1199,7 @@ check_matching (re_match_context_t *mctx, int fl_longest_match,
state using the state log, if available and if we have not
already found a valid (even if not the longest) match. */
if (BE (err != REG_NOERROR, 0))
- return -2;
+ return REG_ERROR;
if (mctx->state_log == NULL
|| (match && !fl_longest_match)
@@ -1164,7 +1212,7 @@ check_matching (re_match_context_t *mctx, int fl_longest_match,
if (old_state == cur_state)
next_start_idx = next_char_idx;
else
- at_init_state = 0;
+ at_init_state = false;
}
if (cur_state->halt)
@@ -1195,31 +1243,31 @@ check_matching (re_match_context_t *mctx, int fl_longest_match,
/* Check NODE match the current context. */
-static int
+static bool
internal_function
-check_halt_node_context (const re_dfa_t *dfa, int node, unsigned int context)
+check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context)
{
re_token_type_t type = dfa->nodes[node].type;
unsigned int constraint = dfa->nodes[node].constraint;
if (type != END_OF_RE)
- return 0;
+ return false;
if (!constraint)
- return 1;
+ return true;
if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context))
- return 0;
- return 1;
+ return false;
+ return true;
}
/* Check the halt state STATE match the current context.
Return 0 if not match, if the node, STATE has, is a halt node and
match the context, return the node. */
-static int
+static Idx
internal_function
check_halt_state_context (const re_match_context_t *mctx,
- const re_dfastate_t *state, int idx)
+ const re_dfastate_t *state, Idx idx)
{
- int i;
+ Idx i;
unsigned int context;
#ifdef DEBUG
assert (state->halt);
@@ -1233,32 +1281,34 @@ check_halt_state_context (const re_match_context_t *mctx,
/* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA
corresponding to the DFA).
- Return the destination node, and update EPS_VIA_NODES, return -1 in case
- of errors. */
+ Return the destination node, and update EPS_VIA_NODES;
+ return REG_MISSING in case of errors. */
-static int
+static Idx
internal_function
-proceed_next_node (const re_match_context_t *mctx, int nregs, regmatch_t *regs,
- int *pidx, int node, re_node_set *eps_via_nodes,
+proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
+ Idx *pidx, Idx node, re_node_set *eps_via_nodes,
struct re_fail_stack_t *fs)
{
const re_dfa_t *const dfa = mctx->dfa;
- int i, err;
+ Idx i;
+ bool ok;
if (IS_EPSILON_NODE (dfa->nodes[node].type))
{
re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes;
re_node_set *edests = &dfa->edests[node];
- int dest_node;
- err = re_node_set_insert (eps_via_nodes, node);
- if (BE (err < 0, 0))
- return -2;
- /* Pick up a valid destination, or return -1 if none is found. */
- for (dest_node = -1, i = 0; i < edests->nelem; ++i)
+ Idx dest_node;
+ ok = re_node_set_insert (eps_via_nodes, node);
+ if (BE (! ok, 0))
+ return REG_ERROR;
+ /* Pick up a valid destination, or return REG_MISSING if none
+ is found. */
+ for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i)
{
- int candidate = edests->elems[i];
+ Idx candidate = edests->elems[i];
if (!re_node_set_contains (cur_nodes, candidate))
continue;
- if (dest_node == -1)
+ if (dest_node == REG_MISSING)
dest_node = candidate;
else
@@ -1272,7 +1322,7 @@ proceed_next_node (const re_match_context_t *mctx, int nregs, regmatch_t *regs,
else if (fs != NULL
&& push_fail_stack (fs, *pidx, candidate, nregs, regs,
eps_via_nodes))
- return -2;
+ return REG_ERROR;
/* We know we are going to exit. */
break;
@@ -1282,7 +1332,7 @@ proceed_next_node (const re_match_context_t *mctx, int nregs, regmatch_t *regs,
}
else
{
- int naccepted = 0;
+ Idx naccepted = 0;
re_token_type_t type = dfa->nodes[node].type;
#ifdef RE_ENABLE_I18N
@@ -1292,27 +1342,27 @@ proceed_next_node (const re_match_context_t *mctx, int nregs, regmatch_t *regs,
#endif /* RE_ENABLE_I18N */
if (type == OP_BACK_REF)
{
- int subexp_idx = dfa->nodes[node].opr.idx + 1;
+ Idx subexp_idx = dfa->nodes[node].opr.idx + 1;
naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so;
if (fs != NULL)
{
if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1)
- return -1;
+ return REG_MISSING;
else if (naccepted)
{
char *buf = (char *) re_string_get_buffer (&mctx->input);
if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
naccepted) != 0)
- return -1;
+ return REG_MISSING;
}
}
if (naccepted == 0)
{
- int dest_node;
- err = re_node_set_insert (eps_via_nodes, node);
- if (BE (err < 0, 0))
- return -2;
+ Idx dest_node;
+ ok = re_node_set_insert (eps_via_nodes, node);
+ if (BE (! ok, 0))
+ return REG_ERROR;
dest_node = dfa->edests[node].elems[0];
if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
dest_node))
@@ -1323,26 +1373,26 @@ proceed_next_node (const re_match_context_t *mctx, int nregs, regmatch_t *regs,
if (naccepted != 0
|| check_node_accept (mctx, dfa->nodes + node, *pidx))
{
- int dest_node = dfa->nexts[node];
+ Idx dest_node = dfa->nexts[node];
*pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted;
if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL
|| !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
dest_node)))
- return -1;
+ return REG_MISSING;
re_node_set_empty (eps_via_nodes);
return dest_node;
}
}
- return -1;
+ return REG_MISSING;
}
static reg_errcode_t
internal_function
-push_fail_stack (struct re_fail_stack_t *fs, int str_idx, int dest_node,
- int nregs, regmatch_t *regs, re_node_set *eps_via_nodes)
+push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,
+ Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes)
{
reg_errcode_t err;
- int num = fs->num++;
+ Idx num = fs->num++;
if (fs->num == fs->alloc)
{
struct re_fail_stack_ent_t *new_array;
@@ -1363,13 +1413,13 @@ push_fail_stack (struct re_fail_stack_t *fs, int str_idx, int dest_node,
return err;
}
-static int
+static Idx
internal_function
-pop_fail_stack (struct re_fail_stack_t *fs, int *pidx, int nregs,
+pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs,
regmatch_t *regs, re_node_set *eps_via_nodes)
{
- int num = --fs->num;
- assert (num >= 0);
+ Idx num = --fs->num;
+ assert (REG_VALID_INDEX (num));
*pidx = fs->stack[num].idx;
memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs);
re_node_set_free (eps_via_nodes);
@@ -1386,15 +1436,15 @@ pop_fail_stack (struct re_fail_stack_t *fs, int *pidx, int nregs,
static reg_errcode_t
internal_function
set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
- regmatch_t *pmatch, int fl_backtrack)
+ regmatch_t *pmatch, bool fl_backtrack)
{
const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
- int idx, cur_node;
+ Idx idx, cur_node;
re_node_set eps_via_nodes;
struct re_fail_stack_t *fs;
struct re_fail_stack_t fs_body = { 0, 2, NULL };
regmatch_t *prev_idx_match;
- int prev_idx_match_malloced = 0;
+ bool prev_idx_match_malloced = false;
#ifdef DEBUG
assert (nmatch > 1);
@@ -1423,7 +1473,7 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
free_fail_stack_return (fs);
return REG_ESPACE;
}
- prev_idx_match_malloced = 1;
+ prev_idx_match_malloced = true;
}
memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
@@ -1433,7 +1483,7 @@ set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node)
{
- int reg_idx;
+ Idx reg_idx;
if (fs)
{
for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
@@ -1462,9 +1512,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 (BE (! REG_VALID_INDEX (cur_node), 0))
{
- if (BE (cur_node == -2, 0))
+ if (BE (cur_node == REG_ERROR, 0))
{
re_node_set_free (&eps_via_nodes);
if (prev_idx_match_malloced)
@@ -1496,7 +1546,7 @@ free_fail_stack_return (struct re_fail_stack_t *fs)
{
if (fs)
{
- int fs_idx;
+ Idx fs_idx;
for (fs_idx = 0; fs_idx < fs->num; ++fs_idx)
{
re_node_set_free (&fs->stack[fs_idx].eps_via_nodes);
@@ -1510,12 +1560,12 @@ free_fail_stack_return (struct re_fail_stack_t *fs)
static void
internal_function
update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
- regmatch_t *prev_idx_match, int cur_node, int cur_idx, int nmatch)
+ regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch)
{
int type = dfa->nodes[cur_node].type;
if (type == OP_OPEN_SUBEXP)
{
- int reg_num = dfa->nodes[cur_node].opr.idx + 1;
+ Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
/* We are at the first node of this sub expression. */
if (reg_num < nmatch)
@@ -1526,7 +1576,7 @@ update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
}
else if (type == OP_CLOSE_SUBEXP)
{
- int reg_num = dfa->nodes[cur_node].opr.idx + 1;
+ Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
if (reg_num < nmatch)
{
/* We are at the last node of this sub expression. */
@@ -1585,7 +1635,7 @@ sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
{
reg_errcode_t err;
int null_cnt = 0;
- int str_idx = sctx->last_str_idx;
+ Idx str_idx = sctx->last_str_idx;
re_node_set cur_dest;
#ifdef DEBUG
@@ -1640,11 +1690,11 @@ sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
static reg_errcode_t
internal_function
build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
- int str_idx, re_node_set *cur_dest)
+ Idx str_idx, re_node_set *cur_dest)
{
const re_dfa_t *const dfa = mctx->dfa;
const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes;
- int i;
+ Idx i;
/* Then build the next sifted state.
We build the next sifted state on `cur_dest', and update
@@ -1655,9 +1705,9 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
(with the epsilon nodes pre-filtered out). */
for (i = 0; i < cur_src->nelem; i++)
{
- int prev_node = cur_src->elems[i];
+ Idx prev_node = cur_src->elems[i];
int naccepted = 0;
- int ret;
+ bool ok;
#ifdef DEBUG
re_token_type_t type = dfa->nodes[prev_node].type;
@@ -1683,14 +1733,14 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
if (sctx->limits.nelem)
{
- int to_idx = str_idx + naccepted;
+ Idx to_idx = str_idx + naccepted;
if (check_dst_limits (mctx, &sctx->limits,
dfa->nexts[prev_node], to_idx,
prev_node, str_idx))
continue;
}
- ret = re_node_set_insert (cur_dest, prev_node);
- if (BE (ret == -1, 0))
+ ok = re_node_set_insert (cur_dest, prev_node);
+ if (BE (! ok, 0))
return REG_ESPACE;
}
@@ -1701,9 +1751,9 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
static reg_errcode_t
internal_function
-clean_state_log_if_needed (re_match_context_t *mctx, int next_state_log_idx)
+clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
{
- int top = mctx->state_log_top;
+ Idx top = mctx->state_log_top;
if (next_state_log_idx >= mctx->input.bufs_len
|| (next_state_log_idx >= mctx->input.valid_len
@@ -1727,9 +1777,9 @@ clean_state_log_if_needed (re_match_context_t *mctx, int next_state_log_idx)
static reg_errcode_t
internal_function
merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst,
- re_dfastate_t **src, int num)
+ re_dfastate_t **src, Idx num)
{
- int st_idx;
+ Idx st_idx;
reg_errcode_t err;
for (st_idx = 0; st_idx < num; ++st_idx)
{
@@ -1754,7 +1804,7 @@ merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst,
static reg_errcode_t
internal_function
update_cur_sifted_state (const re_match_context_t *mctx,
- re_sift_context_t *sctx, int str_idx,
+ re_sift_context_t *sctx, Idx str_idx,
re_node_set *dest_nodes)
{
const re_dfa_t *const dfa = mctx->dfa;
@@ -1805,7 +1855,7 @@ add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes,
const re_node_set *candidates)
{
reg_errcode_t err = REG_NOERROR;
- int i;
+ Idx i;
re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes);
if (BE (err != REG_NOERROR, 0))
@@ -1826,27 +1876,27 @@ add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes,
static reg_errcode_t
internal_function
-sub_epsilon_src_nodes (const re_dfa_t *dfa, int node, re_node_set *dest_nodes,
+sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes,
const re_node_set *candidates)
{
- int ecl_idx;
+ Idx ecl_idx;
reg_errcode_t err;
re_node_set *inv_eclosure = dfa->inveclosures + node;
re_node_set except_nodes;
re_node_set_init_empty (&except_nodes);
for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx)
{
- int cur_node = inv_eclosure->elems[ecl_idx];
+ Idx cur_node = inv_eclosure->elems[ecl_idx];
if (cur_node == node)
continue;
if (IS_EPSILON_NODE (dfa->nodes[cur_node].type))
{
- int edst1 = dfa->edests[cur_node].elems[0];
- int edst2 = ((dfa->edests[cur_node].nelem > 1)
- ? dfa->edests[cur_node].elems[1] : -1);
+ Idx edst1 = dfa->edests[cur_node].elems[0];
+ Idx edst2 = ((dfa->edests[cur_node].nelem > 1)
+ ? dfa->edests[cur_node].elems[1] : REG_MISSING);
if ((!re_node_set_contains (inv_eclosure, edst1)
&& re_node_set_contains (dest_nodes, edst1))
- || (edst2 > 0
+ || (REG_VALID_NONZERO_INDEX (edst2)
&& !re_node_set_contains (inv_eclosure, edst2)
&& re_node_set_contains (dest_nodes, edst2)))
{
@@ -1862,10 +1912,10 @@ sub_epsilon_src_nodes (const re_dfa_t *dfa, int node, re_node_set *dest_nodes,
}
for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx)
{
- int cur_node = inv_eclosure->elems[ecl_idx];
+ Idx cur_node = inv_eclosure->elems[ecl_idx];
if (!re_node_set_contains (&except_nodes, cur_node))
{
- int idx = re_node_set_contains (dest_nodes, cur_node) - 1;
+ Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1;
re_node_set_remove_at (dest_nodes, idx);
}
}
@@ -1873,19 +1923,19 @@ sub_epsilon_src_nodes (const re_dfa_t *dfa, int node, re_node_set *dest_nodes,
return REG_NOERROR;
}
-static int
+static bool
internal_function
-check_dst_limits (const re_match_context_t *mctx, re_node_set *limits,
- int dst_node, int dst_idx, int src_node, int src_idx)
+check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits,
+ Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx)
{
const re_dfa_t *const dfa = mctx->dfa;
- int lim_idx, src_pos, dst_pos;
+ Idx lim_idx, src_pos, dst_pos;
- int dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx);
- int src_bkref_idx = search_cur_bkref_entry (mctx, src_idx);
+ Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx);
+ Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx);
for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx)
{
- int subexp_idx;
+ Idx subexp_idx;
struct re_backref_cache_entry *ent;
ent = mctx->bkref_ents + limits->elems[lim_idx];
subexp_idx = dfa->nodes[ent->node].opr.idx;
@@ -1904,34 +1954,35 @@ check_dst_limits (const re_match_context_t *mctx, re_node_set *limits,
if (src_pos == dst_pos)
continue; /* This is unrelated limitation. */
else
- return 1;
+ return true;
}
- return 0;
+ return false;
}
static int
internal_function
check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries,
- int subexp_idx, int from_node, int bkref_idx)
+ Idx subexp_idx, Idx from_node, Idx bkref_idx)
{
const re_dfa_t *const dfa = mctx->dfa;
const re_node_set *eclosures = dfa->eclosures + from_node;
- int node_idx;
+ Idx node_idx;
/* Else, we are on the boundary: examine the nodes on the epsilon
closure. */
for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx)
{
- int node = eclosures->elems[node_idx];
+ Idx node = eclosures->elems[node_idx];
switch (dfa->nodes[node].type)
{
case OP_BACK_REF:
- if (bkref_idx != -1)
+ if (bkref_idx != REG_MISSING)
{
struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx;
do
{
- int dst, cpos;
+ Idx dst;
+ int cpos;
if (ent->node != node)
continue;
@@ -1992,9 +2043,9 @@ check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries,
static int
internal_function
-check_dst_limits_calc_pos (const re_match_context_t *mctx, int limit,
- int subexp_idx, int from_node, int str_idx,
- int bkref_idx)
+check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit,
+ Idx subexp_idx, Idx from_node, Idx str_idx,
+ Idx bkref_idx)
{
struct re_backref_cache_entry *lim = mctx->bkref_ents + limit;
int boundaries;
@@ -2024,14 +2075,14 @@ static reg_errcode_t
internal_function
check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
const re_node_set *candidates, re_node_set *limits,
- struct re_backref_cache_entry *bkref_ents, int str_idx)
+ struct re_backref_cache_entry *bkref_ents, Idx str_idx)
{
reg_errcode_t err;
- int node_idx, lim_idx;
+ Idx node_idx, lim_idx;
for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx)
{
- int subexp_idx;
+ Idx subexp_idx;
struct re_backref_cache_entry *ent;
ent = bkref_ents + limits->elems[lim_idx];
@@ -2041,11 +2092,11 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
subexp_idx = dfa->nodes[ent->node].opr.idx;
if (ent->subexp_to == str_idx)
{
- int ops_node = -1;
- int cls_node = -1;
+ Idx ops_node = REG_MISSING;
+ Idx cls_node = REG_MISSING;
for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
{
- int node = dest_nodes->elems[node_idx];
+ Idx node = dest_nodes->elems[node_idx];
re_token_type_t type = dfa->nodes[node].type;
if (type == OP_OPEN_SUBEXP
&& subexp_idx == dfa->nodes[node].opr.idx)
@@ -2057,7 +2108,7 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
/* Check the limitation of the open subexpression. */
/* Note that (ent->subexp_to = str_idx != ent->subexp_from). */
- if (ops_node >= 0)
+ if (REG_VALID_INDEX (ops_node))
{
err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes,
candidates);
@@ -2066,10 +2117,10 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
}
/* Check the limitation of the close subexpression. */
- if (cls_node >= 0)
+ if (REG_VALID_INDEX (cls_node))
for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
{
- int node = dest_nodes->elems[node_idx];
+ Idx node = dest_nodes->elems[node_idx];
if (!re_node_set_contains (dfa->inveclosures + node,
cls_node)
&& !re_node_set_contains (dfa->eclosures + node,
@@ -2089,7 +2140,7 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
{
for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
{
- int node = dest_nodes->elems[node_idx];
+ Idx node = dest_nodes->elems[node_idx];
re_token_type_t type = dfa->nodes[node].type;
if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP)
{
@@ -2111,22 +2162,22 @@ check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
static reg_errcode_t
internal_function
sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
- int str_idx, const re_node_set *candidates)
+ Idx str_idx, const re_node_set *candidates)
{
const re_dfa_t *const dfa = mctx->dfa;
reg_errcode_t err;
- int node_idx, node;
+ Idx node_idx, node;
re_sift_context_t local_sctx;
- int first_idx = search_cur_bkref_entry (mctx, str_idx);
+ Idx first_idx = search_cur_bkref_entry (mctx, str_idx);
- if (first_idx == -1)
+ if (first_idx == REG_MISSING)
return REG_NOERROR;
local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */
for (node_idx = 0; node_idx < candidates->nelem; ++node_idx)
{
- int enabled_idx;
+ Idx enabled_idx;
re_token_type_t type;
struct re_backref_cache_entry *entry;
node = candidates->elems[node_idx];
@@ -2141,10 +2192,10 @@ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
enabled_idx = first_idx;
do
{
- int subexp_len;
- int to_idx;
- int dst_node;
- int ret;
+ Idx subexp_len;
+ Idx to_idx;
+ Idx dst_node;
+ bool ok;
re_dfastate_t *cur_state;
if (entry->node != node)
@@ -2170,8 +2221,8 @@ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
}
local_sctx.last_node = node;
local_sctx.last_str_idx = str_idx;
- ret = re_node_set_insert (&local_sctx.limits, enabled_idx);
- if (BE (ret < 0, 0))
+ ok = re_node_set_insert (&local_sctx.limits, enabled_idx);
+ if (BE (! ok, 0))
{
err = REG_ESPACE;
goto free_return;
@@ -2211,7 +2262,7 @@ sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
static int
internal_function
sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
- int node_idx, int str_idx, int max_str_idx)
+ Idx node_idx, Idx str_idx, Idx max_str_idx)
{
const re_dfa_t *const dfa = mctx->dfa;
int naccepted;
@@ -2296,13 +2347,13 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx,
}
/* Update the state_log if we need */
-re_dfastate_t *
+static re_dfastate_t *
internal_function
merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
re_dfastate_t *next_state)
{
const re_dfa_t *const dfa = mctx->dfa;
- int cur_idx = re_string_cur_idx (&mctx->input);
+ Idx cur_idx = re_string_cur_idx (&mctx->input);
if (cur_idx > mctx->state_log_top)
{
@@ -2375,15 +2426,15 @@ merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
/* Skip bytes in the input that correspond to part of a
multi-byte match, then look in the log for a state
from which to restart matching. */
-re_dfastate_t *
+static re_dfastate_t *
internal_function
find_recover_state (reg_errcode_t *err, re_match_context_t *mctx)
{
re_dfastate_t *cur_state;
do
{
- int max = mctx->state_log_top;
- int cur_str_idx = re_string_cur_idx (&mctx->input);
+ Idx max = mctx->state_log_top;
+ Idx cur_str_idx = re_string_cur_idx (&mctx->input);
do
{
@@ -2409,10 +2460,10 @@ find_recover_state (reg_errcode_t *err, re_match_context_t *mctx)
static reg_errcode_t
internal_function
check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes,
- int str_idx)
+ Idx str_idx)
{
const re_dfa_t *const dfa = mctx->dfa;
- int node_idx;
+ Idx node_idx;
reg_errcode_t err;
/* TODO: This isn't efficient.
@@ -2422,7 +2473,7 @@ check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes,
E.g. RE: (a){2} */
for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx)
{
- int node = cur_nodes->elems[node_idx];
+ Idx node = cur_nodes->elems[node_idx];
if (dfa->nodes[node].type == OP_OPEN_SUBEXP
&& dfa->nodes[node].opr.idx < BITSET_WORD_BITS
&& (dfa->used_bkref_map
@@ -2447,7 +2498,7 @@ transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
const re_dfa_t *const dfa = mctx->dfa;
re_node_set next_nodes;
re_dfastate_t *next_state;
- int node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input);
+ Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input);
unsigned int context;
*err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1);
@@ -2455,7 +2506,7 @@ transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
return NULL;
for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt)
{
- int cur_node = state->nodes.elems[node_cnt];
+ Idx cur_node = state->nodes.elems[node_cnt];
if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx))
{
*err = re_node_set_merge (&next_nodes,
@@ -2485,13 +2536,14 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
{
const re_dfa_t *const dfa = mctx->dfa;
reg_errcode_t err;
- int i;
+ Idx i;
for (i = 0; i < pstate->nodes.nelem; ++i)
{
re_node_set dest_nodes, *new_nodes;
- int cur_node_idx = pstate->nodes.elems[i];
- int naccepted, dest_idx;
+ Idx cur_node_idx = pstate->nodes.elems[i];
+ int naccepted;
+ Idx dest_idx;
unsigned int context;
re_dfastate_t *dest_state;
@@ -2522,7 +2574,7 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
if (BE (err != REG_NOERROR, 0))
return err;
#ifdef DEBUG
- assert (dfa->nexts[cur_node_idx] != -1);
+ assert (dfa->nexts[cur_node_idx] != REG_MISSING);
#endif
new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx];
@@ -2555,13 +2607,13 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
{
const re_dfa_t *const dfa = mctx->dfa;
reg_errcode_t err;
- int i;
- int cur_str_idx = re_string_cur_idx (&mctx->input);
+ Idx i;
+ Idx cur_str_idx = re_string_cur_idx (&mctx->input);
for (i = 0; i < nodes->nelem; ++i)
{
- int dest_str_idx, prev_nelem, bkc_idx;
- int node_idx = nodes->elems[i];
+ Idx dest_str_idx, prev_nelem, bkc_idx;
+ Idx node_idx = nodes->elems[i];
unsigned int context;
const re_token_t *node = dfa->nodes + node_idx;
re_node_set *new_dest_nodes;
@@ -2588,11 +2640,11 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
/* And add the epsilon closures (which is `new_dest_nodes') of
the backreference to appropriate state_log. */
#ifdef DEBUG
- assert (dfa->nexts[node_idx] != -1);
+ assert (dfa->nexts[node_idx] != REG_MISSING);
#endif
for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx)
{
- int subexp_len;
+ Idx subexp_len;
re_dfastate_t *dest_state;
struct re_backref_cache_entry *bkref_ent;
bkref_ent = mctx->bkref_ents + bkc_idx;
@@ -2665,14 +2717,14 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
static reg_errcode_t
internal_function
-get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx)
+get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
{
const re_dfa_t *const dfa = mctx->dfa;
- int subexp_num, sub_top_idx;
+ Idx subexp_num, sub_top_idx;
const char *buf = (const char *) re_string_get_buffer (&mctx->input);
/* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */
- int cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx);
- if (cache_idx != -1)
+ Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx);
+ if (cache_idx != REG_MISSING)
{
const struct re_backref_cache_entry *entry
= mctx->bkref_ents + cache_idx;
@@ -2690,7 +2742,7 @@ get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx)
reg_errcode_t err;
re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx];
re_sub_match_last_t *sub_last;
- int sub_last_idx, sl_str, bkref_str_off;
+ Idx sub_last_idx, sl_str, bkref_str_off;
if (dfa->nodes[sub_top->node].opr.idx != subexp_num)
continue; /* It isn't related. */
@@ -2701,7 +2753,7 @@ get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx)
evaluated. */
for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx)
{
- int sl_str_diff;
+ regoff_t sl_str_diff;
sub_last = sub_top->lasts[sub_last_idx];
sl_str_diff = sub_last->str_idx - sl_str;
/* The matched string by the sub expression match with the substring
@@ -2747,7 +2799,8 @@ get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx)
/* Then, search for the other last nodes of the sub expression. */
for (; sl_str <= bkref_str_idx; ++sl_str)
{
- int cls_node, sl_str_off;
+ Idx cls_node;
+ regoff_t sl_str_off;
const re_node_set *nodes;
sl_str_off = sl_str - sub_top->str_idx;
/* The matched string by the sub expression match with the substring
@@ -2776,7 +2829,7 @@ get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx)
nodes = &mctx->state_log[sl_str]->nodes;
cls_node = find_subexp_node (dfa, nodes, subexp_num,
OP_CLOSE_SUBEXP);
- if (cls_node == -1)
+ if (cls_node == REG_MISSING)
continue; /* No. */
if (sub_top->path == NULL)
{
@@ -2815,10 +2868,10 @@ get_subexp (re_match_context_t *mctx, int bkref_node, int bkref_str_idx)
static reg_errcode_t
internal_function
get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top,
- re_sub_match_last_t *sub_last, int bkref_node, int bkref_str)
+ re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str)
{
reg_errcode_t err;
- int to_idx;
+ Idx to_idx;
/* Can the subexpression arrive the back reference? */
err = check_arrival (mctx, &sub_last->path, sub_last->node,
sub_last->str_idx, bkref_node, bkref_str,
@@ -2841,21 +2894,21 @@ get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top,
nodes.
E.g. RE: (a){2} */
-static int
+static Idx
internal_function
find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
- int subexp_idx, int type)
+ Idx subexp_idx, int type)
{
- int cls_idx;
+ Idx cls_idx;
for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx)
{
- int cls_node = nodes->elems[cls_idx];
+ Idx cls_node = nodes->elems[cls_idx];
const re_token_t *node = dfa->nodes + cls_node;
if (node->type == type
&& node->opr.idx == subexp_idx)
return cls_node;
}
- return -1;
+ return REG_MISSING;
}
/* Check whether the node TOP_NODE at TOP_STR can arrive to the node
@@ -2865,12 +2918,12 @@ find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
static reg_errcode_t
internal_function
-check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node,
- int top_str, int last_node, int last_str, int type)
+check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
+ Idx top_str, Idx last_node, Idx last_str, int type)
{
const re_dfa_t *const dfa = mctx->dfa;
reg_errcode_t err = REG_NOERROR;
- int subexp_num, backup_cur_idx, str_idx, null_cnt;
+ Idx subexp_num, backup_cur_idx, str_idx, null_cnt;
re_dfastate_t *cur_state = NULL;
re_node_set *cur_nodes, next_nodes;
re_dfastate_t **backup_state_log;
@@ -2881,20 +2934,21 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node,
if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0))
{
re_dfastate_t **new_array;
- int old_alloc = path->alloc;
- path->alloc += last_str + mctx->max_mb_elem_len + 1;
- new_array = re_realloc (path->array, re_dfastate_t *, path->alloc);
+ Idx old_alloc = path->alloc;
+ Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1;
+ if (BE (new_alloc < old_alloc, 0)
+ || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
+ return REG_ESPACE;
+ new_array = re_realloc (path->array, re_dfastate_t *, new_alloc);
if (BE (new_array == NULL, 0))
- {
- path->alloc = old_alloc;
- return REG_ESPACE;
- }
+ return REG_ESPACE;
path->array = new_array;
+ path->alloc = new_alloc;
memset (new_array + old_alloc, '\0',
sizeof (re_dfastate_t *) * (path->alloc - old_alloc));
}
- str_idx = path->next_idx ?: top_str;
+ str_idx = path->next_idx ? path->next_idx : top_str;
/* Temporary modify MCTX. */
backup_state_log = mctx->state_log;
@@ -3026,19 +3080,21 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, int top_node,
static reg_errcode_t
internal_function
-check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx,
+check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
re_node_set *cur_nodes, re_node_set *next_nodes)
{
const re_dfa_t *const dfa = mctx->dfa;
- int result;
- int cur_idx;
+ bool ok;
+ Idx cur_idx;
+#ifdef RE_ENABLE_I18N
reg_errcode_t err = REG_NOERROR;
+#endif
re_node_set union_set;
re_node_set_init_empty (&union_set);
for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx)
{
int naccepted = 0;
- int cur_node = cur_nodes->elems[cur_idx];
+ Idx cur_node = cur_nodes->elems[cur_idx];
#ifdef DEBUG
re_token_type_t type = dfa->nodes[cur_node].type;
assert (!IS_EPSILON_NODE (type));
@@ -3052,8 +3108,8 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx,
if (naccepted > 1)
{
re_dfastate_t *dest_state;
- int next_node = dfa->nexts[cur_node];
- int next_idx = str_idx + naccepted;
+ Idx next_node = dfa->nexts[cur_node];
+ Idx next_idx = str_idx + naccepted;
dest_state = mctx->state_log[next_idx];
re_node_set_empty (&union_set);
if (dest_state)
@@ -3065,8 +3121,8 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx,
return err;
}
}
- result = re_node_set_insert (&union_set, next_node);
- if (BE (result < 0, 0))
+ ok = re_node_set_insert (&union_set, next_node);
+ if (BE (! ok, 0))
{
re_node_set_free (&union_set);
return REG_ESPACE;
@@ -3085,8 +3141,8 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx,
if (naccepted
|| check_node_accept (mctx, dfa->nodes + cur_node, str_idx))
{
- result = re_node_set_insert (next_nodes, dfa->nexts[cur_node]);
- if (BE (result < 0, 0))
+ ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]);
+ if (BE (! ok, 0))
{
re_node_set_free (&union_set);
return REG_ESPACE;
@@ -3106,10 +3162,10 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, int str_idx,
static reg_errcode_t
internal_function
check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
- int ex_subexp, int type)
+ Idx ex_subexp, int type)
{
reg_errcode_t err;
- int idx, outside_node;
+ Idx idx, outside_node;
re_node_set new_nodes;
#ifdef DEBUG
assert (cur_nodes->nelem);
@@ -3122,10 +3178,10 @@ check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
for (idx = 0; idx < cur_nodes->nelem; ++idx)
{
- int cur_node = cur_nodes->elems[idx];
+ Idx cur_node = cur_nodes->elems[idx];
const re_node_set *eclosure = dfa->eclosures + cur_node;
outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type);
- if (outside_node == -1)
+ if (outside_node == REG_MISSING)
{
/* There are no problematic nodes, just merge them. */
err = re_node_set_merge (&new_nodes, eclosure);
@@ -3159,31 +3215,32 @@ check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
static reg_errcode_t
internal_function
check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
- int target, int ex_subexp, int type)
+ Idx target, Idx ex_subexp, int type)
{
- int cur_node;
+ Idx cur_node;
for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);)
{
- int err;
+ bool ok;
if (dfa->nodes[cur_node].type == type
&& dfa->nodes[cur_node].opr.idx == ex_subexp)
{
if (type == OP_CLOSE_SUBEXP)
{
- err = re_node_set_insert (dst_nodes, cur_node);
- if (BE (err == -1, 0))
+ ok = re_node_set_insert (dst_nodes, cur_node);
+ if (BE (! ok, 0))
return REG_ESPACE;
}
break;
}
- err = re_node_set_insert (dst_nodes, cur_node);
- if (BE (err == -1, 0))
+ ok = re_node_set_insert (dst_nodes, cur_node);
+ if (BE (! ok, 0))
return REG_ESPACE;
if (dfa->edests[cur_node].nelem == 0)
break;
if (dfa->edests[cur_node].nelem == 2)
{
+ reg_errcode_t err;
err = check_arrival_expand_ecl_sub (dfa, dst_nodes,
dfa->edests[cur_node].elems[1],
ex_subexp, type);
@@ -3203,21 +3260,21 @@ check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
static reg_errcode_t
internal_function
expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
- int cur_str, int subexp_num, int type)
+ Idx cur_str, Idx subexp_num, int type)
{
const re_dfa_t *const dfa = mctx->dfa;
reg_errcode_t err;
- int cache_idx_start = search_cur_bkref_entry (mctx, cur_str);
+ Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str);
struct re_backref_cache_entry *ent;
- if (cache_idx_start == -1)
+ if (cache_idx_start == REG_MISSING)
return REG_NOERROR;
restart:
ent = mctx->bkref_ents + cache_idx_start;
do
{
- int to_idx, next_node;
+ Idx to_idx, next_node;
/* Is this entry ENT is appropriate? */
if (!re_node_set_contains (cur_nodes, ent->node))
@@ -3255,14 +3312,14 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
next_node = dfa->nexts[ent->node];
if (mctx->state_log[to_idx])
{
- int ret;
+ bool ok;
if (re_node_set_contains (&mctx->state_log[to_idx]->nodes,
next_node))
continue;
err = re_node_set_init_copy (&union_set,
&mctx->state_log[to_idx]->nodes);
- ret = re_node_set_insert (&union_set, next_node);
- if (BE (err != REG_NOERROR || ret < 0, 0))
+ ok = re_node_set_insert (&union_set, next_node);
+ if (BE (err != REG_NOERROR || ! ok, 0))
{
re_node_set_free (&union_set);
err = err != REG_NOERROR ? err : REG_ESPACE;
@@ -3287,18 +3344,20 @@ expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
}
/* Build transition table for the state.
- Return 1 if succeeded, otherwise return NULL. */
+ Return true if successful. */
-static int
+static bool
internal_function
build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
{
reg_errcode_t err;
- int i, j, ch, need_word_trtable = 0;
+ Idx i, j;
+ int ch;
+ bool need_word_trtable = false;
bitset_word_t elem, mask;
bool dests_node_malloced = false;
bool dest_states_malloced = false;
- int ndests; /* Number of the destination states from `state'. */
+ Idx ndests; /* Number of the destination states from `state'. */
re_dfastate_t **trtable;
re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl;
re_node_set follows, *dests_node;
@@ -3321,7 +3380,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
{
dests_alloc = re_malloc (struct dests_alloc, 1);
if (BE (dests_alloc == NULL, 0))
- return 0;
+ return false;
dests_node_malloced = true;
}
dests_node = dests_alloc->dests_node;
@@ -3333,24 +3392,30 @@ 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 (BE (! REG_VALID_NONZERO_INDEX (ndests), 0))
{
if (dests_node_malloced)
free (dests_alloc);
- /* Return 0 in case of an error, 1 otherwise. */
if (ndests == 0)
{
state->trtable = (re_dfastate_t **)
calloc (sizeof (re_dfastate_t *), SBC_MAX);
- return 1;
+ return true;
}
- return 0;
+ return false;
}
err = re_node_set_alloc (&follows, ndests + 1);
if (BE (err != REG_NOERROR, 0))
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))
+ goto out_free;
+
if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX
+ ndests * 3 * sizeof (re_dfastate_t *)))
dest_states = (re_dfastate_t **)
@@ -3369,7 +3434,7 @@ out_free:
re_node_set_free (dests_node + i);
if (dests_node_malloced)
free (dests_alloc);
- return 0;
+ return false;
}
dest_states_malloced = true;
}
@@ -3380,13 +3445,13 @@ out_free:
/* Then build the states for all destinations. */
for (i = 0; i < ndests; ++i)
{
- int next_node;
+ Idx next_node;
re_node_set_empty (&follows);
/* Merge the follows of this destination states. */
for (j = 0; j < dests_node[i].nelem; ++j)
{
next_node = dfa->nexts[dests_node[i].elems[j]];
- if (next_node != -1)
+ if (next_node != REG_MISSING)
{
err = re_node_set_merge (&follows, dfa->eclosures + next_node);
if (BE (err != REG_NOERROR, 0))
@@ -3406,13 +3471,13 @@ out_free:
goto out_free;
if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1)
- need_word_trtable = 1;
+ need_word_trtable = true;
dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows,
CONTEXT_NEWLINE);
if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0))
goto out_free;
- }
+ }
else
{
dest_states_word[i] = dest_states[i];
@@ -3508,7 +3573,7 @@ out_free:
if (dests_node_malloced)
free (dests_alloc);
- return 1;
+ return true;
}
/* Group all nodes belonging to STATE into several destinations.
@@ -3516,15 +3581,15 @@ out_free:
to DESTS_NODE[i] and set the characters accepted by the destination
to DEST_CH[i]. This function return the number of destinations. */
-static int
+static Idx
internal_function
group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
re_node_set *dests_node, bitset_t *dests_ch)
{
reg_errcode_t err;
- int result;
- int i, j, k;
- int ndests; /* Number of the destinations from `state'. */
+ bool ok;
+ Idx i, j, k;
+ Idx ndests; /* Number of the destinations from `state'. */
bitset_t accepts; /* Characters a node can accept. */
const re_node_set *cur_nodes = &state->nodes;
bitset_empty (accepts);
@@ -3560,7 +3625,10 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
#ifdef RE_ENABLE_I18N
else if (type == OP_UTF8_PERIOD)
{
- memset (accepts, '\xff', sizeof (bitset_t) / 2);
+ if (ASCII_CHARS % BITSET_WORD_BITS == 0)
+ memset (accepts, -1, ASCII_CHARS / CHAR_BIT);
+ else
+ bitset_merge (accepts, utf8_sb_map);
if (!(dfa->syntax & RE_DOT_NEWLINE))
bitset_clear (accepts, '\n');
if (dfa->syntax & RE_DOT_NOT_NULL)
@@ -3671,8 +3739,8 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
}
/* Put the position in the current group. */
- result = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]);
- if (BE (result < 0, 0))
+ ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]);
+ if (BE (! ok, 0))
goto error_return;
/* If all characters are consumed, go to next node. */
@@ -3694,7 +3762,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
error_return:
for (j = 0; j < ndests; ++j)
re_node_set_free (dests_node + j);
- return -1;
+ return REG_MISSING;
}
#ifdef RE_ENABLE_I18N
@@ -3708,12 +3776,12 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
static int
internal_function
-check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
- const re_string_t *input, int str_idx)
+check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
+ const re_string_t *input, Idx str_idx)
{
const re_token_t *node = dfa->nodes + node_idx;
int char_len, elem_len;
- int i;
+ Idx i;
if (BE (node->type == OP_UTF8_PERIOD, 0))
{
@@ -3792,7 +3860,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
# ifdef _LIBC
const unsigned char *pin
= ((const unsigned char *) re_string_get_buffer (input) + str_idx);
- int j;
+ Idx j;
uint32_t nrules;
# endif /* _LIBC */
int match_len = 0;
@@ -3891,7 +3959,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
size_t weight_len = weights[idx];
if (weight_len == weights[equiv_class_idx])
{
- int cnt = 0;
+ Idx cnt = 0;
while (cnt <= weight_len
&& (weights[equiv_class_idx + 1 + cnt]
== weights[idx + 1 + cnt]))
@@ -3909,7 +3977,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
# endif /* _LIBC */
{
/* match with range expression? */
-#if __GNUC__ >= 2
+#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__)
wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'};
#else
wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'};
@@ -3968,7 +4036,8 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
for (idx = 0; idx < extrasize;)
{
- int mbs_cnt, found = 0;
+ int mbs_cnt;
+ bool found = false;
int32_t elem_mbs_len;
/* Skip the name of collating element name. */
idx = idx + extra[idx] + 1;
@@ -3980,7 +4049,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
break;
if (mbs_cnt == elem_mbs_len)
/* Found the entry. */
- found = 1;
+ found = true;
}
/* Skip the byte sequence of the collating element. */
idx += elem_mbs_len;
@@ -4005,10 +4074,10 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
/* Check whether the node accepts the byte which is IDX-th
byte of the INPUT. */
-static int
+static bool
internal_function
check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
- int idx)
+ Idx idx)
{
unsigned char ch;
ch = re_string_byte_at (&mctx->input, idx);
@@ -4016,28 +4085,28 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
{
case CHARACTER:
if (node->opr.c != ch)
- return 0;
+ return false;
break;
case SIMPLE_BRACKET:
if (!bitset_contain (node->opr.sbcset, ch))
- return 0;
+ return false;
break;
#ifdef RE_ENABLE_I18N
case OP_UTF8_PERIOD:
- if (ch >= 0x80)
- return 0;
+ if (ch >= ASCII_CHARS)
+ return false;
/* FALLTHROUGH */
#endif
case OP_PERIOD:
if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE))
|| (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL)))
- return 0;
+ return false;
break;
default:
- return 0;
+ return false;
}
if (node->constraint)
@@ -4047,10 +4116,10 @@ check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
unsigned int context = re_string_context_at (&mctx->input, idx,
mctx->eflags);
if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context))
- return 0;
+ return false;
}
- return 1;
+ return true;
}
/* Extend the buffers, if the buffers have run out. */
@@ -4062,6 +4131,10 @@ extend_buffers (re_match_context_t *mctx)
reg_errcode_t ret;
re_string_t *pstr = &mctx->input;
+ /* Avoid overflow. */
+ if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0))
+ return REG_ESPACE;
+
/* Double the lengthes of the buffers. */
ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
if (BE (ret != REG_NOERROR, 0))
@@ -4116,12 +4189,19 @@ extend_buffers (re_match_context_t *mctx)
static reg_errcode_t
internal_function
-match_ctx_init (re_match_context_t *mctx, int eflags, int n)
+match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
{
mctx->eflags = eflags;
- mctx->match_last = -1;
+ mctx->match_last = REG_MISSING;
if (n > 0)
{
+ /* Avoid overflow. */
+ size_t max_object_size =
+ MAX (sizeof (struct re_backref_cache_entry),
+ sizeof (re_sub_match_top_t *));
+ if (BE (SIZE_MAX / max_object_size < n, 0))
+ 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))
@@ -4146,10 +4226,10 @@ static void
internal_function
match_ctx_clean (re_match_context_t *mctx)
{
- int st_idx;
+ Idx st_idx;
for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx)
{
- int sl_idx;
+ Idx sl_idx;
re_sub_match_top_t *top = mctx->sub_tops[st_idx];
for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx)
{
@@ -4189,8 +4269,8 @@ match_ctx_free (re_match_context_t *mctx)
static reg_errcode_t
internal_function
-match_ctx_add_entry (re_match_context_t *mctx, int node, int str_idx, int from,
- int to)
+match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from,
+ Idx to)
{
if (mctx->nbkref_ents >= mctx->abkref_ents)
{
@@ -4225,7 +4305,7 @@ match_ctx_add_entry (re_match_context_t *mctx, int node, int str_idx, int from,
A backreference does not epsilon-transition unless it is empty, so set
to all zeros if FROM != TO. */
mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map
- = (from == to ? ~0 : 0);
+ = (from == to ? -1 : 0);
mctx->bkref_ents[mctx->nbkref_ents++].more = 0;
if (mctx->max_mb_elem_len < to - from)
@@ -4233,14 +4313,14 @@ match_ctx_add_entry (re_match_context_t *mctx, int node, int str_idx, int from,
return REG_NOERROR;
}
-/* Search for the first entry which has the same str_idx, or -1 if none is
+/* Return the first entry with the same str_idx, or REG_MISSING if none is
found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */
-static int
+static Idx
internal_function
-search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx)
+search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
{
- int left, right, mid, last;
+ Idx left, right, mid, last;
last = right = mctx->nbkref_ents;
for (left = 0; left < right;)
{
@@ -4253,7 +4333,7 @@ search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx)
if (left < last && mctx->bkref_ents[left].str_idx == str_idx)
return left;
else
- return -1;
+ return REG_MISSING;
}
/* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches
@@ -4261,7 +4341,7 @@ search_cur_bkref_entry (const re_match_context_t *mctx, int str_idx)
static reg_errcode_t
internal_function
-match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx)
+match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx)
{
#ifdef DEBUG
assert (mctx->sub_tops != NULL);
@@ -4269,7 +4349,7 @@ match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx)
#endif
if (BE (mctx->nsub_tops == mctx->asub_tops, 0))
{
- int new_asub_tops = mctx->asub_tops * 2;
+ 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);
@@ -4291,12 +4371,12 @@ match_ctx_add_subtop (re_match_context_t *mctx, int node, int str_idx)
static re_sub_match_last_t *
internal_function
-match_ctx_add_sublast (re_sub_match_top_t *subtop, int node, int str_idx)
+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))
{
- int new_alasts = 2 * subtop->alasts + 1;
+ 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);
@@ -4319,7 +4399,7 @@ match_ctx_add_sublast (re_sub_match_top_t *subtop, int node, int str_idx)
static void
internal_function
sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
- re_dfastate_t **limited_sts, int last_node, int last_str_idx)
+ re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx)
{
sctx->sifted_states = sifted_sts;
sctx->limited_states = limited_sts;
diff --git a/lib/set-mode-acl.c b/lib/set-mode-acl.c
new file mode 100644
index 0000000..dbcbea2
--- /dev/null
+++ b/lib/set-mode-acl.c
@@ -0,0 +1,490 @@
+/* set-mode-acl.c - set access control list equivalent to a mode
+
+ Copyright (C) 2002-2003, 2005-2008 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Paul Eggert and Andreas Gruenbacher, and Bruno Haible. */
+
+#include <config.h>
+
+#include "acl.h"
+
+#include "acl-internal.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+
+/* If DESC is a valid file descriptor use fchmod to change the
+ file's mode to MODE on systems that have fchown. On systems
+ that don't have fchown and if DESC is invalid, use chown on
+ NAME instead.
+ Return 0 if successful. Return -1 and set errno upon failure. */
+
+int
+chmod_or_fchmod (const char *name, int desc, mode_t mode)
+{
+ if (HAVE_FCHMOD && desc != -1)
+ return fchmod (desc, mode);
+ else
+ return chmod (name, mode);
+}
+
+/* Set the access control lists of a file. If DESC is a valid file
+ descriptor, use file descriptor operations where available, else use
+ filename based operations on NAME. If access control lists are not
+ available, fchmod the target file to MODE. Also sets the
+ non-permission bits of the destination file (S_ISUID, S_ISGID, S_ISVTX)
+ to those from MODE if any are set.
+ Return 0 if successful. Return -1 and set errno upon failure. */
+
+int
+qset_acl (char const *name, int desc, mode_t mode)
+{
+#if USE_ACL
+# if HAVE_ACL_GET_FILE
+ /* POSIX 1003.1e draft 17 (abandoned) specific version. */
+ /* Linux, FreeBSD, MacOS X, IRIX, Tru64 */
+# if MODE_INSIDE_ACL
+ /* Linux, FreeBSD, IRIX, Tru64 */
+
+ /* We must also have acl_from_text and acl_delete_def_file.
+ (acl_delete_def_file could be emulated with acl_init followed
+ by acl_set_file, but acl_set_file with an empty acl is
+ unspecified.) */
+
+# ifndef HAVE_ACL_FROM_TEXT
+# error Must have acl_from_text (see POSIX 1003.1e draft 17).
+# endif
+# ifndef HAVE_ACL_DELETE_DEF_FILE
+# error Must have acl_delete_def_file (see POSIX 1003.1e draft 17).
+# endif
+
+ acl_t acl;
+ int ret;
+
+ if (HAVE_ACL_FROM_MODE) /* Linux */
+ {
+ acl = acl_from_mode (mode);
+ if (!acl)
+ return -1;
+ }
+ else /* FreeBSD, IRIX, Tru64 */
+ {
+ /* If we were to create the ACL using the functions acl_init(),
+ acl_create_entry(), acl_set_tag_type(), acl_set_qualifier(),
+ acl_get_permset(), acl_clear_perm[s](), acl_add_perm(), we
+ would need to create a qualifier. I don't know how to do this.
+ So create it using acl_from_text(). */
+
+# if HAVE_ACL_FREE_TEXT /* Tru64 */
+ char acl_text[] = "u::---,g::---,o::---,";
+# else /* FreeBSD, IRIX */
+ char acl_text[] = "u::---,g::---,o::---";
+# endif
+
+ if (mode & S_IRUSR) acl_text[ 3] = 'r';
+ if (mode & S_IWUSR) acl_text[ 4] = 'w';
+ if (mode & S_IXUSR) acl_text[ 5] = 'x';
+ if (mode & S_IRGRP) acl_text[10] = 'r';
+ if (mode & S_IWGRP) acl_text[11] = 'w';
+ if (mode & S_IXGRP) acl_text[12] = 'x';
+ if (mode & S_IROTH) acl_text[17] = 'r';
+ if (mode & S_IWOTH) acl_text[18] = 'w';
+ if (mode & S_IXOTH) acl_text[19] = 'x';
+
+ acl = acl_from_text (acl_text);
+ if (!acl)
+ return -1;
+ }
+ if (HAVE_ACL_SET_FD && desc != -1)
+ ret = acl_set_fd (desc, acl);
+ else
+ ret = acl_set_file (name, ACL_TYPE_ACCESS, acl);
+ if (ret != 0)
+ {
+ int saved_errno = errno;
+ acl_free (acl);
+
+ if (ACL_NOT_WELL_SUPPORTED (errno))
+ return chmod_or_fchmod (name, desc, mode);
+ else
+ {
+ errno = saved_errno;
+ return -1;
+ }
+ }
+ else
+ acl_free (acl);
+
+ if (S_ISDIR (mode) && acl_delete_def_file (name))
+ return -1;
+
+ if (mode & (S_ISUID | S_ISGID | S_ISVTX))
+ {
+ /* We did not call chmod so far, so the special bits have not yet
+ been set. */
+ return chmod_or_fchmod (name, desc, mode);
+ }
+ return 0;
+
+# else /* !MODE_INSIDE_ACL */
+ /* MacOS X */
+
+# if !HAVE_ACL_TYPE_EXTENDED
+# error Must have ACL_TYPE_EXTENDED
+# endif
+
+ /* On MacOS X, acl_get_file (name, ACL_TYPE_ACCESS)
+ and acl_get_file (name, ACL_TYPE_DEFAULT)
+ always return NULL / EINVAL. You have to use
+ acl_get_file (name, ACL_TYPE_EXTENDED)
+ or acl_get_fd (open (name, ...))
+ to retrieve an ACL.
+ On the other hand,
+ acl_set_file (name, ACL_TYPE_ACCESS, acl)
+ and acl_set_file (name, ACL_TYPE_DEFAULT, acl)
+ have the same effect as
+ acl_set_file (name, ACL_TYPE_EXTENDED, acl):
+ Each of these calls sets the file's ACL. */
+
+ acl_t acl;
+ int ret;
+
+ /* Remove the ACL if the file has ACLs. */
+ if (HAVE_ACL_GET_FD && desc != -1)
+ acl = acl_get_fd (desc);
+ else
+ acl = acl_get_file (name, ACL_TYPE_EXTENDED);
+ if (acl)
+ {
+ acl_free (acl);
+
+ acl = acl_init (0);
+ if (acl)
+ {
+ if (HAVE_ACL_SET_FD && desc != -1)
+ ret = acl_set_fd (desc, acl);
+ else
+ ret = acl_set_file (name, ACL_TYPE_EXTENDED, acl);
+ if (ret != 0)
+ {
+ int saved_errno = errno;
+
+ acl_free (acl);
+
+ if (ACL_NOT_WELL_SUPPORTED (saved_errno))
+ return chmod_or_fchmod (name, desc, mode);
+ else
+ {
+ errno = saved_errno;
+ return -1;
+ }
+ }
+ acl_free (acl);
+ }
+ }
+
+ /* Since !MODE_INSIDE_ACL, we have to call chmod explicitly. */
+ return chmod_or_fchmod (name, desc, mode);
+# endif
+
+# elif HAVE_ACL && defined GETACLCNT /* Solaris, Cygwin, not HP-UX */
+
+# if defined ACL_NO_TRIVIAL
+ /* Solaris 10 (newer version), which has additional API declared in
+ <sys/acl.h> (acl_t) and implemented in libsec (acl_set, acl_trivial,
+ acl_fromtext, ...). */
+
+ acl_t *aclp;
+ char acl_text[] = "user::---,group::---,mask:---,other:---";
+ int ret;
+ int saved_errno;
+
+ if (mode & S_IRUSR) acl_text[ 6] = 'r';
+ if (mode & S_IWUSR) acl_text[ 7] = 'w';
+ if (mode & S_IXUSR) acl_text[ 8] = 'x';
+ if (mode & S_IRGRP) acl_text[17] = acl_text[26] = 'r';
+ if (mode & S_IWGRP) acl_text[18] = acl_text[27] = 'w';
+ if (mode & S_IXGRP) acl_text[19] = acl_text[28] = 'x';
+ if (mode & S_IROTH) acl_text[36] = 'r';
+ if (mode & S_IWOTH) acl_text[37] = 'w';
+ if (mode & S_IXOTH) acl_text[38] = 'x';
+
+ if (acl_fromtext (acl_text, &aclp) != 0)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+
+ ret = (desc < 0 ? acl_set (name, aclp) : facl_set (desc, aclp));
+ saved_errno = errno;
+ acl_free (aclp);
+ if (ret < 0)
+ {
+ if (saved_errno == ENOSYS)
+ return chmod_or_fchmod (name, desc, mode);
+ errno = saved_errno;
+ return -1;
+ }
+
+ if (mode & (S_ISUID | S_ISGID | S_ISVTX))
+ {
+ /* We did not call chmod so far, so the special bits have not yet
+ been set. */
+ return chmod_or_fchmod (name, desc, mode);
+ }
+ return 0;
+
+# else /* Solaris, Cygwin, general case */
+
+# ifdef ACE_GETACL
+ /* Solaris also has a different variant of ACLs, used in ZFS and NFSv4
+ file systems (whereas the other ones are used in UFS file systems). */
+
+ /* The flags in the ace_t structure changed in a binary incompatible way
+ when ACL_NO_TRIVIAL etc. were introduced in <sys/acl.h> version 1.15.
+ How to distinguish the two conventions at runtime?
+ We fetch the existing ACL. In the old convention, usually three ACEs have
+ a_flags = ACE_OWNER / ACE_GROUP / ACE_OTHER, in the range 0x0100..0x0400.
+ In the new convention, these values are not used. */
+ int convention;
+
+ {
+ int count;
+ ace_t *entries;
+
+ for (;;)
+ {
+ if (desc != -1)
+ count = facl (desc, ACE_GETACLCNT, 0, NULL);
+ else
+ count = acl (name, ACE_GETACLCNT, 0, NULL);
+ if (count <= 0)
+ {
+ convention = -1;
+ break;
+ }
+ entries = (ace_t *) malloc (count * sizeof (ace_t));
+ if (entries == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+ if ((desc != -1
+ ? facl (desc, ACE_GETACL, count, entries)
+ : acl (name, ACE_GETACL, count, entries))
+ == count)
+ {
+ int i;
+
+ convention = 0;
+ for (i = 0; i < count; i++)
+ if (entries[i].a_flags & (ACE_OWNER | ACE_GROUP | ACE_OTHER))
+ {
+ convention = 1;
+ break;
+ }
+ free (entries);
+ break;
+ }
+ /* Huh? The number of ACL entries changed since the last call.
+ Repeat. */
+ free (entries);
+ }
+ }
+
+ if (convention >= 0)
+ {
+ ace_t entries[3];
+ int ret;
+
+ if (convention)
+ {
+ /* Running on Solaris 10. */
+ entries[0].a_type = ALLOW;
+ entries[0].a_flags = ACE_OWNER;
+ entries[0].a_who = 0; /* irrelevant */
+ entries[0].a_access_mask = (mode >> 6) & 7;
+ entries[1].a_type = ALLOW;
+ entries[1].a_flags = ACE_GROUP;
+ entries[1].a_who = 0; /* irrelevant */
+ entries[1].a_access_mask = (mode >> 3) & 7;
+ entries[2].a_type = ALLOW;
+ entries[2].a_flags = ACE_OTHER;
+ entries[2].a_who = 0;
+ entries[2].a_access_mask = mode & 7;
+ }
+ else
+ {
+ /* Running on Solaris 10 (newer version) or Solaris 11. */
+ entries[0].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE;
+ entries[0].a_flags = NEW_ACE_OWNER;
+ entries[0].a_who = 0; /* irrelevant */
+ entries[0].a_access_mask =
+ (mode & 0400 ? NEW_ACE_READ_DATA : 0)
+ | (mode & 0200 ? NEW_ACE_WRITE_DATA : 0)
+ | (mode & 0100 ? NEW_ACE_EXECUTE : 0);
+ entries[1].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE;
+ entries[1].a_flags = NEW_ACE_GROUP | NEW_ACE_IDENTIFIER_GROUP;
+ entries[1].a_who = 0; /* irrelevant */
+ entries[1].a_access_mask =
+ (mode & 0040 ? NEW_ACE_READ_DATA : 0)
+ | (mode & 0020 ? NEW_ACE_WRITE_DATA : 0)
+ | (mode & 0010 ? NEW_ACE_EXECUTE : 0);
+ entries[2].a_type = ACE_ACCESS_ALLOWED_ACE_TYPE;
+ entries[2].a_flags = ACE_EVERYONE;
+ entries[2].a_who = 0;
+ entries[2].a_access_mask =
+ (mode & 0004 ? NEW_ACE_READ_DATA : 0)
+ | (mode & 0002 ? NEW_ACE_WRITE_DATA : 0)
+ | (mode & 0001 ? NEW_ACE_EXECUTE : 0);
+ }
+ if (desc != -1)
+ ret = facl (desc, ACE_SETACL,
+ sizeof (entries) / sizeof (aclent_t), entries);
+ else
+ ret = acl (name, ACE_SETACL,
+ sizeof (entries) / sizeof (aclent_t), entries);
+ if (ret < 0 && errno != EINVAL && errno != ENOTSUP)
+ {
+ if (errno == ENOSYS)
+ return chmod_or_fchmod (name, desc, mode);
+ return -1;
+ }
+ }
+# endif
+
+ {
+ aclent_t entries[3];
+ int ret;
+
+ entries[0].a_type = USER_OBJ;
+ entries[0].a_id = 0; /* irrelevant */
+ entries[0].a_perm = (mode >> 6) & 7;
+ entries[1].a_type = GROUP_OBJ;
+ entries[1].a_id = 0; /* irrelevant */
+ entries[1].a_perm = (mode >> 3) & 7;
+ entries[2].a_type = OTHER_OBJ;
+ entries[2].a_id = 0;
+ entries[2].a_perm = mode & 7;
+
+ if (desc != -1)
+ ret = facl (desc, SETACL, sizeof (entries) / sizeof (aclent_t), entries);
+ else
+ ret = acl (name, SETACL, sizeof (entries) / sizeof (aclent_t), entries);
+ if (ret < 0)
+ {
+ if (errno == ENOSYS)
+ return chmod_or_fchmod (name, desc, mode);
+ return -1;
+ }
+ }
+
+ if (!MODE_INSIDE_ACL || (mode & (S_ISUID | S_ISGID | S_ISVTX)))
+ {
+ /* We did not call chmod so far, so the special bits have not yet
+ been set. */
+ return chmod_or_fchmod (name, desc, mode);
+ }
+ return 0;
+
+# endif
+
+# elif HAVE_GETACL /* HP-UX */
+
+ struct stat statbuf;
+ struct acl_entry entries[3];
+ int ret;
+
+ if (desc != -1)
+ ret = fstat (desc, &statbuf);
+ else
+ ret = stat (name, &statbuf);
+ if (ret < 0)
+ return -1;
+
+ entries[0].uid = statbuf.st_uid;
+ entries[0].gid = ACL_NSGROUP;
+ entries[0].mode = (mode >> 6) & 7;
+ entries[1].uid = ACL_NSUSER;
+ entries[1].gid = statbuf.st_gid;
+ entries[1].mode = (mode >> 3) & 7;
+ entries[2].uid = ACL_NSUSER;
+ entries[2].gid = ACL_NSGROUP;
+ entries[2].mode = mode & 7;
+
+ if (desc != -1)
+ ret = fsetacl (desc, sizeof (entries) / sizeof (struct acl_entry), entries);
+ else
+ ret = setacl (name, sizeof (entries) / sizeof (struct acl_entry), entries);
+ if (ret < 0)
+ {
+ if (errno == ENOSYS || errno == EOPNOTSUPP)
+ return chmod_or_fchmod (name, desc, mode);
+ return -1;
+ }
+
+ if (mode & (S_ISUID | S_ISGID | S_ISVTX))
+ {
+ /* We did not call chmod so far, so the special bits have not yet
+ been set. */
+ return chmod_or_fchmod (name, desc, mode);
+ }
+ return 0;
+
+# elif HAVE_ACLX_GET && 0 /* AIX */
+
+ /* TODO: use aclx_fput or aclx_put, respectively */
+
+# elif HAVE_STATACL /* older AIX */
+
+ union { struct acl a; char room[128]; } u;
+ int ret;
+
+ u.a.acl_len = (char *) &u.a.acl_ext[0] - (char *) &u.a; /* no entries */
+ u.a.acl_mode = mode & ~(S_IXACL | 0777);
+ u.a.u_access = (mode >> 6) & 7;
+ u.a.g_access = (mode >> 3) & 7;
+ u.a.o_access = mode & 7;
+
+ if (desc != -1)
+ ret = fchacl (desc, &u.a, u.a.acl_len);
+ else
+ ret = chacl (name, &u.a, u.a.acl_len);
+
+ if (ret < 0 && errno == ENOSYS)
+ return chmod_or_fchmod (name, desc, mode);
+
+ return ret;
+
+# else /* Unknown flavor of ACLs */
+ return chmod_or_fchmod (name, desc, mode);
+# endif
+#else /* !USE_ACL */
+ return chmod_or_fchmod (name, desc, mode);
+#endif
+}
+
+/* As with qset_acl, but also output a diagnostic on failure. */
+
+int
+set_acl (char const *name, int desc, mode_t mode)
+{
+ int r = qset_acl (name, desc, mode);
+ if (r != 0)
+ error (0, errno, _("setting permissions for %s"), quote (name));
+ return r;
+}
diff --git a/lib/stat-macros.h b/lib/stat-macros.h
new file mode 100644
index 0000000..690216c
--- /dev/null
+++ b/lib/stat-macros.h
@@ -0,0 +1,3 @@
+/* All the mode bits that can be affected by chmod. */
+#define CHMOD_MODE_BITS \
+ (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
diff --git a/lib/stdbool.in.h b/lib/stdbool.in.h
new file mode 100644
index 0000000..d95f723
--- /dev/null
+++ b/lib/stdbool.in.h
@@ -0,0 +1,121 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
+ Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_STDBOOL_H
+#define _GL_STDBOOL_H
+
+/* ISO C 99 <stdbool.h> for platforms that lack it. */
+
+/* Usage suggestions:
+
+ Programs that use <stdbool.h> should be aware of some limitations
+ and standards compliance issues.
+
+ Standards compliance:
+
+ - <stdbool.h> must be #included before 'bool', 'false', 'true'
+ can be used.
+
+ - You cannot assume that sizeof (bool) == 1.
+
+ - Programs should not undefine the macros bool, true, and false,
+ as C99 lists that as an "obsolescent feature".
+
+ Limitations of this substitute, when used in a C89 environment:
+
+ - <stdbool.h> must be #included before the '_Bool' type can be used.
+
+ - You cannot assume that _Bool is a typedef; it might be a macro.
+
+ - Bit-fields of type 'bool' are not supported. Portable code
+ should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'.
+
+ - In C99, casts and automatic conversions to '_Bool' or 'bool' are
+ performed in such a way that every nonzero value gets converted
+ to 'true', and zero gets converted to 'false'. This doesn't work
+ with this substitute. With this substitute, only the values 0 and 1
+ give the expected result when converted to _Bool' or 'bool'.
+
+ Also, it is suggested that programs use 'bool' rather than '_Bool';
+ this isn't required, but 'bool' is more common. */
+
+
+/* 7.16. Boolean type and values */
+
+/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
+ definitions below, but temporarily we have to #undef them. */
+#if defined __BEOS__ && !defined __HAIKU__
+# include <OS.h> /* defines bool but not _Bool */
+# undef false
+# undef true
+#endif
+
+/* For the sake of symbolic names in gdb, we define true and false as
+ enum constants, not only as macros.
+ It is tempting to write
+ typedef enum { false = 0, true = 1 } _Bool;
+ so that gdb prints values of type 'bool' symbolically. But if we do
+ this, values of type '_Bool' may promote to 'int' or 'unsigned int'
+ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
+ (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
+ enum; this ensures that '_Bool' promotes to 'int'. */
+#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
+ /* A compiler known to have 'bool'. */
+ /* If the compiler already has both 'bool' and '_Bool', we can assume they
+ are the same types. */
+# if !@HAVE__BOOL@
+typedef bool _Bool;
+# endif
+#else
+# if !defined __GNUC__
+ /* If @HAVE__BOOL@:
+ Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
+ the built-in _Bool type is used. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ Similar bugs are likely with other compilers as well; this file
+ wouldn't be used if <stdbool.h> was working.
+ So we override the _Bool type.
+ If !@HAVE__BOOL@:
+ Need to define _Bool ourselves. As 'signed char' or as an enum type?
+ Use of a typedef, with SunPRO C, leads to a stupid
+ "warning: _Bool is a keyword in ISO C99".
+ Use of an enum type, with IRIX cc, leads to a stupid
+ "warning(1185): enumerated type mixed with another type".
+ Even the existence of an enum type, without a typedef,
+ "Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
+ The only benefit of the enum, debuggability, is not important
+ with these compilers. So use 'signed char' and no enum. */
+# define _Bool signed char
+# else
+ /* With this compiler, trust the _Bool type if the compiler has it. */
+# if !@HAVE__BOOL@
+typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
+# endif
+# endif
+#endif
+#define bool _Bool
+
+/* The other macros must be usable in preprocessor directives. */
+#define false 0
+#define true 1
+#define __bool_true_false_are_defined 1
+
+#endif /* _GL_STDBOOL_H */
diff --git a/lib/stdbool_.h b/lib/stdbool_.h
deleted file mode 100644
index 978174e..0000000
--- a/lib/stdbool_.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (C) 2001-2002 Free Software Foundation, Inc.
- Written by Bruno Haible <haible@clisp.cons.org>, 2001.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-
-#ifndef _STDBOOL_H
-#define _STDBOOL_H
-
-/* ISO C 99 <stdbool.h> for platforms that lack it. */
-
-/* 7.16. Boolean type and values */
-
-/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
- definitions below, but temporarily we have to #undef them. */
-#ifdef __BEOS__
-# undef false
-# undef true
-#endif
-
-/* For the sake of symbolic names in gdb, define _Bool as an enum type. */
-#ifndef __cplusplus
-# if !@HAVE__BOOL@
-typedef enum { false = 0, true = 1 } _Bool;
-# endif
-#else
-typedef bool _Bool;
-#endif
-#define bool _Bool
-
-/* The other macros must be usable in preprocessor directives. */
-#define false 0
-#define true 1
-#define __bool_true_false_are_defined 1
-
-#endif /* _STDBOOL_H */
diff --git a/lib/stdint.in.h b/lib/stdint.in.h
new file mode 100644
index 0000000..0aa4784
--- /dev/null
+++ b/lib/stdint.in.h
@@ -0,0 +1,569 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Copyright (C) 2001-2002, 2004-2009 Free Software Foundation, Inc.
+ Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
+ This file is part of gnulib.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/*
+ * ISO C 99 <stdint.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/stdint.h.html>
+ */
+
+#ifndef _GL_STDINT_H
+
+/* When including a system file that in turn includes <inttypes.h>,
+ use the system <inttypes.h>, not our substitute. This avoids
+ problems with (for example) VMS, whose <sys/bitypes.h> includes
+ <inttypes.h>. */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+
+/* Get those types that are already defined in other system include
+ files, so that we can "#define int8_t signed char" below without
+ worrying about a later system include file containing a "typedef
+ signed char int8_t;" that will get messed up by our macro. Our
+ macros should all be consistent with the system versions, except
+ for the "fast" types and macros, which we recommend against using
+ in public interfaces due to compiler differences. */
+
+#if @HAVE_STDINT_H@
+# if defined __sgi && ! defined __c99
+ /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users
+ with "This header file is to be used only for c99 mode compilations"
+ diagnostics. */
+# define __STDINT_H__
+# endif
+ /* Other systems may have an incomplete or buggy <stdint.h>.
+ Include it before <inttypes.h>, since any "#include <stdint.h>"
+ in <inttypes.h> would reinclude us, skipping our contents because
+ _GL_STDINT_H is defined.
+ The include_next requires a split double-inclusion guard. */
+# if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+# endif
+# @INCLUDE_NEXT@ @NEXT_STDINT_H@
+#endif
+
+#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+#define _GL_STDINT_H
+
+/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
+ IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
+ AIX 5.2 <sys/types.h> isn't needed and causes troubles.
+ MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+ relies on the system <stdint.h> definitions, so include
+ <sys/types.h> after @NEXT_STDINT_H@. */
+#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
+# include <sys/types.h>
+#endif
+
+/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */
+#include <limits.h>
+
+#if @HAVE_INTTYPES_H@
+ /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
+ int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
+ <inttypes.h> also defines intptr_t and uintptr_t. */
+# include <inttypes.h>
+#elif @HAVE_SYS_INTTYPES_H@
+ /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
+ the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
+# include <sys/inttypes.h>
+#endif
+
+#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
+ /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
+ int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
+ included by <sys/types.h>. */
+# include <sys/bitypes.h>
+#endif
+
+#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+
+/* Minimum and maximum values for a integer type under the usual assumption.
+ Return an unspecified value if BITS == 0, adding a check to pacify
+ picky compilers. */
+
+#define _STDINT_MIN(signed, bits, zero) \
+ ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
+
+#define _STDINT_MAX(signed, bits, zero) \
+ ((signed) \
+ ? ~ _STDINT_MIN (signed, bits, zero) \
+ : /* The expression for the unsigned case. The subtraction of (signed) \
+ is a nop in the unsigned case and avoids "signed integer overflow" \
+ warnings in the signed case. */ \
+ ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
+
+/* 7.18.1.1. Exact-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. */
+
+#undef int8_t
+#undef uint8_t
+typedef signed char gl_int8_t;
+typedef unsigned char gl_uint8_t;
+#define int8_t gl_int8_t
+#define uint8_t gl_uint8_t
+
+#undef int16_t
+#undef uint16_t
+typedef short int gl_int16_t;
+typedef unsigned short int gl_uint16_t;
+#define int16_t gl_int16_t
+#define uint16_t gl_uint16_t
+
+#undef int32_t
+#undef uint32_t
+typedef int gl_int32_t;
+typedef unsigned int gl_uint32_t;
+#define int32_t gl_int32_t
+#define uint32_t gl_uint32_t
+
+/* Do not undefine int64_t if gnulib is not being used with 64-bit
+ types, since otherwise it breaks platforms like Tandem/NSK. */
+#if LONG_MAX >> 31 >> 31 == 1
+# undef int64_t
+typedef long int gl_int64_t;
+# define int64_t gl_int64_t
+# define GL_INT64_T
+#elif defined _MSC_VER
+# undef int64_t
+typedef __int64 gl_int64_t;
+# define int64_t gl_int64_t
+# define GL_INT64_T
+#elif @HAVE_LONG_LONG_INT@
+# undef int64_t
+typedef long long int gl_int64_t;
+# define int64_t gl_int64_t
+# define GL_INT64_T
+#endif
+
+#if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# undef uint64_t
+typedef unsigned long int gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+#elif defined _MSC_VER
+# undef uint64_t
+typedef unsigned __int64 gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+#elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# undef uint64_t
+typedef unsigned long long int gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+#endif
+
+/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
+#define _UINT8_T
+#define _UINT32_T
+#define _UINT64_T
+
+
+/* 7.18.1.2. Minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
+ are the same as the corresponding N_t types. */
+
+#undef int_least8_t
+#undef uint_least8_t
+#undef int_least16_t
+#undef uint_least16_t
+#undef int_least32_t
+#undef uint_least32_t
+#undef int_least64_t
+#undef uint_least64_t
+#define int_least8_t int8_t
+#define uint_least8_t uint8_t
+#define int_least16_t int16_t
+#define uint_least16_t uint16_t
+#define int_least32_t int32_t
+#define uint_least32_t uint32_t
+#ifdef GL_INT64_T
+# define int_least64_t int64_t
+#endif
+#ifdef GL_UINT64_T
+# define uint_least64_t uint64_t
+#endif
+
+/* 7.18.1.3. Fastest minimum-width integer types */
+
+/* Note: Other <stdint.h> substitutes may define these types differently.
+ It is not recommended to use these types in public header files. */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
+ are taken from the same list of types. Assume that 'long int'
+ is fast enough for all narrower integers. */
+
+#undef int_fast8_t
+#undef uint_fast8_t
+#undef int_fast16_t
+#undef uint_fast16_t
+#undef int_fast32_t
+#undef uint_fast32_t
+#undef int_fast64_t
+#undef uint_fast64_t
+typedef long int gl_int_fast8_t;
+typedef unsigned long int gl_uint_fast8_t;
+typedef long int gl_int_fast16_t;
+typedef unsigned long int gl_uint_fast16_t;
+typedef long int gl_int_fast32_t;
+typedef unsigned long int gl_uint_fast32_t;
+#define int_fast8_t gl_int_fast8_t
+#define uint_fast8_t gl_uint_fast8_t
+#define int_fast16_t gl_int_fast16_t
+#define uint_fast16_t gl_uint_fast16_t
+#define int_fast32_t gl_int_fast32_t
+#define uint_fast32_t gl_uint_fast32_t
+#ifdef GL_INT64_T
+# define int_fast64_t int64_t
+#endif
+#ifdef GL_UINT64_T
+# define uint_fast64_t uint64_t
+#endif
+
+/* 7.18.1.4. Integer types capable of holding object pointers */
+
+#undef intptr_t
+#undef uintptr_t
+typedef long int gl_intptr_t;
+typedef unsigned long int gl_uintptr_t;
+#define intptr_t gl_intptr_t
+#define uintptr_t gl_uintptr_t
+
+/* 7.18.1.5. Greatest-width integer types */
+
+/* Note: These types are compiler dependent. It may be unwise to use them in
+ public header files. */
+
+#undef intmax_t
+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+typedef long long int gl_intmax_t;
+# define intmax_t gl_intmax_t
+#elif defined GL_INT64_T
+# define intmax_t int64_t
+#else
+typedef long int gl_intmax_t;
+# define intmax_t gl_intmax_t
+#endif
+
+#undef uintmax_t
+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+typedef unsigned long long int gl_uintmax_t;
+# define uintmax_t gl_uintmax_t
+#elif defined GL_UINT64_T
+# define uintmax_t uint64_t
+#else
+typedef unsigned long int gl_uintmax_t;
+# define uintmax_t gl_uintmax_t
+#endif
+
+/* Verify that intmax_t and uintmax_t have the same size. Too much code
+ breaks if this is not the case. If this check fails, the reason is likely
+ to be found in the autoconf macros. */
+typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1];
+
+/* 7.18.2. Limits of specified-width integer types */
+
+#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
+
+/* 7.18.2.1. Limits of exact-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. */
+
+#undef INT8_MIN
+#undef INT8_MAX
+#undef UINT8_MAX
+#define INT8_MIN (~ INT8_MAX)
+#define INT8_MAX 127
+#define UINT8_MAX 255
+
+#undef INT16_MIN
+#undef INT16_MAX
+#undef UINT16_MAX
+#define INT16_MIN (~ INT16_MAX)
+#define INT16_MAX 32767
+#define UINT16_MAX 65535
+
+#undef INT32_MIN
+#undef INT32_MAX
+#undef UINT32_MAX
+#define INT32_MIN (~ INT32_MAX)
+#define INT32_MAX 2147483647
+#define UINT32_MAX 4294967295U
+
+#undef INT64_MIN
+#undef INT64_MAX
+#ifdef GL_INT64_T
+/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
+ evaluates the latter incorrectly in preprocessor expressions. */
+# define INT64_MIN (- INTMAX_C (1) << 63)
+# define INT64_MAX INTMAX_C (9223372036854775807)
+#endif
+
+#undef UINT64_MAX
+#ifdef GL_UINT64_T
+# define UINT64_MAX UINTMAX_C (18446744073709551615)
+#endif
+
+/* 7.18.2.2. Limits of minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
+ are the same as the corresponding N_t types. */
+
+#undef INT_LEAST8_MIN
+#undef INT_LEAST8_MAX
+#undef UINT_LEAST8_MAX
+#define INT_LEAST8_MIN INT8_MIN
+#define INT_LEAST8_MAX INT8_MAX
+#define UINT_LEAST8_MAX UINT8_MAX
+
+#undef INT_LEAST16_MIN
+#undef INT_LEAST16_MAX
+#undef UINT_LEAST16_MAX
+#define INT_LEAST16_MIN INT16_MIN
+#define INT_LEAST16_MAX INT16_MAX
+#define UINT_LEAST16_MAX UINT16_MAX
+
+#undef INT_LEAST32_MIN
+#undef INT_LEAST32_MAX
+#undef UINT_LEAST32_MAX
+#define INT_LEAST32_MIN INT32_MIN
+#define INT_LEAST32_MAX INT32_MAX
+#define UINT_LEAST32_MAX UINT32_MAX
+
+#undef INT_LEAST64_MIN
+#undef INT_LEAST64_MAX
+#ifdef GL_INT64_T
+# define INT_LEAST64_MIN INT64_MIN
+# define INT_LEAST64_MAX INT64_MAX
+#endif
+
+#undef UINT_LEAST64_MAX
+#ifdef GL_UINT64_T
+# define UINT_LEAST64_MAX UINT64_MAX
+#endif
+
+/* 7.18.2.3. Limits of fastest minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
+ are taken from the same list of types. */
+
+#undef INT_FAST8_MIN
+#undef INT_FAST8_MAX
+#undef UINT_FAST8_MAX
+#define INT_FAST8_MIN LONG_MIN
+#define INT_FAST8_MAX LONG_MAX
+#define UINT_FAST8_MAX ULONG_MAX
+
+#undef INT_FAST16_MIN
+#undef INT_FAST16_MAX
+#undef UINT_FAST16_MAX
+#define INT_FAST16_MIN LONG_MIN
+#define INT_FAST16_MAX LONG_MAX
+#define UINT_FAST16_MAX ULONG_MAX
+
+#undef INT_FAST32_MIN
+#undef INT_FAST32_MAX
+#undef UINT_FAST32_MAX
+#define INT_FAST32_MIN LONG_MIN
+#define INT_FAST32_MAX LONG_MAX
+#define UINT_FAST32_MAX ULONG_MAX
+
+#undef INT_FAST64_MIN
+#undef INT_FAST64_MAX
+#ifdef GL_INT64_T
+# define INT_FAST64_MIN INT64_MIN
+# define INT_FAST64_MAX INT64_MAX
+#endif
+
+#undef UINT_FAST64_MAX
+#ifdef GL_UINT64_T
+# define UINT_FAST64_MAX UINT64_MAX
+#endif
+
+/* 7.18.2.4. Limits of integer types capable of holding object pointers */
+
+#undef INTPTR_MIN
+#undef INTPTR_MAX
+#undef UINTPTR_MAX
+#define INTPTR_MIN LONG_MIN
+#define INTPTR_MAX LONG_MAX
+#define UINTPTR_MAX ULONG_MAX
+
+/* 7.18.2.5. Limits of greatest-width integer types */
+
+#undef INTMAX_MIN
+#undef INTMAX_MAX
+#ifdef INT64_MAX
+# define INTMAX_MIN INT64_MIN
+# define INTMAX_MAX INT64_MAX
+#else
+# define INTMAX_MIN INT32_MIN
+# define INTMAX_MAX INT32_MAX
+#endif
+
+#undef UINTMAX_MAX
+#ifdef UINT64_MAX
+# define UINTMAX_MAX UINT64_MAX
+#else
+# define UINTMAX_MAX UINT32_MAX
+#endif
+
+/* 7.18.3. Limits of other integer types */
+
+/* ptrdiff_t limits */
+#undef PTRDIFF_MIN
+#undef PTRDIFF_MAX
+#if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
+# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
+# else
+# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
+# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
+# endif
+#else
+# define PTRDIFF_MIN \
+ _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
+# define PTRDIFF_MAX \
+ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
+#endif
+
+/* sig_atomic_t limits */
+#undef SIG_ATOMIC_MIN
+#undef SIG_ATOMIC_MAX
+#define SIG_ATOMIC_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
+ 0@SIG_ATOMIC_T_SUFFIX@)
+#define SIG_ATOMIC_MAX \
+ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
+ 0@SIG_ATOMIC_T_SUFFIX@)
+
+
+/* size_t limit */
+#undef SIZE_MAX
+#if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
+# else
+# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
+# endif
+#else
+# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
+#endif
+
+/* wchar_t limits */
+/* Get WCHAR_MIN, WCHAR_MAX.
+ This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested
+ includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
+ <stdint.h> and assumes its types are already defined. */
+#if ! (defined WCHAR_MIN && defined WCHAR_MAX)
+# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+# include <wchar.h>
+# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+#endif
+#undef WCHAR_MIN
+#undef WCHAR_MAX
+#define WCHAR_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
+#define WCHAR_MAX \
+ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
+
+/* wint_t limits */
+#undef WINT_MIN
+#undef WINT_MAX
+#define WINT_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+#define WINT_MAX \
+ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+
+#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
+
+/* 7.18.4. Macros for integer constants */
+
+#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
+
+/* 7.18.4.1. Macros for minimum-width integer constants */
+/* According to ISO C 99 Technical Corrigendum 1 */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */
+
+#undef INT8_C
+#undef UINT8_C
+#define INT8_C(x) x
+#define UINT8_C(x) x
+
+#undef INT16_C
+#undef UINT16_C
+#define INT16_C(x) x
+#define UINT16_C(x) x
+
+#undef INT32_C
+#undef UINT32_C
+#define INT32_C(x) x
+#define UINT32_C(x) x ## U
+
+#undef INT64_C
+#undef UINT64_C
+#if LONG_MAX >> 31 >> 31 == 1
+# define INT64_C(x) x##L
+#elif defined _MSC_VER
+# define INT64_C(x) x##i64
+#elif @HAVE_LONG_LONG_INT@
+# define INT64_C(x) x##LL
+#endif
+#if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# define UINT64_C(x) x##UL
+#elif defined _MSC_VER
+# define UINT64_C(x) x##ui64
+#elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# define UINT64_C(x) x##ULL
+#endif
+
+/* 7.18.4.2. Macros for greatest-width integer constants */
+
+#undef INTMAX_C
+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define INTMAX_C(x) x##LL
+#elif defined GL_INT64_T
+# define INTMAX_C(x) INT64_C(x)
+#else
+# define INTMAX_C(x) x##L
+#endif
+
+#undef UINTMAX_C
+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define UINTMAX_C(x) x##ULL
+#elif defined GL_UINT64_T
+# define UINTMAX_C(x) UINT64_C(x)
+#else
+# define UINTMAX_C(x) x##UL
+#endif
+
+#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
+
+#endif /* _GL_STDINT_H */
+#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
diff --git a/lib/stdio-write.c b/lib/stdio-write.c
new file mode 100644
index 0000000..f1d0fcb
--- /dev/null
+++ b/lib/stdio-write.c
@@ -0,0 +1,148 @@
+/* POSIX compatible FILE stream write function.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+/* Replace these functions only if module 'sigpipe' is requested. */
+#if GNULIB_SIGPIPE
+
+/* On native Windows platforms, SIGPIPE does not exist. When write() is
+ called on a pipe with no readers, WriteFile() fails with error
+ GetLastError() = ERROR_NO_DATA, and write() in consequence fails with
+ error EINVAL. This write() function is at the basis of the function
+ which flushes the buffer of a FILE stream. */
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# include <errno.h>
+# include <signal.h>
+# include <io.h>
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# define CALL_WITH_SIGPIPE_EMULATION(RETTYPE, EXPRESSION, FAILED) \
+ if (ferror (stream)) \
+ return (EXPRESSION); \
+ else \
+ { \
+ RETTYPE ret; \
+ SetLastError (0); \
+ ret = (EXPRESSION); \
+ if (FAILED && GetLastError () == ERROR_NO_DATA && ferror (stream)) \
+ { \
+ int fd = fileno (stream); \
+ if (fd >= 0 \
+ && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE)\
+ { \
+ /* Try to raise signal SIGPIPE. */ \
+ raise (SIGPIPE); \
+ /* If it is currently blocked or ignored, change errno from \
+ EINVAL to EPIPE. */ \
+ errno = EPIPE; \
+ } \
+ } \
+ return ret; \
+ }
+
+# if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */
+int
+printf (const char *format, ...)
+{
+ int retval;
+ va_list args;
+
+ va_start (args, format);
+ retval = vfprintf (stdout, format, args);
+ va_end (args);
+
+ return retval;
+}
+# endif
+
+# if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */
+int
+fprintf (FILE *stream, const char *format, ...)
+{
+ int retval;
+ va_list args;
+
+ va_start (args, format);
+ retval = vfprintf (stream, format, args);
+ va_end (args);
+
+ return retval;
+}
+# endif
+
+# if !REPLACE_VFPRINTF_POSIX /* avoid collision with vprintf.c */
+int
+vprintf (const char *format, va_list args)
+{
+ return vfprintf (stdout, format, args);
+}
+# endif
+
+# if !REPLACE_VPRINTF_POSIX /* avoid collision with vfprintf.c */
+int
+vfprintf (FILE *stream, const char *format, va_list args)
+#undef vfprintf
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, vfprintf (stream, format, args), ret == EOF)
+}
+# endif
+
+int
+putchar (int c)
+{
+ return fputc (c, stdout);
+}
+
+int
+fputc (int c, FILE *stream)
+#undef fputc
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, fputc (c, stream), ret == EOF)
+}
+
+int
+fputs (const char *string, FILE *stream)
+#undef fputs
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, fputs (string, stream), ret == EOF)
+}
+
+int
+puts (const char *string)
+#undef puts
+{
+ FILE *stream = stdout;
+ CALL_WITH_SIGPIPE_EMULATION (int, puts (string), ret == EOF)
+}
+
+size_t
+fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
+#undef fwrite
+{
+ CALL_WITH_SIGPIPE_EMULATION (size_t, fwrite (ptr, s, n, stream), ret < n)
+}
+
+# endif
+#endif
diff --git a/lib/stdio.in.h b/lib/stdio.in.h
new file mode 100644
index 0000000..863b903
--- /dev/null
+++ b/lib/stdio.in.h
@@ -0,0 +1,526 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* A GNU-like <stdio.h>.
+
+ Copyright (C) 2004, 2007-2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_FILE || defined __need___FILE
+/* Special invocation convention inside glibc header files. */
+
+#@INCLUDE_NEXT@ @NEXT_STDIO_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_STDIO_H
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_STDIO_H@
+
+#ifndef _GL_STDIO_H
+#define _GL_STDIO_H
+
+#include <stdarg.h>
+#include <stddef.h>
+
+#if (@GNULIB_FSEEKO@ && @REPLACE_FSEEKO@) \
+ || (@GNULIB_FTELLO@ && @REPLACE_FTELLO@) \
+ || (@GNULIB_GETDELIM@ && !@HAVE_DECL_GETDELIM@) \
+ || (@GNULIB_GETLINE@ && (!@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@))
+/* Get off_t and ssize_t. */
+# include <sys/types.h>
+#endif
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+# define __attribute__(Spec) /* empty */
+# endif
+/* The __-protected variants of `format' and `printf' attributes
+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __format__ format
+# define __printf__ printf
+# endif
+#endif
+
+
+/* The definition of GL_LINK_WARNING is copied here. */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if @GNULIB_FPRINTF_POSIX@
+# if @REPLACE_FPRINTF@
+# define fprintf rpl_fprintf
+extern int fprintf (FILE *fp, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+# endif
+#elif @GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# define fprintf rpl_fprintf
+extern int fprintf (FILE *fp, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+#elif defined GNULIB_POSIXCHECK
+# undef fprintf
+# define fprintf \
+ (GL_LINK_WARNING ("fprintf is not always POSIX compliant - " \
+ "use gnulib module fprintf-posix for portable " \
+ "POSIX compliance"), \
+ fprintf)
+#endif
+
+#if @GNULIB_VFPRINTF_POSIX@
+# if @REPLACE_VFPRINTF@
+# define vfprintf rpl_vfprintf
+extern int vfprintf (FILE *fp, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#elif @GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# define vfprintf rpl_vfprintf
+extern int vfprintf (FILE *fp, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)));
+#elif defined GNULIB_POSIXCHECK
+# undef vfprintf
+# define vfprintf(s,f,a) \
+ (GL_LINK_WARNING ("vfprintf is not always POSIX compliant - " \
+ "use gnulib module vfprintf-posix for portable " \
+ "POSIX compliance"), \
+ vfprintf (s, f, a))
+#endif
+
+#if @GNULIB_PRINTF_POSIX@
+# if @REPLACE_PRINTF@
+/* Don't break __attribute__((format(printf,M,N))). */
+# define printf __printf__
+extern int printf (const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)));
+# endif
+#elif @GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+/* Don't break __attribute__((format(printf,M,N))). */
+# define printf __printf__
+extern int printf (const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)));
+#elif defined GNULIB_POSIXCHECK
+# undef printf
+# define printf \
+ (GL_LINK_WARNING ("printf is not always POSIX compliant - " \
+ "use gnulib module printf-posix for portable " \
+ "POSIX compliance"), \
+ printf)
+/* Don't break __attribute__((format(printf,M,N))). */
+# define format(kind,m,n) format (__##kind##__, m, n)
+# define __format__(kind,m,n) __format__ (__##kind##__, m, n)
+# define ____printf____ __printf__
+# define ____scanf____ __scanf__
+# define ____strftime____ __strftime__
+# define ____strfmon____ __strfmon__
+#endif
+
+#if @GNULIB_VPRINTF_POSIX@
+# if @REPLACE_VPRINTF@
+# define vprintf rpl_vprintf
+extern int vprintf (const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 1, 0)));
+# endif
+#elif @GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# define vprintf rpl_vprintf
+extern int vprintf (const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 1, 0)));
+#elif defined GNULIB_POSIXCHECK
+# undef vprintf
+# define vprintf(f,a) \
+ (GL_LINK_WARNING ("vprintf is not always POSIX compliant - " \
+ "use gnulib module vprintf-posix for portable " \
+ "POSIX compliance"), \
+ vprintf (f, a))
+#endif
+
+#if @GNULIB_SNPRINTF@
+# if @REPLACE_SNPRINTF@
+# define snprintf rpl_snprintf
+# endif
+# if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@
+extern int snprintf (char *str, size_t size, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef snprintf
+# define snprintf \
+ (GL_LINK_WARNING ("snprintf is unportable - " \
+ "use gnulib module snprintf for portability"), \
+ snprintf)
+#endif
+
+#if @GNULIB_VSNPRINTF@
+# if @REPLACE_VSNPRINTF@
+# define vsnprintf rpl_vsnprintf
+# endif
+# if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@
+extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 3, 0)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vsnprintf
+# define vsnprintf(b,s,f,a) \
+ (GL_LINK_WARNING ("vsnprintf is unportable - " \
+ "use gnulib module vsnprintf for portability"), \
+ vsnprintf (b, s, f, a))
+#endif
+
+#if @GNULIB_SPRINTF_POSIX@
+# if @REPLACE_SPRINTF@
+# define sprintf rpl_sprintf
+extern int sprintf (char *str, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef sprintf
+# define sprintf \
+ (GL_LINK_WARNING ("sprintf is not always POSIX compliant - " \
+ "use gnulib module sprintf-posix for portable " \
+ "POSIX compliance"), \
+ sprintf)
+#endif
+
+#if @GNULIB_VSPRINTF_POSIX@
+# if @REPLACE_VSPRINTF@
+# define vsprintf rpl_vsprintf
+extern int vsprintf (char *str, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vsprintf
+# define vsprintf(b,f,a) \
+ (GL_LINK_WARNING ("vsprintf is not always POSIX compliant - " \
+ "use gnulib module vsprintf-posix for portable " \
+ "POSIX compliance"), \
+ vsprintf (b, f, a))
+#endif
+
+#if @GNULIB_DPRINTF@
+# if @REPLACE_DPRINTF@
+# define dprintf rpl_dprintf
+# endif
+# if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@
+extern int dprintf (int fd, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef dprintf
+# define dprintf(d,f,a) \
+ (GL_LINK_WARNING ("dprintf is unportable - " \
+ "use gnulib module dprintf for portability"), \
+ dprintf (d, f, a))
+#endif
+
+#if @GNULIB_VDPRINTF@
+# if @REPLACE_VDPRINTF@
+# define vdprintf rpl_vdprintf
+# endif
+# if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@
+extern int vdprintf (int fd, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vdprintf
+# define vdprintf(d,f,a) \
+ (GL_LINK_WARNING ("vdprintf is unportable - " \
+ "use gnulib module vdprintf for portability"), \
+ vdprintf (d, f, a))
+#endif
+
+#if @GNULIB_VASPRINTF@
+# if @REPLACE_VASPRINTF@
+# define asprintf rpl_asprintf
+# define vasprintf rpl_vasprintf
+# endif
+# if @REPLACE_VASPRINTF@ || !@HAVE_VASPRINTF@
+ /* Write formatted output to a string dynamically allocated with malloc().
+ If the memory allocation succeeds, store the address of the string in
+ *RESULT and return the number of resulting bytes, excluding the trailing
+ NUL. Upon memory allocation error, or some other error, return -1. */
+ extern int asprintf (char **result, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+ extern int vasprintf (char **result, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#endif
+
+#if @GNULIB_OBSTACK_PRINTF@
+# if @REPLACE_OBSTACK_PRINTF@
+# define obstack_printf rpl_osbtack_printf
+# define obstack_vprintf rpl_obstack_vprintf
+# endif
+# if @REPLACE_OBSTACK_PRINTF@ || !@HAVE_DECL_OBSTACK_PRINTF@
+ struct obstack;
+ /* Grow an obstack with formatted output. Return the number of
+ bytes added to OBS. No trailing nul byte is added, and the
+ object should be closed with obstack_finish before use. Upon
+ memory allocation error, call obstack_alloc_failed_handler. Upon
+ other error, return -1. */
+ extern int obstack_printf (struct obstack *obs, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+ extern int obstack_vprintf (struct obstack *obs, const char *format,
+ va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#endif
+
+#if @GNULIB_FOPEN@
+# if @REPLACE_FOPEN@
+# undef fopen
+# define fopen rpl_fopen
+extern FILE * fopen (const char *filename, const char *mode);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fopen
+# define fopen(f,m) \
+ (GL_LINK_WARNING ("fopen on Win32 platforms is not POSIX compatible - " \
+ "use gnulib module fopen for portability"), \
+ fopen (f, m))
+#endif
+
+#if @GNULIB_FREOPEN@
+# if @REPLACE_FREOPEN@
+# undef freopen
+# define freopen rpl_freopen
+extern FILE * freopen (const char *filename, const char *mode, FILE *stream);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef freopen
+# define freopen(f,m,s) \
+ (GL_LINK_WARNING ("freopen on Win32 platforms is not POSIX compatible - " \
+ "use gnulib module freopen for portability"), \
+ freopen (f, m, s))
+#endif
+
+#if @GNULIB_FSEEKO@
+# if @REPLACE_FSEEKO@
+/* Provide fseek, fseeko functions that are aware of a preceding
+ fflush(), and which detect pipes. */
+# define fseeko rpl_fseeko
+extern int fseeko (FILE *fp, off_t offset, int whence);
+# define fseek(fp, offset, whence) fseeko (fp, (off_t)(offset), whence)
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fseeko
+# define fseeko(f,o,w) \
+ (GL_LINK_WARNING ("fseeko is unportable - " \
+ "use gnulib module fseeko for portability"), \
+ fseeko (f, o, w))
+#endif
+
+#if @GNULIB_FSEEK@ && @REPLACE_FSEEK@
+extern int rpl_fseek (FILE *fp, long offset, int whence);
+# undef fseek
+# if defined GNULIB_POSIXCHECK
+# define fseek(f,o,w) \
+ (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
+ "on 32-bit platforms - " \
+ "use fseeko function for handling of large files"), \
+ rpl_fseek (f, o, w))
+# else
+# define fseek rpl_fseek
+# endif
+#elif defined GNULIB_POSIXCHECK
+# ifndef fseek
+# define fseek(f,o,w) \
+ (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
+ "on 32-bit platforms - " \
+ "use fseeko function for handling of large files"), \
+ fseek (f, o, w))
+# endif
+#endif
+
+#if @GNULIB_FTELLO@
+# if @REPLACE_FTELLO@
+# define ftello rpl_ftello
+extern off_t ftello (FILE *fp);
+# define ftell(fp) ftello (fp)
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef ftello
+# define ftello(f) \
+ (GL_LINK_WARNING ("ftello is unportable - " \
+ "use gnulib module ftello for portability"), \
+ ftello (f))
+#endif
+
+#if @GNULIB_FTELL@ && @REPLACE_FTELL@
+extern long rpl_ftell (FILE *fp);
+# undef ftell
+# if GNULIB_POSIXCHECK
+# define ftell(f) \
+ (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
+ "on 32-bit platforms - " \
+ "use ftello function for handling of large files"), \
+ rpl_ftell (f))
+# else
+# define ftell rpl_ftell
+# endif
+#elif defined GNULIB_POSIXCHECK
+# ifndef ftell
+# define ftell(f) \
+ (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
+ "on 32-bit platforms - " \
+ "use ftello function for handling of large files"), \
+ ftell (f))
+# endif
+#endif
+
+#if @GNULIB_FFLUSH@
+# if @REPLACE_FFLUSH@
+# define fflush rpl_fflush
+ /* Flush all pending data on STREAM according to POSIX rules. Both
+ output and seekable input streams are supported.
+ Note! LOSS OF DATA can occur if fflush is applied on an input stream
+ that is _not_seekable_ or on an update stream that is _not_seekable_
+ and in which the most recent operation was input. Seekability can
+ be tested with lseek(fileno(fp),0,SEEK_CUR). */
+ extern int fflush (FILE *gl_stream);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fflush
+# define fflush(f) \
+ (GL_LINK_WARNING ("fflush is not always POSIX compliant - " \
+ "use gnulib module fflush for portable " \
+ "POSIX compliance"), \
+ fflush (f))
+#endif
+
+#if @GNULIB_FCLOSE@
+# if @REPLACE_FCLOSE@
+# define fclose rpl_fclose
+ /* Close STREAM and its underlying file descriptor. */
+extern int fclose (FILE *stream);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fclose
+# define fclose(f) \
+ (GL_LINK_WARNING ("fclose is not always POSIX compliant - " \
+ "use gnulib module fclose for portable " \
+ "POSIX compliance"), \
+ fclose (f))
+#endif
+
+#if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef fputc
+# define fputc rpl_fputc
+extern int fputc (int c, FILE *stream);
+#endif
+
+#if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef putc
+# define putc rpl_fputc
+extern int putc (int c, FILE *stream);
+#endif
+
+#if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef putchar
+# define putchar rpl_putchar
+extern int putchar (int c);
+#endif
+
+#if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef fputs
+# define fputs rpl_fputs
+extern int fputs (const char *string, FILE *stream);
+#endif
+
+#if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef puts
+# define puts rpl_puts
+extern int puts (const char *string);
+#endif
+
+#if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef fwrite
+# define fwrite rpl_fwrite
+extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream);
+#endif
+
+#if @GNULIB_GETDELIM@
+# if !@HAVE_DECL_GETDELIM@
+/* Read input, up to (and including) the next occurrence of DELIMITER, from
+ STREAM, store it in *LINEPTR (and NUL-terminate it).
+ *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
+ bytes of space. It is realloc'd as necessary.
+ Return the number of bytes read and stored at *LINEPTR (not including the
+ NUL terminator), or -1 on error or EOF. */
+extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter,
+ FILE *stream);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getdelim
+# define getdelim(l, s, d, f) \
+ (GL_LINK_WARNING ("getdelim is unportable - " \
+ "use gnulib module getdelim for portability"), \
+ getdelim (l, s, d, f))
+#endif
+
+#if @GNULIB_GETLINE@
+# if @REPLACE_GETLINE@
+# undef getline
+# define getline rpl_getline
+# endif
+# if !@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@
+/* Read a line, up to (and including) the next newline, from STREAM, store it
+ in *LINEPTR (and NUL-terminate it).
+ *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
+ bytes of space. It is realloc'd as necessary.
+ Return the number of bytes read and stored at *LINEPTR (not including the
+ NUL terminator), or -1 on error or EOF. */
+extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getline
+# define getline(l, s, f) \
+ (GL_LINK_WARNING ("getline is unportable - " \
+ "use gnulib module getline for portability"), \
+ getline (l, s, f))
+#endif
+
+#if @GNULIB_PERROR@
+# if @REPLACE_PERROR@
+# define perror rpl_perror
+/* Print a message to standard error, describing the value of ERRNO,
+ (if STRING is not NULL and not empty) prefixed with STRING and ": ",
+ and terminated with a newline. */
+extern void perror (const char *string);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef perror
+# define perror(s) \
+ (GL_LINK_WARNING ("perror is not always POSIX compliant - " \
+ "use gnulib module perror for portability"), \
+ perror (s))
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_STDIO_H */
+#endif /* _GL_STDIO_H */
+#endif
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
new file mode 100644
index 0000000..f99767f
--- /dev/null
+++ b/lib/stdlib.in.h
@@ -0,0 +1,383 @@
+/* A GNU-like <stdlib.h>.
+
+ Copyright (C) 1995, 2001-2004, 2006-2009 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_malloc_and_calloc
+/* Special invocation convention inside glibc header files. */
+
+#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_STDLIB_H
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
+
+#ifndef _GL_STDLIB_H
+#define _GL_STDLIB_H
+
+
+/* Solaris declares getloadavg() in <sys/loadavg.h>. */
+#if @GNULIB_GETLOADAVG@ && @HAVE_SYS_LOADAVG_H@
+# include <sys/loadavg.h>
+#endif
+
+/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
+ from <stdlib.h> if _REENTRANT is defined. Include it always. */
+#if @HAVE_RANDOM_H@
+# include <random.h>
+#endif
+
+#if @GNULIB_RANDOM_R@ || !@HAVE_STRUCT_RANDOM_DATA@
+# include <stdint.h>
+#endif
+
+#if !@HAVE_STRUCT_RANDOM_DATA@
+struct random_data
+{
+ int32_t *fptr; /* Front pointer. */
+ int32_t *rptr; /* Rear pointer. */
+ int32_t *state; /* Array of state values. */
+ int rand_type; /* Type of random number generator. */
+ int rand_deg; /* Degree of random number generator. */
+ int rand_sep; /* Distance between front and rear. */
+ int32_t *end_ptr; /* Pointer behind state table. */
+};
+#endif
+
+/* The definition of GL_LINK_WARNING is copied here. */
+
+
+/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
+#ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+#endif
+/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
+ with proper operation of xargs. */
+#ifndef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#elif EXIT_FAILURE != 1
+# undef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if @GNULIB_MALLOC_POSIX@
+# if !@HAVE_MALLOC_POSIX@
+# undef malloc
+# define malloc rpl_malloc
+extern void * malloc (size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef malloc
+# define malloc(s) \
+ (GL_LINK_WARNING ("malloc is not POSIX compliant everywhere - " \
+ "use gnulib module malloc-posix for portability"), \
+ malloc (s))
+#endif
+
+
+#if @GNULIB_REALLOC_POSIX@
+# if !@HAVE_REALLOC_POSIX@
+# undef realloc
+# define realloc rpl_realloc
+extern void * realloc (void *ptr, size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef realloc
+# define realloc(p,s) \
+ (GL_LINK_WARNING ("realloc is not POSIX compliant everywhere - " \
+ "use gnulib module realloc-posix for portability"), \
+ realloc (p, s))
+#endif
+
+
+#if @GNULIB_CALLOC_POSIX@
+# if !@HAVE_CALLOC_POSIX@
+# undef calloc
+# define calloc rpl_calloc
+extern void * calloc (size_t nmemb, size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef calloc
+# define calloc(n,s) \
+ (GL_LINK_WARNING ("calloc is not POSIX compliant everywhere - " \
+ "use gnulib module calloc-posix for portability"), \
+ calloc (n, s))
+#endif
+
+
+#if @GNULIB_ATOLL@
+# if !@HAVE_ATOLL@
+/* Parse a signed decimal integer.
+ Returns the value of the integer. Errors are not detected. */
+extern long long atoll (const char *string);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef atoll
+# define atoll(s) \
+ (GL_LINK_WARNING ("atoll is unportable - " \
+ "use gnulib module atoll for portability"), \
+ atoll (s))
+#endif
+
+
+#if @GNULIB_GETLOADAVG@
+# if !@HAVE_DECL_GETLOADAVG@
+/* Store max(NELEM,3) load average numbers in LOADAVG[].
+ The three numbers are the load average of the last 1 minute, the last 5
+ minutes, and the last 15 minutes, respectively.
+ LOADAVG is an array of NELEM numbers. */
+extern int getloadavg (double loadavg[], int nelem);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getloadavg
+# define getloadavg(l,n) \
+ (GL_LINK_WARNING ("getloadavg is not portable - " \
+ "use gnulib module getloadavg for portability"), \
+ getloadavg (l, n))
+#endif
+
+
+#if @GNULIB_GETSUBOPT@
+/* Assuming *OPTIONP is a comma separated list of elements of the form
+ "token" or "token=value", getsubopt parses the first of these elements.
+ If the first element refers to a "token" that is member of the given
+ NULL-terminated array of tokens:
+ - It replaces the comma with a NUL byte, updates *OPTIONP to point past
+ the first option and the comma, sets *VALUEP to the value of the
+ element (or NULL if it doesn't contain an "=" sign),
+ - It returns the index of the "token" in the given array of tokens.
+ Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
+ For more details see the POSIX:2001 specification.
+ http://www.opengroup.org/susv3xsh/getsubopt.html */
+# if !@HAVE_GETSUBOPT@
+extern int getsubopt (char **optionp, char *const *tokens, char **valuep);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getsubopt
+# define getsubopt(o,t,v) \
+ (GL_LINK_WARNING ("getsubopt is unportable - " \
+ "use gnulib module getsubopt for portability"), \
+ getsubopt (o, t, v))
+#endif
+
+
+#if @GNULIB_MKDTEMP@
+# if !@HAVE_MKDTEMP@
+/* Create a unique temporary directory from TEMPLATE.
+ The last six characters of TEMPLATE must be "XXXXXX";
+ they are replaced with a string that makes the directory name unique.
+ Returns TEMPLATE, or a null pointer if it cannot get a unique name.
+ The directory is created mode 700. */
+extern char * mkdtemp (char * /*template*/);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkdtemp
+# define mkdtemp(t) \
+ (GL_LINK_WARNING ("mkdtemp is unportable - " \
+ "use gnulib module mkdtemp for portability"), \
+ mkdtemp (t))
+#endif
+
+
+#if @GNULIB_MKSTEMP@
+# if @REPLACE_MKSTEMP@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The file is then created, ensuring it didn't exist before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+# define mkstemp rpl_mkstemp
+extern int mkstemp (char * /*template*/);
+# else
+/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
+# include <unistd.h>
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkstemp
+# define mkstemp(t) \
+ (GL_LINK_WARNING ("mkstemp is unportable - " \
+ "use gnulib module mkstemp for portability"), \
+ mkstemp (t))
+#endif
+
+
+#if @GNULIB_PUTENV@
+# if @REPLACE_PUTENV@
+# undef putenv
+# define putenv rpl_putenv
+extern int putenv (char *string);
+# endif
+#endif
+
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+
+# ifndef RAND_MAX
+# define RAND_MAX 2147483647
+# endif
+
+int srandom_r (unsigned int seed, struct random_data *rand_state);
+int initstate_r (unsigned int seed, char *buf, size_t buf_size,
+ struct random_data *rand_state);
+int setstate_r (char *arg_state, struct random_data *rand_state);
+int random_r (struct random_data *buf, int32_t *result);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef random_r
+# define random_r(b,r) \
+ (GL_LINK_WARNING ("random_r is unportable - " \
+ "use gnulib module random_r for portability"), \
+ random_r (b,r))
+# undef initstate_r
+# define initstate_r(s,b,sz,r) \
+ (GL_LINK_WARNING ("initstate_r is unportable - " \
+ "use gnulib module random_r for portability"), \
+ initstate_r (s,b,sz,r))
+# undef srandom_r
+# define srandom_r(s,r) \
+ (GL_LINK_WARNING ("srandom_r is unportable - " \
+ "use gnulib module random_r for portability"), \
+ srandom_r (s,r))
+# undef setstate_r
+# define setstate_r(a,r) \
+ (GL_LINK_WARNING ("setstate_r is unportable - " \
+ "use gnulib module random_r for portability"), \
+ setstate_r (a,r))
+#endif
+
+
+#if @GNULIB_RPMATCH@
+# if !@HAVE_RPMATCH@
+/* Test a user response to a question.
+ Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */
+extern int rpmatch (const char *response);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rpmatch
+# define rpmatch(r) \
+ (GL_LINK_WARNING ("rpmatch is unportable - " \
+ "use gnulib module rpmatch for portability"), \
+ rpmatch (r))
+#endif
+
+
+#if @GNULIB_SETENV@
+# if !@HAVE_SETENV@
+/* Set NAME to VALUE in the environment.
+ If REPLACE is nonzero, overwrite an existing value. */
+extern int setenv (const char *name, const char *value, int replace);
+# endif
+#endif
+
+
+#if @GNULIB_UNSETENV@
+# if @HAVE_UNSETENV@
+# if @VOID_UNSETENV@
+/* On some systems, unsetenv() returns void.
+ This is the case for MacOS X 10.3, FreeBSD 4.8, NetBSD 1.6, OpenBSD 3.4. */
+# define unsetenv(name) ((unsetenv)(name), 0)
+# endif
+# else
+/* Remove the variable NAME from the environment. */
+extern int unsetenv (const char *name);
+# endif
+#endif
+
+
+#if @GNULIB_STRTOD@
+# if @REPLACE_STRTOD@
+# define strtod rpl_strtod
+# endif
+# if !@HAVE_STRTOD@ || @REPLACE_STRTOD@
+ /* Parse a double from STRING, updating ENDP if appropriate. */
+extern double strtod (const char *str, char **endp);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtod
+# define strtod(s, e) \
+ (GL_LINK_WARNING ("strtod is unportable - " \
+ "use gnulib module strtod for portability"), \
+ strtod (s, e))
+#endif
+
+
+#if @GNULIB_STRTOLL@
+# if !@HAVE_STRTOLL@
+/* Parse a signed integer whose textual representation starts at STRING.
+ The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
+ it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
+ "0x").
+ If ENDPTR is not NULL, the address of the first byte after the integer is
+ stored in *ENDPTR.
+ Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
+ to ERANGE. */
+extern long long strtoll (const char *string, char **endptr, int base);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoll
+# define strtoll(s,e,b) \
+ (GL_LINK_WARNING ("strtoll is unportable - " \
+ "use gnulib module strtoll for portability"), \
+ strtoll (s, e, b))
+#endif
+
+
+#if @GNULIB_STRTOULL@
+# if !@HAVE_STRTOULL@
+/* Parse an unsigned integer whose textual representation starts at STRING.
+ The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
+ it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
+ "0x").
+ If ENDPTR is not NULL, the address of the first byte after the integer is
+ stored in *ENDPTR.
+ Upon overflow, the return value is ULLONG_MAX, and errno is set to
+ ERANGE. */
+extern unsigned long long strtoull (const char *string, char **endptr, int base);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoull
+# define strtoull(s,e,b) \
+ (GL_LINK_WARNING ("strtoull is unportable - " \
+ "use gnulib module strtoull for portability"), \
+ strtoull (s, e, b))
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_STDLIB_H */
+#endif /* _GL_STDLIB_H */
+#endif
diff --git a/lib/streq.h b/lib/streq.h
new file mode 100644
index 0000000..e3b0c3f
--- /dev/null
+++ b/lib/streq.h
@@ -0,0 +1,178 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Optimized string comparison.
+ Copyright (C) 2001-2002, 2007 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>. */
+
+#ifndef _GL_STREQ_H
+#define _GL_STREQ_H
+
+#include <string.h>
+
+/* STREQ allows to optimize string comparison with a small literal string.
+ STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+ is semantically equivalent to
+ strcmp (s, "EUC-KR") == 0
+ just faster. */
+
+/* Help GCC to generate good code for string comparisons with
+ immediate strings. */
+#if defined (__GNUC__) && defined (__OPTIMIZE__)
+
+static inline int
+streq9 (const char *s1, const char *s2)
+{
+ return strcmp (s1 + 9, s2 + 9) == 0;
+}
+
+static inline int
+streq8 (const char *s1, const char *s2, char s28)
+{
+ if (s1[8] == s28)
+ {
+ if (s28 == 0)
+ return 1;
+ else
+ return streq9 (s1, s2);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq7 (const char *s1, const char *s2, char s27, char s28)
+{
+ if (s1[7] == s27)
+ {
+ if (s27 == 0)
+ return 1;
+ else
+ return streq8 (s1, s2, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq6 (const char *s1, const char *s2, char s26, char s27, char s28)
+{
+ if (s1[6] == s26)
+ {
+ if (s26 == 0)
+ return 1;
+ else
+ return streq7 (s1, s2, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28)
+{
+ if (s1[5] == s25)
+ {
+ if (s25 == 0)
+ return 1;
+ else
+ return streq6 (s1, s2, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[4] == s24)
+ {
+ if (s24 == 0)
+ return 1;
+ else
+ return streq5 (s1, s2, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[3] == s23)
+ {
+ if (s23 == 0)
+ return 1;
+ else
+ return streq4 (s1, s2, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[2] == s22)
+ {
+ if (s22 == 0)
+ return 1;
+ else
+ return streq3 (s1, s2, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[1] == s21)
+ {
+ if (s21 == 0)
+ return 1;
+ else
+ return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[0] == s20)
+ {
+ if (s20 == 0)
+ return 1;
+ else
+ return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+ streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
+
+#else
+
+#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+ (strcmp (s1, s2) == 0)
+
+#endif
+
+#endif /* _GL_STREQ_H */
diff --git a/lib/strerror.c b/lib/strerror.c
index a18f2ac..798d854 100644
--- a/lib/strerror.c
+++ b/lib/strerror.c
@@ -1,14 +1,11 @@
-/* strerror -- return a string corresponding to an error number.
- This is a quickie version only intended as compatability glue
- for systems which predate the ANSI C definition of the function;
- the glibc version is recommended for more general use.
+/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -16,37 +13,329 @@
GNU 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 <http://www.gnu.org/licenses/>. */
-#include "config.h"
+#include <config.h>
-#ifndef HAVE_STRERROR
+#include <string.h>
+
+#if REPLACE_STRERROR
-# ifndef BOOTSTRAP
-# include <stdio.h>
-# endif
-# ifdef HAVE_STRING_H
-# include <string.h>
-# endif
# include <errno.h>
-# undef strerror
+# include <stdio.h>
-extern int sys_nerr;
-extern char *sys_errlist[];
+# if GNULIB_defined_ESOCK /* native Windows platforms */
+# if HAVE_WINSOCK2_H
+# include <winsock2.h>
+# endif
+# endif
+
+# include "intprops.h"
+
+# undef strerror
+# if ! HAVE_DECL_STRERROR
+# define strerror(n) NULL
+# endif
char *
-strerror(e)
- int e;
+rpl_strerror (int n)
{
- static char unknown_string[] =
- "Unknown error code #xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
+ char const *msg = NULL;
+ /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
+ switch (n)
+ {
+# if GNULIB_defined_ETXTBSY
+ case ETXTBSY:
+ msg = "Text file busy";
+ break;
+# endif
+
+# if GNULIB_defined_ESOCK /* native Windows platforms */
+ /* EWOULDBLOCK is the same as EAGAIN. */
+ case EINPROGRESS:
+ msg = "Operation now in progress";
+ break;
+ case EALREADY:
+ msg = "Operation already in progress";
+ break;
+ case ENOTSOCK:
+ msg = "Socket operation on non-socket";
+ break;
+ case EDESTADDRREQ:
+ msg = "Destination address required";
+ break;
+ case EMSGSIZE:
+ msg = "Message too long";
+ break;
+ case EPROTOTYPE:
+ msg = "Protocol wrong type for socket";
+ break;
+ case ENOPROTOOPT:
+ msg = "Protocol not available";
+ break;
+ case EPROTONOSUPPORT:
+ msg = "Protocol not supported";
+ break;
+ case ESOCKTNOSUPPORT:
+ msg = "Socket type not supported";
+ break;
+ case EOPNOTSUPP:
+ msg = "Operation not supported";
+ break;
+ case EPFNOSUPPORT:
+ msg = "Protocol family not supported";
+ break;
+ case EAFNOSUPPORT:
+ msg = "Address family not supported by protocol";
+ break;
+ case EADDRINUSE:
+ msg = "Address already in use";
+ break;
+ case EADDRNOTAVAIL:
+ msg = "Cannot assign requested address";
+ break;
+ case ENETDOWN:
+ msg = "Network is down";
+ break;
+ case ENETUNREACH:
+ msg = "Network is unreachable";
+ break;
+ case ENETRESET:
+ msg = "Network dropped connection on reset";
+ break;
+ case ECONNABORTED:
+ msg = "Software caused connection abort";
+ break;
+ case ECONNRESET:
+ msg = "Connection reset by peer";
+ break;
+ case ENOBUFS:
+ msg = "No buffer space available";
+ break;
+ case EISCONN:
+ msg = "Transport endpoint is already connected";
+ break;
+ case ENOTCONN:
+ msg = "Transport endpoint is not connected";
+ break;
+ case ESHUTDOWN:
+ msg = "Cannot send after transport endpoint shutdown";
+ break;
+ case ETOOMANYREFS:
+ msg = "Too many references: cannot splice";
+ break;
+ case ETIMEDOUT:
+ msg = "Connection timed out";
+ break;
+ case ECONNREFUSED:
+ msg = "Connection refused";
+ break;
+ case ELOOP:
+ msg = "Too many levels of symbolic links";
+ break;
+ case EHOSTDOWN:
+ msg = "Host is down";
+ break;
+ case EHOSTUNREACH:
+ msg = "No route to host";
+ break;
+ case EPROCLIM:
+ msg = "Too many processes";
+ break;
+ case EUSERS:
+ msg = "Too many users";
+ break;
+ case EDQUOT:
+ msg = "Disk quota exceeded";
+ break;
+ case ESTALE:
+ msg = "Stale NFS file handle";
+ break;
+ case EREMOTE:
+ msg = "Object is remote";
+ break;
+# if HAVE_WINSOCK2_H
+ /* WSA_INVALID_HANDLE maps to EBADF */
+ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
+ /* WSA_INVALID_PARAMETER maps to EINVAL */
+ case WSA_OPERATION_ABORTED:
+ msg = "Overlapped operation aborted";
+ break;
+ case WSA_IO_INCOMPLETE:
+ msg = "Overlapped I/O event object not in signaled state";
+ break;
+ case WSA_IO_PENDING:
+ msg = "Overlapped operations will complete later";
+ break;
+ /* WSAEINTR maps to EINTR */
+ /* WSAEBADF maps to EBADF */
+ /* WSAEACCES maps to EACCES */
+ /* WSAEFAULT maps to EFAULT */
+ /* WSAEINVAL maps to EINVAL */
+ /* WSAEMFILE maps to EMFILE */
+ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
+ /* WSAEINPROGRESS is EINPROGRESS */
+ /* WSAEALREADY is EALREADY */
+ /* WSAENOTSOCK is ENOTSOCK */
+ /* WSAEDESTADDRREQ is EDESTADDRREQ */
+ /* WSAEMSGSIZE is EMSGSIZE */
+ /* WSAEPROTOTYPE is EPROTOTYPE */
+ /* WSAENOPROTOOPT is ENOPROTOOPT */
+ /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
+ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
+ /* WSAEOPNOTSUPP is EOPNOTSUPP */
+ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
+ /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
+ /* WSAEADDRINUSE is EADDRINUSE */
+ /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
+ /* WSAENETDOWN is ENETDOWN */
+ /* WSAENETUNREACH is ENETUNREACH */
+ /* WSAENETRESET is ENETRESET */
+ /* WSAECONNABORTED is ECONNABORTED */
+ /* WSAECONNRESET is ECONNRESET */
+ /* WSAENOBUFS is ENOBUFS */
+ /* WSAEISCONN is EISCONN */
+ /* WSAENOTCONN is ENOTCONN */
+ /* WSAESHUTDOWN is ESHUTDOWN */
+ /* WSAETOOMANYREFS is ETOOMANYREFS */
+ /* WSAETIMEDOUT is ETIMEDOUT */
+ /* WSAECONNREFUSED is ECONNREFUSED */
+ /* WSAELOOP is ELOOP */
+ /* WSAENAMETOOLONG maps to ENAMETOOLONG */
+ /* WSAEHOSTDOWN is EHOSTDOWN */
+ /* WSAEHOSTUNREACH is EHOSTUNREACH */
+ /* WSAENOTEMPTY maps to ENOTEMPTY */
+ /* WSAEPROCLIM is EPROCLIM */
+ /* WSAEUSERS is EUSERS */
+ /* WSAEDQUOT is EDQUOT */
+ /* WSAESTALE is ESTALE */
+ /* WSAEREMOTE is EREMOTE */
+ case WSASYSNOTREADY:
+ msg = "Network subsystem is unavailable";
+ break;
+ case WSAVERNOTSUPPORTED:
+ msg = "Winsock.dll version out of range";
+ break;
+ case WSANOTINITIALISED:
+ msg = "Successful WSAStartup not yet performed";
+ break;
+ case WSAEDISCON:
+ msg = "Graceful shutdown in progress";
+ break;
+ case WSAENOMORE: case WSA_E_NO_MORE:
+ msg = "No more results";
+ break;
+ case WSAECANCELLED: case WSA_E_CANCELLED:
+ msg = "Call was canceled";
+ break;
+ case WSAEINVALIDPROCTABLE:
+ msg = "Procedure call table is invalid";
+ break;
+ case WSAEINVALIDPROVIDER:
+ msg = "Service provider is invalid";
+ break;
+ case WSAEPROVIDERFAILEDINIT:
+ msg = "Service provider failed to initialize";
+ break;
+ case WSASYSCALLFAILURE:
+ msg = "System call failure";
+ break;
+ case WSASERVICE_NOT_FOUND:
+ msg = "Service not found";
+ break;
+ case WSATYPE_NOT_FOUND:
+ msg = "Class type not found";
+ break;
+ case WSAEREFUSED:
+ msg = "Database query was refused";
+ break;
+ case WSAHOST_NOT_FOUND:
+ msg = "Host not found";
+ break;
+ case WSATRY_AGAIN:
+ msg = "Nonauthoritative host not found";
+ break;
+ case WSANO_RECOVERY:
+ msg = "Nonrecoverable error";
+ break;
+ case WSANO_DATA:
+ msg = "Valid name, no data record of requested type";
+ break;
+ /* WSA_QOS_* omitted */
+# endif
+# endif
+
+# if GNULIB_defined_ENOMSG
+ case ENOMSG:
+ msg = "No message of desired type";
+ break;
+# endif
+
+# if GNULIB_defined_EIDRM
+ case EIDRM:
+ msg = "Identifier removed";
+ break;
+# endif
+
+# if GNULIB_defined_ENOLINK
+ case ENOLINK:
+ msg = "Link has been severed";
+ break;
+# endif
+
+# if GNULIB_defined_EPROTO
+ case EPROTO:
+ msg = "Protocol error";
+ break;
+# endif
+
+# if GNULIB_defined_EMULTIHOP
+ case EMULTIHOP:
+ msg = "Multihop attempted";
+ break;
+# endif
+
+# if GNULIB_defined_EBADMSG
+ case EBADMSG:
+ msg = "Bad message";
+ break;
+# endif
+
+# if GNULIB_defined_EOVERFLOW
+ case EOVERFLOW:
+ msg = "Value too large for defined data type";
+ break;
+# endif
+
+# if GNULIB_defined_ENOTSUP
+ case ENOTSUP:
+ msg = "Not supported";
+ break;
+# endif
+
+# if GNULIB_defined_
+ case ECANCELED:
+ msg = "Operation canceled";
+ break;
+# endif
+ }
+
+ if (msg)
+ return (char *) msg;
+
+ {
+ char *result = strerror (n);
+
+ if (result == NULL || result[0] == '\0')
+ {
+ static char const fmt[] = "Unknown error (%d)";
+ static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)];
+ sprintf (msg_buf, fmt, n);
+ return msg_buf;
+ }
- if (0<=e && e<sys_nerr)
- return sys_errlist[e];
- sprintf(unknown_string+20, "%d", e);
- return unknown_string;
+ return result;
+ }
}
-#endif /* !HAVE_STRERROR */
+#endif
diff --git a/lib/string.in.h b/lib/string.in.h
new file mode 100644
index 0000000..a300dad
--- /dev/null
+++ b/lib/string.in.h
@@ -0,0 +1,607 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* A GNU-like <string.h>.
+
+ Copyright (C) 1995-1996, 2001-2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_STRING_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_STRING_H@
+
+#ifndef _GL_STRING_H
+#define _GL_STRING_H
+
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+# define __attribute__(Spec) /* empty */
+# endif
+/* The attribute __pure__ was added in gcc 2.96. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
+# define __pure__ /* empty */
+# endif
+#endif
+
+
+/* The definition of GL_LINK_WARNING is copied here. */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Return the first occurrence of NEEDLE in HAYSTACK. */
+#if @GNULIB_MEMMEM@
+# if @REPLACE_MEMMEM@
+# define memmem rpl_memmem
+# endif
+# if ! @HAVE_DECL_MEMMEM@ || @REPLACE_MEMMEM@
+extern void *memmem (void const *__haystack, size_t __haystack_len,
+ void const *__needle, size_t __needle_len)
+ __attribute__ ((__pure__));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef memmem
+# define memmem(a,al,b,bl) \
+ (GL_LINK_WARNING ("memmem is unportable and often quadratic - " \
+ "use gnulib module memmem-simple for portability, " \
+ "and module memmem for speed" ), \
+ memmem (a, al, b, bl))
+#endif
+
+/* Copy N bytes of SRC to DEST, return pointer to bytes after the
+ last written byte. */
+#if @GNULIB_MEMPCPY@
+# if ! @HAVE_MEMPCPY@
+extern void *mempcpy (void *restrict __dest, void const *restrict __src,
+ size_t __n);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mempcpy
+# define mempcpy(a,b,n) \
+ (GL_LINK_WARNING ("mempcpy is unportable - " \
+ "use gnulib module mempcpy for portability"), \
+ mempcpy (a, b, n))
+#endif
+
+/* Search backwards through a block for a byte (specified as an int). */
+#if @GNULIB_MEMRCHR@
+# if ! @HAVE_DECL_MEMRCHR@
+extern void *memrchr (void const *, int, size_t)
+ __attribute__ ((__pure__));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef memrchr
+# define memrchr(a,b,c) \
+ (GL_LINK_WARNING ("memrchr is unportable - " \
+ "use gnulib module memrchr for portability"), \
+ memrchr (a, b, c))
+#endif
+
+/* Find the first occurrence of C in S. More efficient than
+ memchr(S,C,N), at the expense of undefined behavior if C does not
+ occur within N bytes. */
+#if @GNULIB_RAWMEMCHR@
+# if ! @HAVE_RAWMEMCHR@
+extern void *rawmemchr (void const *__s, int __c_in)
+ __attribute__ ((__pure__));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rawmemchr
+# define rawmemchr(a,b) \
+ (GL_LINK_WARNING ("rawmemchr is unportable - " \
+ "use gnulib module rawmemchr for portability"), \
+ rawmemchr (a, b))
+#endif
+
+/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
+#if @GNULIB_STPCPY@
+# if ! @HAVE_STPCPY@
+extern char *stpcpy (char *restrict __dst, char const *restrict __src);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef stpcpy
+# define stpcpy(a,b) \
+ (GL_LINK_WARNING ("stpcpy is unportable - " \
+ "use gnulib module stpcpy for portability"), \
+ stpcpy (a, b))
+#endif
+
+/* Copy no more than N bytes of SRC to DST, returning a pointer past the
+ last non-NUL byte written into DST. */
+#if @GNULIB_STPNCPY@
+# if ! @HAVE_STPNCPY@
+# define stpncpy gnu_stpncpy
+extern char *stpncpy (char *restrict __dst, char const *restrict __src,
+ size_t __n);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef stpncpy
+# define stpncpy(a,b,n) \
+ (GL_LINK_WARNING ("stpncpy is unportable - " \
+ "use gnulib module stpncpy for portability"), \
+ stpncpy (a, b, n))
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strchr() does not work with multibyte strings if the locale encoding is
+ GB18030 and the character to be searched is a digit. */
+# undef strchr
+# define strchr(s,c) \
+ (GL_LINK_WARNING ("strchr cannot work correctly on character strings " \
+ "in some multibyte locales - " \
+ "use mbschr if you care about internationalization"), \
+ strchr (s, c))
+#endif
+
+/* Find the first occurrence of C in S or the final NUL byte. */
+#if @GNULIB_STRCHRNUL@
+# if ! @HAVE_STRCHRNUL@
+extern char *strchrnul (char const *__s, int __c_in)
+ __attribute__ ((__pure__));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strchrnul
+# define strchrnul(a,b) \
+ (GL_LINK_WARNING ("strchrnul is unportable - " \
+ "use gnulib module strchrnul for portability"), \
+ strchrnul (a, b))
+#endif
+
+/* Duplicate S, returning an identical malloc'd string. */
+#if @GNULIB_STRDUP@
+# if @REPLACE_STRDUP@
+# undef strdup
+# define strdup rpl_strdup
+# endif
+# if !(@HAVE_DECL_STRDUP@ || defined strdup) || @REPLACE_STRDUP@
+extern char *strdup (char const *__s);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strdup
+# define strdup(a) \
+ (GL_LINK_WARNING ("strdup is unportable - " \
+ "use gnulib module strdup for portability"), \
+ strdup (a))
+#endif
+
+/* Return a newly allocated copy of at most N bytes of STRING. */
+#if @GNULIB_STRNDUP@
+# if ! @HAVE_STRNDUP@
+# undef strndup
+# define strndup rpl_strndup
+# endif
+# if ! @HAVE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@
+extern char *strndup (char const *__string, size_t __n);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strndup
+# define strndup(a,n) \
+ (GL_LINK_WARNING ("strndup is unportable - " \
+ "use gnulib module strndup for portability"), \
+ strndup (a, n))
+#endif
+
+/* Find the length (number of bytes) of STRING, but scan at most
+ MAXLEN bytes. If no '\0' terminator is found in that many bytes,
+ return MAXLEN. */
+#if @GNULIB_STRNLEN@
+# if ! @HAVE_DECL_STRNLEN@
+extern size_t strnlen (char const *__string, size_t __maxlen)
+ __attribute__ ((__pure__));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strnlen
+# define strnlen(a,n) \
+ (GL_LINK_WARNING ("strnlen is unportable - " \
+ "use gnulib module strnlen for portability"), \
+ strnlen (a, n))
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strcspn() assumes the second argument is a list of single-byte characters.
+ Even in this simple case, it does not work with multibyte strings if the
+ locale encoding is GB18030 and one of the characters to be searched is a
+ digit. */
+# undef strcspn
+# define strcspn(s,a) \
+ (GL_LINK_WARNING ("strcspn cannot work correctly on character strings " \
+ "in multibyte locales - " \
+ "use mbscspn if you care about internationalization"), \
+ strcspn (s, a))
+#endif
+
+/* Find the first occurrence in S of any character in ACCEPT. */
+#if @GNULIB_STRPBRK@
+# if ! @HAVE_STRPBRK@
+extern char *strpbrk (char const *__s, char const *__accept)
+ __attribute__ ((__pure__));
+# endif
+# if defined GNULIB_POSIXCHECK
+/* strpbrk() assumes the second argument is a list of single-byte characters.
+ Even in this simple case, it does not work with multibyte strings if the
+ locale encoding is GB18030 and one of the characters to be searched is a
+ digit. */
+# undef strpbrk
+# define strpbrk(s,a) \
+ (GL_LINK_WARNING ("strpbrk cannot work correctly on character strings " \
+ "in multibyte locales - " \
+ "use mbspbrk if you care about internationalization"), \
+ strpbrk (s, a))
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strpbrk
+# define strpbrk(s,a) \
+ (GL_LINK_WARNING ("strpbrk is unportable - " \
+ "use gnulib module strpbrk for portability"), \
+ strpbrk (s, a))
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strspn() assumes the second argument is a list of single-byte characters.
+ Even in this simple case, it cannot work with multibyte strings. */
+# undef strspn
+# define strspn(s,a) \
+ (GL_LINK_WARNING ("strspn cannot work correctly on character strings " \
+ "in multibyte locales - " \
+ "use mbsspn if you care about internationalization"), \
+ strspn (s, a))
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strrchr() does not work with multibyte strings if the locale encoding is
+ GB18030 and the character to be searched is a digit. */
+# undef strrchr
+# define strrchr(s,c) \
+ (GL_LINK_WARNING ("strrchr cannot work correctly on character strings " \
+ "in some multibyte locales - " \
+ "use mbsrchr if you care about internationalization"), \
+ strrchr (s, c))
+#endif
+
+/* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
+ If one is found, overwrite it with a NUL, and advance *STRINGP
+ to point to the next char after it. Otherwise, set *STRINGP to NULL.
+ If *STRINGP was already NULL, nothing happens.
+ Return the old value of *STRINGP.
+
+ This is a variant of strtok() that is multithread-safe and supports
+ empty fields.
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+ Caveat: It doesn't work with multibyte strings unless all of the delimiter
+ characters are ASCII characters < 0x30.
+
+ See also strtok_r(). */
+#if @GNULIB_STRSEP@
+# if ! @HAVE_STRSEP@
+extern char *strsep (char **restrict __stringp, char const *restrict __delim);
+# endif
+# if defined GNULIB_POSIXCHECK
+# undef strsep
+# define strsep(s,d) \
+ (GL_LINK_WARNING ("strsep cannot work correctly on character strings " \
+ "in multibyte locales - " \
+ "use mbssep if you care about internationalization"), \
+ strsep (s, d))
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strsep
+# define strsep(s,d) \
+ (GL_LINK_WARNING ("strsep is unportable - " \
+ "use gnulib module strsep for portability"), \
+ strsep (s, d))
+#endif
+
+#if @GNULIB_STRSTR@
+# if @REPLACE_STRSTR@
+# define strstr rpl_strstr
+char *strstr (const char *haystack, const char *needle)
+ __attribute__ ((__pure__));
+# endif
+#elif defined GNULIB_POSIXCHECK
+/* strstr() does not work with multibyte strings if the locale encoding is
+ different from UTF-8:
+ POSIX says that it operates on "strings", and "string" in POSIX is defined
+ as a sequence of bytes, not of characters. */
+# undef strstr
+# define strstr(a,b) \
+ (GL_LINK_WARNING ("strstr is quadratic on many systems, and cannot " \
+ "work correctly on character strings in most " \
+ "multibyte locales - " \
+ "use mbsstr if you care about internationalization, " \
+ "or use strstr if you care about speed"), \
+ strstr (a, b))
+#endif
+
+/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
+ comparison. */
+#if @GNULIB_STRCASESTR@
+# if @REPLACE_STRCASESTR@
+# define strcasestr rpl_strcasestr
+# endif
+# if ! @HAVE_STRCASESTR@ || @REPLACE_STRCASESTR@
+extern char *strcasestr (const char *haystack, const char *needle)
+ __attribute__ ((__pure__));
+# endif
+#elif defined GNULIB_POSIXCHECK
+/* strcasestr() does not work with multibyte strings:
+ It is a glibc extension, and glibc implements it only for unibyte
+ locales. */
+# undef strcasestr
+# define strcasestr(a,b) \
+ (GL_LINK_WARNING ("strcasestr does work correctly on character strings " \
+ "in multibyte locales - " \
+ "use mbscasestr if you care about " \
+ "internationalization, or use c-strcasestr if you want " \
+ "a locale independent function"), \
+ strcasestr (a, b))
+#endif
+
+/* Parse S into tokens separated by characters in DELIM.
+ If S is NULL, the saved pointer in SAVE_PTR is used as
+ the next starting point. For example:
+ char s[] = "-abc-=-def";
+ char *sp;
+ x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
+ x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
+ x = strtok_r(NULL, "=", &sp); // x = NULL
+ // s = "abc\0-def\0"
+
+ This is a variant of strtok() that is multithread-safe.
+
+ For the POSIX documentation for this function, see:
+ http://www.opengroup.org/susv3xsh/strtok.html
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+ Caveat: It doesn't work with multibyte strings unless all of the delimiter
+ characters are ASCII characters < 0x30.
+
+ See also strsep(). */
+#if @GNULIB_STRTOK_R@
+# if ! @HAVE_DECL_STRTOK_R@
+extern char *strtok_r (char *restrict s, char const *restrict delim,
+ char **restrict save_ptr);
+# endif
+# if defined GNULIB_POSIXCHECK
+# undef strtok_r
+# define strtok_r(s,d,p) \
+ (GL_LINK_WARNING ("strtok_r cannot work correctly on character strings " \
+ "in multibyte locales - " \
+ "use mbstok_r if you care about internationalization"), \
+ strtok_r (s, d, p))
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtok_r
+# define strtok_r(s,d,p) \
+ (GL_LINK_WARNING ("strtok_r is unportable - " \
+ "use gnulib module strtok_r for portability"), \
+ strtok_r (s, d, p))
+#endif
+
+
+/* The following functions are not specified by POSIX. They are gnulib
+ extensions. */
+
+#if @GNULIB_MBSLEN@
+/* Return the number of multibyte characters in the character string STRING.
+ This considers multibyte characters, unlike strlen, which counts bytes. */
+extern size_t mbslen (const char *string);
+#endif
+
+#if @GNULIB_MBSNLEN@
+/* Return the number of multibyte characters in the character string starting
+ at STRING and ending at STRING + LEN. */
+extern size_t mbsnlen (const char *string, size_t len);
+#endif
+
+#if @GNULIB_MBSCHR@
+/* Locate the first single-byte character C in the character string STRING,
+ and return a pointer to it. Return NULL if C is not found in STRING.
+ Unlike strchr(), this function works correctly in multibyte locales with
+ encodings such as GB18030. */
+# define mbschr rpl_mbschr /* avoid collision with HP-UX function */
+extern char * mbschr (const char *string, int c);
+#endif
+
+#if @GNULIB_MBSRCHR@
+/* Locate the last single-byte character C in the character string STRING,
+ and return a pointer to it. Return NULL if C is not found in STRING.
+ Unlike strrchr(), this function works correctly in multibyte locales with
+ encodings such as GB18030. */
+# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
+extern char * mbsrchr (const char *string, int c);
+#endif
+
+#if @GNULIB_MBSSTR@
+/* Find the first occurrence of the character string NEEDLE in the character
+ string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK.
+ Unlike strstr(), this function works correctly in multibyte locales with
+ encodings different from UTF-8. */
+extern char * mbsstr (const char *haystack, const char *needle);
+#endif
+
+#if @GNULIB_MBSCASECMP@
+/* Compare the character strings S1 and S2, ignoring case, returning less than,
+ equal to or greater than zero if S1 is lexicographically less than, equal to
+ or greater than S2.
+ Note: This function may, in multibyte locales, return 0 for strings of
+ different lengths!
+ Unlike strcasecmp(), this function works correctly in multibyte locales. */
+extern int mbscasecmp (const char *s1, const char *s2);
+#endif
+
+#if @GNULIB_MBSNCASECMP@
+/* Compare the initial segment of the character string S1 consisting of at most
+ N characters with the initial segment of the character string S2 consisting
+ of at most N characters, ignoring case, returning less than, equal to or
+ greater than zero if the initial segment of S1 is lexicographically less
+ than, equal to or greater than the initial segment of S2.
+ Note: This function may, in multibyte locales, return 0 for initial segments
+ of different lengths!
+ Unlike strncasecmp(), this function works correctly in multibyte locales.
+ But beware that N is not a byte count but a character count! */
+extern int mbsncasecmp (const char *s1, const char *s2, size_t n);
+#endif
+
+#if @GNULIB_MBSPCASECMP@
+/* Compare the initial segment of the character string STRING consisting of
+ at most mbslen (PREFIX) characters with the character string PREFIX,
+ ignoring case, returning less than, equal to or greater than zero if this
+ initial segment is lexicographically less than, equal to or greater than
+ PREFIX.
+ Note: This function may, in multibyte locales, return 0 if STRING is of
+ smaller length than PREFIX!
+ Unlike strncasecmp(), this function works correctly in multibyte
+ locales. */
+extern char * mbspcasecmp (const char *string, const char *prefix);
+#endif
+
+#if @GNULIB_MBSCASESTR@
+/* Find the first occurrence of the character string NEEDLE in the character
+ string HAYSTACK, using case-insensitive comparison.
+ Note: This function may, in multibyte locales, return success even if
+ strlen (haystack) < strlen (needle) !
+ Unlike strcasestr(), this function works correctly in multibyte locales. */
+extern char * mbscasestr (const char *haystack, const char *needle);
+#endif
+
+#if @GNULIB_MBSCSPN@
+/* Find the first occurrence in the character string STRING of any character
+ in the character string ACCEPT. Return the number of bytes from the
+ beginning of the string to this occurrence, or to the end of the string
+ if none exists.
+ Unlike strcspn(), this function works correctly in multibyte locales. */
+extern size_t mbscspn (const char *string, const char *accept);
+#endif
+
+#if @GNULIB_MBSPBRK@
+/* Find the first occurrence in the character string STRING of any character
+ in the character string ACCEPT. Return the pointer to it, or NULL if none
+ exists.
+ Unlike strpbrk(), this function works correctly in multibyte locales. */
+# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
+extern char * mbspbrk (const char *string, const char *accept);
+#endif
+
+#if @GNULIB_MBSSPN@
+/* Find the first occurrence in the character string STRING of any character
+ not in the character string REJECT. Return the number of bytes from the
+ beginning of the string to this occurrence, or to the end of the string
+ if none exists.
+ Unlike strspn(), this function works correctly in multibyte locales. */
+extern size_t mbsspn (const char *string, const char *reject);
+#endif
+
+#if @GNULIB_MBSSEP@
+/* Search the next delimiter (multibyte character listed in the character
+ string DELIM) starting at the character string *STRINGP.
+ If one is found, overwrite it with a NUL, and advance *STRINGP to point
+ to the next multibyte character after it. Otherwise, set *STRINGP to NULL.
+ If *STRINGP was already NULL, nothing happens.
+ Return the old value of *STRINGP.
+
+ This is a variant of mbstok_r() that supports empty fields.
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+
+ See also mbstok_r(). */
+extern char * mbssep (char **stringp, const char *delim);
+#endif
+
+#if @GNULIB_MBSTOK_R@
+/* Parse the character string STRING into tokens separated by characters in
+ the character string DELIM.
+ If STRING is NULL, the saved pointer in SAVE_PTR is used as
+ the next starting point. For example:
+ char s[] = "-abc-=-def";
+ char *sp;
+ x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def"
+ x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL
+ x = mbstok_r(NULL, "=", &sp); // x = NULL
+ // s = "abc\0-def\0"
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+
+ See also mbssep(). */
+extern char * mbstok_r (char *string, const char *delim, char **save_ptr);
+#endif
+
+/* Map any int, typically from errno, into an error message. */
+#if @GNULIB_STRERROR@
+# if @REPLACE_STRERROR@
+# undef strerror
+# define strerror rpl_strerror
+extern char *strerror (int);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strerror
+# define strerror(e) \
+ (GL_LINK_WARNING ("strerror is unportable - " \
+ "use gnulib module strerror to guarantee non-NULL result"), \
+ strerror (e))
+#endif
+
+#if @GNULIB_STRSIGNAL@
+# if @REPLACE_STRSIGNAL@
+# define strsignal rpl_strsignal
+# endif
+# if ! @HAVE_DECL_STRSIGNAL@ || @REPLACE_STRSIGNAL@
+extern char *strsignal (int __sig);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strsignal
+# define strsignal(a) \
+ (GL_LINK_WARNING ("strsignal is unportable - " \
+ "use gnulib module strsignal for portability"), \
+ strsignal (a))
+#endif
+
+#if @GNULIB_STRVERSCMP@
+# if !@HAVE_STRVERSCMP@
+extern int strverscmp (const char *, const char *);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strverscmp
+# define strverscmp(a, b) \
+ (GL_LINK_WARNING ("strverscmp is unportable - " \
+ "use gnulib module strverscmp for portability"), \
+ strverscmp (a, b))
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_STRING_H */
+#endif /* _GL_STRING_H */
diff --git a/lib/strverscmp.c b/lib/strverscmp.c
index 5af38ef..6bfda3b 100644
--- a/lib/strverscmp.c
+++ b/lib/strverscmp.c
@@ -1,24 +1,25 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Compare strings while treating digits characters numerically.
- Copyright (C) 1997, 2000, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2002, 2004, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Jean-Franois Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
+ Contributed by Jean-François Bignolles <bignolle@ecoledoc.ibp.fr>, 1997.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ 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. */
-#if HAVE_CONFIG_H
+#if !_LIBC
# include <config.h>
#endif
@@ -38,13 +39,13 @@
/* ISDIGIT differs from isdigit, as follows:
- - Its arg may be any int or unsigned int; it need not be an unsigned char.
- - It's guaranteed to evaluate its argument exactly once.
+ - Its arg may be any int or unsigned int; it need not be an unsigned char
+ or EOF.
- It's typically faster.
POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to
- ISDIGIT_LOCALE unless it's important to use the locale's definition
+ isdigit unless it's important to use the locale's definition
of `digit' even when the host does not conform to POSIX. */
-#define ISDIGIT(c) ((unsigned) (c) - '0' <= 9)
+#define ISDIGIT(c) ((unsigned int) (c) - '0' <= 9)
#undef __strverscmp
#undef strverscmp
diff --git a/lib/strverscmp.h b/lib/strverscmp.h
deleted file mode 100644
index bb1ea1b..0000000
--- a/lib/strverscmp.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* strverscmp.h -- compare strings holding indices/version numbers */
-
-#ifndef STRVERSCMP_H_
-# define STRVERSCMP_H_
-
-# if HAVE_CONFIG_H
-# include <config.h>
-# endif
-
-# ifndef PARAMS
-# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
-# define PARAMS(Args) Args
-# else
-# define PARAMS(Args) ()
-# endif
-# endif
-
-int strverscmp PARAMS ((const char*, const char*));
-
-#endif /* not STRVERSCMP_H_ */
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
new file mode 100644
index 0000000..ff42af7
--- /dev/null
+++ b/lib/sys_stat.in.h
@@ -0,0 +1,363 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Provide a more complete sys/stat header file.
+ Copyright (C) 2005-2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */
+
+/* This file is supposed to be used on platforms where <sys/stat.h> is
+ incomplete. It is intended to provide definitions and prototypes
+ needed by an application. Start with what the system provides. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_system_sys_stat_h
+/* Special invocation convention. */
+
+#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_SYS_STAT_H
+
+/* Get nlink_t. */
+#include <sys/types.h>
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
+
+#ifndef _GL_SYS_STAT_H
+#define _GL_SYS_STAT_H
+
+/* The definition of GL_LINK_WARNING is copied here. */
+
+/* Before doing "#define mkdir rpl_mkdir" below, we need to include all
+ headers that may declare mkdir(). */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <io.h>
+#endif
+
+#ifndef S_IFMT
+# define S_IFMT 0170000
+#endif
+
+#if STAT_MACROS_BROKEN
+# undef S_ISBLK
+# undef S_ISCHR
+# undef S_ISDIR
+# undef S_ISFIFO
+# undef S_ISLNK
+# undef S_ISNAM
+# undef S_ISMPB
+# undef S_ISMPC
+# undef S_ISNWK
+# undef S_ISREG
+# undef S_ISSOCK
+#endif
+
+#ifndef S_ISBLK
+# ifdef S_IFBLK
+# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+# else
+# define S_ISBLK(m) 0
+# endif
+#endif
+
+#ifndef S_ISCHR
+# ifdef S_IFCHR
+# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+# else
+# define S_ISCHR(m) 0
+# endif
+#endif
+
+#ifndef S_ISDIR
+# ifdef S_IFDIR
+# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+# else
+# define S_ISDIR(m) 0
+# endif
+#endif
+
+#ifndef S_ISDOOR /* Solaris 2.5 and up */
+# define S_ISDOOR(m) 0
+#endif
+
+#ifndef S_ISFIFO
+# ifdef S_IFIFO
+# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+# else
+# define S_ISFIFO(m) 0
+# endif
+#endif
+
+#ifndef S_ISLNK
+# ifdef S_IFLNK
+# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+# else
+# define S_ISLNK(m) 0
+# endif
+#endif
+
+#ifndef S_ISMPB /* V7 */
+# ifdef S_IFMPB
+# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
+# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
+# else
+# define S_ISMPB(m) 0
+# define S_ISMPC(m) 0
+# endif
+#endif
+
+#ifndef S_ISNAM /* Xenix */
+# ifdef S_IFNAM
+# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
+# else
+# define S_ISNAM(m) 0
+# endif
+#endif
+
+#ifndef S_ISNWK /* HP/UX */
+# ifdef S_IFNWK
+# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
+# else
+# define S_ISNWK(m) 0
+# endif
+#endif
+
+#ifndef S_ISPORT /* Solaris 10 and up */
+# define S_ISPORT(m) 0
+#endif
+
+#ifndef S_ISREG
+# ifdef S_IFREG
+# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+# else
+# define S_ISREG(m) 0
+# endif
+#endif
+
+#ifndef S_ISSOCK
+# ifdef S_IFSOCK
+# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+# else
+# define S_ISSOCK(m) 0
+# endif
+#endif
+
+
+#ifndef S_TYPEISMQ
+# define S_TYPEISMQ(p) 0
+#endif
+
+#ifndef S_TYPEISTMO
+# define S_TYPEISTMO(p) 0
+#endif
+
+
+#ifndef S_TYPEISSEM
+# ifdef S_INSEM
+# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
+# else
+# define S_TYPEISSEM(p) 0
+# endif
+#endif
+
+#ifndef S_TYPEISSHM
+# ifdef S_INSHD
+# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
+# else
+# define S_TYPEISSHM(p) 0
+# endif
+#endif
+
+/* high performance ("contiguous data") */
+#ifndef S_ISCTG
+# define S_ISCTG(p) 0
+#endif
+
+/* Cray DMF (data migration facility): off line, with data */
+#ifndef S_ISOFD
+# define S_ISOFD(p) 0
+#endif
+
+/* Cray DMF (data migration facility): off line, with no data */
+#ifndef S_ISOFL
+# define S_ISOFL(p) 0
+#endif
+
+/* 4.4BSD whiteout */
+#ifndef S_ISWHT
+# define S_ISWHT(m) 0
+#endif
+
+/* If any of the following are undefined,
+ define them to their de facto standard values. */
+#if !S_ISUID
+# define S_ISUID 04000
+#endif
+#if !S_ISGID
+# define S_ISGID 02000
+#endif
+
+/* S_ISVTX is a common extension to POSIX. */
+#ifndef S_ISVTX
+# define S_ISVTX 01000
+#endif
+
+#if !S_IRUSR && S_IREAD
+# define S_IRUSR S_IREAD
+#endif
+#if !S_IRUSR
+# define S_IRUSR 00400
+#endif
+#if !S_IRGRP
+# define S_IRGRP (S_IRUSR >> 3)
+#endif
+#if !S_IROTH
+# define S_IROTH (S_IRUSR >> 6)
+#endif
+
+#if !S_IWUSR && S_IWRITE
+# define S_IWUSR S_IWRITE
+#endif
+#if !S_IWUSR
+# define S_IWUSR 00200
+#endif
+#if !S_IWGRP
+# define S_IWGRP (S_IWUSR >> 3)
+#endif
+#if !S_IWOTH
+# define S_IWOTH (S_IWUSR >> 6)
+#endif
+
+#if !S_IXUSR && S_IEXEC
+# define S_IXUSR S_IEXEC
+#endif
+#if !S_IXUSR
+# define S_IXUSR 00100
+#endif
+#if !S_IXGRP
+# define S_IXGRP (S_IXUSR >> 3)
+#endif
+#if !S_IXOTH
+# define S_IXOTH (S_IXUSR >> 6)
+#endif
+
+#if !S_IRWXU
+# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
+#endif
+#if !S_IRWXG
+# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
+#endif
+#if !S_IRWXO
+# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
+#endif
+
+/* S_IXUGO is a common extension to POSIX. */
+#if !S_IXUGO
+# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
+#endif
+
+#ifndef S_IRWXUGO
+# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if @GNULIB_LSTAT@
+# if ! @HAVE_LSTAT@
+/* mingw does not support symlinks, therefore it does not have lstat. But
+ without links, stat does just fine. */
+# define lstat stat
+# elif @REPLACE_LSTAT@
+# undef lstat
+# define lstat rpl_lstat
+extern int rpl_lstat (const char *name, struct stat *buf);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lstat
+# define lstat(p,b) \
+ (GL_LINK_WARNING ("lstat is unportable - " \
+ "use gnulib module lstat for portability"), \
+ lstat (p, b))
+#endif
+
+
+#if @REPLACE_MKDIR@
+# undef mkdir
+# define mkdir rpl_mkdir
+extern int mkdir (char const *name, mode_t mode);
+#else
+/* 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 <io.h>, which is included above. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+static inline int
+rpl_mkdir (char const *name, mode_t mode)
+{
+ return _mkdir (name);
+}
+
+# define mkdir rpl_mkdir
+# endif
+#endif
+
+
+/* Declare BSD extensions. */
+
+#if @GNULIB_LCHMOD@
+/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
+ denotes a symbolic link. */
+# if !@HAVE_LCHMOD@
+/* The lchmod replacement follows symbolic links. Callers should take
+ this into account; lchmod should be applied only to arguments that
+ are known to not be symbolic links. On hosts that lack lchmod,
+ this can lead to race conditions between the check and the
+ invocation of lchmod, but we know of no workarounds that are
+ reliable in general. You might try requesting support for lchmod
+ from your operating system supplier. */
+# define lchmod chmod
+# endif
+# if 0 /* assume already declared */
+extern int lchmod (const char *filename, mode_t mode);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lchmod
+# define lchmod(f,m) \
+ (GL_LINK_WARNING ("lchmod is unportable - " \
+ "use gnulib module lchmod for portability"), \
+ lchmod (f, m))
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _GL_SYS_STAT_H */
+#endif /* _GL_SYS_STAT_H */
+#endif
diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h
new file mode 100644
index 0000000..6db7ba8
--- /dev/null
+++ b/lib/sys_time.in.h
@@ -0,0 +1,66 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Provide a more complete sys/time.h.
+
+ Copyright (C) 2007-2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Paul Eggert. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined _GL_SYS_TIME_H
+
+/* Simply delegate to the system's header, without adding anything. */
+# if @HAVE_SYS_TIME_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+# endif
+
+#else
+
+# define _GL_SYS_TIME_H
+
+# if @HAVE_SYS_TIME_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+# else
+# include <time.h>
+# endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+# if ! @HAVE_STRUCT_TIMEVAL@
+struct timeval
+{
+ time_t tv_sec;
+ long int tv_usec;
+};
+# endif
+
+# if @REPLACE_GETTIMEOFDAY@
+# undef gettimeofday
+# define gettimeofday rpl_gettimeofday
+int gettimeofday (struct timeval *restrict, void *restrict);
+# endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_SYS_TIME_H */
diff --git a/lib/tempname.c b/lib/tempname.c
new file mode 100644
index 0000000..5a3a326
--- /dev/null
+++ b/lib/tempname.c
@@ -0,0 +1,314 @@
+/* tempname.c - generate the name of a temporary file.
+
+ Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Extracted from glibc sysdeps/posix/tempname.c. See also tmpdir.c. */
+
+#if !_LIBC
+# include <config.h>
+# include "tempname.h"
+#endif
+
+#include <sys/types.h>
+#include <assert.h>
+
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
+
+#include <stdio.h>
+#ifndef P_tmpdir
+# define P_tmpdir "/tmp"
+#endif
+#ifndef TMP_MAX
+# define TMP_MAX 238328
+#endif
+#ifndef __GT_FILE
+# define __GT_FILE 0
+# define __GT_BIGFILE 1
+# define __GT_DIR 2
+# define __GT_NOCREATE 3
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <fcntl.h>
+#include <sys/time.h>
+#include <stdint.h>
+#include <unistd.h>
+
+#include <sys/stat.h>
+
+#if _LIBC
+# define struct_stat64 struct stat64
+# define small_open __open
+# define large_open __open64
+#else
+# define struct_stat64 struct stat
+# define small_open open
+# define large_open open
+# define __gen_tempname gen_tempname
+# define __getpid getpid
+# define __gettimeofday gettimeofday
+# define __mkdir mkdir
+# define __lxstat64(version, file, buf) lstat (file, buf)
+# define __xstat64(version, file, buf) stat (file, buf)
+#endif
+
+#if ! (HAVE___SECURE_GETENV || _LIBC)
+# define __secure_getenv getenv
+#endif
+
+#ifdef _LIBC
+# include <hp-timing.h>
+# if HP_TIMING_AVAIL
+# define RANDOM_BITS(Var) \
+ if (__builtin_expect (value == UINT64_C (0), 0)) \
+ { \
+ /* If this is the first time this function is used initialize \
+ the variable we accumulate the value in to some somewhat \
+ random value. If we'd not do this programs at startup time \
+ might have a reduced set of possible names, at least on slow \
+ machines. */ \
+ struct timeval tv; \
+ __gettimeofday (&tv, NULL); \
+ value = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; \
+ } \
+ HP_TIMING_NOW (Var)
+# endif
+#endif
+
+/* Use the widest available unsigned type if uint64_t is not
+ available. The algorithm below extracts a number less than 62**6
+ (approximately 2**35.725) from uint64_t, so ancient hosts where
+ uintmax_t is only 32 bits lose about 3.725 bits of randomness,
+ which is better than not having mkstemp at all. */
+#if !defined UINT64_MAX && !defined uint64_t
+# define uint64_t uintmax_t
+#endif
+
+#if _LIBC
+/* Return nonzero if DIR is an existent directory. */
+static int
+direxists (const char *dir)
+{
+ struct_stat64 buf;
+ return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode);
+}
+
+/* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is
+ non-null and exists, uses it; otherwise uses the first of $TMPDIR,
+ P_tmpdir, /tmp that exists. Copies into TMPL a template suitable
+ for use with mk[s]temp. Will fail (-1) if DIR is non-null and
+ doesn't exist, none of the searched dirs exists, or there's not
+ enough space in TMPL. */
+int
+__path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
+ int try_tmpdir)
+{
+ const char *d;
+ size_t dlen, plen;
+
+ if (!pfx || !pfx[0])
+ {
+ pfx = "file";
+ plen = 4;
+ }
+ else
+ {
+ plen = strlen (pfx);
+ if (plen > 5)
+ plen = 5;
+ }
+
+ if (try_tmpdir)
+ {
+ d = __secure_getenv ("TMPDIR");
+ if (d != NULL && direxists (d))
+ dir = d;
+ else if (dir != NULL && direxists (dir))
+ /* nothing */ ;
+ else
+ dir = NULL;
+ }
+ if (dir == NULL)
+ {
+ if (direxists (P_tmpdir))
+ dir = P_tmpdir;
+ else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
+ dir = "/tmp";
+ else
+ {
+ __set_errno (ENOENT);
+ return -1;
+ }
+ }
+
+ dlen = strlen (dir);
+ while (dlen > 1 && dir[dlen - 1] == '/')
+ dlen--; /* remove trailing slashes */
+
+ /* check we have room for "${dir}/${pfx}XXXXXX\0" */
+ if (tmpl_len < dlen + 1 + plen + 6 + 1)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx);
+ return 0;
+}
+#endif /* _LIBC */
+
+/* These are the characters used in temporary file names. */
+static const char letters[] =
+"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+
+/* Generate a temporary file name based on TMPL. TMPL must match the
+ rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed
+ does not exist at the time of the call to __gen_tempname. TMPL is
+ overwritten with the result.
+
+ KIND may be one of:
+ __GT_NOCREATE: simply verify that the name does not exist
+ at the time of the call.
+ __GT_FILE: create the file using open(O_CREAT|O_EXCL)
+ and return a read-write fd. The file is mode 0600.
+ __GT_BIGFILE: same as __GT_FILE but use open64().
+ __GT_DIR: create a directory, which will be mode 0700.
+
+ We use a clever algorithm to get hard-to-predict names. */
+int
+__gen_tempname (char *tmpl, int kind)
+{
+ int len;
+ char *XXXXXX;
+ static uint64_t value;
+ uint64_t random_time_bits;
+ unsigned int count;
+ int fd = -1;
+ int save_errno = errno;
+ struct_stat64 st;
+
+ /* A lower bound on the number of temporary files to attempt to
+ generate. The maximum total number of temporary file names that
+ can exist for a given template is 62**6. It should never be
+ necessary to try all these combinations. Instead if a reasonable
+ number of names is tried (we define reasonable as 62**3) fail to
+ give the system administrator the chance to remove the problems. */
+#define ATTEMPTS_MIN (62 * 62 * 62)
+
+ /* The number of times to attempt to generate a temporary file. To
+ conform to POSIX, this must be no smaller than TMP_MAX. */
+#if ATTEMPTS_MIN < TMP_MAX
+ unsigned int attempts = TMP_MAX;
+#else
+ unsigned int attempts = ATTEMPTS_MIN;
+#endif
+
+ len = strlen (tmpl);
+ if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX"))
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ /* This is where the Xs start. */
+ XXXXXX = &tmpl[len - 6];
+
+ /* Get some more or less random data. */
+#ifdef RANDOM_BITS
+ RANDOM_BITS (random_time_bits);
+#else
+ {
+ struct timeval tv;
+ __gettimeofday (&tv, NULL);
+ random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec;
+ }
+#endif
+ value += random_time_bits ^ __getpid ();
+
+ for (count = 0; count < attempts; value += 7777, ++count)
+ {
+ uint64_t v = value;
+
+ /* Fill in the random bits. */
+ XXXXXX[0] = letters[v % 62];
+ v /= 62;
+ XXXXXX[1] = letters[v % 62];
+ v /= 62;
+ XXXXXX[2] = letters[v % 62];
+ v /= 62;
+ XXXXXX[3] = letters[v % 62];
+ v /= 62;
+ XXXXXX[4] = letters[v % 62];
+ v /= 62;
+ XXXXXX[5] = letters[v % 62];
+
+ switch (kind)
+ {
+ case __GT_FILE:
+ fd = small_open (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+ break;
+
+ case __GT_BIGFILE:
+ fd = large_open (tmpl, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+ break;
+
+ case __GT_DIR:
+ fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
+ break;
+
+ case __GT_NOCREATE:
+ /* This case is backward from the other three. __gen_tempname
+ succeeds if __xstat fails because the name does not exist.
+ Note the continue to bypass the common logic at the bottom
+ of the loop. */
+ if (__lxstat64 (_STAT_VER, tmpl, &st) < 0)
+ {
+ if (errno == ENOENT)
+ {
+ __set_errno (save_errno);
+ return 0;
+ }
+ else
+ /* Give up now. */
+ return -1;
+ }
+ continue;
+
+ default:
+ assert (! "invalid KIND in __gen_tempname");
+ }
+
+ if (fd >= 0)
+ {
+ __set_errno (save_errno);
+ return fd;
+ }
+ else if (errno != EEXIST)
+ return -1;
+ }
+
+ /* We got out of the loop because we ran out of combinations to try. */
+ __set_errno (EEXIST);
+ return -1;
+}
diff --git a/lib/tempname.h b/lib/tempname.h
new file mode 100644
index 0000000..74da03b
--- /dev/null
+++ b/lib/tempname.h
@@ -0,0 +1,39 @@
+/* Create a temporary file or directory.
+
+ Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* header written by Eric Blake */
+
+/* In gnulib, always prefer large files. GT_FILE maps to
+ __GT_BIGFILE, not __GT_FILE, for a reason. */
+#define GT_FILE 1
+#define GT_DIR 2
+#define GT_NOCREATE 3
+
+/* Generate a temporary file name based on TMPL. TMPL must match the
+ rules for mk[s]temp (i.e. end in "XXXXXX"). The name constructed
+ does not exist at the time of the call to gen_tempname. TMPL is
+ overwritten with the result.
+
+ KIND may be one of:
+ GT_NOCREATE: simply verify that the name does not exist
+ at the time of the call.
+ GT_FILE: create a large file using open(O_CREAT|O_EXCL)
+ and return a read-write fd. The file is mode 0600.
+ GT_DIR: create a directory, which will be mode 0700.
+
+ We use a clever algorithm to get hard-to-predict names. */
+extern int gen_tempname (char *tmpl, int kind);
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
new file mode 100644
index 0000000..d5900a8
--- /dev/null
+++ b/lib/unistd.in.h
@@ -0,0 +1,580 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Substitute for and wrapper around <unistd.h>.
+ Copyright (C) 2003-2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU 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. */
+
+#ifndef _GL_UNISTD_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_UNISTD_H@
+# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
+#endif
+
+#ifndef _GL_UNISTD_H
+#define _GL_UNISTD_H
+
+/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
+#if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET)
+# include <stdio.h>
+#endif
+
+/* mingw fails to declare _exit in <unistd.h>. */
+/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
+#include <stdlib.h>
+
+#if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
+/* Get ssize_t. */
+# include <sys/types.h>
+#endif
+
+#if @GNULIB_GETHOSTNAME@
+/* Get all possible declarations of gethostname(). */
+# if @UNISTD_H_HAVE_WINSOCK2_H@
+# include <winsock2.h>
+# if !defined _GL_SYS_SOCKET_H
+# undef socket
+# define socket socket_used_without_including_sys_socket_h
+# undef connect
+# define connect connect_used_without_including_sys_socket_h
+# undef accept
+# define accept accept_used_without_including_sys_socket_h
+# undef bind
+# define bind bind_used_without_including_sys_socket_h
+# undef getpeername
+# define getpeername getpeername_used_without_including_sys_socket_h
+# undef getsockname
+# define getsockname getsockname_used_without_including_sys_socket_h
+# undef getsockopt
+# define getsockopt getsockopt_used_without_including_sys_socket_h
+# undef listen
+# define listen listen_used_without_including_sys_socket_h
+# undef recv
+# define recv recv_used_without_including_sys_socket_h
+# undef send
+# define send send_used_without_including_sys_socket_h
+# undef recvfrom
+# define recvfrom recvfrom_used_without_including_sys_socket_h
+# undef sendto
+# define sendto sendto_used_without_including_sys_socket_h
+# undef setsockopt
+# define setsockopt setsockopt_used_without_including_sys_socket_h
+# undef shutdown
+# define shutdown shutdown_used_without_including_sys_socket_h
+# endif
+# if !defined _GL_SYS_SELECT_H
+# undef select
+# define select select_used_without_including_sys_select_h
+# endif
+# endif
+#endif
+
+/* The definition of GL_LINK_WARNING is copied here. */
+
+
+/* OS/2 EMX lacks these macros. */
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+/* Declare overridden functions. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if @GNULIB_CHOWN@
+# if @REPLACE_CHOWN@
+# ifndef REPLACE_CHOWN
+# define REPLACE_CHOWN 1
+# endif
+# if REPLACE_CHOWN
+/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
+ to GID (if GID is not -1). Follow symbolic links.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/chown.html>. */
+# define chown rpl_chown
+extern int chown (const char *file, uid_t uid, gid_t gid);
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef chown
+# define chown(f,u,g) \
+ (GL_LINK_WARNING ("chown fails to follow symlinks on some systems and " \
+ "doesn't treat a uid or gid of -1 on some systems - " \
+ "use gnulib module chown for portability"), \
+ chown (f, u, g))
+#endif
+
+
+#if @GNULIB_CLOSE@
+# if @REPLACE_CLOSE@
+/* Automatically included by modules that need a replacement for close. */
+# undef close
+# define close rpl_close
+extern int close (int);
+# endif
+#elif @UNISTD_H_HAVE_WINSOCK2_H@
+# undef close
+# define close close_used_without_requesting_gnulib_module_close
+#elif defined GNULIB_POSIXCHECK
+# undef close
+# define close(f) \
+ (GL_LINK_WARNING ("close does not portably work on sockets - " \
+ "use gnulib module close for portability"), \
+ close (f))
+#endif
+
+
+#if @GNULIB_DUP2@
+# if !@HAVE_DUP2@
+/* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if
+ NEWFD = OLDFD, otherwise close NEWFD first if it is open.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/dup2.html>. */
+extern int dup2 (int oldfd, int newfd);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef dup2
+# define dup2(o,n) \
+ (GL_LINK_WARNING ("dup2 is unportable - " \
+ "use gnulib module dup2 for portability"), \
+ dup2 (o, n))
+#endif
+
+
+#if @GNULIB_ENVIRON@
+# if !@HAVE_DECL_ENVIRON@
+/* Set of environment variables and values. An array of strings of the form
+ "VARIABLE=VALUE", terminated with a NULL. */
+# if defined __APPLE__ && defined __MACH__
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron ())
+# else
+extern char **environ;
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef environ
+# define environ \
+ (GL_LINK_WARNING ("environ is unportable - " \
+ "use gnulib module environ for portability"), \
+ environ)
+#endif
+
+
+#if @GNULIB_EUIDACCESS@
+# if !@HAVE_EUIDACCESS@
+/* Like access(), except that is uses the effective user id and group id of
+ the current process. */
+extern int euidaccess (const char *filename, int mode);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef euidaccess
+# define euidaccess(f,m) \
+ (GL_LINK_WARNING ("euidaccess is unportable - " \
+ "use gnulib module euidaccess for portability"), \
+ euidaccess (f, m))
+#endif
+
+
+#if @GNULIB_FCHDIR@
+# if @REPLACE_FCHDIR@
+
+/* Change the process' current working directory to the directory on which
+ the given file descriptor is open.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/fchdir.html>. */
+extern int fchdir (int /*fd*/);
+
+# define dup rpl_dup
+extern int dup (int);
+# define dup2 rpl_dup2
+extern int dup2 (int, int);
+
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fchdir
+# define fchdir(f) \
+ (GL_LINK_WARNING ("fchdir is unportable - " \
+ "use gnulib module fchdir for portability"), \
+ fchdir (f))
+#endif
+
+
+#if @GNULIB_FSYNC@
+/* Synchronize changes to a file.
+ Return 0 if successful, otherwise -1 and errno set.
+ See POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/fsync.html>. */
+# if !@HAVE_FSYNC@
+extern int fsync (int fd);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fsync
+# define fsync(fd) \
+ (GL_LINK_WARNING ("fsync is unportable - " \
+ "use gnulib module fsync for portability"), \
+ fsync (fd))
+#endif
+
+
+#if @GNULIB_FTRUNCATE@
+# if !@HAVE_FTRUNCATE@
+/* Change the size of the file to which FD is opened to become equal to LENGTH.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/ftruncate.html>. */
+extern int ftruncate (int fd, off_t length);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef ftruncate
+# define ftruncate(f,l) \
+ (GL_LINK_WARNING ("ftruncate is unportable - " \
+ "use gnulib module ftruncate for portability"), \
+ ftruncate (f, l))
+#endif
+
+
+#if @GNULIB_GETCWD@
+/* Include the headers that might declare getcwd so that they will not
+ cause confusion if included after this file. */
+# include <stdlib.h>
+# if @REPLACE_GETCWD@
+/* Get the name of the current working directory, and put it in SIZE bytes
+ of BUF.
+ Return BUF if successful, or NULL if the directory couldn't be determined
+ or SIZE was too small.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/getcwd.html>.
+ Additionally, the gnulib module 'getcwd' guarantees the following GNU
+ extension: If BUF is NULL, an array is allocated with 'malloc'; the array
+ is SIZE bytes long, unless SIZE == 0, in which case it is as big as
+ necessary. */
+# define getcwd rpl_getcwd
+extern char * getcwd (char *buf, size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getcwd
+# define getcwd(b,s) \
+ (GL_LINK_WARNING ("getcwd is unportable - " \
+ "use gnulib module getcwd for portability"), \
+ getcwd (b, s))
+#endif
+
+
+#if @GNULIB_GETDOMAINNAME@
+/* Return the NIS domain name of the machine.
+ WARNING! The NIS domain name is unrelated to the fully qualified host name
+ of the machine. It is also unrelated to email addresses.
+ WARNING! The NIS domain name is usually the empty string or "(none)" when
+ not using NIS.
+
+ Put up to LEN bytes of the NIS domain name into NAME.
+ Null terminate it if the name is shorter than LEN.
+ If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
+ Return 0 if successful, otherwise set errno and return -1. */
+# if !@HAVE_GETDOMAINNAME@
+extern int getdomainname(char *name, size_t len);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getdomainname
+# define getdomainname(n,l) \
+ (GL_LINK_WARNING ("getdomainname is unportable - " \
+ "use gnulib module getdomainname for portability"), \
+ getdomainname (n, l))
+#endif
+
+
+#if @GNULIB_GETDTABLESIZE@
+# if !@HAVE_GETDTABLESIZE@
+/* Return the maximum number of file descriptors in the current process. */
+extern int getdtablesize (void);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getdtablesize
+# define getdtablesize() \
+ (GL_LINK_WARNING ("getdtablesize is unportable - " \
+ "use gnulib module getdtablesize for portability"), \
+ getdtablesize ())
+#endif
+
+
+#if @GNULIB_GETHOSTNAME@
+/* Return the standard host name of the machine.
+ WARNING! The host name may or may not be fully qualified.
+
+ Put up to LEN bytes of the host name into NAME.
+ Null terminate it if the name is shorter than LEN.
+ If the host name is longer than LEN, set errno = EINVAL and return -1.
+ Return 0 if successful, otherwise set errno and return -1. */
+# if @UNISTD_H_HAVE_WINSOCK2_H@
+# undef gethostname
+# define gethostname rpl_gethostname
+# endif
+# if @UNISTD_H_HAVE_WINSOCK2_H@ || !@HAVE_GETHOSTNAME@
+extern int gethostname(char *name, size_t len);
+# endif
+#elif @UNISTD_H_HAVE_WINSOCK2_H@
+# undef gethostname
+# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
+#elif defined GNULIB_POSIXCHECK
+# undef gethostname
+# define gethostname(n,l) \
+ (GL_LINK_WARNING ("gethostname is unportable - " \
+ "use gnulib module gethostname for portability"), \
+ gethostname (n, l))
+#endif
+
+
+#if @GNULIB_GETLOGIN_R@
+/* Copies the user's login name to NAME.
+ The array pointed to by NAME has room for SIZE bytes.
+
+ Returns 0 if successful. Upon error, an error number is returned, or -1 in
+ the case that the login name cannot be found but no specific error is
+ provided (this case is hopefully rare but is left open by the POSIX spec).
+
+ See <http://www.opengroup.org/susv3xsh/getlogin.html>.
+ */
+# if !@HAVE_DECL_GETLOGIN_R@
+# include <stddef.h>
+extern int getlogin_r (char *name, size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getlogin_r
+# define getlogin_r(n,s) \
+ (GL_LINK_WARNING ("getlogin_r is unportable - " \
+ "use gnulib module getlogin_r for portability"), \
+ getlogin_r (n, s))
+#endif
+
+
+#if @GNULIB_GETPAGESIZE@
+# if @REPLACE_GETPAGESIZE@
+# define getpagesize rpl_getpagesize
+extern int getpagesize (void);
+# elif !@HAVE_GETPAGESIZE@
+/* This is for POSIX systems. */
+# if !defined getpagesize && defined _SC_PAGESIZE
+# if ! (defined __VMS && __VMS_VER < 70000000)
+# define getpagesize() sysconf (_SC_PAGESIZE)
+# endif
+# endif
+/* This is for older VMS. */
+# if !defined getpagesize && defined __VMS
+# ifdef __ALPHA
+# define getpagesize() 8192
+# else
+# define getpagesize() 512
+# endif
+# endif
+/* This is for BeOS. */
+# if !defined getpagesize && @HAVE_OS_H@
+# include <OS.h>
+# if defined B_PAGE_SIZE
+# define getpagesize() B_PAGE_SIZE
+# endif
+# endif
+/* This is for AmigaOS4.0. */
+# if !defined getpagesize && defined __amigaos4__
+# define getpagesize() 2048
+# endif
+/* This is for older Unix systems. */
+# if !defined getpagesize && @HAVE_SYS_PARAM_H@
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else
+# ifdef NBPG
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif
+# define getpagesize() (NBPG * CLSIZE)
+# else
+# ifdef NBPC
+# define getpagesize() NBPC
+# endif
+# endif
+# endif
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getpagesize
+# define getpagesize() \
+ (GL_LINK_WARNING ("getpagesize is unportable - " \
+ "use gnulib module getpagesize for portability"), \
+ getpagesize ())
+#endif
+
+
+#if @GNULIB_GETUSERSHELL@
+# if !@HAVE_GETUSERSHELL@
+/* Return the next valid login shell on the system, or NULL when the end of
+ the list has been reached. */
+extern char *getusershell (void);
+/* Rewind to pointer that is advanced at each getusershell() call. */
+extern void setusershell (void);
+/* Free the pointer that is advanced at each getusershell() call and
+ associated resources. */
+extern void endusershell (void);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getusershell
+# define getusershell() \
+ (GL_LINK_WARNING ("getusershell is unportable - " \
+ "use gnulib module getusershell for portability"), \
+ getusershell ())
+# undef setusershell
+# define setusershell() \
+ (GL_LINK_WARNING ("setusershell is unportable - " \
+ "use gnulib module getusershell for portability"), \
+ setusershell ())
+# undef endusershell
+# define endusershell() \
+ (GL_LINK_WARNING ("endusershell is unportable - " \
+ "use gnulib module getusershell for portability"), \
+ endusershell ())
+#endif
+
+
+#if @GNULIB_LCHOWN@
+# if @REPLACE_LCHOWN@
+/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
+ to GID (if GID is not -1). Do not follow symbolic links.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/lchown.html>. */
+# define lchown rpl_lchown
+extern int lchown (char const *file, uid_t owner, gid_t group);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lchown
+# define lchown(f,u,g) \
+ (GL_LINK_WARNING ("lchown is unportable to pre-POSIX.1-2001 " \
+ "systems - use gnulib module lchown for portability"), \
+ lchown (f, u, g))
+#endif
+
+
+#if @GNULIB_LINK@
+/* Create a new hard link for an existing file.
+ Return 0 if successful, otherwise -1 and errno set.
+ See POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/link.html>. */
+# if !@HAVE_LINK@
+extern int link (const char *path1, const char *path2);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef link
+# define link(path1,path2) \
+ (GL_LINK_WARNING ("link is unportable - " \
+ "use gnulib module link for portability"), \
+ link (path1, path2))
+#endif
+
+
+#if @GNULIB_LSEEK@
+# if @REPLACE_LSEEK@
+/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
+ Return the new offset if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/lseek.html>. */
+# define lseek rpl_lseek
+ extern off_t lseek (int fd, off_t offset, int whence);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lseek
+# define lseek(f,o,w) \
+ (GL_LINK_WARNING ("lseek does not fail with ESPIPE on pipes on some " \
+ "systems - use gnulib module lseek for portability"), \
+ lseek (f, o, w))
+#endif
+
+
+#if @GNULIB_READLINK@
+/* Read the contents of the symbolic link FILE and place the first BUFSIZE
+ bytes of it into BUF. Return the number of bytes placed into BUF if
+ successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/readlink.html>. */
+# if !@HAVE_READLINK@
+# include <stddef.h>
+extern int readlink (const char *file, char *buf, size_t bufsize);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef readlink
+# define readlink(f,b,s) \
+ (GL_LINK_WARNING ("readlink is unportable - " \
+ "use gnulib module readlink for portability"), \
+ readlink (f, b, s))
+#endif
+
+
+#if @GNULIB_SLEEP@
+/* Pause the execution of the current thread for N seconds.
+ Returns the number of seconds left to sleep.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/sleep.html>. */
+# if !@HAVE_SLEEP@
+extern unsigned int sleep (unsigned int n);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef sleep
+# define sleep(n) \
+ (GL_LINK_WARNING ("sleep is unportable - " \
+ "use gnulib module sleep for portability"), \
+ sleep (n))
+#endif
+
+
+#if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
+/* Write up to COUNT bytes starting at BUF to file descriptor FD.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/write.html>. */
+# undef write
+# define write rpl_write
+extern ssize_t write (int fd, const void *buf, size_t count);
+#endif
+
+
+#ifdef FCHDIR_REPLACEMENT
+/* gnulib internal function. */
+extern void _gl_unregister_fd (int fd);
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _GL_UNISTD_H */
+#endif /* _GL_UNISTD_H */
diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h
new file mode 100644
index 0000000..6b2939e
--- /dev/null
+++ b/lib/unlocked-io.h
@@ -0,0 +1,136 @@
+/* Prefer faster, non-thread-safe stdio functions if available.
+
+ Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#ifndef UNLOCKED_IO_H
+# define UNLOCKED_IO_H 1
+
+/* These are wrappers for functions/macros from the GNU C library, and
+ from other C libraries supporting POSIX's optional thread-safe functions.
+
+ The standard I/O functions are thread-safe. These *_unlocked ones are
+ more efficient but not thread-safe. That they're not thread-safe is
+ fine since all of the applications in this package are single threaded.
+
+ Also, some code that is shared with the GNU C library may invoke
+ the *_unlocked functions directly. On hosts that lack those
+ functions, invoke the non-thread-safe versions instead. */
+
+# include <stdio.h>
+
+# if HAVE_DECL_CLEARERR_UNLOCKED
+# undef clearerr
+# define clearerr(x) clearerr_unlocked (x)
+# else
+# define clearerr_unlocked(x) clearerr (x)
+# endif
+
+# if HAVE_DECL_FEOF_UNLOCKED
+# undef feof
+# define feof(x) feof_unlocked (x)
+# else
+# define feof_unlocked(x) feof (x)
+# endif
+
+# if HAVE_DECL_FERROR_UNLOCKED
+# undef ferror
+# define ferror(x) ferror_unlocked (x)
+# else
+# define ferror_unlocked(x) ferror (x)
+# endif
+
+# if HAVE_DECL_FFLUSH_UNLOCKED
+# undef fflush
+# define fflush(x) fflush_unlocked (x)
+# else
+# define fflush_unlocked(x) fflush (x)
+# endif
+
+# if HAVE_DECL_FGETS_UNLOCKED
+# undef fgets
+# define fgets(x,y,z) fgets_unlocked (x,y,z)
+# else
+# define fgets_unlocked(x,y,z) fgets (x,y,z)
+# endif
+
+# if HAVE_DECL_FPUTC_UNLOCKED
+# undef fputc
+# define fputc(x,y) fputc_unlocked (x,y)
+# else
+# define fputc_unlocked(x,y) fputc (x,y)
+# endif
+
+# if HAVE_DECL_FPUTS_UNLOCKED
+# undef fputs
+# define fputs(x,y) fputs_unlocked (x,y)
+# else
+# define fputs_unlocked(x,y) fputs (x,y)
+# endif
+
+# if HAVE_DECL_FREAD_UNLOCKED
+# undef fread
+# define fread(w,x,y,z) fread_unlocked (w,x,y,z)
+# else
+# define fread_unlocked(w,x,y,z) fread (w,x,y,z)
+# endif
+
+# if HAVE_DECL_FWRITE_UNLOCKED
+# undef fwrite
+# define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z)
+# else
+# define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
+# endif
+
+# if HAVE_DECL_GETC_UNLOCKED
+# undef getc
+# define getc(x) getc_unlocked (x)
+# else
+# define getc_unlocked(x) getc (x)
+# endif
+
+# if HAVE_DECL_GETCHAR_UNLOCKED
+# undef getchar
+# define getchar() getchar_unlocked ()
+# else
+# define getchar_unlocked() getchar ()
+# endif
+
+# if HAVE_DECL_PUTC_UNLOCKED
+# undef putc
+# define putc(x,y) putc_unlocked (x,y)
+# else
+# define putc_unlocked(x,y) putc (x,y)
+# endif
+
+# if HAVE_DECL_PUTCHAR_UNLOCKED
+# undef putchar
+# define putchar(x) putchar_unlocked (x)
+# else
+# define putchar_unlocked(x) putchar (x)
+# endif
+
+# undef flockfile
+# define flockfile(x) ((void) 0)
+
+# undef ftrylockfile
+# define ftrylockfile(x) 0
+
+# undef funlockfile
+# define funlockfile(x) ((void) 0)
+
+#endif /* UNLOCKED_IO_H */
diff --git a/lib/verify.h b/lib/verify.h
new file mode 100644
index 0000000..fac53f6
--- /dev/null
+++ b/lib/verify.h
@@ -0,0 +1,140 @@
+/* Compile-time assert-like macros.
+
+ Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
+
+#ifndef VERIFY_H
+# define VERIFY_H 1
+
+/* Each of these macros verifies that its argument R is nonzero. To
+ be portable, R should be an integer constant expression. Unlike
+ assert (R), there is no run-time overhead.
+
+ There are two macros, since no single macro can be used in all
+ contexts in C. verify_true (R) is for scalar contexts, including
+ integer constant expression contexts. verify (R) is for declaration
+ contexts, e.g., the top level.
+
+ Symbols ending in "__" are private to this header.
+
+ The code below uses several ideas.
+
+ * The first step is ((R) ? 1 : -1). Given an expression R, of
+ integral or boolean or floating-point type, this yields an
+ expression of integral type, whose value is later verified to be
+ constant and nonnegative.
+
+ * Next this expression W is wrapped in a type
+ struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }.
+ If W is negative, this yields a compile-time error. No compiler can
+ deal with a bit-field of negative size.
+
+ One might think that an array size check would have the same
+ effect, that is, that the type struct { unsigned int dummy[W]; }
+ would work as well. However, inside a function, some compilers
+ (such as C++ compilers and GNU C) allow local parameters and
+ variables inside array size expressions. With these compilers,
+ an array size check would not properly diagnose this misuse of
+ the verify macro:
+
+ void function (int n) { verify (n < 0); }
+
+ * For the verify macro, the struct verify_type__ will need to
+ somehow be embedded into a declaration. To be portable, this
+ declaration must declare an object, a constant, a function, or a
+ typedef name. If the declared entity uses the type directly,
+ such as in
+
+ struct dummy {...};
+ typedef struct {...} dummy;
+ extern struct {...} *dummy;
+ extern void dummy (struct {...} *);
+ extern struct {...} *dummy (void);
+
+ two uses of the verify macro would yield colliding declarations
+ if the entity names are not disambiguated. A workaround is to
+ attach the current line number to the entity name:
+
+ #define GL_CONCAT0(x, y) x##y
+ #define GL_CONCAT(x, y) GL_CONCAT0 (x, y)
+ extern struct {...} * GL_CONCAT(dummy,__LINE__);
+
+ But this has the problem that two invocations of verify from
+ within the same macro would collide, since the __LINE__ value
+ would be the same for both invocations.
+
+ A solution is to use the sizeof operator. It yields a number,
+ getting rid of the identity of the type. Declarations like
+
+ extern int dummy [sizeof (struct {...})];
+ extern void dummy (int [sizeof (struct {...})]);
+ extern int (*dummy (void)) [sizeof (struct {...})];
+
+ can be repeated.
+
+ * Should the implementation use a named struct or an unnamed struct?
+ Which of the following alternatives can be used?
+
+ extern int dummy [sizeof (struct {...})];
+ extern int dummy [sizeof (struct verify_type__ {...})];
+ extern void dummy (int [sizeof (struct {...})]);
+ extern void dummy (int [sizeof (struct verify_type__ {...})]);
+ extern int (*dummy (void)) [sizeof (struct {...})];
+ extern int (*dummy (void)) [sizeof (struct verify_type__ {...})];
+
+ In the second and sixth case, the struct type is exported to the
+ outer scope; two such declarations therefore collide. GCC warns
+ about the first, third, and fourth cases. So the only remaining
+ possibility is the fifth case:
+
+ extern int (*dummy (void)) [sizeof (struct {...})];
+
+ * This implementation exploits the fact that GCC does not warn about
+ the last declaration mentioned above. If a future version of GCC
+ introduces a warning for this, the problem could be worked around
+ by using code specialized to GCC, e.g.,:
+
+ #if 4 <= __GNUC__
+ # define verify(R) \
+ extern int (* verify_function__ (void)) \
+ [__builtin_constant_p (R) && (R) ? 1 : -1]
+ #endif
+
+ * In C++, any struct definition inside sizeof is invalid.
+ Use a template type to work around the problem. */
+
+
+/* Verify requirement R at compile-time, as an integer constant expression.
+ Return 1. */
+
+# ifdef __cplusplus
+template <int w>
+ struct verify_type__ { unsigned int verify_error_if_negative_size__: w; };
+# define verify_true(R) \
+ (!!sizeof (verify_type__<(R) ? 1 : -1>))
+# else
+# define verify_true(R) \
+ (!!sizeof \
+ (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; }))
+# endif
+
+/* Verify requirement R at compile-time, as a declaration without a
+ trailing ';'. */
+
+# define verify(R) extern int (* verify_function__ (void)) [verify_true (R)]
+
+#endif
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
new file mode 100644
index 0000000..2d66c32
--- /dev/null
+++ b/lib/wchar.in.h
@@ -0,0 +1,308 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
+
+ Copyright (C) 2007-2009 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Eric Blake. */
+
+/*
+ * ISO C 99 <wchar.h> for platforms that have issues.
+ * <http://www.opengroup.org/susv3xbd/wchar.h.html>
+ *
+ * For now, this just ensures proper prerequisite inclusion order and
+ * the declaration of wcwidth().
+ */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_mbstate_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
+/* Special invocation convention:
+ - Inside uClibc header files.
+ - On HP-UX 11.00 we have a sequence of nested includes
+ <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
+ once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
+ and once directly. In both situations 'wint_t' is not yet defined,
+ therefore we cannot provide the function overrides; instead include only
+ the system's <wchar.h>.
+ - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
+ the latter includes <wchar.h>. But here, we have no way to detect whether
+ <wctype.h> is completely included or is still being included. */
+
+#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_WCHAR_H
+
+#define _GL_ALREADY_INCLUDING_WCHAR_H
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+
+/* Include the original <wchar.h> if it exists.
+ Some builds of uClibc lack it. */
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_WCHAR_H@
+# @INCLUDE_NEXT@ @NEXT_WCHAR_H@
+#endif
+
+#undef _GL_ALREADY_INCLUDING_WCHAR_H
+
+#ifndef _GL_WCHAR_H
+#define _GL_WCHAR_H
+
+/* The definition of GL_LINK_WARNING is copied here. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Define wint_t. (Also done in wctype.in.h.) */
+#if !@HAVE_WINT_T@ && !defined wint_t
+# define wint_t int
+# ifndef WEOF
+# define WEOF -1
+# endif
+#endif
+
+
+/* Override mbstate_t if it is too small.
+ On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
+ implementing mbrtowc for encodings like UTF-8. */
+#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
+typedef int rpl_mbstate_t;
+# undef mbstate_t
+# define mbstate_t rpl_mbstate_t
+# define GNULIB_defined_mbstate_t 1
+#endif
+
+
+/* Convert a single-byte character to a wide character. */
+#if @GNULIB_BTOWC@
+# if @REPLACE_BTOWC@
+# undef btowc
+# define btowc rpl_btowc
+# endif
+# if !@HAVE_BTOWC@ || @REPLACE_BTOWC@
+extern wint_t btowc (int c);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef btowc
+# define btowc(c) \
+ (GL_LINK_WARNING ("btowc is unportable - " \
+ "use gnulib module btowc for portability"), \
+ btowc (c))
+#endif
+
+
+/* Convert a wide character to a single-byte character. */
+#if @GNULIB_WCTOB@
+# if @REPLACE_WCTOB@
+# undef wctob
+# define wctob rpl_wctob
+# endif
+# if (!defined wctob && !@HAVE_DECL_WCTOB@) || @REPLACE_WCTOB@
+/* wctob is provided by gnulib, or wctob exists but is not declared. */
+extern int wctob (wint_t wc);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wctob
+# define wctob(w) \
+ (GL_LINK_WARNING ("wctob is unportable - " \
+ "use gnulib module wctob for portability"), \
+ wctob (w))
+#endif
+
+
+/* Test whether *PS is in the initial state. */
+#if @GNULIB_MBSINIT@
+# if @REPLACE_MBSINIT@
+# undef mbsinit
+# define mbsinit rpl_mbsinit
+# endif
+# if !@HAVE_MBSINIT@ || @REPLACE_MBSINIT@
+extern int mbsinit (const mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbsinit
+# define mbsinit(p) \
+ (GL_LINK_WARNING ("mbsinit is unportable - " \
+ "use gnulib module mbsinit for portability"), \
+ mbsinit (p))
+#endif
+
+
+/* Convert a multibyte character to a wide character. */
+#if @GNULIB_MBRTOWC@
+# if @REPLACE_MBRTOWC@
+# undef mbrtowc
+# define mbrtowc rpl_mbrtowc
+# endif
+# if !@HAVE_MBRTOWC@ || @REPLACE_MBRTOWC@
+extern size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbrtowc
+# define mbrtowc(w,s,n,p) \
+ (GL_LINK_WARNING ("mbrtowc is unportable - " \
+ "use gnulib module mbrtowc for portability"), \
+ mbrtowc (w, s, n, p))
+#endif
+
+
+/* Recognize a multibyte character. */
+#if @GNULIB_MBRLEN@
+# if @REPLACE_MBRLEN@
+# undef mbrlen
+# define mbrlen rpl_mbrlen
+# endif
+# if !@HAVE_MBRLEN@ || @REPLACE_MBRLEN@
+extern size_t mbrlen (const char *s, size_t n, mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbrlen
+# define mbrlen(s,n,p) \
+ (GL_LINK_WARNING ("mbrlen is unportable - " \
+ "use gnulib module mbrlen for portability"), \
+ mbrlen (s, n, p))
+#endif
+
+
+/* Convert a string to a wide string. */
+#if @GNULIB_MBSRTOWCS@
+# if @REPLACE_MBSRTOWCS@
+# undef mbsrtowcs
+# define mbsrtowcs rpl_mbsrtowcs
+# endif
+# if !@HAVE_MBSRTOWCS@ || @REPLACE_MBSRTOWCS@
+extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbsrtowcs
+# define mbsrtowcs(d,s,l,p) \
+ (GL_LINK_WARNING ("mbsrtowcs is unportable - " \
+ "use gnulib module mbsrtowcs for portability"), \
+ mbsrtowcs (d, s, l, p))
+#endif
+
+
+/* Convert a string to a wide string. */
+#if @GNULIB_MBSNRTOWCS@
+# if @REPLACE_MBSNRTOWCS@
+# undef mbsnrtowcs
+# define mbsnrtowcs rpl_mbsnrtowcs
+# endif
+# if !@HAVE_MBSNRTOWCS@ || @REPLACE_MBSNRTOWCS@
+extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbsnrtowcs
+# define mbsnrtowcs(d,s,n,l,p) \
+ (GL_LINK_WARNING ("mbsnrtowcs is unportable - " \
+ "use gnulib module mbsnrtowcs for portability"), \
+ mbsnrtowcs (d, s, n, l, p))
+#endif
+
+
+/* Convert a wide character to a multibyte character. */
+#if @GNULIB_WCRTOMB@
+# if @REPLACE_WCRTOMB@
+# undef wcrtomb
+# define wcrtomb rpl_wcrtomb
+# endif
+# if !@HAVE_WCRTOMB@ || @REPLACE_WCRTOMB@
+extern size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcrtomb
+# define wcrtomb(s,w,p) \
+ (GL_LINK_WARNING ("wcrtomb is unportable - " \
+ "use gnulib module wcrtomb for portability"), \
+ wcrtomb (s, w, p))
+#endif
+
+
+/* Convert a wide string to a string. */
+#if @GNULIB_WCSRTOMBS@
+# if @REPLACE_WCSRTOMBS@
+# undef wcsrtombs
+# define wcsrtombs rpl_wcsrtombs
+# endif
+# if !@HAVE_WCSRTOMBS@ || @REPLACE_WCSRTOMBS@
+extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcsrtombs
+# define wcsrtombs(d,s,l,p) \
+ (GL_LINK_WARNING ("wcsrtombs is unportable - " \
+ "use gnulib module wcsrtombs for portability"), \
+ wcsrtombs (d, s, l, p))
+#endif
+
+
+/* Convert a wide string to a string. */
+#if @GNULIB_WCSNRTOMBS@
+# if !@HAVE_WCSNRTOMBS@
+extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcsnrtombs
+# define wcsnrtombs(d,s,n,l,p) \
+ (GL_LINK_WARNING ("wcsnrtombs is unportable - " \
+ "use gnulib module wcsnrtombs for portability"), \
+ wcsnrtombs (d, s, n, l, p))
+#endif
+
+
+/* Return the number of screen columns needed for WC. */
+#if @GNULIB_WCWIDTH@
+# if @REPLACE_WCWIDTH@
+# undef wcwidth
+# define wcwidth rpl_wcwidth
+extern int wcwidth (wchar_t);
+# else
+# if !defined wcwidth && !@HAVE_DECL_WCWIDTH@
+/* wcwidth exists but is not declared. */
+extern int wcwidth (int /* actually wchar_t */);
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcwidth
+# define wcwidth(w) \
+ (GL_LINK_WARNING ("wcwidth is unportable - " \
+ "use gnulib module wcwidth for portability"), \
+ wcwidth (w))
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_WCHAR_H */
+#endif /* _GL_WCHAR_H */
+#endif
diff --git a/lib/wcrtomb.c b/lib/wcrtomb.c
new file mode 100644
index 0000000..79df99f
--- /dev/null
+++ b/lib/wcrtomb.c
@@ -0,0 +1,53 @@
+/* Convert wide character to multibyte character.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include <errno.h>
+#include <stdlib.h>
+
+
+size_t
+wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
+{
+ /* This implementation of wcrtomb on top of wctomb() supports only
+ stateless encodings. ps must be in the initial state. */
+ if (ps != NULL && !mbsinit (ps))
+ {
+ errno = EINVAL;
+ return (size_t)(-1);
+ }
+
+ if (s == NULL)
+ /* We know the NUL wide character corresponds to the NUL character. */
+ return 1;
+ else
+ {
+ int ret = wctomb (s, wc);
+
+ if (ret >= 0)
+ return ret;
+ else
+ {
+ errno = EILSEQ;
+ return (size_t)(-1);
+ }
+ }
+}
diff --git a/lib/wctob.c b/lib/wctob.c
new file mode 100644
index 0000000..4fa71b0
--- /dev/null
+++ b/lib/wctob.c
@@ -0,0 +1,37 @@
+/* Convert wide character to unibyte character.
+ Copyright (C) 2008 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+wctob (wint_t wc)
+{
+ char buf[64];
+
+ if (!(MB_CUR_MAX <= sizeof (buf)))
+ abort ();
+ if (wctomb (buf, wc) == 1)
+ return (unsigned char) buf[0];
+ else
+ return EOF;
+}
diff --git a/lib/wctype.in.h b/lib/wctype.in.h
new file mode 100644
index 0000000..f7942ed
--- /dev/null
+++ b/lib/wctype.in.h
@@ -0,0 +1,186 @@
+/* -*- buffer-read-only: t -*- vi: set ro: */
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
+
+ Copyright (C) 2006-2008 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Bruno Haible and Paul Eggert. */
+
+/*
+ * ISO C 99 <wctype.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/wctype.h.html>
+ *
+ * iswctype, towctrans, towlower, towupper, wctrans, wctype,
+ * wctrans_t, and wctype_t are not yet implemented.
+ */
+
+#ifndef _GL_WCTYPE_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if @HAVE_WINT_T@
+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
+ Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# include <wchar.h>
+#endif
+
+/* Include the original <wctype.h> if it exists.
+ BeOS 5 has the functions but no <wctype.h>. */
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_WCTYPE_H@
+# @INCLUDE_NEXT@ @NEXT_WCTYPE_H@
+#endif
+
+#ifndef _GL_WCTYPE_H
+#define _GL_WCTYPE_H
+
+/* Define wint_t. (Also done in wchar.in.h.) */
+#if !@HAVE_WINT_T@ && !defined wint_t
+# define wint_t int
+# ifndef WEOF
+# define WEOF -1
+# endif
+#endif
+
+/* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
+ Linux libc5 has <wctype.h> and the functions but they are broken.
+ Assume all 12 functions are implemented the same way, or not at all. */
+#if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@
+
+/* IRIX 5.3 has macros but no functions, its isw* macros refer to an
+ undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
+ refer to system functions like _iswctype that are not in the
+ standard C library. Rather than try to get ancient buggy
+ implementations like this to work, just disable them. */
+# undef iswalnum
+# undef iswalpha
+# undef iswblank
+# undef iswcntrl
+# undef iswdigit
+# undef iswgraph
+# undef iswlower
+# undef iswprint
+# undef iswpunct
+# undef iswspace
+# undef iswupper
+# undef iswxdigit
+
+/* Linux libc5 has <wctype.h> and the functions but they are broken. */
+# if @REPLACE_ISWCNTRL@
+# define iswalnum rpl_iswalnum
+# define iswalpha rpl_iswalpha
+# define iswblank rpl_iswblank
+# define iswcntrl rpl_iswcntrl
+# define iswdigit rpl_iswdigit
+# define iswgraph rpl_iswgraph
+# define iswlower rpl_iswlower
+# define iswprint rpl_iswprint
+# define iswpunct rpl_iswpunct
+# define iswspace rpl_iswspace
+# define iswupper rpl_iswupper
+# define iswxdigit rpl_iswxdigit
+# endif
+
+static inline int
+iswalnum (wint_t wc)
+{
+ return ((wc >= '0' && wc <= '9')
+ || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
+}
+
+static inline int
+iswalpha (wint_t wc)
+{
+ return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
+}
+
+static inline int
+iswblank (wint_t wc)
+{
+ return wc == ' ' || wc == '\t';
+}
+
+static inline int
+iswcntrl (wint_t wc)
+{
+ return (wc & ~0x1f) == 0 || wc == 0x7f;
+}
+
+static inline int
+iswdigit (wint_t wc)
+{
+ return wc >= '0' && wc <= '9';
+}
+
+static inline int
+iswgraph (wint_t wc)
+{
+ return wc >= '!' && wc <= '~';
+}
+
+static inline int
+iswlower (wint_t wc)
+{
+ return wc >= 'a' && wc <= 'z';
+}
+
+static inline int
+iswprint (wint_t wc)
+{
+ return wc >= ' ' && wc <= '~';
+}
+
+static inline int
+iswpunct (wint_t wc)
+{
+ return (wc >= '!' && wc <= '~'
+ && !((wc >= '0' && wc <= '9')
+ || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')));
+}
+
+static inline int
+iswspace (wint_t wc)
+{
+ return (wc == ' ' || wc == '\t'
+ || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
+}
+
+static inline int
+iswupper (wint_t wc)
+{
+ return wc >= 'A' && wc <= 'Z';
+}
+
+static inline int
+iswxdigit (wint_t wc)
+{
+ return ((wc >= '0' && wc <= '9')
+ || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
+}
+
+# endif /* ! HAVE_ISWCNTRL */
+
+#endif /* _GL_WCTYPE_H */
+#endif /* _GL_WCTYPE_H */
diff --git a/lib/xalloc-die.c b/lib/xalloc-die.c
new file mode 100644
index 0000000..0a0694f
--- /dev/null
+++ b/lib/xalloc-die.c
@@ -0,0 +1,41 @@
+/* Report a memory allocation failure and exit.
+
+ Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2006 Free
+ Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "xalloc.h"
+
+#include <stdlib.h>
+
+#include "error.h"
+#include "exitfail.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+void
+xalloc_die (void)
+{
+ error (exit_failure, 0, "%s", _("memory exhausted"));
+
+ /* The `noreturn' cannot be given to error, since it may return if
+ its first argument is 0. To help compilers understand the
+ xalloc_die does not return, call abort. Also, the abort is a
+ safety feature if exit_failure is 0 (which shouldn't happen). */
+ abort ();
+}
diff --git a/lib/xalloc.h b/lib/xalloc.h
new file mode 100644
index 0000000..57a13e0
--- /dev/null
+++ b/lib/xalloc.h
@@ -0,0 +1,280 @@
+/* xalloc.h -- malloc with out-of-memory checking
+
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef XALLOC_H_
+# define XALLOC_H_
+
+# include <stddef.h>
+
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+
+# ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+# define __attribute__(x)
+# endif
+# endif
+
+# ifndef ATTRIBUTE_NORETURN
+# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+# endif
+
+# ifndef ATTRIBUTE_MALLOC
+# if __GNUC__ >= 3
+# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+# else
+# define ATTRIBUTE_MALLOC
+# endif
+# endif
+
+/* This function is always triggered when memory is exhausted.
+ It must be defined by the application, either explicitly
+ or by using gnulib's xalloc-die module. This is the
+ function to call when one wants the program to die because of a
+ memory allocation failure. */
+extern void xalloc_die (void) ATTRIBUTE_NORETURN;
+
+void *xmalloc (size_t s) ATTRIBUTE_MALLOC;
+void *xzalloc (size_t s) ATTRIBUTE_MALLOC;
+void *xcalloc (size_t n, size_t s) ATTRIBUTE_MALLOC;
+void *xrealloc (void *p, size_t s);
+void *x2realloc (void *p, size_t *pn);
+void *xmemdup (void const *p, size_t s) ATTRIBUTE_MALLOC;
+char *xstrdup (char const *str) ATTRIBUTE_MALLOC;
+
+/* Return 1 if an array of N objects, each of size S, cannot exist due
+ to size arithmetic overflow. S must be positive and N must be
+ nonnegative. This is a macro, not an inline function, so that it
+ works correctly even when SIZE_MAX < N.
+
+ By gnulib convention, SIZE_MAX represents overflow in size
+ calculations, so the conservative dividend to use here is
+ SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value.
+ However, malloc (SIZE_MAX) fails on all known hosts where
+ sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for
+ exactly-SIZE_MAX allocations on such hosts; this avoids a test and
+ branch when S is known to be 1. */
+# define xalloc_oversized(n, s) \
+ ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
+
+
+/* In the following macros, T must be an elementary or structure/union or
+ typedef'ed type, or a pointer to such a type. To apply one of the
+ following macros to a function pointer or array type, you need to typedef
+ it first and use the typedef name. */
+
+/* Allocate an object of type T dynamically, with error checking. */
+/* extern t *XMALLOC (typename t); */
+# define XMALLOC(t) ((t *) xmalloc (sizeof (t)))
+
+/* Allocate memory for N elements of type T, with error checking. */
+/* extern t *XNMALLOC (size_t n, typename t); */
+# define XNMALLOC(n, t) \
+ ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))
+
+/* Allocate an object of type T dynamically, with error checking,
+ and zero it. */
+/* extern t *XZALLOC (typename t); */
+# define XZALLOC(t) ((t *) xzalloc (sizeof (t)))
+
+/* Allocate memory for N elements of type T, with error checking,
+ and zero it. */
+/* extern t *XCALLOC (size_t n, typename t); */
+# define XCALLOC(n, t) \
+ ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
+
+
+# if HAVE_INLINE
+# define static_inline static inline
+# else
+ void *xnmalloc (size_t n, size_t s) ATTRIBUTE_MALLOC;
+ void *xnrealloc (void *p, size_t n, size_t s);
+ void *x2nrealloc (void *p, size_t *pn, size_t s);
+ char *xcharalloc (size_t n) ATTRIBUTE_MALLOC;
+# endif
+
+# ifdef static_inline
+
+/* Allocate an array of N objects, each with S bytes of memory,
+ dynamically, with error checking. S must be nonzero. */
+
+static_inline void *xnmalloc (size_t n, size_t s) ATTRIBUTE_MALLOC;
+static_inline void *
+xnmalloc (size_t n, size_t s)
+{
+ if (xalloc_oversized (n, s))
+ xalloc_die ();
+ return xmalloc (n * s);
+}
+
+/* Change the size of an allocated block of memory P to an array of N
+ objects each of S bytes, with error checking. S must be nonzero. */
+
+static_inline void *
+xnrealloc (void *p, size_t n, size_t s)
+{
+ if (xalloc_oversized (n, s))
+ xalloc_die ();
+ return xrealloc (p, n * s);
+}
+
+/* If P is null, allocate a block of at least *PN such objects;
+ otherwise, reallocate P so that it contains more than *PN objects
+ each of S bytes. *PN must be nonzero unless P is null, and S must
+ be nonzero. Set *PN to the new number of objects, and return the
+ pointer to the new block. *PN is never set to zero, and the
+ returned pointer is never null.
+
+ Repeated reallocations are guaranteed to make progress, either by
+ allocating an initial block with a nonzero size, or by allocating a
+ larger block.
+
+ In the following implementation, nonzero sizes are increased by a
+ factor of approximately 1.5 so that repeated reallocations have
+ O(N) overall cost rather than O(N**2) cost, but the
+ specification for this function does not guarantee that rate.
+
+ Here is an example of use:
+
+ int *p = NULL;
+ size_t used = 0;
+ size_t allocated = 0;
+
+ void
+ append_int (int value)
+ {
+ if (used == allocated)
+ p = x2nrealloc (p, &allocated, sizeof *p);
+ p[used++] = value;
+ }
+
+ This causes x2nrealloc to allocate a block of some nonzero size the
+ first time it is called.
+
+ To have finer-grained control over the initial size, set *PN to a
+ nonzero value before calling this function with P == NULL. For
+ example:
+
+ int *p = NULL;
+ size_t used = 0;
+ size_t allocated = 0;
+ size_t allocated1 = 1000;
+
+ void
+ append_int (int value)
+ {
+ if (used == allocated)
+ {
+ p = x2nrealloc (p, &allocated1, sizeof *p);
+ allocated = allocated1;
+ }
+ p[used++] = value;
+ }
+
+ */
+
+static_inline void *
+x2nrealloc (void *p, size_t *pn, size_t s)
+{
+ size_t n = *pn;
+
+ if (! p)
+ {
+ if (! n)
+ {
+ /* The approximate size to use for initial small allocation
+ requests, when the invoking code specifies an old size of
+ zero. 64 bytes is the largest "small" request for the
+ GNU C library malloc. */
+ enum { DEFAULT_MXFAST = 64 };
+
+ n = DEFAULT_MXFAST / s;
+ n += !n;
+ }
+ }
+ else
+ {
+ /* Set N = ceil (1.5 * N) so that progress is made if N == 1.
+ Check for overflow, so that N * S stays in size_t range.
+ The check is slightly conservative, but an exact check isn't
+ worth the trouble. */
+ if ((size_t) -1 / 3 * 2 / s <= n)
+ xalloc_die ();
+ n += (n + 1) / 2;
+ }
+
+ *pn = n;
+ return xrealloc (p, n * s);
+}
+
+/* Return a pointer to a new buffer of N bytes. This is like xmalloc,
+ except it returns char *. */
+
+static_inline char *xcharalloc (size_t n) ATTRIBUTE_MALLOC;
+static_inline char *
+xcharalloc (size_t n)
+{
+ return XNMALLOC (n, char);
+}
+
+# endif
+
+# ifdef __cplusplus
+}
+
+/* C++ does not allow conversions from void * to other pointer types
+ without a cast. Use templates to work around the problem when
+ possible. */
+
+template <typename T> inline T *
+xrealloc (T *p, size_t s)
+{
+ return (T *) xrealloc ((void *) p, s);
+}
+
+template <typename T> inline T *
+xnrealloc (T *p, size_t n, size_t s)
+{
+ return (T *) xnrealloc ((void *) p, n, s);
+}
+
+template <typename T> inline T *
+x2realloc (T *p, size_t *pn)
+{
+ return (T *) x2realloc ((void *) p, pn);
+}
+
+template <typename T> inline T *
+x2nrealloc (T *p, size_t *pn, size_t s)
+{
+ return (T *) x2nrealloc ((void *) p, pn, s);
+}
+
+template <typename T> inline T *
+xmemdup (T const *p, size_t s)
+{
+ return (T *) xmemdup ((void const *) p, s);
+}
+
+# endif
+
+
+#endif /* !XALLOC_H_ */
diff --git a/lib/xmalloc.c b/lib/xmalloc.c
new file mode 100644
index 0000000..585fb4b
--- /dev/null
+++ b/lib/xmalloc.c
@@ -0,0 +1,118 @@
+/* xmalloc.c -- malloc with out of memory checking
+
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2008-2009 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#if ! HAVE_INLINE
+# define static_inline
+#endif
+#include "xalloc.h"
+#undef static_inline
+
+#include <stdlib.h>
+#include <string.h>
+
+/* 1 if calloc is known to be compatible with GNU calloc. This
+ matters if we are not also using the calloc module, which defines
+ HAVE_CALLOC and supports the GNU API even on non-GNU platforms. */
+#if defined HAVE_CALLOC || defined __GLIBC__
+enum { HAVE_GNU_CALLOC = 1 };
+#else
+enum { HAVE_GNU_CALLOC = 0 };
+#endif
+
+/* Allocate N bytes of memory dynamically, with error checking. */
+
+void *
+xmalloc (size_t n)
+{
+ void *p = malloc (n);
+ if (!p && n != 0)
+ xalloc_die ();
+ return p;
+}
+
+/* Change the size of an allocated block of memory P to N bytes,
+ with error checking. */
+
+void *
+xrealloc (void *p, size_t n)
+{
+ p = realloc (p, n);
+ if (!p && n != 0)
+ xalloc_die ();
+ return p;
+}
+
+/* If P is null, allocate a block of at least *PN bytes; otherwise,
+ reallocate P so that it contains more than *PN bytes. *PN must be
+ nonzero unless P is null. Set *PN to the new block's size, and
+ return the pointer to the new block. *PN is never set to zero, and
+ the returned pointer is never null. */
+
+void *
+x2realloc (void *p, size_t *pn)
+{
+ return x2nrealloc (p, pn, 1);
+}
+
+/* Allocate S bytes of zeroed memory dynamically, with error checking.
+ There's no need for xnzalloc (N, S), since it would be equivalent
+ to xcalloc (N, S). */
+
+void *
+xzalloc (size_t s)
+{
+ return memset (xmalloc (s), 0, s);
+}
+
+/* Allocate zeroed memory for N elements of S bytes, with error
+ checking. S must be nonzero. */
+
+void *
+xcalloc (size_t n, size_t s)
+{
+ void *p;
+ /* Test for overflow, since some calloc implementations don't have
+ proper overflow checks. But omit overflow and size-zero tests if
+ HAVE_GNU_CALLOC, since GNU calloc catches overflow and never
+ returns NULL if successful. */
+ if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s))
+ || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0)))
+ xalloc_die ();
+ return p;
+}
+
+/* Clone an object P of size S, with error checking. There's no need
+ for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any
+ need for an arithmetic overflow check. */
+
+void *
+xmemdup (void const *p, size_t s)
+{
+ return memcpy (xmalloc (s), p, s);
+}
+
+/* Clone STRING. */
+
+char *
+xstrdup (char const *string)
+{
+ return xmemdup (string, strlen (string) + 1);
+}
diff --git a/m4/00gnulib.m4 b/m4/00gnulib.m4
new file mode 100644
index 0000000..d4d04d1
--- /dev/null
+++ b/m4/00gnulib.m4
@@ -0,0 +1,30 @@
+# 00gnulib.m4 serial 2
+dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This file must be named something that sorts before all other
+dnl gnulib-provided .m4 files. It is needed until such time as we can
+dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
+
+# AC_DEFUN_ONCE([NAME], VALUE)
+# ----------------------------
+# Define NAME to expand to VALUE on the first use (whether by direct
+# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses.
+# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This
+# definition is slower than the version in Autoconf 2.64, because it
+# can only use interfaces that existed since 2.59; but it achieves the
+# same effect. Quoting is necessary to avoid confusing Automake.
+m4_version_prereq([2.63.263], [],
+[m4_define([AC][_DEFUN_ONCE],
+ [AC][_DEFUN([$1],
+ [AC_REQUIRE([_gl_DEFUN_ONCE([$1])],
+ [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
+[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
+
+# gl_00GNULIB
+# -----------
+# Witness macro that this file has been included. Needed to force
+# Automake to include this file prior to all other gnulib .m4 files.
+AC_DEFUN([gl_00GNULIB])
diff --git a/m4/acl.m4 b/m4/acl.m4
new file mode 100644
index 0000000..5340e2e
--- /dev/null
+++ b/m4/acl.m4
@@ -0,0 +1,150 @@
+# acl.m4 - check for access control list (ACL) primitives
+# serial 9
+
+# Copyright (C) 2002, 2004-2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Jim Meyering.
+
+AC_DEFUN([gl_FUNC_ACL],
+[
+ AC_ARG_ENABLE([acl],
+ AS_HELP_STRING([--disable-acl], [do not support ACLs]),
+ , [enable_acl=auto])
+
+ LIB_ACL=
+ use_acl=0
+ AC_REQUIRE([AC_C_INLINE])
+ if test "x$enable_acl" != "xno"; then
+ dnl On all platforms, the ACL related API is declared in <sys/acl.h>.
+ AC_CHECK_HEADERS([sys/acl.h])
+ if test $ac_cv_header_sys_acl_h = yes; then
+ ac_save_LIBS=$LIBS
+
+ dnl Test for POSIX-draft-like API (Linux, FreeBSD, MacOS X, IRIX, Tru64).
+ dnl -lacl is needed on Linux, -lpacl is needed 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
+ LIB_ACL=$ac_cv_search_acl_get_file
+ fi
+ AC_CHECK_FUNCS(
+ [acl_get_file acl_get_fd acl_set_file acl_set_fd \
+ acl_free acl_from_mode acl_from_text \
+ acl_delete_def_file acl_extended_file \
+ acl_delete_fd_np acl_delete_file_np \
+ acl_copy_ext_native acl_create_entry_np \
+ acl_to_short_text acl_free_text])
+ # If the acl_get_file bug is detected, don't enable the ACL support.
+ gl_ACL_GET_FILE([use_acl=1], [])
+ if test $use_acl = 1; then
+ dnl On Linux, additional API is declared in <acl/libacl.h>.
+ AC_CHECK_HEADERS([acl/libacl.h])
+ AC_REPLACE_FUNCS([acl_entries])
+ AC_CACHE_CHECK([for ACL_FIRST_ENTRY],
+ [gl_cv_acl_ACL_FIRST_ENTRY],
+ [AC_COMPILE_IFELSE(
+[[#include <sys/types.h>
+#include <sys/acl.h>
+int type = ACL_FIRST_ENTRY;]],
+ [gl_cv_acl_ACL_FIRST_ENTRY=yes],
+ [gl_cv_acl_ACL_FIRST_ENTRY=no])])
+ if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
+ AC_DEFINE([HAVE_ACL_FIRST_ENTRY], [1],
+ [Define to 1 if the constant ACL_FIRST_ENTRY exists.])
+ fi
+ dnl On MacOS X, other types of ACLs are supported.
+ AC_CACHE_CHECK([for ACL_TYPE_EXTENDED],
+ [gl_cv_acl_ACL_TYPE_EXTENDED],
+ [AC_COMPILE_IFELSE(
+[[#include <sys/types.h>
+#include <sys/acl.h>
+int type = ACL_TYPE_EXTENDED;]],
+ [gl_cv_acl_ACL_TYPE_EXTENDED=yes],
+ [gl_cv_acl_ACL_TYPE_EXTENDED=no])])
+ if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
+ AC_DEFINE([HAVE_ACL_TYPE_EXTENDED], [1],
+ [Define to 1 if the ACL type ACL_TYPE_EXTENDED exists.])
+ fi
+ else
+ LIB_ACL=
+ fi
+ ])
+ fi
+
+ dnl Test for Solaris API (Solaris, Cygwin).
+ if test $use_acl = 0; then
+ AC_CHECK_FUNCS([acl])
+ if test $ac_cv_func_acl = yes; then
+ AC_SEARCH_LIBS([acl_trivial], [sec],
+ [if test "$ac_cv_search_acl_trivial" != "none required"; then
+ LIB_ACL=$ac_cv_search_acl_trivial
+ fi
+ ])
+ AC_CHECK_FUNCS([acl_trivial])
+ use_acl=1
+ fi
+ fi
+
+ dnl Test for HP-UX API.
+ if test $use_acl = 0 || test "$ac_cv_func_acl" = yes; then
+ AC_CHECK_FUNCS([getacl])
+ if test $ac_cv_func_getacl = yes; then
+ use_acl=1
+ fi
+ fi
+
+ dnl Test for AIX API (AIX 5.3 or newer).
+ if test $use_acl = 0; then
+ AC_CHECK_FUNCS([aclx_get])
+ if test $ac_cv_func_aclx_get = yes; then
+ use_acl=1
+ fi
+ fi
+
+ dnl Test for older AIX API.
+ if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
+ AC_CHECK_FUNCS([statacl])
+ if test $ac_cv_func_statacl = yes; then
+ use_acl=1
+ fi
+ fi
+
+ LIBS=$ac_save_LIBS
+ fi
+ if test "x$enable_acl$use_acl" = "xyes0"; then
+ AC_MSG_ERROR([ACLs enabled but support not detected])
+ fi
+ fi
+ AC_SUBST([LIB_ACL])
+ AC_DEFINE_UNQUOTED([USE_ACL], [$use_acl],
+ [Define to nonzero if you want access control list support.])
+ USE_ACL=$use_acl
+ AC_SUBST([USE_ACL])
+])
+
+# gl_ACL_GET_FILE(IF-WORKS, IF-NOT)
+# -------------------------------------
+# If `acl_get_file' works (does not have a particular bug),
+# run IF-WORKS, otherwise, IF-NOT.
+# This tests for a Darwin 8.7.0 bug, whereby acl_get_file returns NULL,
+# but sets errno = ENOENT for an existing file or directory.
+AC_DEFUN([gl_ACL_GET_FILE],
+[
+ AC_CACHE_CHECK([for working acl_get_file], [gl_cv_func_working_acl_get_file],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <sys/acl.h>
+ #include <errno.h>
+ ]],
+ [[return !! (!acl_get_file (".", ACL_TYPE_ACCESS)
+ && errno == ENOENT);]])],
+ [gl_cv_func_working_acl_get_file=yes],
+ [gl_cv_func_working_acl_get_file=no],
+ [gl_cv_func_working_acl_get_file=cross-compiling])])
+
+ AS_IF([test $gl_cv_func_working_acl_get_file = yes], [$1], [$2])
+])
diff --git a/m4/alloca.m4 b/m4/alloca.m4
new file mode 100644
index 0000000..4b978e1
--- /dev/null
+++ b/m4/alloca.m4
@@ -0,0 +1,46 @@
+# alloca.m4 serial 9
+dnl Copyright (C) 2002-2004, 2006, 2007, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ALLOCA],
+[
+ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([AC_PROG_EGREP])
+
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ if test $ac_cv_func_alloca_works = no; then
+ gl_PREREQ_ALLOCA
+ fi
+
+ # Define an additional variable used in the Makefile substitution.
+ if test $ac_cv_working_alloca_h = yes; then
+ AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [
+ AC_EGREP_CPP([Need own alloca], [
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+ Need own alloca
+#endif
+ ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no])
+ ])
+ if test $gl_cv_rpl_alloca = yes; then
+ dnl OK, alloca can be implemented through a compiler built-in.
+ AC_DEFINE([HAVE_ALLOCA], [1],
+ [Define to 1 if you have 'alloca' after including <alloca.h>,
+ a header that may be supplied by this distribution.])
+ ALLOCA_H=alloca.h
+ else
+ dnl alloca exists as a library function, i.e. it is slow and probably
+ dnl a memory leak. Don't define HAVE_ALLOCA in this case.
+ ALLOCA_H=
+ fi
+ else
+ ALLOCA_H=alloca.h
+ fi
+ AC_SUBST([ALLOCA_H])
+])
+
+# Prerequisites of lib/alloca.c.
+# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
+AC_DEFUN([gl_PREREQ_ALLOCA], [:])
diff --git a/m4/btowc.m4 b/m4/btowc.m4
new file mode 100644
index 0000000..b46f74f
--- /dev/null
+++ b/m4/btowc.m4
@@ -0,0 +1,68 @@
+# btowc.m4 serial 4
+dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_BTOWC],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_CHECK_FUNCS_ONCE([btowc])
+ if test $ac_cv_func_btowc = no; then
+ HAVE_BTOWC=0
+ else
+
+ dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether btowc(EOF) is correct],
+ [gl_cv_func_btowc_eof],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (btowc (EOF) != WEOF)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_btowc_eof=yes],
+ [gl_cv_func_btowc_eof=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_btowc_eof" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
+ fi
+ if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([btowc])
+ gl_PREREQ_BTOWC
+ fi
+])
+
+# Prerequisites of lib/btowc.c.
+AC_DEFUN([gl_PREREQ_BTOWC], [
+ :
+])
diff --git a/m4/codeset.m4 b/m4/codeset.m4
new file mode 100644
index 0000000..413217b
--- /dev/null
+++ b/m4/codeset.m4
@@ -0,0 +1,21 @@
+# codeset.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 2000-2002, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET); return !cs;],
+ [am_cv_langinfo_codeset=yes],
+ [am_cv_langinfo_codeset=no])
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
new file mode 100644
index 0000000..4d77672
--- /dev/null
+++ b/m4/errno_h.m4
@@ -0,0 +1,113 @@
+# errno_h.m4 serial 4
+dnl Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This macro must pass through AC_REQUIRE (never directly invoke it).
+AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
+ AC_EGREP_CPP([booboo],[
+#include <errno.h>
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+ ],
+ [gl_cv_header_errno_h_complete=no],
+ [gl_cv_header_errno_h_complete=yes])
+ ])
+ if test $gl_cv_header_errno_h_complete = yes; then
+ ERRNO_H=''
+ else
+ gl_CHECK_NEXT_HEADERS([errno.h])
+ ERRNO_H='errno.h'
+ fi
+ AC_SUBST([ERRNO_H])
+ gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
+ gl_REPLACE_ERRNO_VALUE([ENOLINK])
+ gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
+])
+
+# Assuming $1 = EOVERFLOW.
+# The EOVERFLOW errno value ought to be defined in <errno.h>, according to
+# POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and
+# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
+# Check for the value of EOVERFLOW.
+# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE.
+AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
+[
+ if test -n "$ERRNO_H"; then
+ AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
+ AC_EGREP_CPP([yes],[
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+ ],
+ [gl_cv_header_errno_h_]$1[=yes],
+ [gl_cv_header_errno_h_]$1[=no])
+ if test $gl_cv_header_errno_h_]$1[ = no; then
+ AC_EGREP_CPP([yes],[
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+ ], [gl_cv_header_errno_h_]$1[=hidden])
+ if test $gl_cv_header_errno_h_]$1[ = hidden; then
+ dnl The macro exists but is hidden.
+ dnl Define it to the same value.
+ AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+])
+ fi
+ fi
+ ])
+ case $gl_cv_header_errno_h_]$1[ in
+ yes | no)
+ ]$1[_HIDDEN=0; ]$1[_VALUE=
+ ;;
+ *)
+ ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1["
+ ;;
+ esac
+ AC_SUBST($1[_HIDDEN])
+ 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/error.m4 b/m4/error.m4
new file mode 100644
index 0000000..7c7746e
--- /dev/null
+++ b/m4/error.m4
@@ -0,0 +1,22 @@
+#serial 11
+
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004 Free Software
+# Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_ERROR],
+[
+ AC_FUNC_ERROR_AT_LINE
+ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
+ gl_PREREQ_ERROR
+])
+
+# Prerequisites of lib/error.c.
+AC_DEFUN([gl_PREREQ_ERROR],
+[
+ AC_REQUIRE([AC_FUNC_STRERROR_R])
+ :
+])
diff --git a/m4/exitfail.m4 b/m4/exitfail.m4
new file mode 100644
index 0000000..b7a691e
--- /dev/null
+++ b/m4/exitfail.m4
@@ -0,0 +1,13 @@
+# exitfail.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_EXITFAIL],
+[
+ AC_LIBOBJ([exitfail])
+
+ dnl No prerequisites of lib/exitfail.c.
+ :
+])
diff --git a/m4/extensions.m4 b/m4/extensions.m4
new file mode 100644
index 0000000..ba6d5e1
--- /dev/null
+++ b/m4/extensions.m4
@@ -0,0 +1,104 @@
+# serial 8 -*- Autoconf -*-
+# Enable extensions on systems that normally disable them.
+
+# Copyright (C) 2003, 2006-2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# Autoconf. Perhaps we can remove this once we can assume Autoconf
+# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
+# enough in this area it's likely we'll need to redefine
+# AC_USE_SYSTEM_EXTENSIONS for quite some time.
+
+# AC_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+# Remember that #undef in AH_VERBATIM gets replaced with #define by
+# AC_DEFINE. The goal here is to define all known feature-enabling
+# macros, then, if reports of conflicts are made, disable macros that
+# cause problems on some platforms (such as __EXTENSIONS__).
+AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
+[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
+ if test "$MINIX" = yes; then
+ AC_DEFINE([_POSIX_SOURCE], [1],
+ [Define to 1 if you need to in order for `stat' and other
+ things to work.])
+ AC_DEFINE([_POSIX_1_SOURCE], [2],
+ [Define to 2 if the system does not provide POSIX.1 features
+ except with this defined.])
+ AC_DEFINE([_MINIX], [1],
+ [Define to 1 if on MINIX.])
+ fi
+
+ dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
+ dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
+ dnl provided.
+ case "$host_os" in
+ hpux*)
+ AC_DEFINE([_XOPEN_SOURCE], [500],
+ [Define to 500 only on HP-UX.])
+ ;;
+ esac
+
+ AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
+ AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+ [ac_cv_safe_to_define___extensions__],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+# define __EXTENSIONS__ 1
+ ]AC_INCLUDES_DEFAULT])],
+ [ac_cv_safe_to_define___extensions__=yes],
+ [ac_cv_safe_to_define___extensions__=no])])
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_ALL_SOURCE])
+ AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+])# AC_USE_SYSTEM_EXTENSIONS
+
+# gl_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
+[
+ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
+ dnl gnulib does not need it. But if it gets required by third-party macros
+ dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
+ dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+ dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
+ dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
diff --git a/m4/getdelim.m4 b/m4/getdelim.m4
new file mode 100644
index 0000000..7760f82
--- /dev/null
+++ b/m4/getdelim.m4
@@ -0,0 +1,35 @@
+# getdelim.m4 serial 5
+
+dnl Copyright (C) 2005, 2006, 2007 Free Software dnl Foundation, Inc.
+dnl
+dnl This file is free software; the Free 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.59])
+
+AC_DEFUN([gl_FUNC_GETDELIM],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+
+ dnl Persuade glibc <stdio.h> to declare getdelim().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REPLACE_FUNCS([getdelim])
+ AC_CHECK_DECLS_ONCE([getdelim])
+
+ if test $ac_cv_func_getdelim = no; then
+ gl_PREREQ_GETDELIM
+ fi
+
+ if test $ac_cv_have_decl_getdelim = no; then
+ HAVE_DECL_GETDELIM=0
+ fi
+])
+
+# Prerequisites of lib/getdelim.c.
+AC_DEFUN([gl_PREREQ_GETDELIM],
+[
+ AC_CHECK_FUNCS([flockfile funlockfile])
+ AC_CHECK_DECLS([getc_unlocked])
+])
diff --git a/m4/getline.m4 b/m4/getline.m4
new file mode 100644
index 0000000..9993345
--- /dev/null
+++ b/m4/getline.m4
@@ -0,0 +1,80 @@
+# getline.m4 serial 19
+
+dnl Copyright (C) 1998-2003, 2005-2007, 2009 Free Software Foundation, Inc.
+dnl
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_PREREQ([2.59])
+
+dnl See if there's a working, system-supplied version of the getline function.
+dnl We can't just do AC_REPLACE_FUNCS([getline]) because some systems
+dnl have a function by that name in -linet that doesn't have anything
+dnl to do with the function we need.
+AC_DEFUN([gl_FUNC_GETLINE],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+
+ dnl Persuade glibc <stdio.h> to declare getline().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_DECLS_ONCE([getline])
+
+ gl_getline_needs_run_time_check=no
+ AC_CHECK_FUNC([getline],
+ dnl Found it in some library. Verify that it works.
+ gl_getline_needs_run_time_check=yes,
+ am_cv_func_working_getline=no)
+ if test $gl_getline_needs_run_time_check = yes; then
+ AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline],
+ [echo fooN |tr -d '\012'|tr N '\012' > conftest.data
+ AC_TRY_RUN([
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+ int main ()
+ { /* Based on a test program from Karl Heuer. */
+ char *line = NULL;
+ size_t siz = 0;
+ int len;
+ FILE *in = fopen ("./conftest.data", "r");
+ if (!in)
+ return 1;
+ len = getline (&line, &siz, in);
+ exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1);
+ }
+ ], am_cv_func_working_getline=yes dnl The library version works.
+ , am_cv_func_working_getline=no dnl The library version does NOT work.
+ , dnl We're cross compiling. Assume it works on glibc2 systems.
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ [am_cv_func_working_getline=yes],
+ [am_cv_func_working_getline=no])]
+ )])
+ fi
+
+ if test $ac_cv_have_decl_getline = no; then
+ HAVE_DECL_GETLINE=0
+ fi
+
+ if test $am_cv_func_working_getline = no; then
+ REPLACE_GETLINE=1
+ AC_LIBOBJ([getline])
+
+ gl_PREREQ_GETLINE
+ fi
+])
+
+# Prerequisites of lib/getline.c.
+AC_DEFUN([gl_PREREQ_GETLINE],
+[
+ gl_FUNC_GETDELIM
+])
diff --git a/m4/getopt.m4 b/m4/getopt.m4
new file mode 100644
index 0000000..9b683c2
--- /dev/null
+++ b/m4/getopt.m4
@@ -0,0 +1,83 @@
+# getopt.m4 serial 14
+dnl Copyright (C) 2002-2006, 2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# The getopt module assume you want GNU getopt, with getopt_long etc,
+# rather than vanilla POSIX getopt. This means your code should
+# always include <getopt.h> for the getopt prototypes.
+
+AC_DEFUN([gl_GETOPT_SUBSTITUTE],
+[
+ AC_LIBOBJ([getopt])
+ AC_LIBOBJ([getopt1])
+ gl_GETOPT_SUBSTITUTE_HEADER
+ gl_PREREQ_GETOPT
+])
+
+AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
+[
+ GETOPT_H=getopt.h
+ AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
+ [Define to rpl_ if the getopt replacement functions and variables
+ should be used.])
+ AC_SUBST([GETOPT_H])
+])
+
+AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
+[
+ if test -z "$GETOPT_H"; then
+ AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h])
+ fi
+
+ if test -z "$GETOPT_H"; then
+ AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h])
+ fi
+
+ dnl BSD getopt_long uses an incompatible method to reset option processing,
+ dnl and (as of 2004-10-15) mishandles optional option-arguments.
+ if test -z "$GETOPT_H"; then
+ AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>])
+ fi
+
+ dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
+ dnl option string (as of 2005-05-05).
+ if test -z "$GETOPT_H"; then
+ AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([[#include <getopt.h>]],
+ [[
+ char *myargv[3];
+ myargv[0] = "conftest";
+ myargv[1] = "-+";
+ myargv[2] = 0;
+ return getopt (2, myargv, "+a") != '?';
+ ]])],
+ [gl_cv_func_gnu_getopt=yes],
+ [gl_cv_func_gnu_getopt=no],
+ [dnl cross compiling - pessimistically guess based on decls
+ dnl Solaris 10 getopt doesn't handle `+' as a leading character in an
+ dnl option string (as of 2005-05-05).
+ AC_CHECK_DECL([getopt_clip],
+ [gl_cv_func_gnu_getopt=no], [gl_cv_func_gnu_getopt=yes],
+ [#include <getopt.h>])])])
+ if test "$gl_cv_func_gnu_getopt" = "no"; then
+ GETOPT_H=getopt.h
+ fi
+ fi
+])
+
+AC_DEFUN([gl_GETOPT_IFELSE],
+[
+ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
+ AS_IF([test -n "$GETOPT_H"], [$1], [$2])
+])
+
+AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])])
+
+# Prerequisites of lib/getopt*.
+AC_DEFUN([gl_PREREQ_GETOPT],
+[
+ AC_CHECK_DECLS_ONCE([getenv])
+])
diff --git a/m4/gettext.m4 b/m4/gettext.m4
new file mode 100644
index 0000000..ffec9de
--- /dev/null
+++ b/m4/gettext.m4
@@ -0,0 +1,382 @@
+# gettext.m4 serial 62 (gettext-0.18)
+dnl Copyright (C) 1995-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl default (if it is not specified or empty) is 'no-libtool'.
+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define([gt_included_intl],
+ ifelse([$1], [external],
+ ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+ [yes]))
+ define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+ gt_NEEDS_INIT
+ AM_GNU_GETTEXT_NEED([$2])
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+ gt_INTL_MACOSX
+
+ dnl Set USE_NLS.
+ AC_REQUIRE([AM_NLS])
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl Add a version number to the cache macros.
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH([included-gettext],
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+ [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ [eval "$gt_func_gnugettext_libc=yes"],
+ [eval "$gt_func_gnugettext_libc=no"])])
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ [$gt_func_gnugettext_libintl],
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [eval "$gt_func_gnugettext_libintl=yes"],
+ [eval "$gt_func_gnugettext_libintl=no"])
+ dnl Now see whether libintl exists and depends on libiconv.
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ CATOBJEXT=
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Some extra flags are needed during linking.
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE([ENABLE_NLS], [1],
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ AC_MSG_CHECKING([whether to use NLS])
+ AC_MSG_RESULT([$USE_NLS])
+ if test "$USE_NLS" = "yes"; then
+ AC_MSG_CHECKING([where the gettext function comes from])
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ AC_MSG_RESULT([$gt_source])
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE([HAVE_GETTEXT], [1],
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE([HAVE_DCGETTEXT], [1],
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST([BUILD_INCLUDED_LIBINTL])
+ AC_SUBST([USE_INCLUDED_LIBINTL])
+ AC_SUBST([CATOBJEXT])
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST([DATADIRNAME])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST([INSTOBJEXT])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST([GENCAT])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLOBJS=
+ if test "$USE_INCLUDED_LIBINTL" = yes; then
+ INTLOBJS="\$(GETTOBJS)"
+ fi
+ AC_SUBST([INTLOBJS])
+
+ dnl Enable libtool support if the surrounding package wishes it.
+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+ AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST([INTLLIBS])
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ AC_SUBST([POSUB])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+ m4_divert_text([DEFAULTS], [gt_needs=])
+ m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+ AC_DEFUN([gl_LOCK_EARLY], [])
diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4
new file mode 100644
index 0000000..0fec7d4
--- /dev/null
+++ b/m4/gettimeofday.m4
@@ -0,0 +1,101 @@
+# serial 12
+
+# Copyright (C) 2001-2003, 2005, 2007, 2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+
+AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+ AC_CHECK_FUNCS_ONCE([gettimeofday])
+
+ AC_CACHE_CHECK([for gettimeofday with POSIX signature],
+ [gl_cv_func_gettimeofday_posix_signature],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/time.h>
+ struct timeval c;
+ ]],
+ [[
+ int (*f) (struct timeval *restrict, void *restrict) = gettimeofday;
+ int x = f (&c, 0);
+ return !(x | c.tv_sec | c.tv_usec);
+ ]])],
+ [gl_cv_func_gettimeofday_posix_signature=yes],
+ [gl_cv_func_gettimeofday_posix_signature=no])])
+
+ gl_FUNC_GETTIMEOFDAY_CLOBBER
+
+ if test $gl_cv_func_gettimeofday_posix_signature != yes; then
+ REPLACE_GETTIMEOFDAY=1
+ SYS_TIME_H=sys/time.h
+ if test $gl_cv_func_gettimeofday_clobber != yes; then
+ AC_LIBOBJ([gettimeofday])
+ gl_PREREQ_GETTIMEOFDAY
+ fi
+ fi
+])
+
+
+dnl See if gettimeofday clobbers the static buffer that localtime uses
+dnl for its return value. The gettimeofday function from Mac OS X 10.0.4
+dnl (i.e., Darwin 1.3.7) has this problem.
+dnl
+dnl If it does, then arrange to use gettimeofday and localtime only via
+dnl the wrapper functions that work around the problem.
+
+AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
+[
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+
+ AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
+ [gl_cv_func_gettimeofday_clobber],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ #include <sys/time.h>
+ #include <time.h>
+ #include <stdlib.h>
+ ]],
+ [[
+ time_t t = 0;
+ struct tm *lt;
+ struct tm saved_lt;
+ struct timeval tv;
+ lt = localtime (&t);
+ saved_lt = *lt;
+ gettimeofday (&tv, NULL);
+ return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+ ]])],
+ [gl_cv_func_gettimeofday_clobber=no],
+ [gl_cv_func_gettimeofday_clobber=yes],
+ dnl When crosscompiling, assume it is broken.
+ [gl_cv_func_gettimeofday_clobber=yes])])
+
+ if test $gl_cv_func_gettimeofday_clobber = yes; then
+ REPLACE_GETTIMEOFDAY=1
+ SYS_TIME_H=sys/time.h
+ gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+ AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
+ [Define if gettimeofday clobbers the localtime buffer.])
+ fi
+])
+
+AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
+ AC_LIBOBJ([gettimeofday])
+ gl_PREREQ_GETTIMEOFDAY
+ AC_DEFINE([gmtime], [rpl_gmtime],
+ [Define to rpl_gmtime if the replacement function should be used.])
+ AC_DEFINE([localtime], [rpl_localtime],
+ [Define to rpl_localtime if the replacement function should be used.])
+])
+
+# Prerequisites of lib/gettimeofday.c.
+AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [
+ AC_CHECK_HEADERS([sys/timeb.h])
+ AC_CHECK_FUNCS([_ftime])
+])
diff --git a/m4/glibc21.m4 b/m4/glibc21.m4
new file mode 100644
index 0000000..93fbf47
--- /dev/null
+++ b/m4/glibc21.m4
@@ -0,0 +1,30 @@
+# glibc21.m4 serial 4
+dnl Copyright (C) 2000-2002, 2004, 2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gl_GLIBC21],
+ [
+ AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer],
+ [ac_cv_gnu_library_2_1],
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ [ac_cv_gnu_library_2_1=yes],
+ [ac_cv_gnu_library_2_1=no])
+ ]
+ )
+ AC_SUBST([GLIBC21])
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)
diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
new file mode 100644
index 0000000..c8fda20
--- /dev/null
+++ b/m4/gnulib-common.m4
@@ -0,0 +1,124 @@
+# gnulib-common.m4 serial 11
+dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_COMMON
+# is expanded unconditionally through gnulib-tool magic.
+AC_DEFUN([gl_COMMON], [
+ dnl Use AC_REQUIRE here, so that the code is expanded once only.
+ AC_REQUIRE([gl_00GNULIB])
+ AC_REQUIRE([gl_COMMON_BODY])
+])
+AC_DEFUN([gl_COMMON_BODY], [
+ AH_VERBATIM([isoc99_inline],
+[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+ __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE_CC__ tests for the Apple compiler and its version.
+ __STDC_VERSION__ tests for the C99 mode. */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif])
+ AH_VERBATIM([unused_parameter],
+[/* Define as a marker that can be attached to function parameter declarations
+ for parameters that are not used. This helps to reduce warnings, such as
+ from GCC -Wunused-parameter. */
+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _UNUSED_PARAMETER_ __attribute__ ((__unused__))
+#else
+# define _UNUSED_PARAMETER_
+#endif
+])
+])
+
+# gl_MODULE_INDICATOR([modulename])
+# defines a C macro indicating the presence of the given module.
+AC_DEFUN([gl_MODULE_INDICATOR],
+[
+ AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
+ [Define to 1 when using the gnulib module ]$1[.])
+])
+
+# 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])])])
+
+# AC_PROG_MKDIR_P
+# is a backport of autoconf-2.60's AC_PROG_MKDIR_P.
+# Remove this macro when we can assume autoconf >= 2.60.
+m4_ifdef([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 overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
+# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
+# works.
+# This definition can be removed once autoconf >= 2.62 can be assumed.
+AC_DEFUN([AC_C_RESTRICT],
+[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
+ [ac_cv_c_restrict=no
+ # The order here caters to the fact that C++ does not require restrict.
+ for ac_kw in __restrict __restrict__ _Restrict restrict; do
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[typedef int * int_ptr;
+ int foo (int_ptr $ac_kw ip) {
+ return ip[0];
+ }]],
+ [[int s[1];
+ int * $ac_kw t = s;
+ t[0] = 0;
+ return foo(t)]])],
+ [ac_cv_c_restrict=$ac_kw])
+ test "$ac_cv_c_restrict" != no && break
+ done
+ ])
+ AH_VERBATIM([restrict],
+[/* Define to the equivalent of the C99 'restrict' keyword, or to
+ nothing if this is not supported. Do not define if restrict is
+ supported directly. */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict, even
+ though the corresponding Sun C compiler does, which causes
+ "#define restrict _Restrict" in the previous line. Perhaps some future
+ version of Sun C++ will work with _Restrict; if so, it'll probably
+ define __RESTRICT, just as Sun C does. */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+#endif])
+ case $ac_cv_c_restrict in
+ restrict) ;;
+ no) AC_DEFINE([restrict], []) ;;
+ *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
+ esac
+])
+
+# gl_BIGENDIAN
+# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
+# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some
+# macros invoke AC_C_BIGENDIAN with arguments.
+AC_DEFUN([gl_BIGENDIAN],
+[
+ AC_C_BIGENDIAN
+])
+
+# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
+# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
+# output a spurious "(cached)" mark in the midst of other configure output.
+# This macro should be used instead of AC_CACHE_VAL when it is not surrounded
+# by an AC_MSG_CHECKING/AC_MSG_RESULT pair.
+AC_DEFUN([gl_CACHE_VAL_SILENT],
+[
+ saved_as_echo_n="$as_echo_n"
+ as_echo_n=':'
+ AC_CACHE_VAL([$1], [$2])
+ as_echo_n="$saved_as_echo_n"
+])
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
new file mode 100644
index 0000000..121e0db
--- /dev/null
+++ b/m4/gnulib-comp.m4
@@ -0,0 +1,405 @@
+# -*- buffer-read-only: t -*- vi: set ro:
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
+# Copyright (C) 2002-2009 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+#
+# This file represents the compiled summary of the specification in
+# gnulib-cache.m4. It lists the computed macro invocations that need
+# to be invoked from configure.ac.
+# In projects using CVS, this file can be treated like other built files.
+
+
+# This macro should be invoked from ./configure.ac, in the section
+# "Checks for programs", right after AC_PROG_CC, and certainly before
+# any checks for libraries, header files, types and library functions.
+AC_DEFUN([gl_EARLY],
+[
+ m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
+ m4_pattern_allow([^gl_ES$])dnl a valid locale name
+ m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
+ m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
+ AC_REQUIRE([AC_PROG_RANLIB])
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+])
+
+# This macro should be invoked from ./configure.ac, in the section
+# "Check for header files, types and library functions".
+AC_DEFUN([gl_INIT],
+[
+ AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
+ gl_cond_libtool=false
+ gl_libdeps=
+ gl_ltlibdeps=
+ m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
+ m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
+ m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
+ m4_pushdef([gl_LIBSOURCES_LIST], [])
+ m4_pushdef([gl_LIBSOURCES_DIR], [])
+ gl_COMMON
+ gl_source_base='lib'
+ gl_FUNC_ACL
+ gl_FUNC_ALLOCA
+ gl_FUNC_BTOWC
+ gl_WCHAR_MODULE_INDICATOR([btowc])
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ gl_ERROR
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_XGETTEXT_OPTION([--flag=error:3:c-format])
+ AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+ gl_EXITFAIL
+ gl_FUNC_GETDELIM
+ gl_STDIO_MODULE_INDICATOR([getdelim])
+ gl_FUNC_GETLINE
+ gl_STDIO_MODULE_INDICATOR([getline])
+ gl_GETOPT
+ dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
+ AM_GNU_GETTEXT_VERSION([0.17])
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ gl_FUNC_GETTIMEOFDAY
+ gl_INLINE
+ gl_LOCALCHARSET
+ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+ AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
+ gl_FUNC_LSTAT
+ gl_SYS_STAT_MODULE_INDICATOR([lstat])
+ AC_FUNC_MALLOC
+ AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.])
+ gl_FUNC_MALLOC_POSIX
+ gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+ gl_FUNC_MBRLEN
+ gl_WCHAR_MODULE_INDICATOR([mbrlen])
+ gl_FUNC_MBRTOWC
+ gl_WCHAR_MODULE_INDICATOR([mbrtowc])
+ gl_FUNC_MBSINIT
+ gl_WCHAR_MODULE_INDICATOR([mbsinit])
+ gl_FUNC_MKSTEMP
+ gl_STDLIB_MODULE_INDICATOR([mkstemp])
+ AC_REQUIRE([gl_MULTIARCH])
+ AC_FUNC_OBSTACK
+ dnl Note: AC_FUNC_OBSTACK does AC_LIBSOURCES([obstack.h, obstack.c]).
+ gl_PATHMAX
+ gl_QUOTE
+ gl_QUOTEARG
+ gl_FUNC_REALLOC_POSIX
+ gl_STDLIB_MODULE_INDICATOR([realloc-posix])
+ gl_REGEX
+ gt_TYPE_SSIZE_T
+ AM_STDBOOL_H
+ gl_STDINT_H
+ gl_STDIO_H
+ gl_STDLIB_H
+ gl_FUNC_STRERROR
+ gl_STRING_MODULE_INDICATOR([strerror])
+ gl_HEADER_STRING_H
+ gl_FUNC_STRVERSCMP
+ gl_STRING_MODULE_INDICATOR([strverscmp])
+ gl_HEADER_SYS_STAT_H
+ AC_PROG_MKDIR_P
+ gl_HEADER_SYS_TIME_H
+ AC_PROG_MKDIR_P
+ gl_FUNC_GEN_TEMPNAME
+ gl_UNISTD_H
+ gl_FUNC_GLIBC_UNLOCKED_IO
+ gl_WCHAR_H
+ gl_FUNC_WCRTOMB
+ gl_WCHAR_MODULE_INDICATOR([wcrtomb])
+ gl_FUNC_WCTOB
+ gl_WCHAR_MODULE_INDICATOR([wctob])
+ gl_WCTYPE_H
+ gl_XALLOC
+ m4_ifval(gl_LIBSOURCES_LIST, [
+ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
+ for gl_file in ]gl_LIBSOURCES_LIST[ ; do
+ if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
+ echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
+ exit 1
+ fi
+ done])dnl
+ m4_if(m4_sysval, [0], [],
+ [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
+ ])
+ m4_popdef([gl_LIBSOURCES_DIR])
+ m4_popdef([gl_LIBSOURCES_LIST])
+ m4_popdef([AC_LIBSOURCES])
+ m4_popdef([AC_REPLACE_FUNCS])
+ m4_popdef([AC_LIBOBJ])
+ AC_CONFIG_COMMANDS_PRE([
+ gl_libobjs=
+ gl_ltlibobjs=
+ if test -n "$gl_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
+ gl_libobjs="$gl_libobjs $i.$ac_objext"
+ gl_ltlibobjs="$gl_ltlibobjs $i.lo"
+ done
+ fi
+ AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
+ AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
+ ])
+ gltests_libdeps=
+ gltests_ltlibdeps=
+ m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
+ m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
+ m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
+ m4_pushdef([gltests_LIBSOURCES_LIST], [])
+ m4_pushdef([gltests_LIBSOURCES_DIR], [])
+ gl_COMMON
+ gl_source_base='tests'
+ m4_ifval(gltests_LIBSOURCES_LIST, [
+ m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
+ for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
+ if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
+ echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
+ exit 1
+ fi
+ done])dnl
+ m4_if(m4_sysval, [0], [],
+ [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
+ ])
+ m4_popdef([gltests_LIBSOURCES_DIR])
+ m4_popdef([gltests_LIBSOURCES_LIST])
+ m4_popdef([AC_LIBSOURCES])
+ m4_popdef([AC_REPLACE_FUNCS])
+ m4_popdef([AC_LIBOBJ])
+ AC_CONFIG_COMMANDS_PRE([
+ gltests_libobjs=
+ gltests_ltlibobjs=
+ if test -n "$gltests_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
+ gltests_libobjs="$gltests_libobjs $i.$ac_objext"
+ gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
+ done
+ fi
+ AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
+ AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
+ ])
+ LIBSED_LIBDEPS="$gl_libdeps"
+ AC_SUBST([LIBSED_LIBDEPS])
+ LIBSED_LTLIBDEPS="$gl_ltlibdeps"
+ AC_SUBST([LIBSED_LTLIBDEPS])
+])
+
+# Like AC_LIBOBJ, except that the module name goes
+# into gl_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gl_LIBOBJ], [
+ AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
+ gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
+])
+
+# Like AC_REPLACE_FUNCS, except that the module name goes
+# into gl_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gl_REPLACE_FUNCS], [
+ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+ AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
+])
+
+# Like AC_LIBSOURCES, except the directory where the source file is
+# expected is derived from the gnulib-tool parameterization,
+# and alloca is special cased (for the alloca-opt module).
+# We could also entirely rely on EXTRA_lib..._SOURCES.
+AC_DEFUN([gl_LIBSOURCES], [
+ m4_foreach([_gl_NAME], [$1], [
+ m4_if(_gl_NAME, [alloca.c], [], [
+ m4_define([gl_LIBSOURCES_DIR], [lib])
+ m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
+ ])
+ ])
+])
+
+# Like AC_LIBOBJ, except that the module name goes
+# into gltests_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gltests_LIBOBJ], [
+ AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
+ gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
+])
+
+# Like AC_REPLACE_FUNCS, except that the module name goes
+# into gltests_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gltests_REPLACE_FUNCS], [
+ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+ AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
+])
+
+# Like AC_LIBSOURCES, except the directory where the source file is
+# expected is derived from the gnulib-tool parameterization,
+# and alloca is special cased (for the alloca-opt module).
+# We could also entirely rely on EXTRA_lib..._SOURCES.
+AC_DEFUN([gltests_LIBSOURCES], [
+ m4_foreach([_gl_NAME], [$1], [
+ m4_if(_gl_NAME, [alloca.c], [], [
+ m4_define([gltests_LIBSOURCES_DIR], [tests])
+ m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
+ ])
+ ])
+])
+
+# This macro records the list of files which have been installed by
+# gnulib-tool and may be removed by future gnulib-tool invocations.
+AC_DEFUN([gl_FILE_LIST], [
+ build-aux/config.rpath
+ build-aux/link-warning.h
+ lib/acl-internal.h
+ lib/acl.h
+ lib/acl_entries.c
+ lib/alloca.c
+ lib/alloca.in.h
+ lib/btowc.c
+ lib/config.charset
+ lib/copy-acl.c
+ lib/errno.in.h
+ lib/error.c
+ lib/error.h
+ lib/exitfail.c
+ lib/exitfail.h
+ lib/file-has-acl.c
+ lib/getdelim.c
+ lib/getline.c
+ lib/getopt.c
+ lib/getopt.in.h
+ lib/getopt1.c
+ lib/getopt_int.h
+ lib/gettext.h
+ lib/gettimeofday.c
+ lib/intprops.h
+ lib/localcharset.c
+ lib/localcharset.h
+ lib/lstat.c
+ lib/malloc.c
+ lib/mbrlen.c
+ lib/mbrtowc.c
+ lib/mbsinit.c
+ lib/mkstemp.c
+ lib/obstack.c
+ lib/obstack.h
+ lib/pathmax.h
+ lib/quote.c
+ lib/quote.h
+ lib/quotearg.c
+ lib/quotearg.h
+ lib/realloc.c
+ lib/ref-add.sin
+ lib/ref-del.sin
+ lib/regcomp.c
+ lib/regex.c
+ lib/regex.h
+ lib/regex_internal.c
+ lib/regex_internal.h
+ lib/regexec.c
+ lib/set-mode-acl.c
+ lib/stat-macros.h
+ lib/stdbool.in.h
+ lib/stdint.in.h
+ lib/stdio-write.c
+ lib/stdio.in.h
+ lib/stdlib.in.h
+ lib/streq.h
+ lib/strerror.c
+ lib/string.in.h
+ lib/strverscmp.c
+ lib/sys_stat.in.h
+ lib/sys_time.in.h
+ lib/tempname.c
+ lib/tempname.h
+ lib/unistd.in.h
+ lib/unlocked-io.h
+ lib/verify.h
+ lib/wchar.in.h
+ lib/wcrtomb.c
+ lib/wctob.c
+ lib/wctype.in.h
+ lib/xalloc-die.c
+ lib/xalloc.h
+ lib/xmalloc.c
+ m4/00gnulib.m4
+ m4/acl.m4
+ m4/alloca.m4
+ m4/btowc.m4
+ m4/codeset.m4
+ m4/errno_h.m4
+ m4/error.m4
+ m4/exitfail.m4
+ m4/extensions.m4
+ m4/getdelim.m4
+ m4/getline.m4
+ m4/getopt.m4
+ m4/gettext.m4
+ m4/gettimeofday.m4
+ m4/glibc2.m4
+ m4/glibc21.m4
+ m4/gnulib-common.m4
+ m4/iconv.m4
+ m4/include_next.m4
+ m4/inline.m4
+ m4/intdiv0.m4
+ m4/intl.m4
+ m4/intldir.m4
+ m4/intlmacosx.m4
+ m4/intmax.m4
+ m4/inttypes-pri.m4
+ m4/inttypes_h.m4
+ m4/lcmessage.m4
+ m4/lib-ld.m4
+ m4/lib-link.m4
+ m4/lib-prefix.m4
+ m4/localcharset.m4
+ m4/locale-fr.m4
+ m4/locale-ja.m4
+ m4/locale-zh.m4
+ m4/lock.m4
+ m4/longlong.m4
+ m4/lstat.m4
+ m4/malloc.m4
+ m4/mbrlen.m4
+ m4/mbrtowc.m4
+ m4/mbsinit.m4
+ m4/mbstate_t.m4
+ m4/mkstemp.m4
+ m4/multiarch.m4
+ m4/nls.m4
+ m4/pathmax.m4
+ m4/po.m4
+ m4/printf-posix.m4
+ m4/progtest.m4
+ m4/quote.m4
+ m4/quotearg.m4
+ m4/realloc.m4
+ m4/regex.m4
+ m4/size_max.m4
+ m4/ssize_t.m4
+ m4/stdbool.m4
+ m4/stdint.m4
+ m4/stdint_h.m4
+ m4/stdio_h.m4
+ m4/stdlib_h.m4
+ m4/strerror.m4
+ m4/string_h.m4
+ m4/strverscmp.m4
+ m4/sys_stat_h.m4
+ m4/sys_time_h.m4
+ m4/tempname.m4
+ m4/threadlib.m4
+ m4/uintmax_t.m4
+ m4/unistd_h.m4
+ m4/unlocked-io.m4
+ m4/visibility.m4
+ m4/wchar.m4
+ m4/wchar_t.m4
+ m4/wcrtomb.m4
+ m4/wctob.m4
+ m4/wctype.m4
+ m4/wint_t.m4
+ m4/xalloc.m4
+ m4/xsize.m4
+])
diff --git a/m4/iconv.m4 b/m4/iconv.m4
new file mode 100644
index 0000000..3cc6268
--- /dev/null
+++ b/m4/iconv.m4
@@ -0,0 +1,180 @@
+# iconv.m4 serial AM7 (gettext-0.18)
+dnl Copyright (C) 2000-2002, 2007-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_func_iconv=yes])
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_lib_iconv=yes]
+ [am_cv_func_iconv=yes])
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE([HAVE_ICONV], [1],
+ [Define if you have the iconv() function and it works.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST([LIBICONV])
+ AC_SUBST([LTLIBICONV])
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL([am_cv_proto_iconv], [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([${ac_t:-
+ }$am_cv_proto_iconv])
+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
diff --git a/m4/include_next.m4 b/m4/include_next.m4
new file mode 100644
index 0000000..d6101fe
--- /dev/null
+++ b/m4/include_next.m4
@@ -0,0 +1,171 @@
+# include_next.m4 serial 12
+dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert and Derek Price.
+
+dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER.
+dnl
+dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
+dnl 'include' otherwise.
+dnl
+dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler
+dnl supports it in the special case that it is the first include directive in
+dnl the given file, or to 'include' otherwise.
+dnl
+dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next,
+dnl so as to avoid GCC warnings when the gcc option -pedantic is used.
+dnl '#pragma GCC system_header' has the same effect as if the file was found
+dnl through the include search path specified with '-isystem' options (as
+dnl opposed to the search path specified with '-I' options). Namely, gcc
+dnl does not warn about some things, and on some systems (Solaris and Interix)
+dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side
+dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead
+dnl of plain '__STDC__'.
+
+AC_DEFUN([gl_INCLUDE_NEXT],
+[
+ AC_LANG_PREPROC_REQUIRE()
+ AC_CACHE_CHECK([whether the preprocessor supports include_next],
+ [gl_cv_have_include_next],
+ [rm -rf conftestd1a conftestd1b conftestd2
+ mkdir conftestd1a conftestd1b conftestd2
+ dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on
+ dnl AIX 6.1 support include_next when used as first preprocessor directive
+ dnl in a file, but not when preceded by another include directive. Check
+ dnl for this bug by including <stdio.h>.
+ dnl Additionally, with this same compiler, include_next is a no-op when
+ dnl used in a header file that was included by specifying its absolute
+ dnl file name. Despite these two bugs, include_next is used in the
+ dnl compiler's <math.h>. By virtue of the second bug, we need to use
+ dnl include_next as well in this case.
+ cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd1b/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd2/conftest.h
+#ifndef DEFINED_IN_CONFTESTD1
+#error "include_next test doesn't work"
+#endif
+#define DEFINED_IN_CONFTESTD2
+EOF
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+ AC_COMPILE_IFELSE([#include <conftest.h>],
+ [gl_cv_have_include_next=yes],
+ [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+ AC_COMPILE_IFELSE([#include <conftest.h>],
+ [gl_cv_have_include_next=buggy],
+ [gl_cv_have_include_next=no])
+ ])
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ rm -rf conftestd1a conftestd1b conftestd2
+ ])
+ PRAGMA_SYSTEM_HEADER=
+ if test $gl_cv_have_include_next = yes; then
+ INCLUDE_NEXT=include_next
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ if test -n "$GCC"; then
+ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+ fi
+ else
+ if test $gl_cv_have_include_next = buggy; then
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ else
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
+ fi
+ fi
+ AC_SUBST([INCLUDE_NEXT])
+ AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
+ AC_SUBST([PRAGMA_SYSTEM_HEADER])
+])
+
+# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
+# ------------------------------------------
+# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be
+# '<foo.h>'; otherwise define it to be
+# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
+# That way, a header file with the following line:
+# #@INCLUDE_NEXT@ @NEXT_FOO_H@
+# behaves (after sed substitution) as if it contained
+# #include_next <foo.h>
+# even if the compiler does not support include_next.
+# The three "///" are to pacify Sun C 5.8, which otherwise would say
+# "warning: #include of /usr/include/... may be non-portable".
+# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
+# Note: This macro assumes that the header file is not empty after
+# preprocessing, i.e. it does not only define preprocessor macros but also
+# provides some type/enum definitions or function/variable declarations.
+AC_DEFUN([gl_CHECK_NEXT_HEADERS],
+[
+ AC_REQUIRE([gl_INCLUDE_NEXT])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_HEADERS_ONCE([$1])
+
+ m4_foreach_w([gl_HEADER_NAME], [$1],
+ [AS_VAR_PUSHDEF([gl_next_header],
+ [gl_cv_next_]m4_quote(m4_defn([gl_HEADER_NAME])))
+ if test $gl_cv_have_include_next = yes; then
+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ else
+ AC_CACHE_CHECK(
+ [absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>],
+ m4_quote(m4_defn([gl_next_header])),
+ [AS_VAR_PUSHDEF([gl_header_exists],
+ [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))
+ if test AS_VAR_GET(gl_header_exists) = yes; then
+ AC_LANG_CONFTEST(
+ [AC_LANG_SOURCE(
+ [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
+ )])
+ dnl AIX "xlc -E" and "cc -E" omit #line directives for header files
+ dnl that contain only a #include of other header files and no
+ dnl non-comment tokens of their own. This leads to a failure to
+ dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
+ dnl and others. The workaround is to force preservation of comments
+ dnl through option -C. This ensures all necessary #line directives
+ dnl are present. GCC supports option -C as well.
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ dnl eval is necessary to expand gl_absname_cpp.
+ dnl Ultrix and Pyramid sh refuse to redirect output of eval,
+ dnl so use subshell.
+ AS_VAR_SET([gl_next_header],
+ ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+ sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{
+ s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'])
+ else
+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ fi
+ AS_VAR_POPDEF([gl_header_exists])])
+ fi
+ AC_SUBST(
+ AS_TR_CPP([NEXT_]m4_quote(m4_defn([gl_HEADER_NAME]))),
+ [AS_VAR_GET([gl_next_header])])
+ AS_VAR_POPDEF([gl_next_header])])
+])
diff --git a/m4/inline.m4 b/m4/inline.m4
new file mode 100644
index 0000000..cee5109
--- /dev/null
+++ b/m4/inline.m4
@@ -0,0 +1,40 @@
+# inline.m4 serial 4
+dnl Copyright (C) 2006, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Test for the 'inline' keyword or equivalent.
+dnl Define 'inline' to a supported equivalent, or to nothing if not supported,
+dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an
+dnl equivalent is effectively supported, i.e. if the compiler is likely to
+dnl drop unused 'static inline' functions.
+AC_DEFUN([gl_INLINE],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_CACHE_CHECK([whether the compiler generally respects inline],
+ [gl_cv_c_inline_effective],
+ [if test $ac_cv_c_inline = no; then
+ gl_cv_c_inline_effective=no
+ else
+ dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is
+ dnl specified.
+ dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result
+ dnl depends on optimization flags, which can be in CFLAGS.
+ dnl (AC_EGREP_CPP looks only at the CPPFLAGS.)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]],
+ [[#ifdef __NO_INLINE__
+ #error "inline is not effective"
+ #endif]])],
+ [gl_cv_c_inline_effective=yes],
+ [gl_cv_c_inline_effective=no])
+ fi
+ ])
+ if test $gl_cv_c_inline_effective = yes; then
+ AC_DEFINE([HAVE_INLINE], [1],
+ [Define to 1 if the compiler supports one of the keywords
+ 'inline', '__inline__', '__inline' and effectively inlines
+ functions marked as such.])
+ fi
+])
diff --git a/m4/intlmacosx.m4 b/m4/intlmacosx.m4
new file mode 100644
index 0000000..c24837c
--- /dev/null
+++ b/m4/intlmacosx.m4
@@ -0,0 +1,51 @@
+# intlmacosx.m4 serial 3 (gettext-0.18)
+dnl Copyright (C) 2004-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+ dnl Check for API introduced in MacOS X 10.2.
+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+ [gt_cv_func_CFPreferencesCopyAppValue],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
+ [CFPreferencesCopyAppValue(NULL, NULL)],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+ [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ fi
+ dnl Check for API introduced in MacOS X 10.3.
+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+ [gt_cv_func_CFLocaleCopyCurrent=yes],
+ [gt_cv_func_CFLocaleCopyCurrent=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
+ [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
diff --git a/config/lib-ld.m4 b/m4/lib-ld.m4
index ddb5732..e4863f2 100644
--- a/config/lib-ld.m4
+++ b/m4/lib-ld.m4
@@ -1,10 +1,8 @@
-# lib-ld.m4 serial 1 (gettext-0.11)
-dnl Copyright (C) 1996-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
+# lib-ld.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
dnl Subroutines of libtool.m4,
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
@@ -12,23 +10,37 @@ dnl with libtool.m4.
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- acl_cv_prog_gnu_ld=yes
-else
- acl_cv_prog_gnu_ld=no
-fi])
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
with_gnu_ld=$acl_cv_prog_gnu_ld
])
dnl From libtool-1.4. Sets the variable LD.
AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
+[AC_ARG_WITH([gnu-ld],
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
@@ -65,7 +77,7 @@ elif test "$with_gnu_ld" = yes; then
else
AC_MSG_CHECKING([for non-GNU ld])
fi
-AC_CACHE_VAL(acl_cv_path_LD,
+AC_CACHE_VAL([acl_cv_path_LD],
[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
@@ -75,11 +87,12 @@ AC_CACHE_VAL(acl_cv_path_LD,
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
- else
- test "$with_gnu_ld" != yes && break
- fi
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
fi
done
IFS="$ac_save_ifs"
@@ -88,9 +101,9 @@ else
fi])
LD="$acl_cv_path_LD"
if test -n "$LD"; then
- AC_MSG_RESULT($LD)
+ AC_MSG_RESULT([$LD])
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT([no])
fi
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_LIB_PROG_LD_GNU
diff --git a/config/lib-link.m4 b/m4/lib-link.m4
index a16aa44..2144203 100644
--- a/config/lib-link.m4
+++ b/m4/lib-link.m4
@@ -1,58 +1,66 @@
-# lib-link.m4 serial 1 (gettext-0.11)
-dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
+# lib-link.m4 serial 19 (gettext-0.18)
+dnl Copyright (C) 2001-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
+AC_PREREQ([2.54])
+
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
dnl the libraries corresponding to explicit and implicit dependencies.
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
AC_LIB_LINKFLAGS_BODY([$1], [$2])
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
])
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
dnl results of this search when this library appears as a dependency.
HAVE_LIB[]NAME=yes
- undefine([Name])
- undefine([NAME])
+ popdef([NAME])
+ popdef([Name])
])
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
dnl searches for libname and the libraries corresponding to explicit and
dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- define([Name],[translit([$1],[./-], [___])])
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
dnl accordingly.
@@ -67,12 +75,14 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LIB[]NAME"
- AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ AC_TRY_LINK([$3], [$4],
+ [ac_cv_lib[]Name=yes],
+ [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
LIBS="$ac_save_LIBS"
])
if test "$ac_cv_lib[]Name" = yes; then
HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib[]$1 library.])
AC_MSG_CHECKING([how to link with lib[]$1])
AC_MSG_RESULT([$LIB[]NAME])
else
@@ -82,25 +92,32 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
CPPFLAGS="$ac_save_CPPFLAGS"
LIB[]NAME=
LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
fi
AC_SUBST([HAVE_LIB]NAME)
AC_SUBST([LIB]NAME)
AC_SUBST([LTLIB]NAME)
- undefine([Name])
- undefine([NAME])
+ AC_SUBST([LIB]NAME[_PREFIX])
+ popdef([NAME])
+ popdef([Name])
])
dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L,
-dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec.
+dnl acl_libext,
+dnl acl_shlibext,
+dnl acl_hardcode_libdir_flag_spec,
+dnl acl_hardcode_libdir_separator,
+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])])
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
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
. ./conftest.sh
@@ -108,32 +125,66 @@ AC_DEFUN([AC_LIB_RPATH],
acl_cv_rpath=done
])
wl="$acl_cv_wl"
- libext="$acl_cv_libext"
- shlibext="$acl_cv_shlibext"
- hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- hardcode_direct="$acl_cv_hardcode_direct"
- hardcode_minus_L="$acl_cv_hardcode_minus_L"
- sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec"
- sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE([rpath],
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_frompackage_]NAME, [$2])
+ popdef([NAME])
+ pushdef([PACK],[$2])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_libsinpackage_]PACKUP,
+ m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
+ popdef([PACKUP])
+ popdef([PACK])
])
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
dnl the libraries corresponding to explicit and implicit dependencies.
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
[
- define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+ pushdef([PACKUP],[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],[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([lib$1-prefix],
-[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
- --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
+ AC_ARG_WITH(P_A_C_K[-prefix],
+[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
[
if test "X$withval" = "Xno"; then
use_additional=no
@@ -145,7 +196,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
])
else
additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
fi
fi
])
@@ -154,6 +209,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
LIB[]NAME=
LTLIB[]NAME=
INC[]NAME=
+ LIB[]NAME[]_PREFIX=
rpathdirs=
ltrpathdirs=
names_already_handled=
@@ -193,22 +249,55 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
found_la=
found_so=
found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
if test $use_additional = yes; then
- if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
- found_dir="$additional_libdir"
- found_so="$additional_libdir/lib$name.$shlibext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
- fi
- else
- if test -f "$additional_libdir/lib$name.$libext"; then
- found_dir="$additional_libdir"
- found_a="$additional_libdir/lib$name.$libext"
- if test -f "$additional_libdir/lib$name.la"; then
- found_la="$additional_libdir/lib$name.la"
+ dir="$additional_libdir"
+ dnl The same code as in the loop below:
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
fi
fi
fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
fi
if test "X$found_dir" = "X"; then
for x in $LDFLAGS $LTLIB[]NAME; do
@@ -216,21 +305,46 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
case "$x" in
-L*)
dir=`echo "X$x" | sed -e 's/^X-L//'`
- if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
- found_dir="$dir"
- found_so="$dir/lib$name.$shlibext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
- fi
- else
- if test -f "$dir/lib$name.$libext"; then
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
found_dir="$dir"
- found_a="$dir/lib$name.$libext"
- if test -f "$dir/lib$name.la"; then
- found_la="$dir/lib$name.la"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
fi
fi
fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
;;
esac
if test "X$found_dir" != "X"; then
@@ -245,7 +359,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl Linking with a shared library. We attempt to hardcode its
dnl directory into the executable's runpath, unless it's the
dnl standard /usr/lib.
- if test "X$found_dir" = "X/usr/lib"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
dnl No hardcoding is needed.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
@@ -264,12 +380,12 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
ltrpathdirs="$ltrpathdirs $found_dir"
fi
dnl The hardcoding into $LIBNAME is system dependent.
- if test "$hardcode_direct" = yes; then
+ if test "$acl_hardcode_direct" = yes; then
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
dnl resulting binary.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
- if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
dnl Use an explicit option to hardcode DIR into the resulting
dnl binary.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
@@ -300,13 +416,13 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
if test -z "$haveit"; then
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
fi
- if test "$hardcode_minus_L" != no; then
+ if test "$acl_hardcode_minus_L" != no; then
dnl FIXME: Not sure whether we should use
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
dnl here.
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
else
- dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
dnl here, because this doesn't fit in flags passed to the
dnl compiler. So give up. No hardcoding. This affects only
dnl very old systems.
@@ -331,8 +447,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl Assume the include files are nearby.
additional_includedir=
case "$found_dir" in
- */lib | */lib/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
additional_includedir="$basedir/include"
;;
esac
@@ -349,7 +475,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
if test "X$additional_includedir" = "X/usr/local/include"; then
if test -n "$GCC"; then
case $host_os in
- linux*) haveit=yes;;
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
@@ -393,12 +519,14 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl 3. if it's already present in $LDFLAGS or the already
dnl constructed $LIBNAME,
dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
haveit=
- if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
if test -n "$GCC"; then
case $host_os in
- linux*) haveit=yes;;
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
@@ -434,6 +562,35 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
fi
fi
;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
-l*)
dnl Handle this in the next round.
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
@@ -465,18 +622,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
done
done
if test "X$rpathdirs" != "X"; then
- if test -n "$hardcode_libdir_separator"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
dnl Weird platform: only the last -rpath option counts, the user must
dnl pass all path elements in one option. We can arrange that for a
dnl single library, but not when more than one $LIBNAMEs are used.
alldirs=
for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
done
- dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
acl_save_libdir="$libdir"
libdir="$alldirs"
- eval flag=\"$hardcode_libdir_flag_spec\"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
else
@@ -484,7 +641,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
for found_dir in $rpathdirs; do
acl_save_libdir="$libdir"
libdir="$found_dir"
- eval flag=\"$hardcode_libdir_flag_spec\"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
libdir="$acl_save_libdir"
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
done
@@ -497,6 +654,11 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
done
fi
+ popdef([P_A_C_K])
+ popdef([PACKLIBS])
+ popdef([PACKUP])
+ popdef([PACK])
+ popdef([NAME])
])
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
@@ -519,3 +681,81 @@ AC_DEFUN([AC_LIB_APPENDTOVAR],
fi
done
])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
diff --git a/config/lib-prefix.m4 b/m4/lib-prefix.m4
index b8b79ab..4b7ee33 100644
--- a/config/lib-prefix.m4
+++ b/m4/lib-prefix.m4
@@ -1,13 +1,18 @@
-# lib-prefix.m4 serial 1 (gettext-0.11)
-dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
+# lib-prefix.m4 serial 7 (gettext-0.18)
+dnl Copyright (C) 2001-2005, 2008-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
+dnl 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
@@ -19,6 +24,7 @@ AC_DEFUN([AC_LIB_PREFIX],
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
dnl By default, look in $includedir and $libdir.
use_additional=yes
@@ -26,7 +32,7 @@ AC_DEFUN([AC_LIB_PREFIX],
eval additional_includedir=\"$includedir\"
eval additional_libdir=\"$libdir\"
])
- AC_ARG_WITH([lib-prefix],
+ 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],
[
@@ -40,7 +46,7 @@ AC_DEFUN([AC_LIB_PREFIX],
])
else
additional_includedir="$withval/include"
- additional_libdir="$withval/lib"
+ additional_libdir="$withval/$acl_libdirstem"
fi
fi
])
@@ -64,7 +70,7 @@ AC_DEFUN([AC_LIB_PREFIX],
if test "X$additional_includedir" = "X/usr/local/include"; then
if test -n "$GCC"; then
case $host_os in
- linux*) haveit=yes;;
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
esac
fi
fi
@@ -82,7 +88,7 @@ AC_DEFUN([AC_LIB_PREFIX],
dnl 2. if it's already present in $LDFLAGS,
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/lib"; then
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
haveit=
for x in $LDFLAGS; do
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
@@ -92,7 +98,7 @@ AC_DEFUN([AC_LIB_PREFIX],
fi
done
if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
if test -n "$GCC"; then
case $host_os in
linux*) haveit=yes;;
@@ -146,3 +152,73 @@ AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
exec_prefix="$acl_save_exec_prefix"
prefix="$acl_save_prefix"
])
+
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl "lib/amd64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib and lib64.
+ dnl On glibc systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+ dnl the compiler's default mode by looking at the compiler's library search
+ dnl path. If at least one of its elements ends in /lib64 or points to a
+ dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+ dnl Otherwise we use the default, namely "lib".
+ dnl On Solaris systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+ dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+ dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+ dnl symlink is missing, so we set acl_libdirstem2 too.
+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+ [AC_EGREP_CPP([sixtyfour bits], [
+#ifdef _LP64
+sixtyfour bits
+#endif
+ ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
+ ])
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+])
diff --git a/m4/localcharset.m4 b/m4/localcharset.m4
new file mode 100644
index 0000000..e960104
--- /dev/null
+++ b/m4/localcharset.m4
@@ -0,0 +1,16 @@
+# localcharset.m4 serial 6
+dnl Copyright (C) 2002, 2004, 2006, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_LOCALCHARSET],
+[
+ dnl Prerequisites of lib/localcharset.c.
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ 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
new file mode 100644
index 0000000..653a5bc
--- /dev/null
+++ b/m4/locale-fr.m4
@@ -0,0 +1,185 @@
+# locale-fr.m4 serial 11
+dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of a french locale with traditional encoding.
+AC_DEFUN([gt_LOCALE_FR],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_FR=$gt_cv_locale_fr
+ AC_SUBST([LOCALE_FR])
+])
+
+dnl Determine the name of a french locale with UTF-8 encoding.
+AC_DEFUN([gt_LOCALE_FR_UTF8],
+[
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+ AC_SUBST([LOCALE_FR_UTF8])
+])
diff --git a/m4/locale-ja.m4 b/m4/locale-ja.m4
new file mode 100644
index 0000000..9360576
--- /dev/null
+++ b/m4/locale-ja.m4
@@ -0,0 +1,107 @@
+# locale-ja.m4 serial 7
+dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of a japanese locale with EUC-JP encoding.
+AC_DEFUN([gt_LOCALE_JA],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_JA=$gt_cv_locale_ja
+ AC_SUBST([LOCALE_JA])
+])
diff --git a/m4/locale-zh.m4 b/m4/locale-zh.m4
new file mode 100644
index 0000000..36a5f1d
--- /dev/null
+++ b/m4/locale-zh.m4
@@ -0,0 +1,92 @@
+# locale-zh.m4 serial 6
+dnl Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of a chinese locale with GB18030 encoding.
+AC_DEFUN([gt_LOCALE_ZH_CN],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+ AC_SUBST([LOCALE_ZH_CN])
+])
diff --git a/m4/longlong.m4 b/m4/longlong.m4
new file mode 100644
index 0000000..eedc8d5
--- /dev/null
+++ b/m4/longlong.m4
@@ -0,0 +1,106 @@
+# longlong.m4 serial 14
+dnl Copyright (C) 1999-2007, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG_INT if 'long long int' works.
+# This fixes a bug in Autoconf 2.61, but can be removed once we
+# assume 2.62 everywhere.
+
+# 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
+# defined. In this case you can treat 'long long int' like 'long int'.
+
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+ [AC_LINK_IFELSE(
+ [_AC_TYPE_LONG_LONG_SNIPPET],
+ [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+ dnl If cross compiling, assume the bug isn't important, since
+ dnl nobody cross compiles for this platform as far as we know.
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[@%:@include <limits.h>
+ @%:@ifndef LLONG_MAX
+ @%:@ define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ @%:@ define LLONG_MAX (HALF - 1 + HALF)
+ @%:@endif]],
+ [[long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;]])],
+ [ac_cv_type_long_long_int=yes],
+ [ac_cv_type_long_long_int=no],
+ [ac_cv_type_long_long_int=yes])],
+ [ac_cv_type_long_long_int=no])])
+ if test $ac_cv_type_long_long_int = yes; then
+ AC_DEFINE([HAVE_LONG_LONG_INT], [1],
+ [Define to 1 if the system has the type `long long int'.])
+ fi
+])
+
+# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
+# This fixes a bug in Autoconf 2.61, but can be removed once we
+# assume 2.62 everywhere.
+
+# 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
+# will not be defined. In this case you can treat 'unsigned long long int'
+# like 'unsigned long int'.
+
+AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
+[
+ AC_CACHE_CHECK([for unsigned long long int],
+ [ac_cv_type_unsigned_long_long_int],
+ [AC_LINK_IFELSE(
+ [_AC_TYPE_LONG_LONG_SNIPPET],
+ [ac_cv_type_unsigned_long_long_int=yes],
+ [ac_cv_type_unsigned_long_long_int=no])])
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
+ [Define to 1 if the system has the type `unsigned long long int'.])
+ fi
+])
+
+# Expands to a C program that can be used to test for simultaneous support
+# of 'long long' and 'unsigned long long'. We don't want to say that
+# 'long long' is available if 'unsigned long long' is not, or vice versa,
+# because too many programs rely on the symmetry between signed and unsigned
+# integer types (excluding 'bool').
+AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
+[
+ AC_LANG_PROGRAM(
+ [[/* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;]],
+ [[/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));]])
+])
diff --git a/m4/lstat.m4 b/m4/lstat.m4
new file mode 100644
index 0000000..74c78fe
--- /dev/null
+++ b/m4/lstat.m4
@@ -0,0 +1,26 @@
+# serial 19
+
+# Copyright (C) 1997-2001, 2003-2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+
+AC_DEFUN([gl_FUNC_LSTAT],
+[
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ dnl If lstat does not exist, the replacement <sys/stat.h> does
+ dnl "#define lstat stat", and lstat.c does not need to be compiled.
+ AC_CHECK_FUNCS_ONCE([lstat])
+ if test $ac_cv_func_lstat = yes; then
+ AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
+ dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
+ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+ REPLACE_LSTAT=1
+ fi
+ # Prerequisites of lib/lstat.c.
+ AC_REQUIRE([AC_C_INLINE])
+ fi
+])
diff --git a/m4/malloc.m4 b/m4/malloc.m4
new file mode 100644
index 0000000..8070171
--- /dev/null
+++ b/m4/malloc.m4
@@ -0,0 +1,41 @@
+# malloc.m4 serial 9
+dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_FUNC_MALLOC_POSIX
+# --------------------
+# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
+# fails), and replace malloc if it is not.
+AC_DEFUN([gl_FUNC_MALLOC_POSIX],
+[
+ AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+ if test $gl_cv_func_malloc_posix = yes; then
+ HAVE_MALLOC_POSIX=1
+ AC_DEFINE([HAVE_MALLOC_POSIX], [1],
+ [Define if the 'malloc' function is POSIX compliant.])
+ else
+ AC_LIBOBJ([malloc])
+ HAVE_MALLOC_POSIX=0
+ fi
+ AC_SUBST([HAVE_MALLOC_POSIX])
+])
+
+# Test whether malloc, realloc, calloc are POSIX compliant,
+# Set gl_cv_func_malloc_posix to yes or no accordingly.
+AC_DEFUN([gl_CHECK_MALLOC_POSIX],
+[
+ AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant],
+ [gl_cv_func_malloc_posix],
+ [
+ dnl It is too dangerous to try to allocate a large amount of memory:
+ dnl some systems go to their knees when you do that. So assume that
+ dnl all Unix implementations of the function are POSIX compliant.
+ AC_TRY_COMPILE([],
+ [#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ choke me
+ #endif
+ ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no])
+ ])
+])
diff --git a/m4/mbrlen.m4 b/m4/mbrlen.m4
new file mode 100644
index 0000000..5623ed5
--- /dev/null
+++ b/m4/mbrlen.m4
@@ -0,0 +1,197 @@
+# mbrlen.m4 serial 2
+dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBRLEN],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_REQUIRE([gl_FUNC_MBRTOWC])
+ AC_CHECK_FUNCS_ONCE([mbrlen])
+ if test $ac_cv_func_mbrlen = no; then
+ HAVE_MBRLEN=0
+ else
+ dnl Most bugs affecting the system's mbrtowc function also affect the
+ dnl mbrlen function. So override mbrlen whenever mbrtowc is overridden.
+ dnl We could also run the individual tests below; the results would be
+ dnl the same.
+ if test $REPLACE_MBRTOWC = 1; then
+ REPLACE_MBRLEN=1
+ fi
+ fi
+ if test $HAVE_MBRLEN = 0 || test $REPLACE_MBRLEN = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([mbrlen])
+ gl_PREREQ_MBRLEN
+ fi
+])
+
+dnl Test whether mbrlen puts the state into non-initial state when parsing an
+dnl incomplete multibyte character.
+dnl Result is gl_cv_func_mbrlen_incomplete_state.
+
+AC_DEFUN([gl_MBRLEN_INCOMPLETE_STATE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrlen handles incomplete characters],
+ [gl_cv_func_mbrlen_incomplete_state],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrlen_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrlen_incomplete_state="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_JA != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrlen (input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrlen_incomplete_state=yes],
+ [gl_cv_func_mbrlen_incomplete_state=no],
+ [])
+ fi
+ ])
+])
+
+dnl Test whether mbrlen, when parsing the end of a multibyte character,
+dnl correctly returns the number of bytes that were needed to complete the
+dnl character (not the total number of bytes of the multibyte character).
+dnl Result is gl_cv_func_mbrlen_retval.
+
+AC_DEFUN([gl_MBRLEN_RETVAL],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrlen has a correct return value],
+ [gl_cv_func_mbrlen_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on HP-UX and Solaris.
+ hpux* | solaris*) gl_cv_func_mbrlen_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrlen_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris. */
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrlen (input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrlen (input + 2, 5, &state) != 1)
+ return 1;
+ }
+ }
+ /* This fails on HP-UX 11.11. */
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrlen (input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrlen (input + 2, 5, &state) != 2)
+ return 1;
+ }
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrlen_retval=yes],
+ [gl_cv_func_mbrlen_retval=no],
+ [])
+ fi
+ ])
+])
+
+dnl Test whether mbrlen, when parsing a NUL character, correctly returns 0.
+dnl Result is gl_cv_func_mbrlen_nul_retval.
+
+AC_DEFUN([gl_MBRLEN_NUL_RETVAL],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrlen returns 0 when parsing a NUL character],
+ [gl_cv_func_mbrlen_nul_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris 9.
+ solaris2.9) gl_cv_func_mbrlen_nul_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrlen_nul_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_ZH_CN != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This crashes on Solaris 9 inside __mbrtowc_dense_gb18030. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrlen ("", 1, &state) != 0)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrlen_nul_retval=yes],
+ [gl_cv_func_mbrlen_nul_retval=no],
+ [])
+ fi
+ ])
+])
+
+# Prerequisites of lib/mbrlen.c.
+AC_DEFUN([gl_PREREQ_MBRLEN], [
+ :
+])
diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4
new file mode 100644
index 0000000..11d7d23
--- /dev/null
+++ b/m4/mbrtowc.m4
@@ -0,0 +1,382 @@
+# mbrtowc.m4 serial 15
+dnl Copyright (C) 2001-2002, 2004-2005, 2008, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBRTOWC],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBRTOWC=1
+ fi
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
+ if test $ac_cv_func_mbrtowc = no; then
+ HAVE_MBRTOWC=0
+ fi
+ if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
+ gl_MBRTOWC_NULL_ARG
+ gl_MBRTOWC_RETVAL
+ gl_MBRTOWC_NUL_RETVAL
+ case "$gl_cv_func_mbrtowc_null_arg" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_NULL_ARG_BUG], [1],
+ [Define if the mbrtowc function has the NULL string argument bug.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_retval" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1],
+ [Define if the mbrtowc function returns a wrong return value.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_nul_retval" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1],
+ [Define if the mbrtowc function does not return 0 for a NUL character.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ fi
+ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([mbrtowc])
+ gl_PREREQ_MBRTOWC
+ fi
+])
+
+dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that
+dnl redefines the semantics of the given mbstate_t type.
+dnl Result is REPLACE_MBSTATE_T.
+dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to
+dnl avoid inconsistencies.
+
+AC_DEFUN([gl_MBSTATE_T_BROKEN],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_CHECK_FUNCS_ONCE([mbsinit])
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+ gl_MBRTOWC_INCOMPLETE_STATE
+ gl_MBRTOWC_SANITYCHECK
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+ gl_REPLACE_WCHAR_H
+ fi
+])
+
+dnl Test whether mbrtowc puts the state into non-initial state when parsing an
+dnl incomplete multibyte character.
+dnl Result is gl_cv_func_mbrtowc_incomplete_state.
+
+AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc handles incomplete characters],
+ [gl_cv_func_mbrtowc_incomplete_state],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_JA != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_incomplete_state=yes],
+ [gl_cv_func_mbrtowc_incomplete_state=no],
+ [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc works not worse than mbtowc.
+dnl Result is gl_cv_func_mbrtowc_sanitycheck.
+
+AC_DEFUN([gl_MBRTOWC_SANITYCHECK],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc],
+ [gl_cv_func_mbrtowc_sanitycheck],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_ZH_CN != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_sanitycheck=yes],
+ [gl_cv_func_mbrtowc_sanitycheck=no],
+ [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc supports a NULL string argument correctly.
+dnl Result is gl_cv_func_mbrtowc_null_arg.
+
+AC_DEFUN([gl_MBRTOWC_NULL_ARG],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument],
+ [gl_cv_func_mbrtowc_null_arg],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on OSF/1.
+ osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+ int ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ mbrtowc (&wc, NULL, 5, &state);
+ /* Check that wc was not modified. */
+ if (wc != (wchar_t) 0xBADFACE)
+ return 1;
+ }
+ return 0;
+}], [gl_cv_func_mbrtowc_null_arg=yes], [gl_cv_func_mbrtowc_null_arg=no], [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc, when parsing the end of a multibyte character,
+dnl correctly returns the number of bytes that were needed to complete the
+dnl character (not the total number of bytes of the multibyte character).
+dnl Result is gl_cv_func_mbrtowc_retval.
+
+AC_DEFUN([gl_MBRTOWC_RETVAL],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc has a correct return value],
+ [gl_cv_func_mbrtowc_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on HP-UX and Solaris.
+ hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris. */
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+ return 1;
+ }
+ }
+ /* This fails on HP-UX 11.11. */
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+ return 1;
+ }
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_retval=yes],
+ [gl_cv_func_mbrtowc_retval=no],
+ [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc, when parsing a NUL character, correctly returns 0.
+dnl Result is gl_cv_func_mbrtowc_nul_retval.
+
+AC_DEFUN([gl_MBRTOWC_NUL_RETVAL],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character],
+ [gl_cv_func_mbrtowc_nul_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris 8 and 9.
+ solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_ZH_CN != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8 and 9. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "", 1, &state) != 0)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_nul_retval=yes],
+ [gl_cv_func_mbrtowc_nul_retval=no],
+ [:])
+ fi
+ ])
+])
+
+# Prerequisites of lib/mbrtowc.c.
+AC_DEFUN([gl_PREREQ_MBRTOWC], [
+ :
+])
+
+
+dnl From Paul Eggert
+
+dnl This override of an autoconf macro can be removed when autoconf 2.60 or
+dnl newer can be assumed everywhere.
+
+m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.60]),[-1],[
+AC_DEFUN([AC_FUNC_MBRTOWC],
+[
+ dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60.
+ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
+ gl_cv_func_mbrtowc,
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <wchar.h>]],
+ [[wchar_t wc;
+ char const s[] = "";
+ size_t n = 1;
+ mbstate_t state;
+ return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])],
+ gl_cv_func_mbrtowc=yes,
+ gl_cv_func_mbrtowc=no)])
+ if test $gl_cv_func_mbrtowc = yes; then
+ AC_DEFINE([HAVE_MBRTOWC], [1],
+ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
+ fi
+])
+])
diff --git a/m4/mbsinit.m4 b/m4/mbsinit.m4
new file mode 100644
index 0000000..03b055c
--- /dev/null
+++ b/m4/mbsinit.m4
@@ -0,0 +1,30 @@
+# mbsinit.m4 serial 3
+dnl Copyright (C) 2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBSINIT],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBSINIT=1
+ fi
+ AC_CHECK_FUNCS_ONCE([mbsinit])
+ if test $ac_cv_func_mbsinit = no; then
+ HAVE_MBSINIT=0
+ fi
+ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([mbsinit])
+ gl_PREREQ_MBSINIT
+ fi
+])
+
+# Prerequisites of lib/mbsinit.c.
+AC_DEFUN([gl_PREREQ_MBSINIT], [
+ :
+])
diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4
new file mode 100644
index 0000000..d4ec6f0
--- /dev/null
+++ b/m4/mbstate_t.m4
@@ -0,0 +1,34 @@
+# mbstate_t.m4 serial 12
+dnl Copyright (C) 2000-2002, 2008, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# From Paul Eggert.
+
+# BeOS 5 has <wchar.h> but does not define mbstate_t,
+# so you can't declare an object of that type.
+# Check for this incompatibility with Standard C.
+
+# AC_TYPE_MBSTATE_T
+# -----------------
+AC_DEFUN([AC_TYPE_MBSTATE_T],
+[
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11
+
+ AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT[
+# include <wchar.h>]],
+ [[mbstate_t x; return sizeof x;]])],
+ [ac_cv_type_mbstate_t=yes],
+ [ac_cv_type_mbstate_t=no])])
+ if test $ac_cv_type_mbstate_t = yes; then
+ AC_DEFINE([HAVE_MBSTATE_T], [1],
+ [Define to 1 if <wchar.h> declares mbstate_t.])
+ else
+ AC_DEFINE([mbstate_t], [int],
+ [Define to a type if <wchar.h> does not define.])
+ fi
+])
diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4
new file mode 100644
index 0000000..20d8a1b
--- /dev/null
+++ b/m4/mkstemp.m4
@@ -0,0 +1,56 @@
+#serial 17
+
+# Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007 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 hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a
+# silly limit that it can create no more than 26 files from a given template.
+# Other systems lack mkstemp altogether.
+# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create
+# only 32 files per process.
+# On systems like the above, arrange to use the replacement function.
+AC_DEFUN([gl_FUNC_MKSTEMP],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_SYS_LARGEFILE])
+
+ AC_CACHE_CHECK([for working mkstemp],
+ [gl_cv_func_working_mkstemp],
+ [
+ mkdir conftest.mkstemp
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT],
+ [[int i;
+ off_t large = (off_t) 4294967295u;
+ if (large < 0)
+ large = 2147483647;
+ for (i = 0; i < 70; i++)
+ {
+ char templ[] = "conftest.mkstemp/coXXXXXX";
+ int (*mkstemp_function) (char *) = mkstemp;
+ int fd = mkstemp_function (templ);
+ if (fd < 0 || lseek (fd, large, SEEK_SET) != large)
+ return 1;
+ close (fd);
+ }
+ return 0;]])],
+ [gl_cv_func_working_mkstemp=yes],
+ [gl_cv_func_working_mkstemp=no],
+ [gl_cv_func_working_mkstemp=no])
+ rm -rf conftest.mkstemp
+ ])
+
+ if test $gl_cv_func_working_mkstemp != yes; then
+ REPLACE_MKSTEMP=1
+ AC_LIBOBJ([mkstemp])
+ gl_PREREQ_MKSTEMP
+ fi
+])
+
+# Prerequisites of lib/mkstemp.c.
+AC_DEFUN([gl_PREREQ_MKSTEMP],
+[
+])
diff --git a/m4/multiarch.m4 b/m4/multiarch.m4
new file mode 100644
index 0000000..3948e6e
--- /dev/null
+++ b/m4/multiarch.m4
@@ -0,0 +1,66 @@
+# multiarch.m4 serial 4
+dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Determine whether the compiler is or may be producing universal binaries.
+#
+# On MacOS X 10.5 and later systems, the user can create libraries and
+# executables that work on multiple system types--known as "fat" or
+# "universal" binaries--by specifying multiple '-arch' options to the
+# compiler but only a single '-arch' option to the preprocessor. Like
+# this:
+#
+# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+# CPP="gcc -E" CXXCPP="g++ -E"
+#
+# Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the
+# beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly.
+
+dnl This macro must pass through AC_REQUIRE (never directly invoke it).
+AC_DEFUN_ONCE([gl_MULTIARCH],
+[
+ dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
+ gl_cv_c_multiarch=no
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+ ]])],
+ [
+ dnl Check for potential -arch flags. It is not universal unless
+ dnl there are at least two -arch flags with different values.
+ arch=
+ prev=
+ for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+ if test -n "$prev"; then
+ case $word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$arch" || test "$arch" = "$word"; then
+ arch="$word"
+ else
+ gl_cv_c_multiarch=yes
+ fi
+ ;;
+ esac
+ prev=
+ else
+ if test "x$word" = "x-arch"; then
+ prev=arch
+ fi
+ fi
+ done
+ ])
+ if test $gl_cv_c_multiarch = yes; then
+ AC_DEFINE([AA_APPLE_UNIVERSAL_BUILD], [1],
+ [Define if the compiler is building for multiple architectures of Apple platforms at once.])
+ APPLE_UNIVERSAL_BUILD=1
+ else
+ APPLE_UNIVERSAL_BUILD=0
+ fi
+ AC_SUBST([APPLE_UNIVERSAL_BUILD])
+])
diff --git a/m4/nls.m4 b/m4/nls.m4
new file mode 100644
index 0000000..0b36434
--- /dev/null
+++ b/m4/nls.m4
@@ -0,0 +1,31 @@
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE([nls],
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT([$USE_NLS])
+ AC_SUBST([USE_NLS])
+])
diff --git a/m4/pathmax.m4 b/m4/pathmax.m4
new file mode 100644
index 0000000..4651801
--- /dev/null
+++ b/m4/pathmax.m4
@@ -0,0 +1,12 @@
+# pathmax.m4 serial 8
+dnl Copyright (C) 2002, 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_PATHMAX],
+[
+ dnl Prerequisites of lib/pathmax.h.
+ AC_CHECK_FUNCS_ONCE([pathconf])
+ AC_CHECK_HEADERS_ONCE([sys/param.h])
+])
diff --git a/m4/po.m4 b/m4/po.m4
new file mode 100644
index 0000000..2284fa5
--- /dev/null
+++ b/m4/po.m4
@@ -0,0 +1,449 @@
+# po.m4 serial 17 (gettext-0.18)
+dnl Copyright (C) 1995-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AM_NLS])dnl
+
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+ dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([GMSGFMT_015])
+
+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([XGETTEXT_015])
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+ dnl Installation directories.
+ dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+ dnl have to define it here, so that it can be used in po/Makefile.
+ test -n "$localedir" || localedir='${datadir}/locale'
+ AC_SUBST([localedir])
+
+ dnl Support for AM_XGETTEXT_OPTION.
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+ AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+ AC_CONFIG_COMMANDS([po-directories], [[
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done]],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+ # When this code is run, in config.status, two variables have already been
+ # set:
+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+ # - LINGUAS is the value of the environment variable LINGUAS at configure
+ # time.
+
+changequote(,)dnl
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ # Find a way to echo strings without interpreting backslash.
+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='echo'
+ else
+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='printf %s\n'
+ else
+ echo_func () {
+ cat <<EOT
+$*
+EOT
+ }
+ gt_echo='echo_func'
+ fi
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+ sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[ ]*VARIABLE[ ]*=/{
+ # Seen the first line of the variable definition.
+ s/^[ ]*VARIABLE[ ]*=//
+ ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+ # Set POTFILES to the value of the Makefile variable POTFILES.
+ sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+ # Compute POTFILES_DEPS as
+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+ POTFILES_DEPS=
+ for file in $POTFILES; do
+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+ done
+ POMAKEFILEDEPS=""
+
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+ ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+ fi
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ # Compute PROPERTIESFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+ # Compute CLASSFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+ # Compute QMFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+ # Compute MSGFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+ # Compute RESOURCESDLLFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ PROPERTIESFILES=
+ CLASSFILES=
+ QMFILES=
+ MSGFILES=
+ RESOURCESDLLFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+ CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+ QMFILES="$QMFILES $srcdirpre$lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ JAVACATALOGS=
+ QTCATALOGS=
+ TCLCATALOGS=
+ CSHARPCATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+ QTCATALOGS="$QTCATALOGS $lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ fi
+
+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if test -n "$POMAKEFILEDEPS"; then
+ cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+ fi
+ mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+ XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+ AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
diff --git a/m4/progtest.m4 b/m4/progtest.m4
new file mode 100644
index 0000000..e1d445d
--- /dev/null
+++ b/m4/progtest.m4
@@ -0,0 +1,92 @@
+# progtest.m4 serial 6 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 2005, 2008, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ([2.50])
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL([ac_cv_path_$1],
+[case "[$]$1" in
+ [[\\/]]* | ?:[[\\/]]*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$][$1])
+else
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST([$1])dnl
+])
diff --git a/m4/quote.m4 b/m4/quote.m4
new file mode 100644
index 0000000..0f08791
--- /dev/null
+++ b/m4/quote.m4
@@ -0,0 +1,13 @@
+# quote.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_QUOTE],
+[
+ AC_LIBOBJ([quote])
+
+ dnl Prerequisites of lib/quote.c.
+ dnl (none)
+])
diff --git a/m4/quotearg.m4 b/m4/quotearg.m4
new file mode 100644
index 0000000..eec9e68
--- /dev/null
+++ b/m4/quotearg.m4
@@ -0,0 +1,10 @@
+# quotearg.m4 serial 8
+dnl Copyright (C) 2002, 2004-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_QUOTEARG],
+[
+ AC_LIBOBJ([quotearg])
+])
diff --git a/m4/realloc.m4 b/m4/realloc.m4
new file mode 100644
index 0000000..5925796
--- /dev/null
+++ b/m4/realloc.m4
@@ -0,0 +1,23 @@
+# realloc.m4 serial 9
+dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_FUNC_REALLOC_POSIX
+# ---------------------
+# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it
+# fails), and replace realloc if it is not.
+AC_DEFUN([gl_FUNC_REALLOC_POSIX],
+[
+ AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+ if test $gl_cv_func_malloc_posix = yes; then
+ HAVE_REALLOC_POSIX=1
+ AC_DEFINE([HAVE_REALLOC_POSIX], [1],
+ [Define if the 'realloc' function is POSIX compliant.])
+ else
+ AC_LIBOBJ([realloc])
+ HAVE_REALLOC_POSIX=0
+ fi
+ AC_SUBST([HAVE_REALLOC_POSIX])
+])
diff --git a/m4/regex.m4 b/m4/regex.m4
new file mode 100644
index 0000000..aef53d2
--- /dev/null
+++ b/m4/regex.m4
@@ -0,0 +1,221 @@
+# serial 54
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl Initially derived from code in GNU grep.
+dnl Mostly written by Jim Meyering.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([gl_REGEX],
+[
+ AC_CHECK_HEADERS_ONCE([locale.h])
+
+ AC_ARG_WITH([included-regex],
+ [AS_HELP_STRING([--without-included-regex],
+ [don't compile regex; this is the default on systems
+ with recent-enough versions of the GNU C Library
+ (use with caution on other systems).])])
+
+ case $with_included_regex in #(
+ yes|no) ac_use_included_regex=$with_included_regex
+ ;;
+ '')
+ # If the system regex support is good enough that it passes the
+ # following run test, then default to *not* using the included regex.c.
+ # If cross compiling, assume the test would fail and use the included
+ # regex.c.
+ AC_CACHE_CHECK([for working re_compile_pattern],
+ [gl_cv_func_re_compile_pattern_working],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT[
+ #if HAVE_LOCALE_H
+ #include <locale.h>
+ #endif
+ #include <limits.h>
+ #include <regex.h>
+ ]],
+ [[static struct re_pattern_buffer regex;
+ unsigned char folded_chars[UCHAR_MAX + 1];
+ int i;
+ const char *s;
+ struct re_registers regs;
+
+ #if HAVE_LOCALE_H
+ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ This test needs valgrind to catch the bug on Debian
+ GNU/Linux 3.1 x86, but it might catch the bug better
+ on other platforms and it shouldn't hurt to try the
+ test here. */
+ if (setlocale (LC_ALL, "en_US.UTF-8"))
+ {
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ return 1;
+ if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ return 1;
+ if (! setlocale (LC_ALL, "C"))
+ return 1;
+ }
+ #endif
+
+ /* This test is from glibc bug 3957, reported by Andrew Mackey. */
+ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[^x]b", 6, &regex);
+ if (s)
+ return 1;
+
+ /* This should fail, but succeeds for glibc-2.5. */
+ if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+ return 1;
+
+ /* This regular expression is from Spencer ere test number 75
+ in grep-2.3. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ for (i = 0; i <= UCHAR_MAX; i++)
+ folded_chars[i] = i;
+ regex.translate = folded_chars;
+ s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, &regex);
+ /* This should fail with _Invalid character class name_ error. */
+ if (!s)
+ return 1;
+
+ /* This should succeed, but does not for glibc-2.1.3. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("{1", 2, &regex);
+
+ if (s)
+ return 1;
+
+ /* The following example is derived from a problem report
+ against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[an\371]*n", 7, &regex);
+ if (s)
+ return 1;
+
+ /* This should match, but does not for glibc-2.2.1. */
+ if (re_match (&regex, "an", 2, 0, &regs) != 2)
+ return 1;
+
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ /* glibc-2.2.93 does not work with a negative RANGE argument. */
+ if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+ return 1;
+
+ /* The version of regex.c in older versions of gnulib
+ ignored RE_ICASE. Detect that problem too. */
+ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+ return 1;
+
+ /* Catch a bug reported by Vin Shelton in
+ http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+ */
+ re_set_syntax (RE_SYNTAX_POSIX_BASIC
+ & ~RE_CONTEXT_INVALID_DUP
+ & ~RE_NO_EMPTY_RANGES);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+ if (s)
+ return 1;
+
+ /* REG_STARTEND was added to glibc on 2004-01-15.
+ Reject older versions. */
+ if (! REG_STARTEND)
+ return 1;
+
+ /* Reject hosts whose regoff_t values are too narrow.
+ These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
+ and 32-bit int. */
+ if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+ || sizeof (regoff_t) < sizeof (ssize_t))
+ return 1;
+
+ return 0;]])],
+ [gl_cv_func_re_compile_pattern_working=yes],
+ [gl_cv_func_re_compile_pattern_working=no],
+ dnl When crosscompiling, assume it is not working.
+ [gl_cv_func_re_compile_pattern_working=no])])
+ case $gl_cv_func_re_compile_pattern_working in #(
+ yes) ac_use_included_regex=no;; #(
+ no) ac_use_included_regex=yes;;
+ esac
+ ;;
+ *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex])
+ ;;
+ esac
+
+ if test $ac_use_included_regex = yes; then
+ AC_DEFINE([_REGEX_LARGE_OFFSETS], [1],
+ [Define if you want regoff_t to be at least as wide POSIX requires.])
+ AC_DEFINE([re_syntax_options], [rpl_re_syntax_options],
+ [Define to rpl_re_syntax_options if the replacement should be used.])
+ AC_DEFINE([re_set_syntax], [rpl_re_set_syntax],
+ [Define to rpl_re_set_syntax if the replacement should be used.])
+ AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern],
+ [Define to rpl_re_compile_pattern if the replacement should be used.])
+ AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap],
+ [Define to rpl_re_compile_fastmap if the replacement should be used.])
+ AC_DEFINE([re_search], [rpl_re_search],
+ [Define to rpl_re_search if the replacement should be used.])
+ AC_DEFINE([re_search_2], [rpl_re_search_2],
+ [Define to rpl_re_search_2 if the replacement should be used.])
+ AC_DEFINE([re_match], [rpl_re_match],
+ [Define to rpl_re_match if the replacement should be used.])
+ AC_DEFINE([re_match_2], [rpl_re_match_2],
+ [Define to rpl_re_match_2 if the replacement should be used.])
+ AC_DEFINE([re_set_registers], [rpl_re_set_registers],
+ [Define to rpl_re_set_registers if the replacement should be used.])
+ AC_DEFINE([re_comp], [rpl_re_comp],
+ [Define to rpl_re_comp if the replacement should be used.])
+ AC_DEFINE([re_exec], [rpl_re_exec],
+ [Define to rpl_re_exec if the replacement should be used.])
+ AC_DEFINE([regcomp], [rpl_regcomp],
+ [Define to rpl_regcomp if the replacement should be used.])
+ AC_DEFINE([regexec], [rpl_regexec],
+ [Define to rpl_regexec if the replacement should be used.])
+ AC_DEFINE([regerror], [rpl_regerror],
+ [Define to rpl_regerror if the replacement should be used.])
+ AC_DEFINE([regfree], [rpl_regfree],
+ [Define to rpl_regfree if the replacement should be used.])
+ AC_LIBOBJ([regex])
+ gl_PREREQ_REGEX
+ fi
+])
+
+# Prerequisites of lib/regex.c and lib/regex_internal.c.
+AC_DEFUN([gl_PREREQ_REGEX],
+[
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_CHECK_HEADERS([libintl.h])
+ AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll])
+ AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
+])
diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4
new file mode 100644
index 0000000..4eaef93
--- /dev/null
+++ b/m4/ssize_t.m4
@@ -0,0 +1,21 @@
+# ssize_t.m4 serial 4 (gettext-0.15)
+dnl Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether ssize_t is defined.
+
+AC_DEFUN([gt_TYPE_SSIZE_T],
+[
+ AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
+ [AC_TRY_COMPILE([#include <sys/types.h>],
+ [int x = sizeof (ssize_t *) + sizeof (ssize_t);
+ return !x;],
+ [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
+ if test $gt_cv_ssize_t = no; then
+ AC_DEFINE([ssize_t], [int],
+ [Define as a signed type of the same size as size_t.])
+ fi
+])
diff --git a/m4/stdbool.m4 b/m4/stdbool.m4
new file mode 100644
index 0000000..57c804a
--- /dev/null
+++ b/m4/stdbool.m4
@@ -0,0 +1,115 @@
+# Check for stdbool.h that conforms to C99.
+
+dnl Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Prepare for substituting <stdbool.h> if it is not supported.
+
+AC_DEFUN([AM_STDBOOL_H],
+[
+ AC_REQUIRE([AC_HEADER_STDBOOL])
+
+ # Define two additional variables used in the Makefile substitution.
+
+ if test "$ac_cv_header_stdbool_h" = yes; then
+ STDBOOL_H=''
+ else
+ STDBOOL_H='stdbool.h'
+ fi
+ AC_SUBST([STDBOOL_H])
+
+ if test "$ac_cv_type__Bool" = yes; then
+ HAVE__BOOL=1
+ else
+ HAVE__BOOL=0
+ fi
+ AC_SUBST([HAVE__BOOL])
+])
+
+# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
+AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
+
+# This macro is only needed in autoconf <= 2.59. Newer versions of autoconf
+# have this macro built-in.
+
+AC_DEFUN([AC_HEADER_STDBOOL],
+ [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
+ [ac_cv_header_stdbool_h],
+ [AC_TRY_COMPILE(
+ [
+ #include <stdbool.h>
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
+ #ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+ #endif
+
+ struct s { _Bool s: 1; _Bool t; } s;
+
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
+ bool e = &s;
+ char f[(_Bool) 0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ #if defined __xlc__ || defined __GNUC__
+ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+ reported by James Lemley on 2005-10-05; see
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ This test is not quite right, since xlc is allowed to
+ reject this program, as the initializer for xlcbug is
+ not one of the forms that C requires support for.
+ However, doing the test right would require a run-time
+ test, and that would make cross-compilation harder.
+ Let us hope that IBM fixes the xlc bug, and also adds
+ support for this kind of constant expression. In the
+ meantime, this test will reject xlc, which is OK, since
+ our stdbool.h substitute should suffice. We also test
+ this with GCC, where it should work, to detect more
+ quickly whether someone messes up the test in the
+ future. */
+ char digs[] = "0123456789";
+ int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+ #endif
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
+ ],
+ [
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
+ ],
+ [ac_cv_header_stdbool_h=yes],
+ [ac_cv_header_stdbool_h=no])])
+ AC_CHECK_TYPES([_Bool])
+ if test $ac_cv_header_stdbool_h = yes; then
+ AC_DEFINE([HAVE_STDBOOL_H], [1], [Define to 1 if stdbool.h conforms to C99.])
+ fi])
diff --git a/m4/stdint.m4 b/m4/stdint.m4
new file mode 100644
index 0000000..a2e8bdd
--- /dev/null
+++ b/m4/stdint.m4
@@ -0,0 +1,472 @@
+# stdint.m4 serial 34
+dnl Copyright (C) 2001-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert and Bruno Haible.
+dnl Test whether <stdint.h> is supported or must be substituted.
+
+AC_DEFUN([gl_STDINT_H],
+[
+ AC_PREREQ([2.59])dnl
+
+ dnl Check for long long int and unsigned long long int.
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ if test $ac_cv_type_long_long_int = yes; then
+ HAVE_LONG_LONG_INT=1
+ else
+ HAVE_LONG_LONG_INT=0
+ fi
+ AC_SUBST([HAVE_LONG_LONG_INT])
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ HAVE_UNSIGNED_LONG_LONG_INT=1
+ else
+ HAVE_UNSIGNED_LONG_LONG_INT=0
+ fi
+ AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
+
+ dnl Check for <inttypes.h>.
+ dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
+ if test $ac_cv_header_inttypes_h = yes; then
+ HAVE_INTTYPES_H=1
+ else
+ HAVE_INTTYPES_H=0
+ fi
+ AC_SUBST([HAVE_INTTYPES_H])
+
+ dnl Check for <sys/types.h>.
+ dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h.
+ if test $ac_cv_header_sys_types_h = yes; then
+ HAVE_SYS_TYPES_H=1
+ else
+ HAVE_SYS_TYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_TYPES_H])
+
+ gl_CHECK_NEXT_HEADERS([stdint.h])
+ if test $ac_cv_header_stdint_h = yes; then
+ HAVE_STDINT_H=1
+ else
+ HAVE_STDINT_H=0
+ fi
+ AC_SUBST([HAVE_STDINT_H])
+
+ dnl Now see whether we need a substitute <stdint.h>.
+ if test $ac_cv_header_stdint_h = yes; then
+ AC_CACHE_CHECK([whether stdint.h conforms to C99],
+ [gl_cv_header_working_stdint_h],
+ [gl_cv_header_working_stdint_h=no
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+]
+gl_STDINT_INCLUDES
+[
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+struct s {
+ int check_PTRDIFF:
+ PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+ && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+ ? 1 : -1;
+ /* Detect bug in FreeBSD 6.0 / ia64. */
+ int check_SIG_ATOMIC:
+ SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+ && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+ ? 1 : -1;
+ int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+ int check_WCHAR:
+ WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+ && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+ ? 1 : -1;
+ /* Detect bug in mingw. */
+ int check_WINT:
+ WINT_MIN == TYPE_MINIMUM (wint_t)
+ && WINT_MAX == TYPE_MAXIMUM (wint_t)
+ ? 1 : -1;
+
+ /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
+ int check_UINT8_C:
+ (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+ int check_UINT16_C:
+ (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+ /* Detect bugs in OpenBSD 3.9 stdint.h. */
+#ifdef UINT8_MAX
+ int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+ int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+ int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+ int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+ int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+ int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+ int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+ int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+ int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+ int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+ int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+ int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+ int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+ int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+ int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+ ]])],
+ [dnl Determine whether the various *_MIN, *_MAX macros are usable
+ dnl in preprocessor expression. We could do it by compiling a test
+ dnl program for each of these macros. It is faster to run a program
+ dnl that inspects the macro expansion.
+ dnl This detects a bug on HP-UX 11.23/ia64.
+ AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+]
+gl_STDINT_INCLUDES
+[
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+ {
+#ifdef INT8_MAX
+ MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+ MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+ MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+ MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+ MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+ MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+ MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+ MVAL (UINT64_MAX),
+#endif
+ NULL
+ };
+]], [[
+ const char **mv;
+ for (mv = macro_values; *mv != NULL; mv++)
+ {
+ const char *value = *mv;
+ /* Test whether it looks like a cast expression. */
+ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+ || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+ || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+ || strncmp (value, "((int)"/*)*/, 6) == 0
+ || strncmp (value, "((signed short)"/*)*/, 15) == 0
+ || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+ return 1;
+ }
+ return 0;
+]])],
+ [gl_cv_header_working_stdint_h=yes],
+ [],
+ [dnl When cross-compiling, assume it works.
+ gl_cv_header_working_stdint_h=yes
+ ])
+ ])
+ ])
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=
+ else
+ dnl Check for <sys/inttypes.h>, and for
+ dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
+ AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ else
+ HAVE_SYS_INTTYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_INTTYPES_H])
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ else
+ HAVE_SYS_BITYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_BITYPES_H])
+
+ dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+ dnl character support).
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+
+ gl_STDINT_TYPE_PROPERTIES
+ STDINT_H=stdint.h
+ fi
+ AC_SUBST([STDINT_H])
+])
+
+dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES)
+dnl Determine the size of each of the given types in bits.
+AC_DEFUN([gl_STDINT_BITSIZEOF],
+[
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ m4_foreach_w([gltype], [$1],
+ [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+ [Define to the number of bits in type ']gltype['.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}],
+ [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT],
+ [$2
+#include <limits.h>], [result=unknown])
+ eval gl_cv_bitsizeof_${gltype}=\$result
+ ])
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ dnl Use a nonempty default, because some compilers, such as IRIX 5 cc,
+ dnl do a syntax check even on unused #if conditions and give an error
+ dnl on valid C code like this:
+ dnl #if 0
+ dnl # if > 32
+ dnl # endif
+ dnl #endif
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result])
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+ m4_foreach_w([gltype], [$1],
+ [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+])
+
+dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES)
+dnl Determine the signedness of each of the given types.
+dnl Define HAVE_SIGNED_TYPE if type is signed.
+AC_DEFUN([gl_CHECK_TYPES_SIGNED],
+[
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ m4_foreach_w([gltype], [$1],
+ [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+ [Define to 1 if ']gltype[' is a signed integer type.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([$2[
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])],
+ result=yes, result=no)
+ eval gl_cv_type_${gltype}_signed=\$result
+ ])
+ eval result=\$gl_cv_type_${gltype}_signed
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if test "$result" = yes; then
+ AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1])
+ eval HAVE_SIGNED_${GLTYPE}=1
+ else
+ eval HAVE_SIGNED_${GLTYPE}=0
+ fi
+ done
+ m4_foreach_w([gltype], [$1],
+ [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+])
+
+dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES)
+dnl Determine the suffix to use for integer constants of the given types.
+dnl Define t_SUFFIX for each such type.
+AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
+[
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ m4_foreach_w([gltype], [$1],
+ [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
+ [Define to l, ll, u, ul, ull, etc., as suitable for
+ constants of type ']gltype['.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([for $gltype integer literal suffix],
+ [gl_cv_type_${gltype}_suffix],
+ [eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([$2[
+ extern $gltype foo;
+ extern $gltype1 foo;]])],
+ [eval gl_cv_type_${gltype}_suffix=\$glsuf])
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done])
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result])
+ done
+ m4_foreach_w([gltype], [$1],
+ [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
+])
+
+dnl gl_STDINT_INCLUDES
+AC_DEFUN([gl_STDINT_INCLUDES],
+[[
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+]])
+
+dnl gl_STDINT_TYPE_PROPERTIES
+dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t
+dnl of interest to stdint.in.h.
+AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
+[
+ AC_REQUIRE([gl_MULTIARCH])
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_STDINT_BITSIZEOF([ptrdiff_t size_t],
+ [gl_STDINT_INCLUDES])
+ fi
+ gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+ gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+ gl_cv_type_ptrdiff_t_signed=yes
+ gl_cv_type_size_t_signed=no
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t],
+ [gl_STDINT_INCLUDES])
+ fi
+ gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+])
+
+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])])
+])
+
+# Hey Emacs!
+# Local Variables:
+# indent-tabs-mode: nil
+# End:
diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4
new file mode 100644
index 0000000..846b65d
--- /dev/null
+++ b/m4/stdio_h.m4
@@ -0,0 +1,133 @@
+# stdio_h.m4 serial 15
+dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STDIO_H],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([stdio.h])
+ dnl No need to create extra modules for these functions. Everyone who uses
+ dnl <stdio.h> likely needs them.
+ GNULIB_FPRINTF=1
+ GNULIB_PRINTF=1
+ GNULIB_VFPRINTF=1
+ GNULIB_VPRINTF=1
+ GNULIB_FPUTC=1
+ GNULIB_PUTC=1
+ GNULIB_PUTCHAR=1
+ GNULIB_FPUTS=1
+ GNULIB_PUTS=1
+ GNULIB_FWRITE=1
+ dnl This ifdef is just an optimization, to avoid performing a configure
+ dnl check whose result is not used. It does not make the test of
+ dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant.
+ m4_ifdef([gl_SIGNAL_SIGPIPE], [
+ gl_SIGNAL_SIGPIPE
+ if test $gl_cv_header_signal_h_SIGPIPE != yes; then
+ REPLACE_STDIO_WRITE_FUNCS=1
+ AC_LIBOBJ([stdio-write])
+ fi
+ ])
+])
+
+AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_STDIO_H_DEFAULTS],
+[
+ GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF])
+ GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX])
+ GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF])
+ GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX])
+ GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF])
+ GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX])
+ GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF])
+ GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX])
+ GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF])
+ GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX])
+ GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF])
+ GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX])
+ GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF])
+ GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF])
+ GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF])
+ GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF])
+ GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+ GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN])
+ GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN])
+ GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK])
+ GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO])
+ GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL])
+ GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO])
+ GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH])
+ GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE])
+ GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC])
+ GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC])
+ GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR])
+ GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS])
+ GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS])
+ GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE])
+ GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
+ GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
+ GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR])
+ GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
+ REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF])
+ REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF])
+ REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF])
+ REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF])
+ REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF])
+ HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF])
+ REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF])
+ HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF])
+ REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF])
+ REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF])
+ HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF])
+ REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF])
+ HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF])
+ REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF])
+ HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF])
+ REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF])
+ HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
+ REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF])
+ REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN])
+ REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN])
+ HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO])
+ REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO])
+ REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK])
+ HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO])
+ REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO])
+ REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL])
+ REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH])
+ REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE])
+ HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM])
+ HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE])
+ REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE])
+ REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR])
+])
+
+dnl Code shared by fseeko and ftello. Determine if large files are supported,
+dnl but stdin does not start as a large file by default.
+AC_DEFUN([gl_STDIN_LARGE_OFFSET],
+ [
+ AC_CACHE_CHECK([whether stdin defaults to large file offsets],
+ [gl_cv_var_stdin_large_offset],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+[[#if defined __SL64 && defined __SCLE /* cygwin */
+ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+ fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
+ it is easier to do a version check than building a runtime test. */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+ choke me
+# endif
+#endif]])],
+ [gl_cv_var_stdin_large_offset=yes],
+ [gl_cv_var_stdin_large_offset=no])])
+])
diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4
new file mode 100644
index 0000000..b295f16
--- /dev/null
+++ b/m4/stdlib_h.m4
@@ -0,0 +1,73 @@
+# stdlib_h.m4 serial 15
+dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_STDLIB_H],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([stdlib.h])
+ AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT])
+ if test $ac_cv_header_random_h = yes; then
+ HAVE_RANDOM_H=1
+ else
+ HAVE_RANDOM_H=0
+ fi
+ AC_SUBST([HAVE_RANDOM_H])
+ AC_CHECK_TYPES([struct random_data],
+ [], [HAVE_STRUCT_RANDOM_DATA=0],
+ [[#include <stdlib.h>
+ #if HAVE_RANDOM_H
+ # include <random.h>
+ #endif
+ ]])
+])
+
+AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_STDLIB_H_DEFAULTS],
+[
+ GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
+ GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
+ GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
+ GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL])
+ GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG])
+ GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
+ GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
+ GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
+ GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
+ GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
+ GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
+ GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
+ GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
+ GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
+ GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL])
+ GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL])
+ HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX])
+ HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
+ HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
+ HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
+ HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
+ HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
+ HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
+ HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
+ HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
+ HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
+ HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
+ HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
+ HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
+ HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
+ HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
+ REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
+ REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
+ REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
+ VOID_UNSETENV=0; AC_SUBST([VOID_UNSETENV])
+])
diff --git a/m4/strerror.m4 b/m4/strerror.m4
new file mode 100644
index 0000000..8c16ca9
--- /dev/null
+++ b/m4/strerror.m4
@@ -0,0 +1,68 @@
+# strerror.m4 serial 9
+dnl Copyright (C) 2002, 2007-2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRERROR],
+[
+ AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
+ if test $REPLACE_STRERROR = 1; then
+ AC_LIBOBJ([strerror])
+ AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
+ [Define this to 1 if strerror is broken.])
+ fi
+])
+
+# Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ if test -z "$ERRNO_H"; then
+ AC_CACHE_CHECK([for working strerror function],
+ [gl_cv_func_working_strerror],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ ]],
+ [[return !*strerror (-2);]])],
+ [gl_cv_func_working_strerror=yes],
+ [gl_cv_func_working_strerror=no],
+ [dnl Assume crossbuild works if it compiles.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ ]],
+ [[return !*strerror (-2);]])],
+ [gl_cv_func_working_strerror=yes],
+ [gl_cv_func_working_strerror=no])
+ ])
+ ])
+ if test $gl_cv_func_working_strerror = no; then
+ dnl The system's strerror() fails to return a string for out-of-range
+ dnl integers. Replace it.
+ REPLACE_STRERROR=1
+ fi
+ else
+ dnl The system's strerror() cannot know about the new errno values we add
+ dnl to <errno.h>. Replace it.
+ REPLACE_STRERROR=1
+ fi
+ if test $REPLACE_STRERROR = 1; then
+ gl_PREREQ_STRERROR
+ fi
+])
+
+# Prerequisites of lib/strerror.c.
+AC_DEFUN([gl_PREREQ_STRERROR], [
+ AC_CHECK_DECLS([strerror])
+ AC_CHECK_HEADERS_ONCE([sys/socket.h])
+ if test $ac_cv_header_sys_socket_h != yes; then
+ dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+ dnl the check for those headers unconditional; yet cygwin reports
+ dnl that the headers are present but cannot be compiled (since on
+ dnl cygwin, all socket information should come from sys/socket.h).
+ AC_CHECK_HEADERS([winsock2.h])
+ fi
+])
diff --git a/m4/string_h.m4 b/m4/string_h.m4
new file mode 100644
index 0000000..2d5553c
--- /dev/null
+++ b/m4/string_h.m4
@@ -0,0 +1,92 @@
+# Configure a GNU-like replacement for <string.h>.
+
+# Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# Written by Paul Eggert.
+
+AC_DEFUN([gl_HEADER_STRING_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_HEADER_STRING_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_STRING_H_BODY],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([string.h])
+])
+
+AC_DEFUN([gl_STRING_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
+[
+ GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
+ GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
+ GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
+ GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR])
+ GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
+ GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
+ GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
+ GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP])
+ GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP])
+ GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
+ GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
+ GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
+ GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR])
+ GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
+ GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
+ GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
+ GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN])
+ GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR])
+ GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR])
+ GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR])
+ GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP])
+ GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
+ GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
+ GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR])
+ GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN])
+ GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK])
+ GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
+ GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
+ GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
+ GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
+ GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
+ GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
+ HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
+ HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
+ HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
+ HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
+ HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
+ HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
+ HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
+ HAVE_STRNDUP=1; AC_SUBST([HAVE_STRNDUP])
+ HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
+ HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
+ HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
+ HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
+ HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
+ HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
+ HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR])
+ HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
+ HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
+ REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
+ REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
+ REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
+ REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
+ REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
+ REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
+])
diff --git a/m4/strverscmp.m4 b/m4/strverscmp.m4
new file mode 100644
index 0000000..becce2b
--- /dev/null
+++ b/m4/strverscmp.m4
@@ -0,0 +1,23 @@
+# strverscmp.m4 serial 7
+dnl Copyright (C) 2002, 2005-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRVERSCMP],
+[
+ dnl Persuade glibc <string.h> to declare strverscmp().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS([strverscmp])
+ if test $ac_cv_func_strverscmp = no; then
+ gl_PREREQ_STRVERSCMP
+ HAVE_STRVERSCMP=0
+ fi
+])
+
+# Prerequisites of lib/strverscmp.c.
+AC_DEFUN([gl_PREREQ_STRVERSCMP], [
+ :
+])
diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4
new file mode 100644
index 0000000..20c82ed
--- /dev/null
+++ b/m4/sys_stat_h.m4
@@ -0,0 +1,59 @@
+# sys_stat_h.m4 serial 10 -*- Autoconf -*-
+dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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 Eric Blake.
+dnl Test whether <sys/stat.h> contains lstat and mkdir or must be substituted.
+
+AC_DEFUN([gl_HEADER_SYS_STAT_H],
+[
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+
+ dnl Check for lstat. Systems that lack it (mingw) also lack symlinks, so
+ dnl stat is a good replacement.
+ AC_CHECK_FUNCS_ONCE([lstat])
+ if test $ac_cv_func_lstat = yes; then
+ HAVE_LSTAT=1
+ else
+ HAVE_LSTAT=0
+ fi
+ AC_SUBST([HAVE_LSTAT])
+
+ dnl For the mkdir substitute.
+ AC_REQUIRE([AC_C_INLINE])
+
+ dnl Check for broken stat macros.
+ AC_REQUIRE([AC_HEADER_STAT])
+
+ gl_CHECK_NEXT_HEADERS([sys/stat.h])
+ SYS_STAT_H='sys/stat.h'
+ AC_SUBST([SYS_STAT_H])
+
+ dnl Define types that are supposed to be defined in <sys/types.h> or
+ dnl <sys/stat.h>.
+ AC_CHECK_TYPE([nlink_t], [],
+ [AC_DEFINE([nlink_t], [int],
+ [Define to the type of st_nlink in struct stat, or a supertype.])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])
+
+]) # gl_HEADER_SYS_STAT_H
+
+AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
+[
+ GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD])
+ GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD])
+ REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT])
+ REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR])
+])
diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4
new file mode 100644
index 0000000..13ac576
--- /dev/null
+++ b/m4/sys_time_h.m4
@@ -0,0 +1,57 @@
+# Configure a replacement for <sys/time.h>.
+
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Martin Lambers.
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H],
+[
+ dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement
+ dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1
+ dnl statements that occur in other macros.
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ gl_CHECK_NEXT_HEADERS([sys/time.h])
+
+ if test $ac_cv_header_sys_time_h = yes; then
+ HAVE_SYS_TIME_H=1
+ else
+ HAVE_SYS_TIME_H=0
+ fi
+ AC_SUBST([HAVE_SYS_TIME_H])
+
+ AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+ ]],
+ [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
+ [gl_cv_sys_struct_timeval=yes],
+ [gl_cv_sys_struct_timeval=no])])
+ if test $gl_cv_sys_struct_timeval = yes; then
+ HAVE_STRUCT_TIMEVAL=1
+ else
+ HAVE_STRUCT_TIMEVAL=0
+ fi
+ AC_SUBST([HAVE_STRUCT_TIMEVAL])
+
+ dnl Assume POSIX behavior unless another module says otherwise.
+ REPLACE_GETTIMEOFDAY=0
+ AC_SUBST([REPLACE_GETTIMEOFDAY])
+ if test $HAVE_SYS_TIME_H = 0 || test $HAVE_STRUCT_TIMEVAL = 0; then
+ SYS_TIME_H=sys/time.h
+ else
+ SYS_TIME_H=
+ fi
+ AC_SUBST([SYS_TIME_H])
+])
diff --git a/m4/tempname.m4 b/m4/tempname.m4
new file mode 100644
index 0000000..4c44d37
--- /dev/null
+++ b/m4/tempname.m4
@@ -0,0 +1,22 @@
+#serial 3
+
+# Copyright (C) 2006-2007 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.
+
+# glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose
+# it as a public API, and provide it on systems that are lacking.
+AC_DEFUN([gl_FUNC_GEN_TEMPNAME],
+[
+ AC_REQUIRE([AC_SYS_LARGEFILE])
+
+ AC_LIBOBJ([tempname])
+ gl_PREREQ_TEMPNAME
+])
+
+# Prerequisites of lib/tempname.c.
+AC_DEFUN([gl_PREREQ_TEMPNAME],
+[
+ :
+])
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
new file mode 100644
index 0000000..3dd38aa
--- /dev/null
+++ b/m4/threadlib.m4
@@ -0,0 +1,313 @@
+# threadlib.m4 serial 3 (gettext-0.18)
+dnl Copyright (C) 2005-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl gl_THREADLIB
+dnl ------------
+dnl Tests for a multithreading library to be used.
+dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
+dnl USE_PTH_THREADS, USE_WIN32_THREADS
+dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
+dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
+dnl libtool).
+dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
+dnl programs that really need multithread functionality. The difference
+dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
+dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread".
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+
+AC_DEFUN([gl_THREADLIB_EARLY],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+])
+
+dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_EARLY_BODY],
+[
+ dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
+ dnl influences the result of the autoconf tests that test for *_unlocked
+ dnl declarations, on AIX 5 at least. Therefore it must come early.
+ AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+ AC_BEFORE([$0], [gl_ARGP])dnl
+
+ 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])])
+ dnl Check for multithreading.
+ m4_divert_text([DEFAULTS], [gl_use_threads_default=])
+ AC_ARG_ENABLE([threads],
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])
+AC_HELP_STRING([--disable-threads], [build without multithread safety]),
+ [gl_use_threads=$enableval],
+ [if test -n "$gl_use_threads_default"; then
+ gl_use_threads="$gl_use_threads_default"
+ else
+ case "$host_os" in
+ dnl Disable multithreading by default on OSF/1, because it interferes
+ dnl with fork()/exec(): When msgexec is linked with -lpthread, its
+ dnl child process gets an endless segmentation fault inside execvp().
+ osf*) gl_use_threads=no ;;
+ *) gl_use_threads=yes ;;
+ esac
+ fi
+ ])
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+ # For using <pthread.h>:
+ case "$host_os" in
+ osf*)
+ # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+ # groks <pthread.h>. cc also understands the flag -pthread, but
+ # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+ # 2. putting a flag into CPPFLAGS that has an effect on the linker
+ # causes the AC_TRY_LINK test below to succeed unexpectedly,
+ # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+ CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+ ;;
+ esac
+ # Some systems optimize for single-threaded programs by default, and
+ # need special flags to disable these optimizations. For example, the
+ # definition of 'errno' in <errno.h>.
+ case "$host_os" in
+ aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+ solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+ esac
+ fi
+])
+
+dnl The guts of gl_THREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_BODY],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+ gl_threads_api=none
+ LIBTHREAD=
+ LTLIBTHREAD=
+ LIBMULTITHREAD=
+ LTLIBMULTITHREAD=
+ if test "$gl_use_threads" != no; then
+ dnl Check whether the compiler and linker support weak declarations.
+ AC_MSG_CHECKING([whether imported symbols can be declared weak])
+ gl_have_weak=no
+ AC_TRY_LINK([extern void xyzzy ();
+#pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes])
+ AC_MSG_RESULT([$gl_have_weak])
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+ # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+ # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
+ AC_CHECK_HEADER([pthread.h],
+ [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
+ if test "$gl_have_pthread_h" = yes; then
+ # Other possible tests:
+ # -lpthreads (FSU threads, PCthreads)
+ # -lgthreads
+ gl_have_pthread=
+ # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+ # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+ # the second one only in libpthread, and lock.c needs it.
+ AC_TRY_LINK([#include <pthread.h>],
+ [pthread_mutex_lock((pthread_mutex_t*)0);
+ pthread_mutexattr_init((pthread_mutexattr_t*)0);],
+ [gl_have_pthread=yes])
+ # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+ # since it is defined as a macro on OSF/1.)
+ if test -n "$gl_have_pthread"; then
+ # The program links fine without libpthread. But it may actually
+ # need to link with libpthread in order to create multiple threads.
+ AC_CHECK_LIB([pthread], [pthread_kill],
+ [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+ # On Solaris and HP-UX, most pthread functions exist also in libc.
+ # Therefore pthread_in_use() needs to actually try to create a
+ # thread: pthread_create from libc will fail, whereas
+ # pthread_create will actually create a thread.
+ case "$host_os" in
+ solaris* | hpux*)
+ AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+ [Define if the pthread_in_use() detection is hard.])
+ esac
+ ])
+ else
+ # Some library is needed. Try libpthread and libc_r.
+ AC_CHECK_LIB([pthread], [pthread_kill],
+ [gl_have_pthread=yes
+ LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+ LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
+ if test -z "$gl_have_pthread"; then
+ # For FreeBSD 4.
+ AC_CHECK_LIB([c_r], [pthread_kill],
+ [gl_have_pthread=yes
+ LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+ LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
+ fi
+ fi
+ if test -n "$gl_have_pthread"; then
+ gl_threads_api=posix
+ AC_DEFINE([USE_POSIX_THREADS], [1],
+ [Define if the POSIX multithreading library can be used.])
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
+ [Define if references to the POSIX multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+ gl_have_solaristhread=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lthread"
+ AC_TRY_LINK([#include <thread.h>
+#include <synch.h>],
+ [thr_self();],
+ [gl_have_solaristhread=yes])
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_solaristhread"; then
+ gl_threads_api=solaris
+ LIBTHREAD=-lthread
+ LTLIBTHREAD=-lthread
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+ AC_DEFINE([USE_SOLARIS_THREADS], [1],
+ [Define if the old Solaris multithreading library can be used.])
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1],
+ [Define if references to the old Solaris multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ fi
+ fi
+ if test "$gl_use_threads" = pth; then
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_LINKFLAGS([pth])
+ gl_have_pth=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lpth"
+ AC_TRY_LINK([#include <pth.h>], [pth_self();], [gl_have_pth=yes])
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_pth"; then
+ gl_threads_api=pth
+ LIBTHREAD="$LIBPTH"
+ LTLIBTHREAD="$LTLIBPTH"
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+ AC_DEFINE([USE_PTH_THREADS], [1],
+ [Define if the GNU Pth multithreading library can be used.])
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_PTH_THREADS_WEAK], [1],
+ [Define if references to the GNU Pth multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ else
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
+ if { case "$host_os" in
+ mingw*) true;;
+ *) false;;
+ esac
+ }; then
+ gl_threads_api=win32
+ AC_DEFINE([USE_WIN32_THREADS], [1],
+ [Define if the Win32 multithreading API can be used.])
+ fi
+ fi
+ fi
+ fi
+ AC_MSG_CHECKING([for multithread API to use])
+ AC_MSG_RESULT([$gl_threads_api])
+ AC_SUBST([LIBTHREAD])
+ AC_SUBST([LTLIBTHREAD])
+ AC_SUBST([LIBMULTITHREAD])
+ AC_SUBST([LTLIBMULTITHREAD])
+])
+
+AC_DEFUN([gl_THREADLIB],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY])
+ AC_REQUIRE([gl_THREADLIB_BODY])
+])
+
+
+dnl gl_DISABLE_THREADS
+dnl ------------------
+dnl Sets the gl_THREADLIB default so that threads are not used by default.
+dnl The user can still override it at installation time, by using the
+dnl configure option '--enable-threads'.
+
+AC_DEFUN([gl_DISABLE_THREADS], [
+ m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
+])
+
+
+dnl Survey of platforms:
+dnl
+dnl Platform Available Compiler Supports test-lock
+dnl flavours option weak result
+dnl --------------- --------- --------- -------- ---------
+dnl Linux 2.4/glibc posix -lpthread Y OK
+dnl
+dnl GNU Hurd/glibc posix
+dnl
+dnl FreeBSD 5.3 posix -lc_r Y
+dnl posix -lkse ? Y
+dnl posix -lpthread ? Y
+dnl posix -lthr Y
+dnl
+dnl FreeBSD 5.2 posix -lc_r Y
+dnl posix -lkse Y
+dnl posix -lthr Y
+dnl
+dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
+dnl
+dnl NetBSD 1.6 --
+dnl
+dnl OpenBSD 3.4 posix -lpthread Y OK
+dnl
+dnl MacOS X 10.[123] posix -lpthread Y OK
+dnl
+dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK
+dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK
+dnl
+dnl HP-UX 11 posix -lpthread N (cc) OK
+dnl Y (gcc)
+dnl
+dnl IRIX 6.5 posix -lpthread Y 0.5
+dnl
+dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
+dnl
+dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
+dnl -lpthread (gcc) Y
+dnl
+dnl Cygwin posix -lpthread Y OK
+dnl
+dnl Any of the above pth -lpth 0.0
+dnl
+dnl Mingw win32 N OK
+dnl
+dnl BeOS 5 --
+dnl
+dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
+dnl turned off:
+dnl OK if all three tests terminate OK,
+dnl 0.5 if the first test terminates OK but the second one loops endlessly,
+dnl 0.0 if the first test already loops endlessly.
diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4
new file mode 100644
index 0000000..ff9a4ea
--- /dev/null
+++ b/m4/unistd_h.m4
@@ -0,0 +1,83 @@
+# unistd_h.m4 serial 17
+dnl Copyright (C) 2006-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Simon Josefsson, Bruno Haible.
+
+AC_DEFUN([gl_UNISTD_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+ gl_CHECK_NEXT_HEADERS([unistd.h])
+
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ if test $ac_cv_header_unistd_h = yes; then
+ HAVE_UNISTD_H=1
+ else
+ HAVE_UNISTD_H=0
+ fi
+ AC_SUBST([HAVE_UNISTD_H])
+])
+
+AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_UNISTD_H_DEFAULTS],
+[
+ GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
+ GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
+ GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
+ GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
+ GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS])
+ GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
+ GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC])
+ GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
+ GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
+ GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME])
+ GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE])
+ GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
+ GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
+ GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
+ GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
+ GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN])
+ GNULIB_LINK=0; AC_SUBST([GNULIB_LINK])
+ GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
+ GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
+ GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
+ GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
+ GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
+ HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS])
+ HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
+ HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
+ HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME])
+ HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
+ HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
+ HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
+ HAVE_GETUSERSHELL=1; AC_SUBST([HAVE_GETUSERSHELL])
+ HAVE_LINK=1; AC_SUBST([HAVE_LINK])
+ HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
+ HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
+ HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
+ HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
+ HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
+ HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
+ REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
+ REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
+ REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR])
+ REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
+ REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
+ REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
+ REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
+ REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE])
+ UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
+])
diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4
new file mode 100644
index 0000000..cd5079b
--- /dev/null
+++ b/m4/unlocked-io.m4
@@ -0,0 +1,41 @@
+# unlocked-io.m4 serial 15
+
+# Copyright (C) 1998-2006, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+dnl
+dnl See if the glibc *_unlocked I/O macros or functions are available.
+dnl Use only those *_unlocked macros or functions that are declared
+dnl (because some of them were declared in Solaris 2.5.1 but were removed
+dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
+dnl on Solaris 2.6).
+
+AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO],
+[
+ AC_DEFINE([USE_UNLOCKED_IO], [1],
+ [Define to 1 if you want getc etc. to use unlocked I/O if available.
+ Unlocked I/O can improve performance in unithreaded apps,
+ but it is not safe for multithreaded apps.])
+
+ dnl Persuade glibc and Solaris <stdio.h> to declare
+ dnl fgets_unlocked(), fputs_unlocked() etc.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_DECLS_ONCE([clearerr_unlocked])
+ AC_CHECK_DECLS_ONCE([feof_unlocked])
+ AC_CHECK_DECLS_ONCE([ferror_unlocked])
+ AC_CHECK_DECLS_ONCE([fflush_unlocked])
+ AC_CHECK_DECLS_ONCE([fgets_unlocked])
+ AC_CHECK_DECLS_ONCE([fputc_unlocked])
+ AC_CHECK_DECLS_ONCE([fputs_unlocked])
+ AC_CHECK_DECLS_ONCE([fread_unlocked])
+ AC_CHECK_DECLS_ONCE([fwrite_unlocked])
+ AC_CHECK_DECLS_ONCE([getc_unlocked])
+ AC_CHECK_DECLS_ONCE([getchar_unlocked])
+ AC_CHECK_DECLS_ONCE([putc_unlocked])
+ AC_CHECK_DECLS_ONCE([putchar_unlocked])
+])
diff --git a/m4/wchar.m4 b/m4/wchar.m4
new file mode 100644
index 0000000..ba8ee6a
--- /dev/null
+++ b/m4/wchar.m4
@@ -0,0 +1,99 @@
+dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
+
+dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Eric Blake.
+
+# wchar.m4 serial 22
+
+AC_DEFUN([gl_WCHAR_H],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_CACHE_CHECK([whether <wchar.h> is standalone],
+ [gl_cv_header_wchar_h_standalone],
+ [AC_COMPILE_IFELSE([[#include <wchar.h>
+wchar_t w;]],
+ [gl_cv_header_wchar_h_standalone=yes],
+ [gl_cv_header_wchar_h_standalone=no])])
+
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+ AC_SUBST([HAVE_WINT_T])
+
+ if test $gl_cv_header_wchar_h_standalone != yes || test $gt_cv_c_wint_t != yes; then
+ WCHAR_H=wchar.h
+ fi
+
+ dnl Prepare for creating substitute <wchar.h>.
+ dnl Do it always: WCHAR_H may be empty here but can be set later.
+ dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+ dnl character support).
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+ if test $ac_cv_header_wchar_h = yes; then
+ HAVE_WCHAR_H=1
+ else
+ HAVE_WCHAR_H=0
+ fi
+ AC_SUBST([HAVE_WCHAR_H])
+ gl_CHECK_NEXT_HEADERS([wchar.h])
+])
+
+dnl Unconditionally enables the replacement of <wchar.h>.
+AC_DEFUN([gl_REPLACE_WCHAR_H],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ WCHAR_H=wchar.h
+])
+
+AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_WCHAR_H_DEFAULTS],
+[
+ GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC])
+ GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB])
+ GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT])
+ GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC])
+ GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN])
+ GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS])
+ GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
+ GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB])
+ GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS])
+ GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
+ GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC])
+ HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT])
+ HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC])
+ HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN])
+ HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS])
+ HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS])
+ HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB])
+ HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS])
+ HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS])
+ HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB])
+ HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
+ REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])
+ REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC])
+ REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB])
+ REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT])
+ REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC])
+ REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN])
+ REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS])
+ REPLACE_MBSNRTOWCS=0;AC_SUBST([REPLACE_MBSNRTOWCS])
+ REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB])
+ REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS])
+ REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
+ WCHAR_H=''; AC_SUBST([WCHAR_H])
+])
diff --git a/m4/wcrtomb.m4 b/m4/wcrtomb.m4
new file mode 100644
index 0000000..11a197f
--- /dev/null
+++ b/m4/wcrtomb.m4
@@ -0,0 +1,88 @@
+# wcrtomb.m4 serial 3
+dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WCRTOMB],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_CHECK_FUNCS_ONCE([wcrtomb])
+ if test $ac_cv_func_wcrtomb = no; then
+ HAVE_WCRTOMB=0
+ else
+
+ dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes
+ dnl returns 0 instead of 1.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether wcrtomb return value is correct],
+ [gl_cv_func_wcrtomb_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on AIX 4, OSF/1 and Solaris.
+ aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_wcrtomb_retval=yes],
+ [gl_cv_func_wcrtomb_retval=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_wcrtomb_retval" in
+ *yes) ;;
+ *) REPLACE_WCRTOMB=1 ;;
+ esac
+ fi
+ if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([wcrtomb])
+ gl_PREREQ_WCRTOMB
+ fi
+])
+
+# Prerequisites of lib/wcrtomb.c.
+AC_DEFUN([gl_PREREQ_WCRTOMB], [
+ :
+])
diff --git a/m4/wctob.m4 b/m4/wctob.m4
new file mode 100644
index 0000000..39270c9
--- /dev/null
+++ b/m4/wctob.m4
@@ -0,0 +1,91 @@
+# wctob.m4 serial 4
+dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_WCTOB],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_CHECK_FUNCS_ONCE([wctob])
+ if test $ac_cv_func_wctob = no; then
+ HAVE_DECL_WCTOB=0
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([wctob])
+ gl_PREREQ_WCTOB
+ else
+
+ dnl Solaris 9 has the wctob() function but it does not work.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether wctob works],
+ [gl_cv_func_wctob_works],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris <= 9.
+ solaris2.[1-9] | solaris2.[1-9].*)
+ gl_cv_func_wctob_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wctob_works="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ wchar_t wc;
+
+ if (mbtowc (&wc, "\374", 1) == 1)
+ if (wctob (wc) != (unsigned char) '\374')
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_wctob_works=yes],
+ [gl_cv_func_wctob_works=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_wctob_works" in
+ *yes) ;;
+ *) REPLACE_WCTOB=1 ;;
+ esac
+ if test $REPLACE_WCTOB = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([wctob])
+ gl_PREREQ_WCTOB
+ else
+
+ dnl IRIX 6.5 has the wctob() function but does not declare it.
+ AC_CHECK_DECLS([wctob], [], [], [
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+])
+ if test $ac_cv_have_decl_wctob != yes; then
+ HAVE_DECL_WCTOB=0
+ gl_REPLACE_WCHAR_H
+ fi
+ fi
+ fi
+])
+
+# Prerequisites of lib/wctob.c.
+AC_DEFUN([gl_PREREQ_WCTOB], [
+ :
+])
diff --git a/m4/wctype.m4 b/m4/wctype.m4
new file mode 100644
index 0000000..6a1b6f0
--- /dev/null
+++ b/m4/wctype.m4
@@ -0,0 +1,74 @@
+# wctype.m4 serial 2
+
+dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
+
+dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_WCTYPE_H],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CHECK_FUNCS_ONCE([iswcntrl])
+ if test $ac_cv_func_iswcntrl = yes; then
+ HAVE_ISWCNTRL=1
+ else
+ HAVE_ISWCNTRL=0
+ fi
+ AC_SUBST([HAVE_ISWCNTRL])
+ AC_CHECK_HEADERS_ONCE([wctype.h])
+ AC_REQUIRE([AC_C_INLINE])
+
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+ AC_SUBST([HAVE_WINT_T])
+
+ WCTYPE_H=wctype.h
+ if test $ac_cv_header_wctype_h = yes; then
+ if test $ac_cv_func_iswcntrl = yes; then
+ dnl Linux libc5 has an iswprint function that returns 0 for all arguments.
+ dnl The other functions are likely broken in the same way.
+ AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works],
+ [
+ AC_TRY_RUN([#include <stddef.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <wchar.h>
+ #include <wctype.h>
+ int main () { return iswprint ('x') == 0; }],
+ [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no],
+ [AC_TRY_COMPILE([#include <stdlib.h>
+ #if __GNU_LIBRARY__ == 1
+ Linux libc5 i18n is broken.
+ #endif], [],
+ [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no])
+ ])
+ ])
+ if test $gl_cv_func_iswcntrl_works = yes; then
+ WCTYPE_H=
+ fi
+ fi
+ dnl Compute NEXT_WCTYPE_H even if WCTYPE_H is empty,
+ dnl for the benefit of builds from non-distclean directories.
+ gl_CHECK_NEXT_HEADERS([wctype.h])
+ HAVE_WCTYPE_H=1
+ else
+ HAVE_WCTYPE_H=0
+ fi
+ AC_SUBST([HAVE_WCTYPE_H])
+ AC_SUBST([WCTYPE_H])
+
+ if test "$gl_cv_func_iswcntrl_works" = no; then
+ REPLACE_ISWCNTRL=1
+ else
+ REPLACE_ISWCNTRL=0
+ fi
+ AC_SUBST([REPLACE_ISWCNTRL])
+])
diff --git a/m4/wint_t.m4 b/m4/wint_t.m4
new file mode 100644
index 0000000..47a4363
--- /dev/null
+++ b/m4/wint_t.m4
@@ -0,0 +1,28 @@
+# wint_t.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 2003, 2007-2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
+ [AC_TRY_COMPILE([
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';], ,
+ [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])])
+ if test $gt_cv_c_wint_t = yes; then
+ AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
+ fi
+])
diff --git a/m4/xalloc.m4 b/m4/xalloc.m4
new file mode 100644
index 0000000..837a948
--- /dev/null
+++ b/m4/xalloc.m4
@@ -0,0 +1,24 @@
+# xalloc.m4 serial 16
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_XALLOC],
+[
+ AC_LIBOBJ([xmalloc])
+
+ gl_PREREQ_XALLOC
+ gl_PREREQ_XMALLOC
+])
+
+# Prerequisites of lib/xalloc.h.
+AC_DEFUN([gl_PREREQ_XALLOC], [
+ AC_REQUIRE([gl_INLINE])
+ :
+])
+
+# Prerequisites of lib/xmalloc.c.
+AC_DEFUN([gl_PREREQ_XMALLOC], [
+ :
+])
diff --git a/po/LINGUAS b/po/LINGUAS
index cb92b48..460b001 100644
--- a/po/LINGUAS
+++ b/po/LINGUAS
@@ -1 +1,36 @@
-af ca cs da de el eo es et fi fr ga gl he hr hu id it ja ko nl pl pt_BR ro ru sk sl sr sv tr zh_CN
+af
+ca
+cs
+da
+de
+el
+eo
+es
+et
+eu
+fi
+fr
+ga
+gl
+he
+hr
+hu
+id
+it
+ja
+ko
+nl
+pl
+pt
+pt_BR
+ro
+ru
+sk
+sl
+sr
+sv
+tr
+uk
+vi
+zh_CN
+zh_TW
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index e955532..e7d1ab2 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -1,5 +1,7 @@
+# -*- buffer-read-only: t -*- vi: set ro:
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
# Makefile for PO directory in any package using GNU gettext.
-# Copyright (C) 1995-1997, 2000-2002 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file can be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU General Public
@@ -7,9 +9,12 @@
# functionality.
# Please note that the actual code of GNU gettext is covered by the GNU
# General Public License and is *not* in the public domain.
+#
+# Origin: gettext-0.15
PACKAGE = @PACKAGE@
VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
SHELL = /bin/sh
@SET_MAKE@
@@ -20,18 +25,28 @@ VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
datadir = @datadir@
-localedir = $(datadir)/locale
+localedir = @localedir@
gettextsrcdir = $(datadir)/gettext/po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @MKINSTALLDIRS@
-mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
-
-GMSGFMT = @GMSGFMT@
-MSGFMT = @MSGFMT@
-XGETTEXT = @XGETTEXT@
+mkinstalldirs = $(SHELL) @install_sh@ -d
+mkdir_p = @mkdir_p@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
MSGMERGE = msgmerge
MSGMERGE_UPDATE = @MSGMERGE@ --update
MSGINIT = msginit
@@ -42,9 +57,9 @@ POFILES = @POFILES@
GMOFILES = @GMOFILES@
UPDATEPOFILES = @UPDATEPOFILES@
DUMMYPOFILES = @DUMMYPOFILES@
-DISTFILES.common = Makefile.in.in Makevars \
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
-DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
$(POFILES) $(GMOFILES) \
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
@@ -55,67 +70,126 @@ CATALOGS = @CATALOGS@
# Makevars gets inserted here. (Don't remove this line!)
.SUFFIXES:
-.SUFFIXES: .po .gmo .mo .nop .po-update
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
.po.mo:
- $(MSGFMT) -c -o $@ $<
+ @echo "$(MSGFMT) -c -o $@ $<"; \
+ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
.po.gmo:
@lang=`echo $* | sed -e 's,.*/,,'`; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
- cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
all: all-@USE_NLS@
-all-yes: $(CATALOGS)
+all-yes: stamp-po
all-no:
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, stamp-po is a nop (i.e. a phony target).
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+ test ! -f $(srcdir)/$(DOMAIN).pot || \
+ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+ @test ! -f $(srcdir)/$(DOMAIN).pot || { \
+ echo "touch stamp-po" && \
+ echo timestamp > stamp-poT && \
+ mv stamp-poT stamp-po; \
+ }
+
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
-$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
+ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+ else \
+ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+ fi; \
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
--files-from=$(srcdir)/POTFILES.in \
--copyright-holder='$(COPYRIGHT_HOLDER)' \
- && test ! -f $(DOMAIN).po \
- || ( rm -f $(srcdir)/$(DOMAIN).pot \
- && mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot )
+ --msgid-bugs-address="$$msgid_bugs_address"
+ test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+ else \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ else \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ }
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
$(srcdir)/$(DOMAIN).pot:
$(MAKE) $(DOMAIN).pot-update
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
$(POFILES): $(srcdir)/$(DOMAIN).pot
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
- test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
- echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
- cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
+ if test -f "$(srcdir)/$${lang}.po"; then \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
+ else \
+ $(MAKE) $${lang}.po-create; \
+ fi
install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
- if test "$(PACKAGE)" = "gettext"; then \
- $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
- for file in $(DISTFILES.common); do \
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ for file in $(DISTFILES.common) Makevars.template; do \
$(INSTALL_DATA) $(srcdir)/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
+ for file in Makevars; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
else \
: ; \
fi
install-data-no: all
install-data-yes: all
- $(mkinstalldirs) $(DESTDIR)$(datadir)
+ $(mkdir_p) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
- $(mkinstalldirs) $(DESTDIR)$$dir; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
@@ -154,20 +228,20 @@ install-strip: install
installdirs: installdirs-exec installdirs-data
installdirs-exec:
installdirs-data: installdirs-data-@USE_NLS@
- if test "$(PACKAGE)" = "gettext"; then \
- $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
else \
: ; \
fi
installdirs-data-no:
installdirs-data-yes:
- $(mkinstalldirs) $(DESTDIR)$(datadir)
+ $(mkdir_p) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
- $(mkinstalldirs) $(DESTDIR)$$dir; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
if test -n "$$lc"; then \
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
@@ -199,8 +273,8 @@ installcheck:
uninstall: uninstall-exec uninstall-data
uninstall-exec:
uninstall-data: uninstall-data-@USE_NLS@
- if test "$(PACKAGE)" = "gettext"; then \
- for file in $(DISTFILES.common); do \
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ for file in $(DISTFILES.common) Makevars.template; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
@@ -219,10 +293,12 @@ uninstall-data-yes:
check: all
-dvi info tags TAGS ID:
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
mostlyclean:
- rm -f core core.* $(DOMAIN).po *.new.po
+ rm -f remove-potcdate.sed
+ rm -f stamp-poT
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
rm -fr *.o
clean: mostlyclean
@@ -233,35 +309,55 @@ distclean: clean
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
- rm -f $(GMOFILES)
+ rm -f stamp-po $(GMOFILES)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
$(MAKE) update-po
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
-dist2: $(DISTFILES)
+dist2: stamp-po $(DISTFILES)
dists="$(DISTFILES)"; \
- if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ dists="$$dists Makevars.template"; \
+ fi; \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ dists="$$dists $(DOMAIN).pot stamp-po"; \
+ fi; \
+ if test -f $(srcdir)/ChangeLog; then \
+ dists="$$dists ChangeLog"; \
+ fi; \
+ for i in 0 1 2 3 4 5 6 7 8 9; do \
+ if test -f $(srcdir)/ChangeLog.$$i; then \
+ dists="$$dists ChangeLog.$$i"; \
+ fi; \
+ done; \
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
for file in $$dists; do \
if test -f $$file; then \
- cp -p $$file $(distdir); \
+ cp -p $$file $(distdir) || exit 1; \
else \
- cp -p $(srcdir)/$$file $(distdir); \
+ cp -p $(srcdir)/$$file $(distdir) || exit 1; \
fi; \
done
update-po: Makefile
$(MAKE) $(DOMAIN).pot-update
- $(MAKE) $(UPDATEPOFILES)
+ test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
$(MAKE) update-gmo
+# General rule for creating PO files.
+
+.nop.po-create:
+ @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
+ exit 1
+
# General rule for updating PO files.
.nop.po-update:
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
- if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
+ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
tmpdir=`pwd`; \
echo "$$lang:"; \
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
@@ -288,10 +384,9 @@ $(DUMMYPOFILES):
update-gmo: Makefile $(GMOFILES)
@:
-Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
cd $(top_builddir) \
- && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
- $(SHELL) ./config.status
+ && $(SHELL) ./config.status $(subdir)/$@.in po-directories
force:
diff --git a/po/Makevars b/po/Makevars
index 32692ab..c026e13 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -1,3 +1,5 @@
+# -*- buffer-read-only: t -*- vi: set ro:
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
@@ -8,7 +10,18 @@ subdir = po
top_builddir = ..
# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ \
+ \
+ --flag=_:1:pass-c-format\
+ --flag=N_:1:pass-c-format\
+ --flag=error:3:c-format --flag=error_at_line:5:c-format\
+\
+ --from-code=UTF-8\
+ --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\
+ --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\
+ --flag=wrapf:1:c-format\
+ --flag=error:3:c-format --flag=error_at_line:5:c-format\
+ $${end_of_xgettext_options+}
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
@@ -34,8 +47,8 @@ COPYRIGHT_HOLDER = Free Software Foundation, Inc.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
-MSGID_BUGS_ADDRESS =
+MSGID_BUGS_ADDRESS = bug-gnu-utils@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
-EXTRA_LOCALE_CATEGORIES =
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 3c06d1e..a725149 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,7 +2,7 @@ sed/compile.c
sed/execute.c
sed/regexp.c
sed/sed.c
-lib/utils.c
+sed/utils.c
lib/regcomp.c
lib/regexec.c
lib/regex_internal.c
diff --git a/po/Rules-quot b/po/Rules-quot
index 5f46d23..9c2a995 100644
--- a/po/Rules-quot
+++ b/po/Rules-quot
@@ -4,6 +4,11 @@ DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.heade
.SUFFIXES: .insert-header .po-update-en
+en@quot.po-create:
+ $(MAKE) en@quot.po-update
+en@boldquot.po-create:
+ $(MAKE) en@boldquot.po-update
+
en@quot.po-update: en@quot.po-update-en
en@boldquot.po-update: en@boldquot.po-update-en
diff --git a/po/af.gmo b/po/af.gmo
index f701a18..bfe185e 100644
--- a/po/af.gmo
+++ b/po/af.gmo
Binary files differ
diff --git a/po/af.po b/po/af.po
index 8e10341..22087b0 100644
--- a/po/af.po
+++ b/po/af.po
@@ -6,8 +6,8 @@
msgid ""
msgstr ""
"Project-Id-Version: sed 4.0.9\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\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"
@@ -16,190 +16,206 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n!=1;\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
#, fuzzy
msgid "multiple `!'s"
msgstr "Meervoudige `!'s"
-#: sed/compile.c:163
+#: sed/compile.c:162
#, fuzzy
msgid "unexpected `,'"
msgstr "Onverwagte `,'"
-#: sed/compile.c:164
+#: sed/compile.c:163
#, fuzzy
msgid "invalid usage of +N or ~N as first address"
msgstr "Kan nie +N or ~N as die eerste adres gebruik nie"
-#: sed/compile.c:165
+#: sed/compile.c:164
#, fuzzy
msgid "unmatched `{'"
msgstr "Ongepaarde `{'"
-#: sed/compile.c:166
+#: sed/compile.c:165
#, fuzzy
msgid "unexpected `}'"
msgstr "Onverwagte `}'"
-#: sed/compile.c:167
+#: sed/compile.c:166
#, fuzzy
msgid "extra characters after command"
msgstr "Ekstra karakters na instruksie"
-#: sed/compile.c:168
+#: sed/compile.c:167
#, fuzzy
msgid "expected \\ after `a', `c' or `i'"
msgstr "Het \\ na `a', `c' or `i' verwag"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' soek nie 'n adres nie"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": soek nie 'n adres nie"
-#: sed/compile.c:171
+#: sed/compile.c:170
#, fuzzy
msgid "comments don't accept any addresses"
msgstr "Kommentare aanvaar nie adresse nie"
-#: sed/compile.c:172
+#: sed/compile.c:171
#, fuzzy
msgid "missing command"
msgstr "Vermiste instruksie"
-#: sed/compile.c:173
+#: sed/compile.c:172
#, fuzzy
msgid "command only uses one address"
msgstr "Instruksie gebruik slegs een adres"
-#: sed/compile.c:174
+#: sed/compile.c:173
#, fuzzy
msgid "unterminated address regex"
msgstr "Ongetermineerde adresregex"
-#: sed/compile.c:175
+#: sed/compile.c:174
#, fuzzy
msgid "unterminated `s' command"
msgstr "Ongetermineerde `s' instruksie"
-#: sed/compile.c:176
+#: sed/compile.c:175
#, fuzzy
msgid "unterminated `y' command"
msgstr "Ongetermineerde `y' instruksie"
-#: sed/compile.c:177
+#: sed/compile.c:176
#, fuzzy
msgid "unknown option to `s'"
msgstr "Onbekende opsie vir `s'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "meervoudige `p' opsies vir `s' instruksie"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "meervoudige `g' opsies vir `s' instruksie"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "meervoudige nommeropsies vir `s' instruksie"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "nommeropsie vir `s' instruksie mag nie nul wees nie"
-#: sed/compile.c:182
+#: sed/compile.c:181
#, fuzzy
msgid "strings for `y' command are different lengths"
msgstr "stringe vir y-instruksie het verskillende lengtes"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "het nuwer sed-weergawe verwag"
-#: sed/compile.c:185
+#: sed/compile.c:184
#, fuzzy
msgid "invalid usage of line address 0"
msgstr "Instruksie gebruik slegs een adres"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, fuzzy, c-format
msgid "unknown command: `%c'"
msgstr "Onbekende instruksie:"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: lêer %s lyn %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, 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:1664
#, 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:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: Kan nie %s lees nie: %s\n"
-#: sed/execute.c:673
+#: sed/execute.c:728
#, fuzzy, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Kon nie die lêer %s oopmaak nie: %s"
+msgstr "kon nie %d item na %s skryf nie: %s"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Kon nie die lêer %s oopmaak nie: %s"
+msgstr ""
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Kon nie tydelike lêer %s oopmaak nie: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "fout in subproses"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "opsie `e' word nie ondersteun nie"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "`e' instruksie word nie ondersteun nie"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:41
#, fuzzy
msgid "no previous regular expression"
msgstr "Geen vorige regex nie"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
#, fuzzy
msgid "cannot specify modifiers on empty regexp"
msgstr "Kan nie veranderaars vir leë regex spesifiseer nie"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, fuzzy, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "Ongeldige regterhandsverwysing \\%d vir `s' instruksie"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Rapporteer foute per e-pos aan: <%s>.\n"
+"Sluit asb. die woord ``%s'' êrens in die onderwerplyn in.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -207,28 +223,28 @@ msgstr ""
" -R, --regexp-perl\n"
" gebruik Perl 5 se regexsintaks in die skrip.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -236,28 +252,43 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:114
+#: sed/sed.c:148
#, fuzzy, c-format
msgid ""
" -r, --regexp-extended\n"
@@ -266,7 +297,7 @@ msgstr ""
" -R, --regexp-perl\n"
" gebruik Perl 5 se regexsintaks in die skrip.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -275,7 +306,7 @@ msgid ""
" long stream.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -284,17 +315,17 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -305,21 +336,12 @@ msgid ""
"\n"
msgstr ""
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Rapporteer foute per e-pos aan: %s .\n"
-"Sluit asb. die woord ``%s'' êrens in die onderwerplyn in.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed weergawe %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, fuzzy, c-format
msgid ""
"based on GNU sed version %s\n"
@@ -328,12 +350,12 @@ msgstr ""
"gebaseer op GNU sed weergawe 3.02.80\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed weergawe %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -348,101 +370,197 @@ msgstr ""
"DOEL,\n"
"binne regsperke nie.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, fuzzy, c-format
msgid "cannot remove %s: %s"
msgstr "%s: Kan nie %s lees nie: %s\n"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, fuzzy, c-format
msgid "couldn't open file %s: %s"
msgstr "Kon nie die lêer %s oopmaak nie: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "kon nie %d item na %s skryf nie: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d 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"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "leesfout op %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "Kon nie die lêer %s oopmaak nie: %s"
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "%s: Kan nie %s lees nie: %s\n"
+
+#: sed/utils.c:438
#, fuzzy, c-format
msgid "cannot rename %s: %s"
msgstr "%s: Kan nie %s lees nie: %s\n"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Sukses"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Geen paring"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Ongeldige regex"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Ongeldige kollasiekarakter"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Ongeldige karakterklasnaam"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Sleep terugstreep"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Ongeldige terugverwysing"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Ongepaarde [ of [^"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Ongepaarde ( or \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Ongepaarde \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Ongeldige inhoud binne \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Ongeldige bereikseinde"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Geheue uitgeput"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Ongeldige vorige regex"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Premature einde vir regex"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Regex te groot"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Ongepaarde ) of \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Geen vorige regex nie"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "Het savchar() met onverwagte agterstoot (%x) geroep"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "INTERNE FOUT: slegte adrestipe"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "INTERNE FOUT: Swak instruksie %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit files in place (makes backup if extension "
+#~ "supplied)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -r, --regexp-extended\n"
+#~ " use extended regular expressions in the script.\n"
+#~ "%s -s, --separate\n"
+#~ " consider files as separate rather than as a single "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ " load minimal amounts of data from the input files and "
+#~ "flush\n"
+#~ " the output buffers more often\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Gebruik: %s [OPTION]... {skrip-indien-absoluut-geen-ander-skrip} "
+#~ "[inset_dokument]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " onderdruk outomatiese druk van patroonruimte\n"
+#~ " -e script, --expression=script\n"
+#~ " voeg skrip by die instruksie wat uitgevoer moet word\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " voer die inhoud van die skriplêer by die instruksies wat "
+#~ "uitgevoer moet word\n"
+#~ " -i[agtervoegsel], --in-place[=agtervoegsel]\n"
+#~ " redigeer dokumente inplek (maak rugsteunkopieë as "
+#~ "agtervoegsel voorsien word)\n"
+#~ " -l N, --line-length=N\n"
+#~ " spesifiseer die gewensde lynvoulengte vir die `l' "
+#~ "instruksie\n"
+#~ " -r, --regexp-extended\n"
+#~ " gebruik uitgebreide regex in die skrip\n"
+#~ "%s -s, --separate\n"
+#~ " beskou dokumente as alleenstaande instede van 'n "
+#~ "kontinuum\n"
+#~ " -u, --unbuffered\n"
+#~ " laai minimale hoeveelheid data uit die insetdokumente en "
+#~ "spoel\n"
+#~ " die uitsetbuffers meer gereeld\n"
+#~ " --help vertoon hierdie hulpboodskap en stop\n"
+#~ " -V, --version vertoon weergaweinligting en stop\n"
+#~ "\n"
+#~ "Indien geen -e, --expression, -f, of --file opsie voorsien word nie, dan "
+#~ "sal die eerste\n"
+#~ "nieopsieparameter as sedskrip aanvaar word ter interpretasie. Alle\n"
+#~ "oorblewende parameters is name van insetdokumente; indien geen "
+#~ "insetdokumente\n"
+#~ "voorsien word nie, word standaardinset gelees.\n"
+#~ "\n"
+#~ "\n"
diff --git a/po/ca.gmo b/po/ca.gmo
index 5994827..b018c97 100644
--- a/po/ca.gmo
+++ b/po/ca.gmo
Binary files differ
diff --git a/po/ca.po b/po/ca.po
index a99b5a6..a7425f3 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -1,14 +1,14 @@
# Catalan translation of sed.
-# Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
-# Jordi Mallach <jordi@gnu.org>, 2002, 2003, 2004.
+# Jordi Mallach <jordi@gnu.org>, 2002, 2003, 2004, 2005, 2008.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.1.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2004-07-10 05:51+0200\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-18 09:24+0100\n"
"Last-Translator: Jordi Mallach <jordi@gnu.org>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
"MIME-Version: 1.0\n"
@@ -16,172 +16,189 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n!=1;\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr "mltiples !"
-#: sed/compile.c:163
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr ", inesperada"
-#: sed/compile.c:164
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
msgstr "no es pot utilitzar +N o ~N com a primera adrea"
-#: sed/compile.c:165
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "{ no emparellat"
-#: sed/compile.c:166
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "} inesperat"
-#: sed/compile.c:167
+#: sed/compile.c:166
msgid "extra characters after command"
msgstr "hi ha carcters extra desprs de l'ordre"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr "s'espera \\ desprs de a, c i i"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "} no accepta cap adrea"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": no accepta cap adrea"
-#: sed/compile.c:171
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr "els comentaris no accepten cap adrea"
-#: sed/compile.c:172
+#: sed/compile.c:171
msgid "missing command"
msgstr "cal una ordre"
-#: sed/compile.c:173
+#: sed/compile.c:172
msgid "command only uses one address"
msgstr "l'ordre utilitza noms una adrea"
-#: sed/compile.c:174
+#: sed/compile.c:173
msgid "unterminated address regex"
msgstr "l'expressi regular d'adrea no est terminada"
-#: sed/compile.c:175
+#: sed/compile.c:174
msgid "unterminated `s' command"
msgstr "ordre s no terminada"
-#: sed/compile.c:176
+#: sed/compile.c:175
msgid "unterminated `y' command"
msgstr "ordre y no terminada"
-#: sed/compile.c:177
+#: sed/compile.c:176
msgid "unknown option to `s'"
msgstr "opci desconeguda per a s"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "mltiples opcions p per a l'ordre s"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "mltiples opcions g per a l'ordre s"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "mltiples opcions numriques per a l'ordre s"
-#: sed/compile.c:181
+#: sed/compile.c:180
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:182
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr "les cadenes per a l'ordre y sn de longituds diferents"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr "el carcter delimitador no s un carcter d'un byte"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "s'esperava una versi ms nova de sed"
-#: sed/compile.c:185
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "s de l'adrea de lnia 0 invlid"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "ordre desconeguda: %c"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fitxer %s lnia %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, 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:1664
#, 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:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: no es pot llegir %s: %s\n"
-#: sed/execute.c:673
+#: sed/execute.c:728
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "no s'ha pogut editar %s: s un terminal"
-#: sed/execute.c:677
+#: sed/execute.c:733
#, 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:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "no s'ha pogut obrir el fitxer temporal %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "s'ha produt un error en el subprocs"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "l'opci e no est suportada"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "l'ordre e no est suportada"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "no hi ha fitxers d'entrada"
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr "no hi ha una expressi regular prvia"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr "no es poden especificar modificadors en expregs buides"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "referncia \\%d no vlida en el costat dret de l'ordre s"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Envieu informes d'error a: <%s>.\n"
+"Assegureu-vos d'incloure la paraula %s en alguna part del camp "
+"Assumpte:.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -190,7 +207,7 @@ msgstr ""
" usa la sintaxi d'expressions regulars de Perl 5 en aquesta\n"
" sequncia.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -200,7 +217,7 @@ msgstr ""
" [fitxer-entrada]...\n"
"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -209,7 +226,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" suprimeix la impressi automtica de l'espai de patrons\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -218,7 +235,7 @@ msgstr ""
" -e script, --expression=script\n"
" afegeix el script a les ordres a executar\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -229,7 +246,17 @@ msgstr ""
" afegeix els continguts de fitxer-script a les ordres a "
"executar\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" segueix enllaos simblics quan s'editen els mateixos "
+"fitxers\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -239,7 +266,18 @@ msgstr ""
" edita els mateixos fitxers (fa cpia de seguretat si es\n"
" proveeix una extensi)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" obre els fitxers en mode binari (no es processen els CR+LF\n"
+" de manera especial)\n"
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -249,7 +287,7 @@ msgstr ""
" especifica la longitud desitjada per a l'ajust de final de\n"
" lnia per a l'ordre l\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
@@ -258,7 +296,7 @@ msgstr ""
" --posix\n"
" inhabilita totes les extensions GNU.\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
@@ -267,7 +305,7 @@ msgstr ""
" -r, --regexp-extended\n"
" usa expressions regulars exteses en el script.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -279,7 +317,7 @@ msgstr ""
" considera els fitxers com independents, en compte d'un\n"
" llarg flux continu.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -292,17 +330,17 @@ msgstr ""
"d'entrada\n"
" i buida els bfers d'eixida ms sovint\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help mostra aquest missatge d'ajuda i surt\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version mostra la informaci de la versi i surt\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -321,22 +359,12 @@ msgstr ""
"es llegeix l'entrada estndard.\n"
"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Envieu informes d'error a: %s.\n"
-"Assegureu-vos d'incloure la paraula %s en alguna part del camp "
-"Assumpte:.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed versi %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
@@ -345,12 +373,12 @@ msgstr ""
"basat en GNU sed versi %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed versi %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -363,101 +391,208 @@ msgstr ""
"de cpia. No hi ha CAP garantia; ni tan sols de COMERCIABILITAT o\n"
"ADEQUACI A UN PROPSIT PARTICULAR, fins on ho permeta la llei.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, c-format
msgid "cannot remove %s: %s"
msgstr "no es pot eliminar %s: %s"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, c-format
msgid "couldn't open file %s: %s"
msgstr "no s'ha pogut obrir el fitxer %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "no s'ha pogut adjuntar a %s: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d 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"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "error de lectura en %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "no s'ha pogut seguir l'enlla simblic %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "no es pot fer stat de %s: %s"
+
+#: sed/utils.c:438
#, c-format
msgid "cannot rename %s: %s"
msgstr "no es pot reanomenar %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "xit"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Sense parella"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Expressi regular no vlida"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "El carcter de comparaci no s vlid"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Nom de classe de carcter no vlid"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Barra invertida al final"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "La referncia cap enrere no s vlida"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "[ o [^ no emparellat"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "( o \\( no emparellat"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "\\{ no emparellat"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "El contingut de \\{\\} no s vlid"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "El rang final no s vlid"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Memria exhaurida"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "L'expressi regular precedent no vlida"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Fi prematur de l'expressi regular"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "L'expressi regular s massa gran"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr ") o \\) no emparellat"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "No hi ha una expressi regular prvia"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "S'ha cridat a savchar() amb una espenta inesperada (%x)"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "ERROR INTERN: tipus d'adrea errnia"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "ERROR INTERN: Ordre errnia %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit files in place (makes backup if extension "
+#~ "supplied)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -r, --regexp-extended\n"
+#~ " use extended regular expressions in the script.\n"
+#~ "%s -s, --separate\n"
+#~ " consider files as separate rather than as a single "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ " load minimal amounts of data from the input files and "
+#~ "flush\n"
+#~ " the output buffers more often\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "s: %s [OPCI]... {script-noms-si-no-hi-ha-altres-scripts} [fitxer-"
+#~ "entrada]...\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suprimeix la impressi automtica de l'espai de patrons\n"
+#~ " -e script, --expression=script\n"
+#~ " afegeix el script a les ordres a executar\n"
+#~ " -f fitxer-script, --file=fitxer-script\n"
+#~ " afegeix els continguts de fitxer-script a les ordres a "
+#~ "executar\n"
+#~ " -i[sufix], --in-place[=sufix]\n"
+#~ " edita els mateixos fitxers (fa cpia de seguretat si es\n"
+#~ " proveeix una extensi)\n"
+#~ " -l N, --line-length=N\n"
+#~ " especifica la longitud desitjada per a l'ajust de final "
+#~ "de\n"
+#~ " lnia per a l'ordre l\n"
+#~ " -r, --regexp-extended\n"
+#~ " usa expressions regulars exteses en el script.\n"
+#~ "%s -s, --separate\n"
+#~ " considera els fitxers com independents, en compte d'un "
+#~ "llarg\n"
+#~ " flux continu.\n"
+#~ " -u, --unbuffered\n"
+#~ "\n"
+#~ " --help mostra aquest missatge d'ajuda i surt\n"
+#~ " -V, --version mostra la informaci de la versi i surt\n"
+#~ "\n"
+#~ "Si no es donen cap de les opcions -e, --expression, -f o --file, el "
+#~ "primer\n"
+#~ "argument no-opci es pren com el script sed a interpretar. Tots els "
+#~ "arguments\n"
+#~ "restants sn noms de fitxers d'entrada; si no s'especifiquen fitxers "
+#~ "d'entrada,\n"
+#~ "es llegeix l'entrada estndard.\n"
+#~ "\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Final-de-fitxer inesperat"
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "expressi regular incorrecta: %s\n"
+
+#~ msgid "input read error: %s"
+#~ msgstr "error al llegir l'entrada: %s"
+
+#~ msgid "couldn't write an item to %s: %s"
+#~ msgstr "no s'ha pogut escriure un element a %s: %s"
diff --git a/po/cs.gmo b/po/cs.gmo
index 152be0c..09ca8f0 100644
--- a/po/cs.gmo
+++ b/po/cs.gmo
Binary files differ
diff --git a/po/cs.po b/po/cs.po
index caf786a..79d7fee 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -1,263 +1,308 @@
# Czech translations for GNU sed package.
# Copyright (C) 1998 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
# Jaroslav Fojtik <fojtik@cmp.felk.cvut.cz>, 1998.
+# Petr Pisar <petr.pisar@atlas.cz>, 2008.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 3.02.80\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2001-08-05 19:52+02:00\n"
-"Last-Translator: Vladimir Michl <Vladimir.Michl@seznam.cz>\n"
-"Language-Team: Czech <cs@li.org>\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-05-27 20:33+0200\n"
+"Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
+"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "Vcensobn `!'"
+msgstr "vícenásobný „!“"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr "Neoekvn `,'"
+msgstr "neočekávaná „,“"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "+N nebo ~N nelze pout jako prvn adresu"
+msgstr "+N nebo ~N nelze použít jako první adresu"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr "Neodpovdajc `{'"
+msgstr "neodpovídající „{“"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr "Neoekvan `}'"
+msgstr "neočekávaná „}“"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Nadbyten znaky po pkazu"
+msgstr "nadbytečné znaky po příkazu"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr ""
+msgstr "po „a“, „c“ nebo „i“ je očekávané „\\“"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
-msgstr "`}' nevyaduje jakoukoliv adresu"
+msgstr "„}“ nevyžaduje jakoukoliv adresu"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": nechce jakoukoliv adresu"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "V komenti nen ppustn jakkoliv adresa"
+msgstr "komentáře nepřipouštějí žádnou adresu"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr "Chybjc pkaz"
+msgstr "chybějící příkaz"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "Pkaz pouv pouze jedinou adresu"
+msgstr "příkaz používá pouze jedinou adresu"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "Neukonen adresa regulrnho vrazu"
+msgstr "neukončená adresa regulárního výrazu"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "Neukonen pkaz `s'"
+msgstr "neukončený příkaz „s“"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "Neukonen pkaz `y'"
+msgstr "neukončený příkaz „y“"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "Neznm pepna pro `s'"
+msgstr "neznámý přepínač pro „s“"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
-msgstr "vcensobn pouit pepnae `p' s pkazem `s'"
+msgstr "vícenásobné použití přepínače „p“ s příkazem „s“"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
-msgstr "vcensobn pouit pepnae `g' s pkazem `s'"
+msgstr "vícenásobné použití přepínače „g“ s příkazem „s“"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
-msgstr "pkaz `s' me mt maximln jednu selnou volbu"
+msgstr "příkaz „s“ může mít maximálně jednu číselný přepínač"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
-msgstr "seln volba pkazu `s' neme bt nula"
+msgstr "číselný přepínač příkazu „s“ nemůže být nula"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "etzce pro pkaz `y' mus bt stejn dlouh"
+msgstr "řetězce pro příkaz „y“ mají rozdílnou délku"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "oddělovací znak není jednobajtovým znakem"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr ""
+msgstr "očekávána nová verze sedu"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Chybn pouit adresy modifiktoru"
+msgstr "chybné použití adresy řádku 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Neznm pkaz:"
+msgstr "neznámý příkaz: „%c“"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
-msgstr "%s: soubor %s, dek %lu: %s\n"
+msgstr "%s: soubor %s, řádek %'lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
-msgstr "%s: -e vraz #%lu, znak %lu: %s\n"
+msgstr "%s: -e výraz č. %'lu, znak %'lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "Nvt pro skok na `%s' nelze najt"
+msgstr "návěští pro skok na „%s“ nelze najít"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: %s nelze st: %s\n"
+msgstr "%s: %s nelze číst: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Soubor %s nelze otevt"
+msgstr "%s nelze upravovat: je to terminál"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Soubor %s nelze otevt"
+msgstr "%s nelze upravovat: není obyčejným souborem"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Soubor %s nelze otevt"
+msgstr "dočasný soubor %s nelze otevřít: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
-msgstr ""
+msgstr "chyba v podprocesu"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
-msgstr ""
+msgstr "přepínač „e“ není podporován"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
-msgstr ""
+msgstr "příkaz „e“ není podporován"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "žádné vstupní soubory"
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr ""
+msgstr "žádný předcházející regulární výraz"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr ""
+msgstr "prázdný regulární výraz nemůže mít modifikátory"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
+msgstr "chybný odkaz \\%d na pravé straně příkazu „s“"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
msgstr ""
-#: sed/sed.c:93
+#: sed/sed.c:106
+#, fuzzy, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Chyby v programu oznamujte na adrese <%s> (anglicky) a\n"
+"kamkoliv do položky „Předmět:“ vložte „%s“. Připomínky k překladu\n"
+"zasílejte na adresu <translation-team-cs@lists.sourceforge.net> (česky).\n"
+
+#: sed/sed.c:119
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:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Použití: %s [PŘEPÍNAČ]… {SKRIPT_JEN_KDYŽ_JE_JEDINÝ} [VSTUPNÍ_SOUBOR]…\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" potlačí automatické vypisování prostoru vzorů\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e script, --expression=SKRIPT\n"
+" přidá skript mezi příkazy k provedení\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, 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=SKRIPTOVÝ_SOUBOR\n"
+" přidá obsah SKRIPTOVÉHO_SOUBORU mezi příkazy k provedení\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" následuje symbolické odkazy, když zapisuje do vstupního\n"
+" souboru\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[PŘÍPONA], --in-place[=PŘÍPONA]\n"
+" upravuje přímo vstupní soubory (vytváří zálohy, pokud je\n"
+" poskytnuta PŘÍPONA)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" otevře soubory v binárním režimu (znaky CR+LF nejsou\n"
+" zpracovávány zvláštně)\n"
+
+#: sed/sed.c:144
#, 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"
+" určuje délku zarovnání řádku u příkazu „l“\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" vypne všechna GNU rozšíření\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
+" -r, --regexp-extended\n"
+" použije rozšířené regulární výrazy\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -265,8 +310,11 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" považuje soubory za samostatné a ne za jeden dlouhý\n"
+" souvislý proud\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -274,18 +322,21 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" čte co nejméně dat ze vstupních souborů a výstupní\n"
+" buffery vyprazdňuje častěji\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help zobrazí tuto nápovědu a skončí\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version vypíše informace o verzi a skončí\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -295,35 +346,34 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Ne-li zadán žádný z přepínačů -e, --expression, -f nebo --file, pak první\n"
+"argument, který není přepínačem, je považován za sedový skript a bude\n"
+"vykonán. Všechny zbývající argumenty jsou jména vstupních souborů. Nejsou-"
+"li\n"
+"zadány žádné vstupní soubory, bude čten standardní vstup.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Chyby v programu oznamujte na adrese: %s (anglicky).\n"
-"Kamkoliv do poloky ``Subject:'' vlote ``%s''.\n"
-"Pipomnky k pekladu zaslejte na adresu <cs@li.org> (esky).\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
-msgstr ""
+msgstr "super-sed verze %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
+"založeno na GNU sedu verze %s\n"
+"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
-msgstr ""
+msgstr "GNU sed verze %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -331,111 +381,198 @@ msgid ""
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\n"
"to the extent permitted by law.\n"
msgstr ""
-" %s\n"
-" Toto je voln programov vybaven; podmnky pro koprovn a roziovn\n"
-"naleznete ve zdrojovch textech. Toto programov vybaven je zcela BEZ "
-"ZRUKY,\n"
-"a to i bez zruky PRODEJNOSTI nebo VHODNOSTI PRO NJAK KONKRTN EL.\n"
+"%s\n"
+"Toto je volné programové vybavení; podmínky pro kopírování a rozšiřování\n"
+"naleznete ve zdrojových textech. Toto programové vybavení je zcela BEZ "
+"ZÁRUKY,\n"
+"a to i bez záruky PRODEJNOSTI nebo VHODNOSTI PRO NĚJAKÝ KONKRÉTNÍ ÚČEL,\n"
+"jak jen zákon dovoluje.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: %s nelze st: %s\n"
+msgstr "%s nelze odstranit: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr "Soubor %s nelze otevt"
+msgstr "soubor %s nelze otevřít: %s"
-#: lib/utils.c:220
-#, fuzzy, c-format
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "do %s nelze připisovat: %s"
+
+#: sed/utils.c:240
+#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "%d poloek nelze do %s zapsat: %s"
-msgstr[1] "%d poloek nelze do %s zapsat: %s"
+msgstr[0] "do %2$s nelze zapsat %1$d položku: %3$s"
+msgstr[1] "do %2$s nelze zapsat %1$d položky: %3$s"
+msgstr[2] "do %2$s nelze zapsat %1$d položek: %3$s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
-msgstr "chyba pi ten z %s: %s"
+msgstr "chyba při čtení z %s: %s"
-#: lib/utils.c:341
-#, fuzzy, c-format
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "symbolický odkaz %s nelze následovat: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "o %s nelze získat údaje: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: %s nelze st: %s\n"
+msgstr "%s nelze přejmenovat: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
-msgstr ""
+msgstr "Úspěch"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
-msgstr ""
+msgstr "Žádná shoda"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
-msgstr ""
+msgstr "Chybný regulární výraz"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
-msgstr ""
+msgstr "Chybný srovnávací znak"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
-msgstr ""
+msgstr "Chybný název třídu znaků"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
-msgstr ""
+msgstr "Zpětné lomítko na konci"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
-msgstr ""
+msgstr "Chybný zpětný odkaz"
-#: lib/regcomp.c:153
-#, fuzzy
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
-msgstr "Neodpovdajc `{'"
+msgstr "Neodpovídající [ nebo [^"
-#: lib/regcomp.c:156
-#, fuzzy
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
-msgstr "Neodpovdajc `{'"
+msgstr "Neodpovídající ( nebo \\("
-#: lib/regcomp.c:159
-#, fuzzy
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
-msgstr "Neodpovdajc `{'"
+msgstr "Neodpovídající \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
-msgstr ""
+msgstr "Chybný obsah \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
-msgstr ""
+msgstr "Chybný konec rozsahu"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
-msgstr ""
+msgstr "Paměť vyčerpána"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
-msgstr ""
+msgstr "Chybný předešlý regulární výraz"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
-msgstr ""
+msgstr "Předčasný konec regulárního výrazu"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
-msgstr ""
+msgstr "Regulární výraz je příliš velký"
-#: lib/regcomp.c:180
-#, fuzzy
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
-msgstr "Neodpovdajc `{'"
+msgstr "Neodpovídající ) nebo \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
-msgstr ""
+msgstr "Žádný předcházející regulární výraz"
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "špatný regulární výraz: %s\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Neočekávaný konec souboru (EOF)"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "Voláno savchar() s nečekaným pushback (%x)"
+
+#~ msgid "input read error: %s"
+#~ msgstr "chyba při čtení: %s"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "INTERNÍ CHYBA: špatný typ adresy"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "INTERNÍ CHYBA: špatný příkaz %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -u, --unbuffered\n"
+#~ "\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Použití: %s [PŘEPÍNAČ]... {skript-pouze-není-li-jiný-skript} [vst.-"
+#~ "soubor]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " potlačí automatické vypisování vzorového úložiště "
+#~ "(pattern\n"
+#~ " space)\n"
+#~ " -e script, --expression=SKRIPT\n"
+#~ " přidá seznam příkazů z řetězce SKRIPT k seznamu "
+#~ "příkazů,\n"
+#~ " které mají být vykonány\n"
+#~ " -f script-file, --file=SKRIPT-SOUBOR\n"
+#~ " přidá obsah SKRIPT-SOUBORu k seznamu příkazů, které "
+#~ "mají\n"
+#~ " být vykonány\n"
+#~ " -l N, --line-length=N\n"
+#~ " zadání pozice, na které má být řádek zalamován, pro "
+#~ "příkaz `l'\n"
+#~ " -u, --unbuffered\n"
+#~ " nebufferovaný výstup\n"
+#~ " --help vypíše tuto nápovědu a skončí\n"
+#~ " -V, --version vypíše označení verze a skončí\n"
+#~ "\n"
+#~ " Nebude-li žádný z přepínačů -e, --expression, -f, nebo --file zadán, "
+#~ "pak\n"
+#~ "první argument, který není přepínačem, bude považován za sed skript, "
+#~ "který má\n"
+#~ "být interpretován. Všechny zbylé argumenty představují jména vstupních "
+#~ "souborů.\n"
+#~ "Nebudou-li vstupní soubory zadány, bude čten standardní vstup.\n"
+#~ "\n"
diff --git a/po/da.gmo b/po/da.gmo
index a8bda80..0f8e24b 100644
--- a/po/da.gmo
+++ b/po/da.gmo
Binary files differ
diff --git a/po/da.po b/po/da.po
index e96878f..5edcedb 100644
--- a/po/da.po
+++ b/po/da.po
@@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: sed 4.0.8\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
"PO-Revision-Date: 2003-10-25 08:00+0200\n"
"Last-Translator: Byrial Ole Jensen <byrial@image.dk>\n"
"Language-Team: Danish <dansk@klid.dk>\n"
@@ -15,190 +15,206 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
#, fuzzy
msgid "multiple `!'s"
msgstr "Flere '!'"
-#: sed/compile.c:163
+#: sed/compile.c:162
#, fuzzy
msgid "unexpected `,'"
msgstr "Uventet ','"
-#: sed/compile.c:164
+#: sed/compile.c:163
#, fuzzy
msgid "invalid usage of +N or ~N as first address"
msgstr "Kan ikke bruge +N eller ~N som frste adresse"
-#: sed/compile.c:165
+#: sed/compile.c:164
#, fuzzy
msgid "unmatched `{'"
msgstr "Uparret '{'"
-#: sed/compile.c:166
+#: sed/compile.c:165
#, fuzzy
msgid "unexpected `}'"
msgstr "Uventet '}'"
-#: sed/compile.c:167
+#: sed/compile.c:166
#, fuzzy
msgid "extra characters after command"
msgstr "Ekstra tegn efter kommando"
-#: sed/compile.c:168
+#: sed/compile.c:167
#, fuzzy
msgid "expected \\ after `a', `c' or `i'"
msgstr "Forventede \\ efter 'a', 'c' eller 'i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "'}' vil ikke have adresser"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": vil ikke have adresser"
-#: sed/compile.c:171
+#: sed/compile.c:170
#, fuzzy
msgid "comments don't accept any addresses"
msgstr "Kommentarer vil ikke have adresser"
-#: sed/compile.c:172
+#: sed/compile.c:171
#, fuzzy
msgid "missing command"
msgstr "Der mangler en kommando"
-#: sed/compile.c:173
+#: sed/compile.c:172
#, fuzzy
msgid "command only uses one address"
msgstr "Kommandoen bruger kun n adresse"
-#: sed/compile.c:174
+#: sed/compile.c:173
#, fuzzy
msgid "unterminated address regex"
msgstr "Uafsluttet regulrt udtryk for adresse"
-#: sed/compile.c:175
+#: sed/compile.c:174
#, fuzzy
msgid "unterminated `s' command"
msgstr "Uafsluttet 's'-kommando"
-#: sed/compile.c:176
+#: sed/compile.c:175
#, fuzzy
msgid "unterminated `y' command"
msgstr "Uafsluttet 'y'-kommando"
-#: sed/compile.c:177
+#: sed/compile.c:176
#, fuzzy
msgid "unknown option to `s'"
msgstr "Ukendt tilvalg til 's'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "Flere 'p'-flag til 's'-kommando"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "Flere 'g'-flag til 's'-kommando"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "Flere tal-flag til 's'-kommando"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "s-kommandoens tal-flag m ikke vre nul"
-#: sed/compile.c:182
+#: sed/compile.c:181
#, fuzzy
msgid "strings for `y' command are different lengths"
msgstr "y-kommandoens strenge har forskellige lngder"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "forventede en nyere version af sed"
-#: sed/compile.c:185
+#: sed/compile.c:184
#, fuzzy
msgid "invalid usage of line address 0"
msgstr "Forkert brug af adresse-ndrer"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, fuzzy, c-format
msgid "unknown command: `%c'"
msgstr "Ukendt kommando:"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fil %s, linje %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, 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:1664
#, fuzzy, c-format
msgid "can't find label for jump to `%s'"
msgstr "Kan ikke finde etiket for hop til '%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan ikke lse %s: %s\n"
-#: sed/execute.c:673
+#: sed/execute.c:728
#, fuzzy, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "kunne ikke bne filen %s: %s"
+msgstr "kunne ikke skrive %d element til %s: %s"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "kunne ikke bne filen %s: %s"
+msgstr ""
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "kunne ikke bne midlertidig fil %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "fejl i underproces"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "tilvalg 'e' er ikke understttet"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "'e'-kommando er ikke understttet"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:41
#, fuzzy
msgid "no previous regular expression"
msgstr "Intet forudgende regulrt udtryk"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
#, fuzzy
msgid "cannot specify modifiers on empty regexp"
msgstr "Der kan ikke angives ndrere til tomt regulrt udtryk"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, fuzzy, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "Ugyldig reference \\%d p 's'-kommandos hjreside"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Send fejlrapporter p engelsk pr. e-post til <%s>.\n"
+"Srg venligst for at skrive ordet \"%s\" et sted i \"Subject:\"-feltet.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -206,28 +222,28 @@ msgstr ""
" -R, --regexp-perl\n"
" brug Perl 5's syntaks for regulre udtryk i skriptet\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -235,28 +251,43 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:114
+#: sed/sed.c:148
#, fuzzy, c-format
msgid ""
" -r, --regexp-extended\n"
@@ -265,7 +296,7 @@ msgstr ""
" -R, --regexp-perl\n"
" brug Perl 5's syntaks for regulre udtryk i skriptet\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -274,7 +305,7 @@ msgid ""
" long stream.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -283,17 +314,17 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -304,21 +335,12 @@ msgid ""
"\n"
msgstr ""
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Send fejlrapporter p engelsk pr. e-post til %s.\n"
-"Srg venligst for at skrive ordet \"%s\" et sted i \"Subject:\"-feltet.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed version %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, fuzzy, c-format
msgid ""
"based on GNU sed version %s\n"
@@ -327,12 +349,12 @@ msgstr ""
"baseret p GNU sed version 3.02.80\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed version %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -345,101 +367,195 @@ msgstr ""
"Der er INGEN garanti; end ikke for SALGBARHED eller EGNETHED TIL NOGET\n"
"BESTEMT FORML, i det omfang som loven tillader.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, fuzzy, c-format
msgid "cannot remove %s: %s"
msgstr "%s: kan ikke lse %s: %s\n"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, fuzzy, c-format
msgid "couldn't open file %s: %s"
msgstr "kunne ikke bne filen %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "kunne ikke skrive %d element til %s: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "kunne ikke skrive %d element til %s: %s"
msgstr[1] "kunne ikke skrive %d elementer til %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "lsefejl p %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "kunne ikke bne filen %s: %s"
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "%s: kan ikke lse %s: %s\n"
+
+#: sed/utils.c:438
#, fuzzy, c-format
msgid "cannot rename %s: %s"
msgstr "%s: kan ikke lse %s: %s\n"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Godt resultat"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Intet resultat"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Ugyldigt regulrt udtryk"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Ugyldigt sorteringstegn"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Ugyldigt navn p tegnklasse"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Afsluttende omvendt skrstreg"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Ugyldig reference bagud"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Uparret [ eller [^"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Uparret ( eller \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Uparret \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Ugyldigt indhold af \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Ugyldig slutning p omrde"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Hukommelsen opbrugt"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Ugyldigt forudgende regulrt udtryk"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Ufuldstndigt regulrt udtryk"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Regulrt udtryk for stort"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Uparret ) eller \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Intet forudgende regulrt udtryk"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "savchar() kaldt med uventet tilbageskub (%x)"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "INTERN FEJL: forkert adressetype"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "INTERN FEJL: Forkert vrdi af cmd %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit files in place (makes backup if extension "
+#~ "supplied)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -r, --regexp-extended\n"
+#~ " use extended regular expressions in the script.\n"
+#~ "%s -s, --separate\n"
+#~ " consider files as separate rather than as a single "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ " load minimal amounts of data from the input files and "
+#~ "flush\n"
+#~ " the output buffers more often\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Brug: %s [TILVALG]... {skript-hvis-ingen-andre-skripter} [indfil]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " undg automatisk udskrivning af arbejdsrummet\n"
+#~ " -e skript, --expression=skript\n"
+#~ " udfr kommandoerne i skript\n"
+#~ " -f skriptfil, --file=skriptfil\n"
+#~ " udfr kommandoerne i filen skriptfil\n"
+#~ " -i[endelse], --in-place[=endelse]\n"
+#~ " redigr i filer (laver sikkerhedskopi hvis endelse er "
+#~ "givet)\n"
+#~ " -l N, --line-length=N\n"
+#~ " angiv nsket linjedelingslngde for 'l'-kommandoen\n"
+#~ " -r, --regexp-extended\n"
+#~ " brug udvidede regulre udtryk i skriptet\n"
+#~ "%s -s, --separate\n"
+#~ " betragt filer som adskilte snarede end som n "
+#~ "sammenhngende\n"
+#~ " lang strm\n"
+#~ " -u, --unbuffered\n"
+#~ " indls minimale datamngder fra inddatafiler og tm\n"
+#~ " oftere uddatabuffere\n"
+#~ " --help vis denne hjlp og afslut\n"
+#~ " -V, --version udskriv versionsinformation og afslut\n"
+#~ "\n"
+#~ "Hvis der ikke er givet nogen '-e', '--expression', '-f' eller '--file'\n"
+#~ "tilvalg, s opfattes det frste ikke-tilvalgs-argument som et sed-"
+#~ "skript.\n"
+#~ "Alle resterende argumenter er navne p inddatafiler; hvis ingen inddata-\n"
+#~ "filer specificeres, lses fra standard-ind.\n"
+#~ "\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Uventet Slut-p-Fil"
diff --git a/po/de.gmo b/po/de.gmo
index 019a500..b75337e 100644
--- a/po/de.gmo
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
index 0b0eae3..b8e697a 100644
--- a/po/de.po
+++ b/po/de.po
@@ -1,13 +1,13 @@
# sed german translation
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-# Walter Koch <koch@u32.de>, 2001, 2002, 2003
+# Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Walter Koch <koch@u32.de>, 2001, 2002, 2003, 2004, 2005
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.0.6\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2003-03-21 22:03:41+0100\n"
+"Project-Id-Version: sed 4.1.4\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2005-07-04 19:40:41+0200\n"
"Last-Translator: Walter Koch <koch@u32.de>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
@@ -15,257 +15,289 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr "Mehrfache `!'"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "Unerwartetes `,'"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
msgstr "+N oder ~N knnen nicht als erste Adresse benutzt werden"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "Nicht paarweises `{'"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "Unerwartetes `}'"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
msgstr "Zustzliche Zeichen nach dem Befehl"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr "Nach `a', `c' oder `i' wird \\ erwartet"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' erwartet keine Adressen"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr "`:' erwartet keine Adressen"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr "Kommentare erlauben keine Adressen"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
msgstr "Fehlender Befehl"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
msgstr "Befehl verwendet nur eine Adresse"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
msgstr "Nicht beendeter regulrer Adressausdruck"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
msgstr "Nicht beendeter `s'-Befehl"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
msgstr "Nicht beendeter `y'-Befehl"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "Unbekannte Option betreffs `s'"
+msgstr "Unbekannte Option fr `s'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "Mehrere 'p'-Optionen am `s'-Befehl"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "Mehrere 'g'-Optionen am `s'-Befehl"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "Mehrere numerische Optionen am `s'-Befehl"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
-msgstr "Numerisch Option am `s'-Befehl darf nicht Null sein"
+msgstr "Numerische Option am `s'-Befehl kann nicht Null sein"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "Unterschiedliche Lnge der Zeichenketten am `y'-Befehl"
+msgstr "Unterschiedliche Lnge der Zeichenketten des `y'-Befehls"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "Trennzeichen ist kein Einzelbyte-Zeichen"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "Neuere Version von sed erwartet"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Befehl verwendet nur eine Adresse"
+msgstr "Ungltige Verwendung der Zeilenadresse 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Unbekannter Befehl:"
+msgstr "Unbekannter Befehl: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: Datei %s Zeile %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e Ausdruck #%lu, Zeichen %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "Kann das Ziel fr den Sprung nach `%s' nicht finden"
+msgstr "Kann die Zielmarke fr den Sprung nach `%s' nicht finden"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kann %s nicht lesen: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Datei %s kann nicht geffnet werden: %s"
+msgstr "Kann %s nicht bearbeiten: Dies ist ein Terminal"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Datei %s kann nicht geffnet werden: %s"
+msgstr "Kann %s nicht bearbeiten: Dies ist keine normale Datei"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Datei %s kann nicht geffnet werden: %s"
+msgstr "Kann temporre Datei %s nicht ffnen: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
-msgstr "Fehler im Subprozess"
+msgstr "Fehler im Unterprozess"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "Option `e' wird nicht untersttzt"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "`e'-Kommando wird nicht untersttzt"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr "Kein vorheriger regulrer Ausdruck"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "Auf leere regulre Ausdrcke knnen keine `modifier' angewandt werden"
+msgstr "Fr leere regulre Ausdrcke knnen keine `modifier' angegeben werden"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Ungltiger Verweis \\%d in den Haltepuffer des `s'-Befehls"
+msgstr "Ungltiger Verweis \\%d im rechten Teil (`RHS') des `s'-Befehls"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Fehlerberichte bitte per E-Mail (auf englisch) an: <%s>.\n"
+"Verwenden Sie dabei den Begriff `%s' irgendwo in der `Betreff:'-Zeile.\n"
+"Sinn- oder Schreibfehler in den deutschen Texten bitte an <de@li.org>.\n"
-#: sed/sed.c:93
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R, --regexp-perl\n"
-" Verwende die Perl 5 - Syntax fr reg.Ausdrcke im Script.\n"
+" Verwende die Perl-5-Syntax fr reg. Ausdrcke im Skript.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Aufruf: %s [OPTION]... {Skript-falls-kein-anderes-Skript} [Eingabe-"
+"Datei]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" verhindert die automatische Ausgabe des Arbeitspuffers\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e skript, --expression=skript\n"
+" hngt `skript' an die auszufhrenden Befehle an\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
" add the contents of script-file to the commands to be "
"executed\n"
msgstr ""
+" -f skript-Datei, --file=skript-Datei\n"
+" hngt den Inhalt von `Skript-Datei' an die\n"
+" auszufhrenden Befehle an\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[Suffix], --in-place[=Suffix]\n"
+" ndert die Eingabedatei (Backup wird erzeugt, falls Suffix\n"
+" angegeben wurde)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
+" -l N, --line-length=N\n"
+" gibt die gewnschte Zeilenumbruchlnge fr den `l'-Befehl "
+"an\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" schaltet alle GNU-Funktions-Erweiterungen ab.\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" Verwende die Perl 5 - Syntax fr reg.Ausdrcke im Script.\n"
+" -r, --regexp-extended\n"
+" verwendet die erweiterten reg. Ausdrcke fr das Skript.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -273,8 +305,11 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" die Dateien werden getrennt und nicht als einzige\n"
+" zusammenhngende Quelle betrachtet.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -282,18 +317,21 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" lade nur kleinste Datenmengen aus den Eingabedateien\n"
+" und schreibe die Ausgabepuffer hufiger zurck.\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help nur diese Hilfe anzeigen und dann beenden\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version nur die Versionsinfo ausgeben und dann beenden\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -303,36 +341,34 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Falls kein -e, --expression, -f, oder --file Option angegeben ist, wird das\n"
+"erste Argument, das keine Option ist als sed-Skript verwendet.\n"
+"Alle restlichen Argumente werden als Eingabedateinamen behandelt.\n"
+"Falls keine Eingabedateien angegeben sind, wird von der Standardeingabe "
+"gelesen.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Fehlerberichte (in Englisch!) per E-Mail an: %s .\n"
-"Verwenden Sie dabei den Begriff ``%s'' irgendwo in der ``Betreff:''-Zeile.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "Super-sed version %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"basiert auf GNU sed Version 3.02.80\n"
+"basiert auf GNU sed-Version %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
-msgstr "GNU sed Version %s\n"
+msgstr "GNU sed-Version %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -342,109 +378,145 @@ msgid ""
msgstr ""
"%s\n"
"(Der folgende Text ist eine nicht berprfte bersetzung, die zur\n"
-" Information dient; in rechtlichen Fragen ist immer das englische\n"
+" Information dient; in rechtlichen Fragen ist immer das englische\n"
" Original ausschlaggebend)\n"
"\n"
-"Dieses Program ist freie Software; In den Quelldateien knnen Sie die\n"
+"Dieses Programm ist freie Software; In den Quelldateien knnen Sie die\n"
"Bedingungen fr die Weitergabe nachlesen.\n"
"Es gibt KEINE GARANTIE; nicht einmal die implizite Garantie der\n"
"MARKTFHIGKEIT oder der ERFLLUNG EINES BESTIMMTEN ZWECKES.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: kann %s nicht lesen: %s\n"
+msgstr "%s kann nicht entfernt werden: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
msgstr "Datei %s kann nicht geffnet werden: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "Kann %d Element nicht auf %s schreiben: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "Kann %d Feld nicht auf %s schreiben: %s"
-msgstr[1] "Kann %d Felder nicht auf %s schreiben: %s"
+msgstr[0] "Kann %d Element nicht auf %s schreiben: %s"
+msgstr[1] "Kann %d Elemente nicht auf %s schreiben: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "Lesefehler in %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "Datei %s kann nicht geffnet werden: %s"
+
+#: sed/utils.c:407
#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "%s kann nicht umbenannt werden: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: kann %s nicht lesen: %s\n"
+msgstr "%s kann nicht umbenannt werden: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Erfolgreich"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Keine bereinstimmung"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Ungltiger regulrer Ausdruck"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
-msgstr "Ungltiger Vergleichszeichen"
+msgstr "Ungltiges Vergleichszeichen"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
-msgstr "Ungltige Zeichenklassenname"
+msgstr "Ungltiger Zeichenklassenname"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
-msgstr "Abschliessender Backslash"
+msgstr "Abschlieender Backslash"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
-msgstr "Ungltiger Rckwrtsverweis"
+msgstr "Ungltiger Rckverweis"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Nicht paarweises [ bzw. [^"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Nicht paarweises ( bzw. \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Nicht paarweises \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Ungltiger Inhalt in \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Ungltiges Bereichende"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Speicher erschpft"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Vorheriger regulrer Ausdruck ist ungltig"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Regulrer Ausdruck endet zu frh"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Regulrer Ausdruck ist zu gro"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Nicht paarweises ) bzw. \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Kein vorheriger regulrer Ausdruck"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "Aufruf von savchar() mit unerwartetem \"pushback\" (%x)"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "INTERNER FEHLER: Falsche Adressenart"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "INTERNER FEHLER: Falscher Befehl %c"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Unerwartetes Dateiende"
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "Falscher regulrer Ausdruck: %s\n"
+
+#~ msgid "input read error: %s"
+#~ msgstr "Eingabe-Lesefehler: %s"
+
+#~ msgid "couldn't write an item to %s: %s"
+#~ msgstr "Kann ein Feld nicht auf %s schreiben: %s"
diff --git a/po/el.gmo b/po/el.gmo
index 06f6396..550f2eb 100644
--- a/po/el.gmo
+++ b/po/el.gmo
Binary files differ
diff --git a/po/el.po b/po/el.po
index 99bbc99..2d27e0e 100644
--- a/po/el.po
+++ b/po/el.po
@@ -1,266 +1,307 @@
# Greek messages for GNU sed.
# Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
-# Simos Xenitellis <simos@hellug.gr>, 1998, 1999, 2000, 2001, 2002.
+# This file is distributed under the same license as the sed package.
+# Simos Xenitellis <simos@hellug.gr>, 1998, 1999, 2000, 2001, 2002, 2008.
#
msgid ""
msgstr ""
-"Project-Id-Version: GNU sed 3.02.80\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2002-03-08 12:57+0000\n"
-"Last-Translator: Simos Xenitellis <simos@hellug.gr>\n"
-"Language-Team: Greek <nls@tux.hellug.gr>\n"
+"Project-Id-Version: GNU sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-11-28 00:00+0000\n"
+"Last-Translator: Simos Xenitellis <simos.lists@googlemail.com>\n"
+"Language-Team: Greek <team@lists.gnome.gr>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-7\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr " `!'s"
+msgstr "πολλαπλά `!'"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr " `,'"
+msgstr "αναπάντεχο `,'"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr " +N ~N "
+msgstr "δεν επιτρέπεται η χρήση των +N ή ~N ως πρώτη διεύθυνση"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr " `{'"
+msgstr "αταίριαστο `{'"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr " `}'"
+msgstr "αναπάντεχο `}'"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr " "
+msgstr "επιπλέον χαρακτήρες μετά την εντολή"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr " \\ `a', `c' `i'"
+msgstr "απαιτείται \\ μετά τις εντολές `a', `c' ή `i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
-msgstr " `}' "
+msgstr "το `}' δεν χρειάζεται διευθύνσεις"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
-msgstr ": "
+msgstr ": δεν χρειάζονται διευθύνσεις"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr " "
+msgstr "τα σχόλια δεν δέχονται διευθύνσεις"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr " "
+msgstr "λείπει η εντολή"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr " "
+msgstr "η εντολή χρησιμοποιεί μόνο μια διεύθυνση"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr " "
+msgstr "μη τερματισμένη κανονικής έκφραση διεύθυνσης"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr " `s'"
+msgstr "μη τερματισμένη εντολή `s'"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr " `y'"
+msgstr "μη τερματισμένη εντολή `y'"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr " `s'"
+msgstr "άγνωστη επιλογή για το `s'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
-msgstr " `p' `s'"
+msgstr "πολλαπλές επιλογές `p' στην εντολή `s'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
-msgstr " `g' `s'"
+msgstr "πολλαπλές επιλογές `g' στην εντολή `s'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
-msgstr " `s'"
+msgstr "πολλαπλός αριθμητικές επιλογές στην εντολή `s'"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
-msgstr " `s' "
+msgstr "η αριθμητική επιλογή στην εντολή `s' δεν μπορεί να είναι μηδέν"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr " `y' "
+msgstr "τα αλφαριθμητικά για την εντολή `y' είναι διαφορετικού μεγέθους"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "ο χαρακτήρας διαχωριστής έχει μέγεθος μεγαλύτερο από ένα byte"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr ""
+msgstr "αναμενόταν νεώτερη έκδοση του sed"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr " "
+msgstr "ακατάλληλη χρήση διεύθυνσης γραμμής 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr " :"
+msgstr "άγνωστη εντολή: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
-msgstr "%s: %s %lu: %s\n"
+msgstr "%s: αρχείο %s γραμμή %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
-msgstr "%s: -e #%lu, %lu: %s\n"
+msgstr "%s: -e έκφραση #%lu, χαρακτήρας %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr " `%s'"
+msgstr "αδυναμία εύρεσης ετικέττας για μετάβαση στο `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: %s: %s\n"
+msgstr "%s: αδυναμία ανάγνωσης του %s: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr " %s"
+msgstr "αδυναμία επεξεργασίας του %s: είναι τερματικό"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr " %s"
+msgstr "αδυναμία επεξεργασίας του %s: δεν είναι κανονικό αρχείο"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr " %s"
+msgstr "αδυναμία ανοίγματος του αρχείου %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
-msgstr " "
+msgstr "σφάλμα στη υποδιαδικασία"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
-msgstr " `e'"
+msgstr "η επιλογή `e' δεν υποστηρίζεται"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
-msgstr " `e'"
+msgstr "η εντολή `e' δεν υποστηρίζεται"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "δεν υπάρχουν αρχεία εισόδου"
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr " "
+msgstr "δεν βρέθηκε προηγούμενη κανονική έκφραση"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr " "
+msgstr "δεν επιτρέπεται ο ορισμός διαμορφωτών σε κενή κανονική έκφραση"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr " \\%d `s'"
+msgstr "μη έγκυρη αναφορά \\%d στο δεξί τμήμα της εντολής `s'"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Αναφορές σφαλμάτων μέσω ηλεκτρονικού ταχυδρομείου στο: <%s>.\n"
+"Προσέξτε να συμπεριλάβετε τη λέξη ``%s'' κάπου στο πεδίο ``Subject:''.\n"
+
+#: sed/sed.c:119
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:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Χρήση: %s [ΕΠΙΛΟΓΗ]... {σενάριο-αν-δεν-υπάρχει-άλλο-σενάριο} [αρχείο-"
+"εισόδου]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" δεν γίνεται αυτόματη εκτύπωση του χώρου υποδείγματος\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e σενάριο --expression=σενάριο\n"
+" προσθήκη του σεναρίου στις εντολές προς εκτέλεση\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
" add the contents of script-file to the commands to be "
"executed\n"
msgstr ""
+" -f αρχείο-σεναρίου --file=αρχείο-σεναρίου\n"
+" προσθήκη του αρχείου-σεναρίου στις εντολές προς εκτέλεση\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" ακολούθηση συμβολικών συνδέσμων στην επιτόπια επεξεργασία\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[ΕΠΙΘΗΜΑ], --in-place[=ΕΠΙΘΗΜΑ]\n"
+" επιτόπια επεξεργασία (δημιουργίας αντιγράφου αν παρέχεται "
+"ΕΠΙΘΗΜΑ)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" άνοιγμα αρχείων ως δυαδικά (οι χαρακτήρες CR και LF δεν "
+"έχουν ειδική σημασία)\n"
-#: sed/sed.c:110
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
+" -l N, --line-length=N\n"
+" καθορισμός επιθυμητού μήκους γραμμής για αναδίπλωση γραμμών "
+"στην εντολή `l'\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" απενεργοποίηση όλων των επεκτάσεων GNU στο πρωτότυπο sed.\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
+" -r, --regexp-extended\n"
+" χρήση επεκτεταμένων κανονικών εκφράσεων στο σενάριο.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -268,8 +309,11 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" τα αρχεία εισόδου να λογίζονται ξεχωριστά, αντί ως ένας\n"
+" συνεχής μακρύς χείμαρρος.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -277,18 +321,23 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" φόρτωση ελαχίστων ποσοτήτων δεδομένων από τα αρχεία "
+"εισόδου\n"
+" και άδειασμα των ενταμιευτών εξόδου συχνότερα\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help εμφάνιση αυτού του κειμένου βοηθείας και έξοδος\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
+" --version εμφάνιση πληροφοριών έκδοσης προγράμματος και έξοδος\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -298,34 +347,33 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Αν δεν υπάρχουν επιλογές -e, --expression, -f ή --file, τότε το πρώτο\n"
+"όρισμα που δεν είναι επιλογή αποτελεί το όνομα του προγρ. εντολών.\n"
+"Όλα τα υπόλοιπα ορίσματα είναι ονόματα αρχείων εισόδου· αν δεν έχουν\n"
+"καθοριστεί αρχεία εισόδου, τότε γίνεται ανάγνωση της κανονικής εισόδου.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-" : %s .\n"
-" ``%s'' ``Subject:''.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
-msgstr ""
+msgstr "super-sed έκδοση %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
+"βασισμένο στο GNU sed έκδοση %s\n"
+"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
-msgstr ""
+msgstr "GNU sed έκδοση %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -334,118 +382,323 @@ msgid ""
"to the extent permitted by law.\n"
msgstr ""
"%s\n"
-" "
-"\n"
-" . Ƿ \n"
-" , \n"
-" .\n"
-
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+"Αυτό το πρόγραμμα είναι ελεύθερο λογισμικό· δείτε τον πηγαίο κώδικα για "
+"τους\n"
+"κανονισμούς αντιγραφής. Δεν υπάρχει KAMMIA ΕΓΓΥΗΣΗ· ούτε ακόμα για\n"
+"ΛΕΙΤΟΥΡΓΙΚΟΤΗΤΑ ή ΚΑΤΑΛΛΗΛΟΤΗΤΑ ΓΙΑ ΕΝΑ ΣΥΓΚΕΚΡΙΜΕΝΟ ΣΚΟΠΟ, μέχρι το σημείο\n"
+"που επιτρέπει ο νόμος.\n"
+
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: %s: %s\n"
+msgstr "αδυναμία διαγραφής του %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr " %s"
+msgstr "αδυναμία ανοίγματος του %s: %s"
-#: lib/utils.c:220
-#, fuzzy, c-format
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "αδυναμία προσάρτησης στο %s: %s"
+
+#: sed/utils.c:240
+#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] " %d %s: %s"
-msgstr[1] " %d %s: %s"
+msgstr[0] "αδυναμία εγγραφής %d στοιχείου στο %s: %s"
+msgstr[1] "αδυναμία εγγραφής %d στοιχείων στο %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
-msgstr " %s: %s"
+msgstr "σφάλμα ανάγνωσης στο %s: %s"
+
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "αδυναμία ακολούθησης του συμβολικού συνδέσμου %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "αδυναμία ανάγνωσης εγγραφής για το %s στον κατάλογο αρχείων: %s"
-#: lib/utils.c:341
-#, fuzzy, c-format
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: %s: %s\n"
+msgstr "αδυναμία μετονομασίας του %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
-msgstr ""
+msgstr "Επιτυχία"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
-msgstr ""
+msgstr "Κανένα ταίριασμα"
-#: lib/regcomp.c:138
-#, fuzzy
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
-msgstr " "
+msgstr "Μη έγκυρη κανονική έκφραση"
-#: lib/regcomp.c:141
-#, fuzzy
+#: lib/regcomp.c:143
msgid "Invalid collation character"
-msgstr " "
+msgstr "Μη έγκυρος χαρακτήρας ταξινόμησης"
-#: lib/regcomp.c:144
-#, fuzzy
+#: lib/regcomp.c:146
msgid "Invalid character class name"
-msgstr " "
+msgstr "Μη έγκυρο όνομα κλάσης χαρακτήρων"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
-msgstr ""
+msgstr "Τελευταίος χαρακτήρας η πισωκάθετος"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
-msgstr ""
+msgstr "Μη έγκυρη οπισθαναφορά"
-#: lib/regcomp.c:153
-#, fuzzy
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
-msgstr " `{'"
+msgstr "Αταίριαστο [ ή [^"
-#: lib/regcomp.c:156
-#, fuzzy
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
-msgstr " `{'"
+msgstr "Αταίριαστο ( ή \\("
-#: lib/regcomp.c:159
-#, fuzzy
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
-msgstr " `{'"
+msgstr "Αταίριαστο \\{"
-#: lib/regcomp.c:162
-#, fuzzy
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
-msgstr " {}"
+msgstr "Μη έγκυρο περιεχόμενο εντός \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
-msgstr ""
+msgstr "Μη έγκυρο τέλος εύρους"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
-msgstr ""
+msgstr "Εξάντληση διαθέσιμης μνήμης"
-#: lib/regcomp.c:171
-#, fuzzy
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
-msgstr " "
+msgstr "Μη έγκυρη προηγούμενη κανονική έκφραση"
-#: lib/regcomp.c:174
-#, fuzzy
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
-msgstr " "
+msgstr "Πρόωρος τερματισμός κανονικής έκφρασης"
-#: lib/regcomp.c:177
-#, fuzzy
+#: lib/regcomp.c:179
msgid "Regular expression too big"
-msgstr " "
+msgstr "Πολύ μεγάλη κανονική έκφραση"
-#: lib/regcomp.c:180
-#, fuzzy
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
-msgstr " `{'"
+msgstr "Αταίριαστο ) ή \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
-msgstr " "
+msgstr "Δεν βρέθηκε προηγούμενη κανονική έκφραση"
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "ακατάλληλη κανονική έκφραση: %s\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Αναπάντεχο Τέλος-αρχείου"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "Κλήση της savchar() με μη αναμενόμενο pushback (%x)"
+
+#~ msgid "input read error: %s"
+#~ msgstr "σφάλμα ανάγνωσης εισόδου: %s"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "ΕΣΩΤΕΡΙΚΟ ΣΦΑΛΜΑ: κακή μορφή διεύθυνσης"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "ΕΣΩΤΕΡΙΚΟ ΣΦΑΛΜΑ: Κακή εντολή %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -u, --unbuffered\n"
+#~ "\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Χρήση: %s [ΕΠΙΛΟΓΗ]... {μόνο-αρχείο-εντολών-αν-όχι-άλλο-αρχείο-εντολών} "
+#~ "[αρχείο-εισόδου]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " ακύρωση αυτόματης εκτύπωσης του χώρου υποδείγματος\n"
+#~ " -e εντολή/ές, --expression=εντολή/ές\n"
+#~ " προσθήκη τις/των εντολής/ών στις εντολές που θα "
+#~ "εκτελεστούν\n"
+#~ " -f αρχείο-εντολών, --file=αρχείο-εντολών\n"
+#~ " προσθήκη των περιεχόμενων του αρχείου εντολών στις "
+#~ "εντολές που θα εκτελεστούν\n"
+#~ " -l N, --line-length=N\n"
+#~ " καθορισμός του επιθυμητού μήκους αναδίπλωσης γραμμής\n"
+#~ " για την εντολή `l'\n"
+#~ " -u, --unbuffered\n"
+#~ "\n"
+#~ " --help εμφάνιση αυτής της βοήθειας και έξοδος\n"
+#~ " -V, --version εμφάνιση πληροφοριών έκδοσης και έξοδος\n"
+#~ "\n"
+#~ "Αν κανένα από τα -e, --expression, -f ή --file δεν δίνεται, τότε το "
+#~ "πρώτο\n"
+#~ "όρισμα που δεν είναι παράμετρος χρησιμοποιείται σαν το αρχείο εντολών sed "
+#~ "για\n"
+#~ "μετάφραση. Όλες οι υπόλοιπες παράμετροι είναι ονόματα αρχείων εισόδου· "
+#~ "αν\n"
+#~ "δεν ορίζονται αρχεία εισόδου, τότε χρησιμοποιείται η κανονική είσοδος.\n"
+
+#~ msgid "Usage: pcregrep [-bepchilnsvx] pattern [file] ...\n"
+#~ msgstr "Χρήση: pcregrep [-bepchilnsvx] υπόδειγμα [αρχείο] ...\n"
+
+#~ msgid "pcregrep: unknown option %c\n"
+#~ msgstr "pcregrep: άγνωστη επιλογή %c\n"
+
+#~ msgid "pcregrep: error in regex at offset %d: %s\n"
+#~ msgstr "pcregrep: σφάλμα στην κανονική έκφραση στη θέση %d: %s\n"
+
+#~ msgid "pcregrep: error while studing regex: %s\n"
+#~ msgstr "pcregrep: σφάλμα κατά τον έλεγχο της κανονικής έκφρασης: %s\n"
+
+#~ msgid "pcregrep: failed to open %s: %s\n"
+#~ msgstr "pcregrep: αδυναμία ανοίγματος %s: %s\n"
+
+#~ msgid "\\ at end of pattern"
+#~ msgstr "\\ στο τέλος του υποδείγματος"
+
+#~ msgid "\\c at end of pattern"
+#~ msgstr "\\c στο τέλος του υποδείγματος"
+
+#~ msgid "unrecognized character follows \\"
+#~ msgstr "μη αναγνωρίσιμος χαρακτήρας ακολουθεί το \\"
+
+#~ msgid "numbers out of order in {} quantifier"
+#~ msgstr "αριθμοί εκτός σειράς στην έκφραση {}"
+
+#~ msgid "number too big in {} quantifier"
+#~ msgstr "πολύ μεγάλος αριθμός στην έκφραση {}"
+
+#~ msgid "missing terminating ] for character class"
+#~ msgstr "αταίριαστο ["
+
+#~ msgid "range out of order in character class"
+#~ msgstr "πεδίο εκτός σειράς σε κλάση χαρακτήρων"
+
+#~ msgid "nothing to repeat"
+#~ msgstr "δεν υπάρχει τίποτα για να επαναληφθεί"
+
+#~ msgid "operand of unlimited repeat could match the empty string"
+#~ msgstr ""
+#~ "το όρισμα της χωρίς όρια επανάληψης μπορεί να ταιριάξει με το κενό "
+#~ "αλφαριθμητικό"
+
+#~ msgid "internal error: unexpected repeat"
+#~ msgstr "εσωτερικό σφάλμα: απροσδόκητη επανάληψη"
+
+#~ msgid "unrecognized character after (?"
+#~ msgstr "μη αναγνωρίσιμος χαρακτήρας μετά το (?"
+
+#, fuzzy
+#~ msgid "unused error"
+#~ msgstr "αχρησιμοποίητο σφάλμα"
+
+#~ msgid "unmatched braces"
+#~ msgstr "αταίριαστο { ή }"
+
+#~ msgid "back reference to non-existent subpattern"
+#~ msgstr "οπισθαναφορά σε ανύπαρκτο υπο-υπόδειγμα"
+
+#~ msgid "unknown option bit(s) set"
+#~ msgstr "ενεργοποιημένο/α άγνωστο/α bit(s) επιλογής"
+
+#~ msgid "missing ) after comment"
+#~ msgstr "λείπει ) μετά από σχόλιο"
+
+#~ msgid "parentheses nested too deeply"
+#~ msgstr "πάρα πολλά επίπεδα παρενθέσεων"
+
+#~ msgid "failed to get memory"
+#~ msgstr "η μνήμη εξαντλήθηκε"
+
+#~ msgid "unmatched parentheses"
+#~ msgstr "αταίριαστο ( ή )"
+
+#~ msgid "internal error: code overflow"
+#~ msgstr "εσωτερικό σφάλμα: υπερχείλιση κώδικα"
+
+#~ msgid "unrecognized character after (?<"
+#~ msgstr "μη αναγνωρίσιμος χαρακτήρας μετά από (?<"
+
+#~ msgid "lookbehind assertion is not fixed length"
+#~ msgstr "οπισθοβλέπων ισχυρισμός μη σταθερού μήκους"
+
+#~ msgid "malformed number after (?("
+#~ msgstr "λάθος μορφή αριθμού μετά από (?("
+
+#~ msgid "conditional group contains more than two branches"
+#~ msgstr "η δέσμη υπόθεσης περιέχει περισσότερους από δύο κλάδους"
+
+#~ msgid "assertion expected after (?("
+#~ msgstr "αναμενόταν ισχυρισμός μετά από (?("
+
+#~ msgid "(?p must be followed by )"
+#~ msgstr "το (?p πρέπει να ακολουθείται από )"
+
+#~ msgid "unknown POSIX class name"
+#~ msgstr "μη έγκυρο όνομα κλάσης χαρακτήρων POSIX"
+
+#~ msgid "POSIX collating elements are not supported"
+#~ msgstr "δεν υποστηρίζονται στοιχεία αντιπαραβολής POSIX"
+
+#~ msgid "bad condition (?(0)"
+#~ msgstr "λανθασμένη υπόθεση (?(0"
+
+#~ msgid "internal error"
+#~ msgstr "εσωτερικό σφάλμα"
+
+#~ msgid "pattern error"
+#~ msgstr "μη έγκυρο υπόδειγμα"
+
+#~ msgid "bad collating element"
+#~ msgstr "μη έγκυρο στοιχείο αντιπαραβολής"
+
+#~ msgid "bad escape sequence"
+#~ msgstr "λανθασμένη ακολουθία διαφυγής"
+
+#~ msgid "empty expression"
+#~ msgstr "κενή έκφραση"
+
+#~ msgid "bad argument"
+#~ msgstr "λανθασμένο όρισμα"
+
+#~ msgid "match failed"
+#~ msgstr "κανένα ταίριασμα"
+
+#~ msgid "unknown error code"
+#~ msgstr "άγνωστος κώδικας σφάλματος"
+
+#~ msgid "%s at offset %-6d"
+#~ msgstr "%s στη θέση %-6d"
diff --git a/po/eo.gmo b/po/eo.gmo
index d2ee00a..10a6f68 100644
--- a/po/eo.gmo
+++ b/po/eo.gmo
Binary files differ
diff --git a/po/eo.po b/po/eo.po
index 50a0e76..663eab8 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -1,13 +1,13 @@
# Esperantaj mesaĝoj por GNU sed.
# Copyright (C) 2002 Free Software Foundation, Inc.
-# Edmund GRIMLEY EVANS <edmundo@rano.org>, 2001-2003.
+# Edmund GRIMLEY EVANS <edmundo@rano.org>, 2001-2008.
#
msgid ""
msgstr ""
-"Project-Id-Version: GNU sed 4.0.8\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2003-10-26 20:57+0000\n"
+"Project-Id-Version: GNU sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-17 22:41+0000\n"
"Last-Translator: Edmund GRIMLEY EVANS <edmundo@rano.org>\n"
"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
@@ -15,190 +15,188 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "Pluraj '!'oj"
+msgstr "pluraj '!'oj"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr "Neatendita ','"
+msgstr "neatendita ','"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "Ne eblas uzi +N aŭ ~N kiel unuan adreson"
+msgstr "nevalida uzo de +N aŭ ~N kiel unua adreso"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr "Neparigita '{'"
+msgstr "neparigita '{'"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr "Neatendita '}'"
+msgstr "neatendita '}'"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Kromaj signoj post komando"
+msgstr "kromaj signoj post komando"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "Atendita \\ post 'a', 'c' aŭ 'i'"
+msgstr "atendita \\ post 'a', 'c' aŭ 'i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "'}' ne deziras adresojn"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": ne deziras adresojn"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "Komentoj ne akceptas adresojn"
+msgstr "komentoj ne akceptas adresojn"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr "Mankas komando"
+msgstr "mankas komando"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "Komando uzas nur unu adreson"
+msgstr "komando uzas nur unu adreson"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "Nefinita adresa regesp"
+msgstr "nefinita adresa regesp"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "Nefinita komando 's'"
+msgstr "nefinita komando 's'"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "Nefinita komando 'y'"
+msgstr "nefinita komando 'y'"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "Nekonata opcio por 's'"
+msgstr "nekonata opcio por 's'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "pluraj 'p'-opcioj por komando 's'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "pluraj 'g'-opcioj por komando 's'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "pluraj nombro-opcioj por komando 's'"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "nombro-opcio por komando 's' ne povas esti nul"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr "ĉenoj por komando 'y' havas malsamajn longojn"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "apartiga signo ne estas unubitoka signo"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "atendis pli novan version de sed"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Nevalida uzo de adresmodifilo"
+msgstr "nevalida uzo de liniadreso 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Nekonata komando:"
+msgstr "nekonata komando: '%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: dosiero %s linio %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e esprimo #%lu, signo %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "Ne povas trovi etikedon por salto al '%s'"
+msgstr "ne povas trovi etikedon por salto al '%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ne povas legi %s: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Ne povis malfermi dosieron %s: %s"
+msgstr "ne povis redakti %s: estas terminalo"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Ne povis malfermi dosieron %s: %s"
+msgstr "ne povis redakti %s: ne estas normala dosiero"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Ne povis malfermi dumtempan dosieron %s: %s"
+msgstr "ne povis malfermi dumtempan dosieron %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "eraro en subprocezo"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "opcio 'e' ne realigita"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "komando 'e' ne realigita"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "mankas enig-dosieroj"
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr "Mankas antaŭa regula esprimo"
+msgstr "mankas antaŭa regula esprimo"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "Ne eblas specifi modifilojn ĉe malplena regula esprimo"
+msgstr "ne eblas specifi modifilojn ĉe malplena regula esprimo"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Nevalida referenco \\%d ĉe dekstra flanko de komando 's'"
+msgstr "nevalida referenco \\%d ĉe dekstra flanko de komando 's'"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Retpoŝtu cimo-raportojn al: <%s>.\n"
+"Nepre menciu la vorton '%s' ie en la temlinio.\n"
-#: sed/sed.c:93
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -206,66 +204,102 @@ msgstr ""
" -R, --regexp-perl\n"
" uzi sintakso de Perl 5 por regulaj esprimoj en programo.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Uzado: %s [OPCIO]... {programo-nur-se-neniu-alia-programo} [enig-"
+"dosiero]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" subpremi aŭtomatan presadon de ŝablono-spaco\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e programo, --expression=programo\n"
+" aldoni la programon al la plenumotaj komandoj\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, 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 programdosiero, --file=programdosiero\n"
+" aldoni la enhavon de programdosiero al la plenumotaj "
+"komandoj\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" sekvi simbolajn ligojn, traktante dosierojn surloke\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[sufikso], --in-place[=sufikso]\n"
+" redakti dosierojn surloke (fari savkopion, se sufikso)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" malfermi dosierojn en binara reĝimo (linifinoj ne traktiĝas "
+"speciale)\n"
-#: sed/sed.c:110
+#: sed/sed.c:144
#, 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"
+" specifi la deziratan linilongon por la komando 'l'\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" malŝalti ĉiujn GNU-ajn aldonaĵojn.\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" uzi sintakso de Perl 5 por regulaj esprimoj en programo.\n"
+" -r, --regexp-extended\n"
+" uzi etenditajn regulajn esprimojn en la programo.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -273,8 +307,12 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" konsideri dosierojn kiel apartajn anstataŭ kiel unu "
+"kontinuan\n"
+" longan fluon.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -282,18 +320,22 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" legi minimumajn kvantojn de datenoj el la enig-dosieroj "
+"kaj\n"
+" malplenigi la eligobufrojn pli ofte\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help montri ĉi tiun helpon kaj eliri\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version montri version kaj eliri\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -303,36 +345,33 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Se neniu opcio -e, --expression, -f aŭ --file estas donita, tiam la unua\n"
+"ne-opcia argumento estas prenata kiel la sed-programeto interpretota. Ĉiuj\n"
+"restantaj argumentoj estas nomoj de enig-dosieroj; se neniu enigdosiero\n"
+"estas specifita, tiam la normala enigo estas legata.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Retpoŝtu cimo-raportojn al: %s .\n"
-"Nepre menciu la vorton '%s' ie en la temlinio.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed versio %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"bazita sur \"GNU sed\" versio 3.02.80\n"
+"bazita sur \"GNU sed\" versio %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed versio %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -345,101 +384,206 @@ msgstr ""
"NENIA GARANTIO; eĉ ne por KOMERCA KVALITO aŭ ADEKVATECO POR DIFINITA CELO,\n"
"laŭ la grado permesita de juro.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: ne povas legi %s: %s\n"
+msgstr "ne povas forigi %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr "Ne povis malfermi dosieron %s: %s"
+msgstr "ne povis malfermi dosieron %s: %s"
+
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "ne povis alligiĝi al %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "ne povis skribi %d eron al %s: %s"
msgstr[1] "ne povis skribi %d erojn al %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "legeraro ĉe %s: %s"
-#: lib/utils.c:341
-#, fuzzy, c-format
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "ne povis sekvi simbolan ligon %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "ne povas stat-i %s: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: ne povas legi %s: %s\n"
+msgstr "ne povas renomi %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Sukceso"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Maltrafo"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Nevalida regula esprimo"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Nevalida kunfanda signo"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Nevalida nomo de signoklaso"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Malsuprenstreko ĉe fino"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Nevalida retroreferenco"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Neparigita [ aŭ [^"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Neparigita ( aŭ \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Neparigita \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Nevalida enhavo de \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Nevalida fino de gamo"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Mankas memoro"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Nevalida antaŭa regula esprimo"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Neatendita fino de regula esprimo"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Regula esprimo tro granda"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Neparigita ) aŭ \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Mankas antaŭa regula esprimo"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "Vokis savchar() kun neatendita pushback (%x)"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "INTERNA ERARO: malbona adresspeco"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "INTERNA ERARO: Malbona komando %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit files in place (makes backup if extension "
+#~ "supplied)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -r, --regexp-extended\n"
+#~ " use extended regular expressions in the script.\n"
+#~ "%s -s, --separate\n"
+#~ " consider files as separate rather than as a single "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ " load minimal amounts of data from the input files and "
+#~ "flush\n"
+#~ " the output buffers more often\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Uzado: %s [OPCIO]... {programo-nur-se-ne-alia-programo} [enig-"
+#~ "dosiero]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " subpremi aŭtomatan presadon de ŝablono-spaco\n"
+#~ " -e programo, --expression=programo\n"
+#~ " aldoni la programon al la plenumotaj komandoj\n"
+#~ " -f programdosiero, --file=programdosiero\n"
+#~ " aldoni la enhavon de programdosiero al la plenumotaj "
+#~ "komandoj\n"
+#~ " -i[sufikso], --in-place[=sufikso]\n"
+#~ " redakti dosierojn surloke (fari savkopion, se sufikso)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specifi la deziratan linilongon por la komando 'l'\n"
+#~ " -r, --regexp-extended\n"
+#~ " uzi etenditajn regulajn esprimojn en la programo.\n"
+#~ "%s -s, --separate\n"
+#~ " konsideri dosierojn kiel apartajn anstataŭ kiel unu "
+#~ "kontinuan\n"
+#~ " longan fluon.\n"
+#~ " -u, --unbuffered\n"
+#~ " legi minimumajn kvantojn de datenoj el la enig-dosieroj "
+#~ "kaj\n"
+#~ " malplenigi la eligobufrojn pli ofte\n"
+#~ " --help montri ĉi tiun helpon kaj eliri\n"
+#~ " -V, --version montri version kaj eliri\n"
+#~ "\n"
+#~ "Se neniu opcio -e, --expression, -f aŭ --file estas donita, tiam la unua\n"
+#~ "ne-opcia argumento estas prenata kiel la sed-programeto interpretota. "
+#~ "Ĉiuj\n"
+#~ "restantaj argumentoj estas nomoj de enig-dosieroj; se neniu enigdosiero\n"
+#~ "estas specifita, tiam la normala enigo estas legata.\n"
+#~ "\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Neatendita fino de dosiero"
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "malbona regesp: %s\n"
+
+#~ msgid "input read error: %s"
+#~ msgstr "legeraro ĉe enigo: %s"
+
+#~ msgid "couldn't write an item to %s: %s"
+#~ msgstr "ne povis skribi eron al %s: %s"
diff --git a/po/es.gmo b/po/es.gmo
index 1052112..6c8e9c1 100644
--- a/po/es.gmo
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
index 08008db..d4bf0dd 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1,13 +1,14 @@
# Mensajes en espaol para GNU sed.
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
-# Cristian Othn Martnez Vera <cfuga@itam.mx>, 2001, 2002, 2003.
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
+# Cristian Othn Martnez Vera <cfuga@itam.mx>, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.0.8\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2003-10-24 12:38-0500\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-18 21:10-0600\n"
"Last-Translator: Cristian Othn Martnez Vera <cfuga@itam.mx>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
@@ -15,259 +16,295 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "'!'s mltiples"
+msgstr "`!'s mltiples"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "`,' inesperada"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "No se pueden usar +N o ~N como primera direccin"
+msgstr "uso invlido de +N o ~N como primera direccin"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "`{' sin pareja"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "`}' inesperado"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Caracteres extra despus de la orden"
+msgstr "caracteres extra despus de la orden"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "Se esperaba \\ despus de `a', `c' `i'"
+msgstr "se esperaba \\ despus de `a', `c' `i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' no acepta ninguna direccin"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": no acepta ninguna direccin"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "Los comentarios no aceptan ninguna direccin"
+msgstr "los comentarios no aceptan ninguna direccin"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr "Orden faltante"
+msgstr "orden faltante"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "La orden solamente usa una direccin"
+msgstr "la orden solamente usa una direccin"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "Direccin de expresin regular sin terminar"
+msgstr "direccin de expresin regular sin terminar"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "Orden `s' sin terminar"
+msgstr "orden `s' sin terminar"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "Orden `y' sin terminar"
+msgstr "orden `y' sin terminar"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "Opcin desconocida para `s'"
+msgstr "opcin desconocida para `s'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "mltiples opciones `p' para la orden `s'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "mltiples opciones `g' para la orden `s'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "mltiples opciones numricas para la orden `s'"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "una opcin numrica para la orden `s' no puede ser cero"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "las cadenas para la orden y son de longitudes diferentes"
+msgstr "las cadenas para la orden `y' son de longitudes diferentes"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "el carcter delimitador no es un carcter de un solo byte"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "se esperaba una versin ms reciente de sed"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Uso invlido de un modificador de direccin"
+msgstr "uso invlido de la direccin de lnea 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Orden desconocida:"
+msgstr "orden desconocida: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fichero %s lnea %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresin #%lu, carcter %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "No se puede encontrar la etiqueta para saltar a `%s'"
+msgstr "no se puede encontrar la etiqueta para saltar a `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: no se puede leer %s: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "No se puede abrir el fichero %s: %s"
+msgstr "no se puede editar %s: es una terminal"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "No se puede abrir el fichero %s: %s"
+msgstr "no se puede editar %s: no es un fichero regular"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "No se puede abrir el fichero temporal %s: %s"
+msgstr "no se puede abrir el fichero temporal %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "error en el subproceso"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "no hay soporte para la opcin `e'"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
-msgstr "no hay soporte para el comando `e'"
+msgstr "no hay soporte para la orden `e'"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "no hay ficheros de entrada"
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr "No hay una expresin regular previa"
+msgstr "no hay una expresin regular previa"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "No se pueden especificar modificadores en expresiones regulares vacas"
+msgstr "no se pueden especificar modificadores en expresiones regulares vacas"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Referencia \\%d invlida en el lado derecho del comando `s'"
+msgstr "referencia \\%d invlida en el lado derecho de la orden `s'"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Enve reportes de bichos por e-mail a: <%s>.\n"
+"Asegrese de incluir la palabra ``%s'' en algn lugar en el campo "
+"``Subject:''.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R, --regexp-perl\n"
-" utilizar la sintaxis de expresiones regulares de Perl 5\n"
+" utiliza la sintaxis de expresiones regulares de Perl 5\n"
" en el guin.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Uso: %s [OPCIN]... {guin-slo-si-no-hay-otro-guin} [fichero-entrada]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" suprime la muestra automtica del espacio de patrones\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e guin, --expression=guin\n"
+" agrega el guin a la lista de rdenes para ejecutar\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, 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 fichero-guin, --file=fichero-guin\n"
+" agrega el contenido del fichero guin a la lista de "
+"rdenes\n"
+" para ejecutar\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" sigue los enlaces simblicos al procesar en el lugar\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[SUFIJO], --in-place[=SUFIJO]\n"
+" edita ficheros en el lugar (crea un respaldo si se da\n"
+" una extensin)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" abre ficheros en modo binario (los RC+FLs no se procesan\n"
+" especialmente)\n"
-#: sed/sed.c:110
+#: sed/sed.c:144
#, 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"
+" especifica la longitud de corte de lnea deseado para\n"
+" la orden `l'\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" desactiva todas las extensiones de GNU.\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" utilizar la sintaxis de expresiones regulares de Perl 5\n"
-" en el guin.\n"
+" -r, --regexp-extended\n"
+" utiliza expresiones regulares extendidas en el guin.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -275,8 +312,11 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" considera los ficheros como separados en lugar de un solo\n"
+" flujo, largo y continuo.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -284,18 +324,23 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" carga cantidades mnimas de datos de los ficheros de "
+"entrada\n"
+" y vaca los almacenamientos temporales de salida con ms\n"
+" frecuencia\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help muestra esta ayuda y termina\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version muestra la informacin de la versin y termina\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -305,37 +350,34 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Si no se proporciona una opcin -e, --expression, -f, --file option,\n"
+"entonces se toma el primer argumento que no sea opcin como el guin sed\n"
+"a interpretar. Todos los argumentos restantes son nombres de ficheros\n"
+"de entrada; si no se especifican ficheros de entrada, entonces se lee\n"
+"la entrada estndard.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Enve reportes de bichos por e-mail a: %s .\n"
-"Asegrese de incluir la palabra ``%s'' en algn lugar en el campo "
-"``Subject:''.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed versin %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"basado en GNU sed versin 3.02.80\n"
+"basado en GNU sed versin %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed versin %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -348,101 +390,217 @@ msgstr ""
"No hay NINGUNA garanta; ni siquiera de COMERCIABILIDAD o IDONEIDAD PARA UN\n"
"FIN DETERMINADO, en la extensin permitida por ley.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: no se puede leer %s: %s\n"
+msgstr "no se puede eliminar %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr "No se puede abrir el fichero %s: %s"
+msgstr "no se puede abrir el fichero %s: %s"
+
+# FIXME: verificar con el cdigo fuente para saber si es 'conectar' o
+# 'adjuntar'. cfuga
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "no se puede conectar a %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "no se puede escribir %d elemento a %s: %s"
msgstr[1] "no se pueden escribir %d elementos a %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "error al leer de %s: %s"
-#: lib/utils.c:341
-#, fuzzy, c-format
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "no se puede seguir el enlace simblico %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "no se puede obtener la informacin de stat de %s: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: no se puede leer %s: %s\n"
+msgstr "no se puede renombrar %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "xito"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "No hay coincidencia"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Expresion regular invlida"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Carcter de ordenamiento invlido"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Carcter de nombre de clase invlido"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Diagonal invertida al final"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Referencia hacia atrs invlida"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "[ [^ sin pareja"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "( \\( sin pareja"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "\\{ sin pareja"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Contenido invlido de \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Final de rango invlido"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Memoria agotada"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Expresin regular precedente invlida"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Final prematuro de la expresin regular"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Expresin regular demasiado grande"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr ") \\) sin pareja"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "No hay una expresin regular previa"
+
+# FUZZY: pushback -> empuje? cfuga
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "savchar() llamado con empuje inesperado (%x)"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "ERROR INTERNO: tipo de direccin errneo"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "ERROR INTERNO: cmd %c errneo"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit files in place (makes backup if extension "
+#~ "supplied)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -r, --regexp-extended\n"
+#~ " use extended regular expressions in the script.\n"
+#~ "%s -s, --separate\n"
+#~ " consider files as separate rather than as a single "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ " load minimal amounts of data from the input files and "
+#~ "flush\n"
+#~ " the output buffers more often\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Modo de empleo: %s [OPCIN]... {guin-slo-si-no-hay-otro-guin} [fichero-"
+#~ "entrada]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " elimina la impresin automtica del espacio de patrones\n"
+#~ " -e script, --expression=guin\n"
+#~ " agrega el guin a las rdenes a ser ejecutadas\n"
+#~ " -f script-file, --file=fichero-guin\n"
+#~ " agrega el contenido del fichero-guin a las rdenes a "
+#~ "ser\n"
+#~ " ejecutadas\n"
+#~ " -i[sufijo, --in-place[=sufijo]\n"
+#~ " edita los archivos en su lugar (crea respaldos si se\n"
+#~ " proporciona una extensin)\n"
+#~ " -l N, --line-length=N\n"
+#~ " especifica la longitud deseada para el corte de la lnea "
+#~ "para\n"
+#~ " la orden `l'\n"
+#~ " -r, --regexp-extended\n"
+#~ " usa expresiones regulares extendidas en el guin.\n"
+#~ "%s -s, --separate\n"
+#~ " considera los ficheros por separado en lugar de un solo "
+#~ "flujo\n"
+#~ " largo y continuo.\n"
+#~ " -u, --unbuffered\n"
+#~ " carga cantidades mnimas de datos de los ficheros de "
+#~ "entrada\n"
+#~ " y vaca con ms frecuencia los almacenamientos "
+#~ "temporales de\n"
+#~ " salida\n"
+#~ " --help muestra esta ayuda y sale\n"
+#~ " -V, --version muestra la informacin de la versin y sale\n"
+#~ "\n"
+#~ "Si no se dan las opciones -e, --expression, -f o --file, entonces se "
+#~ "toma\n"
+#~ "el primer argumento que no sea opcin como el guin sed a interpretar. "
+#~ "Todos\n"
+#~ "los argumentos restantes son nombres de ficheros de entrada; si no se\n"
+#~ "especifican nombres de fichero de entrada, entonces se lee la entrada "
+#~ "estndard.\n"
+#~ "\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Fin de fichero inesperado"
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "expresin regular errnea: %s\n"
+
+#~ msgid "input read error: %s"
+#~ msgstr "error al leer la entrada: %s"
+
+#~ msgid "couldn't write an item to %s: %s"
+#~ msgstr "no se puede escribir un elemento elemento a %s: %s"
diff --git a/po/et.gmo b/po/et.gmo
index fb7777b..579f72c 100644
--- a/po/et.gmo
+++ b/po/et.gmo
Binary files differ
diff --git a/po/et.po b/po/et.po
index e5f0af8..e52d676 100644
--- a/po/et.po
+++ b/po/et.po
@@ -1,13 +1,13 @@
# Estonian translations for GNU sed.
# Copyright (C) 2001 Free Software Foundation, Inc.
-# Toomas Soome <Toomas.Soome@microlink.ee>, 2004.
+# Toomas Soome <Toomas.Soome@microlink.ee>, 2005.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.1.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2004-07-09 16:33+0300\n"
+"Project-Id-Version: sed 4.1.4\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2005-05-13 13:36+0300\n"
"Last-Translator: Toomas Soome <Toomas.Soome@microlink.ee>\n"
"Language-Team: Estonian <et@li.org>\n"
"MIME-Version: 1.0\n"
@@ -15,172 +15,188 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr "korduv `!'"
-#: sed/compile.c:163
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "ootamatu `,'"
-#: sed/compile.c:164
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
msgstr "+N vi ~N ei vi kasutada esimese aadressina"
-#: sed/compile.c:165
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "liigne `{'"
-#: sed/compile.c:166
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "ootamatu `}'"
-#: sed/compile.c:167
+#: sed/compile.c:166
msgid "extra characters after command"
msgstr "lisasmbolid peale ksku"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr "peale `a', `c' vi `i' peab olema \\"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' ei vaja aadresse"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": ei vaja aadresse"
-#: sed/compile.c:171
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr "kommentaarid ei vaja aadresse"
-#: sed/compile.c:172
+#: sed/compile.c:171
msgid "missing command"
msgstr "ksk puudub"
-#: sed/compile.c:173
+#: sed/compile.c:172
msgid "command only uses one address"
msgstr "ksk kasutab vaid ht aadressi"
-#: sed/compile.c:174
+#: sed/compile.c:173
msgid "unterminated address regex"
msgstr "lpetamata aadressi avaldis"
-#: sed/compile.c:175
+#: sed/compile.c:174
msgid "unterminated `s' command"
msgstr "lpetamata `s' ksk"
-#: sed/compile.c:176
+#: sed/compile.c:175
msgid "unterminated `y' command"
msgstr "lpetamata `y' ksk"
-#: sed/compile.c:177
+#: sed/compile.c:176
msgid "unknown option to `s'"
msgstr "tundmatu vti `s' ksule"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "korduv `p' vti `s' ksus"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "korduv `g' vti `s' ksus"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "korduvad numbrivtmed `s' ksus"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "numbrivti `s' ksus ei vi olla null"
-#: sed/compile.c:182
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr "sned ksus `y' on erineva pikkusega"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr "eraldav sbol ei ole he-baidiline smbol"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "oodati sedi uuemat versiooni"
-#: sed/compile.c:185
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "vigane rea aadressi 0 kasutamine"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "tundmatu ksk: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fail %s rida %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e avaldis #%lu, smbol %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1664
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "ei leia mrgendit, et hpata kohale `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ei saa lugeda %s: %s\n"
-#: sed/execute.c:673
+#: sed/execute.c:728
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%s ei saa toimetada: see on terminal"
-#: sed/execute.c:677
+#: sed/execute.c:733
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%s ei saa toimetada: see ei ole tavaline fail"
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "ajutist faili %s ei saa avada: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "viga alamprotsessis"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "vtit `e' ei toetata"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "ksku `e' ei toetata"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr "eelmist regulaaravaldist pole"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr "muudatusi thjale regulaaravaldisele ei saa mrata"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "vigane viide \\%d ksu `s' paremas pooles"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Postitage teated vigadest: <%s>.\n"
+"Lisage kindlasti sna ``%s'' ``Subject:'' reale.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -188,7 +204,7 @@ msgstr ""
" -R, --regexp-perl\n"
" kasuta skriptis Perl 5 regulaaravaldiste sntaksit.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -198,7 +214,7 @@ msgstr ""
"fail]...\n"
"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -207,7 +223,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" keela mustriruumi automaatne vljastamine\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -216,7 +232,7 @@ msgstr ""
" -e skript, --expression=skript\n"
" lisa tidetavate kskluste skript\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -226,7 +242,14 @@ msgstr ""
" -f skripti-fail, --file=skripti-fail\n"
" lisa skripti-faili sisu tidetavate kskluste hulka\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -235,7 +258,15 @@ msgstr ""
" -i[SUFIKS], --in-place[=SUFIKS]\n"
" toimeta faile (kui kasutati sifiksit, loob ka varukoopia)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -244,7 +275,7 @@ msgstr ""
" -l N, --line-length=N\n"
" mra `l' ksule soovitatav rea pikkus\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
@@ -253,7 +284,7 @@ msgstr ""
" --posix\n"
" blokeeri kik GNU laiendused.\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
@@ -262,7 +293,7 @@ msgstr ""
" -r, --regexp-extended\n"
" kasuta skriptis laiendatud regulaaravaldiste sntaksit.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -273,7 +304,7 @@ msgstr ""
" -s, --separate\n"
" ksitle faile kshaaval, mitte he jtkuva voona.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -285,17 +316,17 @@ msgstr ""
" loe sisendfailist minimaalne kogus andmeid ja thjenda\n"
" vljundpuhvreid sagedamini\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help vljast see abiinfo ja lpeta t\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version vljasta versiooniinfo ja lpeta t\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -312,21 +343,12 @@ msgstr ""
"sisendfailide nimed; kui sisendfaile ei antud, loetakse standardsisendit.\n"
"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Postitage teated vigadest: %s .\n"
-"Lisage kindlasti sna ``%s'' ``Subject:'' reale.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed versioon %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
@@ -335,12 +357,12 @@ msgstr ""
"phineb GNU sed versioonil %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed versioon %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -353,101 +375,116 @@ msgstr ""
"PUUDUB; ka mgiks vi mingil eesmrgil kasutamiseks, vastavalt seadustega\n"
"lubatud piiridele.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, c-format
msgid "cannot remove %s: %s"
msgstr "%s ei saa eemaldada: %s"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, c-format
msgid "couldn't open file %s: %s"
msgstr "faili %s ei saa avada: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "%d elemendi faili %s kirjutamine ebannestus: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "%d elemendi faili %s kirjutamine ebannestus: %s"
msgstr[1] "%d elemendi faili %s kirjutamine ebannestus: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "lugemisviga %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "faili %s ei saa avada: %s"
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "%s ei saa mber nimetada: %s"
+
+#: sed/utils.c:438
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s ei saa mber nimetada: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Edukas"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Ei leia"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Vigane regulaaravaldis"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Vigane sortimise smbol"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Vigane smbolite klassi nimi"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Lpetav langkriips"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Vigane tagasi viide"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Puudub [ vi [^"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Puudub ( vi \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Puudub \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Vigane \\{\\} sisu"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Vigane vahemiku lpp"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Mlu on otsas"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Vigane eelnev regulaaravaldis"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Ootamatu regulaaravaldise lpp"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Regulaaravaldis on liiga suur"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Puudub ) vi \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Eelmist regulaaravaldist pole"
diff --git a/po/eu.gmo b/po/eu.gmo
new file mode 100644
index 0000000..6e6ce1b
--- /dev/null
+++ b/po/eu.gmo
Binary files differ
diff --git a/po/eu.po b/po/eu.po
new file mode 100644
index 0000000..409bf18
--- /dev/null
+++ b/po/eu.po
@@ -0,0 +1,459 @@
+# Basque translation of sed.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
+# Mikel Olasagasti <hey_neken@mundurat.net>, 2004.
+# , fuzzy
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: sed 4.1.1\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\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"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: sed/compile.c:161
+msgid "multiple `!'s"
+msgstr ""
+
+#: sed/compile.c:162
+msgid "unexpected `,'"
+msgstr "ustekabeko `,'"
+
+#: sed/compile.c:163
+msgid "invalid usage of +N or ~N as first address"
+msgstr ""
+
+#: sed/compile.c:164
+msgid "unmatched `{'"
+msgstr ""
+
+#: sed/compile.c:165
+msgid "unexpected `}'"
+msgstr "ustekabeko `}'"
+
+#: sed/compile.c:166
+msgid "extra characters after command"
+msgstr ""
+
+#: sed/compile.c:167
+msgid "expected \\ after `a', `c' or `i'"
+msgstr ""
+
+#: sed/compile.c:168
+msgid "`}' doesn't want any addresses"
+msgstr ""
+
+#: sed/compile.c:169
+msgid ": doesn't want any addresses"
+msgstr ""
+
+#: sed/compile.c:170
+msgid "comments don't accept any addresses"
+msgstr ""
+
+#: sed/compile.c:171
+msgid "missing command"
+msgstr ""
+
+#: sed/compile.c:172
+msgid "command only uses one address"
+msgstr ""
+
+#: sed/compile.c:173
+msgid "unterminated address regex"
+msgstr ""
+
+#: sed/compile.c:174
+msgid "unterminated `s' command"
+msgstr ""
+
+#: sed/compile.c:175
+msgid "unterminated `y' command"
+msgstr ""
+
+#: sed/compile.c:176
+msgid "unknown option to `s'"
+msgstr "`s' aukera ezezaguna"
+
+#: sed/compile.c:177
+msgid "multiple `p' options to `s' command"
+msgstr ""
+
+#: sed/compile.c:178
+msgid "multiple `g' options to `s' command"
+msgstr ""
+
+#: sed/compile.c:179
+msgid "multiple number options to `s' command"
+msgstr ""
+
+#: sed/compile.c:180
+msgid "number option to `s' command may not be zero"
+msgstr ""
+
+#: sed/compile.c:181
+msgid "strings for `y' command are different lengths"
+msgstr ""
+
+#: sed/compile.c:182
+msgid "delimiter character is not a single-byte character"
+msgstr ""
+
+#: sed/compile.c:183
+msgid "expected newer version of sed"
+msgstr ""
+
+#: sed/compile.c:184
+msgid "invalid usage of line address 0"
+msgstr ""
+
+#: sed/compile.c:185
+#, c-format
+msgid "unknown command: `%c'"
+msgstr "komando ezezaguna: `%c'"
+
+#: sed/compile.c:208
+#, c-format
+msgid "%s: file %s line %lu: %s\n"
+msgstr "%s: %s fitxategia %lu lerroa: %s\n"
+
+#: sed/compile.c:211
+#, c-format
+msgid "%s: -e expression #%lu, char %lu: %s\n"
+msgstr "%s: -e expresioa #%lu, %lu karakterea: %s\n"
+
+#: sed/compile.c:1664
+#, c-format
+msgid "can't find label for jump to `%s'"
+msgstr ""
+
+#: sed/execute.c:701
+#, c-format
+msgid "%s: can't read %s: %s\n"
+msgstr "%s: ezin irakurri %s: %s\n"
+
+#: sed/execute.c:728
+#, c-format
+msgid "couldn't edit %s: is a terminal"
+msgstr "ezin izan da %s editatu: terminal bat da"
+
+#: sed/execute.c:733
+#, 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:740 sed/utils.c:222
+#, c-format
+msgid "couldn't open temporary file %s: %s"
+msgstr ""
+
+#: sed/execute.c:1270 sed/execute.c:1450
+msgid "error in subprocess"
+msgstr "errorea subprozezuan"
+
+#: sed/execute.c:1272
+msgid "option `e' not supported"
+msgstr ""
+
+#: sed/execute.c:1452
+msgid "`e' command not supported"
+msgstr ""
+
+#: sed/execute.c:1796
+msgid "no input files"
+msgstr ""
+
+#: sed/regexp.c:41
+msgid "no previous regular expression"
+msgstr ""
+
+#: sed/regexp.c:42
+msgid "cannot specify modifiers on empty regexp"
+msgstr ""
+
+#: sed/regexp.c:131
+#, c-format
+msgid "invalid reference \\%d on `s' command's RHS"
+msgstr ""
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Bidali bug txostenak honi: <%s>.\n"
+"Ziurtatu ``%s'' hitza ``Gaia:'' eremuan edonon agertzeaz.\n"
+
+#: sed/sed.c:119
+msgid ""
+" -R, --regexp-perl\n"
+" use Perl 5's regular expressions syntax in the script.\n"
+msgstr ""
+
+#: sed/sed.c:124
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+"\n"
+msgstr ""
+
+#: sed/sed.c:128
+#, c-format
+msgid ""
+" -n, --quiet, --silent\n"
+" suppress automatic printing of pattern space\n"
+msgstr ""
+
+#: sed/sed.c:130
+#, c-format
+msgid ""
+" -e script, --expression=script\n"
+" add the script to the commands to be executed\n"
+msgstr ""
+
+#: sed/sed.c:132
+#, c-format
+msgid ""
+" -f script-file, --file=script-file\n"
+" add the contents of script-file to the commands to be "
+"executed\n"
+msgstr ""
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
+#, c-format
+msgid ""
+" -i[SUFFIX], --in-place[=SUFFIX]\n"
+" edit files in place (makes backup if extension supplied)\n"
+msgstr ""
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" -l N, --line-length=N\n"
+" specify the desired line-wrap length for the `l' command\n"
+msgstr ""
+
+#: sed/sed.c:146
+#, c-format
+msgid ""
+" --posix\n"
+" disable all GNU extensions.\n"
+msgstr ""
+
+#: sed/sed.c:148
+#, c-format
+msgid ""
+" -r, --regexp-extended\n"
+" use extended regular expressions in the script.\n"
+msgstr ""
+
+#: sed/sed.c:153
+#, c-format
+msgid ""
+" -s, --separate\n"
+" consider files as separate rather than as a single "
+"continuous\n"
+" long stream.\n"
+msgstr ""
+
+#: sed/sed.c:156
+#, c-format
+msgid ""
+" -u, --unbuffered\n"
+" load minimal amounts of data from the input files and "
+"flush\n"
+" the output buffers more often\n"
+msgstr ""
+
+#: sed/sed.c:159
+#, c-format
+msgid " --help display this help and exit\n"
+msgstr ""
+
+#: sed/sed.c:160
+#, c-format
+msgid " --version output version information and exit\n"
+msgstr ""
+
+#: sed/sed.c:161
+#, c-format
+msgid ""
+"\n"
+"If no -e, --expression, -f, or --file option is given, then the first\n"
+"non-option argument is taken as the sed script to interpret. All\n"
+"remaining arguments are names of input files; if no input files are\n"
+"specified, then the standard input is read.\n"
+"\n"
+msgstr ""
+
+#: sed/sed.c:317
+#, c-format
+msgid "super-sed version %s\n"
+msgstr "super-sed %s bertsioa\n"
+
+#: sed/sed.c:318
+#, c-format
+msgid ""
+"based on GNU sed version %s\n"
+"\n"
+msgstr ""
+"GNU sed %s bertsioan oinarritua\n"
+"\n"
+
+#: sed/sed.c:320
+#, c-format
+msgid "GNU sed version %s\n"
+msgstr "GNU sed %s bertsioa\n"
+
+#: sed/sed.c:322
+#, c-format
+msgid ""
+"%s\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\n"
+"to the extent permitted by law.\n"
+msgstr ""
+
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
+msgid "cannot remove %s: %s"
+msgstr "ezin da %s kendu: %s"
+
+#: sed/utils.c:163
+#, c-format
+msgid "couldn't open file %s: %s"
+msgstr "ezin izan da %s fitxategia ireki: %s"
+
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "ezin izan da %d gaia %s-ri idatzi: %s"
+
+#: sed/utils.c:240
+#, fuzzy, c-format
+msgid "couldn't write %d item to %s: %s"
+msgid_plural "couldn't write %d 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:255 sed/utils.c:271
+#, c-format
+msgid "read error on %s: %s"
+msgstr "irakurketa errorea %s-n: %s"
+
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "ezin izan da %s fitxategia ireki: %s"
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "ezin da %s berrizendatu: %s"
+
+#: sed/utils.c:438
+#, c-format
+msgid "cannot rename %s: %s"
+msgstr "ezin da %s berrizendatu: %s"
+
+#: lib/regcomp.c:134
+msgid "Success"
+msgstr "Arrakasta"
+
+#: lib/regcomp.c:137
+msgid "No match"
+msgstr "Parekotasunik ez"
+
+#: lib/regcomp.c:140
+msgid "Invalid regular expression"
+msgstr ""
+
+#: lib/regcomp.c:143
+msgid "Invalid collation character"
+msgstr ""
+
+#: lib/regcomp.c:146
+msgid "Invalid character class name"
+msgstr ""
+
+#: lib/regcomp.c:149
+msgid "Trailing backslash"
+msgstr ""
+
+#: lib/regcomp.c:152
+msgid "Invalid back reference"
+msgstr ""
+
+#: lib/regcomp.c:155
+msgid "Unmatched [ or [^"
+msgstr ""
+
+#: lib/regcomp.c:158
+msgid "Unmatched ( or \\("
+msgstr ""
+
+#: lib/regcomp.c:161
+msgid "Unmatched \\{"
+msgstr ""
+
+#: lib/regcomp.c:164
+msgid "Invalid content of \\{\\}"
+msgstr ""
+
+#: lib/regcomp.c:167
+msgid "Invalid range end"
+msgstr ""
+
+#: lib/regcomp.c:170
+msgid "Memory exhausted"
+msgstr "Memoria agortuta"
+
+#: lib/regcomp.c:173
+msgid "Invalid preceding regular expression"
+msgstr ""
+
+#: lib/regcomp.c:176
+msgid "Premature end of regular expression"
+msgstr ""
+
+#: lib/regcomp.c:179
+msgid "Regular expression too big"
+msgstr ""
+
+#: lib/regcomp.c:182
+msgid "Unmatched ) or \\)"
+msgstr ""
+
+#: lib/regcomp.c:703
+msgid "No previous regular expression"
+msgstr ""
diff --git a/po/fi.gmo b/po/fi.gmo
index daadc1d..33b29b3 100644
--- a/po/fi.gmo
+++ b/po/fi.gmo
Binary files differ
diff --git a/po/fi.po b/po/fi.po
index f29cd3d..1297251 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -1,273 +1,309 @@
+# translation of sed.pot to Finnish
# Finnish translations for GNU sed.
-# Copyright 2002 Free Software Foundation, Inc.
-# Sami J. Laine <sami.laine@iki.fi>, 2002
+# Copyright © 2002, 2007, 2008 Free Software Foundation, Inc.
#
+# Sami J. Laine <sami.laine@iki.fi>, 2002.
+# Jorma Karvonen <karvjorm@users.sf.net>, 2007, 2008.
msgid ""
msgstr ""
-"Project-Id-Version: sed-4.0.8\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2003-12-07 09:35+0200\n"
-"Last-Translator: Sami J. Laine <sami.laine@iki.fi>\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-18 07:16+0200\n"
+"Last-Translator: Jorma Karvonen <karvjorm@users.sf.net>\n"
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: KBabel 1.11.2\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "Useita \"!\"-merkkej"
+msgstr "Useita ”!”-merkkejä"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr "Odottamaton \",\""
+msgstr "Odottamaton ”,”"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "Ensimmisen osoitteena ei voi olla +N tai ~N"
+msgstr "Ensimmäisenä osoitteena ei voi olla ”+N” eikä ”~N”"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr "Pariton \"{\""
+msgstr "Pariton ”{”"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr "Pariton \"}\""
+msgstr "Pariton ”}”"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Ylimrisi merkkej komennon jlkeen"
+msgstr "Ylimääräisiä merkkejä komennon jälkeen"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "\\ odotettiin merkkien `a', `c' tai `i' jlkeen"
+msgstr "\\ odotettiin merkkien ”a”, ”c” tai ”i” jälkeen"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
-msgstr "\"}\" ei tarvitse osoitteita"
+msgstr "”}” ei tarvitse osoitteita"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": ei tarvitse osoitteita"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "Kommentit eivt hyvksy osoitteita"
+msgstr "kommentit eivät hyväksy osoitteita"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
msgstr "Puuttuva komento"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "Komento kytt vain yht osoitetta"
+msgstr "Komento käyttää vain yhtä osoitetta"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "Pttymtn osoite vakiolauseessa"
+msgstr "Päättymätön osoite vakiolauseessa"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "Pttymtn \"s\"-komento"
+msgstr "Päättymätön ”s”-komento"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "Pttymtn \"y\"-komento"
+msgstr "Päättymätön ”y”-komento"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "Tuntematon valitsin \"s\":lle"
+msgstr "Tuntematon valitsin ”s”:lle"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
-msgstr "useita \"p\"-valitsimia \"s\"-komennolle"
+msgstr "useita ”p”-valitsimia ”s”-komennolle"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
-msgstr "useita \"g\"-valitsimia \"s\"-komennolle"
+msgstr "useita ”g”-valitsimia ”s”-komennolle"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
-msgstr "useita valitsimia \"s\"-komennolle"
+msgstr "useita valitsimia ”s”-komennolle"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
-msgstr "numeerinen valitsin \"s\"-komennolle ei voi olla nolla"
+msgstr "numeerinen valitsin ”s”-komennolle ei voi olla nolla"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "merkkijonot \"y\"-komennolle ovat pituudeltaan vaihtelevia"
+msgstr "merkkijonot ”y”-komennolle ovat pituudeltaan vaihtelevia"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "erotinmerkki ei ole yksitavuinen merkki"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr "odotettiin uudempaa versiota sed:st"
+msgstr "odotettiin uudempaa sed-versiota"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Komento kytt vain yht osoitetta"
+msgstr "riviosoitteen nolla virheellinen käyttö"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Tuntematon komento:"
+msgstr "Tuntematon komento: ”%c”"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: tiedosto %s rivi %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e lauseke #%lu, merkki %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "Nimikett hypylle kohteeseen \"%s\" ei lydy"
+msgstr "Nimikettä hypylle kohteeseen ”%s” ei löydy"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: ei voida lukea sytett %s: %s\n"
+msgstr "%s: ei voida lukea syötettä %s: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Tiedostoa %s ei voitu avata: %s"
+msgstr "ei voitu muokata %s: se on pääte"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Tiedostoa %s ei voitu avata: %s"
+msgstr "ei voitu muokata %s: se ei ole tavallinen tiedosto"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Vliaikaistiedostoa %s ei voitu avata: %s"
+msgstr "Väliaikaistiedostoa %s ei voitu avata: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "virhe lapsiprosessissa"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
-msgstr "valitsin `e' ei ole tuettu"
+msgstr "valitsin ”e” ei ole tuettu"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
-msgstr "komento `e' ei ole tuettu"
+msgstr "komento ”e” ei ole tuettu"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "ei syötetiedostoja"
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr "Ei aikaisempaa snnllist lausetta"
+msgstr "Ei aikaisempaa säännöllistä lauseketta"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "Muuttajia ei voida mritell tyhjn snnliseen lausekkeeseen"
+msgstr "Muuttajia ei voida määritellä tyhjään säännölliseen lausekkeeseen"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Virheellinen viittaus \\%d komennon `s' oikealla puolella"
+msgstr "Virheellinen viittaus \\%d komennon ”s” oikealla puolella"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Lähetä virheraportit osoitteeseen <%s>.\n"
+"Sisällytä sana ”%s” viestin aihekenttään (”Subject”-kenttään).\n"
-#: sed/sed.c:93
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R, --regexp-perl\n"
-" kyt Perl 5:en mukaista snnllisten lauseiden\n"
-" syntaksia skriptiss.\n"
+" käytä Perl 5:n mukaista säännöllisten lauseiden\n"
+" syntaksia skriptissä.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Käyttö: %s [VALITSIN]... {skripti-vain-jos-ei-ole-muita-skriptejä} "
+"[syötetiedosto]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" vaienna automaattinen mallitilan tulostus\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e script, --expression=skripti\n"
+" lisää skripti suoritettaviin komentoihin\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, 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=skriptitiedosto\n"
+" lisää skriptitiedoston sisältö suoritettaviin komentoihin\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" seuraa symbolisia linkkejä, kun prosessoidaan paikallaan\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[SUFFIKSI], --in-place[=SUFFIKSI]\n"
+" muokkaa tiedostoja paikallaan (tekee varmuuskopion, jos "
+"tiedostotarkennin on annettu)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" avaa tiedostot binääritilassa (rivinvaihtomerkkejä CR+LF ei "
+"erityisemmin prosessoida)\n"
-#: sed/sed.c:110
+#: sed/sed.c:144
#, 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"
+" määrittelee halutun rivinvaihtopituuden komennolle ”l”\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" passivoi kaikki GNU-laajennukset.\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" kyt Perl 5:en mukaista snnllisten lauseiden\n"
-" syntaksia skriptiss.\n"
+" -r, --regexp-extended\n"
+" käytä laajennettuja säännöllisiä lausekkeita skriptissä.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -275,8 +311,11 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" pidä tiedostoja erillisinä pikemmin kuin yhtenä jatkuvana\n"
+" pitkänä virtana.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -284,18 +323,21 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" lataa syötetiedostoista minimimäärä dataa ja tyhjennä\n"
+" tulostepuskurit useammin\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help näytä tämä opaste ja poistu\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version tulosta versiotiedot ja poistu\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -305,36 +347,36 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Jos valitsimia ”-e”, ”--expression”, ”-f”, tai ”--file” ei ole annettu, "
+"silloin\n"
+"ensimmäistä ei-valitsinargumenttia pidetään tulkittavana sed-skriptinä. "
+"Kaikki\n"
+"jäljelle jäävät argumentit ovat syötetiedostojen nimiä; jos syötetiedostoja "
+"ei\n"
+"ole määritelty, luetaan vakiosyötettä.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Lhet virheraportit osoitteeseen %s .\n"
-"Sisllyt sana \"%s\" viestin aihekenttn (\"Subject\"-kenttn).\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed versio %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"perustuu GNU sed versioon 3.02.80\n"
+"perustuu GNU sed versioon %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed versio %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -343,106 +385,121 @@ msgid ""
"to the extent permitted by law.\n"
msgstr ""
"%s\n"
-"Tm ohjelma on vapaa ohjelmisto; tarkista jakeluehdot lhdekoodista.\n"
-"Tlle ohjelmalle ei anneta minknlaista takuuta; ei edes takuuta\n"
-"kaupallisesti hyvksyttvst laadusta tai soveltuvuudesta tiettyyn\n"
+"Tämä ohjelma on vapaa ohjelmisto; tarkista jakeluehdot lähdekoodista.\n"
+"Tälle ohjelmalle ei anneta minkäänlaista takuuta; ei edes takuuta\n"
+"kaupallisesti hyväksyttävästä laadusta tai soveltuvuudesta tiettyyn\n"
"tarkoitukseen.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: ei voida lukea sytett %s: %s\n"
+msgstr "ei voida siirtää %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr "Tiedostoa %s ei voitu avata: %s"
+msgstr "ei voitu avata tiedostoa %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "ei voitu liittyä kohteeseen %s: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "%d kohdetta ei voitu kirjoittaa tulosteeseen %s: %s"
msgstr[1] "%d kohdetta ei voitu kirjoittaa tulosteeseen %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
-msgstr "lukuvirhe sytteess %s: %s"
+msgstr "lukuvirhe syötteessä %s: %s"
+
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "ei voitu seurata symbolista linkkiä %s: %s"
-#: lib/utils.c:341
-#, fuzzy, c-format
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "ei voida suorittaa stat-käskyä %s: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: ei voida lukea sytett %s: %s\n"
+msgstr "ei voida nimetä uudelleen %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Onnistui"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Ei osumaa"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
-msgstr "Virheellinen snnllinen lauseke"
+msgstr "Virheellinen säännöllinen lauseke"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Virheellinen vertailumerkki"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
-msgstr "Virhellinen merkkiluokan nimi"
+msgstr "Virheellinen merkkiluokan nimi"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Seuraava kenoviiva"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Virheellinen takaisinviittaus"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
-msgstr "Pariton \"[\" tai \"[^\""
+msgstr "Pariton ”[” tai ”[^”"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
-msgstr "Pariton \"(\" tai \"\\(\""
+msgstr "Pariton ”(” tai ”\\(”"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
-msgstr "Pariton \"\\{\""
+msgstr "Pariton ”\\{”"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
-msgstr "Virheellinen sislt \\{\\}:ss"
+msgstr "Virheellinen sisältö \\{\\}:ssä"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
-msgstr "Virheellinen vlin loppu"
+msgstr "Virheellinen lukualueen loppu"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
-msgstr "Muisti loppu"
+msgstr "Muisti loppui"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
-msgstr "Virheellinen edeltv snnllinen lauseke"
+msgstr "Virheellinen edeltävä säännöllinen lauseke"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
-msgstr "Ennenaikainen snnllisen lausekkeen loppu"
+msgstr "Ennenaikainen säännöllisen lausekkeen loppu"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
-msgstr "Snnllinen lauseke on liian suuri"
+msgstr "Säännöllinen lauseke on liian suuri"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
-msgstr "Pariton \")\" tai \"\\)\""
+msgstr "Pariton ”)” tai ”\\)”"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
-msgstr "Ei aikaisempaa snnllist lausetta"
+msgstr "Ei aikaisempaa säännöllistä lausetta"
diff --git a/po/fr.gmo b/po/fr.gmo
index 0e9f722..8a2d534 100644
--- a/po/fr.gmo
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
index 523c229..b7a3d0d 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -1,5 +1,5 @@
# French translation of GNU sed.
-# Copyright (C) 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
# Gal Quri <gael@lautre.net>, 1998.
#
# J'ai prfr utiliser le terme <<Expression rgulire>> plutt
@@ -8,10 +8,10 @@
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.1.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2004-07-12 00:09+0200\n"
+"Project-Id-Version: sed 4.1.4\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2005-04-23 16:29+0200\n"
"Last-Translator: Gal Quri <gael@lautre.net>\n"
"Language-Team: French <traduc@traduc.org>\n"
"MIME-Version: 1.0\n"
@@ -19,174 +19,191 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr "`!' multiples"
-#: sed/compile.c:163
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "`,' inattendue"
-#: sed/compile.c:164
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
msgstr "utilisation invalide de +N ou ~N comme premire adresse"
-#: sed/compile.c:165
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "`{' non referme"
-#: sed/compile.c:166
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "`}' inattendu"
-#: sed/compile.c:167
+#: sed/compile.c:166
msgid "extra characters after command"
msgstr "caractres inutiles aprs la commande"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr "\\ attendu aprs `a', `c' ou `i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' n'a besoin d'aucune adresse"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": n'a besoin d'aucune adresse"
-#: sed/compile.c:171
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr "les commentaires n'acceptent aucune adresse"
-#: sed/compile.c:172
+#: sed/compile.c:171
msgid "missing command"
msgstr "commande manquante"
-#: sed/compile.c:173
+#: sed/compile.c:172
msgid "command only uses one address"
msgstr "la commande n'utilise qu'une adresse"
-#: sed/compile.c:174
+#: sed/compile.c:173
msgid "unterminated address regex"
msgstr "expression rgulire d'adresse inacheve"
-#: sed/compile.c:175
+#: sed/compile.c:174
msgid "unterminated `s' command"
msgstr "commande `s' inacheve"
-#: sed/compile.c:176
+#: sed/compile.c:175
msgid "unterminated `y' command"
msgstr "commande `y' inacheve"
-#: sed/compile.c:177
+#: sed/compile.c:176
msgid "unknown option to `s'"
msgstr "option inconnue pour `s'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "plusieurs options `p' la commande `s'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "plusieurs options `g' la commande `s'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "plusieurs options numriques la commande `s'"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "l'option numrique de la comande `s' ne peut tre nulle"
-#: sed/compile.c:182
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr "les chanes destines la commande `y' ont des longueurs diffrentes"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr "le caractre dlimiteur n'est pas un caractre un seul octet"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "une version plus rcente de sed est attendue"
-#: sed/compile.c:185
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "utilisation invalide de l'adresse de ligne 0"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "commande inconnue: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fichier %s ligne %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expression n%lu, caractre %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1664
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "impossible de trouver l'tiquette pour sauter `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: impossible de lire %s: %s\n"
-#: sed/execute.c:673
+#: sed/execute.c:728
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "impossible d'diter %s: est un terminal"
-#: sed/execute.c:677
+#: sed/execute.c:733
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "impossible d'diter %s: ce n'est pas un fichier rgulier"
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "impossible d'ouvrir le fichier temporaire %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "erreur dans le sous-processus"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "l'option `e' n'est pas supporte"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "la commande `e' n'est pas supporte"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr "pas d'expression rgulire prcdente"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr ""
"impossible de spcifier des modifieurs sur une expression\n"
"rationnelle vide"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "rfrence \\%d invalide dans le ct droit de la commande `s'"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Rapporter toutes anomalies : <%s>.\n"
+"N'oubliez pas d'inclure le mot ``%s'' quelque-part dans la zone "
+"``Subject:''\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -195,7 +212,7 @@ msgstr ""
" utiliser la syntaxe des expressions rgulires\n"
" de Perl 5 dans le script.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -205,7 +222,7 @@ msgstr ""
"[fichier-d'entre]...\n"
"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -214,7 +231,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" supprimer l'criture automatique de l'espace des motifs\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -223,7 +240,7 @@ msgstr ""
" -e script, --expression=script\n"
" ajouter le script aux commandes tre excutes\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -234,7 +251,14 @@ msgstr ""
" ajouter le contenu de fichier-script aux commandes\n"
" tre excutes\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -244,7 +268,15 @@ msgstr ""
" diter les fichiers leur place (fait une\n"
" sauvegarde si l'extension est fournie)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -254,7 +286,7 @@ msgstr ""
" spcifier la longueur de coupure de ligne dsire pour la\n"
" commande `l'\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
@@ -263,7 +295,7 @@ msgstr ""
" --posix\n"
" dsactiver toutes les extensions GNU.\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
@@ -273,7 +305,7 @@ msgstr ""
" utiliser la syntaxe des expressions rgulires\n"
" tendues dans le script.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -285,7 +317,7 @@ msgstr ""
" considrer les fichiers comme spars plutt que comme un\n"
" simple flux long et continu.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -298,18 +330,18 @@ msgstr ""
" fichiers d'entre et librer les tampons de sortie plus\n"
" souvent\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help afficher cette aide et sortir\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, 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:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -326,22 +358,12 @@ msgstr ""
"d'entre; si aucun fichier d'entre n'est spcifie, l'entre standard\n"
"est lue.\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Rapporter toutes anomalies : %s.\n"
-"N'oubliez pas d'inclure le mot ``%s'' quelque-part dans la zone "
-"``Subject:''\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed version %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
@@ -350,12 +372,12 @@ msgstr ""
"fond sur GNU sed version %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed version %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -369,101 +391,116 @@ msgstr ""
"AUCUNE garantie n'est donne; y compris pour des RAISONS COMMERCIALES ou\n"
"pour RPONDRE A UN BESOIN PARTICULIER, l'tendue permise par la loi.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, c-format
msgid "cannot remove %s: %s"
msgstr "impossible de supprimer %s: %s"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, c-format
msgid "couldn't open file %s: %s"
msgstr "impossible d'ouvrir le fichier %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "impossible d'crire %d item %s: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "impossible d'crire %d item %s: %s"
msgstr[1] "impossible d'crire %d items %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "erreur de lecture sur %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "impossible d'ouvrir le fichier %s: %s"
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "impossible de renommer %s: %s"
+
+#: sed/utils.c:438
#, c-format
msgid "cannot rename %s: %s"
msgstr "impossible de renommer %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Succs"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Pas de concordance"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Expression rgulire invalide"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Caractre de collation invalide"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Nom de classe de caractres invalide"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Antislash de protection"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Rfrence arrire invalide"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "[ ou [^ non referm"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "( ou \\( non referm"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "\\{ non referm"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Contenu de \\{\\} invalide"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Fin d'intervalle invalide"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Mmoire puise"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "L'expression rgulire prcdente est invalide"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Fin prmature d'une expression rgulire"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Expression rgulire trop grande"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr ") ou \\) non referm"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Pas d'expression rgulire prcdente"
diff --git a/po/ga.gmo b/po/ga.gmo
index d4da4dd..f30702b 100644
--- a/po/ga.gmo
+++ b/po/ga.gmo
Binary files differ
diff --git a/po/ga.po b/po/ga.po
index 9946346..ebe53ec 100644
--- a/po/ga.po
+++ b/po/ga.po
@@ -1,216 +1,231 @@
# Irish translations for sed
# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# Kevin Patrick Scannell <scannell@SLU.EDU>, 2003, 2004.
+# Kevin Patrick Scannell <scannell@SLU.EDU>, 2003, 2004, 2006, 2008.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.1.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2004-07-07 11:04-0500\n"
-"Last-Translator: Kevin Patrick Scannell <scannell@SLU.EDU>\n"
-"Language-Team: Irish <ga@li.org>\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-13 11:04-0500\n"
+"Last-Translator: Kevin Scannell <kscanne@gmail.com>\n"
+"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=4; plural=n==1 ? 0 : (n>1 && n<7) ? 1 : (n>6 && n "
-"<11) ? 2 : 3;\n"
+"Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : (n>2 && n<7) ? 2 :"
+"(n>6 && n<11) ? 3 : 4;\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "`!'-anna iomadla"
+msgstr "`!'-anna iomadúla"
-#: sed/compile.c:163
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "`,' gan choinne"
-#: sed/compile.c:164
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "n fidir +N n ~N a sid mar an chad seoladh"
+msgstr "ní féidir +N nó ~N a úsáid mar an chéad seoladh"
-#: sed/compile.c:165
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "`{' corr"
-#: sed/compile.c:166
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "`}' gan choinne"
-#: sed/compile.c:167
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "carachtair breise i ndiaidh an t-ord"
+msgstr "carachtair breise i ndiaidh an ordaithe"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "bhothas ag sil le \\ i ndiaidh `a', `c', n `i'"
+msgstr "bhíothas ag súil le \\ i ndiaidh `a', `c', nó `i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
-msgstr "Nl filte roimh seolta le `}'"
+msgstr "Níl fáilte roimh sheoltaí le `}'"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
-msgstr "Nl filte roimh seolta le `:'"
+msgstr "Níl fáilte roimh sheoltaí le `:'"
-#: sed/compile.c:171
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "nl filte roimh seolta le nta trchta"
+msgstr "níl fáilte roimh sheoltaí le nótaí tráchta"
-#: sed/compile.c:172
+#: sed/compile.c:171
msgid "missing command"
-msgstr "ord ar iarraidh"
+msgstr "ordú ar iarraidh"
-#: sed/compile.c:173
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "n sidtear an t-ord ach seoladh amhin"
+msgstr "ní úsáidtear an t-ordú ach seoladh amháin"
-#: sed/compile.c:174
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "seoladh regex gan chrochn"
+msgstr "seoladh regex gan chríochnú"
-#: sed/compile.c:175
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "ord `s' gan chrochn"
+msgstr "ordú `s' gan chríochnú"
-#: sed/compile.c:176
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "ord `y' gan chrochn"
+msgstr "ordú `y' gan chríochnú"
-#: sed/compile.c:177
+#: sed/compile.c:176
msgid "unknown option to `s'"
msgstr "rogha anaithnid i ndiaidh `s'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "an iomarca roghanna `p' i ndiaidh `s'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "an iomarca roghanna `g' i ndiaidh `s'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
-msgstr "an iomarca roghanna uimhrila i ndiaidh `s'"
+msgstr "an iomarca roghanna uimhriúla i ndiaidh `s'"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
-msgstr "n cheadatear nialas mar rogha uimhriil leis an ord `s'"
+msgstr "ní cheadaítear nialas mar rogha uimhriúil leis an ordú `s'"
-#: sed/compile.c:182
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "n aon fad amhin ar na teaghrin leis an ord `y'"
+msgstr "níl aon fhad amháin ar na teaghráin leis an ordú `y'"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr "t an teorantir ina charachtar ilbheart"
+msgstr "tá an teormharcóir ina charachtar ilbheart"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr "bhothas ag sil le leagan `sed' nos ire"
+msgstr "bhíothas ag súil le leagan `sed' níos úire"
-#: sed/compile.c:185
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "n fidir an seoladh lne 0 a sid"
+msgstr "ní féidir an seoladh líne 0 a úsáid"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
-msgstr "ord anaithnid: `%c'"
+msgstr "ordú anaithnid: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
-msgstr "%s: comhad %s lne %lu: %s\n"
+msgstr "%s: comhad %s líne %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, 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:1664
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "nl aon fhil ar an lipad `%s' don lim"
+msgstr "níl aon fháil ar an lipéad `%s' don léim"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: n fidir %s a lamh: %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:673
+#: sed/execute.c:728
#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "norbh fhidir %s a chur in eagar; is teirminal "
+msgstr "níorbh fhéidir %s a chur in eagar; is teirminéal é"
-#: sed/execute.c:677
+#: sed/execute.c:733
#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "norbh fhidir %s a chur in eagar: n gnthcomhad "
+msgstr "níorbh fhéidir %s a chur in eagar: ní gnáthchomhad é"
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "norbh fhidir an comhad sealadach %s a oscailt: %s"
+msgstr "níorbh fhéidir an comhad sealadach %s a oscailt: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
-msgstr "earrid i bhfo-phriseas"
+msgstr "earráid i bhfo-phróiseas"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
-msgstr "nl an rogha `e' ar fil"
+msgstr "níl an rogha `e' ar fáil"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
-msgstr "nl an t-ord `e' ar fil"
+msgstr "níl an t-ordú `e' ar fáil"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "gan inchomhad"
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr "nl aon slonn ionadaochta roimh seo"
+msgstr "níl aon slonn ionadaíochta roimhe seo"
-# bunathraitheoir is in FARF - KPS
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "n fidir bunathraitheoir a shonr le slonn bn"
+msgstr "ní féidir mionathraitheoirí a shonrú le slonn bán"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "tagairt neamhbhail \\%d ar dheis ord `s'"
+msgstr "tagairt neamhbhailí \\%d ar dheis ordú `s'"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Seol tuairiscí fabhtanna chuig: <%s>.\n"
+"Cuir an focal ``%s'' áit éigin sa líne ``Subject:'' le do thoil.\n"
-#: sed/sed.c:93
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R, --regexp-perl\n"
-" bain sid as sloinn ionadaochta at ag Perl 5.\n"
+" bain úsáid as sloinn ionadaíochta atá ag Perl 5.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"sid: %s [ROGHA]... {script-mura-bhfuil-script-eile} [inchomhad]...\n"
+"Úsáid: %s [ROGHA]... {script-mura-bhfuil-script-eile} [inchomhad]...\n"
"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" stop priontil uathoibroch den sps patrin\n"
+" stop priontáil uathoibríoch den spás patrúin\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -219,7 +234,7 @@ msgstr ""
" -e script, --expression=script\n"
" cuir an script leis na horduithe le rith\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -227,19 +242,41 @@ msgid ""
"executed\n"
msgstr ""
" -f comhad-script, --file=comhad-script\n"
-" cuir na lnte i `comhad-script' leis na horduithe le rith\n"
+" cuir na línte i `comhad-script' leis na horduithe le rith\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" lean naisc shiombalacha má phróiseáiltear an comhad san\n"
+" áit a bhfuil sé\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
-" -i[IARMHR], --in-place[=IARMHR]\n"
-" cuir eagar ar comhaid san it a bhfuil siad (agus dan\n"
-" cltaca m t IARMHR tugtha\n"
+" -i[IARMHÍR], --in-place[=IARMHÍR]\n"
+" cuir eagar ar chomhaid san áit a bhfuil siad (agus déan\n"
+" cúltaca má thugtar IARMHÍR)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" oscail comhaid sa mhód dénártha (ní phróiseáiltear CR"
+"+LFanna\n"
+" ar bhealach speisialta)\n"
-#: sed/sed.c:110
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -248,25 +285,25 @@ msgstr ""
" -l N, --line-length=N\n"
" ceap an fad timfhillte le haghaidh an ordaithe `l'\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" dchumasaigh gach feabhschn GNU.\n"
+" díchumasaigh gach feabhsúchán GNU.\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
" -r, --regexp-extended\n"
-" sid sloinn ionadaochta feabhsaithe sa script.\n"
+" úsáid sloinn ionadaíochta feabhsaithe sa script.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -275,9 +312,9 @@ msgid ""
" long stream.\n"
msgstr ""
" -s, --separate\n"
-" fach ar comhaid ina leith seachas mar sruth leannach.\n"
+" féach ar chomhaid ina leith seachas mar shruth leanúnach.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -286,20 +323,21 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" ldil canta beaga na comhaid ionchur agus sruthlaigh\n"
-" na maolin aschur nos minice\n"
+" luchtaigh bloic bheaga ó na comhaid ionchuir agus "
+"sruthlaigh\n"
+" na maoláin aschuir níos minice\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr " --help taispein an chabhair seo agus irigh as\n"
+msgstr " --help taispeáin an chabhair seo agus scoir\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version taispein eolas faoin leagan agus irigh as\n"
+msgstr " --version taispeáin eolas faoin leagan agus scoir\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -310,27 +348,18 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Mura bhfuil rogha -e, --expression, -f, n --file ann, glacfar an chad\n"
-"argint nach raibh ina rogha mar an script `sed' a lirmhni. T gach\n"
-"argint eile an t-ainm de comhad ionchuir; mura bhfuil comhad ann\n"
-"ligh n ionchur caighdenach.\n"
+"Mura bhfuil rogha -e, --expression, -f, nó --file ann, glacfar an chéad\n"
+"argóint nach raibh ina rogha mar an script `sed' a léirmhíniú. Tá gach\n"
+"argóint eile an t-ainm do chomhad ionchuir; mura bhfuil comhad ann\n"
+"léigh ón ghnáth-ionchur.\n"
"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Seol tuairisc fabhtanna chuig: %s .\n"
-"Cuir an focal ``%s'' it igin sa lne ``Subject:'' le do thoil.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed, leagan %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
@@ -339,12 +368,12 @@ msgstr ""
"bunaithe ar GNU sed, leagan %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed, leagan %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -353,111 +382,127 @@ msgid ""
"to the extent permitted by law.\n"
msgstr ""
"%s\n"
-"Is saorbhogearra an romhchlr seo; fach ar an bhunchd le haghaidh\n"
-"coinnollacha cipela. Nl barnta AR BITH ann; go fi nl barnta ann\n"
-"d'INDOLTACHT n FEILINACHT DO FHEIDHM AR LEITH, an oiread at ceadaithe\n"
-"de rir dl.\n"
+"Is saorbhogearra an ríomhchlár seo; féach ar an bhunchód le haghaidh\n"
+"coinníollacha cóipeála. Níl baránta AR BITH ann; go fiú níl baránta ann\n"
+"d'INDÍOLTACHT nó FEILIÚNACHT D'FHEIDHM AR LEITH, an oiread atá ceadaithe\n"
+"de réir dlí.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, c-format
msgid "cannot remove %s: %s"
-msgstr "n fidir %s a scriosadh: %s"
+msgstr "ní féidir %s a scriosadh: %s"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, c-format
msgid "couldn't open file %s: %s"
-msgstr "norbh fhidir an comhad %s a oscailt: %s"
+msgstr "níorbh fhéidir an comhad %s a oscailt: %s"
+
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "níorbh fhéidir ceangal le %s: %s"
# Irish is nice this way, no initial mutation on 'rud'! -- KPS
# Include all three b/c I'm using template version of "Plural-Forms"
-#: lib/utils.c:220
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "norbh fhidir %d rud a scrobh i %s: %s"
-msgstr[1] "norbh fhidir %d rud a scrobh i %s: %s"
-msgstr[2] "norbh fhidir %d rud a scrobh i %s: %s"
-msgstr[3] "norbh fhidir %d rud a scrobh i %s: %s"
+msgstr[0] "níorbh fhéidir %d rud a scríobh i %s: %s"
+msgstr[1] "níorbh fhéidir %d rud a scríobh i %s: %s"
+msgstr[2] "níorbh fhéidir %d rud a scríobh i %s: %s"
+msgstr[3] "níorbh fhéidir %d rud a scríobh i %s: %s"
+msgstr[4] "níorbh fhéidir %d rud a scríobh i %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
-msgstr "earrid ag lamh %s: %s"
+msgstr "earráid ag léamh %s: %s"
+
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "níorbh fhéidir nasc siombalach %s a leanúint: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "ní féidir %s a 'stat': %s"
-#: lib/utils.c:341
+#: sed/utils.c:438
#, c-format
msgid "cannot rename %s: %s"
-msgstr "n fidir %s a athainmni: %s"
+msgstr "ní féidir %s a athainmniú: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
-msgstr "Bua!"
+msgstr "D'éirigh leis"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
-msgstr "Nl a leithid ann"
+msgstr "Níl a leithéid ann"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
-msgstr "Slonn ionadaochta neamhbhail"
+msgstr "Slonn ionadaíochta neamhbhailí"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
-msgstr "Carachtar cimheasa neamhbhail"
+msgstr "Carachtar neamhbhailí comhordaithe"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
-msgstr "Aicme charachtair neamhbhail"
+msgstr "Ainm neamhbhailí ar aicme charachtar"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
-msgstr "Clslais ag deireadh"
+msgstr "Cúlslais ag deireadh"
# coinage - KPS
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
-msgstr "Cltagairt neamhbhail"
+msgstr "Cúltagairt neamhbhailí"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
-msgstr "[ n [^ corr"
+msgstr "[ nó [^ corr"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
-msgstr "( n \\( corr"
+msgstr "( nó \\( corr"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "\\{ corr"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
-msgstr "bhar neamhbhail idir \\{\\}"
+msgstr "Ábhar neamhbhailí idir \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
-msgstr "Deireadh raoin neamhbhail"
+msgstr "Deireadh raoin neamhbhailí"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
-msgstr "Cuimhne dithe"
+msgstr "Cuimhne ídithe"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
-msgstr "Is neamhbhail an slonn ionadaochta roimh seo"
+msgstr "Is neamhbhailí an slonn ionadaíochta roimhe seo"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
-msgstr "Deireadh le slonn ionadaochta gan choinne"
+msgstr "Deireadh le slonn ionadaíochta gan choinne"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
-msgstr "Slonn ionadaochta rmhr"
+msgstr "Slonn ionadaíochta rómhór"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
-msgstr ") n \\) corr"
+msgstr ") nó \\) corr"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
-msgstr "Nl aon slonn ionadaochta roimh seo"
+msgstr "Níl aon slonn ionadaíochta roimhe seo"
diff --git a/po/gl.gmo b/po/gl.gmo
index e73bc62..423e46f 100644
--- a/po/gl.gmo
+++ b/po/gl.gmo
Binary files differ
diff --git a/po/gl.po b/po/gl.po
index dd62411..4b66d23 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -1,204 +1,205 @@
# Galician translation of GNU sed
# Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
# Jacobo Tarro Barreiro <jtarrio@trasno.net>, 1999, 2002.
+# Francisco Javier Tsao Santn <tsao@enelparaiso.org>, 2008.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2002-10-25 15:57+0200\n"
-"Last-Translator: Jacobo Tarro Barreiro <jtarrio@trasno.net>\n"
-"Language-Team: Galician <gpul-traduccion@ceu.fi.udc.es>\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-09-18 08:35+0200\n"
+"Last-Translator: Francisco Javier Tsao Santn <tsao@enelparaiso.org>\n"
+"Language-Team: Galician <proxecto@trasno.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n!=1;\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "Mltiples `!'s"
+msgstr "mltiples `!'s"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "`,' inesperada"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "Non se pode usar +N ou ~N como primeira direccin"
+msgstr "non se pode usar +N ou ~N como primeira direccin"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "`{' sen parella"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "`}' inesperado"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Caracteres extra despois da instruccin"
+msgstr "caracteres extra despois da instruccin"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "Esperbase \\ despois de `a', `c' ou `i'"
+msgstr "esperbase \\ despois de `a', `c' ou `i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' non acepta un enderezo"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": non acepta un enderezo"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "Os comentarios non aceptan enderezos"
+msgstr "os comentarios non aceptan enderezos"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr "Falta unha instruccin"
+msgstr "falta unha instruccin"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "A instruccin s usa un enderezo"
+msgstr "a instruccin s usa un enderezo"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "Expresin regular de enderezo non rematada"
+msgstr "expresin regular de enderezo non rematada"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "Instruccin `s' non rematada"
+msgstr "instruccin `s' non rematada"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "Instruccin `y' non rematada"
+msgstr "instruccin `y' non rematada"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "Opcin de `s' descoecida"
+msgstr "opcin de `s' descoecida"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "mltiples opcins `p' para a instruccin `s'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "mltiples opcins `g' para a instruccin `s'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "mltiples opcins numricas para a instruccin `s'"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "unha opcin numrica para a instruccin `s' non pode ser cero"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "as cadeas para a instruccin y teen lonxitudes diferentes"
+msgstr "as cadeas para a instruccin `y' teen lonxitudes diferentes"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "o carcter delimitador non un carcter de byte simple"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr ""
+msgstr "se esperaba unha versin de sed mis nova"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Uso non vlido de modificador de direccin"
+msgstr "uso non vlido da direccin de lia 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Instruccin descoecida:"
+msgstr "instruccin descoecida:`%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: ficheiro %s lia %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresin #%lu, carcter %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "Non se puido atopa-la etiqueta para saltar a `%s'"
+msgstr "non se puido atopa-la etiqueta para saltar a `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: non se puido ler %s: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Non se puido abri-lo ficheiro %s: %s"
+msgstr "non se puido editar %s: unha terminal"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Non se puido abri-lo ficheiro %s: %s"
+msgstr "non se puido editar %s: non un ficheiro regular"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Non se puido abri-lo ficheiro %s: %s"
+msgstr "non se puido abri-lo ficheiro temporal %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "erro no subproceso"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "a opcin `e' non est soportada"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "o comando `e' non est soportado"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "non hai ficheiros de entrada"
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr "Non hai unha expresin regular anterior"
+msgstr "non hai unha expresin regular anterior"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "Non se poden especificar modificadores nunha expresin regular baleira"
+msgstr "non se poden especificar modificadores nunha expresin regular baleira"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Referencia \\%d non vlida no lado dereito do comando `s'"
+msgstr "referencia \\%d non vlida no lado dereito do comando `s'"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Informe dos erros no programa a: <%s>.\n"
+"Informe dos erros na traduccin a tsao@enelparaiso.org .\n"
+"Asegrese de inclu-la palabra ``%s'' nalgunha parte do campo ``Subject:''.\n"
-#: sed/sed.c:93
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -207,67 +208,103 @@ msgstr ""
" usa-la sintaxe de expresins regulares de Perl 5 no "
"script.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Uso: %s [OPCIN]... {script-s-sen-outro-script} [ficheiro-de-entrada]...\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" suprime a visualizacin automtica do espacio de "
+"patrns\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+"-e script, --expression=script\n"
+" engade script s instruccins que sern executadas\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, 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 ficheiro-de-script, --file=ficheiro-de-script\n"
+" engade o contido do ficheiro do script s instruccins que "
+"sern executadas\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" segue ligazns simblicas cando se procesan no seu sitio\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[SUFIXO], --in-place[=SUFIXO]\n"
+" edita ficheiros no seu sitio (facendo copia de seguridade "
+"se se indica un sufixo)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" ficheiros abertos en modo binario (non se procesan de xeito "
+"especial CR+LFs)\n"
-#: sed/sed.c:110
+#: sed/sed.c:144
#, 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"
+" especifica a lonxitude de axuste da lia desexado para a "
+"instruccin `l' \n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" desactiva tdalas extensins GNU.\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" usa-la sintaxe de expresins regulares de Perl 5 no "
-"script.\n"
+" -r, --regexp-extended\n"
+" usa a sintaxe extendida de expresins regulares no script.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -275,8 +312,11 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" trata os ficheiros coma separados no canto de coma unha\n"
+" longa tira de caracteres continua.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -284,18 +324,21 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered \n"
+" carga cantidades mnimas de datos dos ficheiros de entrada\n"
+" e baleira os buffers de sada mis decote\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help amosa esta axuda e sae\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version amosa-la informacin da versin e sar\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -305,35 +348,36 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Se non se indican as opcins -e, --expression, -f ou --file, entn o "
+"primeiro\n"
+"argumento que non unha opcin tmase como o script sed para interpretar. "
+"Tdolos\n"
+"argumentos restantes son nomes de ficheiros de entrada; se non se "
+"especifican\n"
+"ficheiros de entrada, entn se le a entrada standard.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Informe dos erros no programa a %s .\n"
-"Informe dos erros na traduccin a gpul-traduccion@ceu.fi.udc.es .\n"
-"Asegrese de inclu-la palabra ``%s'' nalgunha parte do campo ``Subject:''.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed versin %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
-msgstr "baseado en GNU sed versin 3.02.80\n"
+msgstr ""
+"baseado en GNU sed versin %s\n"
+"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed versin %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -348,101 +392,116 @@ msgstr ""
"DETERMINADO,\n"
"ata o que permite a lei.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: non se puido ler %s: %s\n"
+msgstr "non se puido borrar %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr "Non se puido abri-lo ficheiro %s: %s"
+msgstr "non se puido abri-lo ficheiro %s: %s"
+
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "non se puido adxuntar elemento en %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d 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"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "erro de lectura en %s: %s"
-#: lib/utils.c:341
-#, fuzzy, c-format
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "non se puido segui-la ligazn simblica %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "non se puido ler %s: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: non se puido ler %s: %s\n"
+msgstr "non se puido renomear %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "xito"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Non se atopou"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Expresin regular non vlida"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Carcter de ordeamento non vlido"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Nome de clase de caracteres non vlido"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Barra invertida fin de lia"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Referencia cara a atrs non vlida"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "[ ou [^ sen parella"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "( ou \\( sen parella"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "\\{ sen parella"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Contido de \\{\\} non vlido"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Fin de rango non vlida"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Memoria esgotada"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Expresin regular anterior non vlida"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Fin prematura da expresin regular"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Expresin regular grande de mis"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr ") ou \\) sen parella"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Non hai unha expresin regular anterior"
diff --git a/po/he.gmo b/po/he.gmo
index 19cf09f..2f0d7c2 100644
--- a/po/he.gmo
+++ b/po/he.gmo
Binary files differ
diff --git a/po/he.po b/po/he.po
index 5140626..81811ad 100644
--- a/po/he.po
+++ b/po/he.po
@@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: sed 3.02.80\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
"PO-Revision-Date: 2001-08-04 20:37+0300\n"
"Last-Translator: Eli Zaretskii <eliz@gnu.org>\n"
"Language-Team: Hebrew <eliz@gnu.org>\n"
@@ -14,214 +14,230 @@ msgstr ""
"Content-Type: text/plain; charset=ISO-8859-8\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
#, fuzzy
msgid "multiple `!'s"
msgstr "`!' "
-#: sed/compile.c:163
+#: sed/compile.c:162
#, fuzzy
msgid "unexpected `,'"
msgstr "- `,'"
-#: sed/compile.c:164
+#: sed/compile.c:163
#, fuzzy
msgid "invalid usage of +N or ~N as first address"
msgstr " ~N +N- "
-#: sed/compile.c:165
+#: sed/compile.c:164
#, fuzzy
msgid "unmatched `{'"
msgstr "- `{'"
-#: sed/compile.c:166
+#: sed/compile.c:165
#, fuzzy
msgid "unexpected `}'"
msgstr "- `}'"
-#: sed/compile.c:167
+#: sed/compile.c:166
#, fuzzy
msgid "extra characters after command"
msgstr " "
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr ""
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr " `}'"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr " :"
-#: sed/compile.c:171
+#: sed/compile.c:170
#, fuzzy
msgid "comments don't accept any addresses"
msgstr " "
-#: sed/compile.c:172
+#: sed/compile.c:171
#, fuzzy
msgid "missing command"
msgstr " "
-#: sed/compile.c:173
+#: sed/compile.c:172
#, fuzzy
msgid "command only uses one address"
msgstr " "
-#: sed/compile.c:174
+#: sed/compile.c:173
#, fuzzy
msgid "unterminated address regex"
msgstr " "
-#: sed/compile.c:175
+#: sed/compile.c:174
#, fuzzy
msgid "unterminated `s' command"
msgstr " `s' "
-#: sed/compile.c:176
+#: sed/compile.c:175
#, fuzzy
msgid "unterminated `y' command"
msgstr " `y' "
-#: sed/compile.c:177
+#: sed/compile.c:176
#, fuzzy
msgid "unknown option to `s'"
msgstr "`s' - "
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "`s' `p' "
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "`s' `g' "
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "`s' "
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr " `s' "
-#: sed/compile.c:182
+#: sed/compile.c:181
#, fuzzy
msgid "strings for `y' command are different lengths"
msgstr " `y' "
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:185
+#: sed/compile.c:184
#, fuzzy
msgid "invalid usage of line address 0"
msgstr " "
-#: sed/compile.c:186
+#: sed/compile.c:185
#, fuzzy, c-format
msgid "unknown command: `%c'"
msgstr "- "
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s (%s %lu ) %s \n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, 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:1664
#, fuzzy, c-format
msgid "can't find label for jump to `%s'"
msgstr " `%s' "
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s %s (%s) \n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "%s "
+msgstr ""
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "%s "
+msgstr ""
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "%s "
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr ""
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+" .<%s> (bugs) \n"
+" .(``Subject'') ``'' ``%s'' \n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -229,35 +245,50 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -266,7 +297,7 @@ msgid ""
" long stream.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -275,17 +306,17 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -296,33 +327,24 @@ msgid ""
"\n"
msgstr ""
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-" .%s (bugs) \n"
-" .(``Subject'') ``'' ``%s'' \n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr ""
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr ""
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -335,105 +357,182 @@ msgstr ""
" , ; \n"
" . \n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, fuzzy, c-format
msgid "cannot remove %s: %s"
msgstr "%s %s (%s) \n"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, fuzzy, c-format
msgid "couldn't open file %s: %s"
msgstr "%s "
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "%s- (%s) "
+
+#: sed/utils.c:240
#, fuzzy, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] " %d %s- (%s) "
msgstr[1] " %d %s- (%s) "
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "%s (%s) "
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "%s- (%s) "
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "%s %s (%s) \n"
+
+#: sed/utils.c:438
#, fuzzy, c-format
msgid "cannot rename %s: %s"
msgstr "%s %s (%s) \n"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr ""
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr ""
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr ""
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr ""
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr ""
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr ""
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr ""
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
#, fuzzy
msgid "Unmatched [ or [^"
msgstr "- `{'"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
#, fuzzy
msgid "Unmatched ( or \\("
msgstr "- `{'"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
#, fuzzy
msgid "Unmatched \\{"
msgstr "- `{'"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr ""
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr ""
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr ""
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr ""
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr ""
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr ""
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
#, fuzzy
msgid "Unmatched ) or \\)"
msgstr "- `{'"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr ""
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "%s \n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr " "
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "(%x) - pushback savchar() "
+
+#~ msgid "input read error: %s"
+#~ msgstr " (%s) "
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "- : "
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "%c : "
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -u, --unbuffered\n"
+#~ "\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "%s []... {---} [ ]... : \n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " \n"
+#~ " -e script, --expression=script\n"
+#~ " script \n"
+#~ " -f script-file, --file=script-file\n"
+#~ " script-file \n"
+#~ " -l N, --line-length=N\n"
+#~ " N \n"
+#~ " -u, --unbuffered\n"
+#~ "\n"
+#~ " --help\n"
+#~ " -V, --version\n"
+#~ "\n"
+#~ " ,--file ,-f ,--expression ,-e \n"
+#~ " . sed \n"
+#~ " . , ; \n"
+#~ "\n"
diff --git a/po/hr.gmo b/po/hr.gmo
index 1e7a484..9867daf 100644
--- a/po/hr.gmo
+++ b/po/hr.gmo
Binary files differ
diff --git a/po/hr.po b/po/hr.po
index e5d9552..f5af307 100644
--- a/po/hr.po
+++ b/po/hr.po
@@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: sed 3.02a\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
"PO-Revision-Date: 2002-06-14 15:17-01\n"
"Last-Translator: Denis Lackovic <delacko@fly.srk.fer.hr>\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
@@ -16,215 +16,231 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n==1?0:1);\n"
"X-Generator: TransDict server\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
#, fuzzy
msgid "multiple `!'s"
msgstr "Višestruki `!'"
-#: sed/compile.c:163
+#: sed/compile.c:162
#, fuzzy
msgid "unexpected `,'"
msgstr "Neočekivani `,'"
-#: sed/compile.c:164
+#: sed/compile.c:163
#, fuzzy
msgid "invalid usage of +N or ~N as first address"
msgstr "Ne mogu koristiti +N ili ~N kao prvu adresu"
-#: sed/compile.c:165
+#: sed/compile.c:164
#, fuzzy
msgid "unmatched `{'"
msgstr "Neuparena `{'"
-#: sed/compile.c:166
+#: sed/compile.c:165
#, fuzzy
msgid "unexpected `}'"
msgstr "Neočekivana `}'"
-#: sed/compile.c:167
+#: sed/compile.c:166
#, fuzzy
msgid "extra characters after command"
msgstr "Višak znakova nakon komande"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr ""
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' ne želi nikakve adrese"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": ne želi nikakve adrese"
-#: sed/compile.c:171
+#: sed/compile.c:170
#, fuzzy
msgid "comments don't accept any addresses"
msgstr "Komentari ne primaju adrese"
-#: sed/compile.c:172
+#: sed/compile.c:171
#, fuzzy
msgid "missing command"
msgstr "Nedostaje naredba"
-#: sed/compile.c:173
+#: sed/compile.c:172
#, fuzzy
msgid "command only uses one address"
msgstr "Naredba koristi samo jednu adresu"
-#: sed/compile.c:174
+#: sed/compile.c:173
#, fuzzy
msgid "unterminated address regex"
msgstr "Nezavršeni regularni izraz adrese"
-#: sed/compile.c:175
+#: sed/compile.c:174
#, fuzzy
msgid "unterminated `s' command"
msgstr "Nezavršena `s' naredba"
-#: sed/compile.c:176
+#: sed/compile.c:175
#, fuzzy
msgid "unterminated `y' command"
msgstr "Nezavršena `y' naredba"
-#: sed/compile.c:177
+#: sed/compile.c:176
#, fuzzy
msgid "unknown option to `s'"
msgstr "Nepoznata opcija za `s'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "višestruke `p' opcije za `s' naredbu"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "višestruke `g' opcije za `s' naredbu"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "višak opcija za za `s' naredbu"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "broj opcija za naredbu `s' ne smije biti nula"
-#: sed/compile.c:182
+#: sed/compile.c:181
#, fuzzy
msgid "strings for `y' command are different lengths"
msgstr "znakovni nizovi za naredbu y su različitih duljina"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:185
+#: sed/compile.c:184
#, fuzzy
msgid "invalid usage of line address 0"
msgstr "Neispravna uporaba adresnog modifikatora"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, fuzzy, c-format
msgid "unknown command: `%c'"
msgstr "Nepoznata naredba:"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: datoteka %s redak %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, 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:1664
#, fuzzy, c-format
msgid "can't find label for jump to `%s'"
msgstr "Ne mogu naći labelu na koju bi trebalo skočiti `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: ne mogu čitati %s: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Ne mogu otvoriti datoteku %s"
+msgstr ""
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Ne mogu otvoriti datoteku %s"
+msgstr ""
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Ne mogu otvoriti datoteku %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:41
#, fuzzy
msgid "no previous regular expression"
msgstr "Nedostaje prethodni regularni izraz"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr ""
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"E-mail bug prijave (na engleskom) pošaljite na: <%s>.\n"
+"Uključite riječ ``%s'' u polju ``Subject:''.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -232,35 +248,50 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -269,7 +300,7 @@ msgid ""
" long stream.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -278,17 +309,17 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -299,33 +330,24 @@ msgid ""
"\n"
msgstr ""
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"E-mail bug prijave (na engleskom) pošaljite na: %s .\n"
-"Uključite riječ ``%s'' u polju ``Subject:''.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr ""
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr ""
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -339,109 +361,180 @@ msgstr ""
" NEMA garancije;\n"
"čak ni tvrdnje o ISPLATIVOSTI ili POGODNOSTI ZA NEKU SVRHU.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, fuzzy, c-format
msgid "cannot remove %s: %s"
msgstr "%s: ne mogu čitati %s: %s\n"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, fuzzy, c-format
msgid "couldn't open file %s: %s"
msgstr "Ne mogu otvoriti datoteku %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "Ne mogu upisati %d item%s u %s: %s"
+
+#: sed/utils.c:240
#, fuzzy, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "Ne mogu upisati %d item%s u %s: %s"
msgstr[1] "Ne mogu upisati %d item%s u %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "Greška u čitanju na %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr ""
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "%s: ne mogu čitati %s: %s\n"
+
+#: sed/utils.c:438
#, fuzzy, c-format
msgid "cannot rename %s: %s"
msgstr "%s: ne mogu čitati %s: %s\n"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr ""
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr ""
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
#, fuzzy
msgid "Invalid regular expression"
msgstr "Nedostaje prethodni regularni izraz"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr ""
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr ""
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr ""
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr ""
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
#, fuzzy
msgid "Unmatched [ or [^"
msgstr "Neuparena `{'"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
#, fuzzy
msgid "Unmatched ( or \\("
msgstr "Neuparena `{'"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
#, fuzzy
msgid "Unmatched \\{"
msgstr "Neuparena `{'"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr ""
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr ""
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr ""
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
#, fuzzy
msgid "Invalid preceding regular expression"
msgstr "Nedostaje prethodni regularni izraz"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
#, fuzzy
msgid "Premature end of regular expression"
msgstr "Nedostaje prethodni regularni izraz"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
#, fuzzy
msgid "Regular expression too big"
msgstr "Nedostaje prethodni regularni izraz"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
#, fuzzy
msgid "Unmatched ) or \\)"
msgstr "Neuparena `{'"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Nedostaje prethodni regularni izraz"
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "neispravan regularni izraz: %s\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Neočekivani kraj datoteke"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "Pozvao savchar() sa neočekivanim rezultatom (%x)"
+
+#~ msgid "input read error: %s"
+#~ msgstr "greška pri čitanju ulaza: %s"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "INTERNA GREŠKA: neispravan tip adrese"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "INTERNA GREŠKA: Neispravna naredba %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Uporaba: %s [OPCIJA]... {skripta-samo-ako-nema-druge-skripte} [ulazna-"
+#~ "datoteka]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suzbij ispis uzoraka\n"
+#~ " -e script, --expression=script\n"
+#~ " dodaj skriptu naredbama koje treba izvršiti\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " dodaj sadržaj skriptne-datoteke naredbi koju treba "
+#~ "izvršiti\n"
+#~ " --help prikaži ovu pomoć i izađi\n"
+#~ " -V, --version ispiši informacije o inačici i izađi\n"
+#~ "\n"
+#~ "Ako nema -e, --expression, -f, ili --file opcije, tada se uzima prvi\n"
+#~ "argument koji nije opcija kao sed skripta koju treba protumačiti. Svi\n"
+#~ "preostali argumenti su imena ulaznih datoteka; ako nema ulaznih datoteka\n"
+#~ "tada se cita standardni ulaz.\n"
+#~ "\n"
diff --git a/po/hu.gmo b/po/hu.gmo
index 6449940..f5ebcab 100644
--- a/po/hu.gmo
+++ b/po/hu.gmo
Binary files differ
diff --git a/po/hu.po b/po/hu.po
index 7979521..7cedc41 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -1,13 +1,13 @@
-# Hungarian translation of GNU sed
+# A GNU sed magyar fordtsa
# Copyright (C) 2002 Free Software Foundation, Inc.
-# Gbor Istvn <stive@mezobereny.hu>, 2002.
-# Mihly Gyulai <gyulai@fbi.hu>, 2003.
+# Mihly Gyulai <gyulai@fbi.hu>, 2003,2004.
+# First translator: Gbor Istvn <stive@mezobereny.hu>, 2002.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.0.8\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2003-10-26 09:28+0100\n"
+"Project-Id-Version: sed 4.1.1\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2004-07-20 18:49+0200\n"
"Last-Translator: Mihly Gyulai <gyulai@fbi.hu>\n"
"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
@@ -15,190 +15,189 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr "Tbb `!'"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "Vratlan `,'"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "Nem lehet hasznlni a +N-t vagy ~N-t elso cmknt"
+msgstr "Nem lehet hasznlni a +N-t vagy ~N-t els cmknt"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "Nincs prban `{'"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "Nincs prban `}'"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Extra karakterek a parancs utn "
+msgstr "Extra karakterek a parancs utn"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr "`a', `c' vagy `i' parancs utn \\ szksges"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' nem ignyel cmzst"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": nem ignyel cmzst"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr "Megjegyzsben nem lehet cmzs"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
msgstr "Hinyz parancs"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
msgstr "A parancs csak egy cmzst hasznl"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
msgstr "Befejezetlen regex cm"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
msgstr "Befejezetlen `s' parancs"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
msgstr "Befejezetlen `y' parancs"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
msgstr "Ismeretlen `s' opci"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "tbbszrs `p' opci, `s' parancs mellett"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "tbbszrs `g' opci, `s' parancs mellett"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "tbbszrs szm opci, `s' parancs mellett"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "a(z) `s' parancs szm opcija nem lehet nulla"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr "a(z) `y' parancs szvegeinek hossza klnbz"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "az elvlaszt karakter nem egy bjtbl ll"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "a 'sed' program jabb verzijra van szksg"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "A parancs csak egy cmzst hasznl"
+msgstr "rvnytelen 0 cmzs"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Ismeretlen parancs:"
+msgstr "Ismeretlen parancs: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fjl %s sor %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e kifejezs #%lu, karakter %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
msgstr "Az ugrshoz (`%s') nem tallom a cmkt"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nem lehet olvasni %s: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Nem lehet megnyitni a(z) %s fjlt: %s"
+msgstr "nem lehet szerkeszteni (%s): terminl"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Nem lehet megnyitni a(z) %s fjlt: %s"
+msgstr "nem lehet szerkeszteni (%s): nem szablyos fjl"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "Nem lehet megnyitni az tmeneti fjlt: %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "hiba az alfolyamatban"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "az `e' opci nincs tmogatva"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "az `e' parancs nincs tmogatva"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr "Nincsen elz regulris kifejezs"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr "Nem lehet mdostt megadni res regulris kifejezshez"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "Hibs hivatkozs (\\%d) a(z) `s' parancs RHS-re"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"A fordtsi hibkat krem a gyulai@fbi.hu cmre kldeni. \n"
+"Angolul ide lehet a hibkrl rni: <%s>. A levl \"Trgy:\" mezejben \n"
+"legyen ott a `%s' sz.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -206,66 +205,97 @@ msgstr ""
" -R --regexp-perl\n"
" Perl 5 regulris kifejezs nyelvtannak hasznlata.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Hasznlat: %s [OPCI]... {hjprogram} [bemeneti fjl]...\n"
+"\n"
-#: sed/sed.c:102
-#, c-format
+#: sed/sed.c:128
+#, fuzzy, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" minta nyomtatsnak mellzse\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e hjprogram, --expression=hjprogram\n"
+" hjprogram hozzadsa a vgrehajtand parancsokhoz\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
" add the contents of script-file to the commands to be "
"executed\n"
msgstr ""
+" -f, hjprogram, --file=hjprogram\n"
+" a megadott hjprogram hozzadsa a vgrehajtand "
+"parancsokhoz\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[SZUFFIX], --in-place[=SZUFFIX]\n"
+" fjlok szerkesztse a megadott helyen (ha van szuffix, akkor\n"
+" ments is kszl)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
+" -l N, --line-length=N\n"
+" sor-hossz megadsa az `l' parancshoz\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" a GNU bvtsek kikapcsolsa\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R --regexp-perl\n"
-" Perl 5 regulris kifejezs nyelvtannak hasznlata.\n"
+" -r, --regexp-extended\n"
+" kiterjesztett regulris kifejezsek hasznlata.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -273,8 +303,10 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" a fjlokat kln kezeljk, egyetlen folyamatos adatfolyam helyett\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -282,18 +314,21 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" kevs adat betltse a bemeneti fjlokbl s a kimeneti pufferek\n"
+" gyakori rtse\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help kirja ezt az oldalt s kilp\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version kirja a programverzit s kilp\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -303,36 +338,33 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Ha nincs megadva -e, --expression, -f vagy --file opci, akkor az els\n"
+"nem-opci paramtert hjprogramnak tekintjk. Minden tovbbi paramter\n"
+"fjlnvnek szmt. Ha nincs megadva fjlnv, akkor a szoksos bemenetrl\n"
+"olvas.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"A fordtsi hibkat krem a gyulai@fbi.hu cmre kldeni. \n"
-"Angolul ide: %s . A levl Trgy mezejben legyen ott a `%s' sz.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed verzi %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"A GNU 3.02.80-as sed verzin alapszik\n"
+"A GNU %s sed verzin alapszik\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed verzi %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -341,106 +373,120 @@ msgid ""
"to the extent permitted by law.\n"
msgstr ""
"%s\n"
-"Ez egy ingyenes szmtgpes program. A forrsban megtallhatk a msols "
-"felttelei.\n"
+"Ez egy ingyenes szmtgpes program. A forrsban megtallhatk a \n"
+"programterjeszts felttelei.\n"
"SEMMILYEN garancit nem vllalunk, mg azt sem lltjuk, hogy ez a program\n"
"KERESKEDELMI CLOKRA ALKALMAS vagy HASZNLHAT EGY ADOTT FELADATRA.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: nem lehet olvasni %s: %s\n"
+msgstr "nem lehet trlni %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
msgstr "Nem lehet megnyitni a(z) %s fjlt: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "nem tudom a(z) %d elemet ide rni %s: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "nem tudom a(z) %d elemet ide rni %s: %s"
-msgstr[1] "nem tudom a(z) %d elemeket ide rni %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "olvassi hiba %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "Nem lehet megnyitni a(z) %s fjlt: %s"
+
+#: sed/utils.c:407
#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "nem lehet tnevezni %s: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: nem lehet olvasni %s: %s\n"
+msgstr "nem lehet tnevezni %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Sikeres"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Nincs tallat"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Hibs regulris kifejezs"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "rvnytelen sszehasonlt karakter"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "rvnytelen karakterosztly-nv"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Lezr visszaperjel"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "rvnytelen vissza-hivatkozs"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Nincs prban [ vagy [^"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Nincs prban ( vagy \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Nincs prban \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "\\{\\}-nak rvnytelen a tartalma"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Sorozat rvnytelen vge"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Kevs a memria"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "rvnytelen megelz regulris kifejezs"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Regulris kifejezs tl korai vge"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Tl nagy regulris kifejezs"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Nincs prban ) vagy \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Nincsen elz regulris kifejezs"
diff --git a/po/id.gmo b/po/id.gmo
index 029d4b2..585a866 100644
--- a/po/id.gmo
+++ b/po/id.gmo
Binary files differ
diff --git a/po/id.po b/po/id.po
index 352213e..2965333 100644
--- a/po/id.po
+++ b/po/id.po
@@ -1,206 +1,205 @@
# translation of sed-4.0.9.id.po to Indonesian
# sed 4.0.9 (Indonesian)
# Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
# Tedi Heriyanto <tedi_h@gmx.net>, 2002, 2003, 2004.
+# Arif E. Nugroho <arif_endro@yahoo.com>, 2008.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.0.9\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2004-04-27 14:56+0700\n"
-"Last-Translator: Tedi Heriyanto <tedi_h@gmx.net>\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-11-09 20:15+0700\n"
+"Last-Translator: Arif E. Nugroho <arif_endro@yahoo.com>\n"
"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: KBabel 1.3\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "`!' ganda"
+msgstr "multiple `!'"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr "`,' tidak diharapkan"
+msgstr "tidak diduga `,'"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "Tidak dapat menggunakan +N atau ~N sebagai alamat pertama"
+msgstr "penggunaan tidak valid dari +N atau ~N sebagai alamat pertama"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr "`{' tidak sesuai"
+msgstr "tidak cocok `{'"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr "`}' tidak diharapkan"
+msgstr "tidak diduga `}'"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Karakter tambahan setelah perintah"
+msgstr "karakter tambahan setelah perintah"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "Diharapkan \\ setelah `a', `c' atau `i'"
+msgstr "diharapkan \\ setelah `a', `c' atau `i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
-msgstr "`}' tidak menginginkan alamat"
+msgstr "`}' tidak menginginkan alamat apapun"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
-msgstr ": tidak menginginkan alamat"
+msgstr ": tidak menginginkan alamat apapun"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "Komentar tidak menerima alamat"
+msgstr "komentar tidak menerima alamat apapun"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr "Perintah hilang"
+msgstr "perintah hilang"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "Perintah hanya menggunakan satu alamat"
+msgstr "perintah hanya menggunakan satu alamat"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "Alamat regex yang tidak selesai"
+msgstr "alamat regex yang tidak selesai"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "Perintah `s' tidak selesai"
+msgstr "perintah `s' tidak selesai"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "Perintah `y' tidak selesai"
+msgstr "perintah `y' tidak selesai"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "Opsion tidak dikenal bagi `s'"
+msgstr "opsi `s' tidak diketahui"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
-msgstr "opsion `p' ganda bagi perintah `s'"
+msgstr "multiple opsi `p' untuk perintah `s'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
-msgstr "opsion `g' ganda bagi perintah `s'"
+msgstr "multiple opsi `g' untuk perintah `s'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
-msgstr "opsion beragam untuk perintah `s'"
+msgstr "multiple jumlah opsi untuk perintah `s'"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
-msgstr "opsion angka untuk perintah `s' tidak boleh nol"
+msgstr "jumlah opsi untuk perintah `s' tidak boleh nol"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "string untuk perintah y dalam panjang yang berbeda"
+msgstr "string untuk perintah `y' memiliki panjang berbeda"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "karakter pembatas bukan sebuah karakter byte-tunggal"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr "mengharapkan versi baru sed"
+msgstr "diduga versi baru sed"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Penggunaan modifier alamat yang tidak valid"
+msgstr "penggunaan tidak dari baris alamat 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Perintah tidak dikenal:"
+msgstr "perintah: `%c' tidak dikenal"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
-msgstr "%s: file %s baris %lu: %s\n"
+msgstr "%s: berkas %s baris %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e ekspresi #%lu, char %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
msgstr "Tidak dapat menemukan label untuk melompat ke `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: tidak dapat membaca %s: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Tidak dapat membuka file %s %s"
+msgstr "tidak dapat mengubah %s: adalah sebuah terminal"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Tidak dapat membuka file %s %s"
+msgstr "tidak dapat mengubah %s: bukan berkas regular"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Tidak dapat membuka file temporer %s %s"
+msgstr "Tidak dapat membuka berkas sementara %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "kesalahan dalam subproses"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
-msgstr "option `e' tidak didukung"
+msgstr "optsi `e' tidak didukung"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "perintah `e' tidak didukung"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "tidak ada berkas masukan"
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr "Tidak ada reguler ekspresi sebelumnya"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "Tidak dapat menspesifikasikan modified pada regexp kosong"
+msgstr "Tidak dapat menspesifikasikan pemodifikasi pada regexp kosong"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Referensi tidak valid \\%d pada perintah `s' RHS"
+msgstr "referensi tidak valid \\%d pada perintah `s' RHS"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
-#: sed/sed.c:93
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Laporkan bug ke email: <%s>.\n"
+"Pastikan untuk menyertakan kata \"%s\" di field \"Subject:\".\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -208,66 +207,104 @@ msgstr ""
" -R, --regexp-perl\n"
" gunakan sintaks reguler ekspresi Perl 5 dalam skrip.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Penggunaan: %s [OPSI]... {hanya-script-jika-tidak-ada-script-lain} [berkas-"
+"masukan]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" tekan penampilan otomatis dari pola ruang\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e script, --expression=script\n"
+" tambahkan script ke perintah untuk dijalankan\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, 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 berkas-script, --file=berkas-script\n"
+" tambahkan isi dari berkas-script ke perintah yang akan "
+"dijalankan\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" ikuti symlinks ketika pemrosesan di tempat\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[AKHIRAN], --in-place[=AKHIRAN]\n"
+" ubah berkas di tempat (buat backup jika ekstensi "
+"diberikan)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" buka berkas dalam mode binari (CR+LF tidak diproses secara "
+"spesial)\n"
-#: sed/sed.c:110
+#: sed/sed.c:144
#, 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"
+" spesifikasikan panjang line-wrap yang diinginkan untuk "
+"perintah `l'\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" non-aktifkan seluruh ekstensi GNU.\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" gunakan sintaks reguler ekspresi Perl 5 dalam skrip.\n"
+" -r, --regexp-extended\n"
+" gunakan ekspresi ekstensi regular dalam skrip.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -275,8 +312,12 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" pertimbangkat berkas sebagai terpisah daripa sebagai "
+"sebuah\n"
+" stream tunggal panjang berkelanjutan.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -284,18 +325,22 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" load jumlah minimal dari data dari berkas masukan dan "
+"flush\n"
+" buffer keluaran lebih sering\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help tampilkan pesan bantuan dan keluar\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version keluarkan informasi versi dan keluar\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -305,36 +350,34 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Jika tidak ada opsi -e, --expression, -f, atau -f diberikan, maka argumen\n"
+"bukan-opsi pertama diambil sebagai script yang akan diinterpretasikan.\n"
+"Seluruh argumen yang tersisa adalah nama dari berkas masukan; jika tidak "
+"ada\n"
+"berkas masukan yang dispesifikasikan, maka standar masukan yang dibaca.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Email laporan kesalahan ke: %s \n"
-"Pastikan untuk menyertakan kata \"%s\" di field \"Subject:\".\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed versi %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"berdasarkan pada GNU sed versi 3.02.80\n"
+"berdasarkan pada GNU sed versi %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed versi %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -343,105 +386,201 @@ msgid ""
"to the extent permitted by law.\n"
msgstr ""
"%s\n"
-"This is free software; see the source for copying conditions. There is NO\n"
-"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\n"
-"to the extent permitted by law.\n"
+"Ini adalah aplikasi bebas; lihat kode program untuk persyaratan penyalinan.\n"
+"TIDAK ADA garansi disini; bahkan untuk DIPERDAGANGKAN atau KECOCOKAN UNTUK "
+"TUJUAN TERTENTU,\n"
+"sejauh diijinkan oleh hukum yang berlaku.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: tidak dapat membaca %s: %s\n"
+msgstr "tidak dapat menghapus %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr "Tidak dapat membuka file %s %s"
+msgstr "tidak dapat membuka berkas %s: %s"
+
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "tidak dapat meng-attach ke %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "tidak dapat menulis %d item ke %s: %s"
-msgstr[1] "tidak dapat menulis %d item ke %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "kesalahan pembacaan pada %s: %s"
-#: lib/utils.c:341
-#, fuzzy, c-format
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "tidak dapat mengikuti symlink %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "tidak dapat memperoleh statistik %s: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: tidak dapat membaca %s: %s\n"
+msgstr "tidak dapat mengubah nama %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Sukses"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Tidak cocok"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Reguler ekspresi tidak valid"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Karakter kolasi tidak valid"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Nama kelas karakter tidak valid"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Trailing backslash"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Referensi balik tidak valid"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "[ atau [^ tidak sesuai"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "( atau \\( tidak sesuai"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "\\{ tidak sesuai"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Isi \\{\\} tidak valid"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
-msgstr "Akhir batas tidak valid"
+msgstr "Batas akhir tidak valid"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
-msgstr "Memori habis"
+msgstr "Kehabisan memori"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
-msgstr "Reguler ekspresi sebelumnya tidak valid"
+msgstr "Reguler ekspresi yang mengawali tidak valid"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
-msgstr "Akhir reguler ekspresi prematur"
+msgstr "Reguler ekspresi berakhir prematur"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Reguler ekspresi terlalu besar"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr ") atau \\) tidak sesuai"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Tidak ada reguler ekspresi sebelumnya"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "Dipanggil savchar() dengan pushback (%x) yang tidak diharapkan"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "KESALAHAN INTERNAL: tipe alamat buruk"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "KESALAHAN INTERNAL: Perintah %c buruk"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit files in place (makes backup if extension "
+#~ "supplied)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -r, --regexp-extended\n"
+#~ " use extended regular expressions in the script.\n"
+#~ "%s -s, --separate\n"
+#~ " consider files as separate rather than as a single "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ " load minimal amounts of data from the input files and "
+#~ "flush\n"
+#~ " the output buffers more often\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Penggunaan: %s [OPTION]... {script-only-if-no-other-script} [input-"
+#~ "file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " tiadakan pencetakan otomatis ruang pola\n"
+#~ " -e script, --expression=script\n"
+#~ " tambah skrip ke perintah yang akan dieksekusi\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " tambah isi file skrip ke perintah yang akan dieksekusi\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit file secara langsung (buat backup jika ada "
+#~ "ekstensi)\n"
+#~ " -l N, --line-length=N\n"
+#~ " spesifikasikan panjang baris pemotongan yang diinginkan "
+#~ "untuk perintah `l'\n"
+#~ " -r, --regexp-extended\n"
+#~ " gunakan extended regular expressions dalam skrip .\n"
+#~ "%s -s, --separate\n"
+#~ " anggap file sebagai stream terpisah alih-alih "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ "\n"
+#~ " --help tampilkan bantuan ini dan keluar\n"
+#~ " -V, --version tampilkan informasi versi dan keluar\n"
+#~ "\n"
+#~ "Jika tidak diberikan opsi -e, --expression, -f, atau --file, maka "
+#~ "argumen\n"
+#~ "non-opsi pertama akan dianggap sebagai skrip sed untuk "
+#~ "diinterpretasikan. Seluruh\n"
+#~ "argumen sisanya adalah nama file input; jika tidak ada file input\n"
+#~ "dispesifikasikan, maka standar input akan dibaca.\n"
+#~ "\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Akhir file tidak diharapkan"
diff --git a/po/it.gmo b/po/it.gmo
index c5f3c71..a5e545c 100644
--- a/po/it.gmo
+++ b/po/it.gmo
Binary files differ
diff --git a/po/it.po b/po/it.po
index 8f14913..85caee8 100644
--- a/po/it.po
+++ b/po/it.po
@@ -1,13 +1,14 @@
# traduzione di sed
-# Copyright (C) 1999 Free Software Foundation, Inc.
-# Paolo Bonzini <bonzini@gnu.org>, 2001
+# Copyright (C) 1999, 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
+# Paolo Bonzini <bonzini@gnu.org>, 2008
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.0a\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2002-11-26 12:44+0100\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\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"
"MIME-Version: 1.0\n"
@@ -16,207 +17,226 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
# sed/compile.c:166
-#: sed/compile.c:162
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr "`!' multipli"
# sed/compile.c:167
-#: sed/compile.c:163
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "`,' inattesa"
# sed/compile.c:169
-#: sed/compile.c:164
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
msgstr "impossibile usare +N o ~N come primo indirizzo"
# sed/compile.c:170
-#: sed/compile.c:165
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "`{' non bilanciata"
# sed/compile.c:171
-#: sed/compile.c:166
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "`}' inattesa"
# sed/compile.c:172
-#: sed/compile.c:167
+#: sed/compile.c:166
msgid "extra characters after command"
msgstr "ci sono altri caratteri dopo il comando"
# sed/compile.c:173
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr "atteso \\ dopo `a', `c' o `i'"
# sed/compile.c:174
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' non accetta indirizzi"
# sed/compile.c:175
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": non accetta indirizzi"
# sed/compile.c:176
-#: sed/compile.c:171
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr "i commenti non accettano indirizzi"
# sed/compile.c:177
-#: sed/compile.c:172
+#: sed/compile.c:171
msgid "missing command"
msgstr "manca il comando"
# sed/compile.c:178
-#: sed/compile.c:173
+#: sed/compile.c:172
msgid "command only uses one address"
msgstr "il comando usa solo un indirizzo"
# sed/compile.c:179
-#: sed/compile.c:174
+#: sed/compile.c:173
msgid "unterminated address regex"
msgstr "espressione regolare non terminata nell'indirizzo"
# sed/compile.c:180
-#: sed/compile.c:175
+#: sed/compile.c:174
msgid "unterminated `s' command"
msgstr "comando `s' non terminato"
# sed/compile.c:181
-#: sed/compile.c:176
+#: sed/compile.c:175
msgid "unterminated `y' command"
msgstr "comando `y' non terminato"
# sed/compile.c:182
-#: sed/compile.c:177
+#: sed/compile.c:176
msgid "unknown option to `s'"
msgstr "opzione di `s' sconosciuta"
# sed/compile.c:183
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "opzioni `p' multiple al comando `s'"
# sed/compile.c:184
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "opzioni `g' multiple al comando `s'"
# sed/compile.c:186
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "opzioni numeriche multiple al comando `s'"
# sed/compile.c:188
-#: sed/compile.c:181
+#: sed/compile.c:180
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:182
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr "le stringhe per il comandi `y' hanno lunghezze diverse"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr "il carattere delimitatore multi-byte"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "attesa una versione piu' recente di sed"
# sed/compile.c:178
-#: sed/compile.c:185
+#: 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:186
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "comando sconosciuto: `%c'"
# sed/compile.c:1340
-#: sed/compile.c:209
+#: sed/compile.c:208
#, 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:212
+#: sed/compile.c:211
#, 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:1664
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "impossibile trovare un'etichetta per il salto a `%s'"
# sed/execute.c:516
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: impossibile leggere %s: %s\n"
# sed/execute.c:675
-#: sed/execute.c:673
+#: sed/execute.c:728
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "impossibile modificare %s: un terminale"
-#: sed/execute.c:677
+#: sed/execute.c:733
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "impossibile modificare %s: non un file normale"
# lib/utils.c:131
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, 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:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "errore in un sottoprocesso"
# sed/execute.c:1005
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "opzione `e' non supportata"
# sed/execute.c:1185
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "comando `e' non supportato"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr "nessun file in ingresso"
# lib/regcomp.c:658 sed/regex.c:47
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr "occorre un'espressione regolare precedente"
# sed/regex.c:48
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr "non possibile specificare dei modificatori per l'espressione vuota"
# sed/regex.c:146
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "riferimento non valido \\%d nel secondo membro del comando `s'"
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+"Home page GNU sed: <http://www.gnu.org/software/sed/>.\n"
+"Istruzioni sull'uso del software GNU: <http://www.gnu.org/gethelp/>.\n"
+
+# sed/sed.c:132
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Segnalare eventuali bug a: <%s>.\n"
+"Assicurarsi di includere la parola ``%s'' nell'oggetto del messaggio.\n"
+
# sed/sed.c:98
-#: sed/sed.c:93
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -224,7 +244,7 @@ msgstr ""
" -R, --regexp-perl\n"
" usa la sintassi Perl 5 per le espressioni regolari\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -234,7 +254,7 @@ msgstr ""
"file]...\n"
"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -243,7 +263,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" sopprime la stampa automatica del pattern space\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -252,7 +272,7 @@ msgstr ""
" -e script, --expression=script\n"
" aggiunge lo script ai comandi da eseguire\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -263,7 +283,16 @@ msgstr ""
" aggiunge il contenuto di file-script ai comandi da "
"eseguire\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" segue i link simbolici quando viene utilizzato -i\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -273,7 +302,18 @@ msgstr ""
" scrive il risultato sul file originale (facendo una copia\n"
" se fornita un'estensione)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" apre i file in modo binario (lasciando le sequenze CR+LF "
+"immutate)\n"
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -283,7 +323,7 @@ msgstr ""
" specifica la lunghezza delle linee generate dal comando "
"`l'\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
@@ -293,7 +333,7 @@ msgstr ""
" disabilita tutte le estensioni GNU.\n"
# sed/sed.c:98
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
@@ -302,7 +342,7 @@ msgstr ""
" -r, --regexp-extended\n"
" usa la sintassi di `egrep' per le espressioni regolari\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -314,7 +354,7 @@ msgstr ""
" considera i file di input come separati invece che come un\n"
" unico file lungo.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -325,17 +365,17 @@ msgstr ""
" -u, --unbuffered\n"
" carica e visualizza i dati una a pezzetti piu' piccoli\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help mostra questo aiuto ed esce\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version stampa le informazioni sulla versione ed esce\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -354,24 +394,14 @@ msgstr ""
"sono specificati file di input sar letto lo standard input.\n"
"\n"
-# sed/sed.c:132
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Segnalare eventuali bug a: %s .\n"
-"Assicurarsi di includere la parola ``%s'' nell'oggetto del messaggio.\n"
-
# sed/sed.c:255
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed versione %s\n"
# sed/sed.c:256
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
@@ -381,13 +411,13 @@ msgstr ""
"\n"
# sed/sed.c:258
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed versione %s\n"
# sed/sed.c:260
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -402,123 +432,141 @@ msgstr ""
"SCOPO, nei limiti permessi dalla legge.\n"
# sed/execute.c:516
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, c-format
msgid "cannot remove %s: %s"
msgstr "impossibile rimuovere %s: %s"
# lib/utils.c:131
-#: lib/utils.c:143
+#: sed/utils.c:163
#, c-format
msgid "couldn't open file %s: %s"
msgstr "impossibile aprire il file %s: %s"
# lib/utils.c:161
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "impossibile accedere a %s: %s"
+
+# lib/utils.c:161
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "Impossibile scrivere %d elemento su %s: %s"
-msgstr[1] "Impossibile scrivere %d elementi su %s: %s"
+msgstr[0] "impossibile scrivere %d elemento su %s: %s"
+msgstr[1] "impossibile scrivere %d elementi su %s: %s"
# lib/utils.c:176
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "errore di lettura su %s: %s"
+# lib/utils.c:131
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "impossibile seguire il link simbolico %s: %s"
+
+# sed/execute.c:516
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "impossibile ottenere informazioni su %s: %s"
+
# sed/execute.c:516
-#: lib/utils.c:341
+#: sed/utils.c:438
#, c-format
msgid "cannot rename %s: %s"
msgstr "impossibile rinominare %s: %s"
# lib/regcomp.c:179
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Successo"
# lib/regcomp.c:182
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Nessuna corrispondenza trovata"
# lib/regcomp.c:185
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Espressione regolare non valida"
# lib/regcomp.c:188
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Carattere di ordinamento non valido"
# lib/regcomp.c:191
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Nome non valido per una classe di caratteri"
# lib/regcomp.c:194
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Barra rovesciata alla fine dell'espressione regolare"
# lib/regcomp.c:197
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Riferimento non valido"
# lib/regcomp.c:200
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "`[' non bilanciata"
# lib/regcomp.c:203
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "`(' o `\\(' non bilanciata"
# lib/regcomp.c:206
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "`\\{' non bilanciata"
# lib/regcomp.c:209
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "numero di ripetizioni specificato tra graffe non valido"
# lib/regcomp.c:212
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Fine dell'intervallo non valida"
# lib/regcomp.c:215
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Memoria esaurita"
# lib/regcomp.c:218
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Espressione regolare precedente non valida"
# lib/regcomp.c:221
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Fine prematura dell'espressione regolare"
# lib/regcomp.c:224
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Espressione regolare troppo grande"
# lib/regcomp.c:227
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "`)' o `\\)' non bilanciata"
# lib/regcomp.c:658 sed/regex.c:47
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Occorre un'espressione regolare precedente"
diff --git a/po/ja.gmo b/po/ja.gmo
index a63137d..e408487 100644
--- a/po/ja.gmo
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
index c25e257..d3a6c0a 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -9,8 +9,8 @@
msgid ""
msgstr ""
"Project-Id-Version: GNU sed 4.1.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
"PO-Revision-Date: 2005-02-01 21:02+0900\n"
"Last-Translator: IIDA Yosiaki <iida@gnu.org>\n"
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
@@ -19,172 +19,188 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr "ʣΡ!פǤ"
-#: sed/compile.c:163
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "ͽ̡,פǤ"
-#: sed/compile.c:164
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
msgstr "ǽΥɥ쥹ؤ+N~Nλ̵Ǥ"
-#: sed/compile.c:165
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "ʤ{פǤ"
-#: sed/compile.c:166
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "ͽ̡}פǤ"
-#: sed/compile.c:167
+#: sed/compile.c:166
msgid "extra characters after command"
msgstr "ޥɤθ;פʸޤ"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr "\\aסcסiפθͽޤ"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "}פ˥ɥ쥹פǤ"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ":˥ɥ쥹פǤ"
-#: sed/compile.c:171
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr "Ȥϥɥ쥹դޤ"
-#: sed/compile.c:172
+#: sed/compile.c:171
msgid "missing command"
msgstr "ޥɤ­ޤ"
-#: sed/compile.c:173
+#: sed/compile.c:172
msgid "command only uses one address"
msgstr "ޥɤϥɥ쥹1ĤȤޤ"
-#: sed/compile.c:174
+#: sed/compile.c:173
msgid "unterminated address regex"
msgstr "ɥ쥹regexλƤޤ"
-#: sed/compile.c:175
+#: sed/compile.c:174
msgid "unterminated `s' command"
msgstr "sץޥɤλƤޤ"
-#: sed/compile.c:176
+#: sed/compile.c:175
msgid "unterminated `y' command"
msgstr "yץޥɤλƤޤ"
-#: sed/compile.c:177
+#: sed/compile.c:176
msgid "unknown option to `s'"
msgstr "sפؤΥץ̤ΤǤ"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "sץޥɤʣΡpץץ"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "sץޥɤʣΡgץץ"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "sץޥɤʣοͥץ"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "sץޥɤؤοͥץǤϤޤ"
-#: sed/compile.c:182
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr "yץޥɤؤʸĹ㤤ޤ"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr "ڤʸñХʸǤޤ"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "sedοǤǤ"
-#: sed/compile.c:185
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "̵ʹԥɥ쥹0λˡ"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "̤ΤΥޥɤǤ: %c"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: ե %s %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, 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:1664
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "%sפؤΥפΥ٥뤬Ĥޤ"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %sɤ߹ޤ: %s\n"
-#: sed/execute.c:673
+#: sed/execute.c:728
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "%sϡԽǤޤǤ: üǤ"
-#: sed/execute.c:677
+#: sed/execute.c:733
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "%sϡԽǤޤǤ: ̾եǤޤ"
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "ե򳫤ޤǤ: %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "ҥץΥ顼"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "eץץϡݡȤƤޤ"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "eץޥɤϡݡȤƤޤ"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr "ľɽޤ"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr "Ҥϡɽ˻Ǥޤ"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "sץޥɤα¦̵\\%dλ"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Żҥ᡼ˤХΰ: <%s>\n"
+"κݡSubject:ɥեɤΤɤˡ%sɤƤ\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -192,7 +208,7 @@ msgstr ""
" -R, --regexp-perl\n"
" ץȤPerl 5ɽʸȤ\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -201,7 +217,7 @@ msgstr ""
"ˡ: %s [ץ]... {ץ(¾ˤʤ)} [ϥե]...\n"
"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, fuzzy, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -210,7 +226,7 @@ msgstr ""
"-n, --quiet, --silent\n"
" ѥ󡦥ڡμưϤ\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -219,7 +235,7 @@ msgstr ""
" -e ץ, --expression=ץ\n"
" ¹Ԥ륳ޥɤȤƥץȤɲ\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -229,7 +245,14 @@ msgstr ""
" -f ץȡե, --file=ץȡե\n"
" ¹Ԥ륳ޥɤȤƥץȡեƤɲ\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -239,7 +262,15 @@ msgstr ""
" ե򤽤ξԽ (ĥҤСХååפ"
")\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -248,7 +279,7 @@ msgstr ""
" -l N, --line-length=N\n"
" lץޥѤι֤Ĺ\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
@@ -257,7 +288,7 @@ msgstr ""
" --posix\n"
" GNUĥػߡ\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
@@ -266,7 +297,7 @@ msgstr ""
" -r, --regexp-extended\n"
" ץȤdzĥɽѡ\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -277,7 +308,7 @@ msgstr ""
" -s, --separate\n"
" եϢϤˤ̡˽\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -289,17 +320,17 @@ msgstr ""
" ϥե뤫˾Υǡߡ\n"
" 礯礯ϥХåեݽФ\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help ɽƽλ\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version Сɽƽλ\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -315,21 +346,12 @@ msgstr ""
"̾Ȥʤޤϥեλ꤬ʤȡɸϤɤ߹ߤޤ\n"
"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Żҥ᡼ˤХΰ: %s\n"
-"κݡSubject:ɥեɤΤɤˡ%sɤƤ\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
@@ -338,14 +360,14 @@ msgstr ""
"GNU sed %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr ""
"GNU sed %s\n"
"\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -364,101 +386,115 @@ msgstr ""
"ݾڤϰڤޤ󡣱Ūˡ줿ϰϤǤŪΤ\n"
"Ŭ⤢ޤ\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, c-format
msgid "cannot remove %s: %s"
msgstr "%sǤޤ: %s"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, c-format
msgid "couldn't open file %s: %s"
msgstr "ե%s򳫤ޤǤ: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "%dĤΥƥ%sؽ񤭹ޤǤ: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "%dĤΥƥ%sؽ񤭹ޤǤ: %s"
-msgstr[1] "%dĤΥƥ%sؽ񤭹ޤǤ: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "%sɹߥ顼: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "ե%s򳫤ޤǤ: %s"
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "%s̾ѹǤޤ: %s"
+
+#: sed/utils.c:438
#, c-format
msgid "cannot rename %s: %s"
msgstr "%s̾ѹǤޤ: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr ""
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "ȹ礷ޤ"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "̵ɽ"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "̵ʹʸ"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "̵ʸ饹̾"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "³εեå"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "̵ʵջ"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "[[^礤ޤ"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "(\\(礤ޤ"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "\\{礤ޤ"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "̵\\{\\}\""
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "̵ϰϤνü"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "꡼­ޤ"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "̵ɽ"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "᤮ɽü"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "礭᤮ɽ"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "ʤ)\\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "ľɽޤ"
diff --git a/po/ko.gmo b/po/ko.gmo
index ab9d29b..b5c53dc 100644
--- a/po/ko.gmo
+++ b/po/ko.gmo
Binary files differ
diff --git a/po/ko.po b/po/ko.po
index 5d9d46a..3b8d566 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -5,8 +5,8 @@
msgid ""
msgstr ""
"Project-Id-Version: GNU sed 3.02.80\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
"PO-Revision-Date: 2001-10-12 17:26+0900\n"
"Last-Translator: Jong-Hoon Ryu <redhat4u@netian.com>\n"
"Language-Team: Korean <ko@li.org>\n"
@@ -14,214 +14,230 @@ msgstr ""
"Content-Type: text/plain; charset=EUC-KR\n"
"Content-Transfer-Encoding: 8bit\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
#, fuzzy
msgid "multiple `!'s"
msgstr "`!' ߺǾϴ"
-#: sed/compile.c:163
+#: sed/compile.c:162
#, fuzzy
msgid "unexpected `,'"
msgstr "ʿ `,' ǰ ֽϴ"
-#: sed/compile.c:164
+#: sed/compile.c:163
#, fuzzy
msgid "invalid usage of +N or ~N as first address"
msgstr "ù° ּҷ '+N' Ǵ '~N' ϴ"
-#: sed/compile.c:165
+#: sed/compile.c:164
#, fuzzy
msgid "unmatched `{'"
msgstr "`{' ġ ʽϴ"
-#: sed/compile.c:166
+#: sed/compile.c:165
#, fuzzy
msgid "unexpected `}'"
msgstr "ʿ `}' ǰ ֽϴ"
-#: sed/compile.c:167
+#: sed/compile.c:166
#, fuzzy
msgid "extra characters after command"
msgstr "ɵڿ ʿ ڵ ֽϴ"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr ""
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}'  ּҵ ʿġ ʽϴ"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ":  ּҵ ʿġ ʽϴ"
-#: sed/compile.c:171
+#: sed/compile.c:170
#, fuzzy
msgid "comments don't accept any addresses"
msgstr "ڸƮ  ּҵ ϴ"
-#: sed/compile.c:172
+#: sed/compile.c:171
#, fuzzy
msgid "missing command"
msgstr " ʾҽϴ"
-#: sed/compile.c:173
+#: sed/compile.c:172
#, fuzzy
msgid "command only uses one address"
msgstr "ɿ ϳ ּҸ ֽϴ"
-#: sed/compile.c:174
+#: sed/compile.c:173
#, fuzzy
msgid "unterminated address regex"
msgstr "ּ ǥ ʾҽϴ"
-#: sed/compile.c:175
+#: sed/compile.c:174
#, fuzzy
msgid "unterminated `s' command"
msgstr "`s' ʾҽϴ"
-#: sed/compile.c:176
+#: sed/compile.c:175
#, fuzzy
msgid "unterminated `y' command"
msgstr "`y' ʾҽϴ"
-#: sed/compile.c:177
+#: sed/compile.c:176
#, fuzzy
msgid "unknown option to `s'"
msgstr "`s' ɼ ֽϴ"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "`s' ɿ `p' ɼ ߺǾ ֽϴ"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "`s' ɿ `g' ɼ ߺǾ ֽϴ"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "`s' ɿ ɼ ߺǾ ֽϴ"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "`s' ɼǿ '0' ϴ"
-#: sed/compile.c:182
+#: sed/compile.c:181
#, fuzzy
msgid "strings for `y' command are different lengths"
msgstr "`y' ڿ ̰ ٸϴ"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:185
+#: sed/compile.c:184
#, fuzzy
msgid "invalid usage of line address 0"
msgstr "ּ (modifier) ùٸ ʽϴ"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, fuzzy, c-format
msgid "unknown command: `%c'"
msgstr " :"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: %s %lu ° : %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, 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:1664
#, fuzzy, c-format
msgid "can't find label for jump to `%s'"
msgstr "`%s' () ̺ ã ϴ"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s () : %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "%s ϴ"
+msgstr ""
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "%s ϴ"
+msgstr ""
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, fuzzy, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "%s ϴ"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr ""
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"׸ E-mail ּ: <%s>.\n"
+"``Subject:'' ׸ ݵ ``%s'' ܾ ֽñ ٶϴ.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -229,35 +245,50 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -266,7 +297,7 @@ msgid ""
" long stream.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -275,17 +306,17 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -296,33 +327,24 @@ msgid ""
"\n"
msgstr ""
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"׸ E-mail ּ: %s .\n"
-"``Subject:'' ׸ ݵ ``%s'' ܾ ֽñ ٶϴ.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr ""
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr ""
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -335,105 +357,186 @@ msgstr ""
"Ͻñ ٶϴ. α׷ ˵ ʴ ̳\n"
"Ư 츦  쿡 ʽϴ.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, fuzzy, c-format
msgid "cannot remove %s: %s"
msgstr "%s: %s () : %s\n"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, fuzzy, c-format
msgid "couldn't open file %s: %s"
msgstr "%s ϴ"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "%s ׸(item) ϴ: %s"
+
+#: sed/utils.c:240
#, fuzzy, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "%2$s %1$d ׸(item) ϴ: %3$s"
msgstr[1] "%2$s %1$d ׸(item) ϴ: %3$s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "%s б : %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "%s ׸(item) ϴ: %s"
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "%s: %s () : %s\n"
+
+#: sed/utils.c:438
#, fuzzy, c-format
msgid "cannot rename %s: %s"
msgstr "%s: %s () : %s\n"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr ""
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr ""
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr ""
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr ""
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr ""
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr ""
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr ""
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
#, fuzzy
msgid "Unmatched [ or [^"
msgstr "`{' ġ ʽϴ"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
#, fuzzy
msgid "Unmatched ( or \\("
msgstr "`{' ġ ʽϴ"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
#, fuzzy
msgid "Unmatched \\{"
msgstr "`{' ġ ʽϴ"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr ""
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr ""
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr ""
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr ""
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr ""
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr ""
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
#, fuzzy
msgid "Unmatched ) or \\)"
msgstr "`{' ġ ʽϴ"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr ""
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "߸ ǥ: %s\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr " (EOF) ߸Ǿϴ"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "ġ pushback (%x) Բ savchar() ȣǾϴ"
+
+#~ msgid "input read error: %s"
+#~ msgstr "Է б : %s"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr " : ߸ ּ Դϴ"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr " : %c () ߸ Դϴ"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -u, --unbuffered\n"
+#~ "\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ ": %s [ɼ]... {ũƮ-ũƮ 쿡} [Է-]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " ڵ ϵ մϴ\n"
+#~ " -e ũƮ, --expression=ũƮ\n"
+#~ " ɿ ũƮ ߰մϴ\n"
+#~ " -f ũƮ-, --file=ũƮ-\n"
+#~ " ɿ ũƮ- ߰մϴ\n"
+#~ " -l , --line-length=\n"
+#~ " `l' ɿ ٹٲ(line-wrap) ڸ մϴ\n"
+#~ " -u, --unbuffered\n"
+#~ "\n"
+#~ " --help մϴ\n"
+#~ " -V, --version ϴ մϴ\n"
+#~ "\n"
+#~ " -e, --expression, -f, --file ɼ ־ ʾ 쿡 ɼ-"
+#~ "\n"
+#~ "ù° μ ؼ sed ũƮ ˴ϴ. "
+#~ "\n"
+#~ "μδ Է ̸Դϴ; Է ʾ 쿡"
+#~ "\n"
+#~ "ǥ Է нϴ.\n"
+#~ "\n"
diff --git a/po/nl.gmo b/po/nl.gmo
index ccf3397..53d55a5 100644
--- a/po/nl.gmo
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
index ad08f5d..6fd10f3 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,273 +1,309 @@
-# Dutch translation of sed.
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Translation of sed-4.2.0 to Dutch.
+# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
# This file is distributed under the same license as the sed package.
+#
# Taco Witte <tcwitte@cs.uu.nl>, 2004, 2005.
-#
-#
+# Benno Schulenberg <benno@vertaalt.nl>, 2005, 2006, 2007, 2008.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.1.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2005-04-12 20:09+0200\n"
-"Last-Translator: Taco Witte <tcwitte@cs.uu.nl>\n"
+"Project-Id-Version: sed-4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-17 22:49+0100\n"
+"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: KBabel 1.11.4\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "meerdere `!'s"
+msgstr "meerdere '!'"
-#: sed/compile.c:163
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr "onverwachte `,'"
+msgstr "onverwachte ','"
-#: sed/compile.c:164
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
msgstr "ongeldig gebruik van +N of ~N als eerste adres"
-#: sed/compile.c:165
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr "ongepaarde `{'"
+msgstr "ongepaarde '{'"
-#: sed/compile.c:166
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr "onverwachte `}'"
+msgstr "onverwachte '}'"
-#: sed/compile.c:167
+#: sed/compile.c:166
msgid "extra characters after command"
msgstr "extra tekens na opdracht"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "verwachtte \\ na `a', `c' of `i'"
+msgstr "een '\\' werd verwacht na 'a', 'c' of 'i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
-msgstr "`}' wil geen adressen"
+msgstr "'}' accepteert geen adressen"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
-msgstr ": wil geen adressen"
+msgstr "':' accepteert geen adressen"
-#: sed/compile.c:171
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr "opmerkingen accepteren geen adres"
-#: sed/compile.c:172
+#: sed/compile.c:171
msgid "missing command"
msgstr "ontbrekende opdracht"
-#: sed/compile.c:173
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "opdracht gebruikt slechts één adres"
+msgstr "opdracht accepteert slechts één adres"
-#: sed/compile.c:174
+#: sed/compile.c:173
msgid "unterminated address regex"
msgstr "onafgemaakte reguliere expressie voor adres"
-#: sed/compile.c:175
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "onafgemaakte `s'-opdracht"
+msgstr "onafgemaakte 's'-opdracht"
-#: sed/compile.c:176
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "onafgemaakte `y'-opdracht"
+msgstr "onafgemaakte 'y'-opdracht"
-#: sed/compile.c:177
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "onbekende optie voor `s'"
+msgstr "onbekende optie bij 's'-opdracht"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
-msgstr "meerdere `p'-opties voor `s'-opdracht"
+msgstr "meerdere 'p'-opties bij 's'-opdracht"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
-msgstr "meerdere `g'-opties voor `s'-opdracht"
+msgstr "meerdere 'g'-opties bij 's'-opdracht"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
-msgstr "meerdere getalopties voor `s'-opdracht"
+msgstr "meerdere getalopties bij 's'-opdracht"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
-msgstr "getaloptie voor `s'-opdracht mag niet nul zijn"
+msgstr "getaloptie bij 's'-opdracht mag niet nul zijn"
-#: sed/compile.c:182
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "tekenreeksen voor `y'-opdracht zijn van verschillende lengte"
+msgstr "tekenreeksen bij 'y'-opdracht zijn van verschillende lengte"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr "scheidingsteken is geen enkel-byte-teken"
+msgstr "scheidingsteken is niet één enkele byte"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr "verwachtte een nieuwere versie van sed"
+msgstr "een nieuwere versie van 'sed' werd verwacht"
-#: sed/compile.c:185
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "ongeldig gebruik van regel-adres 0"
+msgstr "ongeldig gebruik van regeladres 0"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
-msgstr "onbekende opdracht: `%c'"
+msgstr "onbekende opdracht: '%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
-msgstr "%s: bestand %s regel %lu: %s\n"
+msgstr "%s: bestand %s, regel %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
-msgstr "%s: -e expressie #%lu, teken %lu: %s\n"
+msgstr "%s: expressie #%lu, teken %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1664
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "kan label voor sprong naar `%s' niet vinden"
+msgstr "kan label voor sprong naar '%s' niet vinden"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: kan %s niet lezen: %s\n"
-#: sed/execute.c:673
+#: sed/execute.c:728
#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "kon %s niet bewerken: is een terminal"
+msgstr "kan %s niet bewerken: is een terminal"
-#: sed/execute.c:677
+#: sed/execute.c:733
#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "kon %s niet bewerken: geen gewoon bestand"
+msgstr "kan %s niet bewerken: is geen gewoon bestand"
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "kon tijdelijk bestand %s niet openen: %s"
+msgstr "kan tijdelijk bestand %s niet openen: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
-msgstr "fout in deelproces"
+msgstr "fout in subproces"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
-msgstr "optie `e' wordt niet ondersteund"
+msgstr "'e'-opdracht is niet mogelijk"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
-msgstr "`e'-opdracht wordt niet ondersteund"
+msgstr "'e'-opdracht is niet mogelijk"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "geen invoerbestanden"
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr "geen eerdere reguliere expressie"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "kan geen veranderaars opgeven bij een lege reguliere expressie"
+msgstr "bij een lege reguliere expressie passen geen veranderaars"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "ongeldige verwijzing \\%d op rechterhandzijde van `s'-opdracht"
+msgstr "ongeldige verwijzing \\%d rechts van 's'-opdracht"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Rapporteer gebreken in het programma aan <%s>\n"
+"met het woord \"%s\" ergens in de Onderwerp-regel;\n"
+"meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R, --regexp-perl\n"
-" de syntaxis van Perl 5 voor reguliere expressie gebruiken "
-"in het script.\n"
+" reguliere expressies van Perl-5 gebruiken in het script\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Gebruik: %s [OPTIE]... {script-alleen-als-geen-ander-script} "
-"[invoerbestand]...\n"
+"Gebruik: %s [OPTIE]... {SCRIPT_als_verder_geen_script} [INVOERBESTAND]...\n"
"\n"
-#: sed/sed.c:102
-#, fuzzy, c-format
+#: sed/sed.c:128
+#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-"-n, --quiet, --silent\n"
-" automatische weergave van patroonruimte onderdrukken\n"
+" -n, --quiet, --silent\n"
+" automatische weergave van patroonruimte onderdrukken\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-" -e script, --expression=SCRIPT\n"
-" het SCRIPT toevoegen aan uit te voeren opdrachten\n"
+" -e SCRIPT, --expression=SCRIPT\n"
+" dit SCRIPT toevoegen aan de uit te voeren opdrachten\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, 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=SCRIPTBESTAND\n"
-" de inhoud van SCRIPTBESTAND toevoegen aan uit te voeren "
+" -f SCRIPTBESTAND, --file=SCRIPTBESTAND\n"
+" inhoud van SCRIPTBESTAND toevoegen aan de uit te voeren "
"opdrachten\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" symbolische koppelingen volgen (bij bewerking ter plekke)\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
" -i[ACHTERVOEGSEL], --in-place[=ACHTERVOEGSEL]\n"
-" bestanden ter plekke bewerken (maakt reservekopie als "
-"extensie gegeven)\n"
+" bestanden ter plekke bewerken\n"
+" (en een reservekopie maken als een ACHTERVOEGSEL gegeven is)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" bestanden openen in binaire modus (regeleinden zijn niet "
+"speciaal)\n"
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
" -l AANTAL, --line-length=AANTAL\n"
-" gewenste regelafbreeklengte opgeven voor `l'-opdracht\n"
+" de gewenste regelafbreeklengte voor de 'l'-opdracht\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" alle GNU-uitbreidingen uit zetten.\n"
+" alle GNU-uitbreidingen uitschakelen\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
" -r, --regexp-extended\n"
-" uitgebreide reguliere expressies gebruiken in het script.\n"
+" uitgebreide reguliere expressies gebruiken in het script\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -276,10 +312,9 @@ msgid ""
" long stream.\n"
msgstr ""
" -s, --separate\n"
-" bestanden als losstaand beschouwen i.p.v. als enkele "
-"continue stroom.\n"
+" bestanden als losstaand beschouwen, niet als één enkele stroom\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -288,20 +323,21 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" minimale hoeveelheid gegevens laden uit invoerbestanden en\n"
-" uitvoerbuffers vaker leegmaken\n"
+" minimale hoeveelheden gegevens laden uit de invoerbestanden,\n"
+" en de uitvoerbuffers vaker leegmaken\n"
+"\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr " --help deze hulp weergeven en afsluiten\n"
+msgstr " --help deze hulptekst tonen en stoppen\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version versie-informatie weergeven en afsluiten\n"
+msgstr " --version versie-informatie tonen en stoppen\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -312,28 +348,18 @@ msgid ""
"\n"
msgstr ""
"\n"
-"Als geen -e, --expression, -f of --file optie gegeven is, wordt het\n"
-"eerste niet-optie argument genomen als het te interpreteren sed-script.\n"
-"Alle overblijvende argumenten zijn namen van invoerbestanden; als geen\n"
-"invoerbestanden opgegeven zijn, wordt standaardinvoer gelezen.\n"
+"Als er geen '-e', '--expression', '-f' of '--file' gegeven is, wordt het\n"
+"eerste niet-optie argument als het te interpreteren 'sed'-script genomen.\n"
+"Alle overblijvende argumenten zijn namen van invoerbestanden; als er geen\n"
+"invoerbestanden gegeven zijn, wordt standaardinvoer gelezen.\n"
"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Stuur foutrapporten naar: %s .\n"
-"Zorg ervoor dat het woord ``%s'' ergens in het ``Onderwerp:''-veld staat.\n"
-"Rapporteer fouten in de vertalingen bij <vertaling@vrijschrift.org>.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed versie %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
@@ -342,12 +368,12 @@ msgstr ""
"gebaseerd op GNU sed versie %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed versie %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -356,186 +382,120 @@ msgid ""
"to the extent permitted by law.\n"
msgstr ""
"%s\n"
-"Dit is vrije software; zie de bron voor kopieervoorwaarden. Er is GEEN\n"
-"garantie; zelfs niet voor VERHANDELBAARHEID of GESCHIKTHEID VOOR\n"
-"EEN BEPAALD DOEL, tot het uiterste dat door de wet wordt toegestaan.\n"
+"Dit is vrije software; zie de programmatekst voor de kopieervoorwaarden.\n"
+"Er is GEEN ENKELE garantie, zelfs niet voor VERHANDELBAARHEID of\n"
+"GESCHIKTHEID VOOR EEN BEPAALD DOEL, voorzover de wet dit toestaat.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, c-format
msgid "cannot remove %s: %s"
msgstr "kan %s niet verwijderen: %s"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, c-format
msgid "couldn't open file %s: %s"
-msgstr "kon bestand %s niet openen: %s"
+msgstr "kan bestand %s niet openen: %s"
+
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "kan niet aan %s aanhechten: %s"
-#: lib/utils.c:220
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "kon niet %d item naar %s schrijven: %s"
-msgstr[1] "kon niet %d items naar %s schrijven: %s"
+msgstr[0] "kan %d item niet naar %s schrijven: %s"
+msgstr[1] "kan %d items niet naar %s schrijven: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "leesfout op %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "kan symbolische koppeling %s niet volgen: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "kan de status van %s niet opvragen: %s"
+
+#: sed/utils.c:438
#, c-format
msgid "cannot rename %s: %s"
-msgstr "kon %s niet hernoemen: %s"
+msgstr "kan %s niet hernoemen: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Gelukt"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
-msgstr "Geen overeenkomst"
+msgstr "Geen overeenkomsten"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Ongeldige reguliere expressie"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
-msgstr "Ongeldig sorteerteken"
+msgstr "Ongeldig samengesteld teken"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Ongeldige tekenklassenaam"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
-msgstr "Backslash aan het einde"
+msgstr "Backslash aan het eind"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Ongeldige terugverwijzing"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Ongepaarde [ of [^"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Ongepaarde ( of \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Ongepaarde \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Ongeldige inhoud van \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Ongeldig bereikeinde"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
-msgstr "Onvoldoende geheugen"
+msgstr "Onvoldoende geheugen beschikbaar"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Ongeldige voorafgaande reguliere expressie"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Voortijdig einde van reguliere expressie"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Reguliere expressie is te groot"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Ongepaarde ) of \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Geen eerdere reguliere expressie"
-
-#~ msgid "Called savchar() with unexpected pushback (%x)"
-#~ msgstr "savchar() aangeroepen met onverwachte pushback (%x)"
-
-#~ msgid "INTERNAL ERROR: bad address type"
-#~ msgstr "INTERNE FOUT: slechte adressoort"
-
-#~ msgid "INTERNAL ERROR: Bad cmd %c"
-#~ msgstr "INTERNE FOUT: Slechte opdracht %c"
-
-#~ msgid ""
-#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
-#~ "\n"
-#~ " -n, --quiet, --silent\n"
-#~ " suppress automatic printing of pattern space\n"
-#~ " -e script, --expression=script\n"
-#~ " add the script to the commands to be executed\n"
-#~ " -f script-file, --file=script-file\n"
-#~ " add the contents of script-file to the commands to be "
-#~ "executed\n"
-#~ " -i[suffix], --in-place[=suffix]\n"
-#~ " edit files in place (makes backup if extension "
-#~ "supplied)\n"
-#~ " -l N, --line-length=N\n"
-#~ " specify the desired line-wrap length for the `l' "
-#~ "command\n"
-#~ " -r, --regexp-extended\n"
-#~ " use extended regular expressions in the script.\n"
-#~ "%s -s, --separate\n"
-#~ " consider files as separate rather than as a single "
-#~ "continuous\n"
-#~ " long stream.\n"
-#~ " -u, --unbuffered\n"
-#~ " load minimal amounts of data from the input files and "
-#~ "flush\n"
-#~ " the output buffers more often\n"
-#~ " --help display this help and exit\n"
-#~ " -V, --version output version information and exit\n"
-#~ "\n"
-#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
-#~ "non-option argument is taken as the sed script to interpret. All\n"
-#~ "remaining arguments are names of input files; if no input files are\n"
-#~ "specified, then the standard input is read.\n"
-#~ "\n"
-#~ msgstr ""
-#~ "Gebruik: %s [OPTIE]... {script-alleen-als-geen-ander-script} "
-#~ "[invoerbestand]...\n"
-#~ "\n"
-#~ " -n, --quiet, --silent\n"
-#~ " automatische weergave van patroonruimte onderdrukken\n"
-#~ " -e script, --expression=script\n"
-#~ " het script toevoegen aan de uit te voeren opdrachten\n"
-#~ " -f scriptbestand, --file=scriptbestand\n"
-#~ " de inhoud van scriptbestand toevoegen aan de uit te "
-#~ "voeren opdrachten\n"
-#~ " -i[achtervoegsel], --in-place[=achtervoegsel]\n"
-#~ " bestanden ter plekke bewerken (maakt reservekopie als "
-#~ "achtervoegsel is opgegeven)\n"
-#~ " -l N, --line-length=N\n"
-#~ " de gewenste afkaplengte voor regels opgeven voor de `l'-"
-#~ "opdracht\n"
-#~ " -r, --regexp-extended\n"
-#~ " uitgebreide reguliere uitdrukkingen gebruiken in het "
-#~ "script.\n"
-#~ "%s -s, --separate\n"
-#~ " bestanden afzonderlijk beschouwen in plaats van als één "
-#~ "continue, lange stroom.\n"
-#~ " -u, --unbuffered\n"
-#~ " minimale hoeveelheden gegevens van invoerbestanden laden "
-#~ "en vaker de uitvoerbuffers legen\n"
-#~ " --help deze hulp weergeven en afsluiten\n"
-#~ " -V, --version versie-informatie weergeven en afsluiten\n"
-#~ "\n"
-#~ "Als geen -e, --expression, -f of --file optie gegeven is, wordt het "
-#~ "eerste niet-optie\n"
-#~ "argument gebruikt als sed script om te interpreteren. Alle overblijvende "
-#~ "argumenten\n"
-#~ "zijn namen van invoerbestanden; als geen invoerbestanden zijn opgegeven, "
-#~ "wordt gelezen\n"
-#~ "vanaf standaard invoer.\n"
-#~ "\n"
diff --git a/po/pl.gmo b/po/pl.gmo
index 7d0697b..55d42b0 100644
--- a/po/pl.gmo
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
index 47cff40..5e0f03a 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,14 +1,14 @@
# Polish translations for GNU sed package.
-# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
-# Wojciech Polak <polak@gnu.org>, 2003, 2004.
+# Copyright (C) 2003, 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
+# Wojciech Polak <polak@gnu.org>, 2003, 2004, 2005, 2006, 2008.
# corrections: Jakub Bogusz <qboosh@pld-linux.org>, 2003.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.1.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2004-07-08 19:58+0200\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-03-01 12:05+0100\n"
"Last-Translator: Wojciech Polak <polak@gnu.org>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
@@ -17,172 +17,188 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr "wielokrotny znak `!'"
-#: sed/compile.c:163
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "nieoczekiwany znak `,'"
-#: sed/compile.c:164
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
msgstr "nieprawidowe uycie +N lub ~N jako pierwszego adresu"
-#: sed/compile.c:165
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "niedopasowany znak `{'"
-#: sed/compile.c:166
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "nieoczekiwany znak `}'"
-#: sed/compile.c:167
+#: sed/compile.c:166
msgid "extra characters after command"
msgstr "dodatkowe znaki po poleceniu"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr "oczekiwano znaku \\ po `a', `c' lub `i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' nie chce adnych adresw"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": nie chce adnych adresw"
-#: sed/compile.c:171
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr "komentarze nie akceptuj adnych adresw"
-#: sed/compile.c:172
+#: sed/compile.c:171
msgid "missing command"
msgstr "brakuje polecenia"
-#: sed/compile.c:173
+#: sed/compile.c:172
msgid "command only uses one address"
msgstr "polecenie uywa tylko jednego adresu"
-#: sed/compile.c:174
+#: sed/compile.c:173
msgid "unterminated address regex"
msgstr "niezakoczony adres wyraenia regularnego"
-#: sed/compile.c:175
+#: sed/compile.c:174
msgid "unterminated `s' command"
msgstr "niezakoczone polecenie `s'"
-#: sed/compile.c:176
+#: sed/compile.c:175
msgid "unterminated `y' command"
msgstr "niezakoczone polecenie `y'"
-#: sed/compile.c:177
+#: sed/compile.c:176
msgid "unknown option to `s'"
msgstr "nieznana opcja dla polecenia `s'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "wielokrotne opcje `p' dla polecenia `s'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "wielokrotne opcje `g' dla polecenia `s'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "wielokrotne opcje liczbowe dla polecenia `s'"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "opcja liczbowa dla polecenia `s' nie moe by zerem"
-#: sed/compile.c:182
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr "acuchy dla polecenia `y' s rnych dugoci"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr "znak ogranicznika nie jest pojedynczym znakiem-bajtem"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "oczekiwano nowszej wersji programu sed"
-#: sed/compile.c:185
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr "nieprawidowe uycie adresu linii 0"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr "nieznane polecenie: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: plik %s linia %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e wyraenie #%lu, znak %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1664
#, c-format
msgid "can't find label for jump to `%s'"
msgstr "nie mona znale etykiety dla skoku do `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nie mona odczyta %s: %s\n"
-#: sed/execute.c:673
+#: sed/execute.c:728
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr "nie mona edytowa %s: plik jest terminalem"
-#: sed/execute.c:677
+#: sed/execute.c:733
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "nie mona edytowa %s: to nie jest regularny plik"
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr "nie mona otworzy tymczasowego pliku %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "bd w podprocesie"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "opcja `e' nie jest wspierana"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "polecenie `e' nie jest wspierane"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "brak plikw wejciowych"
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr "brak poprzedniego wyraenia regularnego"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr "nie mona wyszczeglni modyfikatorw w pustym wyraeniu regularnym"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "nieprawidowe odwoanie \\%d po prawej stronie polecenia `s'"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Ewentualne bdy prosimy zgasza na adres: <%s>\n"
+"W tym celu prosz doda sowo ``%s'' do tematu listu.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -191,7 +207,7 @@ msgstr ""
" uywa w skrypcie wyraenia regularne zgodne ze skadni "
"Perl 5.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
@@ -201,7 +217,7 @@ msgstr ""
"wejciowy]...\n"
"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
@@ -210,7 +226,7 @@ msgstr ""
" -n, --quiet, --silent\n"
" powstrzymuje automatyczne drukowanie przetwarzanych linii.\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
@@ -219,7 +235,7 @@ msgstr ""
" -e skrypt, --expression=skrypt\n"
" dodaje skrypt do polece, ktre maj by wykonane.\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -230,7 +246,17 @@ msgstr ""
" dodaje zawarto pliku skryptowego do polece,\n"
" ktre maj by wykonane.\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" poda za dowizaniami symbolicznymi,\n"
+" gdy przetwarza \"w miejscu\".\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
@@ -240,7 +266,18 @@ msgstr ""
" edytuje pliki \"w miejscu\" (tworzy kopie zapasowe\n"
" jeeli zostao podane rozszerzenie).\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" otwiera pliki w trybie binarnym (CR+LF nie jest "
+"przetwarzane).\n"
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
@@ -249,7 +286,7 @@ msgstr ""
" -l N, --line-length=N\n"
" ustala podan dugo amanych linii dla polecenia `l'.\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
@@ -258,7 +295,7 @@ msgstr ""
" --posix\n"
" wycza wszystkie rozszerzenia GNU.\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
@@ -267,7 +304,7 @@ msgstr ""
" -r, --regexp-extended\n"
" uywa w skrypcie rozszerzonych wyrae regularnych.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -279,7 +316,7 @@ msgstr ""
" traktuje pliki jako oddzielne, a nie jako pojedynczy,\n"
" dugi i cigy strumie.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -291,17 +328,17 @@ msgstr ""
" aduje minimaln ilo danych z plikw wejciowych\n"
" i czciej oczyszcza bufor wyjciowy.\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr " --help wywietla t oto pomoc i koczy prac.\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version wywietla numer wersji i koczy prac.\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -319,21 +356,12 @@ msgstr ""
"adne pliki wejciowe, to wtedy odczytane zostanie standardowe wejcie.\n"
"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Ewentualne bdy prosimy zgasza na adres: %s\n"
-"W tym celu prosz doda sowo ``%s'' do tematu listu.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed wersja %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
@@ -342,12 +370,12 @@ msgstr ""
"na podstawie wersji GNU sed %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed wersja %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -361,17 +389,22 @@ msgstr ""
"w rdach. Autorzy nie daj ADNYCH gwarancji, w tym rwnie gwarancji\n"
"PRZYDATNOCI DO SPRZEDAY LUB DO KONKRETNYCH CELW.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, c-format
msgid "cannot remove %s: %s"
msgstr "nie mona usun %s: %s"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, c-format
msgid "couldn't open file %s: %s"
msgstr "nie mona otworzy pliku %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "nie mona doczy do %s: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
@@ -379,84 +412,94 @@ msgstr[0] "nie mona zapisa %d elementu do %s: %s"
msgstr[1] "nie mona zapisa %d elementw do %s: %s"
msgstr[2] "nie mona zapisa %d elementw do %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "bd odczytu w %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "nie mona pody za dowizaniem %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "nie mona uzyska informacji o %s: %s"
+
+#: sed/utils.c:438
#, c-format
msgid "cannot rename %s: %s"
msgstr "nie mona zmieni nazwy %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Sukces"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Brak dopasowania"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Nieprawidowe wyraenie regularne"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Nieprawidowy znak porwnania"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Nieprawidowa nazwa klasy znaku"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Kocowy znak backslash"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Nieprawidowe odwoanie wsteczne"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Niedopasowany znak [ lub [^"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Niedopasowany znak ( lub \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Niedopasowany znak \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Nieprawidowa zawarto \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Nieprawidowy koniec zakresu"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Pami wyczerpana"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Nieprawidowe poprzedzajce wyraenie regularne"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Przedwczesny koniec wyraenia regularnego"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Wyraenie regularne jest zbyt due"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Niedopasowany znak ) lub \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Brak poprzedniego wyraenia regularnego"
diff --git a/po/pt.gmo b/po/pt.gmo
new file mode 100644
index 0000000..4d1740a
--- /dev/null
+++ b/po/pt.gmo
Binary files differ
diff --git a/po/pt.po b/po/pt.po
new file mode 100644
index 0000000..2724c03
--- /dev/null
+++ b/po/pt.po
@@ -0,0 +1,501 @@
+# Portuguese translation of the "sed" messages
+# Copyright (C) 2005 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.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-17 21:25+0100\n"
+"Last-Translator: Helder Correia <helder.pereira.correia@gmail.com>\n"
+"Language-Team: Portuguese <translation-team-pt@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n!=1;\n"
+
+#: sed/compile.c:161
+msgid "multiple `!'s"
+msgstr "múltiplos \"!\"s"
+
+#: sed/compile.c:162
+msgid "unexpected `,'"
+msgstr "',' inesperada"
+
+#: sed/compile.c:163
+msgid "invalid usage of +N or ~N as first address"
+msgstr "uso inválido de +N ou ~N como primeiro endereço"
+
+#: sed/compile.c:164
+msgid "unmatched `{'"
+msgstr "\"{\" sem correspondência"
+
+#: sed/compile.c:165
+msgid "unexpected `}'"
+msgstr "'{' inesperado"
+
+#: sed/compile.c:166
+msgid "extra characters after command"
+msgstr "caracteres extra após comando"
+
+#: sed/compile.c:167
+msgid "expected \\ after `a', `c' or `i'"
+msgstr "\\ esperado após 'a', 'c' ou 'i'"
+
+#: sed/compile.c:168
+msgid "`}' doesn't want any addresses"
+msgstr "'}' não quer quaisquer endereços"
+
+#: sed/compile.c:169
+msgid ": doesn't want any addresses"
+msgstr ": não quer quaisquer endereços"
+
+#: sed/compile.c:170
+msgid "comments don't accept any addresses"
+msgstr "comentários não aceitam quaisquer endereços"
+
+#: sed/compile.c:171
+msgid "missing command"
+msgstr "comando em falta"
+
+#: sed/compile.c:172
+msgid "command only uses one address"
+msgstr "comando usa apenas um endereço"
+
+#: sed/compile.c:173
+msgid "unterminated address regex"
+msgstr "expressão regular de endereço não concluída"
+
+#: sed/compile.c:174
+msgid "unterminated `s' command"
+msgstr "comando 's' não concluído"
+
+#: sed/compile.c:175
+msgid "unterminated `y' command"
+msgstr "comando 'y' não concluído"
+
+#: sed/compile.c:176
+msgid "unknown option to `s'"
+msgstr "opção desconhecida para 's'"
+
+#: sed/compile.c:177
+msgid "multiple `p' options to `s' command"
+msgstr "múltiplas opções 'p' para comando 's'"
+
+#: sed/compile.c:178
+msgid "multiple `g' options to `s' command"
+msgstr "múltiplas opções 'g' para comando 's'"
+
+#: sed/compile.c:179
+msgid "multiple number options to `s' command"
+msgstr "múltiplas opções de número para comando 's'"
+
+#: sed/compile.c:180
+msgid "number option to `s' command may not be zero"
+msgstr "opção de número para comando 's' pode não ser zero"
+
+#: sed/compile.c:181
+msgid "strings for `y' command are different lengths"
+msgstr "cadeias para o comando 'y' têm comprimentos diferentes"
+
+#: sed/compile.c:182
+msgid "delimiter character is not a single-byte character"
+msgstr "carácter delimitador não tem um único 'byte'"
+
+#: sed/compile.c:183
+msgid "expected newer version of sed"
+msgstr "esperada versão mais recente do sed"
+
+#: sed/compile.c:184
+msgid "invalid usage of line address 0"
+msgstr "uso inválido do endereço de linha 0"
+
+#: sed/compile.c:185
+#, c-format
+msgid "unknown command: `%c'"
+msgstr "comando desconhecido: '%c'"
+
+#: sed/compile.c:208
+#, c-format
+msgid "%s: file %s line %lu: %s\n"
+msgstr "%s: ficheiro %s linha %lu: %s\n"
+
+#: sed/compile.c:211
+#, 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:1664
+#, c-format
+msgid "can't find label for jump to `%s'"
+msgstr "etiqueta para saltar para '%s' não encontrada"
+
+#: sed/execute.c:701
+#, c-format
+msgid "%s: can't read %s: %s\n"
+msgstr "%s: não é possível ler %s: %s\n"
+
+#: sed/execute.c:728
+#, c-format
+msgid "couldn't edit %s: is a terminal"
+msgstr "não foi possível editar %s: é um terminal"
+
+#: sed/execute.c:733
+#, c-format
+msgid "couldn't edit %s: not a regular file"
+msgstr "não foi possível editar %s: ficheiro não regular"
+
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
+msgid "couldn't open temporary file %s: %s"
+msgstr "não foi possível abrir ficheiro temporário %s: %s"
+
+#: sed/execute.c:1270 sed/execute.c:1450
+msgid "error in subprocess"
+msgstr "erro no subprocesso"
+
+#: sed/execute.c:1272
+msgid "option `e' not supported"
+msgstr "opção 'e' não suportada"
+
+#: sed/execute.c:1452
+msgid "`e' command not supported"
+msgstr "comando 'e' não suportado"
+
+#: sed/execute.c:1796
+msgid "no input files"
+msgstr "nenhum ficheiro de entrada"
+
+#: sed/regexp.c:41
+msgid "no previous regular expression"
+msgstr "não há expressão regular anterior"
+
+#: sed/regexp.c:42
+msgid "cannot specify modifiers on empty regexp"
+msgstr "não é possível especificar modificadores numa expressão regular vazia"
+
+#: sed/regexp.c:131
+#, c-format
+msgid "invalid reference \\%d on `s' command's RHS"
+msgstr "referência \\%d inválida no RHS do comando 's'"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Envie erros encontrados para: <%s>.\n"
+"Certifique-se que inclui a palavra '%s' no campo 'Assunto:'.\n"
+
+#: sed/sed.c:119
+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"
+
+#: sed/sed.c:124
+#, 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"
+"\n"
+
+#: sed/sed.c:128
+#, 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"
+
+#: sed/sed.c:130
+#, 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"
+
+#: sed/sed.c:132
+#, 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=script\n"
+" adicionar os conteúdos de 'script' aos comandos a serem "
+"executados\n"
+
+#: sed/sed.c:135
+#, 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"
+
+#: sed/sed.c:138
+#, c-format
+msgid ""
+" -i[SUFFIX], --in-place[=SUFFIX]\n"
+" edit files in place (makes backup if extension supplied)\n"
+msgstr ""
+" -i[SUFIXO], --in-place[=SUFIXO]\n"
+" editar ficheiros no lugar (salvaguarda se extensão "
+"fornecida)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" abrir ficheiros em modo binário (CR+LFs não são processados "
+"de forma especial)\n"
+
+#: sed/sed.c:144
+#, 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"
+
+#: sed/sed.c:146
+#, c-format
+msgid ""
+" --posix\n"
+" disable all GNU extensions.\n"
+msgstr ""
+" --posix\n"
+" desactivar todas as extensões GNU.\n"
+
+#: sed/sed.c:148
+#, c-format
+msgid ""
+" -r, --regexp-extended\n"
+" use extended regular expressions in the script.\n"
+msgstr ""
+" -r, --regexp-extended\n"
+" usar expressões regulares extendidas no 'script'.\n"
+
+#: sed/sed.c:153
+#, c-format
+msgid ""
+" -s, --separate\n"
+" consider files as separate rather than as a single "
+"continuous\n"
+" long stream.\n"
+msgstr ""
+" -s, --separate\n"
+" considerar ficheiros como separados em vez de uma única "
+"longa corrente contínua.\n"
+
+#: sed/sed.c:156
+#, c-format
+msgid ""
+" -u, --unbuffered\n"
+" load minimal amounts of data from the input files and "
+"flush\n"
+" the output buffers more often\n"
+msgstr ""
+" -u, --unbuffered\n"
+" carregar quantidades mínimas de dados dos ficheiros de "
+"entrada e despejar mais frequentemente a memória temporária de saída\n"
+
+#: sed/sed.c:159
+#, c-format
+msgid " --help display this help and exit\n"
+msgstr " --help exibir esta ajuda e sair\n"
+
+#: sed/sed.c:160
+#, c-format
+msgid " --version output version information and exit\n"
+msgstr " --version exibir informação de versão e sair\n"
+
+#: sed/sed.c:161
+#, c-format
+msgid ""
+"\n"
+"If no -e, --expression, -f, or --file option is given, then the first\n"
+"non-option argument is taken as the sed script to interpret. All\n"
+"remaining arguments are names of input files; if no input files are\n"
+"specified, then the standard input is read.\n"
+"\n"
+msgstr ""
+"\n"
+"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"
+"\n"
+
+#: sed/sed.c:317
+#, c-format
+msgid "super-sed version %s\n"
+msgstr "super-sed versão %s\n"
+
+#: sed/sed.c:318
+#, c-format
+msgid ""
+"based on GNU sed version %s\n"
+"\n"
+msgstr ""
+"baseado no GNU sed versão %s\n"
+"\n"
+
+#: sed/sed.c:320
+#, c-format
+msgid "GNU sed version %s\n"
+msgstr "GNU sed versão %s\n"
+
+#: sed/sed.c:322
+#, c-format
+msgid ""
+"%s\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\n"
+"to the extent permitted by law.\n"
+msgstr ""
+"%s\n"
+"Este programa é 'software' livre; veja o código fonte para condições de\n"
+"cópia. NÃO há qualquer garantia; nem sequer para COMERCIALIZAÇÃO ou SERVIÇO\n"
+"DE PROPÓSITO PARTICULAR, para o fim permitido por lei.\n"
+
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
+msgid "cannot remove %s: %s"
+msgstr "não é possível remover %s: %s"
+
+#: sed/utils.c:163
+#, c-format
+msgid "couldn't open file %s: %s"
+msgstr "não foi possível abrir o ficheiro %s: %s"
+
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "não foi possível anexar a %s: %s"
+
+#: sed/utils.c:240
+#, c-format
+msgid "couldn't write %d item to %s: %s"
+msgid_plural "couldn't write %d items to %s: %s"
+msgstr[0] "não foi possível escrever o %d item para %s: %s"
+msgstr[1] "não foi possível escrever %d items para %s: %s"
+
+#: sed/utils.c:255 sed/utils.c:271
+#, c-format
+msgid "read error on %s: %s"
+msgstr "erro de leitura em %s: %s"
+
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "não foi possível eguir a ligação simbólica %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "não é possível obter informações de %s: %s"
+
+#: sed/utils.c:438
+#, c-format
+msgid "cannot rename %s: %s"
+msgstr "não é possível renomear %s: %s"
+
+#: lib/regcomp.c:134
+msgid "Success"
+msgstr "Sucesso"
+
+#: lib/regcomp.c:137
+msgid "No match"
+msgstr "Sem correspondência"
+
+#: lib/regcomp.c:140
+msgid "Invalid regular expression"
+msgstr "Expressão regular inválida"
+
+#: lib/regcomp.c:143
+msgid "Invalid collation character"
+msgstr "Caráter inválido"
+
+#: lib/regcomp.c:146
+msgid "Invalid character class name"
+msgstr "Nome de classe de carácter inválido"
+
+#: lib/regcomp.c:149
+msgid "Trailing backslash"
+msgstr "'Backslash' no final"
+
+#: lib/regcomp.c:152
+msgid "Invalid back reference"
+msgstr "Referência de recuo inválida"
+
+#: lib/regcomp.c:155
+msgid "Unmatched [ or [^"
+msgstr "[ ou [^ não correspondido"
+
+#: lib/regcomp.c:158
+msgid "Unmatched ( or \\("
+msgstr "( ou \\( não correspondido"
+
+#: lib/regcomp.c:161
+msgid "Unmatched \\{"
+msgstr "\\{ não correspondido"
+
+#: lib/regcomp.c:164
+msgid "Invalid content of \\{\\}"
+msgstr "Conteúdo de \\{\\} inválido"
+
+#: lib/regcomp.c:167
+msgid "Invalid range end"
+msgstr "Limite de intervalo inválido"
+
+#: lib/regcomp.c:170
+msgid "Memory exhausted"
+msgstr "Memória esgotada"
+
+#: lib/regcomp.c:173
+msgid "Invalid preceding regular expression"
+msgstr "Expressão regular precedente inválida"
+
+#: lib/regcomp.c:176
+msgid "Premature end of regular expression"
+msgstr "Fim prematuro de expressão regular"
+
+#: lib/regcomp.c:179
+msgid "Regular expression too big"
+msgstr "Expressão regular demasiado grande"
+
+#: lib/regcomp.c:182
+msgid "Unmatched ) or \\)"
+msgstr ") ou \\) não correspondido"
+
+#: lib/regcomp.c:703
+msgid "No previous regular expression"
+msgstr "Expressão regular anterior não existente"
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
index b854303..3803973 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 1890f95..2fcd536 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -1,207 +1,206 @@
-# tradues para o portugus do Brasil das mensagens de erro do sed
-# Copyright (C) 1999 Free Software Foundation, Inc.
-# Aurlio Marinho Jargas <aurelio@conectiva.com.br>, 1999, 2002.
+# Tradues para o portugus do Brasil das mensagens de erro do sed
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
+# Aurelio Jargas <verde@aurelio.net>, 1999-2008.
#
# Traduo original da verso 4.01:
-# Juan Carlos Castro y Castro <jcastro@vialink.com.br>, 2002.
+# Juan Carlos Castro y Castro <jcastro@vialink.com.br>, 2002.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.0.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2002-11-08 17:44-0300\n"
-"Last-Translator: Aurlio Marinho Jargas <aurelio@verde666.org>\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-31 09:21-0300\n"
+"Last-Translator: Aurelio Jargas <verde@aurelio.net>\n"
"Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-1\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr "Exclamaes `!' mltiplas"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "Vrgula `,' inesperada"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
msgstr "No use +N ou ~N como o primeiro endereo"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "`{' no terminada"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "`}' inesperada"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
msgstr "H caracteres sobrando aps o comando"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr "Deve haver um escape \\ depois dos comandos `a', `c' e `i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' no recebe endereos"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr "`:' no recebe endereos"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr "Comentrios no aceitam endereos"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
msgstr "Falta especificar um comando ao endereo"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
msgstr "Este comando usa apenas um endereo"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
msgstr "A expresso regular do endereo est inacabada (falta a /)"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
msgstr "Comando `s' inacabado (s/// - faltou delimitador)"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
msgstr "Comando `y' inacabado (y/// - faltou delimitador)"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
msgstr "Opo desconhecida para o comando `s' (s///?)"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "opes `p' mltiplas para o comando `s'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "opes `g' mltiplas para o comando `s'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "opes numricas mltiplas para o comando `s' (s///n)"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "A opo numrica para o comando `s' no pode ser zero (s///0)"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr "Os textos para o comando `y' tm tamanhos diferentes (y/abc/z/)"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "O delimitador deve ser um caractere normal, ASCII"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr ""
+msgstr "Esperada uma verso mais recente do sed"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Uso incorreto do modificador de endereo"
+msgstr "Uso incorreto do endereo de linha 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Comando desconhecido:"
+msgstr "Comando desconhecido: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: arquivo %s linha %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresso #%lu, caractere %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
msgstr "No foi possvel encontrar a marcao `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: no foi possvel ler %s: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "No foi possvel abrir o arquivo %s: %s"
+msgstr "No foi possvel editar %s, pois um terminal"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "No foi possvel abrir o arquivo %s: %s"
+msgstr "No foi possvel editar %s, pois no um arquivo comum"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "No foi possvel abrir o arquivo %s: %s"
+msgstr "No foi possvel abrir o arquivo temporrio %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "erro no subprocesso"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "opo `e' no suportada"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "comando `e' no suportado"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "nenhum arquivo de entrada"
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr "No h expresso regular anterior"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr "No permitido especificar modificadores numa expresso regular vazia"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "Referncia invlida \\%d na segunda parte do comando `s'"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Envie relatrios de erros (em ingls) para: <%s>.\n"
+"Inclua a palavra ``%s'' no campo ``Assunto:'' ou ``Subject:''.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -209,66 +208,103 @@ msgstr ""
" -R, --regexp-perl\n"
" usar sintaxe de expresses regulares do Perl 5 no script.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Uso: %s [OPO]... {script-apenas-se-for-nico} [arquivo-entrada]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" suprime a impresso automtica do buffer padro\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e script, --expression=script\n"
+" adiciona o script aos comandos a serem executados\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
" add the contents of script-file to the commands to be "
"executed\n"
msgstr ""
+" -f script-file, --file=script-file\n"
+" adiciona o contedo do arquivo-script aos comandos\n"
+" a serem executados\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" segue links simblicos ao editar o prprio arquivo "
+"original\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[SUFIXO], --in-place[=SUFIXO]\n"
+" edita o arquivo original (faz backup se usado SUFIXO)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" abre os arquivos em modo binrio (CR+LFs no so "
+"especiais)\n"
+
+#: sed/sed.c:144
#, 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"
+" determina comprimento da quebra de linha para comando `l'\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" desativa todas as extenses GNU.\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" usar sintaxe de expresses regulares do Perl 5 no script.\n"
+" -r, --regexp-extended\n"
+" usar sintaxe moderna de expresses regulares (sem "
+"escapes).\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -276,8 +312,11 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" considera arquivos como entidades separadas, e no como um\n"
+" longo e nico fluxo de dados.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -285,18 +324,22 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" carrega uma quantidade mnima de dados dos arquivos de "
+"entrada\n"
+" e descarrega os buffers de sada com mais freqncia\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help mostra esta ajuda e sai\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version mostra informaes sobre a verso e sai\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -306,36 +349,34 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Se nenhuma opo -e, --expression, -f, ou --file dada, o primeiro\n"
+"argumento que no seja uma opo considerado como o script sed a ser\n"
+"interpretado. Todos os argumentos restantes so considerados como\n"
+"nomes de arquivos de entrada. Caso nenhum arquivo de entrada seja\n"
+"especificado, ento a entrada padro ser lida.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Envie relatrios de erros (em ingls) para: %s .\n"
-"Inclua a palavra ``%s'' no campo ``Assunto:'' ou ``Subject:''.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed verso %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"baseado no GNU sed verso 3.02.80\n"
+"baseado no GNU sed verso %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed verso %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -348,101 +389,116 @@ msgstr ""
"de cpia. NO h garantias, nem mesmo para os aspectos mercantis ou de\n"
"atendimento a finalidades especficas, tanto quanto a lei permita.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: no foi possvel ler %s: %s\n"
+msgstr "No foi possvel remover %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
msgstr "No foi possvel abrir o arquivo %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "no foi possvel anexar ao %s: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "no foi possvel escrever %d item para %s: %s"
msgstr[1] "no foi possvel escrever %d items para %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "erro de leitura em %s: %s"
-#: lib/utils.c:341
-#, fuzzy, c-format
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "No foi possvel seguir o link %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "No foi possvel ler %s: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: no foi possvel ler %s: %s\n"
+msgstr "No foi possvel renomear %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Sucesso"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Nada encontrado"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Expresso regular invlida"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Caractere de ordenao invlido"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Nome invlido de classe de caracteres"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Escape \\ no final"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Retrovisor \\n invlido"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "[ ou [^ no terminado"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "( ou \\( no terminado"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "\\{ no terminado"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Contedo invlido no \\{\\} (permitidos nmeros e vrgula)"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Fim de intervalo (range) invlido"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Falta de memria"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Expresso regular anterior invlida"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Fim prematuro da expresso regular"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Expresso regular grande demais"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr ") or \\) inesperado"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "No h expresso regular anterior"
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644
index 0000000..2436c49
--- /dev/null
+++ b/po/remove-potcdate.sin
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/ro.gmo b/po/ro.gmo
index 978ef97..96a10d4 100644
--- a/po/ro.gmo
+++ b/po/ro.gmo
Binary files differ
diff --git a/po/ro.po b/po/ro.po
index 5ecbbb6..0e2f14d 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -1,206 +1,204 @@
# Mesajele n limba romn pentru sed.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2004 Free Software Foundation, Inc.
# Acest fiier este distribuit sub aceeai licen ca i pachetul sed.
-# Laurentiu Buzdugan <buzdugan@voyager.net>, 2003.
+# Laurentiu Buzdugan <lbuz@rolix.org>, 2003,2004,2005.
#
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.0.8\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2003-11-22 12:00-0500\n"
-"Last-Translator: Laurentiu Buzdugan <buzdugan@voyager.net>\n"
+"Project-Id-Version: sed 4.1.4\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr "`!'-uri multiple"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr "`,' neateptat"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "Nu se poate folosi +N i ~N ca prima adres"
+msgstr "Nu se poate folosi +N sau ~N ca prima adres"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "`{' fr pereche"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr "`}' neateptat"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Extra caractere dup comand"
+msgstr "extra caractere dup comand"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "Este ateptat \\ dup `a', `c' sau `i'"
+msgstr "este ateptat \\ dup `a', `c' sau `i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' nu vrea nici o adres"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": nu vrea nici o adres"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "Comentariile nu accept nici o adres"
+msgstr "comentariile nu accept nici o adres"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr "Comand absent"
+msgstr "comand absent"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "Comanda folosete numai o adres"
+msgstr "comanda folosete numai o adres"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "Adres regex neterminat"
+msgstr "regex adres neterminat"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "Comand `s' neterminat"
+msgstr "comand `s' neterminat"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "Comand `y' neterminat"
+msgstr "comand `y' neterminat"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "Opiune necunoscut pentru `s'"
+msgstr "opiune necunoscut pentru `s'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "multiple opiuni `p' pentru comanda `s'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "multiple opiuni `g' pentru comanda `s'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "numr multiplu de opiuni pentru comanda `s'"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "numrul de opiuni pentru comanda `s' nu poate fi zero"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr "irurile pentru comanda y au lungimi diferite"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "caacterul delimitator nu este un caracter de un octet"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "am ateptat o versiune mai recent de sed"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Comanda folosete numai o adres"
+msgstr "folosire invalid adres linie 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Comand necunoscut:"
+msgstr "comand necunoscut: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fiierul %s linia %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e expresia #%lu, caracterul %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "Nu pot gsi eticheta pentru saltul la `%s'"
+msgstr "nu pot gsi eticheta pentru saltul la `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: nu pot citi %s: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Nu am putut deschide fiierul %s: %s"
+msgstr "nu am putut edita %s: acesta este un terminal"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Nu am putut deschide fiierul %s: %s"
+msgstr "nu ap putu edita %s: acesta nu este un fiier normal"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Nu am putut deschide fiierul temporar %s: %s"
+msgstr "nu am putut deschide fiierul temporar %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "eroare n subproces"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "opiunea `e' nu e suportat"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "comanda `e' nu e suportat"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr "Nici o expresie regular anterioar"
+msgstr "nici o expresie regular anterioar"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "Nu se pot specifica modificatori pentru regexp vid"
+msgstr "nu se pot specifica modificatori pentru regexp vid"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Referin invalid \\%d pentru RHS-ul comanzii `s'"
+msgstr "referin invalid \\%d pentru expresia din dreapta a comenzii `s'"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
-#: sed/sed.c:93
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Raportai bug-uri prin e-mail la: <%s>.\n"
+"Fii siguri c includei ``%s'' undeva n cmpul ``Subject:''.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -209,67 +207,99 @@ msgstr ""
" folosete sintaxa expresiilor regulare din Perl 5 n "
"script.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Folosire: %s [OPIUNE]... {script-dac-nu-alt-script} [fiier-intrare]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" elimin afiarea automat a spaiului de pattern\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e script, --expression=script\n"
+" adaug scriptul la comenzile ce trebuie executate\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, 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"
+" adaug coninutul scriptului-fiier la comenzile ce\n"
+" trebuie executate\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[SUFIX], --in-place[=SUFIX]\n"
+" editeaz fiierele pe loc (creaz copii de siguran\n"
+" dac este furnizat extensia)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, 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"
+" specific lungimea dorit pentru trecut la linia urmtoare\n"
+" pentru comanda `l'\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" deactiveaz toate extensiile GNU.\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" folosete sintaxa expresiilor regulare din Perl 5 n "
+" -r, --regexp-extended\n"
+" folosete sintaxa extins a expresiilor regulare n "
"script.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -277,8 +307,11 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" consider fiierele ca fiind separate, n loc de a le\n"
+" considera un flux lung continuu.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -286,18 +319,22 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" ncarc o cantitate minim de date din fiierele de "
+"intrare\n"
+" i golete bufferele mai des\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help afieaz aceste mesaje i termin\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version afieaz informaii despre versiune i termin\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -307,36 +344,35 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Dac nu este dat nici una din opiunile -e, --expression, -f, sau --file,\n"
+"atunci primul argument non-opiune este luat ca scriptul sed de "
+"interpretat.\n"
+"Toate argumentele rmase sunt considerate nume de fiiere de intrare; dac\n"
+"nu este specificat nici un fiier de intrare, este citit intrarea "
+"standard.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Raportai bug-uri prin e-mail la: %s .\n"
-"Fii siguri c includei ``%s'' undeva n cmpul ``Subject:''.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "versiunea super-sed %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"bazat pe GNU sed versiunea 3.02.80\n"
+"bazat pe GNU sed versiunea %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed versiunea %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -350,101 +386,116 @@ msgstr ""
"Nu exist NICI o garanie; nici mcar pentru VANDABILITATE sau POTRIVIRE \n"
"PENTRU UN ANUME SCOP, conform legilor n vigoare.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: nu pot citi %s: %s\n"
+msgstr "nu pot terge %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr "Nu am putut deschide fiierul %s: %s"
+msgstr "nu am putut deschide fiierul %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "Nu am putut scrie %d articol n %s: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d 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"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "eroare citire pentru %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "nu am putut deschide fiierul %s: %s"
+
+#: sed/utils.c:407
#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "nu pot redenumi %s: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: nu pot citi %s: %s\n"
+msgstr "nu pot redenumi %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Succes"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Nici o potrivire"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Expresie regular incorect"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Colaiune de caractere incorect"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Nume de clas de caractere incorect"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Backslash n coad"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Referin napoi incorect"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "[ sau [^ fr pereche"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "( sau \\( fr pereche"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "\\{ fr pereche"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Coninut incorect pentru \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Sfrit de interval incorect"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Memorie epuizat"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Expresie regular precedent incorect"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Sfrit prematur al expresiei regulare"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Expresie regular prea mare"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr ") sau \\) fr pereche"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Nici o expresie regular anterioar"
diff --git a/po/ru.gmo b/po/ru.gmo
index 9268e28..d276447 100644
--- a/po/ru.gmo
+++ b/po/ru.gmo
Binary files differ
diff --git a/po/ru.po b/po/ru.po
index 21300ac..8b527df 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,225 +1,240 @@
-# Translation of sed-4.1.1.po to Russian
+# Translation of sed to Russian
# Copyright (C) 1998, 2004 Free Software Foundation, Inc.
# Const Kaplinsky <const@ce.cctpu.edu.ru>, 1998.
-# Pavel Maryanov <acid_jack@ukr.net>, 2004.
+# Pavel Maryanov <acid_jack@ukr.net>, 2004, 2008.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed-4.1.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2004-07-07 17:54+0300\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-17 23:34+0200\n"
"Last-Translator: Pavel Maryanov <acid_jack@ukr.net>\n"
-"Language-Team: Russian <ru@li.org>\n"
+"Language-Team: Russian <gnu@mx.ru>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=KOI8-R\n"
+"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n>1;\n"
-"X-Generator: KBabel 1.3\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr " `!'"
+msgstr "несколько символов `!'"
-#: sed/compile.c:163
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr " `,'"
+msgstr "непредвиденный символ `,'"
-#: sed/compile.c:164
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr " +N ~N "
+msgstr "использование +N или ~N в качестве первого адреса недопустимо"
-#: sed/compile.c:165
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr " `{'"
+msgstr "непарный символ `{'"
-#: sed/compile.c:166
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr " `}'"
+msgstr "непредвиденный символ `}'"
-#: sed/compile.c:167
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr " "
+msgstr "лишние символы после команды"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr " \\ `a', `c' `i'"
+msgstr "ожидалась \\ после `a', `c' или `i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
-msgstr "`}' - "
+msgstr "`}' не допускает указания каких-либо адресов"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
-msgstr "`:' - "
+msgstr "`:' не допускает указания каких-либо адресов"
-#: sed/compile.c:171
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr " - "
+msgstr "комментарии не допускают указания каких-либо адресов"
-#: sed/compile.c:172
+#: sed/compile.c:171
msgid "missing command"
-msgstr " "
+msgstr "отсутствует команда"
-#: sed/compile.c:173
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr " "
+msgstr "команда использует только один адрес"
-#: sed/compile.c:174
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr " "
+msgstr "незавершенное адресное регулярное выражение"
-#: sed/compile.c:175
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr " `s'"
+msgstr "незавершенная команда `s'"
-#: sed/compile.c:176
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr " `y'"
+msgstr "незавершенная команда `y'"
-#: sed/compile.c:177
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr " `s'"
+msgstr "неизвестный модификатор к `s'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
-msgstr " `p' `s'"
+msgstr "несколько модификаторов `p' с командой `s'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
-msgstr " `g' `s'"
+msgstr "несколько модификаторов `g' с командой `s'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
-msgstr " `s'"
+msgstr "несколько числовых модификаторов с командой `s'"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
-msgstr " `s' "
+msgstr "числовой модификатор для команды `s' не может быть нулевым"
-#: sed/compile.c:182
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr " `y' "
+msgstr "строки для команды `y' имеют разную длину"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr "- "
+msgstr "символ-разделитель не является однобайтовым символом"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr " sed"
+msgstr "ожидалась более новая версия sed"
-#: sed/compile.c:185
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr " 0"
+msgstr "недопустимое использование строки адреса 0"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
-msgstr " : `%c'"
+msgstr "неизвестная команда: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
-msgstr "%s: %s %lu: %s\n"
+msgstr "%s: файл %s строка %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
-msgstr "%s: -e #%lu, %lu: %s\n"
+msgstr "%s: -e выражение #%lu, символ %lu: %s\n"
-#: sed/compile.c:1644
+#: sed/compile.c:1664
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr " `%s'"
+msgstr "невозможно найти метку для перехода к `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: %s: %s\n"
+msgstr "%s: невозможно прочитать %s: %s\n"
-#: sed/execute.c:673
+#: sed/execute.c:728
#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr " %s: "
+msgstr "невозможно редактировать %s: это терминал"
-#: sed/execute.c:677
+#: sed/execute.c:733
#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr " %s: "
+msgstr "невозможно редактировать %s: это не обычный файл"
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr " %s: %s"
+msgstr "невозможно открыть временный файл %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
-msgstr " "
+msgstr "ошибка в подпроцессе"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
-msgstr " `e' "
+msgstr "опция `e' не поддерживается"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
-msgstr " `e' "
+msgstr "команда `e' не поддерживается"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "отсутствуют входные файлы"
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr " "
+msgstr "нет предыдущего регулярного выражения"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr " "
+msgstr "невозможно указать модификаторы в пустом регулярном выражении"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr " \\%d RHS `s'"
+msgstr "недопустимая ссылка \\%d на RHS команды `s'"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Отчеты об ошибках отправляйте по адресу: <%s>.\n"
+"Убедитесь, что включили где-либо в поле ``Тема:'' слово ``%s''.\n"
-#: sed/sed.c:93
+#: sed/sed.c:119
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:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-": %s []... {-----} "
-"[-]...\n"
+"Использование: %s [ОПЦИЯ]... {только-скрипт-если-нет-другого-скрипта} "
+"[входной-файл]...\n"
"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" \n"
+" не выводить автоматически промежутки\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, 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"
+" добавление скрипта в исполняемые команды\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -227,46 +242,66 @@ msgid ""
"executed\n"
msgstr ""
" -f script-file, --file=script-file\n"
-" - \n"
+" добавление содержимого файла-скрипта в исполняемые команды\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" переходить по символьным ссылкам при обработке на месте\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
-" -i[], --in-place[=]\n"
-" ( , "
-")\n"
+" -i[СУФФИКС], --in-place[=СУФФИКС]\n"
+" редактирование файлов на месте (создает копию, если указано "
+"расширение)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" открывать файлы в бинарном режиме (CR+LF не "
+"обрабатываются)\n"
-#: sed/sed.c:110
+#: sed/sed.c:144
#, 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:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" GNU.\n"
+" отключение всех расширений GNU.\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
" -r, --regexp-extended\n"
-" .\n"
+" использование в скрипте расширенных регулярных выражений.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -275,10 +310,10 @@ msgid ""
" long stream.\n"
msgstr ""
" -s, --separate\n"
-" , , \n"
-" .\n"
+" допущение, что файлы разделены, а не в виде одного\n"
+" длинного непрерывного потока.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -287,20 +322,20 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" \n"
-" \n"
+" загрузка минимального объема данных из входных файлов\n"
+" и более частый сброс на диск выходных буферов\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr " --help \n"
+msgstr " --help вывод этой справки и выход\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr " --version \n"
+msgstr " --version вывод информации о версии и выход\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -311,41 +346,32 @@ msgid ""
"\n"
msgstr ""
"\n"
-" -e, --expression, -f, --file , \n"
-" sed . \n"
-" ; \n"
-" , .\n"
+"Если опция -e, --expression, -f, или --file не указана, тогда первый\n"
+"неопциональный аргумент берется как скрипт sed для интерпретации. Все\n"
+"оставшиеся аргументы являются именами входных файлов; если входные\n"
+"файлы не указаны, тогда читается стантартный ввод.\n"
"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-" : %s .\n"
-", - ``:'' ``%s''.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
-msgstr "super-sed %s\n"
+msgstr "super-sed версия %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-" GNU sed %s\n"
+"основан на GNU sed версии %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
-msgstr "GNU sed %s\n"
+msgstr "GNU sed версия %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -354,106 +380,121 @@ msgid ""
"to the extent permitted by law.\n"
msgstr ""
"%s\n"
-" ; \n"
-" . ; \n"
-" , ,\n"
-" .\n"
+"Это свободное программное обеспечение; условия его копирования смотрите в\n"
+"исходных текстах. Не предоставляется НИКАКОЙ гарантии; даже гарантии\n"
+"ПРИГОДНОСТИ ДЛЯ ПРОДАЖИ или ПРИМЕНИМОСТИ ДЛЯ КОНКРЕТНОЙ ЦЕЛИ, в той мере,\n"
+"в которой это может быть допущено законодательством.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, c-format
msgid "cannot remove %s: %s"
-msgstr " %s: %s"
+msgstr "невозможно удалить %s: %s"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, c-format
msgid "couldn't open file %s: %s"
-msgstr " %s: %s"
+msgstr "невозможно открыть файл %s: %s"
+
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "невозможно прикрепить к %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] " %d %s: %s"
-msgstr[1] " %d %s: %s"
+msgstr[0] "невозможно записать %d элемент в %s: %s"
+msgstr[1] "невозможно записать %d элементов в %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
-msgstr " %s: %s"
+msgstr "ошибка чтения %s: %s"
+
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "невозможно перейти по символьной ссылке %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "невозможно выполнить stat для %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:438
#, c-format
msgid "cannot rename %s: %s"
-msgstr " %s: %s"
+msgstr "невозможно переименовать %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
-msgstr ""
+msgstr "Успешно"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
-msgstr " "
+msgstr "Нет соотвествия"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
-msgstr " "
+msgstr "Недопустимое регулярное выражение"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
-msgstr " "
+msgstr "Недопустимый символ сравнения"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
-msgstr " "
+msgstr "Недопустимое имя для класса символа"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
-msgstr " "
+msgstr "Завершающая обратная косая черта"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
-msgstr " "
+msgstr "Недопустимая обратная ссылка"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
-msgstr " [ [^"
+msgstr "Непарный символ [ или [^"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
-msgstr " ( or \\("
+msgstr "Непарный символ ( or \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
-msgstr " \\{"
+msgstr "Непарный символ \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
-msgstr " \\{\\}"
+msgstr "Недопустимое содержимое в \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
-msgstr " "
+msgstr "Недопустимое окончание диапазона"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
-msgstr " "
+msgstr "Память исчерпана"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
-msgstr " "
+msgstr "Недопустимое предшествующее регулярное выражение"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
-msgstr " "
+msgstr "Преждевременное окончание регулярного выражения"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
-msgstr " "
+msgstr "Регулярное выражение слишком большое"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
-msgstr " ) \\)"
+msgstr "Непарный символ ) или \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
-msgstr " "
+msgstr "Нет предыдущего регулярного выражения"
diff --git a/po/sed.pot b/po/sed.pot
index dca524c..f287341 100644
--- a/po/sed.pot
+++ b/po/sed.pot
@@ -7,8 +7,8 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\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"
@@ -17,199 +17,213 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr ""
-#: sed/compile.c:163
+#: sed/compile.c:162
msgid "unexpected `,'"
msgstr ""
-#: sed/compile.c:164
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
msgstr ""
-#: sed/compile.c:165
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr ""
-#: sed/compile.c:166
+#: sed/compile.c:165
msgid "unexpected `}'"
msgstr ""
-#: sed/compile.c:167
+#: sed/compile.c:166
msgid "extra characters after command"
msgstr ""
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr ""
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr ""
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ""
-#: sed/compile.c:171
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr ""
-#: sed/compile.c:172
+#: sed/compile.c:171
msgid "missing command"
msgstr ""
-#: sed/compile.c:173
+#: sed/compile.c:172
msgid "command only uses one address"
msgstr ""
-#: sed/compile.c:174
+#: sed/compile.c:173
msgid "unterminated address regex"
msgstr ""
-#: sed/compile.c:175
+#: sed/compile.c:174
msgid "unterminated `s' command"
msgstr ""
-#: sed/compile.c:176
+#: sed/compile.c:175
msgid "unterminated `y' command"
msgstr ""
-#: sed/compile.c:177
+#: sed/compile.c:176
msgid "unknown option to `s'"
msgstr ""
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr ""
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr ""
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr ""
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr ""
-#: sed/compile.c:182
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr ""
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
msgstr ""
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr ""
-#: sed/compile.c:185
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
msgstr ""
-#: sed/compile.c:186
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
msgstr ""
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr ""
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr ""
-#: sed/compile.c:1644
+#: sed/compile.c:1664
#, c-format
msgid "can't find label for jump to `%s'"
msgstr ""
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr ""
-#: sed/execute.c:673
+#: sed/execute.c:728
#, c-format
msgid "couldn't edit %s: is a terminal"
msgstr ""
-#: sed/execute.c:677
+#: sed/execute.c:733
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr ""
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, c-format
msgid "couldn't open temporary file %s: %s"
msgstr ""
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr ""
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr ""
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr ""
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
msgstr ""
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
msgstr ""
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr ""
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -217,35 +231,50 @@ msgid ""
"executed\n"
msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -254,7 +283,7 @@ msgid ""
" long stream.\n"
msgstr ""
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -263,17 +292,17 @@ msgid ""
" the output buffers more often\n"
msgstr ""
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
msgstr ""
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr ""
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -284,31 +313,24 @@ msgid ""
"\n"
msgstr ""
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr ""
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr ""
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -317,101 +339,116 @@ msgid ""
"to the extent permitted by law.\n"
msgstr ""
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, c-format
msgid "cannot remove %s: %s"
msgstr ""
-#: lib/utils.c:143
+#: sed/utils.c:163
#, c-format
msgid "couldn't open file %s: %s"
msgstr ""
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr ""
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] ""
msgstr[1] ""
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr ""
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr ""
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr ""
+
+#: sed/utils.c:438
#, c-format
msgid "cannot rename %s: %s"
msgstr ""
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr ""
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr ""
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr ""
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr ""
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr ""
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr ""
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr ""
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr ""
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr ""
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr ""
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr ""
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr ""
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr ""
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr ""
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr ""
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr ""
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr ""
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr ""
diff --git a/po/sk.gmo b/po/sk.gmo
index 07927ff..68e1d47 100644
--- a/po/sk.gmo
+++ b/po/sk.gmo
Binary files differ
diff --git a/po/sk.po b/po/sk.po
index 258f7f8..1f29e2b 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -1,14 +1,14 @@
# Slovak translations for GNU sed package.
-# Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
-# Marcel Telka <marcel@telka.sk>, 2002, 2003.
+# Copyright (C) 1999, 2002, 2003, 2004, 2005, 2008 Free Software Foundation, Inc.
+# Marcel Telka <marcel@telka.sk>, 2002, 2003, 2004, 2005, 2008.
# Miroslav Vasko <vasko@debian.cz>, 1999.
#
msgid ""
msgstr ""
-"Project-Id-Version: GNU sed 4.0.8\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2003-10-25 17:22+0200\n"
+"Project-Id-Version: GNU sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-19 13:38+0100\n"
"Last-Translator: Marcel Telka <marcel@telka.sk>\n"
"Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
"MIME-Version: 1.0\n"
@@ -16,190 +16,190 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural= (n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "Viacnásobný `!'"
+msgstr "viacnásobný `!'"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr "Neočakávaná `,'"
+msgstr "neočakávaná `,'"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
msgstr "+N alebo ~N sa nedá použiť ako prvá adresa"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr "Nezodpovedajúca `{'"
+msgstr "nezodpovedajúca `{'"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr "Neočakávaná `}'"
+msgstr "neočakávaná `}'"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Nadbytočné znaky po príkaze"
+msgstr "nadbytočné znaky po príkaze"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "Očakávané \\ po `a', `c' alebo `i'"
+msgstr "očakávané \\ po `a', `c' alebo `i'"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "`}' nevyžaduje akúkoľvek adresu"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": nechce akúkoľvek adresu"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "V komentári nie je prípustná akákoľvek adresa"
+msgstr "v komentári nie je prípustná akákoľvek adresa"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr "Chýbajúci príkaz"
+msgstr "chýbajúci príkaz"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "Príkaz používa iba jednu adresu"
+msgstr "príkaz používa iba jednu adresu"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "Neukončený regulárny výraz adresy"
+msgstr "neukončený regulárny výraz adresy"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "Neukončený príkaz `s'"
+msgstr "neukončený príkaz `s'"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "Neukončený príkaz `y'"
+msgstr "neukončený príkaz `y'"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "Neznáma voľba pre `s'"
+msgstr "neznáma voľba pre `s'"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "viacnásobné použitie voľby `p' s príkazom `s'"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "viacnásobné použitie voľby `g' s príkazom `s'"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "príkaz `s' môže mať maximálne jednu číselnú voľbu"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "číselná voľba príkazu `s' nemôže byť nula"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
msgstr "reťazce pre príkaz `y' majú rôzne dĺžky"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "oddeľovací znak nie je jednobajtový"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "očakávaná novšia verzia programu sed"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Príkaz používa iba jednu adresu"
+msgstr "neplatné použitie adresy riadku 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Neznámy príkaz:"
+msgstr "neznámy príkaz: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: súbor %s, riadok %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, 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
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "Návestie pre skok na `%s' nie je možné nájsť?"
+msgstr "nie je možné nájsť návestie pre skok na `%s'"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s nie je možné čítať: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Nebolo možné otvoriť súbor %s: %s"
+msgstr "nebolo možné upraviť %s: je to terminál"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Nebolo možné otvoriť súbor %s: %s"
+msgstr "nebolo možné upraviť %s: nie je to bežný súbor"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Nebolo možné otvoriť dočasný súbor %s: %s"
+msgstr "nebolo možné otvoriť dočasný súbor %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "chyba v podprocese"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "voľba `e' nie je podporovaná"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "príkaz `e' nie je podporovaný"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "bez vstupných súborov"
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr "Bez predchádzajúceho regulárneho výrazu"
+msgstr "bez predchádzajúceho regulárneho výrazu"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "Nie je možné zadať modifikátory pre prázdny regulárny výraz"
+msgstr "nie je možné zadať modifikátory pre prázdny regulárny výraz"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Neplatný odkaz \\%d na `s' príkazu RHS"
+msgstr "neplatný odkaz \\%d na `s' príkazu RHS"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Správy o chybách zasielajte na adresu <%s> (iba anglicky).\n"
+"Prosím vložte slovo ``%s'' niekde do položky ``Predmet:''\n"
+"Komentáre k slovenskému prekladu zasielajte na adresu <sk-i18n@lists.linux."
+"sk>.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -207,66 +207,104 @@ msgstr ""
" -R, --regexp-perl\n"
" použiť syntax regulárnych výrazov z Perlu 5 v skripte.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Použitie: %s [VOĽBA]... {skript-len-ak-nie-je-iný-skript} [vstupný-"
+"súbor]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" potlačiť automatický výpis priestoru vzorov\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e skript, --expression=skript\n"
+" pridať skript k príkazom, ktoré majú byť vykonané\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
" add the contents of script-file to the commands to be "
"executed\n"
msgstr ""
+" -f skript-súbor, --file=skript-súbor\n"
+" pridať obsah súboru skript-súbor k príkazom, ktoré majú byť "
+"vykonané\n"
-#: sed/sed.c:108
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" nasledovať symbolické odkazy pri spracovávaní na mieste\n"
+
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[PRÍPONA], --in-place[=PRÍPONA]\n"
+" upraviť súbory na mieste (vytvoria sa zálohy, ak je zadaná "
+"prípona)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" otvoriť súbory v binárnom režime (CR+LF nie sú špeciálne "
+"spracovávané)\n"
-#: sed/sed.c:110
+#: sed/sed.c:144
#, 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"
+" nastaviť požadovanú dĺžku pre zalomenie riadkov pre príkaz "
+"`l'\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" zakázať všetky rozšírenia GNU.\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" použiť syntax regulárnych výrazov z Perlu 5 v skripte.\n"
+" -r, --regexp-extended\n"
+" použiť rozšírené regulárne výrazy v skripte.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -274,8 +312,10 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" spracovať súbory ako oddelené a nie ako jeden spojitý.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -283,18 +323,22 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" načítať minimálne množstvá dát zo vstupných súborov a "
+"vyprázdňovať\n"
+" výstupné vyrovnávacie pamäte častejšie\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help vypísať túto pomoc a skončiť\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version vypísať informáciu o verzii a skončiť\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -304,38 +348,34 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Ak nie je zadaná žiadna z volieb -e, --expression, -f, alebo --file,\n"
+"potom prvý parameter, ktorý nie je voľbou, bude považovaný za sed skript,\n"
+"ktorý má byť interpretovaný. Všetky ostatné parametre sú názvy vstupných "
+"súborov.\n"
+"Ak nebudú vstupné súbory zadané, bude čítaný štandardný vstup.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Správy o chybách zasielajte na adresu %s (iba anglicky).\n"
-"Prosím vložte slovo ``%s'' niekde do položky ``Predmet:''\n"
-"Komentáre k slovenskému prekladu zasielajte na adresu <sk-i18n@lists.linux."
-"sk>.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed verzia %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"založené na GNU sed verzia 3.02.80\n"
+"založené na GNU sed verzia %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed verzia %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -349,17 +389,22 @@ msgstr ""
"nájdete v zdrojových textoch. Toto programové vybavenie je BEZ záruky,\n"
"a to aj bez záruky PREDAJNOSTI alebo VHODNOSTI PRE NEJAKÝ KONKRÉTNY ÚČEL.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: %s nie je možné čítať: %s\n"
+msgstr "nepodarilo sa odstrániť %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr "Nebolo možné otvoriť súbor %s: %s"
+msgstr "nebolo možné otvoriť súbor %s: %s"
+
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "nebolo možné sa pripojiť k %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
@@ -367,84 +412,94 @@ msgstr[0] "nebolo možné zapísať %d položiek do %s: %s"
msgstr[1] "nebolo možné zapísať %d položku do %s: %s"
msgstr[2] "nebolo možné zapísať %d položky do %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "chyba pri čítaní z %s: %s"
-#: lib/utils.c:341
-#, fuzzy, c-format
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "nebolo možné nasledovať symbolický odkaz %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "nepodarilo sa zistiť stav %s: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: %s nie je možné čítať: %s\n"
+msgstr "nepodarilo sa premenovať %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Úspech"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Nezodpovedá"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Neplatný regulárny výraz"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Neplatný znak pre porovnávanie"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Neplatný názov triedy znakov"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Ukončovacie opačné lomítko"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Neplatný spätný odkaz"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Nezodpovedajúca [ alebo [^"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Nezodpovedajúca ( alebo \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Nezodpovedajúca \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Neplatný obsah \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Neplatný koniec rozsahu"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Vyčerpaná pamäť"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Neplatný predchádzajúci regulárny výraz"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Neočakávaný koniec regulárneho výrazu"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Regulárny výraz je príliš veľký"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Nezodpovedajúca ) alebo \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Bez predchádzajúceho regulárneho výrazu"
diff --git a/po/sl.gmo b/po/sl.gmo
index 6721a74..ccfb37c 100644
--- a/po/sl.gmo
+++ b/po/sl.gmo
Binary files differ
diff --git a/po/sl.po b/po/sl.po
index 00f5ba9..7a6681a 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -1,205 +1,205 @@
-# -*- mode:po; coding:iso-latin-2;-*- Slovenian message catalogue for GNU sed.
-# Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-# Primo Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>, 2000, 2001, 2002, 2003.
+# -*- mode:po; coding:utf-8;-*- Slovenian message catalogue for GNU sed.
+# Copyright (C) 2000, 2001, 2002, 2003, 2005, 2007, 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed package.
+# Primož Peterlin <primozz.peterlin@gmail.com>, 2000-2003, 2005, 2007, 2008.
+# $Id: sed-4.2.0.sl.po,v 1.3 2008/04/25 12:08:48 peterlin Exp $
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.0.6\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2003-04-02 17:20+0200\n"
-"Last-Translator: Primo Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-04-25 14:08+0200\n"
+"Last-Translator: Primož Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>\n"
"Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
"%100==4 ? 3 : 0);\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "Veterni klicaji \"!\""
+msgstr "večterni klicaji »!«"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr "Nepriakovana vejica \",\""
+msgstr "nepričakovana vejica »,«"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "Obliki +N in ~N nista dovoljeni kot zaetna naslova"
+msgstr "nepravilna raba izbir +N ali ~N kot začetnih naslovov"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr "Oklepaj { brez zaklepaja"
+msgstr "oklepaj { brez zaklepaja"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr "Nepriakovan zaklepaj }"
+msgstr "nepričakovan zaklepaj }"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Ukazu sledijo dodatni znaki"
+msgstr "dodatni znaki za ukazom"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "Za ,a`, ,c` ali ,i` se priakuje \\"
+msgstr "Za »a«, »c« ali »i« se pričakuje \\"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "Zaklepaj } ne zahteva naslova"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": ne zahteva naslova"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "Komentarji ne sprejemajo naslovov"
+msgstr "komentarji ne sprejemajo naslovov"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr "Ukaz manjka"
+msgstr "manjkajoč ukaz"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "Ukaz uporablja le en naslov"
+msgstr "ukaz uporablja le en naslov"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "Regularni izraz z nezakljuenim naslovom"
+msgstr "regularni izraz z nezaključenim naslovom"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "Nezakljuen ukaz \"s\""
+msgstr "nezaključen ukaz »s«"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "Nezakljuen ukaz \"y\""
+msgstr "nezaključen ukaz »y«"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "Neznane izbire pri ukazu \"s\""
+msgstr "neznana izbira pri ukazu »s«"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
-msgstr "veterne izbire \"p\" pri ukazu \"s\""
+msgstr "večterne izbire »p« pri ukazu »s«"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
-msgstr "veterne izbire \"g\" pri ukazu \"s\""
+msgstr "večterne izbire »g« pri ukazu »s«"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
-msgstr "veterne tevilne izbire pri ukazu \"s\""
+msgstr "večterne številčne izbire pri ukazu »s«"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
-msgstr "tevilna izbira pri ukazu \"s\" mora biti nenielna"
+msgstr "številčna izbira pri ukazu »s« mora biti neničelna"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "niza pri ukazu \"y\" sta razlino dolga"
+msgstr "niza pri ukazu »y« sta različno dolga"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "razmejilni znak je dolg več kot en bajt"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr "priakovana noveja izdaja programa sed"
+msgstr "pričakovana novejša izdaja programa sed"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Nepravilna uporaba modifikatorja naslova"
+msgstr "neveljavna raba naslovne vrstice 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Neznan ukaz:"
+msgstr "neznan ukaz: »%c«"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: datoteka %s vrstica %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e izraz #%lu, znak %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "Oznake za skok na \"%s\" ni mono najti"
+msgstr "ni moč najti oznake za skok na »%s«"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: %s ni mono prebrati: %s\n"
+msgstr "%s: %s ni mogoče prebrati: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Datoteke %s ni mogoe odpreti: %s"
+msgstr "ni mogoče urejati %s: je terminal"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Datoteke %s ni mogoe odpreti: %s"
+msgstr "ni mogoče urejati %s: ni navadna datoteka"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Datoteke %s ni mogoe odpreti: %s"
+msgstr "ni mogoče odpreti začasne datoteke %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
-msgstr "Napaka v podprocesu"
+msgstr "napaka v podprocesu"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
-msgstr "Izbira ,e` ni podprta"
+msgstr "izbira »e« ni podprta"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
-msgstr "Ukaz ,e` ni podprt"
+msgstr "ukaz »e« ni podprt"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "ni vhodnih datotek"
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr "Prejnji regularni izraz manjka"
+msgstr "ni prejšnjega regularnega izraza"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "Doloanje modifikatorjev pri praznem regularnem izrazu ni mogoe"
+msgstr "navajanje modifikatorjev pri praznem regularnem izrazu ni mogoče"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Neveljavni sklic \\%d na desni strani ukaza ,s`"
+msgstr "neveljavni sklic \\%d na desni strani ukaza »s«"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Sporočila o napakah pošljite na <%s>.\n"
+"Poskrbite, da bo nekje v polju ,,Subject`` nastopal izraz ,,%s``.\n"
-#: sed/sed.c:93
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -207,66 +207,101 @@ msgstr ""
" -R, --regexp-perl\n"
" dovoli uporabo regularnih izrazov, ki jih podpira Perl 5\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Uporaba: %s [IZBIRA]... {skript--če-je-en-sam} [vhodna-datoteka]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" brez samodejnega izpisa prostora vzorcev\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e SKRIPT, --expression=SKRIPT\n"
+" dodaj SKRIPT med ukaze, ki se izvedejo\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, 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 SKRIPTNA_DATOTEKA, --file=SKRIPTNA_DATOTEKA\n"
+" dodaj vsebino SKRIPTNE DATOTEKE med ukaze, ki se izvedejo\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" pri obdelavi na mestu sledi simbolnim povezavam\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[PRIPONA], --in-place[=PRIPONA]\n"
+" spremembe opravi v sami datoteki (ustvari varnostno kopijo "
+"z\n"
+" dano pripono, če je ta podana)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" odpri kot binarno datoteko (brez posebne obravnave CR+LF)\n"
+
+#: sed/sed.c:144
#, 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"
+" določi širino vrstice za ukaz ,l` na N znakov\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" onemogoči vse razširitve GNU\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" dovoli uporabo regularnih izrazov, ki jih podpira Perl 5\n"
+" -r, --regexp-extended\n"
+" dovoli uporabo razširjenih regularnih izrazov.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -274,8 +309,11 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" datoteke obravnavaj kot ločene, ne pa kot neprekinjen tok\n"
+" podatkov\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -283,18 +321,22 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" naloži kar se da malo podatkov iz vhode datoteke in "
+"pogosteje\n"
+" izprazni izhodni medpomnilnik\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help prikaži ta navodila in končaj\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version različica programa\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -304,36 +346,33 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Če izbire -e, --expression, -f ali --file niso podane, se prvi neizbirni\n"
+"argument tolmači kot skript. Vsi preostali argumenti so imena vhodnih "
+"datotek.\n"
+"Če ni podano nobeno ime datoteke, se bere standardni vhod.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Sporoila o napakah poljite na %s .\n"
-"Poskrbite, da bo nekje v polju ,,Subject`` nastopal izraz ,,%s``.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
-msgstr "super-sed, razliica %s\n"
+msgstr "super-sed, različica %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"na osnovi GNU sed, razliica 3.02.80\n"
+"na osnovi GNU sed, različica %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
-msgstr "GNU sed, razliica %s\n"
+msgstr "GNU sed, različica %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -343,107 +382,210 @@ msgid ""
msgstr ""
"%s\n"
"To je prost program; pogoji, pod katerimi ga lahko uporabljate, "
-"razmnoujete\n"
-"in razirjate so navedeni v izvorni kodi. Za program ni NOBENEGA JAMSTVA,\n"
+"razmnožujete\n"
+"in razširjate so navedeni v izvorni kodi. Za program ni NOBENEGA JAMSTVA,\n"
"niti jamstev USTREZNOSTI ZA PRODAJO ali PRIMERNOSTI ZA UPORABO.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: %s ni mono prebrati: %s\n"
+msgstr "ni mogoče odstraniti %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr "Datoteke %s ni mogoe odpreti: %s"
+msgstr "ni mogoče odpreti datoteke %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "ni mogoče pripeti k %s: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "ni mogoe zapisati %d elementov na %s: %s"
-msgstr[1] "ni mogoe zapisati %d elementa na %s: %s"
-msgstr[2] "ni mogoe zapisati %d elementov na %s: %s"
-msgstr[3] "ni mogoe zapisati %d elementov na %s: %s"
+msgstr[0] "ni mogoče zapisati %d elementov na %s: %s"
+msgstr[1] "ni mogoče zapisati %d elementa na %s: %s"
+msgstr[2] "ni mogoče zapisati %d elementov na %s: %s"
+msgstr[3] "ni mogoče zapisati %d elementov na %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "napaka pri branju z %s: %s"
-#: lib/utils.c:341
-#, fuzzy, c-format
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "ni mogoče slediti simbolni povezavi %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "ni mogoče ugotoviti statistike %s: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: %s ni mono prebrati: %s\n"
+msgstr "ni mogoče preimenovati %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
-msgstr "Uspeno"
+msgstr "Uspešno"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Ni ujemanja"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Neveljavni regularni izraz"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Znaka izven abecede"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Neveljavno ime razreda znakov"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
-msgstr "Zakljuna obrnjena poevnica"
+msgstr "Zaključna obrnjena poševnica"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Neveljavni povratni sklic"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Oklepaj [ ali [^ brez zaklepaja"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Oklepaj ( ali \\( brez zaklepaja"
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Oklepaj \\{ brez zaklepaja"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Neveljavna vsebina \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Neveljavna zgornja meja intervala"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Zmanjkalo pomnilnika"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
-msgstr "Neveljaven prejnji regularni izraz"
+msgstr "Neveljaven prejšnji regularni izraz"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
-msgstr "Predasni zakljuek regularnega izraza"
+msgstr "Predčasni zaključek regularnega izraza"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Regularni izraz prevelik"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Oklepaj ) ali \\) brez zaklepaja"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
-msgstr "Prejnji regularni izraz manjka"
+msgstr "Prejšnji regularni izraz manjka"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "Klic savchar() z nepričakovanim pushback (%x)"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "INTERNA NAPAKA: pokvarjen tip naslova"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "INTERNA NAPAKA: Pokvarjen ukaz %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit files in place (makes backup if extension "
+#~ "supplied)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -r, --regexp-extended\n"
+#~ " use extended regular expressions in the script.\n"
+#~ "%s -s, --separate\n"
+#~ " consider files as separate rather than as a single "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ " load minimal amounts of data from the input files and "
+#~ "flush\n"
+#~ " the output buffers more often\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Uporaba: %s [IZBIRA]... [SKRIPT] [DATOTEKA]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " brez avtomatičnega izpisa prostora vzorcev\n"
+#~ " -e SKRIPT, --expression=SKRIPT\n"
+#~ " dodaj SKRIPT med ukaze, ki se izvedejo\n"
+#~ " -f SKRIPTNA_DATOTEKA, --file=SKRIPTNA_DATOTEKA\n"
+#~ " dodaj vsebino SKRIPTNE DATOTEKE med ukaze, ki se "
+#~ "izvedejo\n"
+#~ " -i[PRIPONA], --in-place[=PRIPONA]\n"
+#~ " spremembe opravi v sami datoteki (ustvari varnostno "
+#~ "kopijo z\n"
+#~ " dano pripono, če je ta podana)\n"
+#~ " -l N, --line-length=N\n"
+#~ " določi širino vrstice za ukaz ,l` na N znakov\n"
+#~ " -r, --regexp-extended\n"
+#~ " dovoli uporabo razširjenih regularnih izrazov\n"
+#~ "%s -s, --separate\n"
+#~ " datoteke obravnavaj kot ločene, ne pa kot neprekinjen "
+#~ "tok\n"
+#~ " podatkov\n"
+#~ " -u, --unbuffered\n"
+#~ "\n"
+#~ " --help ta navodila\n"
+#~ " -V, --version različica programa\n"
+#~ "\n"
+#~ "Če izbire -e, --expression, -f ali --file niso podane, se prvi neizbirni\n"
+#~ "argument tolmači kot skript. Vsi preostali argumenti so imena vhodnih "
+#~ "datotek.\n"
+#~ "Če ni podano nobeno ime datoteke, se bere standardni vhod.\n"
+#~ "\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Nepričakovan konec datoteke"
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "pokvarjen regularni izraz: %s\n"
+
+#~ msgid "input read error: %s"
+#~ msgstr "napaka pri branju: %s"
+
+#~ msgid "couldn't write an item to %s: %s"
+#~ msgstr "ni bilo mogoče zapisati elementa na %s: %s"
diff --git a/po/sr.gmo b/po/sr.gmo
index 5dc0980..aff65fa 100644
--- a/po/sr.gmo
+++ b/po/sr.gmo
Binary files differ
diff --git a/po/sr.po b/po/sr.po
index c27e2b9..291c175 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -1,205 +1,203 @@
# Serbian translation of `sed'.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2006 Free Software Foundation, Inc.
# This file is distributed under the same license as the `sed' package.
-# Aleksandar Jelenak <jelenak@netlinkplus.net>, 2003.
+# Aleksandar Jelenak <jelenak@verizon.net>, 2006.
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.0.9\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2004-01-13 22:51-0500\n"
-"Last-Translator: Aleksandar Jelenak <jelenak@netlinkplus.net>\n"
-"Language-Team: Serbian <sr@li.org>\n"
+"Project-Id-Version: sed 4.1.5\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2006-12-07 11:42-0500\n"
+"Last-Translator: Aleksandar Jelenak <jelenak@verizon.net>\n"
+"Language-Team: Serbian <gnu@prevod.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : (n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "Више „!“"
+msgstr "више „!“"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr "Неочекиван „,“"
+msgstr "неочекиван „,“"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "Не може се користити +N или ~N као прва адреса"
+msgstr "неважећа употреба +N или ~N као прве адресе"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr "Неспарена „{“"
+msgstr "неспарена „{“"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr "Неочекивана „}“"
+msgstr "неочекивана „}“"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Вишак знакова после наредбе"
+msgstr "вишак знакова после наредбе"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "Очекивано \\ после „a“, „c“ или „i“"
+msgstr "очекивано \\ после „a“, „c“ или „i“"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "„}“ не захтева икакве адресе"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": не захтева икакве адресе"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "Коментари не прихватају икакве адресе"
+msgstr "коментари не прихватају икакве адресе"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr "Недостаје наредба"
+msgstr "недостаје наредба"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "Наредба користи само једну адресу"
+msgstr "наредба користи само једну адресу"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "Незавршена адреса рег. израза"
+msgstr "незавршена адреса рег. израза"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "Незавршена наредба „s“"
+msgstr "незавршена наредба „s“"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "Незавршена наредба „y“"
+msgstr "незавршена наредба „y“"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "Непозната опција за „s“"
+msgstr "непозната опција за „s“"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "више „p“ опција за „s“ наредбу"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "више „g“ опција за „s“ наредбу"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "више бројчаних опција за „s“ наредбу"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
msgstr "бројчана опција наредбе „s“ не може бити нула"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "ниске за команду „y“ су различите дужине"
+msgstr "ниске за команду „y“ су различитих дужина"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "раздвојник није једнобајтни знак"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "очекивана новија верзија sed-а"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Наредба користи само једну адресу"
+msgstr "неправилна употреба адресе реда 0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Непозната наредба:"
+msgstr "непозната наредба: „%c“"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: датотека %s ред %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e израз #%lu, знак %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "Не могу да нађем ознаку за скок на „%s“"
+msgstr "не могу да нађем ознаку за скок на „%s“"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: не може читати %s: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "Не може се отворити датотека %s: %s"
+msgstr "не могу уредити %s: терминал је"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "Не може се отворити датотека %s: %s"
+msgstr "не може уредити %s: није обична датотека"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Не могу отворити привремену датотеку %s: %s"
+msgstr "не могу отворити привремену датотеку %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "грешка у потпроцесу"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr "опција „e“ није подржана"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "наредба „e“ није подржана"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "нема улазних датотека"
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr "Без претходног регуларног израза"
+msgstr "без претходног регуларног израза"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "Не може се навести измењивач празном рег. изразу"
+msgstr "не може навести измењивач празном рег. изразу"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "Неисправна референца \\%d на десној страни наредбе „s“"
+msgstr "неисправна референца \\%d на десној страни наредбе „s“"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
-#: sed/sed.c:93
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Епошта за пријаву грешака: <%s>.\n"
+"Постарајте се да укључите реч „%s“ негде у „Subject:“ пољу.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -207,66 +205,97 @@ msgstr ""
" -R, --regexp-perl\n"
" користи у спису синтаксу Перла 5 за регуларне изразе.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Употреба: %s [ОПЦИЈА]... {скрипт-само-ако-нема-другог-скрипта} [улаз-"
+"датотека]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" обустави аутоматски испис простора образаца\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e спис, --expression=спис\n"
+" додај спис извршним наредбама\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
" add the contents of script-file to the commands to be "
"executed\n"
msgstr ""
+" -f списотека, --file=списотека\n"
+" додај садржај списотеке извршним наредбама\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[СУФИКС], --in-place[=СУФИКС]\n"
+" уређуј датотеке у месту (прави резервну копију ако је дат\n"
+" наставак)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
+" -l N, --line-length=N\n"
+" задај жељену ширину реда за наредбу „l“\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" онемогући све ГНУ додатке.\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" користи у спису синтаксу Перла 5 за регуларне изразе.\n"
+" -r, --regexp-extended\n"
+" користи проширене регуларне изразе у спису.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -274,8 +303,10 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" посматрај датотеке одвојено а не као један непрекидан ток\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -283,18 +314,21 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" учитавај минималне количине података из улазних датотека и\n"
+" чешће празни излазне бафере\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help прикажи ово објашњење и заврши\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version испиши верзију и заврши\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -304,36 +338,33 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Уколико „-e“, „--expression“, „-f“, или „--file“ опција није задата онда\n"
+"се први ванопциони аргумент узима као сед спис за тумачење. Сви преостали\n"
+"аргументи су имена улазних датотека; ако они нису задати, онда се чита са\n"
+"стандардног улаза.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Епошта за пријаву грешака: %s .\n"
-"Постарајте се да укључите реч „%s“ негде у „Subject:“ пољу.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed верзија %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"засновано на ГНУ sed верзија 3.02.80\n"
+"засновано на ГНУ sed верзија %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "ГНУ sed верзија %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -346,17 +377,22 @@ msgstr ""
"икакве\n"
"гаранције; чак ни о ТРЖИШНОСТИ или ИСПУЊАВАЊУ ОДРЕЂЕНЕ ПОТРЕБЕ.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: не може читати %s: %s\n"
+msgstr "не може уклонити %s: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr "Не може се отворити датотека %s: %s"
+msgstr "не може отворити датотеку %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "неуспешан запис %d ставке на %s: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
@@ -364,84 +400,173 @@ msgstr[0] "неуспешан запис %d ставке на %s: %s"
msgstr[1] "неуспешан запис %d ставке на %s: %s"
msgstr[2] "неуспешан запис %d ставки на %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "грешка учитавања на %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "не може отворити датотеку %s: %s"
+
+#: sed/utils.c:407
#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "не може променити име %s: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: не може читати %s: %s\n"
+msgstr "не може променити име %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Успех"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Без поклапања"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Неисправни регуларни израз"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Неисправни знак прикупљања"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Неисправно име класе знакова"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Пратећа обрнута коса црта"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Неисправна повратна референца"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Неспарено [ или ^["
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Неспарено ( или \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Неспарено \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "Неисправни садржај у \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Неисправни крај опсега"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Меморија исцрпљена"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Неисправан претходећи регуларни израз"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Преран крај регуларног израза"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Регуларни израз сувише велик"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Неспарено ) или \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Без претходног регуларног израза"
+
+# Тражи се бољи превод за „pushback“.
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "Позван savchar() са неочекиваном вредношћу аргумента (%x)"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "УНУТРАШЊА ГРЕШКА: лоша врста адресе"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "УНУТРАШЊА ГРЕШКА: Лоша наредба %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit files in place (makes backup if extension "
+#~ "supplied)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -r, --regexp-extended\n"
+#~ " use extended regular expressions in the script.\n"
+#~ "%s -s, --separate\n"
+#~ " consider files as separate rather than as a single "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ " load minimal amounts of data from the input files and "
+#~ "flush\n"
+#~ " the output buffers more often\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Употреба: %s [ОПЦИЈА]... {спис-само-ако-без-другог-списа} [улаз-"
+#~ "датотека]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " спречи аутоматско исписивање образаца\n"
+#~ " -e СПИС, --expression=СПИС\n"
+#~ " додај СПИС наредбама за извршавање\n"
+#~ " -f СПИС, --file=СПИС\n"
+#~ " додај садржај СПИС наредбама за извршавање\n"
+#~ " -i[суфикс], --in-place[=суфикс]\n"
+#~ " уређуј датотеке у месту (прави резервне ако је дата "
+#~ "екстензија)\n"
+#~ " -l БРОЈ, --line-length=БРОЈ\n"
+#~ " задај жељену дужину реда за наредбу „l“\n"
+#~ " -r, --regexp-extended\n"
+#~ " користи проширене регуларне изразе у спису\n"
+#~ "%s -s, --separate\n"
+#~ " разматрај датотеке понаособ а не заједно као једну\n"
+#~ " -u, --unbuffered\n"
+#~ " учитавај минималне количине података из улазних датотека "
+#~ "и празни\n"
+#~ " излазне бафере чешће\n"
+#~ " --help прикажи ово објашњење и заврши\n"
+#~ " -V, --version испиши верзију и заврши\n"
+#~ "\n"
+#~ "Ако опције „-e“, „--expression“, „-f“, или „--file“ нису дате, онда се "
+#~ "први\n"
+#~ "аргумент који није опција узима за sed спис који треба извршити. Сви "
+#~ "преостали\n"
+#~ "аргументи су имена улазних датотека; ако улазне датотеке нису задате, "
+#~ "онда се\n"
+#~ "чита стандардни улаз.\n"
+#~ "\n"
diff --git a/po/stamp-po b/po/stamp-po
new file mode 100644
index 0000000..9788f70
--- /dev/null
+++ b/po/stamp-po
@@ -0,0 +1 @@
+timestamp
diff --git a/po/sv.gmo b/po/sv.gmo
index 7e4107b..bb09087 100644
--- a/po/sv.gmo
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
index 50671fb..7ccfabc 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,225 +1,242 @@
# Swedish messages for sed.
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-# Christian Rose <menthos@menthos.com>, 1999, 2000, 2001, 2002, 2003, 2004.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2008 Free Software Foundation, Inc.
+# Christian Rose <menthos@menthos.com>, 1999, 2000, 2001, 2002, 2003, 2004, 2008.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.1.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2004-07-11 11:45+0200\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-02-24 17:20+0100\n"
"Last-Translator: Christian Rose <menthos@menthos.com>\n"
-"Language-Team: Swedish <sv@li.org>\n"
+"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: sed/compile.c:162
+#: sed/compile.c:161
msgid "multiple `!'s"
msgstr "flera \"!\""
-#: sed/compile.c:163
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr "ovntat \",\""
+msgstr "oväntat \",\""
-#: sed/compile.c:164
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "ogiltig anvndning av +N eller ~N som frsta adress"
+msgstr "ogiltig användning av +N eller ~N som första adress"
-#: sed/compile.c:165
+#: sed/compile.c:164
msgid "unmatched `{'"
msgstr "obalanserad \"{\""
-#: sed/compile.c:166
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr "ovntad \"}\""
+msgstr "oväntad \"}\""
-#: sed/compile.c:167
+#: sed/compile.c:166
msgid "extra characters after command"
msgstr "extra tecken efter kommandot"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr "\\ frvntades efter \"a\", \"c\" eller \"i\""
+msgstr "\\ förväntades efter \"a\", \"c\" eller \"i\""
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
-msgstr "\"}\" vill inte ha ngra adresser"
+msgstr "\"}\" vill inte ha några adresser"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
-msgstr ": vill inte ha ngra adresser"
+msgstr ": vill inte ha några adresser"
-#: sed/compile.c:171
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
msgstr "kommentarer accepterar inga adresser"
-#: sed/compile.c:172
+#: sed/compile.c:171
msgid "missing command"
msgstr "kommando saknas"
-#: sed/compile.c:173
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "kommandot anvnder endast en adress"
+msgstr "kommandot använder endast en adress"
-#: sed/compile.c:174
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "oavslutat reguljrt uttryck fr adress"
+msgstr "oavslutat reguljärt uttryck för adress"
-#: sed/compile.c:175
+#: sed/compile.c:174
msgid "unterminated `s' command"
msgstr "oavslutat \"s\"-kommando"
-#: sed/compile.c:176
+#: sed/compile.c:175
msgid "unterminated `y' command"
msgstr "oavslutat \"y\"-kommando"
-#: sed/compile.c:177
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "flaggan oknd fr \"s\""
+msgstr "flaggan okänd för \"s\""
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "flera \"p\"-flaggor till \"s\"-kommandot"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "flera \"g\"-flaggor till \"s\"-kommandot"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "flera sifferflaggor till \"s\"-kommandot"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
-msgstr "sifferflagga till kommandot \"s\" fr inte vara noll"
+msgstr "sifferflagga till kommandot \"s\" får inte vara noll"
-#: sed/compile.c:182
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "strngarna fr kommandot \"y\" r olika lnga"
+msgstr "strängarna för kommandot \"y\" är olika långa"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr "avgrnsningstecknet r inte en ensam byte"
+msgstr "avgränsningstecknet är inte en ensam byte"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr "nyare version av sed frvntades"
+msgstr "nyare version av sed förväntades"
-#: sed/compile.c:185
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "felaktig anvndning av radadress 0"
+msgstr "felaktig användning av radadress 0"
-#: sed/compile.c:186
+#: sed/compile.c:185
#, c-format
msgid "unknown command: `%c'"
-msgstr "oknt kommando: \"%c\""
+msgstr "okänt kommando: \"%c\""
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: fil %s rad %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, 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:1664
#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "kan inte hitta etiketten fr hopp till \"%s\""
+msgstr "kan inte hitta etiketten för hopp till \"%s\""
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s: kan inte lsa %s: %s\n"
+msgstr "%s: kan inte läsa %s: %s\n"
-#: sed/execute.c:673
+#: sed/execute.c:728
#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "kunde inte redigera %s: r en terminal"
+msgstr "kunde inte redigera %s: är en terminal"
-#: sed/execute.c:677
+#: sed/execute.c:733
#, c-format
msgid "couldn't edit %s: not a regular file"
msgstr "kunde inte redigera %s: inte en vanlig fil"
-#: sed/execute.c:684 lib/utils.c:196
+#: sed/execute.c:740 sed/utils.c:222
#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "kunde inte ppna temporra filen %s: %s"
+msgstr "kunde inte öppna temporära filen %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "fel i underprocess"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
-msgstr "flaggan \"e\" stds inte"
+msgstr "flaggan \"e\" stöds inte"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
-msgstr "kommandot \"e\" stds inte"
+msgstr "kommandot \"e\" stöds inte"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "inga indatafiler"
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr "inget tidigare reguljrt uttryck"
+msgstr "inget tidigare reguljärt uttryck"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "kan inte ange modifierare p tomt reguljrt uttryck"
+msgstr "kan inte ange modifierare på tomt reguljärt uttryck"
-# Kommentar frn Jan Djrv:
-# Jag antar RHS str fr "right hand side". Man kan d sga
-# "... kommandots hgersida"
+# Kommentar från Jan Djärv:
+# Jag antar RHS står för "right hand side". Man kan då säga
+# "... kommandots högersida"
#
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
-msgstr "ogiltig referens \\%d p \"s\"-kommandots hgersida"
+msgstr "ogiltig referens \\%d på \"s\"-kommandots högersida"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
-#: sed/sed.c:93
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Rapportera fel till: <%s>.\n"
+"Ange ordet \"%s\" på något ställe i \"Ärende:\"-fältet.\n"
+"Skicka anmärkningar på översättningen till <sv@li.org>.\n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
msgstr ""
" -R, --regexp-perl\n"
-" anvnd Perl 5:s syntax fr reguljra uttryck i skriptet.\n"
+" använd Perl 5:s syntax för reguljära uttryck i skriptet.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
-"Anvndning: %s [FLAGGA]... {skript-endast-om-inga-andra} [indatafil]...\n"
+"Användning: %s [FLAGGA]... {skript-endast-om-inga-andra} [indatafil]...\n"
"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
" -n, --quiet, --silent\n"
-" frhindrar automatisk utskrift av mnsterutrymme\n"
+" förhindrar automatisk utskrift av mönsterutrymme\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
" -e skript, --expression=skript\n"
-" lgg till skript till de kommandon som ska utfras\n"
+" lägg till skript till de kommandon som ska utföras\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
@@ -227,47 +244,66 @@ msgid ""
"executed\n"
msgstr ""
" -f skriptfil, --file=skriptfil\n"
-" lgg till innehllet i skriptfil till de kommandon som ska\n"
-" utfras\n"
+" lägg till innehållet i skriptfil till de kommandon som ska\n"
+" utföras\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" följ symlänkar när behandling sker på plats\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
-" -i[NDELSE], --in-place[=NDELSE]\n"
-" redigera filer p plats (skapar skerhetskopia om ndelse\n"
-" tillhandahlls)\n"
+" -i[ÄNDELSE], --in-place[=ÄNDELSE]\n"
+" redigera filer på plats (skapar säkerhetskopia om ändelse\n"
+" tillhandahålls)\n"
-#: sed/sed.c:110
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" öppna filer i binärläge (CR+LF särbehandlas inte)\n"
+
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
" -l N, --line-length=N\n"
-" ange nskad radbrytningslngd fr \"l\"-kommandot\n"
+" ange önskad radbrytningslängd för \"l\"-kommandot\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
" --posix\n"
-" inaktivera alla GNU-utkningar.\n"
+" inaktivera alla GNU-utökningar.\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
" -r, --regexp-extended\n"
-" anvnd utkade reguljra uttryck i skriptet.\n"
+" använd utökade reguljära uttryck i skriptet.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -276,10 +312,10 @@ msgid ""
" long stream.\n"
msgstr ""
" -s, --separate\n"
-" betrakta filer som separata istllet fr som en\n"
-" kontinuerlig lng datastrm.\n"
+" betrakta filer som separata istället för som en\n"
+" kontinuerlig lång dataström.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -288,20 +324,20 @@ msgid ""
" the output buffers more often\n"
msgstr ""
" -u, --unbuffered\n"
-" ls in minimala mngder data frn indatafilerna och tm\n"
+" läs in minimala mängder data från indatafilerna och töm\n"
" utdatabufferterna oftare\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr " --help visa denna hjlptext och avsluta\n"
+msgstr " --help visa denna hjälptext och avsluta\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
msgstr " --version visa versionsinformation och avsluta\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -313,41 +349,31 @@ msgid ""
msgstr ""
"\n"
"Om ingen av flaggorna -e, --expression, -f, eller --file ges, blir det\n"
-"frsta argumentet som inte r en flagga det sed-skript som tolkas. Alla\n"
-"terstende argument r namn p indatafiler. Om inga indatafiler r angivna\n"
-"lses standard in.\n"
+"första argumentet som inte är en flagga det sed-skript som tolkas. Alla\n"
+"återstående argument är namn på indatafiler. Om inga indatafiler är angivna\n"
+"läses standard in.\n"
"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Rapportera fel till: %s .\n"
-"Ange ordet \"%s\" p ngot stlle i \"rende:\"-fltet.\n"
-"Skicka anmrkningar p versttningen till <sv@li.org>.\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed version %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"baserad p GNU sed version %s\n"
+"baserad på GNU sed version %s\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed version %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -356,108 +382,285 @@ msgid ""
"to the extent permitted by law.\n"
msgstr ""
"%s\n"
-"(Fljande text r en informell versttning som enbart tillhandahlls\n"
-" i informativt syfte. Fr alla juridiska tolkningar gller den engelska\n"
+"(Följande text är en informell översättning som enbart tillhandahålls\n"
+" i informativt syfte. För alla juridiska tolkningar gäller den engelska\n"
" originaltexten.)\n"
-"Det hr r fri programvara; se kllkoden angende villkor fr kopiering.\n"
-"Det finns INGEN garanti; inte ens fr SLJBARHET eller LMPLIGHET FR NGOT\n"
-"SPECIELLT NDAML, i den omfattning som medges av gllande lag.\n"
+"Det här är fri programvara; se källkoden angående villkor för kopiering.\n"
+"Det finns INGEN garanti; inte ens för SÄLJBARHET eller LÄMPLIGHET FÖR NÅGOT\n"
+"SPECIELLT ÄNDAMÅL, i den omfattning som medges av gällande lag.\n"
-#: lib/utils.c:98 lib/utils.c:336
+#: sed/utils.c:93 sed/utils.c:433
#, c-format
msgid "cannot remove %s: %s"
msgstr "kan inte ta bort %s: %s"
-#: lib/utils.c:143
+#: sed/utils.c:163
#, c-format
msgid "couldn't open file %s: %s"
-msgstr "kunde inte ppna filen %s: %s"
+msgstr "kunde inte öppna filen %s: %s"
+
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "kunde inte fästa vid %s: %s"
-#: lib/utils.c:220
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "kunde inte skriva %d objekt till %s: %s"
msgstr[1] "kunde inte skriva %d objekt till %s: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
-msgstr "lsfel vid %s: %s"
+msgstr "läsfel vid %s: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "kunde inte följa symlänken %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "kan inte ta status på %s: %s"
+
+#: sed/utils.c:438
#, c-format
msgid "cannot rename %s: %s"
-msgstr "kan inte byta namn p %s: %s"
+msgstr "kan inte byta namn på %s: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Lyckades"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
-msgstr "Ingen trff"
+msgstr "Ingen träff"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
-msgstr "Ogiltigt reguljrt uttryck"
+msgstr "Ogiltigt reguljärt uttryck"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Ogiltigt sorteringstecken"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Ogiltigt teckenklassnamn"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
-msgstr "Efterslpande omvnt snedstreck"
+msgstr "Eftersläpande omvänt snedstreck"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
-msgstr "Ogiltig baktreferens"
+msgstr "Ogiltig bakåtreferens"
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Obalanserad [ eller [^"
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Obalanserad ( eller \\("
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Obalanserad \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
-msgstr "Ogiltigt innehll i \\{\\}"
+msgstr "Ogiltigt innehåll i \\{\\}"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Ogiltigt intervallslut"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Minnet slut"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
-msgstr "Ogiltigt fregende reguljrt uttryck"
+msgstr "Ogiltigt föregående reguljärt uttryck"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
-msgstr "Fr tidigt slut p reguljrt uttryck"
+msgstr "För tidigt slut på reguljärt uttryck"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
-msgstr "Reguljrt uttryck fr stort"
+msgstr "Reguljärt uttryck för stort"
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Obalanserad ) eller \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
-msgstr "Inget tidigare reguljrt uttryck"
+msgstr "Inget tidigare reguljärt uttryck"
+
+# Bristen på indragning ser ut som en bugg. Buggrapporterat 2004-07-11.
+#~ msgid ""
+#~ "-n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ msgstr ""
+#~ " -n, --quiet, --silent\n"
+#~ " förhindrar automatisk utskrift av mönsterutrymme\n"
+
+#~ msgid "Multiple `!'s"
+#~ msgstr "Flera \"!\""
+
+#~ msgid "Unexpected `,'"
+#~ msgstr "Oväntat \",\""
+
+#~ msgid "Invalid usage of +N or ~N as first address"
+#~ msgstr "Ogiltig användning av +N eller ~N som första adress"
+
+#~ msgid "Unmatched `{'"
+#~ msgstr "Obalanserad \"{\""
+
+#~ msgid "Unexpected `}'"
+#~ msgstr "Oväntad \"}\""
+
+#~ msgid "Extra characters after command"
+#~ msgstr "Extra tecken efter kommandot"
+
+#~ msgid "Expected \\ after `a', `c' or `i'"
+#~ msgstr "\\ förväntades efter \"a\", \"c\" eller \"i\""
+
+#~ msgid "Comments don't accept any addresses"
+#~ msgstr "Kommentarer accepterar inga adresser"
+
+#~ msgid "Missing command"
+#~ msgstr "Kommando saknas"
+
+#~ msgid "Command only uses one address"
+#~ msgstr "Kommandot använder endast en adress"
+
+#~ msgid "Unterminated address regex"
+#~ msgstr "Oavslutat reguljärt uttryck för adress"
+
+#~ msgid "Unterminated `s' command"
+#~ msgstr "Oavslutat \"s\"-kommando"
+
+#~ msgid "Unterminated `y' command"
+#~ msgstr "Oavslutat \"y\"-kommando"
+
+#~ msgid "Unknown option to `s'"
+#~ msgstr "Flaggan okänd för \"s\""
+
+#~ msgid "Unknown command: `%c'"
+#~ msgstr "Okänt kommando: \"%c\""
+
+#~ msgid "Can't find label for jump to `%s'"
+#~ msgstr "Kan inte hitta etiketten för hopp till \"%s\""
+
+#~ msgid "Couldn't open temporary file %s: %s"
+#~ msgstr "Kunde inte öppna temporära filen %s: %s"
+
+#~ msgid "Cannot specify modifiers on empty regexp"
+#~ msgstr "Kan inte ange modifierare på tomt reguljärt uttryck"
+
+# Kommentar från Jan Djärv:
+# Jag antar RHS står för "right hand side". Man kan då säga
+# "... kommandots högersida"
+#
+#~ msgid "Onvalid reference \\%d on `s' command's RHS"
+#~ msgstr "Ogiltig referens \\%d på \"s\"-kommandots högersida"
+
+#~ msgid "Couldn't open file %s: %s"
+#~ msgstr "Kunde inte öppna filen %s: %s"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "Anropade savchar() med oväntat returtecken (%x)"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "INTERNT FEL: felaktig addresstyp"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "INTERNT FEL: Felaktigt kommando %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit files in place (makes backup if extension "
+#~ "supplied)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -r, --regexp-extended\n"
+#~ " use extended regular expressions in the script.\n"
+#~ "%s -s, --separate\n"
+#~ " consider files as separate rather than as a single "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ " load minimal amounts of data from the input files and "
+#~ "flush\n"
+#~ " the output buffers more often\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Användning: %s [FLAGGA]... {skript-endast-om-inga-andra} [indatafil]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " förhindrar automatisk utskrift av mönsterutrymme\n"
+#~ " -e skript, --expression=skript\n"
+#~ " lägg till skript till de kommandon som ska utföras\n"
+#~ " -f skriptfil, --file=skriptfil\n"
+#~ " lägg till innehållet i skriptfil till de kommandon som "
+#~ "ska\n"
+#~ " utföras\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " redigera filer på plats (skapa säkerhetskopia om "
+#~ "tillägg\n"
+#~ " tillhandahålls)\n"
+#~ " -l N, --line-length=N\n"
+#~ " ange önskad radbrytningslängd för \"l\"-kommandot\n"
+#~ " -r, --regexp-extended\n"
+#~ " använd utökade reguljära uttryck i skriptet.\n"
+#~ "%s -s, --separate\n"
+#~ " betrakta filer som separata istället för en ensam och\n"
+#~ " sammanhållen lång ström.\n"
+#~ " -u, --unbuffered\n"
+#~ " läs in minimala mängder data från indatafilerna och töm\n"
+#~ " utdatabufferterna oftare\n"
+#~ " --help visa denna hjälptext och avsluta\n"
+#~ " -V, --version visa versionsinformation och avsluta\n"
+#~ "\n"
+#~ "Om ingen av flaggorna -e, --expression, -f, eller --file ges, blir det\n"
+#~ "första argumentet som inte är en flagga det sed-skript som tolkas. Alla\n"
+#~ "återstående argument är namn på indatafiler; om inga indatafiler är "
+#~ "angivna\n"
+#~ "läses standard in.\n"
+#~ "\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Oväntat filslut"
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "felaktigt reguljärt uttryck: %s\n"
+
+#~ msgid "input read error: %s"
+#~ msgstr "fel vid läsning av indata: %s"
+
+#~ msgid "couldn't write an item to %s: %s"
+#~ msgstr "kunde inte skriva ett objekt till %s: %s"
diff --git a/po/tr.gmo b/po/tr.gmo
index 68bc8c3..fc72461 100644
--- a/po/tr.gmo
+++ b/po/tr.gmo
Binary files differ
diff --git a/po/tr.po b/po/tr.po
index b32485a..11c3dbd 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -1,205 +1,204 @@
-# translation of sed-4.0.9.tr.po to Turkish
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# translation of sed-4.1.1.tr.po to Turkish
+# Copyright (C) 2003, 2004 Free Software Foundation, Inc.
# Deniz Akkus Kanca <deniz@arayan.com>, 2001,2003, 2004.
#
msgid ""
msgstr ""
-"Project-Id-Version: sed 4.0.9\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2004-05-19 18:06+0300\n"
+"Project-Id-Version: sed 4.1.1\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2004-12-05 10:03+0200\n"
"Last-Translator: Deniz Akkus Kanca <deniz@arayan.com>\n"
"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.0.2\n"
+"X-Generator: KBabel 1.3.1\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "Birden fazla '!'"
+msgstr "birden fazla '!'"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr "Beklenmeyen ','"
+msgstr "beklenmeyen ','"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "İlk adres olarak +N veya ~N kullanılamaz"
+msgstr "ilk adres olarak +N veya ~N kullanılamaz"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr "Eşleşmeyen '{'"
+msgstr "eşleşmeyen '{'"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr "Beklenmeyen '}'"
+msgstr "beklenmeyen '}'"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "Komuttan sonra fazla karakterler var"
+msgstr "komuttan sonra fazla karakterler var"
-#: sed/compile.c:168
-#, fuzzy
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
msgstr "`a', `c' veya `i' sonrası \\ beklendi"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
msgstr "'}' için adres istenmez"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
msgstr ": için hiç adres istenmez"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "Açıklamalarda adres kabul edilmez"
+msgstr "açıklamalarda adres kabul edilmez"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr "Komut eksik"
+msgstr "komut eksik"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "Komutta yalnızca tek adres kullanılır"
+msgstr "komutta yalnızca tek adres kullanılır"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "Sonlandırılmamış adres düzenli ifadesi"
+msgstr "sonlandırılmamış adres düzenli ifadesi"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "Sonlandırılmamış 's' komutu"
+msgstr "sonlandırılmamış 's' komutu"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "Sonlandırılmamış 'y' komutu"
+msgstr "sonlandırılmamış 'y' komutu"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
msgstr "`s' komutuna bilinmeyen seçenek verilmiş"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
msgstr "`s' komutuna birden fazla `p' seçeneği verilmiş"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
msgstr "`s' komutuna birden fazla `g' seçeneği verilmiş"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
msgstr "`s' komutuna birden fazla sayı seçeneği verilmiş"
-#: sed/compile.c:181
+#: sed/compile.c:180
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:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "y komutu için dizgeler değişik uzunluklarda"
+msgstr "`y' komutu için dizgeler değişik uzunluklarda"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "ayraç karakteri tek baytlık değil"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
msgstr "sed'in daha yeni bir sürümü beklendi"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Adres değiştirici hatalı kullanılmış"
+msgstr "satır adresi 0'ın hatalı kullanımı"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "Bilinmeyen komut:"
+msgstr "bilinmeyen komut: `%c'"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
msgstr "%s: dosya %s satır %lu: %s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
msgstr "%s: -e ifade #%lu, harf %lu: %s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
msgstr "`%s'e atlamak için etiket bulunamıyor"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
msgstr "%s: %s okunamıyor: %s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "%d sayıda öğe %s'e yazılamadı: %s"
+msgstr "%s düzenlenemedi: bu bir terminal"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "%d sayıda öğe %s'e yazılamadı: %s"
+msgstr "%s düzenlenemedi: normal dosya değil"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "Geçici dosya %s açılamadı: %s"
+msgstr "geçici dosya %s açılamadı: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
msgstr "altsüreçte hata"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
msgstr " e' seçeneği desteklenmiyor"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
msgstr "`e' komutu desteklenmiyor"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
msgstr ""
-#: sed/regexp.c:39
-#, fuzzy
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr "Daha önce düzenli ifade yok"
+msgstr "daha önce bir düzenli ifade yok"
-#: sed/regexp.c:40
-#, fuzzy
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr "Boş düzenli ifadeye değiştirici atanamaz"
+msgstr "boş düzenli ifadeye değiştirici atanamaz"
-#: sed/regexp.c:115
-#, fuzzy, c-format
+#: sed/regexp.c:131
+#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
msgstr "`s' komutunun RHS'sinde geçersiz \\%d referansı"
-#: sed/sed.c:93
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Yazılım hatalarını <%s> adresine, çeviri hatalarını \n"
+"<gnu-tr-u12a@lists.sourceforge.net> adresine bildirin. \n"
+"``%s'' sözcüğünün Konu başlığında yer almasına dikkat edin. \n"
+
+#: sed/sed.c:119
msgid ""
" -R, --regexp-perl\n"
" use Perl 5's regular expressions syntax in the script.\n"
@@ -207,66 +206,96 @@ msgstr ""
" -R, --regexp-perl\n"
" betikte Perl 5'in düzenli ifade sözdizimini kullanır.\n"
-#: sed/sed.c:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"Kullanım: %s [SEÇENEK]... {betik-eğer-başka-betik-yoksa} [girdi-dosyası]...\n"
+"\n"
-#: sed/sed.c:102
-#, c-format
+#: sed/sed.c:128
+#, fuzzy, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+"-n, --quiet, --silent\n"
+" kalıp uzayının otomatik yazdırılmasını kaldırır\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e script, --expression=betik\n"
+" betiği, koşturulacak komutlara ekler\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, 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 betik-dosyası, --file=betik-dosyası\n"
+" betik-dosyası'nın içeriğini, koşturulacak komutlara ekler\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[SONEK], --in-place[=SONEK]\n"
+" dosyaları yerinde değiştirir (eğer uzantı verilmişse yedek\n"
+" oluşturur)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
-#: sed/sed.c:110
+#: sed/sed.c:144
#, 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' komutu için istenen satır sarma uzunluğunu belirtir\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" bütün GNU eklentilerini devre dışı bırakır.\n"
-#: sed/sed.c:114
-#, fuzzy, c-format
+#: sed/sed.c:148
+#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
-" -R, --regexp-perl\n"
-" betikte Perl 5'in düzenli ifade sözdizimini kullanır.\n"
+" -r, --regexp-extended\n"
+" betikte geliştirilmiş düzenli ifadeler kullanır.\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -274,8 +303,11 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" dosyaları, tek uzun bir akış yerine ayrı ayrı "
+"değerlendirir.\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -283,18 +315,21 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" girdi dosyalarından asgari miktarda veri yükler ve\n"
+" çıktı yastıklarını daha sık boşaltır\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help bu yardımı gösterir ve çıkar\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version sürüm bilgisinin gösterir ve çıkar\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -304,37 +339,33 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"Eğer -e, --expression, -f veya --file seçenekeleri verilmemiş ise,\n"
+"ilk seçenek olmayan argüman, işlenecek betik dosyası kabul edilir.\n"
+"Bütün diğer argümanlar girdi dosyası adıdır; eğer girdi dosyası adı\n"
+"verilmemiş ise, standart girdi okunur.\n"
+"\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"Yazılım hatalarını %s adresine, çeviri hatalarını \n"
-"<gnu-tr-u12a@lists.sourceforge.net> adresine bildirin. \n"
-"``%s'' sözcüğünün Konu başlığında yer almasına dikkat edin. \n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
msgstr "super-sed sürüm %s\n"
-#: sed/sed.c:269
-#, fuzzy, c-format
+#: sed/sed.c:318
+#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
-"GNU sed sürümü 3.02.80 temel alınmıştır\n"
+"GNU sed sürümü %s temel alınmıştır\n"
"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
msgstr "GNU sed sürümü %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -347,109 +378,212 @@ msgstr ""
"Hiçbir garantisi yoktur; hatta SATILABİLİRLİĞİ veya HERHANGİ BİR AMACA\n"
"UYGUNLUĞU için bile garanti verilmez.\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s: %s okunamıyor: %s\n"
+msgstr "%s kaldırılamıyor: %s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
msgstr "%s dosyası açılamadı: %s"
-#: lib/utils.c:220
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "%d sayıda öğe %s'e yazılamadı: %s"
+
+#: sed/utils.c:240
#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
msgstr[0] "%d sayıda öğe %s'e yazılamadı: %s"
-msgstr[1] "%d sayıda öğe %s'e yazılamadı: %s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
msgstr "%s'de okuma hatası: %s"
-#: lib/utils.c:341
+#: sed/utils.c:373
#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "%s dosyası açılamadı: %s"
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "%s yeniden adlandırılamadı: %s"
+
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s: %s okunamıyor: %s\n"
+msgstr "%s yeniden adlandırılamadı: %s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
msgstr "Başarılı"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
msgstr "Eşleşme bulunamadı"
#
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
msgstr "Hatalı düzenli ifade"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
msgstr "Hatalı birleştirme karakteri"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
msgstr "Hatalı karakter sınıf ismi"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
msgstr "Sonda fazla gerikesme var"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
msgstr "Hatalı geri referans"
#
-#: lib/regcomp.c:153
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
msgstr "Eşleşmeyen [ veya [^"
#
-#: lib/regcomp.c:156
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
msgstr "Eşleşmeyen ( veya \\("
#
-#: lib/regcomp.c:159
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
msgstr "Eşleşmeyen \\{"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
msgstr "\\{\\} içeriği hatalı"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
msgstr "Geçersiz kapsam sonu"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
msgstr "Bellek tükendi"
#
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
msgstr "Bir önceki düzenli ifade hatalı"
#
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
msgstr "Düzenli ifade erken sonlandı"
#
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
msgstr "Düzenli ifade fazla büyük"
#
-#: lib/regcomp.c:180
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
msgstr "Eşleşmeyen ) or \\)"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
msgstr "Daha önce düzenli ifade yok"
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr "savchar() beklenmeyen geri itme (%x) ile çağrılmış"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr "İÇ HATA: Hatalı adres türü"
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr "İÇ HATA: Hatalı komut %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit files in place (makes backup if extension "
+#~ "supplied)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -r, --regexp-extended\n"
+#~ " use extended regular expressions in the script.\n"
+#~ "%s -s, --separate\n"
+#~ " consider files as separate rather than as a single "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ " load minimal amounts of data from the input files and "
+#~ "flush\n"
+#~ " the output buffers more often\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "Kullanım: %s [SEÇENEK]... {betik-eğer-başka-betik-yok-ise} [girdi-"
+#~ "dosyası]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " kalıp uzayının otomatik yazdırılmasını bastırır\n"
+#~ " -e betik, --expression=betik\n"
+#~ " betiği icra edilecek komutlara ekler\n"
+#~ " -f betik-dosyası, --file=betik-dosyası\n"
+#~ " betik-dosyasının içeriğini icra edilecek komutlara "
+#~ "ekler\n"
+#~ " -i[sonek], --in-place[=sonek]\n"
+#~ " dosyaları yerinde düzenler (sonek varsa, yedeklerini "
+#~ "alır\n"
+#~ " -l N, --line-length=N\n"
+#~ " `l' komutu için istenen satır uzunluğunu ayarlar\n"
+#~ " -r, --regexp-extended\n"
+#~ " betikte genişletilmiş düzenli ifadeler kullanır.\n"
+#~ "%s -s, --separate\n"
+#~ " dosyaları tek bir girdi olarak değil, ayrı ayrı "
+#~ "dosyalar\n"
+#~ " halinde işler.\n"
+#~ " -u, --unbuffered\n"
+#~ " girdi dosyalarından az miktarda veri yükler ve çıktı\n"
+#~ " yastıklarını daha sık boşaltır.\n"
+#~ " --help bu yardımı gösterir ve çıkar\n"
+#~ " -V, --version sürüm bilgisini gösterir ve çıkar\n"
+#~ "\n"
+#~ "Eğer -e, --expression, -f veya --file seçeneklerinden biri "
+#~ "verilmemişse, \n"
+#~ "bulunan ilk seçenek olmayan argüman, yorumlanacak sed betiği olarak "
+#~ "kabul \n"
+#~ "edilir. Bütün kalan argümanlar girdi dosyası adlarıdır; eğer girdi "
+#~ "dosyası adı\n"
+#~ "belirtilmemişse standart girdi okunur.\n"
+#~ "\n"
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "Beklenmeyen Dosya-Sonu"
+
+#~ msgid "bad regexp: %s\n"
+#~ msgstr "Hatalı düzenli ifade: %s\n"
+
+#~ msgid "input read error: %s"
+#~ msgstr "girdi okuma hatası: %s"
diff --git a/po/uk.gmo b/po/uk.gmo
new file mode 100644
index 0000000..95f472e
--- /dev/null
+++ b/po/uk.gmo
Binary files differ
diff --git a/po/uk.po b/po/uk.po
new file mode 100644
index 0000000..574b96f
--- /dev/null
+++ b/po/uk.po
@@ -0,0 +1,560 @@
+# sed .
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# Volodymyr M. Lisivka <lvm@mystery.lviv.net>, 2003
+# Dmytro O. Redchuk <dor@kiev-online.net>, 2002.
+# $Id: sed.po,v 1.3 2003/01/28 15:26:09 lvm Exp $
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: sed 4.0.4\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2003-01-25 12:42EET\n"
+"Last-Translator: Volodymyr M. Lisivka <lvm@mystery.lviv.net>\n"
+"Language-Team: Ukrainian <translation-team-uk@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=koi8-u\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: sed/compile.c:161
+#, fuzzy
+msgid "multiple `!'s"
+msgstr " ˦ \"!\""
+
+#: sed/compile.c:162
+#, fuzzy
+msgid "unexpected `,'"
+msgstr "ަ (,)"
+
+#: sed/compile.c:163
+#, fuzzy
+msgid "invalid usage of +N or ~N as first address"
+msgstr " +N ~N "
+
+#: sed/compile.c:164
+#, fuzzy
+msgid "unmatched `{'"
+msgstr " \"{\""
+
+#: sed/compile.c:165
+#, fuzzy
+msgid "unexpected `}'"
+msgstr "ަ `}'"
+
+#: sed/compile.c:166
+#, fuzzy
+msgid "extra characters after command"
+msgstr "צ Ц "
+
+#: sed/compile.c:167
+#, fuzzy
+msgid "expected \\ after `a', `c' or `i'"
+msgstr "ަ \\ Ц \"a\", \"c\" \"i\""
+
+#: sed/compile.c:168
+msgid "`}' doesn't want any addresses"
+msgstr "`}' դ - "
+
+#: sed/compile.c:169
+msgid ": doesn't want any addresses"
+msgstr ": դ - "
+
+#: sed/compile.c:170
+#, fuzzy
+msgid "comments don't accept any addresses"
+msgstr "Ҧ "
+
+#: sed/compile.c:171
+#, fuzzy
+msgid "missing command"
+msgstr " "
+
+#: sed/compile.c:172
+#, fuzzy
+msgid "command only uses one address"
+msgstr " Φ "
+
+#: sed/compile.c:173
+#, fuzzy
+msgid "unterminated address regex"
+msgstr " "
+
+#: sed/compile.c:174
+#, fuzzy
+msgid "unterminated `s' command"
+msgstr " \"s\""
+
+#: sed/compile.c:175
+#, fuzzy
+msgid "unterminated `y' command"
+msgstr " \"y\""
+
+#: sed/compile.c:176
+#, fuzzy
+msgid "unknown option to `s'"
+msgstr "צ \"s\""
+
+#: sed/compile.c:177
+msgid "multiple `p' options to `s' command"
+msgstr " ަ \"p\" \"s\""
+
+#: sed/compile.c:178
+msgid "multiple `g' options to `s' command"
+msgstr " ަ \"g\" \"s\""
+
+#: sed/compile.c:179
+msgid "multiple number options to `s' command"
+msgstr " Ҧ \"s\""
+
+#: sed/compile.c:180
+msgid "number option to `s' command may not be zero"
+msgstr " \"s\" "
+
+#: sed/compile.c:181
+#, fuzzy
+msgid "strings for `y' command are different lengths"
+msgstr " `y' Ҧϧ "
+
+#: sed/compile.c:182
+msgid "delimiter character is not a single-byte character"
+msgstr ""
+
+#: sed/compile.c:183
+msgid "expected newer version of sed"
+msgstr ""
+
+#: sed/compile.c:184
+#, fuzzy
+msgid "invalid usage of line address 0"
+msgstr " Ʀ "
+
+#: sed/compile.c:185
+#, fuzzy, c-format
+msgid "unknown command: `%c'"
+msgstr "צ :"
+
+#: sed/compile.c:208
+#, c-format
+msgid "%s: file %s line %lu: %s\n"
+msgstr "%s: %s %lu: %s\n"
+
+#: sed/compile.c:211
+#, c-format
+msgid "%s: -e expression #%lu, char %lu: %s\n"
+msgstr "%s: -e #%lu, ̦ %lu: %s\n"
+
+#: sed/compile.c:1664
+#, fuzzy, c-format
+msgid "can't find label for jump to `%s'"
+msgstr " ͦ \"%s\""
+
+#: sed/execute.c:701
+#, c-format
+msgid "%s: can't read %s: %s\n"
+msgstr "%s: %s: %s\n"
+
+#: sed/execute.c:728
+#, fuzzy, c-format
+msgid "couldn't edit %s: is a terminal"
+msgstr " %d %s: %s"
+
+#: sed/execute.c:733
+#, c-format
+msgid "couldn't edit %s: not a regular file"
+msgstr ""
+
+#: sed/execute.c:740 sed/utils.c:222
+#, fuzzy, c-format
+msgid "couldn't open temporary file %s: %s"
+msgstr " צ %s: %s"
+
+#: sed/execute.c:1270 sed/execute.c:1450
+msgid "error in subprocess"
+msgstr " ЦӦ"
+
+#: sed/execute.c:1272
+msgid "option `e' not supported"
+msgstr " \"e\" Цդ"
+
+#: sed/execute.c:1452
+msgid "`e' command not supported"
+msgstr " \"e\" Цդ"
+
+#: sed/execute.c:1796
+msgid "no input files"
+msgstr ""
+
+#: sed/regexp.c:41
+#, fuzzy
+msgid "no previous regular expression"
+msgstr " "
+
+#: sed/regexp.c:42
+#, fuzzy
+msgid "cannot specify modifiers on empty regexp"
+msgstr " Ʀ ڦ"
+
+#: sed/regexp.c:131
+#, fuzzy, c-format
+msgid "invalid reference \\%d on `s' command's RHS"
+msgstr " \\%d צ Φ \"s\""
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"צ : <%s>.\n"
+"' \"%s\" - ̦ \":\".\n"
+
+#: sed/sed.c:119
+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:124
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+"\n"
+msgstr ""
+
+#: sed/sed.c:128
+#, c-format
+msgid ""
+" -n, --quiet, --silent\n"
+" suppress automatic printing of pattern space\n"
+msgstr ""
+
+#: sed/sed.c:130
+#, c-format
+msgid ""
+" -e script, --expression=script\n"
+" add the script to the commands to be executed\n"
+msgstr ""
+
+#: sed/sed.c:132
+#, c-format
+msgid ""
+" -f script-file, --file=script-file\n"
+" add the contents of script-file to the commands to be "
+"executed\n"
+msgstr ""
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
+#, c-format
+msgid ""
+" -i[SUFFIX], --in-place[=SUFFIX]\n"
+" edit files in place (makes backup if extension supplied)\n"
+msgstr ""
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" -l N, --line-length=N\n"
+" specify the desired line-wrap length for the `l' command\n"
+msgstr ""
+
+#: sed/sed.c:146
+#, c-format
+msgid ""
+" --posix\n"
+" disable all GNU extensions.\n"
+msgstr ""
+
+#: sed/sed.c:148
+#, fuzzy, c-format
+msgid ""
+" -r, --regexp-extended\n"
+" use extended regular expressions in the script.\n"
+msgstr ""
+" -R, --regexp-perl\n"
+" Ҧ Φ Perl 5.\n"
+
+#: sed/sed.c:153
+#, c-format
+msgid ""
+" -s, --separate\n"
+" consider files as separate rather than as a single "
+"continuous\n"
+" long stream.\n"
+msgstr ""
+
+#: sed/sed.c:156
+#, c-format
+msgid ""
+" -u, --unbuffered\n"
+" load minimal amounts of data from the input files and "
+"flush\n"
+" the output buffers more often\n"
+msgstr ""
+
+#: sed/sed.c:159
+#, c-format
+msgid " --help display this help and exit\n"
+msgstr ""
+
+#: sed/sed.c:160
+#, c-format
+msgid " --version output version information and exit\n"
+msgstr ""
+
+#: sed/sed.c:161
+#, c-format
+msgid ""
+"\n"
+"If no -e, --expression, -f, or --file option is given, then the first\n"
+"non-option argument is taken as the sed script to interpret. All\n"
+"remaining arguments are names of input files; if no input files are\n"
+"specified, then the standard input is read.\n"
+"\n"
+msgstr ""
+
+#: sed/sed.c:317
+#, c-format
+msgid "super-sed version %s\n"
+msgstr "super-sed Ӧ %s\n"
+
+#: sed/sed.c:318
+#, fuzzy, c-format
+msgid ""
+"based on GNU sed version %s\n"
+"\n"
+msgstr ""
+" GNU sed Ӧ 3.02.80\n"
+"\n"
+
+#: sed/sed.c:320
+#, c-format
+msgid "GNU sed version %s\n"
+msgstr "GNU sed Ӧ %s\n"
+
+#: sed/sed.c:322
+#, c-format
+msgid ""
+"%s\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\n"
+"to the extent permitted by law.\n"
+msgstr ""
+
+#: sed/utils.c:93 sed/utils.c:433
+#, fuzzy, c-format
+msgid "cannot remove %s: %s"
+msgstr "%s: %s: %s\n"
+
+#: sed/utils.c:163
+#, fuzzy, c-format
+msgid "couldn't open file %s: %s"
+msgstr " צ %s: %s"
+
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr " %d %s: %s"
+
+#: sed/utils.c:240
+#, fuzzy, c-format
+msgid "couldn't write %d item to %s: %s"
+msgid_plural "couldn't write %d items to %s: %s"
+msgstr[0] " %d %s: %s"
+msgstr[1] " %d %s: %s"
+
+#: sed/utils.c:255 sed/utils.c:271
+#, c-format
+msgid "read error on %s: %s"
+msgstr " %s: %s"
+
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr " צ %s: %s"
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "%s: %s: %s\n"
+
+#: sed/utils.c:438
+#, fuzzy, c-format
+msgid "cannot rename %s: %s"
+msgstr "%s: %s: %s\n"
+
+#: lib/regcomp.c:134
+msgid "Success"
+msgstr "Ц"
+
+#: lib/regcomp.c:137
+msgid "No match"
+msgstr " צצԦ"
+
+#: lib/regcomp.c:140
+msgid "Invalid regular expression"
+msgstr " "
+
+#: lib/regcomp.c:143
+msgid "Invalid collation character"
+msgstr " Ц"
+
+#: lib/regcomp.c:146
+msgid "Invalid character class name"
+msgstr "צ ' ̦"
+
+#: lib/regcomp.c:149
+msgid "Trailing backslash"
+msgstr "Φ ˦æ "
+
+#: lib/regcomp.c:152
+msgid "Invalid back reference"
+msgstr " Τ "
+
+#: lib/regcomp.c:155
+msgid "Unmatched [ or [^"
+msgstr " [ [^"
+
+#: lib/regcomp.c:158
+msgid "Unmatched ( or \\("
+msgstr " ( \\("
+
+#: lib/regcomp.c:161
+msgid "Unmatched \\{"
+msgstr " \\{"
+
+#: lib/regcomp.c:164
+msgid "Invalid content of \\{\\}"
+msgstr " ͦ \\{\\}"
+
+#: lib/regcomp.c:167
+msgid "Invalid range end"
+msgstr " ˦ Ħ"
+
+#: lib/regcomp.c:170
+msgid "Memory exhausted"
+msgstr "' "
+
+#: lib/regcomp.c:173
+msgid "Invalid preceding regular expression"
+msgstr " Φ "
+
+#: lib/regcomp.c:176
+msgid "Premature end of regular expression"
+msgstr " ˦ "
+
+#: lib/regcomp.c:179
+msgid "Regular expression too big"
+msgstr " "
+
+#: lib/regcomp.c:182
+msgid "Unmatched ) or \\)"
+msgstr " ) \\)"
+
+#: lib/regcomp.c:703
+msgid "No previous regular expression"
+msgstr " "
+
+#~ msgid "Unexpected End-of-file"
+#~ msgstr "ަ ˦ "
+
+#~ msgid "Called savchar() with unexpected pushback (%x)"
+#~ msgstr " savchar() ަ pushback (%x)"
+
+#~ msgid "INTERNAL ERROR: bad address type"
+#~ msgstr " : צ "
+
+#~ msgid "INTERNAL ERROR: Bad cmd %c"
+#~ msgstr " : %c"
+
+#~ msgid ""
+#~ "Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " suppress automatic printing of pattern space\n"
+#~ " -e script, --expression=script\n"
+#~ " add the script to the commands to be executed\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " add the contents of script-file to the commands to be "
+#~ "executed\n"
+#~ " -i[suffix], --in-place[=suffix]\n"
+#~ " edit files in place (makes backup if extension "
+#~ "supplied)\n"
+#~ " -l N, --line-length=N\n"
+#~ " specify the desired line-wrap length for the `l' "
+#~ "command\n"
+#~ " -r, --regexp-extended\n"
+#~ " use extended regular expressions in the script.\n"
+#~ "%s -s, --separate\n"
+#~ " consider files as separate rather than as a single "
+#~ "continuous\n"
+#~ " long stream.\n"
+#~ " -u, --unbuffered\n"
+#~ " load minimal amounts of data from the input files and "
+#~ "flush\n"
+#~ " the output buffers more often\n"
+#~ " --help display this help and exit\n"
+#~ " -V, --version output version information and exit\n"
+#~ "\n"
+#~ "If no -e, --expression, -f, or --file option is given, then the first\n"
+#~ "non-option argument is taken as the sed script to interpret. All\n"
+#~ "remaining arguments are names of input files; if no input files are\n"
+#~ "specified, then the standard input is read.\n"
+#~ "\n"
+#~ msgstr ""
+#~ ": %s [].. {----Ԧ} [Ȧ-"
+#~ "]...\n"
+#~ "\n"
+#~ " -n, --quiet, --silent\n"
+#~ " ͦ \n"
+#~ " -e script, --expression=script\n"
+#~ " Ҧ , Φ\n"
+#~ " -f script-file, --file=script-file\n"
+#~ " ͦ Ҧ , "
+#~ "Φ\n"
+#~ " -i[Ʀ], --in-place[=Ʀ]\n"
+#~ " \" ͦæ\"\n"
+#~ " ( Ц, )\n"
+#~ " -l N, --line-length=N\n"
+#~ " \"l"
+#~ "\"\n"
+#~ " -r, --regexp-extended\n"
+#~ " Ҧ Φ Φ .\n"
+#~ "%s -s, --separate\n"
+#~ " Ħ, "
+#~ "Ԧ\n"
+#~ " -u, --unbuffered\n"
+#~ " ͦΦ ˦˦ Ȧ ̦,\n"
+#~ " ȦΦ Ԧ\n"
+#~ " --help Ц \n"
+#~ " -V, --version æ Ӧ \n"
+#~ "\n"
+#~ " -e, --expression, -f, --file, ,\n"
+#~ " rk.xtv Ҧ, . Ӧ "
+#~ "ۦ\n"
+#~ " Ȧ ̦; ˦ ,\n"
+#~ "Φ Φ .\n"
+#~ "\n"
diff --git a/po/vi.gmo b/po/vi.gmo
new file mode 100644
index 0000000..aa2e14a
--- /dev/null
+++ b/po/vi.gmo
Binary files differ
diff --git a/po/vi.po b/po/vi.po
new file mode 100644
index 0000000..84feef9
--- /dev/null
+++ b/po/vi.po
@@ -0,0 +1,502 @@
+# Vietnamese translation for Sed.
+# Copyright © 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the sed-4.2.0 package.
+# Clytie Siddall <clytie@riverland.net.au>, 2005-2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-18 21:56+1030\n"
+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"Language-Team: Vietnamese <vi-VN@googlegroups.com> \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: LocFactory Editor 1.7b1\n"
+
+#: sed/compile.c:161
+msgid "multiple `!'s"
+msgstr "có nhiều dấu cảm « ! »"
+
+#: sed/compile.c:162
+msgid "unexpected `,'"
+msgstr "gặp dấu phẩy « , » bất thường"
+
+#: sed/compile.c:163
+msgid "invalid usage of +N or ~N as first address"
+msgstr ""
+"dùng « +N » hay « -N » như là địa chỉ đầu tiên một cách không là hợp lệ"
+
+#: sed/compile.c:164
+msgid "unmatched `{'"
+msgstr "có dấu ngoặc móc mở « { » riêng lẻ"
+
+#: sed/compile.c:165
+msgid "unexpected `}'"
+msgstr "gặp dấu ngoặc móc đóng « } » bất thường"
+
+#: sed/compile.c:166
+msgid "extra characters after command"
+msgstr "có ký tự thêm nằm sau lệnh"
+
+#: sed/compile.c:167
+msgid "expected \\ after `a', `c' or `i'"
+msgstr "yêu cầu « \\ » nằm sau « a », « c » hay « i »"
+
+#: sed/compile.c:168
+msgid "`}' doesn't want any addresses"
+msgstr "dấu ngoặc móc đóng « } » không yêu cầu địa chỉ"
+
+#: sed/compile.c:169
+msgid ": doesn't want any addresses"
+msgstr "dấu hai chấm « : » không yêu cầu địa chỉ"
+
+#: sed/compile.c:170
+msgid "comments don't accept any addresses"
+msgstr "chú thích không chấp nhận địa chỉ"
+
+#: sed/compile.c:171
+msgid "missing command"
+msgstr "thiếu lệnh"
+
+#: sed/compile.c:172
+msgid "command only uses one address"
+msgstr "lệnh chỉ dùng một địa chỉ riêng lẻ"
+
+#: sed/compile.c:173
+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:174
+msgid "unterminated `s' command"
+msgstr "lệnh « s » chưa kết thúc"
+
+#: sed/compile.c:175
+msgid "unterminated `y' command"
+msgstr "lệnh « y » chưa kết thúc"
+
+#: sed/compile.c:176
+msgid "unknown option to `s'"
+msgstr "« s » có tùy chọn không rõ"
+
+#: sed/compile.c:177
+msgid "multiple `p' options to `s' command"
+msgstr "lệnh « s » có nhiều tùy chọn kiểu « p »"
+
+#: sed/compile.c:178
+msgid "multiple `g' options to `s' command"
+msgstr "lệnh « s » có nhiều tùy chọn kiểu « g »"
+
+#: sed/compile.c:179
+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:180
+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:181
+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:182
+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:183
+msgid "expected newer version of sed"
+msgstr "yêu cầu phiên bản trình sed mới hơn"
+
+#: sed/compile.c:184
+msgid "invalid usage of line address 0"
+msgstr "sai dùng địa chỉ dòng 0"
+
+#: sed/compile.c:185
+#, c-format
+msgid "unknown command: `%c'"
+msgstr "không rõ lệnh: « %c »"
+
+#: sed/compile.c:208
+#, c-format
+msgid "%s: file %s line %lu: %s\n"
+msgstr "%s: tập tin %s dòng %lu: %s\n"
+
+#: sed/compile.c:211
+#, 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:1664
+#, 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:701
+#, c-format
+msgid "%s: can't read %s: %s\n"
+msgstr "%s: không thể đọc %s: %s\n"
+
+#: sed/execute.c:728
+#, 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:733
+#, 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 chuẩn"
+
+#: sed/execute.c:740 sed/utils.c:222
+#, 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:1270 sed/execute.c:1450
+msgid "error in subprocess"
+msgstr "gặp lỗi trong tiến trình con"
+
+#: sed/execute.c:1272
+msgid "option `e' not supported"
+msgstr "không hỗ trợ tùy chọn « e »"
+
+#: sed/execute.c:1452
+msgid "`e' command not supported"
+msgstr "không hỗ trợ lệnh « e »"
+
+#: sed/execute.c:1796
+msgid "no input files"
+msgstr "không có tập tin nhập vào"
+
+#: sed/regexp.c:41
+msgid "no previous regular expression"
+msgstr "không có biểu thức chính quy nằm trước"
+
+#: sed/regexp.c:42
+msgid "cannot specify modifiers on empty regexp"
+msgstr "không thể ghi rõ cờ sửa đổi với biểu thức chính quy trống"
+
+#: sed/regexp.c:131
+#, 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/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"Hãy thông báo lỗi cho: <%s>.\n"
+"Thư thông báo nên chứa từ « %s » trong trường « Chủ đề ».\n"
+
+#: sed/sed.c:119
+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"
+"\t\t\ttrong văn lệnh.\n"
+
+#: sed/sed.c:124
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+"\n"
+msgstr ""
+"Sử dụng: %s [TÙY_CHỌN]... {văn lệnh chỉ nếu không có văn bản khác} [tập tin "
+"nhập vào]...\n"
+"\n"
+
+#: sed/sed.c:128
+#, c-format
+msgid ""
+" -n, --quiet, --silent\n"
+" suppress automatic printing of pattern space\n"
+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:130
+#, c-format
+msgid ""
+" -e script, --expression=script\n"
+" add the script to the commands to be executed\n"
+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:132
+#, 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 tập_tin_văn_lệnh --file=tập_tin_văn_lệnh\n"
+" thêm nội dụng của tập tin văn lệnh này\n"
+"\t\t\tvào các câu lệnh cần thực hiện\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" theo liên kết tượng trưng khi xử lý tại chỗ\n"
+
+#: sed/sed.c:138
+#, c-format
+msgid ""
+" -i[SUFFIX], --in-place[=SUFFIX]\n"
+" edit files in place (makes backup if extension supplied)\n"
+msgstr ""
+" -i[HẬU_TỐ], --in-place[=HẬU_TỐ]\n"
+" chỉnh sửa tập tin tại chỗ\n"
+"\t\t\t(tạo bản sao lưu nếu phần mở rộng được cung cấp)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" mở tập tin ở chế độ nhị phân\n"
+"\t\t\t(không phải xử lý đặc biệt ký tự xuống dòng CR+LF)\n"
+
+#: sed/sed.c:144
+#, 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"
+" ghi rõ chiều dài ngắt dòng đá muốn cho lệnh « l »\n"
+
+#: sed/sed.c:146
+#, c-format
+msgid ""
+" --posix\n"
+" disable all GNU extensions.\n"
+msgstr ""
+" --posix\n"
+" tắt mọi phần mở rộng kiểu GNU\n"
+
+#: sed/sed.c:148
+#, c-format
+msgid ""
+" -r, --regexp-extended\n"
+" use extended regular expressions in the script.\n"
+msgstr ""
+" -r, --regexp-extended\n"
+" dùng biểu thức chính quy đã mở rộng trong văn lênh.\n"
+
+#: sed/sed.c:153
+#, c-format
+msgid ""
+" -s, --separate\n"
+" consider files as separate rather than as a single "
+"continuous\n"
+" long stream.\n"
+msgstr ""
+" -s, --separate\n"
+" thấy các tập tin là riêng với nhau, hơn là một luồng liên "
+"tục riêng lẻ.\n"
+
+#: sed/sed.c:156
+#, c-format
+msgid ""
+" -u, --unbuffered\n"
+" load minimal amounts of data from the input files and "
+"flush\n"
+" the output buffers more often\n"
+msgstr ""
+" -u, --unbuffered\n"
+" nạp số lượng dữ liệu tối thiểu từ các tập tin nhấp vào,\n"
+"\t\t\tvà làm tràn thường xuyên hơn các bộ đệm xuất\n"
+
+#: sed/sed.c:159
+#, c-format
+msgid " --help display this help and exit\n"
+msgstr " --help \t\thiện trợ giúp này rồi thoát\n"
+
+#: sed/sed.c:160
+#, c-format
+msgid " --version output version information and exit\n"
+msgstr " --version \txuất thông tin phiên bản rồi thoát\n"
+
+#: sed/sed.c:161
+#, c-format
+msgid ""
+"\n"
+"If no -e, --expression, -f, or --file option is given, then the first\n"
+"non-option argument is taken as the sed script to interpret. All\n"
+"remaining arguments are names of input files; if no input files are\n"
+"specified, then the standard input is read.\n"
+"\n"
+msgstr ""
+"\n"
+"Không đưa ra tùy chọn « -e », « --expression » (biểu thức),\n"
+"« -f » hay « --file » (tập tin) thì đối số khác tùy chọn thứ nhất\n"
+"được xử lý như là văn lệnh sed cần giải dịch. Tất cả các đối số\n"
+"còn lại là tên của tập tin nhập vào ; không ghi rõ tập tin nhập\n"
+"thì đọc đầu vào tiêu chuẩn.\n"
+
+#: sed/sed.c:317
+#, c-format
+msgid "super-sed version %s\n"
+msgstr "super-sed phiên bản %s\n"
+
+#: sed/sed.c:318
+#, c-format
+msgid ""
+"based on GNU sed version %s\n"
+"\n"
+msgstr ""
+"dựa vào trình sed phiên bản %s của GNU\n"
+"\n"
+
+#: sed/sed.c:320
+#, c-format
+msgid "GNU sed version %s\n"
+msgstr "sed phiên bản %s của GNU\n"
+
+#: sed/sed.c:322
+#, c-format
+msgid ""
+"%s\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\n"
+"to the extent permitted by law.\n"
+msgstr ""
+"%s\n"
+"Chương trình này là phần mềm tự do; xem mã nguồn để tìm điều kiện sao chép.\n"
+"KHÔNG CÓ BẢO HÀNH GÌ CẢ, THẬM CHÍ KHÔNG CÓ BẢO ĐẢM ĐƯỢC NGỤ Ý\n"
+"KHẢ NĂNG BÁN HAY KHẢ NĂNG LÀM ĐƯỢC VIỆC DỨT KHOÁT,\n"
+"với điều kiện được pháp luật cho phép.\n"
+
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
+msgid "cannot remove %s: %s"
+msgstr "không thể gỡ bỏ %s: %s"
+
+#: sed/utils.c:163
+#, c-format
+msgid "couldn't open file %s: %s"
+msgstr "không thể mở tập tin %s: %s"
+
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "không thể gắn với %s: %s"
+
+#: sed/utils.c:240
+#, c-format
+msgid "couldn't write %d item to %s: %s"
+msgid_plural "couldn't write %d items to %s: %s"
+msgstr[0] "không thể ghi %d mục vào %s: %s"
+
+#: sed/utils.c:255 sed/utils.c:271
+#, c-format
+msgid "read error on %s: %s"
+msgstr "lỗi đọc trên %s: %s"
+
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "không thể theo liên kết tượng trưng %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "không thể lấy trạng thái về %s: %s"
+
+#: sed/utils.c:438
+#, c-format
+msgid "cannot rename %s: %s"
+msgstr "không thể thay đổi tên của %s: %s"
+
+#: lib/regcomp.c:134
+msgid "Success"
+msgstr "Thành công"
+
+#: lib/regcomp.c:137
+msgid "No match"
+msgstr "Không tìm thấy"
+
+#: lib/regcomp.c:140
+msgid "Invalid regular expression"
+msgstr "Biểu thức chính quy không hợp lệ"
+
+#: lib/regcomp.c:143
+msgid "Invalid collation character"
+msgstr "Ký tự đối chiếu không hợp lệ"
+
+#: lib/regcomp.c:146
+msgid "Invalid character class name"
+msgstr "Tên hạng ký tự không hợp lệ"
+
+#: lib/regcomp.c:149
+msgid "Trailing backslash"
+msgstr "Có dấu xuyệc ngược theo sau"
+
+#: lib/regcomp.c:152
+msgid "Invalid back reference"
+msgstr "Tham chiếu ngược không hợp lệ"
+
+#: lib/regcomp.c:155
+msgid "Unmatched [ or [^"
+msgstr "Có dấu ngoặc vu mở « [ » hay « [^ » riêng lẻ"
+
+#: lib/regcomp.c:158
+msgid "Unmatched ( or \\("
+msgstr "Có dấu ngoặc mở « ( » hay « \\( » riêng lẻ"
+
+#: lib/regcomp.c:161
+msgid "Unmatched \\{"
+msgstr "Có dấu ngoặc đơn mở « \\( » riêng lẻ"
+
+#: lib/regcomp.c:164
+msgid "Invalid content of \\{\\}"
+msgstr "« \\{\\} » có nội dung không hợp lệ"
+
+#: lib/regcomp.c:167
+msgid "Invalid range end"
+msgstr "Kết thúc phạm vị không hợp lệ"
+
+#: lib/regcomp.c:170
+msgid "Memory exhausted"
+msgstr "Cạn bộ nhớ"
+
+#: lib/regcomp.c:173
+msgid "Invalid preceding regular expression"
+msgstr "Biểu thức chính quy đi trước không hợp lệ"
+
+#: lib/regcomp.c:176
+msgid "Premature end of regular expression"
+msgstr "Biểu thức chính quy kết thúc quá sớm"
+
+#: lib/regcomp.c:179
+msgid "Regular expression too big"
+msgstr "Biểu thức chính quy quá lớn"
+
+#: lib/regcomp.c:182
+msgid "Unmatched ) or \\)"
+msgstr "Có dấu ngoặc đơn đóng « ) » hay « \\) » riêng lẻ"
+
+#: lib/regcomp.c:703
+msgid "No previous regular expression"
+msgstr "Không có biểu thức chính quy đi trước"
diff --git a/po/zh_CN.gmo b/po/zh_CN.gmo
index 154aba5..5b13ab3 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 8709ff7..40599c7 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -1,263 +1,304 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) 2002 Free Software Foundation, Inc.
-# Wang Li <charles@linux.net.cn>, 2002.
+# Simplified Chinese(zh_CN) translation for sed
#
+# Copyright (C) 2002, 2007, 2008 Free Software Foundation, Inc.
+# LI Daobing <lidaobing@gmail.com>, 2007, 2008.
+# Wang Li <charles@linux.net.cn>, 2002.
msgid ""
msgstr ""
-"Project-Id-Version: sed 3.02.80\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-03 10:26+0100\n"
-"PO-Revision-Date: 2002-08-18 11:11+0800\n"
-"Last-Translator: Wang Li <charles@linux.net.cn>\n"
-"Language-Team: Chinese (simplified) <i18n-translation@lists.linux.net.cn>\n"
+"Project-Id-Version: sed 4.2.0\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2008-01-28 23:17+0800\n"
+"Last-Translator: LI Daobing <lidaobing@gmail.com>\n"
+"Language-Team: Chinese (simplified) <translation-team-zh-cn@lists."
+"sourceforge.net>\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=gb2312\n"
+"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
-#: sed/compile.c:162
-#, fuzzy
+#: sed/compile.c:161
msgid "multiple `!'s"
-msgstr "!"
+msgstr "多个“!”"
-#: sed/compile.c:163
-#, fuzzy
+#: sed/compile.c:162
msgid "unexpected `,'"
-msgstr "ġ,"
+msgstr "意外的“,”"
-#: sed/compile.c:164
-#, fuzzy
+#: sed/compile.c:163
msgid "invalid usage of +N or ~N as first address"
-msgstr "޷ +N ~N Ϊһַ"
+msgstr "无法将 +N 或 ~N 作为第一个地址"
-#: sed/compile.c:165
-#, fuzzy
+#: sed/compile.c:164
msgid "unmatched `{'"
-msgstr "δƥġ{"
+msgstr "未匹配的“{”"
-#: sed/compile.c:166
-#, fuzzy
+#: sed/compile.c:165
msgid "unexpected `}'"
-msgstr "δƥġ}"
+msgstr "意外的“}”"
-#: sed/compile.c:167
-#, fuzzy
+#: sed/compile.c:166
msgid "extra characters after command"
-msgstr "жַ"
+msgstr "命令后含有多余的字符"
-#: sed/compile.c:168
+#: sed/compile.c:167
msgid "expected \\ after `a', `c' or `i'"
-msgstr ""
+msgstr "期望在“a”, “c”, “i”之后有“\\”"
-#: sed/compile.c:169
+#: sed/compile.c:168
msgid "`}' doesn't want any addresses"
-msgstr "}Ҫκεַ"
+msgstr "“}”不需要任何地址"
-#: sed/compile.c:170
+#: sed/compile.c:169
msgid ": doesn't want any addresses"
-msgstr ": Ҫκεַ"
+msgstr ": 不需要任何地址"
-#: sed/compile.c:171
-#, fuzzy
+#: sed/compile.c:170
msgid "comments don't accept any addresses"
-msgstr "עͲκεַ"
+msgstr "注释不接受任何地址"
-#: sed/compile.c:172
-#, fuzzy
+#: sed/compile.c:171
msgid "missing command"
-msgstr "©"
+msgstr "遗漏命令"
-#: sed/compile.c:173
-#, fuzzy
+#: sed/compile.c:172
msgid "command only uses one address"
-msgstr "ֻʹһַ"
+msgstr "命令只使用一个地址"
-#: sed/compile.c:174
-#, fuzzy
+#: sed/compile.c:173
msgid "unterminated address regex"
-msgstr "δֹĵַʽ"
+msgstr "未终止的地址正则表达式"
-#: sed/compile.c:175
-#, fuzzy
+#: sed/compile.c:174
msgid "unterminated `s' command"
-msgstr "δֹġs"
+msgstr "未终止的“s”命令"
-#: sed/compile.c:176
-#, fuzzy
+#: sed/compile.c:175
msgid "unterminated `y' command"
-msgstr "δֹġy"
+msgstr "未终止的“y”命令"
-#: sed/compile.c:177
-#, fuzzy
+#: sed/compile.c:176
msgid "unknown option to `s'"
-msgstr "sδ֪ѡ"
+msgstr "“s”的未知选项"
-#: sed/compile.c:178
+#: sed/compile.c:177
msgid "multiple `p' options to `s' command"
-msgstr "sѡp"
+msgstr "多个“s”命令的选项“p”"
-#: sed/compile.c:179
+#: sed/compile.c:178
msgid "multiple `g' options to `s' command"
-msgstr "sѡg"
+msgstr "多个“s”命令的选项“g”"
-#: sed/compile.c:180
+#: sed/compile.c:179
msgid "multiple number options to `s' command"
-msgstr "sֵѡ"
+msgstr "多个“s”命令的数值选项"
-#: sed/compile.c:181
+#: sed/compile.c:180
msgid "number option to `s' command may not be zero"
-msgstr "sֵѡΪ"
+msgstr "“s”命令的数值选项不能为零"
-#: sed/compile.c:182
-#, fuzzy
+#: sed/compile.c:181
msgid "strings for `y' command are different lengths"
-msgstr "y ַȲͬ"
+msgstr "“y”命令的字符串长度不同"
-#: sed/compile.c:183
+#: sed/compile.c:182
msgid "delimiter character is not a single-byte character"
-msgstr ""
+msgstr "分割符长度不为1"
-#: sed/compile.c:184
+#: sed/compile.c:183
msgid "expected newer version of sed"
-msgstr ""
+msgstr "需要更高版本的sed"
-#: sed/compile.c:185
-#, fuzzy
+#: sed/compile.c:184
msgid "invalid usage of line address 0"
-msgstr "Ƿʹõַη"
+msgstr "非法使用地址0"
-#: sed/compile.c:186
-#, fuzzy, c-format
+#: sed/compile.c:185
+#, c-format
msgid "unknown command: `%c'"
-msgstr "δ֪"
+msgstr "未知的命令:“%c”"
-#: sed/compile.c:209
+#: sed/compile.c:208
#, c-format
msgid "%s: file %s line %lu: %s\n"
-msgstr "%sļ %s кţ%lu%s\n"
+msgstr "%s:文件 %s 行号:%lu:%s\n"
-#: sed/compile.c:212
+#: sed/compile.c:211
#, c-format
msgid "%s: -e expression #%lu, char %lu: %s\n"
-msgstr "%s-e ʽ #%luַ %lu%s\n"
+msgstr "%s:-e 表达式 #%lu,字符 %lu:%s\n"
-#: sed/compile.c:1644
-#, fuzzy, c-format
+#: sed/compile.c:1664
+#, c-format
msgid "can't find label for jump to `%s'"
-msgstr "޷ΪĿΪ%sתҵǩ"
+msgstr "无法为目的为“%s”的跳转找到标签"
-#: sed/execute.c:650
+#: sed/execute.c:701
#, c-format
msgid "%s: can't read %s: %s\n"
-msgstr "%s޷ȡ %s%s\n"
+msgstr "%s:无法读取 %s:%s\n"
-#: sed/execute.c:673
-#, fuzzy, c-format
+#: sed/execute.c:728
+#, c-format
msgid "couldn't edit %s: is a terminal"
-msgstr "޷ļ %s"
+msgstr "无法编辑文件 %s: 这是一个终端"
-#: sed/execute.c:677
-#, fuzzy, c-format
+#: sed/execute.c:733
+#, c-format
msgid "couldn't edit %s: not a regular file"
-msgstr "޷ļ %s"
+msgstr "无法编辑文件 %s: 不是一个普通文件"
-#: sed/execute.c:684 lib/utils.c:196
-#, fuzzy, c-format
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
msgid "couldn't open temporary file %s: %s"
-msgstr "޷ļ %s"
+msgstr "无法打开临时文件 %s: %s"
-#: sed/execute.c:1206 sed/execute.c:1387
+#: sed/execute.c:1270 sed/execute.c:1450
msgid "error in subprocess"
-msgstr ""
+msgstr "子进程出错"
-#: sed/execute.c:1208
+#: sed/execute.c:1272
msgid "option `e' not supported"
-msgstr ""
+msgstr "不支持选项“e”"
-#: sed/execute.c:1389
+#: sed/execute.c:1452
msgid "`e' command not supported"
-msgstr ""
+msgstr "不支持命令“e”"
-#: sed/execute.c:1714
+#: sed/execute.c:1796
msgid "no input files"
-msgstr ""
+msgstr "没有输入文件"
-#: sed/regexp.c:39
+#: sed/regexp.c:41
msgid "no previous regular expression"
-msgstr ""
+msgstr "前面没有正则表达式"
-#: sed/regexp.c:40
+#: sed/regexp.c:42
msgid "cannot specify modifiers on empty regexp"
-msgstr ""
+msgstr "无法对空正则表达式指定修饰符"
-#: sed/regexp.c:115
+#: sed/regexp.c:131
#, c-format
msgid "invalid reference \\%d on `s' command's RHS"
+msgstr "“s”命令的RHS非法引用\\%d"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
msgstr ""
+"将错误报告通过电子邮件发送到:<%s>.\n"
+"请务必将单词“%s”放在标题的某处。\n"
-#: sed/sed.c:93
+#: sed/sed.c:119
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:98
+#: sed/sed.c:124
#, c-format
msgid ""
"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
"\n"
msgstr ""
+"用法: %s [选项]... {脚本(如果没有其他脚本)} [输入文件]...\n"
+"\n"
-#: sed/sed.c:102
+#: sed/sed.c:128
#, c-format
msgid ""
" -n, --quiet, --silent\n"
" suppress automatic printing of pattern space\n"
msgstr ""
+" -n, --quiet, --silent\n"
+" 取消自动打印模式空间\n"
-#: sed/sed.c:104
+#: sed/sed.c:130
#, c-format
msgid ""
" -e script, --expression=script\n"
" add the script to the commands to be executed\n"
msgstr ""
+" -e 脚本, --expression=脚本\n"
+" 添加“脚本”到程序的运行列表\n"
-#: sed/sed.c:106
+#: sed/sed.c:132
#, c-format
msgid ""
" -f script-file, --file=script-file\n"
" add the contents of script-file to the commands to be "
"executed\n"
msgstr ""
+" -f 脚本文件, --file=脚本文件\n"
+" 添加“脚本文件”到程序的运行列表\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+" --follow-symlinks\n"
+" 直接修改文件时跟随软链接\n"
-#: sed/sed.c:108
+#: sed/sed.c:138
#, c-format
msgid ""
" -i[SUFFIX], --in-place[=SUFFIX]\n"
" edit files in place (makes backup if extension supplied)\n"
msgstr ""
+" -i[扩展名], --in-place[=扩展名]\n"
+" 直接修改文件(如果指定扩展名就备份文件)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+" -b, --binary\n"
+" 以二进制方式打开文件 (回车加换行不做特殊处理)\n"
-#: sed/sed.c:110
+#: sed/sed.c:144
#, c-format
msgid ""
" -l N, --line-length=N\n"
" specify the desired line-wrap length for the `l' command\n"
msgstr ""
+" -l N, --line-length=N\n"
+" 指定“l”命令的换行期望长度\n"
-#: sed/sed.c:112
+#: sed/sed.c:146
#, c-format
msgid ""
" --posix\n"
" disable all GNU extensions.\n"
msgstr ""
+" --posix\n"
+" 关闭所有 GNU 扩展\n"
-#: sed/sed.c:114
+#: sed/sed.c:148
#, c-format
msgid ""
" -r, --regexp-extended\n"
" use extended regular expressions in the script.\n"
msgstr ""
+" -r, --regexp-extended\n"
+" 在脚本中使用扩展正则表达式\n"
-#: sed/sed.c:117
+#: sed/sed.c:153
#, c-format
msgid ""
" -s, --separate\n"
@@ -265,8 +306,10 @@ msgid ""
"continuous\n"
" long stream.\n"
msgstr ""
+" -s, --separate\n"
+" 将输入文件视为各个独立的文件而不是一个长的连续输入\n"
-#: sed/sed.c:120
+#: sed/sed.c:156
#, c-format
msgid ""
" -u, --unbuffered\n"
@@ -274,18 +317,20 @@ msgid ""
"flush\n"
" the output buffers more often\n"
msgstr ""
+" -u, --unbuffered\n"
+" 从输入文件读取最少的数据,更频繁的刷新输出\n"
-#: sed/sed.c:123
+#: sed/sed.c:159
#, c-format
msgid " --help display this help and exit\n"
-msgstr ""
+msgstr " --help 打印帮助并退出\n"
-#: sed/sed.c:124
+#: sed/sed.c:160
#, c-format
msgid " --version output version information and exit\n"
-msgstr ""
+msgstr " --version 输出版本信息并退出\n"
-#: sed/sed.c:125
+#: sed/sed.c:161
#, c-format
msgid ""
"\n"
@@ -295,34 +340,31 @@ msgid ""
"specified, then the standard input is read.\n"
"\n"
msgstr ""
+"\n"
+"如果没有 -e, --expression, -f 或 --file 选项,那么第一个非选项参数被视为\n"
+"sed脚本。其他非选项参数被视为输入文件,如果没有输入文件,那么程序将从标准\n"
+"输入读取数据。\n"
-#: sed/sed.c:131
-#, c-format
-msgid ""
-"E-mail bug reports to: %s .\n"
-"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
-msgstr ""
-"󱨸ͨʼ͵%s .\n"
-"ؽʡ%sڡSubject:ij\n"
-
-#: sed/sed.c:268
+#: sed/sed.c:317
#, c-format
msgid "super-sed version %s\n"
-msgstr ""
+msgstr "超级-sed 版本 %s\n"
-#: sed/sed.c:269
+#: sed/sed.c:318
#, c-format
msgid ""
"based on GNU sed version %s\n"
"\n"
msgstr ""
+"基于 GNU sed 版本 %s\n"
+"\n"
-#: sed/sed.c:271
+#: sed/sed.c:320
#, c-format
msgid "GNU sed version %s\n"
-msgstr ""
+msgstr "GNU sed 版本 %s\n"
-#: sed/sed.c:273
+#: sed/sed.c:322
#, c-format
msgid ""
"%s\n"
@@ -330,106 +372,119 @@ msgid ""
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\n"
"to the extent permitted by law.\n"
msgstr ""
+"%s\n"
+"该程序为自由软件,详情可参阅版权条款。在法律允许的范围内我们不作任何担保,\n"
+"这包含但不限于任何商业适售性以及针对特定目的的适用性的担保。\n"
-#: lib/utils.c:98 lib/utils.c:336
-#, fuzzy, c-format
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
msgid "cannot remove %s: %s"
-msgstr "%s޷ȡ %s%s\n"
+msgstr "无法移除 %s:%s"
-#: lib/utils.c:143
-#, fuzzy, c-format
+#: sed/utils.c:163
+#, c-format
msgid "couldn't open file %s: %s"
-msgstr "޷ļ %s"
+msgstr "无法打开文件 %s: %s"
+
+#: sed/utils.c:186
+#, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "无法绑定 %s: %s"
-#: lib/utils.c:220
-#, fuzzy, c-format
+#: sed/utils.c:240
+#, c-format
msgid "couldn't write %d item to %s: %s"
msgid_plural "couldn't write %d items to %s: %s"
-msgstr[0] "޷ %d Ŀд %s%s"
-msgstr[1] "޷ %d Ŀд %s%s"
+msgstr[0] "无法将 %d 个项目写入 %s:%s"
-#: lib/utils.c:235 lib/utils.c:251
+#: sed/utils.c:255 sed/utils.c:271
#, c-format
msgid "read error on %s: %s"
-msgstr "ȡ %s %s"
+msgstr "读取 %s 出错:%s"
+
+#: sed/utils.c:373
+#, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "无法跟随软链接 %s: %s"
+
+#: sed/utils.c:407
+#, c-format
+msgid "cannot stat %s: %s"
+msgstr "无法获取 %s 的状态: %s"
-#: lib/utils.c:341
-#, fuzzy, c-format
+#: sed/utils.c:438
+#, c-format
msgid "cannot rename %s: %s"
-msgstr "%s޷ȡ %s%s\n"
+msgstr "无法重命名 %s:%s"
-#: lib/regcomp.c:132
+#: lib/regcomp.c:134
msgid "Success"
-msgstr ""
+msgstr "成功"
-#: lib/regcomp.c:135
+#: lib/regcomp.c:137
msgid "No match"
-msgstr ""
+msgstr "没有匹配项"
-#: lib/regcomp.c:138
+#: lib/regcomp.c:140
msgid "Invalid regular expression"
-msgstr ""
+msgstr "非法的正则表达式"
-#: lib/regcomp.c:141
+#: lib/regcomp.c:143
msgid "Invalid collation character"
-msgstr ""
+msgstr "非法的收集字符"
-#: lib/regcomp.c:144
+#: lib/regcomp.c:146
msgid "Invalid character class name"
-msgstr ""
+msgstr "非法的字符类型名"
-#: lib/regcomp.c:147
+#: lib/regcomp.c:149
msgid "Trailing backslash"
-msgstr ""
+msgstr "尾端的“\\”"
-#: lib/regcomp.c:150
+#: lib/regcomp.c:152
msgid "Invalid back reference"
-msgstr ""
+msgstr "非法回引用"
-#: lib/regcomp.c:153
-#, fuzzy
+#: lib/regcomp.c:155
msgid "Unmatched [ or [^"
-msgstr "δƥġ{"
+msgstr "未匹配的“[”或者“[^”"
-#: lib/regcomp.c:156
-#, fuzzy
+#: lib/regcomp.c:158
msgid "Unmatched ( or \\("
-msgstr "δƥġ{"
+msgstr "未匹配的“(”或者“\\(”"
-#: lib/regcomp.c:159
-#, fuzzy
+#: lib/regcomp.c:161
msgid "Unmatched \\{"
-msgstr "δƥġ{"
+msgstr "未匹配的“\\{”"
-#: lib/regcomp.c:162
+#: lib/regcomp.c:164
msgid "Invalid content of \\{\\}"
-msgstr ""
+msgstr "“\\{\\}”中内容非法"
-#: lib/regcomp.c:165
+#: lib/regcomp.c:167
msgid "Invalid range end"
-msgstr ""
+msgstr "非法的范围结束"
-#: lib/regcomp.c:168
+#: lib/regcomp.c:170
msgid "Memory exhausted"
-msgstr ""
+msgstr "内存耗尽"
-#: lib/regcomp.c:171
+#: lib/regcomp.c:173
msgid "Invalid preceding regular expression"
-msgstr ""
+msgstr "非法的正则表达式头"
-#: lib/regcomp.c:174
+#: lib/regcomp.c:176
msgid "Premature end of regular expression"
-msgstr ""
+msgstr "正则表达式不完整"
-#: lib/regcomp.c:177
+#: lib/regcomp.c:179
msgid "Regular expression too big"
-msgstr ""
+msgstr "正则表达式过大"
-#: lib/regcomp.c:180
-#, fuzzy
+#: lib/regcomp.c:182
msgid "Unmatched ) or \\)"
-msgstr "δƥġ{"
+msgstr "未匹配的“)”或者“\\)”"
-#: lib/regcomp.c:660
+#: lib/regcomp.c:703
msgid "No previous regular expression"
-msgstr ""
+msgstr "前面没有正则表达式"
diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo
new file mode 100644
index 0000000..3a2ecd2
--- /dev/null
+++ b/po/zh_TW.gmo
Binary files differ
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100644
index 0000000..30bbd19
--- /dev/null
+++ b/po/zh_TW.po
@@ -0,0 +1,486 @@
+# Traditional Chinese Messages for the sed
+# Copyright (C) 2002, 05 Free Software Foundation, Inc.
+# Wang Li <charles@linux.net.cn>, 2002
+# Wei-Lun Chao <chaoweilun@pcmail.com.tw>, 2005
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: sed 4.1.4\n"
+"Report-Msgid-Bugs-To: bug-gnu-utils@gnu.org\n"
+"POT-Creation-Date: 2009-04-30 10:58+0200\n"
+"PO-Revision-Date: 2005-04-20 09:37+0800\n"
+"Last-Translator: Wei-Lun Chao <chaoweilun@pcmail.com.tw>\n"
+"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: sed/compile.c:161
+msgid "multiple `!'s"
+msgstr "多個「!」"
+
+#: sed/compile.c:162
+msgid "unexpected `,'"
+msgstr "未預期的「,」"
+
+#: sed/compile.c:163
+msgid "invalid usage of +N or ~N as first address"
+msgstr "無法將 +N 或 ~N 作為第一個位址"
+
+#: sed/compile.c:164
+msgid "unmatched `{'"
+msgstr "未匹配的「{」"
+
+#: sed/compile.c:165
+msgid "unexpected `}'"
+msgstr "未預期的「}」"
+
+#: sed/compile.c:166
+msgid "extra characters after command"
+msgstr "命令後含有多餘的字元"
+
+#: sed/compile.c:167
+msgid "expected \\ after `a', `c' or `i'"
+msgstr "預期在「a」、「c」或「i」之後出現 \\"
+
+#: sed/compile.c:168
+msgid "`}' doesn't want any addresses"
+msgstr "「}」不需要任何位址"
+
+#: sed/compile.c:169
+msgid ": doesn't want any addresses"
+msgstr ": 不需要任何位址"
+
+#: sed/compile.c:170
+msgid "comments don't accept any addresses"
+msgstr "備註不接受任何位址"
+
+#: sed/compile.c:171
+msgid "missing command"
+msgstr "遺漏命令"
+
+#: sed/compile.c:172
+msgid "command only uses one address"
+msgstr "命令只使用一個位址"
+
+#: sed/compile.c:173
+msgid "unterminated address regex"
+msgstr "未結束的位址正規表示式"
+
+#: sed/compile.c:174
+msgid "unterminated `s' command"
+msgstr "未結束的「s」命令"
+
+#: sed/compile.c:175
+msgid "unterminated `y' command"
+msgstr "未結束的「y」命令"
+
+#: sed/compile.c:176
+msgid "unknown option to `s'"
+msgstr "「s」的未知選項"
+
+#: sed/compile.c:177
+msgid "multiple `p' options to `s' command"
+msgstr "多個「s」命令的選項「p」"
+
+#: sed/compile.c:178
+msgid "multiple `g' options to `s' command"
+msgstr "多個「s」命令的選項「g」"
+
+#: sed/compile.c:179
+msgid "multiple number options to `s' command"
+msgstr "多個「s」命令的數值選項"
+
+#: sed/compile.c:180
+msgid "number option to `s' command may not be zero"
+msgstr "「s」命令的數值選項不能為零"
+
+#: sed/compile.c:181
+msgid "strings for `y' command are different lengths"
+msgstr "y 命令的字串長度不同"
+
+#: sed/compile.c:182
+msgid "delimiter character is not a single-byte character"
+msgstr "分隔字元不是單一位元字元"
+
+#: sed/compile.c:183
+msgid "expected newer version of sed"
+msgstr "預期使用新版的 sed"
+
+#: sed/compile.c:184
+msgid "invalid usage of line address 0"
+msgstr "非法使用位址第 0 列"
+
+#: sed/compile.c:185
+#, c-format
+msgid "unknown command: `%c'"
+msgstr "未知的命令: 「%c」"
+
+#: sed/compile.c:208
+#, c-format
+msgid "%s: file %s line %lu: %s\n"
+msgstr "%s: 檔案 %s 行號: %lu: %s\n"
+
+#: sed/compile.c:211
+#, c-format
+msgid "%s: -e expression #%lu, char %lu: %s\n"
+msgstr "%s: -e 表示式 #%lu,字元 %lu: %s\n"
+
+#: sed/compile.c:1664
+#, c-format
+msgid "can't find label for jump to `%s'"
+msgstr "無法為目的是「%s」的跳移找到標籤"
+
+#: sed/execute.c:701
+#, c-format
+msgid "%s: can't read %s: %s\n"
+msgstr "%s: 無法讀取 %s: %s\n"
+
+#: sed/execute.c:728
+#, c-format
+msgid "couldn't edit %s: is a terminal"
+msgstr "無法編輯 %s: 是一個終端機"
+
+#: sed/execute.c:733
+#, c-format
+msgid "couldn't edit %s: not a regular file"
+msgstr "無法編輯 %s: 不是一個正常檔案"
+
+#: sed/execute.c:740 sed/utils.c:222
+#, c-format
+msgid "couldn't open temporary file %s: %s"
+msgstr "無法打開暫存檔案 %s: %s"
+
+#: sed/execute.c:1270 sed/execute.c:1450
+msgid "error in subprocess"
+msgstr "錯誤發生於副行程中"
+
+#: sed/execute.c:1272
+msgid "option `e' not supported"
+msgstr "不支援選項「e」"
+
+#: sed/execute.c:1452
+msgid "`e' command not supported"
+msgstr "不支援命令「e」"
+
+#: sed/execute.c:1796
+msgid "no input files"
+msgstr ""
+
+#: sed/regexp.c:41
+msgid "no previous regular expression"
+msgstr "不存在之前的正規表示式"
+
+#: sed/regexp.c:42
+msgid "cannot specify modifiers on empty regexp"
+msgstr "無法指定修飾字元給空的正規表示式"
+
+#: sed/regexp.c:131
+#, c-format
+msgid "invalid reference \\%d on `s' command's RHS"
+msgstr "「s」命令的 RHS 上不正確的參考值 \\%d"
+
+#: sed/sed.c:99
+#, c-format
+msgid ""
+"GNU sed home page: <http://www.gnu.org/software/sed/>.\n"
+"General help using GNU software: <http://www.gnu.org/gethelp/>.\n"
+msgstr ""
+
+#: sed/sed.c:106
+#, c-format
+msgid ""
+"E-mail bug reports to: <%s>.\n"
+"Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"
+msgstr ""
+"將錯誤報告經由電子郵件發送到: 「%s」。\n"
+"請確定將單字「%s」放在「Subject:」欄的某處。\n"
+
+#: sed/sed.c:119
+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:124
+#, c-format
+msgid ""
+"Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n"
+"\n"
+msgstr ""
+"用法: %s [選項]... {若無其他命令稿則只能放命令稿} [輸入檔]...\n"
+"\n"
+
+#: sed/sed.c:128
+#, c-format
+msgid ""
+" -n, --quiet, --silent\n"
+" suppress automatic printing of pattern space\n"
+msgstr ""
+" -n, --quiet, --silent\n"
+" 抑止樣版空間的自動顯示\n"
+
+#: sed/sed.c:130
+#, c-format
+msgid ""
+" -e script, --expression=script\n"
+" add the script to the commands to be executed\n"
+msgstr ""
+" -e 命令稿, --expression=命令稿\n"
+" 加入命令稿做為執行的命令\n"
+
+#: sed/sed.c:132
+#, c-format
+msgid ""
+" -f script-file, --file=script-file\n"
+" add the contents of script-file to the commands to be "
+"executed\n"
+msgstr ""
+" -f 命令稿檔案, --file=命令稿檔案\n"
+" 加入命令稿檔案內容做為執行的命令\n"
+
+#: sed/sed.c:135
+#, c-format
+msgid ""
+" --follow-symlinks\n"
+" follow symlinks when processing in place\n"
+msgstr ""
+
+#: sed/sed.c:138
+#, c-format
+msgid ""
+" -i[SUFFIX], --in-place[=SUFFIX]\n"
+" edit files in place (makes backup if extension supplied)\n"
+msgstr ""
+" -i[副檔名], --in-place[=副檔名]\n"
+" 直接編輯檔案 (若提供副檔名則會產生備份)\n"
+
+#: sed/sed.c:141
+#, c-format
+msgid ""
+" -b, --binary\n"
+" open files in binary mode (CR+LFs are not processed "
+"specially)\n"
+msgstr ""
+
+#: sed/sed.c:144
+#, c-format
+msgid ""
+" -l N, --line-length=N\n"
+" specify the desired line-wrap length for the `l' command\n"
+msgstr ""
+" -l N, --line-length=N\n"
+" 指定使用「l」命令時想要的換列長度\n"
+
+#: sed/sed.c:146
+#, c-format
+msgid ""
+" --posix\n"
+" disable all GNU extensions.\n"
+msgstr ""
+" --posix\n"
+" 停用所有 GNU 擴充功能。\n"
+
+#: sed/sed.c:148
+#, c-format
+msgid ""
+" -r, --regexp-extended\n"
+" use extended regular expressions in the script.\n"
+msgstr ""
+" -r, --regexp-extended\n"
+" 在命令稿中使用擴充的正規表示式。\n"
+
+#: sed/sed.c:153
+#, c-format
+msgid ""
+" -s, --separate\n"
+" consider files as separate rather than as a single "
+"continuous\n"
+" long stream.\n"
+msgstr ""
+" -s, --separate\n"
+" 將檔案視為各自分離而非單一連續的長字串。\n"
+
+#: sed/sed.c:156
+#, c-format
+msgid ""
+" -u, --unbuffered\n"
+" load minimal amounts of data from the input files and "
+"flush\n"
+" the output buffers more often\n"
+msgstr ""
+" -u, --unbuffered\n"
+" 從輸入檔中讀取最少量的資料並更常清空輸出緩衝區\n"
+
+#: sed/sed.c:159
+#, c-format
+msgid " --help display this help and exit\n"
+msgstr " --help 顯示本輔助訊息並離開\n"
+
+#: sed/sed.c:160
+#, c-format
+msgid " --version output version information and exit\n"
+msgstr " --version 輸出版本資訊並離開\n"
+
+#: sed/sed.c:161
+#, c-format
+msgid ""
+"\n"
+"If no -e, --expression, -f, or --file option is given, then the first\n"
+"non-option argument is taken as the sed script to interpret. All\n"
+"remaining arguments are names of input files; if no input files are\n"
+"specified, then the standard input is read.\n"
+"\n"
+msgstr ""
+"\n"
+"如果未設定 -e, --expression, -f, 或 --file 選項,那麼第一個不是選項的\n"
+"引數就會被當做 sed 的命令稿來解譯。所有剩下的引數則是輸入檔的名稱;\n"
+"假如未指定輸入檔,就會從標準輸入來讀取。\n"
+"\n"
+
+#: sed/sed.c:317
+#, c-format
+msgid "super-sed version %s\n"
+msgstr "超級 sed 版本 %s\n"
+
+#: sed/sed.c:318
+#, c-format
+msgid ""
+"based on GNU sed version %s\n"
+"\n"
+msgstr ""
+"基於 GNU sed 版本 %s\n"
+"\n"
+
+#: sed/sed.c:320
+#, c-format
+msgid "GNU sed version %s\n"
+msgstr "GNU sed 版本 %s\n"
+
+#: sed/sed.c:322
+#, c-format
+msgid ""
+"%s\n"
+"This is free software; see the source for copying conditions. There is NO\n"
+"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\n"
+"to the extent permitted by law.\n"
+msgstr ""
+"%s\n"
+"這是自由軟體;參閱原始碼以獲得版權狀態。在法律允許的範圍內不提供任何保證;\n"
+"即使是對於銷售權利或是為了適合於某種特殊目的。\n"
+
+#: sed/utils.c:93 sed/utils.c:433
+#, c-format
+msgid "cannot remove %s: %s"
+msgstr "無法移除 %s: %s"
+
+#: sed/utils.c:163
+#, c-format
+msgid "couldn't open file %s: %s"
+msgstr "無法打開檔案 %s: %s"
+
+#: sed/utils.c:186
+#, fuzzy, c-format
+msgid "couldn't attach to %s: %s"
+msgstr "無法將 %d 個項目寫入 %s: %s"
+
+#: sed/utils.c:240
+#, c-format
+msgid "couldn't write %d item to %s: %s"
+msgid_plural "couldn't write %d items to %s: %s"
+msgstr[0] "無法將 %d 個項目寫入 %s: %s"
+
+#: sed/utils.c:255 sed/utils.c:271
+#, c-format
+msgid "read error on %s: %s"
+msgstr "讀取 %s 出錯: %s"
+
+#: sed/utils.c:373
+#, fuzzy, c-format
+msgid "couldn't follow symlink %s: %s"
+msgstr "無法打開檔案 %s: %s"
+
+#: sed/utils.c:407
+#, fuzzy, c-format
+msgid "cannot stat %s: %s"
+msgstr "無法更改名稱 %s: %s"
+
+#: sed/utils.c:438
+#, c-format
+msgid "cannot rename %s: %s"
+msgstr "無法更改名稱 %s: %s"
+
+#: lib/regcomp.c:134
+msgid "Success"
+msgstr "成功"
+
+#: lib/regcomp.c:137
+msgid "No match"
+msgstr "沒有符合者"
+
+#: lib/regcomp.c:140
+msgid "Invalid regular expression"
+msgstr "不正確的正規表示式"
+
+#: lib/regcomp.c:143
+msgid "Invalid collation character"
+msgstr "不正確的核對字元"
+
+#: lib/regcomp.c:146
+msgid "Invalid character class name"
+msgstr "不正確的字元等級名稱"
+
+#: lib/regcomp.c:149
+msgid "Trailing backslash"
+msgstr "末端有倒斜線"
+
+#: lib/regcomp.c:152
+msgid "Invalid back reference"
+msgstr "不正確的返回參考"
+
+#: lib/regcomp.c:155
+msgid "Unmatched [ or [^"
+msgstr "未匹配的「[」或「[^」"
+
+#: lib/regcomp.c:158
+msgid "Unmatched ( or \\("
+msgstr "未匹配的「(」或「\\」"
+
+#: lib/regcomp.c:161
+msgid "Unmatched \\{"
+msgstr "未匹配的「\\{」"
+
+#: lib/regcomp.c:164
+msgid "Invalid content of \\{\\}"
+msgstr "不正確的「\\{\\}」內容"
+
+#: lib/regcomp.c:167
+msgid "Invalid range end"
+msgstr "不正確的範圍結束"
+
+#: lib/regcomp.c:170
+msgid "Memory exhausted"
+msgstr "記憶體耗盡"
+
+#: lib/regcomp.c:173
+msgid "Invalid preceding regular expression"
+msgstr "不正確的前導正規表示式"
+
+#: lib/regcomp.c:176
+msgid "Premature end of regular expression"
+msgstr "正規表示式的過早結束"
+
+#: lib/regcomp.c:179
+msgid "Regular expression too big"
+msgstr "正規表示式太大"
+
+#: lib/regcomp.c:182
+msgid "Unmatched ) or \\)"
+msgstr "未匹配的「)」或「\\」"
+
+#: lib/regcomp.c:703
+msgid "No previous regular expression"
+msgstr "沒有先前的正規表示式"
diff --git a/sed/Makefile.am b/sed/Makefile.am
index e2b5b9d..93979d3 100644
--- a/sed/Makefile.am
+++ b/sed/Makefile.am
@@ -3,14 +3,13 @@ bin_PROGRAMS = sed
localedir = $(datadir)/locale
-sed_SOURCES = sed.c compile.c execute.c regexp.c fmt.c mbcs.c
-noinst_HEADERS = sed.h
+sed_SOURCES = sed.c compile.c execute.c regexp.c fmt.c mbcs.c utils.c
+noinst_HEADERS = sed.h utils.h
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/intl \
- -I$(top_srcdir) -I$(top_builddir)/lib \
- -I$(top_builddir)/intl -DLOCALEDIR=\"$(localedir)\"
+AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) -I$(top_builddir)/lib \
+ -DLOCALEDIR=\"$(localedir)\"
-sed_LDADD = ../lib/libsed.a @INTLLIBS@
+sed_LDADD = ../lib/libsed.a @INTLLIBS@ @LIB_ACL@
sed_DEPENDENCIES = ../lib/libsed.a
$(PROGRAMS): $(LDADD)
diff --git a/sed/Makefile.in b/sed/Makefile.in
index 2d1d30d..41d8459 100644
--- a/sed/Makefile.in
+++ b/sed/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -15,17 +15,11 @@
@SET_MAKE@
-SOURCES = $(sed_SOURCES)
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -44,18 +38,40 @@ subdir = sed
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/codeset.m4 \
- $(top_srcdir)/config/getline.m4 \
- $(top_srcdir)/config/gettext-ver.m4 \
- $(top_srcdir)/config/gettext.m4 \
- $(top_srcdir)/config/glibc21.m4 $(top_srcdir)/config/iconv.m4 \
- $(top_srcdir)/config/lcmessage.m4 \
- $(top_srcdir)/config/lib-ld.m4 \
- $(top_srcdir)/config/lib-link.m4 \
- $(top_srcdir)/config/lib-prefix.m4 \
- $(top_srcdir)/config/progtest.m4 \
- $(top_srcdir)/config/stdbool.m4 \
- $(top_srcdir)/config/strverscmp.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+ $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
+ $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
+ $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getline.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+ $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/mbrlen.m4 \
+ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \
+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mkstemp.m4 \
+ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
+ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/realloc.m4 \
+ $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/ssize_t.m4 \
+ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
+ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \
+ $(top_srcdir)/m4/strverscmp.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
+ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/tempname.m4 \
+ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/wchar.m4 \
+ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+ $(top_srcdir)/m4/wctype.m4 $(top_srcdir)/m4/wint_t.m4 \
+ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
@@ -65,10 +81,10 @@ am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_sed_OBJECTS = sed.$(OBJEXT) compile.$(OBJEXT) execute.$(OBJEXT) \
- regexp.$(OBJEXT) fmt.$(OBJEXT) mbcs.$(OBJEXT)
+ regexp.$(OBJEXT) fmt.$(OBJEXT) mbcs.$(OBJEXT) utils.$(OBJEXT)
sed_OBJECTS = $(am_sed_OBJECTS)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -82,58 +98,294 @@ CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
+ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BUILD_HTML_FALSE = @BUILD_HTML_FALSE@
-BUILD_HTML_TRUE = @BUILD_HTML_TRUE@
-BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
-CATOBJEXT = @CATOBJEXT@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
-GENCAT = @GENCAT@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WRITE = @GNULIB_WRITE@
+GREP = @GREP@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRNDUP = @HAVE_STRNDUP@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
HAVE__BOOL = @HAVE__BOOL@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
+LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
+LIB_ACL = @LIB_ACL@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
-MAKEINFO_HTML_FALSE = @MAKEINFO_HTML_FALSE@
-MAKEINFO_HTML_TRUE = @MAKEINFO_HTML_TRUE@
-MKINSTALLDIRS = @MKINSTALLDIRS@
+MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -143,25 +395,92 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
SED_FEATURE_VERSION = @SED_FEATURE_VERSION@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
STRIP = @STRIP@
-TEST_REGEX_FALSE = @TEST_REGEX_FALSE@
-TEST_REGEX_TRUE = @TEST_REGEX_TRUE@
-TEXI2HTML = @TEXI2HTML@
-TEXI2HTML_HTML_FALSE = @TEXI2HTML_HTML_FALSE@
-TEXI2HTML_HTML_TRUE = @TEXI2HTML_HTML_TRUE@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+SYS_STAT_H = @SYS_STAT_H@
+SYS_TIME_H = @SYS_TIME_H@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+USE_ACL = @USE_ACL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+VOID_UNSETENV = @VOID_UNSETENV@
+WCHAR_H = @WCHAR_H@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XFAIL_TESTS = @XFAIL_TESTS@
XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -173,36 +492,49 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = $(datadir)/locale
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-localedir = $(datadir)/locale
-sed_SOURCES = sed.c compile.c execute.c regexp.c fmt.c mbcs.c
-noinst_HEADERS = sed.h
-AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/intl \
- -I$(top_srcdir) -I$(top_builddir)/lib \
- -I$(top_builddir)/intl -DLOCALEDIR=\"$(localedir)\"
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+sed_SOURCES = sed.c compile.c execute.c regexp.c fmt.c mbcs.c utils.c
+noinst_HEADERS = sed.h utils.h
+AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir) -I$(top_builddir)/lib \
+ -DLOCALEDIR=\"$(localedir)\"
-sed_LDADD = ../lib/libsed.a @INTLLIBS@
+sed_LDADD = ../lib/libsed.a @INTLLIBS@ @LIB_ACL@
sed_DEPENDENCIES = ../lib/libsed.a
all: all-am
@@ -239,7 +571,7 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; for p in $$list; do \
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
if test -f $$p \
@@ -278,7 +610,7 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS)
done; rm -f c$${pid}_.???; exit $$bad
sed$(EXEEXT): $(sed_OBJECTS) $(sed_DEPENDENCIES)
@rm -f sed$(EXEEXT)
- $(LINK) $(sed_LDFLAGS) $(sed_OBJECTS) $(sed_LDADD) $(LIBS)
+ $(LINK) $(sed_OBJECTS) $(sed_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -292,29 +624,29 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbcs.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexp.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sed.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -326,8 +658,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -337,13 +669,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -357,22 +688,21 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -388,7 +718,7 @@ check: check-am
all-am: Makefile $(PROGRAMS) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
@@ -436,12 +766,20 @@ info-am:
install-data-am:
+install-dvi: install-dvi-am
+
install-exec-am: install-binPROGRAMS
+install-html: install-html-am
+
install-info: install-info-am
install-man:
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
installcheck-am: installcheck-binPROGRAMS
maintainer-clean: maintainer-clean-am
@@ -461,19 +799,22 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic ctags distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installcheck-binPROGRAMS \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
- ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS \
- uninstall-info-am
+ ps ps-am tags uninstall uninstall-am uninstall-binPROGRAMS
$(PROGRAMS): $(LDADD)
diff --git a/sed/compile.c b/sed/compile.c
index e35608a..f48f8ec 100644
--- a/sed/compile.c
+++ b/sed/compile.c
@@ -1,10 +1,10 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006
+ Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006,2008
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
+ 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,
@@ -19,7 +19,6 @@
/* compile.c: translate sed source into internal form */
#include "sed.h"
-#include "strverscmp.h"
#include <stdio.h>
#include <ctype.h>
@@ -374,17 +373,16 @@ read_filename()
return b;
}
-static struct output *get_openfile P_((struct output **file_ptrs, char *mode, bool fail));
+static struct output *get_openfile P_((struct output **file_ptrs, const char *mode, int fail));
static struct output *
get_openfile(file_ptrs, mode, fail)
struct output **file_ptrs;
- char *mode;
- bool fail;
+ const char *mode;
+ int fail;
{
struct buffer *b;
char *file_name;
struct output *p;
- int is_stderr;
b = read_filename();
file_name = get_buffer(b);
@@ -493,7 +491,7 @@ snarf_char_class(b, cur_stat)
delim = ch;
state++;
}
- else if (ch == delim && state == 2)
+ else if (state == 2 && ch == delim)
state++;
else
break;
@@ -529,20 +527,19 @@ snarf_char_class(b, cur_stat)
}
}
-static struct buffer *match_slash P_((int slash, bool regex));
+static struct buffer *match_slash P_((int slash, int regex));
static struct buffer *
match_slash(slash, regex)
int slash;
- bool regex;
+ int regex;
{
struct buffer *b;
int ch;
- bool pending_mb = false;
mbstate_t cur_stat;
memset (&cur_stat, 0, sizeof (mbstate_t));
- if (BRLEN (slash, &cur_stat) == -2)
+ /* We allow only 1 byte characters for a slash. */
if (BRLEN (slash, &cur_stat) == -2)
bad_prog (BAD_DELIM);
@@ -551,10 +548,8 @@ match_slash(slash, regex)
b = init_buffer();
while ((ch = inchar()) != EOF && ch != '\n')
{
- pending_mb = BRLEN (ch, &cur_stat) != 1;
- pending_mb = BRLEN (ch, &cur_stat) != 1;
-
- if (!pending_mb)
+ bool pending_mb = !MBSINIT (&cur_stat);
+ if (BRLEN (ch, &cur_stat) == 1 && !pending_mb)
{
if (ch == slash)
return b;
@@ -567,7 +562,7 @@ match_slash(slash, regex)
else if (ch == 'n' && regex)
ch = '\n';
#endif
- else if (ch != '\n' && ch != slash)
+ else if (ch != '\n' && (ch != slash || (!regex && ch == '&')))
add1_buffer(b, '\\');
}
else if (ch == OPEN_BRACKET && regex)
@@ -607,18 +602,24 @@ mark_subst_opts(cmd)
{
case 'i': /* GNU extension */
case 'I': /* GNU extension */
+ if (posixicity == POSIXLY_BASIC)
+ bad_prog(_(UNKNOWN_S_OPT));
flags |= REG_ICASE;
break;
#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;
@@ -626,6 +627,8 @@ mark_subst_opts(cmd)
case 'm': /* GNU extension */
case 'M': /* GNU extension */
+ if (posixicity == POSIXLY_BASIC)
+ bad_prog(_(UNKNOWN_S_OPT));
flags |= REG_NEWLINE;
break;
@@ -797,7 +800,16 @@ setup_replacement(sub, text, length)
/* Skip the backslash and look for a numeric back-reference,
or a case-munging escape if not in POSIX mode: */
++p;
- if (p < text_end && (posixicity != POSIXLY_BASIC || ISDIGIT (*p)))
+ if (p == text_end)
+ ++tail->prefix_length;
+
+ else if (posixicity == POSIXLY_BASIC && !ISDIGIT (*p))
+ {
+ p[-1] = *p;
+ ++tail->prefix_length;
+ }
+
+ else
switch (*p)
{
case '0': case '1': case '2': case '3': case '4':
@@ -943,6 +955,8 @@ compile_address(addr, ch)
for(;;)
{
ch = in_nonblank();
+ if (posixicity == POSIXLY_BASIC)
+ goto posix_address_modifier;
switch(ch)
{
case 'I': /* GNU extension */
@@ -966,6 +980,7 @@ compile_address(addr, ch)
break;
default:
+ posix_address_modifier:
savchar (ch);
addr->addr_regex = compile_regex (b, flags, 0);
free_buffer(b);
@@ -978,7 +993,7 @@ compile_address(addr, ch)
addr->addr_number = in_integer(ch);
addr->addr_type = ADDR_IS_NUM;
ch = in_nonblank();
- if (ch != '~')
+ if (ch != '~' || posixicity == POSIXLY_BASIC)
{
savchar(ch);
}
@@ -992,7 +1007,7 @@ compile_address(addr, ch)
}
}
}
- else if (ch == '+' || ch == '~')
+ else if ((ch == '+' || ch == '~') && posixicity != POSIXLY_BASIC)
{
addr->addr_step = in_integer(in_nonblank());
if (addr->addr_step==0)
@@ -1062,9 +1077,10 @@ compile_program(vector)
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))
+ if ((cur_cmd->a1->addr_type == ADDR_IS_NUM
+ && cur_cmd->a1->addr_number == 0)
+ && ((!cur_cmd->a2 || cur_cmd->a2->addr_type != ADDR_IS_REGEX)
+ || posixicity == POSIXLY_BASIC))
bad_prog(_(INVALID_LINE_0));
}
if (ch == '!')
@@ -1080,8 +1096,8 @@ compile_program(vector)
if (posixicity == POSIXLY_BASIC)
switch (ch)
{
- case 'v': case 'L': case 'Q': case 'T':
- case 'R': case 'W':
+ case 'e': case 'v': case 'z': case 'L':
+ case 'Q': case 'T': case 'R': case 'W':
bad_command(ch);
case 'a': case 'i': case 'l':
@@ -1165,6 +1181,8 @@ compile_program(vector)
ch = inchar();
else
{
+ if (posixicity == POSIXLY_BASIC)
+ bad_prog(_(EXPECTED_SLASH));
savchar(ch);
ch = '\n';
}
@@ -1193,7 +1211,7 @@ compile_program(vector)
case 'L':
case 'l':
ch = in_nonblank();
- if (ISDIGIT(ch))
+ if (ISDIGIT(ch) && posixicity != POSIXLY_BASIC)
{
cur_cmd->x.int_arg = in_integer(ch);
ch = in_nonblank();
@@ -1219,6 +1237,7 @@ compile_program(vector)
case 'N':
case 'p':
case 'P':
+ case 'z':
case 'x':
ch = in_nonblank();
if (ch == CLOSE_BRACE || ch == '#')
@@ -1234,7 +1253,7 @@ compile_program(vector)
break;
case 'R':
- cur_cmd->x.fp = get_openfile(&file_read, "r", false)->fp;
+ cur_cmd->x.fp = get_openfile(&file_read, read_mode, false)->fp;
break;
case 'W':
@@ -1347,7 +1366,8 @@ compile_program(vector)
}
else
{
- char *translate = OB_MALLOC(&obs, YMAP_LENGTH, char);
+ unsigned char *translate =
+ OB_MALLOC(&obs, YMAP_LENGTH, unsigned char);
unsigned char *ustring = CAST(unsigned char *)src_buf;
if (len != dest_len)
@@ -1357,7 +1377,7 @@ compile_program(vector)
translate[len] = len;
while (dest_len--)
- translate[(unsigned char)*ustring++] = *dest_buf++;
+ translate[*ustring++] = (unsigned char)*dest_buf++;
cur_cmd->x.translate = translate;
}
@@ -1581,7 +1601,6 @@ compile_file(cur_program, cmdfile)
struct vector *cur_program;
const char *cmdfile;
{
- size_t len;
struct vector *ret;
prog.file = stdin;
@@ -1623,8 +1642,9 @@ check_final_program(program)
if (pending_text)
{
old_text_buf->text_length = size_buffer(pending_text);
- old_text_buf->text = MEMDUP(get_buffer(pending_text),
- old_text_buf->text_length, char);
+ 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);
pending_text = NULL;
}
diff --git a/sed/execute.c b/sed/execute.c
index 5e8a38a..3b4d5da 100644
--- a/sed/execute.c
+++ b/sed/execute.c
@@ -1,10 +1,10 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006
+ Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003,2004,2005,2006,2008,2009
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
+ 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,
@@ -22,6 +22,7 @@
#include "sed.h"
+#include <stddef.h>
#include <stdio.h>
#include <ctype.h>
@@ -34,6 +35,10 @@ extern int errno;
# include <unistd.h>
#endif
+#ifndef BOOTSTRAP
+#include "acl.h"
+#endif
+
#ifdef __GNUC__
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__-0 >= 7)
/* silence warning about unused parameter even for "gcc -W -Wunused" */
@@ -70,6 +75,7 @@ extern int errno;
#endif
#include <sys/stat.h>
+#include "stat-macros.h"
/* Sed operates a line at a time. */
@@ -84,6 +90,12 @@ struct line {
#endif
};
+#ifdef HAVE_MBRTOWC
+#define SIZEOF_LINE offsetof (struct line, mbstate)
+#else
+#define SIZEOF_LINE (sizeof (struct line))
+#endif
+
/* A queue of text to write out at the end of a cycle
(filled by the "a", "r" and "R" commands.) */
struct append_queue {
@@ -229,25 +241,26 @@ str_append(to, string, length)
to->length = new_length;
#ifdef HAVE_MBRTOWC
- if (mb_cur_max == 1)
- return;
-
- while (length)
- {
- int n = MBRLEN (string, length, &to->mbstate);
+ if (mb_cur_max > 1 && !is_utf8)
+ while (length)
+ {
+ size_t n = MBRLEN (string, length, &to->mbstate);
- /* An invalid sequence is treated like a singlebyte character. */
- if (n == -1)
- {
- memset (&to->mbstate, 0, sizeof (to->mbstate));
- n = 1;
- }
+ /* An invalid sequence is treated like a singlebyte character. */
+ if (n == (size_t) -1)
+ {
+ memset (&to->mbstate, 0, sizeof (to->mbstate));
+ n = 1;
+ }
- if (n > 0)
- length -= n;
- else
- break;
- }
+ if (n > 0)
+ {
+ string += n;
+ length -= n;
+ }
+ else
+ break;
+ }
#endif
}
@@ -260,81 +273,76 @@ str_append_modified(to, string, length, type)
size_t length;
enum replacement_types type;
{
- size_t old_length = to->length;
- char *start, *end;
-
- if (length == 0)
- return;
-
#ifdef HAVE_MBRTOWC
- {
- mbstate_t from_stat;
+ mbstate_t from_stat;
- if (type == REPL_ASIS)
- {
- str_append(to, string, length);
- return;
- }
+ if (type == REPL_ASIS)
+ {
+ str_append(to, string, length);
+ return;
+ }
- if (to->alloc - to->length < length * mb_cur_max)
- resize_line(to, to->length + length * mb_cur_max);
+ if (to->alloc - to->length < length * mb_cur_max)
+ resize_line(to, to->length + length * mb_cur_max);
- MEMCPY (&from_stat, &to->mbstate, sizeof(mbstate_t));
- while (length)
- {
- wchar_t wc;
- int n = MBRTOWC (&wc, string, length, &from_stat);
+ MEMCPY (&from_stat, &to->mbstate, sizeof(mbstate_t));
+ while (length)
+ {
+ wchar_t wc;
+ int n = MBRTOWC (&wc, string, length, &from_stat);
- /* An invalid sequence is treated like a singlebyte character. */
- if (n == -1)
- {
- memset (&to->mbstate, 0, sizeof (from_stat));
- n = 1;
- }
+ /* An invalid sequence is treated like a singlebyte character. */
+ if (n == -1)
+ {
+ memset (&to->mbstate, 0, sizeof (from_stat));
+ n = 1;
+ }
- if (n > 0)
- string += n, length -= n;
- else
- {
- /* Incomplete sequence, copy it manually. */
- str_append(to, string, length);
- return;
- }
+ if (n > 0)
+ string += n, length -= n;
+ else
+ {
+ /* Incomplete sequence, copy it manually. */
+ str_append(to, string, length);
+ return;
+ }
- /* Convert the first character specially... */
- if (type & (REPL_UPPERCASE_FIRST | REPL_LOWERCASE_FIRST))
- {
- if (type & REPL_UPPERCASE_FIRST)
- wc = towupper(wc);
- else
- wc = towlower(wc);
+ /* Convert the first character specially... */
+ if (type & (REPL_UPPERCASE_FIRST | REPL_LOWERCASE_FIRST))
+ {
+ if (type & REPL_UPPERCASE_FIRST)
+ wc = towupper(wc);
+ else
+ wc = towlower(wc);
- type &= ~(REPL_LOWERCASE_FIRST | REPL_UPPERCASE_FIRST);
- if (type == REPL_ASIS)
- {
- n = WCRTOMB (to->active + to->length, wc, &to->mbstate);
- to->length += n;
- str_append(to, string, length);
- return;
- }
- }
+ type &= ~(REPL_LOWERCASE_FIRST | REPL_UPPERCASE_FIRST);
+ if (type == REPL_ASIS)
+ {
+ n = WCRTOMB (to->active + to->length, wc, &to->mbstate);
+ to->length += n;
+ str_append(to, string, length);
+ return;
+ }
+ }
- else if (type & REPL_UPPERCASE)
- wc = towupper(wc);
- else
- wc = towlower(wc);
+ else if (type & REPL_UPPERCASE)
+ wc = towupper(wc);
+ else
+ wc = towlower(wc);
- /* Copy the new wide character to the end of the string. */
- n = WCRTOMB (to->active + to->length, wc, &to->mbstate);
- to->length += n;
- if (n == -1)
- {
- fprintf (stderr, "Case conversion produced an invalid character!");
- abort ();
- }
- }
- }
+ /* Copy the new wide character to the end of the string. */
+ n = WCRTOMB (to->active + to->length, wc, &to->mbstate);
+ to->length += n;
+ if (n == -1)
+ {
+ fprintf (stderr, "Case conversion produced an invalid character!");
+ abort ();
+ }
+ }
#else
+ size_t old_length = to->length;
+ char *start, *end;
+
str_append(to, string, length);
start = to->active + old_length;
end = start + length;
@@ -366,11 +374,13 @@ str_append_modified(to, string, length, type)
#endif
}
-/* initialize a "struct line" buffer */
-static void line_init P_((struct line *, size_t initial_size));
+/* Initialize a "struct line" buffer. Copy multibyte state from `state'
+ if not null. */
+static void line_init P_((struct line *, struct line *, size_t initial_size));
static void
-line_init(buf, initial_size)
+line_init(buf, state, initial_size)
struct line *buf;
+ struct line *state;
size_t initial_size;
{
buf->text = MALLOC(initial_size, char);
@@ -380,18 +390,43 @@ line_init(buf, initial_size)
buf->chomped = true;
#ifdef HAVE_MBRTOWC
- memset (&buf->mbstate, 0, sizeof (buf->mbstate));
+ if (state)
+ memcpy (&buf->mbstate, &state->mbstate, sizeof (buf->mbstate));
+ else
+ memset (&buf->mbstate, 0, sizeof (buf->mbstate));
#endif
+}
+/* Reset a "struct line" buffer to length zero. Copy multibyte state from
+ `state' if not null. */
+static void line_reset P_((struct line *, struct line *));
+static void
+line_reset(buf, state)
+ struct line *buf, *state;
+{
+ if (buf->alloc == 0)
+ line_init(buf, state, INITIAL_BUFFER_SIZE);
+ else
+ {
+ buf->length = 0;
+#ifdef HAVE_MBRTOWC
+ if (state)
+ memcpy (&buf->mbstate, &state->mbstate, sizeof (buf->mbstate));
+ else
+ memset (&buf->mbstate, 0, sizeof (buf->mbstate));
+#endif
+ }
}
/* Copy the contents of the line `from' into the line `to'.
- This destroys the old contents of `to'. */
-static void line_copy P_((struct line *from, struct line *to));
+ This destroys the old contents of `to'.
+ Copy the multibyte state if `state' is true. */
+static void line_copy P_((struct line *from, struct line *to, int state));
static void
-line_copy(from, to)
+line_copy(from, to, state)
struct line *from;
struct line *to;
+ int state;
{
/* Remove the inactive portion in the destination buffer. */
to->alloc += to->active - to->text;
@@ -415,38 +450,53 @@ line_copy(from, to)
MEMCPY(to->active, from->active, from->length);
#ifdef HAVE_MBRTOWC
- MEMCPY(&to->mbstate, &from->mbstate, sizeof (from->mbstate));
+ if (state)
+ MEMCPY(&to->mbstate, &from->mbstate, sizeof (from->mbstate));
#endif
}
-/* Append the contents of the line `from' to the line `to'. */
-static void line_append P_((struct line *from, struct line *to));
+/* Append the contents of the line `from' to the line `to'.
+ Copy the multibyte state if `state' is true. */
+static void line_append P_((struct line *from, struct line *to, int state));
static void
-line_append(from, to)
+line_append(from, to, state)
struct line *from;
struct line *to;
+ int state;
{
str_append(to, "\n", 1);
str_append(to, from->active, from->length);
to->chomped = from->chomped;
#ifdef HAVE_MBRTOWC
- MEMCPY (&to->mbstate, &from->mbstate, sizeof (from->mbstate));
+ if (state)
+ MEMCPY (&to->mbstate, &from->mbstate, sizeof (from->mbstate));
#endif
}
-/* Exchange the contents of two "struct line" buffers. */
-static void line_exchange P_((struct line *, struct line *));
+/* Exchange two "struct line" buffers.
+ Copy the multibyte state if `state' is true. */
+static void line_exchange P_((struct line *a, struct line *b, int state));
static void
-line_exchange(a, b)
+line_exchange(a, b, state)
struct line *a;
struct line *b;
+ int state;
{
struct line t;
- MEMCPY(&t, a, sizeof(struct line));
- MEMCPY( a, b, sizeof(struct line));
- MEMCPY( b, &t, sizeof(struct line));
+ if (state)
+ {
+ 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);
+ }
}
@@ -503,19 +553,20 @@ flush_output(fp)
ck_fflush(fp);
}
-static void output_line P_((const char *, size_t, bool, struct output *));
+static void output_line P_((const char *, size_t, int, struct output *));
static void
output_line(text, length, nl, outf)
const char *text;
size_t length;
- bool nl;
+ int nl;
struct output *outf;
{
- output_missing_newline(outf);
+ if (!text)
+ return;
+ output_missing_newline(outf);
if (length)
ck_fwrite(text, 1, length, outf->fp);
-
if (nl)
ck_fwrite("\n", 1, 1, outf->fp);
else
@@ -582,7 +633,7 @@ dump_append_queue()
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, "r", false);
+ fp = ck_fopen(p->fname, read_mode, false);
if (fp)
{
while ((cnt = ck_fread(buf, 1, sizeof buf, fp)) > 0)
@@ -608,7 +659,7 @@ get_backup_file_name(name)
/* 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;
@@ -616,7 +667,7 @@ get_backup_file_name(name)
/* 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);
@@ -642,9 +693,9 @@ open_next_file(name, input)
if (name[0] == '-' && name[1] == '\0' && !in_place_extension)
{
clearerr(stdin); /* clear any stale EOF indication */
- input->fp = stdin;
+ input->fp = ck_fdopen (fileno (stdin), "stdin", read_mode, false);
}
- else if ( ! (input->fp = ck_fopen(name, "r", false)) )
+ else 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);
@@ -657,22 +708,27 @@ open_next_file(name, input)
if (in_place_extension)
{
- int output_fd;
- char *tmpdir = ck_strdup(name), *p;
+ int input_fd, output_fd;
+ char *tmpdir, *p;
struct stat st;
+ if (follow_symlinks)
+ input->in_file_name = follow_symlink (name);
+ else
+ input->in_file_name = name;
+
/* get the base name */
- if (p = strrchr(tmpdir, '/'))
+ tmpdir = ck_strdup(input->in_file_name);
+ if ((p = strrchr(tmpdir, '/')))
*(p + 1) = 0;
else
strcpy(tmpdir, ".");
-
- input->in_file_name = name;
if (isatty (fileno (input->fp)))
panic(_("couldn't edit %s: is a terminal"), input->in_file_name);
- fstat (fileno (input->fp), &st);
+ input_fd = fileno (input->fp);
+ fstat (input_fd, &st);
if (!S_ISREG (st.st_mode))
panic(_("couldn't edit %s: not a regular file"), input->in_file_name);
@@ -684,13 +740,13 @@ open_next_file(name, input)
panic(_("couldn't open temporary file %s: %s"), input->out_file_name, strerror(errno));
output_fd = fileno (output_file.fp);
-#ifdef HAVE_FCHMOD
- fchmod (output_fd, st.st_mode);
-#endif
#ifdef HAVE_FCHOWN
if (fchown (output_fd, st.st_uid, st.st_gid) == -1)
fchown (output_fd, -1, st.st_gid);
#endif
+ copy_acl (input->in_file_name, input_fd,
+ input->out_file_name, output_fd,
+ st.st_mode);
}
else
output_file.fp = stdout;
@@ -706,23 +762,25 @@ closedown(input)
input->read_fn = read_always_fail;
if (!input->fp)
return;
- if (input->fp != stdin) /* stdin can be reused on tty and tape devices */
- ck_fclose(input->fp);
if (in_place_extension && output_file.fp != NULL)
{
+ const char *target_name;
ck_fclose (output_file.fp);
+
+ target_name = input->in_file_name;
if (strcmp(in_place_extension, "*") != 0)
{
- char *backup_file_name = get_backup_file_name(input->in_file_name);
- ck_rename (input->in_file_name, backup_file_name, input->out_file_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);
}
- ck_rename (input->out_file_name, input->in_file_name, input->out_file_name);
+ ck_rename (input->out_file_name, target_name, input->out_file_name);
free (input->out_file_name);
}
+ ck_fclose (input->fp);
input->fp = NULL;
}
@@ -746,12 +804,12 @@ reset_addresses(vec)
/* Read in the next line of input, and store it in the pattern space.
Return zero if there is nothing left to input. */
-static bool read_pattern_space P_((struct input *, struct vector *, bool));
+static bool read_pattern_space P_((struct input *, struct vector *, int));
static bool
read_pattern_space(input, the_program, append)
struct input *input;
struct vector *the_program;
- bool append;
+ int append;
{
if (append_head) /* redundant test to optimize for common case */
dump_append_queue();
@@ -770,6 +828,7 @@ read_pattern_space(input, the_program, append)
if (input->reset_at_next_file)
{
input->line_number = 0;
+ hold.length = 0;
reset_addresses (the_program);
rewind_read_files ();
@@ -1045,16 +1104,18 @@ append_replacement (buf, p, regs, repl_mod)
}
if (0 <= i)
- if (regs->end[i] == regs->start[i] && p->repl_type & REPL_MODIFIERS)
- /* Save this modifier, we shall apply it later.
- e.g. in s/()([a-z])/\u\1\2/
- the \u modifier is applied to \2, not \1 */
- repl_mod = curr_type & REPL_MODIFIERS;
-
- else
- str_append_modified(buf, line.active + regs->start[i],
- CAST(size_t)(regs->end[i] - regs->start[i]),
- curr_type);
+ {
+ if (regs->end[i] == regs->start[i] && p->repl_type & REPL_MODIFIERS)
+ /* Save this modifier, we shall apply it later.
+ e.g. in s/()([a-z])/\u\1\2/
+ the \u modifier is applied to \2, not \1 */
+ repl_mod = curr_type & REPL_MODIFIERS;
+
+ else if (regs->end[i] != regs->start[i])
+ str_append_modified(buf, line.active + regs->start[i],
+ CAST(size_t)(regs->end[i] - regs->start[i]),
+ curr_type);
+ }
}
return repl_mod;
@@ -1072,9 +1133,7 @@ do_subst(sub)
static struct re_registers regs;
- if (s_accum.alloc == 0)
- line_init(&s_accum, INITIAL_BUFFER_SIZE);
- s_accum.length = 0;
+ line_reset(&s_accum, &line);
/* The first part of the loop optimizes s/xxx// when xxx is at the
start, and s/xxx$// */
@@ -1083,24 +1142,26 @@ do_subst(sub)
return;
if (!sub->replacement && sub->numb <= 1)
- if (regs.start[0] == 0 && !sub->global)
- {
- /* We found a match, set the `replaced' flag. */
- replaced = true;
+ {
+ if (regs.start[0] == 0 && !sub->global)
+ {
+ /* We found a match, set the `replaced' flag. */
+ replaced = true;
- line.active += regs.end[0];
- line.length -= regs.end[0];
- line.alloc -= regs.end[0];
- goto post_subst;
- }
- else if (regs.end[0] == line.length)
- {
- /* We found a match, set the `replaced' flag. */
- replaced = true;
+ line.active += regs.end[0];
+ line.length -= regs.end[0];
+ line.alloc -= regs.end[0];
+ goto post_subst;
+ }
+ else if (regs.end[0] == line.length)
+ {
+ /* We found a match, set the `replaced' flag. */
+ replaced = true;
- line.length = regs.start[0];
- goto post_subst;
- }
+ line.length = regs.start[0];
+ goto post_subst;
+ }
+ }
do
{
@@ -1166,8 +1227,8 @@ do_subst(sub)
/* 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);
-
+ line_exchange(&line, &s_accum, false);
+
/* Finish up. */
if (count < sub->numb)
return;
@@ -1179,25 +1240,28 @@ do_subst(sub)
if (sub->eval)
{
#ifdef HAVE_POPEN
- FILE *pipe;
- s_accum.length = 0;
+ FILE *pipe_fp;
+ line_reset(&s_accum, NULL);
str_append (&line, "", 1);
- pipe = popen(line.active, "r");
+ pipe_fp = popen(line.active, "r");
- if (pipe != NULL)
+ if (pipe_fp != NULL)
{
- while (!feof (pipe))
+ while (!feof (pipe_fp))
{
char buf[4096];
- int n = fread (buf, sizeof(char), 4096, pipe);
+ int n = fread (buf, sizeof(char), 4096, pipe_fp);
if (n > 0)
str_append(&s_accum, buf, n);
}
- pclose (pipe);
+ pclose (pipe_fp);
- line_exchange(&line, &s_accum);
+ /* 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] == '\n')
line.length--;
@@ -1335,38 +1399,36 @@ execute_program(vec, input)
case 'e': {
#ifdef HAVE_POPEN
- FILE *pipe;
+ FILE *pipe_fp;
int cmd_length = cur_cmd->x.cmd_txt.text_length;
- if (s_accum.alloc == 0)
- line_init(&s_accum, INITIAL_BUFFER_SIZE);
- s_accum.length = 0;
+ line_reset(&s_accum, NULL);
if (!cmd_length)
{
str_append (&line, "", 1);
- pipe = popen(line.active, "r");
+ pipe_fp = popen(line.active, "r");
}
else
{
cur_cmd->x.cmd_txt.text[cmd_length - 1] = 0;
- pipe = popen(cur_cmd->x.cmd_txt.text, "r");
+ pipe_fp = popen(cur_cmd->x.cmd_txt.text, "r");
output_missing_newline(&output_file);
}
- if (pipe != NULL)
+ if (pipe_fp != NULL)
{
- while (!feof (pipe))
- {
- char buf[4096];
- int n = fread (buf, sizeof(char), 4096, pipe);
- if (n > 0)
+ char buf[4096];
+ int n;
+ while (!feof (pipe_fp))
+ if ((n = fread (buf, sizeof(char), 4096, pipe_fp)) > 0)
+ {
if (!cmd_length)
str_append(&s_accum, buf, n);
else
ck_fwrite(buf, 1, n, output_file.fp);
- }
+ }
- pclose (pipe);
+ pclose (pipe_fp);
if (!cmd_length)
{
/* Store into pattern space for plain `e' commands */
@@ -1376,8 +1438,9 @@ execute_program(vec, input)
/* 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);
+ (for huge lines). See comment above for 'g' as
+ to while the third argument is incorrect anyway. */
+ line_exchange(&line, &s_accum, true);
}
else
flush_output(output_file.fp);
@@ -1392,19 +1455,33 @@ execute_program(vec, input)
}
case 'g':
- line_copy(&hold, &line);
+ /* We do not have a really good choice for the third parameter.
+ The problem is that hold space and the input file might as
+ well have different states; copying it from hold space means
+ that subsequent input might be read incorrectly, while
+ keeping it as in pattern space means that commands operating
+ on the moved buffer might consider a wrong character set.
+ We keep it true because it's what sed <= 4.1.5 did. */
+ line_copy(&hold, &line, true);
break;
case 'G':
- line_append(&hold, &line);
+ /* We do not have a really good choice for the third parameter.
+ The problem is that hold space and pattern space might as
+ well have different states. So, true is as wrong as false.
+ We keep it true because it's what sed <= 4.1.5 did, but
+ we could consider having line_ap. */
+ line_append(&hold, &line, true);
break;
case 'h':
- line_copy(&line, &hold);
+ /* Here, it is ok to have true. */
+ line_copy(&line, &hold, true);
break;
case 'H':
- line_append(&line, &hold);
+ /* See comment above for 'G' regarding the third parameter. */
+ line_append(&line, &hold, true);
break;
case 'i':
@@ -1535,7 +1612,8 @@ execute_program(vec, input)
break;
case 'x':
- line_exchange(&line, &hold);
+ /* See comment above for 'g' regarding the third parameter. */
+ line_exchange(&line, &hold, false);
break;
case 'y':
@@ -1618,6 +1696,10 @@ execute_program(vec, input)
}
break;
+ case 'z':
+ line.length = 0;
+ break;
+
case '=':
output_missing_newline(&output_file);
fprintf(output_file.fp, "%lu\n",
@@ -1700,9 +1782,9 @@ process_files(the_program, argv)
struct input input;
int status;
- line_init(&line, INITIAL_BUFFER_SIZE);
- line_init(&hold, 0);
- line_init(&buffer, 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);
diff --git a/sed/fmt.c b/sed/fmt.c
index 64600a0..b2d2efb 100644
--- a/sed/fmt.c
+++ b/sed/fmt.c
@@ -3,7 +3,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
+ 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,
@@ -20,6 +20,7 @@
#include "sed.h"
#include <stdio.h>
+#include <string.h>
#include <ctype.h>
#include <sys/types.h>
diff --git a/sed/mbcs.c b/sed/mbcs.c
index 3756547..5669ad1 100644
--- a/sed/mbcs.c
+++ b/sed/mbcs.c
@@ -1,9 +1,9 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
+ 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,
@@ -17,8 +17,12 @@
#include "sed.h"
#include <stdlib.h>
+#include <string.h>
+
+#include "localcharset.h"
int mb_cur_max;
+bool is_utf8;
#ifdef HAVE_MBRTOWC
/* Add a byte to the multibyte character represented by the state
@@ -47,6 +51,12 @@ int brlen (ch, cur_stat)
void
initialize_mbcs ()
{
+ /* For UTF-8, we know that the encoding is stateless. */
+ const char *codeset_name;
+
+ codeset_name = locale_charset ();
+ is_utf8 = (strcmp (codeset_name, "UTF-8") == 0);
+
#ifdef HAVE_MBRTOWC
mb_cur_max = MB_CUR_MAX;
#else
diff --git a/sed/regexp.c b/sed/regexp.c
index d4e7437..39914de 100644
--- a/sed/regexp.c
+++ b/sed/regexp.c
@@ -1,9 +1,10 @@
/* GNU SED, a batch stream editor.
- Copyright (C) 1999, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
+ 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,
@@ -18,6 +19,7 @@
#include "sed.h"
#include <ctype.h>
+#include <string.h>
#include <stdio.h>
#ifdef HAVE_STDLIB_H
# include <stdlib.h>
@@ -63,10 +65,24 @@ compile_regex_1 (new_regex, needed_sub)
const char *error;
int syntax = ((extended_regexp_flags & REG_EXTENDED)
? RE_SYNTAX_POSIX_EXTENDED
- : RE_SYNTAX_POSIX_BASIC)
- & ~RE_UNMATCHED_RIGHT_PAREN_ORD;
+ : RE_SYNTAX_POSIX_BASIC);
+ syntax &= ~RE_DOT_NOT_NULL;
syntax |= RE_NO_POSIX_BACKTRACKING;
+
+ switch (posixicity)
+ {
+ case POSIXLY_EXTENDED:
+ syntax &= ~RE_UNMATCHED_RIGHT_PAREN_ORD;
+ break;
+ case POSIXLY_CORRECT:
+ syntax |= RE_UNMATCHED_RIGHT_PAREN_ORD;
+ break;
+ case POSIXLY_BASIC:
+ syntax |= RE_UNMATCHED_RIGHT_PAREN_ORD | RE_LIMITED_OPS | RE_NO_GNU_OPS;
+ break;
+ }
+
#ifdef RE_ICASE
syntax |= (new_regex->flags & REG_ICASE) ? RE_ICASE : 0;
#endif
diff --git a/sed/sed.c b/sed/sed.c
index 8d38566..bab2296 100644
--- a/sed/sed.c
+++ b/sed/sed.c
@@ -1,5 +1,4 @@
#define COPYRIGHT_NOTICE "Copyright (C) 2003 Free Software Foundation, Inc."
-#define BUG_ADDRESS "bonzini@gnu.org"
/* GNU SED, a batch stream editor.
Copyright (C) 1989,90,91,92,93,94,95,98,99,2002,2003
@@ -7,7 +6,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
+ 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,
@@ -59,6 +58,8 @@
# define ATOI(x) strtoul(x, NULL, 0)
#endif
+char *program_name;
+
int extended_regexp_flags = 0;
/* If set, fflush(stdout) on every line output. */
@@ -70,9 +71,15 @@ bool no_default_output = false;
/* If set, reset line counts on every new file. */
bool separate_files = false;
+/* If set, follow symlinks when processing in place */
+bool follow_symlinks = false;
+
/* How do we edit files in-place? (we don't if NULL) */
char *in_place_extension = NULL;
+/* The mode to use to read files, either "rt" or "rb". */
+char *read_mode = "rt";
+
/* Do we need to be pedantically POSIX compliant? */
enum posixicity_types posixicity;
@@ -84,6 +91,25 @@ static struct vector *the_program = NULL;
static void usage P_((int));
static void
+contact(errmsg)
+ int errmsg;
+{
+ FILE *out = errmsg ? stderr : stdout;
+#ifndef REG_PERL
+ fprintf(out, _("GNU sed home page: <http://www.gnu.org/software/sed/>.\n\
+General help using GNU software: <http://www.gnu.org/gethelp/>.\n"));
+#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\
+Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"),
+ PACKAGE_BUGREPORT, PACKAGE);
+}
+
+static void usage P_((int));
+static void
usage(status)
int status;
{
@@ -105,15 +131,25 @@ Usage: %s [OPTION]... {script-only-if-no-other-script} [input-file]...\n\
add the script to the commands to be executed\n"));
fprintf(out, _(" -f script-file, --file=script-file\n\
add the contents of script-file to the commands to be executed\n"));
+#ifdef ENABLE_FOLLOW_SYMLINKS
+ fprintf(out, _(" --follow-symlinks\n\
+ follow symlinks when processing in place\n"));
+#endif
fprintf(out, _(" -i[SUFFIX], --in-place[=SUFFIX]\n\
edit files in place (makes backup if extension supplied)\n"));
+#if defined(WIN32) || defined(_WIN32) || defined(__CYGWIN__) || defined(MSDOS) || defined(__EMX__)
+ fprintf(out, _(" -b, --binary\n\
+ open files in binary mode (CR+LFs are not processed specially)\n"));
+#endif
fprintf(out, _(" -l N, --line-length=N\n\
specify the desired line-wrap length for the `l' command\n"));
fprintf(out, _(" --posix\n\
disable all GNU extensions.\n"));
fprintf(out, _(" -r, --regexp-extended\n\
use extended regular expressions in the script.\n"));
+#ifdef REG_PERL
fprintf(out, PERL_HELP);
+#endif
fprintf(out, _(" -s, --separate\n\
consider files as separate rather than as a single continuous\n\
long stream.\n"));
@@ -128,9 +164,7 @@ non-option argument is taken as the sed script to interpret. All\n\
remaining arguments are names of input files; if no input files are\n\
specified, then the standard input is read.\n\
\n"));
- fprintf(out, _("E-mail bug reports to: %s .\n\
-Be sure to include the word ``%s'' somewhere in the ``Subject:'' field.\n"),
- BUG_ADDRESS, PACKAGE);
+ contact (status);
ck_fclose (NULL);
exit (status);
@@ -142,12 +176,13 @@ main(argc, argv)
char **argv;
{
#ifdef REG_PERL
-#define SHORTOPTS "snrRue:f:l:i::V:"
+#define SHORTOPTS "bsnrRuEe:f:l:i::V:"
#else
-#define SHORTOPTS "snrue:f:l:i::V:"
+#define SHORTOPTS "bsnruEe:f:l:i::V:"
#endif
static struct option longopts[] = {
+ {"binary", 0, NULL, 'b'},
{"regexp-extended", 0, NULL, 'r'},
#ifdef REG_PERL
{"regexp-perl", 0, NULL, 'R'},
@@ -163,6 +198,9 @@ main(argc, argv)
{"unbuffered", 0, NULL, 'u'},
{"version", 0, NULL, 'v'},
{"help", 0, NULL, 'h'},
+#ifdef ENABLE_FOLLOW_SYMLINKS
+ {"follow-symlinks", 0, NULL, 'F'},
+#endif
{NULL, 0, NULL, 0}
};
@@ -170,6 +208,7 @@ main(argc, argv)
int return_code;
const char *cols = getenv("COLS");
+ program_name = argv[0];
initialize_main (&argc, &argv);
#if HAVE_SETLOCALE
/* Set locale according to user's wishes. */
@@ -215,6 +254,10 @@ main(argc, argv)
the_program = compile_file(the_program, optarg);
break;
+ case 'F':
+ follow_symlinks = true;
+ break;
+
case 'i':
separate_files = true;
if (optarg == NULL)
@@ -241,6 +284,12 @@ main(argc, argv)
posixicity = POSIXLY_BASIC;
break;
+ case 'b':
+ read_mode = "rb";
+ break;
+
+ /* Undocumented, for compatibility with BSD sed. */
+ case 'E':
case 'r':
if (extended_regexp_flags)
usage(4);
@@ -275,6 +324,9 @@ This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\n\
to the extent permitted by law.\n\
"), COPYRIGHT_NOTICE);
+ fputc('\n', stdout);
+ contact(false);
+
ck_fclose (NULL);
exit (0);
case 'h':
diff --git a/sed/sed.h b/sed/sed.h
index ef125db..d657a42 100644
--- a/sed/sed.h
+++ b/sed/sed.h
@@ -4,7 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
+ 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,
@@ -25,6 +25,7 @@
#ifndef BOOTSTRAP
#include <stdio.h>
+#include "unlocked-io.h"
#endif
#include "utils.h"
@@ -219,6 +220,9 @@ extern bool no_default_output;
/* If set, reset line counts on every new file. */
extern bool separate_files;
+/* If set, follow symlinks when invoked with -i option */
+extern bool follow_symlinks;
+
/* Do we need to be pedantically POSIX compliant? */
extern enum posixicity_types posixicity;
@@ -228,11 +232,15 @@ extern countT lcmd_out_line_len;
/* How do we edit files in-place? (we don't if NULL) */
extern char *in_place_extension;
+/* The mode to use to read files, either "rt" or "rb". */
+extern char *read_mode;
+
/* Should we use EREs? */
extern bool use_extended_syntax_p;
/* Declarations for multibyte character sets. */
extern int mb_cur_max;
+extern bool is_utf8;
#ifdef HAVE_MBRTOWC
#ifdef HAVE_BTOWC
@@ -253,6 +261,9 @@ extern int mb_cur_max;
wcrtomb ((s), (wc), (ps))
#endif
+#define MBSINIT(s) \
+ (mb_cur_max == 1 ? 1 : mbsinit ((s)))
+
#define MBRLEN(s, n, ps) \
(mb_cur_max == 1 ? 1 : mbrtowc (NULL, s, n, ps))
@@ -260,6 +271,7 @@ extern int mb_cur_max;
(mb_cur_max == 1 ? 1 : brlen (ch, ps))
#else
+#define MBSINIT(s) 1
#define MBRLEN(s, n, ps) 1
#define BRLEN(ch, ps) 1
#endif
diff --git a/lib/utils.c b/sed/utils.c
index 647fd6d..87ea101 100644
--- a/lib/utils.c
+++ b/sed/utils.c
@@ -1,10 +1,10 @@
/* Functions from hack's utils library.
- Copyright (C) 1989, 1990, 1991, 1998, 1999, 2003
+ Copyright (C) 1989, 1990, 1991, 1998, 1999, 2003, 2008
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
+ 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,
@@ -19,7 +19,7 @@
#include "config.h"
#include <stdio.h>
-
+#include <stdarg.h>
#include <errno.h>
#ifndef errno
extern int errno;
@@ -35,7 +35,13 @@
# include <stdlib.h>
#endif /* HAVE_STDLIB_H */
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <limits.h>
+
#include "utils.h"
+#include "pathmax.h"
const char *myname;
@@ -55,34 +61,24 @@ static struct open_file *open_files = NULL;
static void do_ck_fclose P_((FILE *fp));
/* Print an error message and exit */
-#if !defined __STDC__ || !(__STDC__-0)
-# include <varargs.h>
-# define VSTART(l,a) va_start(l)
-void
-panic(str, va_alist)
- char *str;
- va_dcl
-#else /*__STDC__*/
-# include <stdarg.h>
-# define VSTART(l,a) va_start(l, a)
+
void
panic(const char *str, ...)
-#endif /* __STDC__ */
{
- va_list iggy;
+ va_list ap;
fprintf(stderr, "%s: ", myname);
- VSTART(iggy, str);
+ va_start(ap, str);
#ifndef HAVE_VPRINTF
# ifndef HAVE_DOPRNT
fputs(str, stderr); /* not great, but perhaps better than nothing... */
# else /* HAVE_DOPRNT */
- _doprnt(str, &iggy, stderr);
+ _doprnt(str, &ap, stderr);
# endif /* HAVE_DOPRNT */
#else /* HAVE_VFPRINTF */
- vfprintf(stderr, str, iggy);
+ vfprintf(stderr, str, ap);
#endif /* HAVE_VFPRINTF */
- va_end(iggy);
+ va_end(ap);
putc('\n', stderr);
/* Unlink the temporary files. */
@@ -90,7 +86,6 @@ panic(const char *str, ...)
{
if (open_files->temp)
{
- int fd = fileno (open_files->fp);
fclose (open_files->fp);
errno = 0;
unlink (open_files->name);
@@ -126,25 +121,13 @@ utils_fp_name(fp)
return "<unknown>";
}
-/* Panic on failing fopen */
-FILE *
-ck_fopen(name, mode, fail)
+static void
+register_open_file (fp, name, temp)
+ FILE *fp;
const char *name;
- const char *mode;
- bool fail;
+ int temp;
{
- FILE *fp;
struct open_file *p;
-
- fp = fopen (name, mode);
- if (!fp)
- {
- if (fail)
- panic(_("couldn't open file %s: %s"), name, strerror(errno));
-
- return NULL;
- }
-
for (p=open_files; p; p=p->link)
{
if (fp == p->fp)
@@ -162,6 +145,50 @@ ck_fopen(name, mode, fail)
p->name = ck_strdup(name);
p->fp = fp;
p->temp = false;
+}
+
+/* Panic on failing fopen */
+FILE *
+ck_fopen(name, mode, fail)
+ const char *name;
+ const char *mode;
+ int fail;
+{
+ FILE *fp;
+
+ fp = fopen (name, mode);
+ if (!fp)
+ {
+ if (fail)
+ panic(_("couldn't open file %s: %s"), name, strerror(errno));
+
+ return NULL;
+ }
+
+ register_open_file (fp, name, false);
+ return fp;
+}
+
+/* Panic on failing fdopen */
+FILE *
+ck_fdopen(fd, name, mode, fail)
+ int fd;
+ const char *name;
+ const char *mode;
+ int fail;
+{
+ FILE *fp;
+
+ fp = fdopen (fd, mode);
+ if (!fp)
+ {
+ if (fail)
+ panic(_("couldn't attach to %s: %s"), name, strerror(errno));
+
+ return NULL;
+ }
+
+ register_open_file (fp, name, false);
return fp;
}
@@ -173,7 +200,6 @@ ck_mkstemp (p_filename, tmpdir, base)
char *template;
FILE *fp;
int fd;
- struct open_file *p;
if (tmpdir == NULL)
tmpdir = getenv("TMPDIR");
@@ -197,13 +223,7 @@ ck_mkstemp (p_filename, tmpdir, base)
*p_filename = template;
fp = fdopen (fd, "w");
-
- p = MALLOC(1, struct open_file);
- p->name = ck_strdup (template);
- p->fp = fp;
- p->temp = true;
- p->link = open_files;
- open_files = p;
+ register_open_file (fp, template, true);
return fp;
}
@@ -305,16 +325,93 @@ void
do_ck_fclose(fp)
FILE *fp;
{
- int fd;
ck_fflush(fp);
clearerr(fp);
- /* We want to execute both arms, so use | not ||. */
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)
+{
+#ifdef ENABLE_FOLLOW_SYMLINKS
+ static char *buf1, *buf2;
+ static int buf_size;
+
+ struct stat statbuf;
+ const char *buf = fname, *c;
+ int rc;
+
+ if (buf_size == 0)
+ {
+ buf1 = ck_malloc (PATH_MAX + 1);
+ buf2 = ck_malloc (PATH_MAX + 1);
+ buf_size = PATH_MAX + 1;
+ }
+
+ while ((rc = lstat (buf, &statbuf)) == 0
+ && (statbuf.st_mode & S_IFLNK) == S_IFLNK)
+ {
+ if (buf == buf2)
+ {
+ strcpy (buf1, buf2);
+ buf = buf1;
+ }
+
+ while ((rc = readlink (buf, buf2, buf_size)) == buf_size)
+ {
+ buf_size *= 2;
+ buf1 = ck_realloc (buf1, buf_size);
+ buf2 = ck_realloc (buf2, buf_size);
+ }
+ if (rc < 0)
+ panic (_("couldn't follow symlink %s: %s"), buf, strerror(errno));
+ else
+ buf2 [rc] = '\0';
+
+ if (buf2[0] != '/' && (c = strrchr (buf, '/')) != NULL)
+ {
+ /* Need to handle relative paths with care. Reallocate buf1 and
+ buf2 to be big enough. */
+ int len = c - buf + 1;
+ if (len + rc + 1 > buf_size)
+ {
+ buf_size = len + rc + 1;
+ buf1 = ck_realloc (buf1, buf_size);
+ buf2 = ck_realloc (buf2, buf_size);
+ }
+
+ /* Always store the new path in buf1. */
+ if (buf != buf1)
+ memcpy (buf1, buf, len);
+
+ /* Tack the relative symlink at the end of buf1. */
+ memcpy (buf1 + len, buf2, rc + 1);
+ buf = buf1;
+ }
+ else
+ {
+ /* Use buf2 as the buffer, it saves a strcpy if it is not pointing to
+ another link. It works for absolute symlinks, and as long as
+ symlinks do not leave the current directory. */
+ buf = buf2;
+ }
+ }
+
+ if (rc < 0)
+ panic (_("cannot stat %s: %s"), buf, strerror(errno));
+
+ return buf;
+#else
+ return fname;
+#endif /* ENABLE_FOLLOW_SYMLINKS */
+}
+
/* Panic on failing rename */
void
ck_rename (from, to, unlink_if_fail)
@@ -355,14 +452,6 @@ ck_malloc(size)
return ret;
}
-/* Panic on failing malloc */
-VOID *
-xmalloc(size)
- size_t size;
-{
- return ck_malloc(size);
-}
-
/* Panic on failing realloc */
VOID *
ck_realloc(ptr, size)
diff --git a/lib/utils.h b/sed/utils.h
index ae09864..d3f431d 100644
--- a/lib/utils.h
+++ b/sed/utils.h
@@ -4,7 +4,7 @@
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
+ 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,
@@ -22,11 +22,13 @@
void panic P_((const char *str, ...));
-FILE *ck_fopen P_((const char *name, const char *mode, bool fail));
+FILE *ck_fopen P_((const char *name, const char *mode, int fail));
+FILE *ck_fdopen P_((int fd, const char *name, const char *mode, int fail));
void ck_fwrite P_((const VOID *ptr, size_t size, size_t nmemb, FILE *stream));
size_t ck_fread P_((VOID *ptr, size_t size, size_t nmemb, FILE *stream));
void ck_fflush P_((FILE *stream));
void ck_fclose P_((FILE *stream));
+const char *follow_symlink P_((const char *path));
size_t ck_getline P_((char **text, size_t *buflen, FILE *stream));
FILE * ck_mkstemp P_((char **p_filename, char *tmpdir, char *base));
void ck_rename P_((const char *from, const char *to, const char *unlink_if_fail));
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index cdf761c..47062e0 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -1,16 +1,17 @@
-CLEANFILES = tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log
+CLEANFILES = tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log eval.in2
TESTS = $(check_PROGRAMS) $(SEDTESTS)
SEDTESTS =
-LDADD = ../lib/libsed.a
+LDADD = ../lib/libsed.a @INTLLIBS@
noinst_HEADERS = testcases.h ptestcases.h
-AM_CPPFLAGS = -I../lib
+AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib
if TEST_REGEX
check_PROGRAMS = bug-regex7 \
bug-regex8 bug-regex9 bug-regex10 bug-regex11 bug-regex12 \
bug-regex13 bug-regex14 bug-regex15 bug-regex16 bug-regex21 \
+ bug-regex27 bug-regex28 \
tst-pcre tst-boost runtests runptests tst-rxspencer tst-regex2
SEDTESTS += space
@@ -18,15 +19,18 @@ endif
SEDTESTS += \
appquit enable sep inclib 8bit newjis xabcx dollar noeol noeolw \
- modulo numsub numsub2 numsub3 numsub4 numsub5 0range bkslashes \
- head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
- fasts uniq manis khadafy linecnt eval distrib 8to7 y-bracket \
+ modulo numsub numsub2 numsub3 numsub4 numsub5 0range bkslashes \
+ head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
+ fasts uniq manis khadafy linecnt eval distrib 8to7 y-bracket \
y-newline allsub cv-vars classes middle bsd stdin flipcase \
- insens subwrite writeout readin \
+ insens subwrite writeout readin insert utf8-1 utf8-2 utf8-3 utf8-4 \
+ badenc inplace-hold \
help version file quiet \
factor binary3 binary2 binary dc
-TESTS_ENVIRONMENT = MAKE="$(MAKE)" VERSION="$(VERSION)" $(srcdir)/runtest
+TESTS_ENVIRONMENT = MAKE="$(MAKE)" VERSION="$(VERSION)" \
+ @LOCALCHARSET_TESTS_ENVIRONMENT@ $(srcdir)/runtest
+
EXTRA_DIST = \
PCRE.tests BOOST.tests SPENCER.tests \
@@ -53,6 +57,7 @@ EXTRA_DIST = \
head.good head.inp head.sed \
inclib.good inclib.inp inclib.sed \
insens.good insens.inp insens.sed \
+ insert.good insert.inp insert.sed \
khadafy.good khadafy.inp khadafy.sed \
linecnt.good linecnt.inp linecnt.sed \
space.good space.inp space.sed \
@@ -69,12 +74,17 @@ EXTRA_DIST = \
numsub3.good numsub3.inp numsub3.sed \
numsub4.good numsub4.inp numsub4.sed \
numsub5.good numsub5.inp numsub5.sed \
- readin.good readin.in2 readin.inp readin.sed \
+ readin.good readin.inp readin.sed \
recall.good recall.inp recall.sed \
recall2.good recall2.inp recall2.sed \
sep.good sep.inp sep.sed \
subwrite.inp subwrite.sed subwrt1.good subwrt2.good \
uniq.good uniq.inp uniq.sed \
+ utf8-1.good utf8-1.inp utf8-1.sed \
+ utf8-2.good utf8-2.inp utf8-2.sed \
+ utf8-3.good utf8-3.inp utf8-3.sed \
+ utf8-4.good utf8-4.inp utf8-4.sed \
+ badenc.good badenc.inp badenc.sed \
version.gin \
writeout.inp writeout.sed wrtout1.good wrtout2.good \
xabcx.good xabcx.inp xabcx.sed \
@@ -84,9 +94,6 @@ EXTRA_DIST = \
y-bracket.good y-bracket.sed y-bracket.inp \
y-newline.good y-newline.sed y-newline.inp
-clean-local:
- test x$(srcdir) = x. || rm -f readin.in2 eval.in2
-
# automake makes `check' depend on $(TESTS). Declare
# dummy targets for $(TESTS) so that make does not complain.
diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in
index a485b87..fa882a4 100644
--- a/testsuite/Makefile.in
+++ b/testsuite/Makefile.in
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.9.5 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,17 +14,11 @@
@SET_MAKE@
-SOURCES = bug-regex10.c bug-regex11.c bug-regex12.c bug-regex13.c bug-regex14.c bug-regex15.c bug-regex16.c bug-regex21.c bug-regex7.c bug-regex8.c bug-regex9.c runptests.c runtests.c tst-boost.c tst-pcre.c tst-regex2.c tst-rxspencer.c
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
@@ -44,31 +38,54 @@ host_triplet = @host@
@TEST_REGEX_TRUE@ bug-regex12$(EXEEXT) bug-regex13$(EXEEXT) \
@TEST_REGEX_TRUE@ bug-regex14$(EXEEXT) bug-regex15$(EXEEXT) \
@TEST_REGEX_TRUE@ bug-regex16$(EXEEXT) bug-regex21$(EXEEXT) \
+@TEST_REGEX_TRUE@ bug-regex27$(EXEEXT) bug-regex28$(EXEEXT) \
@TEST_REGEX_TRUE@ tst-pcre$(EXEEXT) tst-boost$(EXEEXT) \
@TEST_REGEX_TRUE@ runtests$(EXEEXT) runptests$(EXEEXT) \
@TEST_REGEX_TRUE@ tst-rxspencer$(EXEEXT) tst-regex2$(EXEEXT)
@TEST_REGEX_TRUE@am__append_1 = space
subdir = testsuite
DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
+ $(srcdir)/Makefile.in $(srcdir)/version.gin
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/codeset.m4 \
- $(top_srcdir)/config/getline.m4 \
- $(top_srcdir)/config/gettext-ver.m4 \
- $(top_srcdir)/config/gettext.m4 \
- $(top_srcdir)/config/glibc21.m4 $(top_srcdir)/config/iconv.m4 \
- $(top_srcdir)/config/lcmessage.m4 \
- $(top_srcdir)/config/lib-ld.m4 \
- $(top_srcdir)/config/lib-link.m4 \
- $(top_srcdir)/config/lib-prefix.m4 \
- $(top_srcdir)/config/progtest.m4 \
- $(top_srcdir)/config/stdbool.m4 \
- $(top_srcdir)/config/strverscmp.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \
+ $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \
+ $(top_srcdir)/m4/btowc.m4 $(top_srcdir)/m4/codeset.m4 \
+ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/error.m4 \
+ $(top_srcdir)/m4/exitfail.m4 $(top_srcdir)/m4/extensions.m4 \
+ $(top_srcdir)/m4/getdelim.m4 $(top_srcdir)/m4/getline.m4 \
+ $(top_srcdir)/m4/getopt.m4 $(top_srcdir)/m4/gettext.m4 \
+ $(top_srcdir)/m4/gettimeofday.m4 $(top_srcdir)/m4/glibc21.m4 \
+ $(top_srcdir)/m4/gnulib-common.m4 \
+ $(top_srcdir)/m4/gnulib-comp.m4 $(top_srcdir)/m4/iconv.m4 \
+ $(top_srcdir)/m4/include_next.m4 $(top_srcdir)/m4/inline.m4 \
+ $(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/lib-ld.m4 \
+ $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+ $(top_srcdir)/m4/localcharset.m4 $(top_srcdir)/m4/locale-fr.m4 \
+ $(top_srcdir)/m4/locale-ja.m4 $(top_srcdir)/m4/locale-zh.m4 \
+ $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/lstat.m4 \
+ $(top_srcdir)/m4/malloc.m4 $(top_srcdir)/m4/mbrlen.m4 \
+ $(top_srcdir)/m4/mbrtowc.m4 $(top_srcdir)/m4/mbsinit.m4 \
+ $(top_srcdir)/m4/mbstate_t.m4 $(top_srcdir)/m4/mkstemp.m4 \
+ $(top_srcdir)/m4/multiarch.m4 $(top_srcdir)/m4/nls.m4 \
+ $(top_srcdir)/m4/pathmax.m4 $(top_srcdir)/m4/po.m4 \
+ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/quote.m4 \
+ $(top_srcdir)/m4/quotearg.m4 $(top_srcdir)/m4/realloc.m4 \
+ $(top_srcdir)/m4/regex.m4 $(top_srcdir)/m4/ssize_t.m4 \
+ $(top_srcdir)/m4/stdbool.m4 $(top_srcdir)/m4/stdint.m4 \
+ $(top_srcdir)/m4/stdio_h.m4 $(top_srcdir)/m4/stdlib_h.m4 \
+ $(top_srcdir)/m4/strerror.m4 $(top_srcdir)/m4/string_h.m4 \
+ $(top_srcdir)/m4/strverscmp.m4 $(top_srcdir)/m4/sys_stat_h.m4 \
+ $(top_srcdir)/m4/sys_time_h.m4 $(top_srcdir)/m4/tempname.m4 \
+ $(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/m4/unistd_h.m4 \
+ $(top_srcdir)/m4/unlocked-io.m4 $(top_srcdir)/m4/wchar.m4 \
+ $(top_srcdir)/m4/wcrtomb.m4 $(top_srcdir)/m4/wctob.m4 \
+ $(top_srcdir)/m4/wctype.m4 $(top_srcdir)/m4/wint_t.m4 \
+ $(top_srcdir)/m4/xalloc.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = version.good
bug_regex10_SOURCES = bug-regex10.c
bug_regex10_OBJECTS = bug-regex10.$(OBJEXT)
bug_regex10_LDADD = $(LDADD)
@@ -101,6 +118,14 @@ bug_regex21_SOURCES = bug-regex21.c
bug_regex21_OBJECTS = bug-regex21.$(OBJEXT)
bug_regex21_LDADD = $(LDADD)
bug_regex21_DEPENDENCIES = ../lib/libsed.a
+bug_regex27_SOURCES = bug-regex27.c
+bug_regex27_OBJECTS = bug-regex27.$(OBJEXT)
+bug_regex27_LDADD = $(LDADD)
+bug_regex27_DEPENDENCIES = ../lib/libsed.a
+bug_regex28_SOURCES = bug-regex28.c
+bug_regex28_OBJECTS = bug-regex28.$(OBJEXT)
+bug_regex28_LDADD = $(LDADD)
+bug_regex28_DEPENDENCIES = ../lib/libsed.a
bug_regex7_SOURCES = bug-regex7.c
bug_regex7_OBJECTS = bug-regex7.$(OBJEXT)
bug_regex7_LDADD = $(LDADD)
@@ -137,8 +162,8 @@ tst_rxspencer_SOURCES = tst-rxspencer.c
tst_rxspencer_OBJECTS = tst-rxspencer.$(OBJEXT)
tst_rxspencer_LDADD = $(LDADD)
tst_rxspencer_DEPENDENCIES = ../lib/libsed.a
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -146,70 +171,308 @@ CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = bug-regex10.c bug-regex11.c bug-regex12.c bug-regex13.c \
bug-regex14.c bug-regex15.c bug-regex16.c bug-regex21.c \
- bug-regex7.c bug-regex8.c bug-regex9.c runptests.c runtests.c \
- tst-boost.c tst-pcre.c tst-regex2.c tst-rxspencer.c
+ bug-regex27.c bug-regex28.c bug-regex7.c bug-regex8.c \
+ bug-regex9.c runptests.c runtests.c tst-boost.c tst-pcre.c \
+ tst-regex2.c tst-rxspencer.c
DIST_SOURCES = bug-regex10.c bug-regex11.c bug-regex12.c bug-regex13.c \
bug-regex14.c bug-regex15.c bug-regex16.c bug-regex21.c \
- bug-regex7.c bug-regex8.c bug-regex9.c runptests.c runtests.c \
- tst-boost.c tst-pcre.c tst-regex2.c tst-rxspencer.c
+ bug-regex27.c bug-regex28.c bug-regex7.c bug-regex8.c \
+ bug-regex9.c runptests.c runtests.c tst-boost.c tst-pcre.c \
+ tst-regex2.c tst-rxspencer.c
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALLOCA = @ALLOCA@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
+ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BUILD_HTML_FALSE = @BUILD_HTML_FALSE@
-BUILD_HTML_TRUE = @BUILD_HTML_TRUE@
-BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
-CATOBJEXT = @CATOBJEXT@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
EXEEXT = @EXEEXT@
-GENCAT = @GENCAT@
+GETOPT_H = @GETOPT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLIBC21 = @GLIBC21@
GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WRITE = @GNULIB_WRITE@
+GREP = @GREP@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_FSEEKO = @HAVE_FSEEKO@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTELLO = @HAVE_FTELLO@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRNDUP = @HAVE_STRNDUP@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
HAVE__BOOL = @HAVE__BOOL@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
LIBICONV = @LIBICONV@
LIBINTL = @LIBINTL@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
+LIBSED_LIBDEPS = @LIBSED_LIBDEPS@
+LIBSED_LTLIBDEPS = @LIBSED_LTLIBDEPS@
+LIB_ACL = @LIB_ACL@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
+LOCALE_FR = @LOCALE_FR@
+LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@
+LOCALE_JA = @LOCALE_JA@
+LOCALE_ZH_CN = @LOCALE_ZH_CN@
LTLIBICONV = @LTLIBICONV@
LTLIBINTL = @LTLIBINTL@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
-MAKEINFO_HTML_FALSE = @MAKEINFO_HTML_FALSE@
-MAKEINFO_HTML_TRUE = @MAKEINFO_HTML_TRUE@
-MKINSTALLDIRS = @MKINSTALLDIRS@
+MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -219,25 +482,92 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
POSUB = @POSUB@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
SED_FEATURE_VERSION = @SED_FEATURE_VERSION@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDBOOL_H = @STDBOOL_H@
+STDINT_H = @STDINT_H@
STRIP = @STRIP@
-TEST_REGEX_FALSE = @TEST_REGEX_FALSE@
-TEST_REGEX_TRUE = @TEST_REGEX_TRUE@
-TEXI2HTML = @TEXI2HTML@
-TEXI2HTML_HTML_FALSE = @TEXI2HTML_HTML_FALSE@
-TEXI2HTML_HTML_TRUE = @TEXI2HTML_HTML_TRUE@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+SYS_STAT_H = @SYS_STAT_H@
+SYS_TIME_H = @SYS_TIME_H@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+USE_ACL = @USE_ACL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
+VOID_UNSETENV = @VOID_UNSETENV@
+WCHAR_H = @WCHAR_H@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XFAIL_TESTS = @XFAIL_TESTS@
XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
@@ -249,41 +579,59 @@ build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
+builddir = @builddir@
datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
exec_prefix = @exec_prefix@
+gl_LIBOBJS = @gl_LIBOBJS@
+gl_LTLIBOBJS = @gl_LTLIBOBJS@
+gltests_LIBOBJS = @gltests_LIBOBJS@
+gltests_LTLIBOBJS = @gltests_LTLIBOBJS@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
+htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
+psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
-CLEANFILES = tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+CLEANFILES = tmp* core *.core $(EXTRA_PROGRAMS) *.*out *.log eval.in2
TESTS = $(check_PROGRAMS) $(SEDTESTS)
SEDTESTS = $(am__append_1) appquit enable sep inclib 8bit newjis xabcx \
dollar noeol noeolw modulo numsub numsub2 numsub3 numsub4 \
numsub5 0range bkslashes head madding mac-mf empty xbxcx \
xbxcx3 recall recall2 xemacs fasts uniq manis khadafy linecnt \
eval distrib 8to7 y-bracket y-newline allsub cv-vars classes \
- middle bsd stdin flipcase insens subwrite writeout readin help \
+ middle bsd stdin flipcase insens subwrite writeout readin \
+ insert utf8-1 utf8-2 utf8-3 utf8-4 badenc inplace-hold help \
version file quiet factor binary3 binary2 binary dc
-LDADD = ../lib/libsed.a
+LDADD = ../lib/libsed.a @INTLLIBS@
noinst_HEADERS = testcases.h ptestcases.h
-AM_CPPFLAGS = -I../lib
-TESTS_ENVIRONMENT = MAKE="$(MAKE)" VERSION="$(VERSION)" $(srcdir)/runtest
+AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib
+TESTS_ENVIRONMENT = MAKE="$(MAKE)" VERSION="$(VERSION)" \
+ @LOCALCHARSET_TESTS_ENVIRONMENT@ $(srcdir)/runtest
+
EXTRA_DIST = \
PCRE.tests BOOST.tests SPENCER.tests \
runtest Makefile.tests \
@@ -309,6 +657,7 @@ EXTRA_DIST = \
head.good head.inp head.sed \
inclib.good inclib.inp inclib.sed \
insens.good insens.inp insens.sed \
+ insert.good insert.inp insert.sed \
khadafy.good khadafy.inp khadafy.sed \
linecnt.good linecnt.inp linecnt.sed \
space.good space.inp space.sed \
@@ -325,12 +674,17 @@ EXTRA_DIST = \
numsub3.good numsub3.inp numsub3.sed \
numsub4.good numsub4.inp numsub4.sed \
numsub5.good numsub5.inp numsub5.sed \
- readin.good readin.in2 readin.inp readin.sed \
+ readin.good readin.inp readin.sed \
recall.good recall.inp recall.sed \
recall2.good recall2.inp recall2.sed \
sep.good sep.inp sep.sed \
subwrite.inp subwrite.sed subwrt1.good subwrt2.good \
uniq.good uniq.inp uniq.sed \
+ utf8-1.good utf8-1.inp utf8-1.sed \
+ utf8-2.good utf8-2.inp utf8-2.sed \
+ utf8-3.good utf8-3.inp utf8-3.sed \
+ utf8-4.good utf8-4.inp utf8-4.sed \
+ badenc.good badenc.inp badenc.sed \
version.gin \
writeout.inp writeout.sed wrtout1.good wrtout2.good \
xabcx.good xabcx.inp xabcx.sed \
@@ -373,60 +727,68 @@ $(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+version.good: $(top_builddir)/config.status $(srcdir)/version.gin
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
clean-checkPROGRAMS:
-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
bug-regex10$(EXEEXT): $(bug_regex10_OBJECTS) $(bug_regex10_DEPENDENCIES)
@rm -f bug-regex10$(EXEEXT)
- $(LINK) $(bug_regex10_LDFLAGS) $(bug_regex10_OBJECTS) $(bug_regex10_LDADD) $(LIBS)
+ $(LINK) $(bug_regex10_OBJECTS) $(bug_regex10_LDADD) $(LIBS)
bug-regex11$(EXEEXT): $(bug_regex11_OBJECTS) $(bug_regex11_DEPENDENCIES)
@rm -f bug-regex11$(EXEEXT)
- $(LINK) $(bug_regex11_LDFLAGS) $(bug_regex11_OBJECTS) $(bug_regex11_LDADD) $(LIBS)
+ $(LINK) $(bug_regex11_OBJECTS) $(bug_regex11_LDADD) $(LIBS)
bug-regex12$(EXEEXT): $(bug_regex12_OBJECTS) $(bug_regex12_DEPENDENCIES)
@rm -f bug-regex12$(EXEEXT)
- $(LINK) $(bug_regex12_LDFLAGS) $(bug_regex12_OBJECTS) $(bug_regex12_LDADD) $(LIBS)
+ $(LINK) $(bug_regex12_OBJECTS) $(bug_regex12_LDADD) $(LIBS)
bug-regex13$(EXEEXT): $(bug_regex13_OBJECTS) $(bug_regex13_DEPENDENCIES)
@rm -f bug-regex13$(EXEEXT)
- $(LINK) $(bug_regex13_LDFLAGS) $(bug_regex13_OBJECTS) $(bug_regex13_LDADD) $(LIBS)
+ $(LINK) $(bug_regex13_OBJECTS) $(bug_regex13_LDADD) $(LIBS)
bug-regex14$(EXEEXT): $(bug_regex14_OBJECTS) $(bug_regex14_DEPENDENCIES)
@rm -f bug-regex14$(EXEEXT)
- $(LINK) $(bug_regex14_LDFLAGS) $(bug_regex14_OBJECTS) $(bug_regex14_LDADD) $(LIBS)
+ $(LINK) $(bug_regex14_OBJECTS) $(bug_regex14_LDADD) $(LIBS)
bug-regex15$(EXEEXT): $(bug_regex15_OBJECTS) $(bug_regex15_DEPENDENCIES)
@rm -f bug-regex15$(EXEEXT)
- $(LINK) $(bug_regex15_LDFLAGS) $(bug_regex15_OBJECTS) $(bug_regex15_LDADD) $(LIBS)
+ $(LINK) $(bug_regex15_OBJECTS) $(bug_regex15_LDADD) $(LIBS)
bug-regex16$(EXEEXT): $(bug_regex16_OBJECTS) $(bug_regex16_DEPENDENCIES)
@rm -f bug-regex16$(EXEEXT)
- $(LINK) $(bug_regex16_LDFLAGS) $(bug_regex16_OBJECTS) $(bug_regex16_LDADD) $(LIBS)
+ $(LINK) $(bug_regex16_OBJECTS) $(bug_regex16_LDADD) $(LIBS)
bug-regex21$(EXEEXT): $(bug_regex21_OBJECTS) $(bug_regex21_DEPENDENCIES)
@rm -f bug-regex21$(EXEEXT)
- $(LINK) $(bug_regex21_LDFLAGS) $(bug_regex21_OBJECTS) $(bug_regex21_LDADD) $(LIBS)
+ $(LINK) $(bug_regex21_OBJECTS) $(bug_regex21_LDADD) $(LIBS)
+bug-regex27$(EXEEXT): $(bug_regex27_OBJECTS) $(bug_regex27_DEPENDENCIES)
+ @rm -f bug-regex27$(EXEEXT)
+ $(LINK) $(bug_regex27_OBJECTS) $(bug_regex27_LDADD) $(LIBS)
+bug-regex28$(EXEEXT): $(bug_regex28_OBJECTS) $(bug_regex28_DEPENDENCIES)
+ @rm -f bug-regex28$(EXEEXT)
+ $(LINK) $(bug_regex28_OBJECTS) $(bug_regex28_LDADD) $(LIBS)
bug-regex7$(EXEEXT): $(bug_regex7_OBJECTS) $(bug_regex7_DEPENDENCIES)
@rm -f bug-regex7$(EXEEXT)
- $(LINK) $(bug_regex7_LDFLAGS) $(bug_regex7_OBJECTS) $(bug_regex7_LDADD) $(LIBS)
+ $(LINK) $(bug_regex7_OBJECTS) $(bug_regex7_LDADD) $(LIBS)
bug-regex8$(EXEEXT): $(bug_regex8_OBJECTS) $(bug_regex8_DEPENDENCIES)
@rm -f bug-regex8$(EXEEXT)
- $(LINK) $(bug_regex8_LDFLAGS) $(bug_regex8_OBJECTS) $(bug_regex8_LDADD) $(LIBS)
+ $(LINK) $(bug_regex8_OBJECTS) $(bug_regex8_LDADD) $(LIBS)
bug-regex9$(EXEEXT): $(bug_regex9_OBJECTS) $(bug_regex9_DEPENDENCIES)
@rm -f bug-regex9$(EXEEXT)
- $(LINK) $(bug_regex9_LDFLAGS) $(bug_regex9_OBJECTS) $(bug_regex9_LDADD) $(LIBS)
+ $(LINK) $(bug_regex9_OBJECTS) $(bug_regex9_LDADD) $(LIBS)
runptests$(EXEEXT): $(runptests_OBJECTS) $(runptests_DEPENDENCIES)
@rm -f runptests$(EXEEXT)
- $(LINK) $(runptests_LDFLAGS) $(runptests_OBJECTS) $(runptests_LDADD) $(LIBS)
+ $(LINK) $(runptests_OBJECTS) $(runptests_LDADD) $(LIBS)
runtests$(EXEEXT): $(runtests_OBJECTS) $(runtests_DEPENDENCIES)
@rm -f runtests$(EXEEXT)
- $(LINK) $(runtests_LDFLAGS) $(runtests_OBJECTS) $(runtests_LDADD) $(LIBS)
+ $(LINK) $(runtests_OBJECTS) $(runtests_LDADD) $(LIBS)
tst-boost$(EXEEXT): $(tst_boost_OBJECTS) $(tst_boost_DEPENDENCIES)
@rm -f tst-boost$(EXEEXT)
- $(LINK) $(tst_boost_LDFLAGS) $(tst_boost_OBJECTS) $(tst_boost_LDADD) $(LIBS)
+ $(LINK) $(tst_boost_OBJECTS) $(tst_boost_LDADD) $(LIBS)
tst-pcre$(EXEEXT): $(tst_pcre_OBJECTS) $(tst_pcre_DEPENDENCIES)
@rm -f tst-pcre$(EXEEXT)
- $(LINK) $(tst_pcre_LDFLAGS) $(tst_pcre_OBJECTS) $(tst_pcre_LDADD) $(LIBS)
+ $(LINK) $(tst_pcre_OBJECTS) $(tst_pcre_LDADD) $(LIBS)
tst-regex2$(EXEEXT): $(tst_regex2_OBJECTS) $(tst_regex2_DEPENDENCIES)
@rm -f tst-regex2$(EXEEXT)
- $(LINK) $(tst_regex2_LDFLAGS) $(tst_regex2_OBJECTS) $(tst_regex2_LDADD) $(LIBS)
+ $(LINK) $(tst_regex2_OBJECTS) $(tst_regex2_LDADD) $(LIBS)
tst-rxspencer$(EXEEXT): $(tst_rxspencer_OBJECTS) $(tst_rxspencer_DEPENDENCIES)
@rm -f tst-rxspencer$(EXEEXT)
- $(LINK) $(tst_rxspencer_LDFLAGS) $(tst_rxspencer_OBJECTS) $(tst_rxspencer_LDADD) $(LIBS)
+ $(LINK) $(tst_rxspencer_OBJECTS) $(tst_rxspencer_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -442,6 +804,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex15.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex16.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex21.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex27.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex28.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex7.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex8.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bug-regex9.Po@am__quote@
@@ -453,27 +817,26 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tst-rxspencer.Po@am__quote@
.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-uninstall-info-am:
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -485,8 +848,8 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -496,13 +859,12 @@ ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -516,9 +878,9 @@ distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
check-TESTS: $(TESTS)
- @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; ws='[ ]'; \
srcdir=$(srcdir); export srcdir; \
- list='$(TESTS)'; \
+ list=' $(TESTS) '; \
if test -n "$$list"; then \
for tst in $$list; do \
if test -f ./$$tst; then dir=./; \
@@ -527,7 +889,7 @@ check-TESTS: $(TESTS)
if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
- *" $$tst "*) \
+ *$$ws$$tst$$ws*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
echo "XPASS: $$tst"; \
@@ -539,7 +901,7 @@ check-TESTS: $(TESTS)
elif test $$? -ne 77; then \
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
- *" $$tst "*) \
+ *$$ws$$tst$$ws*) \
xfail=`expr $$xfail + 1`; \
echo "XFAIL: $$tst"; \
;; \
@@ -589,22 +951,21 @@ check-TESTS: $(TESTS)
else :; fi
distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
@@ -648,7 +1009,7 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-checkPROGRAMS clean-generic clean-local mostlyclean-am
+clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -668,12 +1029,20 @@ info-am:
install-data-am:
+install-dvi: install-dvi-am
+
install-exec-am:
+install-html: install-html-am
+
install-info: install-info-am
install-man:
+install-pdf: install-pdf-am
+
+install-ps: install-ps-am
+
installcheck-am:
maintainer-clean: maintainer-clean-am
@@ -693,22 +1062,23 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
- clean-checkPROGRAMS clean-generic clean-local ctags distclean \
+ clean-checkPROGRAMS clean-generic ctags distclean \
distclean-compile distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-info-am
-
+ uninstall-am
-clean-local:
- test x$(srcdir) = x. || rm -f readin.in2 eval.in2
# automake makes `check' depend on $(TESTS). Declare
# dummy targets for $(TESTS) so that make does not complain.
diff --git a/testsuite/Makefile.tests b/testsuite/Makefile.tests
index eada28d..f6402dd 100644
--- a/testsuite/Makefile.tests
+++ b/testsuite/Makefile.tests
@@ -5,82 +5,145 @@ SHELL = /bin/sh
# These are only fallback values. They are usually overridden by runtest.
srcdir = .
SED = ../sed/sed
-SEDENV = LC_ALL=C $(TIME)
+TIME=
#TIME=time
+
+SEDENV_2 = LC_ALL=C
+SEDENV = $(SEDENV_2) $(TIME)
+TR = $(SEDENV_2) tr
+
CMP=cmp
RM=rm -f
+SKIP = :>$@.skip; exit 77
+
enable sep inclib 8bit 8to7 newjis xabcx dollar noeol bkslashes \
numsub head madding mac-mf empty xbxcx xbxcx3 recall recall2 xemacs \
appquit fasts uniq manis linecnt khadafy allsub flipcase space modulo \
-y-bracket y-newline::
+y-bracket y-newline insert::
$(SEDENV) $(SED) -f $(srcdir)/$@.sed \
- < $(srcdir)/$@.inp > $@.out
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
$(CMP) $(srcdir)/$@.good $@.out
@$(RM) $@.out
0range::
- $(SEDENV) $(SED) -s -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.out
+ $(SEDENV) $(SED) -s -f $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
$(CMP) $(srcdir)/$@.good $@.out
@$(RM) $@.out
+badenc::
+ LANG=ru_RU.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ LANG=it_IT.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ LANG=en_US.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ LANG=en_GB.UTF-8 $(TIME) $(SED) -nf $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
+ $(CMP) $(srcdir)/$@.good $@.out
+ @$(RM) $@.out
+
+# Try with ru_RU.UTF-8. If it is presumably not installed, see if the current
+# locale is UTF-8 and run it in the current locale.
+utf8-1 utf8-2 utf8-3 utf8-4::
+ echo "LANG=ru_RU.UTF-8" \
+ "$(TIME) $(SED) -f $(srcdir)/$@.sed" \
+ "< $(srcdir)/$@.inp | $(TR) -d \\r > $@.out"; \
+ LANG=ru_RU.UTF-8 \
+ $(TIME) $(SED) -f $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out; \
+ $(CMP) $(srcdir)/$@.good $@.out && exit 0; \
+ $(CMP) $(srcdir)/$@.inp $@.out || exit 1; \
+ locale > $@.info 2>/dev/null || { rm $@.info; $(SKIP); }; \
+ . $@.info; rm $@.info; \
+ case "$$LC_CTYPE" in \
+ *UTF-8 | *UTF8 | *utf8 | *utf-8) \
+ echo "$(TIME) $(SED) -f $(srcdir)/$@.sed" \
+ " < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out"; \
+ $(TIME) $(SED) -f $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out; \
+ $(CMP) $(srcdir)/$@.good $@.out && exit 0; \
+ $(CMP) $(srcdir)/$@.inp $@.out || exit 1 ;; \
+ *) ;; \
+ esac; \
+ $(SKIP)
+
# This checks for a bug in 3.02 and 3.02.80
stdin::
- ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) < $(srcdir)/numsub.inp > $@.1out
- $(SEDENV) cat $(srcdir)/numsub.inp | ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) > $@.2out
+ ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) < $(srcdir)/numsub.inp \
+ | $(TR) -d \\r > $@.1out
+ $(SEDENV) cat $(srcdir)/numsub.inp \
+ | ($(SEDENV) $(SED) d; $(SEDENV) $(SED) G) | $(TR) -d \\r > $@.2out
$(CMP) $@.1out $@.2out
@$(RM) $@.1out $@.2out
+inplace-hold::
+ echo x > $@.1out
+ echo y > $@.2out
+ echo > $@.out
+ $(SEDENV) $(SED) -i x $@.1out $@.2out
+ $(CMP) $@.1out $@.out
+ $(CMP) $@.2out $@.out
+ @$(RM) $@.1out $@.2out $@.out
+
cv-vars classes middle dc distrib factor numsub2 numsub3 numsub4 numsub5 \
insens::
- $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.out
+ $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
$(CMP) $(srcdir)/$@.good $@.out
@$(RM) $@.out
noeolw::
$(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
- $(srcdir)/noeol.inp $(srcdir)/noeol.inp > $@.out
+ $(srcdir)/noeol.inp $(srcdir)/noeol.inp | $(TR) -d \\r > $@.out
$(CMP) $(srcdir)/$@.good $@.out
- $(CMP) $(srcdir)/$@.1good $@.1out
- $(CMP) $(srcdir)/$@.2good $@.2out
+ $(TR) -d \\r < $@.1out | $(CMP) $(srcdir)/$@.1good -
+ $(TR) -d \\r < $@.2out | $(CMP) $(srcdir)/$@.2good -
@$(RM) $@.1out $@.2out $@.out
subwrite::
- $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.1out
- $(CMP) $(srcdir)/subwrt1.good $@.1out
- $(CMP) $(srcdir)/subwrt2.good $@.wout
+ $(SEDENV) $(SED) -f $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.1out
+ $(CMP) $(srcdir)/subwrt1.good $@.1out
+ $(TR) -d \\r < $@.wout | $(CMP) $(srcdir)/subwrt2.good -
@$(RM) $@.1out $@.wout
bsd::
- $(SEDENV) sh $(srcdir)/$@.sh '$(SED)' bsd.out
- $(CMP) $(srcdir)/$@.good $@.out
+ $(SEDENV_2) sh $(srcdir)/$@.sh '$(TIME) $(SED)' $@.out
+ $(TR) -d \\r < $@.out | $(CMP) $(srcdir)/$@.good -
@$(RM) $@.out
writeout::
- $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp >$@.1out
+ $(SEDENV) $(SED) -f $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.1out
$(CMP) $(srcdir)/wrtout1.good $@.1out
- $(CMP) $(srcdir)/wrtout2.good $@.wout
+ $(TR) -d \\r < $@.wout | $(CMP) $(srcdir)/wrtout2.good -
@$(RM) $@.1out $@.wout
-readin.in2: $(srcdir)/readin.in2
- cat $(srcdir)/readin.in2 > $@
-
-readin:: readin.in2
- $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp >$@.out
+readin::
+ echo MOO | $(SEDENV) $(SED) b > $@.in2
+ $(SEDENV) $(SED) -f $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
$(CMP) $(srcdir)/$@.good $@.out
- @$(RM) $@.out
+ @$(RM) $@.out $@.in2
eval.in2: $(srcdir)/eval.inp
cat $(srcdir)/eval.inp > $@
eval:: eval.in2
- $(SEDENV) $(SED) -f $(srcdir)/$@.sed < $(srcdir)/$@.inp > $@.out
+ $(SEDENV) $(SED) -f $(srcdir)/$@.sed \
+ < $(srcdir)/$@.inp | $(TR) -d \\r > $@.out
$(CMP) $(srcdir)/$@.good $@.out
@$(RM) $@.out
binary binary2 binary3::
- $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed < $(srcdir)/binary.inp >$@.out
+ $(SEDENV) $(SED) -n -f $(srcdir)/$@.sed \
+ < $(srcdir)/binary.inp | $(TR) -d \\r > $@.out
$(CMP) $(srcdir)/binary.good $@.out
@$(RM) $@.out
@@ -89,26 +152,26 @@ binary binary2 binary3::
#
help::
- $(SED) --help | $(SED) '1s/ [^ ]* / sed /' > $@.1out
- $(SED) 2>&1 | $(SED) '1s/ [^ ]* / sed /' > $@.2out || :
+ $(SEDENV) $(SED) --help | grep E-mail > /dev/null 2>&1
+ $(SEDENV) $(SED) --help | $(SEDENV) $(SED) '1s/ [^ ]* / sed /; /^E-mail/,$$d' > $@.1out
+ $(SEDENV) $(SED) 2>&1 | $(SEDENV) $(SED) '1s/ [^ ]* / sed /' > $@.2out || :
$(CMP) $@.1out $@.2out
@$(RM) $@.1out $@.2out
version::
- $(SED) 's^@'VERSION'@^$(VERSION)^' $(srcdir)/version.gin > $@.good
- $(SEDENV) $(SED) --version > $@.out 2>&1
+ $(SEDENV) $(SED) --version 2>&1 | $(TR) -d \\r > $@.out
$(CMP) $@.good $@.out
- @$(RM) $@.good $@.out
+ @$(RM) $@.out
file::
$(SEDENV) $(SED) --file=$(srcdir)/newjis.sed \
- < $(srcdir)/newjis.inp > $@.out
+ < $(srcdir)/newjis.inp | $(TR) -d \\r > $@.out
$(CMP) $(srcdir)/newjis.good $@.out
@$(RM) $@.out
quiet::
$(SEDENV) $(SED) --quiet -f $(srcdir)/cv-vars.sed \
- < $(srcdir)/cv-vars.inp > $@.out
+ < $(srcdir)/cv-vars.inp | $(TR) -d \\r > $@.out
$(CMP) $(srcdir)/cv-vars.good $@.out
@$(RM) $@.out
diff --git a/testsuite/SPENCER.tests b/testsuite/SPENCER.tests
index b84a270..fc26e6b 100644
--- a/testsuite/SPENCER.tests
+++ b/testsuite/SPENCER.tests
@@ -536,3 +536,7 @@ a.*\b & abT ab
\B & aSbTc
\B & SaT @SaT
\B & aSTSb @TSb
+
+o$($|.) - oN
+o$($|.) - op
+o$($|.) - o o
diff --git a/testsuite/badenc.good b/testsuite/badenc.good
new file mode 100644
index 0000000..bf6b206
--- /dev/null
+++ b/testsuite/badenc.good
@@ -0,0 +1,9 @@
+abc
+def
+ghi
+jkl
+mno
+pqr
+stu
+vwx
+yz
diff --git a/testsuite/badenc.inp b/testsuite/badenc.inp
new file mode 100644
index 0000000..bf6b206
--- /dev/null
+++ b/testsuite/badenc.inp
@@ -0,0 +1,9 @@
+abc
+def
+ghi
+jkl
+mno
+pqr
+stu
+vwx
+yz
diff --git a/testsuite/badenc.sed b/testsuite/badenc.sed
new file mode 100644
index 0000000..dc80982
--- /dev/null
+++ b/testsuite/badenc.sed
@@ -0,0 +1 @@
+/.*/ { H ; g ; s/\n// ; p ; z ; x }
diff --git a/testsuite/bsd.good b/testsuite/bsd.good
index 0e21b0f..5454daa 100644
--- a/testsuite/bsd.good
+++ b/testsuite/bsd.good
@@ -1735,3 +1735,21 @@ XYeYff
XYeYYf
XYeYYY
XYeYYY
+
+=============
+Test 8.17:188
+=============
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&
+&&&&&
+&&&&&
+&&&&&
+&&&&&
+&&&&&
diff --git a/testsuite/bsd.sh b/testsuite/bsd.sh
index fecb2f4..a7dbcd2 100755
--- a/testsuite/bsd.sh
+++ b/testsuite/bsd.sh
@@ -395,6 +395,7 @@ u2/g' lines1
mark '8.16'
echo 'eeefff' | $SED -e 'p' -e 's/e/X/p' -e ':x' \
-e 's//Y/p' -e '/f/bx'
+ mark '8.17' ; $SED -e 's&.&\&&g' lines1
}
test_error()
diff --git a/testsuite/bug-regex10.c b/testsuite/bug-regex10.c
index ec5b925..1a21617 100644
--- a/testsuite/bug-regex10.c
+++ b/testsuite/bug-regex10.c
@@ -18,6 +18,10 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <locale.h>
#include <stdio.h>
#include <string.h>
diff --git a/testsuite/bug-regex11.c b/testsuite/bug-regex11.c
index e43e860..dbfa3f9 100644
--- a/testsuite/bug-regex11.c
+++ b/testsuite/bug-regex11.c
@@ -18,7 +18,9 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/bug-regex12.c b/testsuite/bug-regex12.c
index d73c810..a4db0cc 100644
--- a/testsuite/bug-regex12.c
+++ b/testsuite/bug-regex12.c
@@ -18,7 +18,9 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/bug-regex13.c b/testsuite/bug-regex13.c
index 9f57e3b..a28c5fa 100644
--- a/testsuite/bug-regex13.c
+++ b/testsuite/bug-regex13.c
@@ -18,7 +18,9 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/bug-regex14.c b/testsuite/bug-regex14.c
index 168435b..4b296d8 100644
--- a/testsuite/bug-regex14.c
+++ b/testsuite/bug-regex14.c
@@ -18,7 +18,9 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#define _REGEX_RE_COMP
#include <sys/types.h>
diff --git a/testsuite/bug-regex15.c b/testsuite/bug-regex15.c
index c7eddf7..14707e8 100644
--- a/testsuite/bug-regex15.c
+++ b/testsuite/bug-regex15.c
@@ -1,5 +1,9 @@
/* Test for memory/CPU leak in regcomp. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
diff --git a/testsuite/bug-regex16.c b/testsuite/bug-regex16.c
index 1e41ccb..7a1d3c8 100644
--- a/testsuite/bug-regex16.c
+++ b/testsuite/bug-regex16.c
@@ -1,5 +1,9 @@
/* Test re_compile_pattern error messages. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <stdio.h>
#include <string.h>
#include <regex.h>
diff --git a/testsuite/bug-regex21.c b/testsuite/bug-regex21.c
index 463e8d4..0232876 100644
--- a/testsuite/bug-regex21.c
+++ b/testsuite/bug-regex21.c
@@ -18,7 +18,9 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifdef HAVE_MCHECK_H
#include <mcheck.h>
diff --git a/testsuite/bug-regex27.c b/testsuite/bug-regex27.c
new file mode 100644
index 0000000..340ade9
--- /dev/null
+++ b/testsuite/bug-regex27.c
@@ -0,0 +1,65 @@
+/* Test REG_NEWLINE.
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2007.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <config.h>
+#include <regex.h>
+#include <stdio.h>
+#include <string.h>
+
+struct tests
+{
+ const char *regex;
+ const char *string;
+ int cflags;
+ int retval;
+} tests[] = {
+ { "a.b", "a\nb", REG_EXTENDED | REG_NEWLINE, REG_NOMATCH },
+ { "a.b", "a\nb", REG_EXTENDED, 0 },
+ { "a[^x]b", "a\nb", REG_EXTENDED | REG_NEWLINE, REG_NOMATCH },
+ { "a[^x]b", "a\nb", REG_EXTENDED, 0 }
+};
+
+int
+main (void)
+{
+ regex_t r;
+ size_t i;
+ int ret = 0;
+
+ for (i = 0; i < sizeof (tests) / sizeof (tests[i]); ++i)
+ {
+ memset (&r, 0, sizeof (r));
+ if (regcomp (&r, tests[i].regex, tests[i].cflags))
+ {
+ printf ("regcomp %lu failed\n", i);
+ ret = 1;
+ continue;
+ }
+ int rv = regexec (&r, tests[i].string, 0, NULL, 0);
+ if (rv != tests[i].retval)
+ {
+ printf ("regexec %lu unexpected value %d != %d\n",
+ i, rv, tests[i].retval);
+ ret = 1;
+ }
+ regfree (&r);
+ }
+ return ret;
+}
diff --git a/testsuite/bug-regex28.c b/testsuite/bug-regex28.c
new file mode 100644
index 0000000..f546b35
--- /dev/null
+++ b/testsuite/bug-regex28.c
@@ -0,0 +1,76 @@
+/* Test RE_HAT_LISTS_NOT_NEWLINE and RE_DOT_NEWLINE.
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2007.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <config.h>
+#include <regex.h>
+#include <stdio.h>
+#include <string.h>
+
+struct tests
+{
+ const char *regex;
+ const char *string;
+ reg_syntax_t syntax;
+ int retval;
+} tests[] = {
+#define EGREP RE_SYNTAX_EGREP
+#define EGREP_NL (RE_SYNTAX_EGREP | RE_DOT_NEWLINE) & ~RE_HAT_LISTS_NOT_NEWLINE
+ { "a.b", "a\nb", EGREP, -1 },
+ { "a.b", "a\nb", EGREP_NL, 0 },
+ { "a[^x]b", "a\nb", EGREP, -1 },
+ { "a[^x]b", "a\nb", EGREP_NL, 0 },
+ /* While \S and \W are internally handled as [^[:space:]] and [^[:alnum:]_],
+ RE_HAT_LISTS_NOT_NEWLINE did not make any difference, so ensure
+ it doesn't change. */
+ { "a\\Sb", "a\nb", EGREP, -1 },
+ { "a\\Sb", "a\nb", EGREP_NL, -1 },
+ { "a\\Wb", "a\nb", EGREP, 0 },
+ { "a\\Wb", "a\nb", EGREP_NL, 0 }
+};
+
+int
+main (void)
+{
+ struct re_pattern_buffer r;
+ size_t i;
+ int ret = 0;
+
+ for (i = 0; i < sizeof (tests) / sizeof (tests[i]); ++i)
+ {
+ re_set_syntax (tests[i].syntax);
+ memset (&r, 0, sizeof (r));
+ if (re_compile_pattern (tests[i].regex, strlen (tests[i].regex), &r))
+ {
+ printf ("re_compile_pattern %lu failed\n", i);
+ ret = 1;
+ continue;
+ }
+ size_t len = strlen (tests[i].string);
+ int rv = re_search (&r, tests[i].string, len, 0, len, NULL);
+ if (rv != tests[i].retval)
+ {
+ printf ("re_search %lu unexpected value %d != %d\n",
+ i, rv, tests[i].retval);
+ ret = 1;
+ }
+ regfree (&r);
+ }
+ return ret;
+}
diff --git a/testsuite/bug-regex7.c b/testsuite/bug-regex7.c
index a81cad7..2051985 100644
--- a/testsuite/bug-regex7.c
+++ b/testsuite/bug-regex7.c
@@ -18,6 +18,10 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/testsuite/bug-regex8.c b/testsuite/bug-regex8.c
index 8e1d557..e39ad59 100644
--- a/testsuite/bug-regex8.c
+++ b/testsuite/bug-regex8.c
@@ -18,6 +18,10 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/testsuite/bug-regex9.c b/testsuite/bug-regex9.c
index cc77d74..c0e9e18 100644
--- a/testsuite/bug-regex9.c
+++ b/testsuite/bug-regex9.c
@@ -18,7 +18,9 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/insert.good b/testsuite/insert.good
new file mode 100644
index 0000000..5b6d250
--- /dev/null
+++ b/testsuite/insert.good
@@ -0,0 +1,3 @@
+bar
+
+foo
diff --git a/testsuite/insert.inp b/testsuite/insert.inp
new file mode 100644
index 0000000..1289765
--- /dev/null
+++ b/testsuite/insert.inp
@@ -0,0 +1,2 @@
+bar
+foo
diff --git a/testsuite/insert.sed b/testsuite/insert.sed
new file mode 100644
index 0000000..5f7e611
--- /dev/null
+++ b/testsuite/insert.sed
@@ -0,0 +1 @@
+/foo/i\
diff --git a/testsuite/readin.in2 b/testsuite/readin.in2
deleted file mode 100644
index fa93196..0000000
--- a/testsuite/readin.in2
+++ /dev/null
@@ -1 +0,0 @@
-MOO
diff --git a/testsuite/runptests.c b/testsuite/runptests.c
index 985b1db..cbe61cc 100644
--- a/testsuite/runptests.c
+++ b/testsuite/runptests.c
@@ -18,6 +18,10 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <sys/types.h>
#include <regex.h>
#include <stdio.h>
@@ -117,7 +121,7 @@ main (int argc, char *argv[])
regfree (&re);
}
- printf ("\n%Zu tests, %d errors\n", cnt, errors);
+ printf ("\n%u tests, %d errors\n", (int) cnt, errors);
return errors != 0;
}
diff --git a/testsuite/runtest b/testsuite/runtest
index 0134a5d..80ce903 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -8,11 +8,16 @@ makefile="$srcdir/Makefile.tests"
test=`echo "$@"| sed 's,.*/,,'`
# As a convenience, suppress the output of make if the test passes
-if $MAKE SED="$SED" srcdir="$srcdir" -f "$makefile" $test > tmp.test 2>&1; then
- rm -f tmp.test
+if $MAKE SED="$SED" srcdir="$srcdir" -f "$makefile" $test > $test.test 2>&1; then
+ exitcode=0
+ rm -f $test.test
else
exitcode=$?
- cat tmp.test
- rm -f tmp.test
- exit $exitcode
fi
+if test -f $test.skip; then
+ exitcode=77
+else
+ test -f $test.test && cat $test.test
+fi
+rm -f $test.test $test.skip
+exit $exitcode
diff --git a/testsuite/runtests.c b/testsuite/runtests.c
index 9d74475..2f62315 100644
--- a/testsuite/runtests.c
+++ b/testsuite/runtests.c
@@ -24,6 +24,10 @@ PERFORMANCE OF THIS SOFTWARE.
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <sys/types.h>
#include <regex.h>
#include <stdio.h>
@@ -87,6 +91,9 @@ run_a_test (int id, const struct a_test * t)
}
}
+ for (x = 0; x < 10; ++x)
+ regs[x].rm_so = regs[x].rm_eo = -1;
+
err = regexec (&r, t->data, 10, regs, 0);
if (err != t->expected)
@@ -95,12 +102,13 @@ run_a_test (int id, const struct a_test * t)
printf ("pattern \"%s\" data \"%s\" wanted %d got %d\n",
t->pattern, t->data, t->expected, err);
for (x = 0; x < 10; ++x)
- printf ("reg %d == (%d, %d) %.*s\n",
- x,
- regs[x].rm_so,
- regs[x].rm_eo,
- regs[x].rm_eo - regs[x].rm_so,
- t->data + regs[x].rm_so);
+ if (regs[x].rm_so != -1)
+ printf ("reg %d == (%d, %d) %.*s\n",
+ x,
+ regs[x].rm_so,
+ regs[x].rm_eo,
+ regs[x].rm_eo - regs[x].rm_so,
+ t->data + regs[x].rm_so);
return 1;
}
puts (" OK.");
diff --git a/testsuite/tst-boost.c b/testsuite/tst-boost.c
index 117ac9b..b38a620 100644
--- a/testsuite/tst-boost.c
+++ b/testsuite/tst-boost.c
@@ -18,7 +18,9 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/tst-pcre.c b/testsuite/tst-pcre.c
index c865091..e8c6a0b 100644
--- a/testsuite/tst-pcre.c
+++ b/testsuite/tst-pcre.c
@@ -18,7 +18,9 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/tst-regex2.c b/testsuite/tst-regex2.c
index 6f487f8..1dc14ad 100644
--- a/testsuite/tst-regex2.c
+++ b/testsuite/tst-regex2.c
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include <errno.h>
#include <fcntl.h>
#include <regex.h>
diff --git a/testsuite/tst-rxspencer.c b/testsuite/tst-rxspencer.c
index be4d55a..758fc04 100644
--- a/testsuite/tst-rxspencer.c
+++ b/testsuite/tst-rxspencer.c
@@ -18,7 +18,9 @@
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA. */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <sys/types.h>
#ifdef HAVE_MCHECK_H
diff --git a/testsuite/utf8-1.good b/testsuite/utf8-1.good
new file mode 100644
index 0000000..a48dac8
--- /dev/null
+++ b/testsuite/utf8-1.good
@@ -0,0 +1 @@
+Да Д \ No newline at end of file
diff --git a/testsuite/utf8-1.inp b/testsuite/utf8-1.inp
new file mode 100644
index 0000000..6e84e16
--- /dev/null
+++ b/testsuite/utf8-1.inp
@@ -0,0 +1 @@
+да д \ No newline at end of file
diff --git a/testsuite/utf8-1.sed b/testsuite/utf8-1.sed
new file mode 100644
index 0000000..be00919
--- /dev/null
+++ b/testsuite/utf8-1.sed
@@ -0,0 +1 @@
+s/д/\U&/g
diff --git a/testsuite/utf8-2.good b/testsuite/utf8-2.good
new file mode 100644
index 0000000..a48dac8
--- /dev/null
+++ b/testsuite/utf8-2.good
@@ -0,0 +1 @@
+Да Д \ No newline at end of file
diff --git a/testsuite/utf8-2.inp b/testsuite/utf8-2.inp
new file mode 100644
index 0000000..6e84e16
--- /dev/null
+++ b/testsuite/utf8-2.inp
@@ -0,0 +1 @@
+да д \ No newline at end of file
diff --git a/testsuite/utf8-2.sed b/testsuite/utf8-2.sed
new file mode 100644
index 0000000..c921a4e
--- /dev/null
+++ b/testsuite/utf8-2.sed
@@ -0,0 +1 @@
+s/д/\u&/g
diff --git a/testsuite/utf8-3.good b/testsuite/utf8-3.good
new file mode 100644
index 0000000..4b90af9
--- /dev/null
+++ b/testsuite/utf8-3.good
@@ -0,0 +1 @@
+Да д \ No newline at end of file
diff --git a/testsuite/utf8-3.inp b/testsuite/utf8-3.inp
new file mode 100644
index 0000000..6e84e16
--- /dev/null
+++ b/testsuite/utf8-3.inp
@@ -0,0 +1 @@
+да д \ No newline at end of file
diff --git a/testsuite/utf8-3.sed b/testsuite/utf8-3.sed
new file mode 100644
index 0000000..ce90319
--- /dev/null
+++ b/testsuite/utf8-3.sed
@@ -0,0 +1 @@
+s/д.*/\u&/g
diff --git a/testsuite/utf8-4.good b/testsuite/utf8-4.good
new file mode 100644
index 0000000..760353b
--- /dev/null
+++ b/testsuite/utf8-4.good
@@ -0,0 +1 @@
+ДА Д \ No newline at end of file
diff --git a/testsuite/utf8-4.inp b/testsuite/utf8-4.inp
new file mode 100644
index 0000000..6e84e16
--- /dev/null
+++ b/testsuite/utf8-4.inp
@@ -0,0 +1 @@
+да д \ No newline at end of file
diff --git a/testsuite/utf8-4.sed b/testsuite/utf8-4.sed
new file mode 100644
index 0000000..8b8fdf4
--- /dev/null
+++ b/testsuite/utf8-4.sed
@@ -0,0 +1 @@
+s/д.*/\U&/g
diff --git a/testsuite/version.gin b/testsuite/version.gin
index 2ff9735..be02cd0 100644
--- a/testsuite/version.gin
+++ b/testsuite/version.gin
@@ -3,3 +3,8 @@ Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
to the extent permitted by law.
+
+GNU sed home page: <http://www.gnu.org/software/sed/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>.
+E-mail bug reports to: <@PACKAGE_BUGREPORT@>.
+Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.