Compare commits

..

No commits in common. "master" and "v0.24" have entirely different histories.

1121 changed files with 129488 additions and 139667 deletions

212
.gitignore vendored
View File

@ -15,7 +15,7 @@
/gettext-runtime/doc/Admin/jdom-1.0.jar
/gettext-runtime/doc/Admin/Matrix*.class
/gettext-runtime/doc/Admin/matrix.xml
/gettext-tools/machine-translation/prototype/OllamaSpit.class
/gettext-tools/misc/archive.dir.tar
# Files brought in by autopull.sh:
/gettext-tools/tree-sitter-*
@ -29,10 +29,8 @@
/build-aux/config.rpath
/build-aux/csharpcomp.sh.in
/build-aux/csharpexec.sh.in
/build-aux/dcomp.sh.in
/build-aux/git-version-gen
/build-aux/gitlog-to-changelog
/build-aux/gocomp.sh.in
/build-aux/install-reloc
/build-aux/javacomp.sh.in
/build-aux/javaexec.sh.in
@ -61,7 +59,6 @@
!/gettext-tools/gnulib-tests/Makefile.am
/gettext-tools/libgettextpo/glthread/
/gettext-tools/libgettextpo/gnulib-m4/
/gettext-tools/libgettextpo/unicase/
/gettext-tools/libgettextpo/uniconv/
/gettext-tools/libgettextpo/unictype/
/gettext-tools/libgettextpo/unilbrk/
@ -69,6 +66,7 @@
/gettext-tools/libgettextpo/uniwidth/
/gettext-tools/libgettextpo/Makefile.gnulib
/gettext-tools/libgettextpo/_Noreturn.h
/gettext-tools/libgettextpo/alignof.h
/gettext-tools/libgettextpo/alloca.in.h
/gettext-tools/libgettextpo/arg-nonnull.h
/gettext-tools/libgettextpo/asnprintf.c
@ -88,29 +86,18 @@
/gettext-tools/libgettextpo/c-strstr.h
/gettext-tools/libgettextpo/c++defs.h
/gettext-tools/libgettextpo/c32is-impl.h
/gettext-tools/libgettextpo/c32isalnum.c
/gettext-tools/libgettextpo/c32isalpha.c
/gettext-tools/libgettextpo/c32isblank.c
/gettext-tools/libgettextpo/c32iscntrl.c
/gettext-tools/libgettextpo/c32isdigit.c
/gettext-tools/libgettextpo/c32isgraph.c
/gettext-tools/libgettextpo/c32islower.c
/gettext-tools/libgettextpo/c32isprint.c
/gettext-tools/libgettextpo/c32ispunct.c
/gettext-tools/libgettextpo/c32isspace.c
/gettext-tools/libgettextpo/c32isupper.c
/gettext-tools/libgettextpo/c32isxdigit.c
/gettext-tools/libgettextpo/c32to-impl.h
/gettext-tools/libgettextpo/c32tolower.c
/gettext-tools/libgettextpo/c32width.c
/gettext-tools/libgettextpo/calloc.c
/gettext-tools/libgettextpo/cdefs.h
/gettext-tools/libgettextpo/cloexec.c
/gettext-tools/libgettextpo/cloexec.h
/gettext-tools/libgettextpo/close.c
/gettext-tools/libgettextpo/concat-filename.c
/gettext-tools/libgettextpo/concat-filename.h
/gettext-tools/libgettextpo/diffseq.h
/gettext-tools/libgettextpo/dirname-lgpl.c
/gettext-tools/libgettextpo/dirname.h
/gettext-tools/libgettextpo/dosname.h
/gettext-tools/libgettextpo/dup2.c
/gettext-tools/libgettextpo/errno.in.h
/gettext-tools/libgettextpo/error.c
@ -123,7 +110,6 @@
/gettext-tools/libgettextpo/fd-hook.h
/gettext-tools/libgettextpo/fdopen.c
/gettext-tools/libgettextpo/filename.h
/gettext-tools/libgettextpo/flexmember.h
/gettext-tools/libgettextpo/float+.h
/gettext-tools/libgettextpo/float.c
/gettext-tools/libgettextpo/float.in.h
@ -132,8 +118,6 @@
/gettext-tools/libgettextpo/free.c
/gettext-tools/libgettextpo/frexp.c
/gettext-tools/libgettextpo/frexpl.c
/gettext-tools/libgettextpo/fseterr.c
/gettext-tools/libgettextpo/fseterr.h
/gettext-tools/libgettextpo/fstat.c
/gettext-tools/libgettextpo/fstrcmp.c
/gettext-tools/libgettextpo/fstrcmp.h
@ -184,21 +168,14 @@
/gettext-tools/libgettextpo/isnanf.c
/gettext-tools/libgettextpo/isnanl-nolibm.h
/gettext-tools/libgettextpo/isnanl.c
/gettext-tools/libgettextpo/iswblank.c
/gettext-tools/libgettextpo/iswdigit.c
/gettext-tools/libgettextpo/iswpunct.c
/gettext-tools/libgettextpo/iswxdigit.c
/gettext-tools/libgettextpo/itold.c
/gettext-tools/libgettextpo/lc-charset-dispatch.c
/gettext-tools/libgettextpo/lc-charset-dispatch.h
/gettext-tools/libgettextpo/libc-config.h
/gettext-tools/libgettextpo/libunistring.valgrind
/gettext-tools/libgettextpo/limits.in.h
/gettext-tools/libgettextpo/localcharset.c
/gettext-tools/libgettextpo/localcharset.h
/gettext-tools/libgettextpo/locale.in.h
/gettext-tools/libgettextpo/localeconv.c
/gettext-tools/libgettextpo/lstat.c
/gettext-tools/libgettextpo/malloc.c
/gettext-tools/libgettextpo/malloca.c
/gettext-tools/libgettextpo/malloca.h
@ -206,16 +183,13 @@
/gettext-tools/libgettextpo/markup.h
/gettext-tools/libgettextpo/math.c
/gettext-tools/libgettextpo/math.in.h
/gettext-tools/libgettextpo/mbchar.c
/gettext-tools/libgettextpo/mbchar.h
/gettext-tools/libgettextpo/mbiterf.c
/gettext-tools/libgettextpo/mbiterf.h
/gettext-tools/libgettextpo/mbrtoc32.c
/gettext-tools/libgettextpo/mbrtowc.c
/gettext-tools/libgettextpo/mbrtowc-impl.h
/gettext-tools/libgettextpo/mbrtowc-impl-utf8.h
/gettext-tools/libgettextpo/mbsinit.c
/gettext-tools/libgettextpo/mbsnlen.c
/gettext-tools/libgettextpo/mbswidth.c
/gettext-tools/libgettextpo/mbswidth.h
/gettext-tools/libgettextpo/mbszero.c
/gettext-tools/libgettextpo/mbtowc-lock.c
/gettext-tools/libgettextpo/mbtowc-lock.h
@ -230,8 +204,6 @@
/gettext-tools/libgettextpo/msvc-inval.h
/gettext-tools/libgettextpo/msvc-nothrow.c
/gettext-tools/libgettextpo/msvc-nothrow.h
/gettext-tools/libgettextpo/next-prime.c
/gettext-tools/libgettextpo/next-prime.h
/gettext-tools/libgettextpo/obstack.c
/gettext-tools/libgettextpo/obstack.in.h
/gettext-tools/libgettextpo/open.c
@ -277,8 +249,6 @@
/gettext-tools/libgettextpo/stdckdint.in.h
/gettext-tools/libgettextpo/stddef.in.h
/gettext-tools/libgettextpo/stdint.in.h
/gettext-tools/libgettextpo/stdio-consolesafe.c
/gettext-tools/libgettextpo/stdio-impl.h
/gettext-tools/libgettextpo/stdio-read.c
/gettext-tools/libgettextpo/stdio-write.c
/gettext-tools/libgettextpo/stdio.in.h
@ -304,7 +274,6 @@
/gettext-tools/libgettextpo/string-desc-contains.c
/gettext-tools/libgettextpo/string-desc.c
/gettext-tools/libgettextpo/string-desc.h
/gettext-tools/libgettextpo/string.c
/gettext-tools/libgettextpo/string.in.h
/gettext-tools/libgettextpo/strnlen.c
/gettext-tools/libgettextpo/strstr.c
@ -314,11 +283,9 @@
/gettext-tools/libgettextpo/textstyle.in.h
/gettext-tools/libgettextpo/time.in.h
/gettext-tools/libgettextpo/uchar.in.h
/gettext-tools/libgettextpo/unicase.in.h
/gettext-tools/libgettextpo/uniconv.in.h
/gettext-tools/libgettextpo/unictype.in.h
/gettext-tools/libgettextpo/unilbrk.in.h
/gettext-tools/libgettextpo/uninorm.in.h
/gettext-tools/libgettextpo/unistd.c
/gettext-tools/libgettextpo/unistd.in.h
/gettext-tools/libgettextpo/unistr.in.h
@ -363,9 +330,65 @@
/gettext-tools/libgettextpo/xstriconv.h
/gettext-tools/libgettextpo/xvasprintf.c
/gettext-tools/libgettextpo/xvasprintf.h
/gettext-tools/libgrep/glthread/
/gettext-tools/libgrep/gnulib-m4/
/gettext-tools/libgrep/gnulib-lib/
!/gettext-tools/libgrep/gnulib-lib/Makefile.am
/gettext-tools/libgrep/malloc/
/gettext-tools/libgrep/Makefile.gnulib
/gettext-tools/libgrep/_Noreturn.h
/gettext-tools/libgrep/arg-nonnull.h
/gettext-tools/libgrep/attribute.h
/gettext-tools/libgrep/btowc.c
/gettext-tools/libgrep/c++defs.h
/gettext-tools/libgrep/cdefs.h
/gettext-tools/libgrep/dynarray.h
/gettext-tools/libgrep/fcntl.in.h
/gettext-tools/libgrep/intprops-internal.h
/gettext-tools/libgrep/intprops.h
/gettext-tools/libgrep/inttypes.in.h
/gettext-tools/libgrep/iswblank.c
/gettext-tools/libgrep/iswctype-impl.h
/gettext-tools/libgrep/iswctype.c
/gettext-tools/libgrep/iswdigit.c
/gettext-tools/libgrep/iswpunct.c
/gettext-tools/libgrep/iswxdigit.c
/gettext-tools/libgrep/langinfo.in.h
/gettext-tools/libgrep/libc-config.h
/gettext-tools/libgrep/limits.in.h
/gettext-tools/libgrep/locale.in.h
/gettext-tools/libgrep/localeconv.c
/gettext-tools/libgrep/malloc.c
/gettext-tools/libgrep/mbrlen.c
/gettext-tools/libgrep/mbszero.c
/gettext-tools/libgrep/mbtowc-impl.h
/gettext-tools/libgrep/mbtowc.c
/gettext-tools/libgrep/nl_langinfo.c
/gettext-tools/libgrep/nl_langinfo-lock.c
/gettext-tools/libgrep/pthread.in.h
/gettext-tools/libgrep/pthread-once.c
/gettext-tools/libgrep/regcomp.c
/gettext-tools/libgrep/regex.c
/gettext-tools/libgrep/regex.h
/gettext-tools/libgrep/regex_internal.c
/gettext-tools/libgrep/regex_internal.h
/gettext-tools/libgrep/regexec.c
/gettext-tools/libgrep/sched.in.h
/gettext-tools/libgrep/stdckdint.in.h
/gettext-tools/libgrep/stddef.in.h
/gettext-tools/libgrep/stdint.in.h
/gettext-tools/libgrep/stdlib.c
/gettext-tools/libgrep/stdlib.in.h
/gettext-tools/libgrep/sys_types.in.h
/gettext-tools/libgrep/time.in.h
/gettext-tools/libgrep/unistd.c
/gettext-tools/libgrep/unistd.in.h
/gettext-tools/libgrep/warn-on-use.h
/gettext-tools/libgrep/wchar.in.h
/gettext-tools/libgrep/wcrtomb.c
/gettext-tools/libgrep/wctype-h.c
/gettext-tools/libgrep/wctype-impl.h
/gettext-tools/libgrep/wctype.c
/gettext-tools/libgrep/wctype.in.h
/gettext-tools/libgrep/windows-initguard.h
/gettext-tools/man/x-to-1.in
/gettext-tools/tests/gnulib-m4/
/gettext-tools/tests/gnulib-lib/
@ -393,15 +416,7 @@
/gettext-runtime/libasprintf/ChangeLog
/gettext-tools/ChangeLog
/gettext-tools/examples/ChangeLog
# Files copied:
/gettext-runtime/po/Makefile.in.in
/gettext-runtime/po/Rules-quot
/gettext-runtime/po/boldquot.sed
/gettext-runtime/po/en@boldquot.header
/gettext-runtime/po/en@quot.header
/gettext-runtime/po/insert-header.sed
/gettext-runtime/po/quot.sed
/gettext-runtime/po/remove-potcdate.sed
# Files copied from gettext-runtime:
/gettext-tools/ABOUT-NLS
/gettext-tools/po/Makefile.in.in
/gettext-tools/po/Rules-quot
@ -411,7 +426,6 @@
/gettext-tools/po/insert-header.sed
/gettext-tools/po/quot.sed
/gettext-tools/po/remove-potcdate.sed
/gettext-tools/examples/po/remove-potcdate.sed
# Files generated by the autotools:
/aclocal.m4
@ -428,8 +442,6 @@
/gettext-runtime/intl/Makefile.in
/gettext-runtime/intl-csharp/Makefile.in
/gettext-runtime/intl-java/Makefile.in
/gettext-runtime/intl-d/Makefile.in
/gettext-runtime/intl-modula2/Makefile.in
/gettext-runtime/libasprintf/aclocal.m4
/gettext-runtime/libasprintf/configure
/gettext-runtime/libasprintf/config.h.in
@ -438,12 +450,10 @@
/gettext-runtime/man/Makefile.in
/gettext-runtime/src/Makefile.in
/gettext-runtime/tests/Makefile.in
/gettext-runtime/install-tests/Makefile.in
/gettext-tools/aclocal.m4
/gettext-tools/configure
/gettext-tools/config.h.in
/gettext-tools/Makefile.in
/gettext-tools/autotools/Makefile.in
/gettext-tools/doc/Makefile.in
/gettext-tools/emacs/Makefile.in
/gettext-tools/examples/aclocal.m4
@ -461,8 +471,6 @@
/gettext-tools/styles/Makefile.in
/gettext-tools/system-tests/Makefile.in
/gettext-tools/tests/Makefile.in
/gettext-tools/wizard/Makefile.in
/gettext-tools/install-tests/Makefile.in
/gnulib-local/Makefile.in
# Files generated by "make" and even kept by "make maintainer-clean":
@ -489,10 +497,6 @@
/gettext-runtime/man/gettext.1.html.in
/gettext-runtime/man/ngettext.1.in
/gettext-runtime/man/ngettext.1.html.in
/gettext-runtime/man/printf_gettext.1.in
/gettext-runtime/man/printf_gettext.1.html.in
/gettext-runtime/man/printf_ngettext.1.in
/gettext-runtime/man/printf_ngettext.1.html.in
/gettext-runtime/man/bind_textdomain_codeset.3
/gettext-runtime/man/bind_textdomain_codeset.3.html
/gettext-runtime/man/bindtextdomain.3
@ -505,7 +509,6 @@
/gettext-runtime/man/textdomain.3.html
/gettext-runtime/po/gettext-runtime.pot
/gettext-runtime/po/stamp-po
/gettext-tools/autotools/archive.*.tar.*
/gettext-tools/doc/version.texi
/gettext-tools/doc/stamp-vti
/gettext-tools/doc/gettext.info
@ -545,20 +548,15 @@
/gettext-tools/man/msginit.1.html
/gettext-tools/man/msgmerge.1
/gettext-tools/man/msgmerge.1.html
/gettext-tools/man/msgpre.1
/gettext-tools/man/msgpre.1.html
/gettext-tools/man/msgunfmt.1
/gettext-tools/man/msgunfmt.1.html
/gettext-tools/man/msguniq.1
/gettext-tools/man/msguniq.1.html
/gettext-tools/man/po-fetch.1
/gettext-tools/man/po-fetch.1.html
/gettext-tools/man/recode-sr-latin.1
/gettext-tools/man/recode-sr-latin.1.html
/gettext-tools/man/spit.1
/gettext-tools/man/spit.1.html
/gettext-tools/man/xgettext.1
/gettext-tools/man/xgettext.1.html
/gettext-tools/misc/archive.*.tar.*
/gettext-tools/po/gettext-tools.pot
/gettext-tools/po/stamp-po
# Files generated by "make", using gperf:
@ -624,7 +622,6 @@ autom4te.cache/
/gettext-runtime/Makefile
/gettext-runtime/config.h
/gettext-runtime/csharpcomp.sh
/gettext-runtime/dcomp.sh
/gettext-runtime/javacomp.sh
/gettext-runtime/libtool
/gettext-runtime/stamp-h1
@ -636,9 +633,6 @@ autom4te.cache/
/gettext-runtime/intl/stamp-h1
/gettext-runtime/intl-csharp/Makefile
/gettext-runtime/intl-java/Makefile
/gettext-runtime/intl-d/Makefile
/gettext-runtime/intl-modula2/Makefile
/gettext-runtime/intl-modula2/Libintl.def
/gettext-runtime/libasprintf/Makefile
/gettext-runtime/libasprintf/config.h
/gettext-runtime/libasprintf/libtool
@ -652,21 +646,14 @@ autom4te.cache/
# (see DISTCLEANFILES in Makefile.am):
/gettext-runtime/src/gettext.sh
/gettext-runtime/tests/Makefile
/gettext-runtime/install-tests/Makefile
/gettext-tools/Makefile
/gettext-tools/config.h
/gettext-tools/csharpcomp.sh
/gettext-tools/csharpexec.sh
/gettext-tools/dcomp.sh
/gettext-tools/gocomp.sh
/gettext-tools/javacomp.sh
/gettext-tools/javaexec.sh
/gettext-tools/libtool
/gettext-tools/stamp-h1
/gettext-tools/autotools/Makefile
# (see DISTCLEANFILES in Makefile.am):
/gettext-tools/autotools/autopoint
/gettext-tools/autotools/convert-archive
/gettext-tools/build-aux/xml-validate-10
/gettext-tools/build-aux/xml-validate-11
/gettext-tools/doc/Makefile
@ -682,20 +669,19 @@ autom4te.cache/
/gettext-tools/man/Makefile
/gettext-tools/man/x-to-1
/gettext-tools/misc/Makefile
/gettext-tools/misc/po-fetch
# (see DISTCLEANFILES in Makefile.am):
/gettext-tools/misc/autopoint
/gettext-tools/misc/convert-archive
/gettext-tools/misc/gettextize
/gettext-tools/po/Makefile.in
/gettext-tools/po/Makefile
/gettext-tools/projects/Makefile
/gettext-tools/src/Makefile
/gettext-tools/src/spit.py
/gettext-tools/src/user-email
/gettext-tools/styles/Makefile
/gettext-tools/system-tests/Makefile
/gettext-tools/tests/Makefile
/gettext-tools/tests/init-env
/gettext-tools/wizard/Makefile
/gettext-tools/wizard/gettextize
/gettext-tools/install-tests/Makefile
/gnulib-local/Makefile
# Directories generated by "make" and not distributed
@ -710,7 +696,6 @@ autom4te.cache/
# Directories generated by "make" and erased by "make clean":
/gettext-runtime/intl/**/.libs/
/gettext-runtime/intl-modula2/**/.libs/
/gettext-runtime/libasprintf/**/.libs/
/gettext-tools/libgettextpo/**/.libs/
/gettext-tools/src/**/.libs/
@ -724,37 +709,21 @@ autom4te.cache/
/gettext-runtime/intl-csharp/GNU.Gettext.pdb
/gettext-runtime/intl-java/**/*.class
/gettext-runtime/intl-java/libintl.jar
/gettext-runtime/intl-d/libintl_d.a
/gettext-runtime/intl-modula2/libintl_m2.la
/gettext-runtime/libasprintf/libasprintf.la
/gettext-runtime/man/gettext.1
/gettext-runtime/man/gettext.1.html
/gettext-runtime/man/ngettext.1
/gettext-runtime/man/ngettext.1.html
/gettext-runtime/man/printf_gettext.1
/gettext-runtime/man/printf_gettext.1.html
/gettext-runtime/man/printf_ngettext.1
/gettext-runtime/man/printf_ngettext.1.html
/gettext-runtime/src/libgrtsrc.a
/gettext-tools/libgrep/libgrep.a
/gettext-tools/src/**/*.class
/gettext-tools/src/gettext.jar
/gettext-tools/src/libgettextsrc.la
/gettext-tools/src/libxgettextts1.a
/gettext-tools/src/libxgettextts2.a
/gettext-tools/src/libxgettextts3.a
/gettext-tools/src/libxgettextts4.a
/gettext-tools/src/libxgettextts5.a
/gettext-tools/src/libxgettextx.a
/gettext-tools/src/msgfmt.net.exe
/gettext-tools/src/msgfmt.net.exe.mdb
/gettext-tools/src/msgfmt.net.pdb
/gettext-tools/src/msgunfmt.net.exe
/gettext-tools/src/msgunfmt.net.exe.mdb
/gettext-tools/src/msgunfmt.net.pdb
/gettext-tools/libgettextpo/gettext-po.h
/gettext-tools/libgettextpo/libgnu.la
/gettext-tools/libgettextpo/libgettextpo.la
# Executables generated by "make":
/gettext-runtime/src/envsubst
/gettext-runtime/src/envsubst.exe
@ -762,10 +731,11 @@ autom4te.cache/
/gettext-runtime/src/gettext.exe
/gettext-runtime/src/ngettext
/gettext-runtime/src/ngettext.exe
/gettext-runtime/src/printf_gettext
/gettext-runtime/src/printf_gettext.exe
/gettext-runtime/src/printf_ngettext
/gettext-runtime/src/printf_ngettext.exe
/gettext-runtime/tests/test-lock
/gettext-runtime/tests/test-lock.exe
/gettext-tools/libgettextpo/gettext-po.h
/gettext-tools/libgettextpo/libgnu.la
/gettext-tools/libgettextpo/libgettextpo.la
/gettext-tools/src/cldr-plurals
/gettext-tools/src/cldr-plurals.exe
/gettext-tools/src/hostname
@ -794,16 +764,12 @@ autom4te.cache/
/gettext-tools/src/msginit.exe
/gettext-tools/src/msgmerge
/gettext-tools/src/msgmerge.exe
/gettext-tools/src/msgpre
/gettext-tools/src/msgpre.exe
/gettext-tools/src/msgunfmt
/gettext-tools/src/msgunfmt.exe
/gettext-tools/src/msguniq
/gettext-tools/src/msguniq.exe
/gettext-tools/src/recode-sr-latin
/gettext-tools/src/recode-sr-latin.exe
/gettext-tools/src/spit
/gettext-tools/src/spit.exe
/gettext-tools/src/urlget
/gettext-tools/src/urlget.exe
/gettext-tools/src/xgettext
@ -902,6 +868,7 @@ core
/gettext-tools/tests/*.trs
# Other.
/gettext-runtime/intl/libgnuintl.h
/gettext-runtime/intl/localename-table.h
/gettext-runtime/libasprintf/autosprintf.h
/gettext-runtime/po/??@*.insert-header
/gettext-runtime/src/gettext.res
@ -925,7 +892,6 @@ core
/gettext-tools/doc/gettext.pgs
/gettext-tools/doc/gettext.vr
/gettext-tools/doc/gettext.vrs
/gettext-tools/examples/po/*.gpo
/gettext-tools/libgettextpo/config.h
/gettext-tools/libgettextpo/alloca.h
/gettext-tools/libgettextpo/assert.h
@ -943,6 +909,7 @@ core
/gettext-tools/libgettextpo/sched.h
/gettext-tools/libgettextpo/signal.h
/gettext-tools/libgettextpo/stdarg.h
/gettext-tools/libgettextpo/stdbool.h
/gettext-tools/libgettextpo/stdckdint.h
/gettext-tools/libgettextpo/stddef.h
/gettext-tools/libgettextpo/stdint.h
@ -950,24 +917,43 @@ core
/gettext-tools/libgettextpo/stdlib.h
/gettext-tools/libgettextpo/string.h
/gettext-tools/libgettextpo/sys/stat.h
/gettext-tools/libgettextpo/sys/time.h
/gettext-tools/libgettextpo/sys/types.h
/gettext-tools/libgettextpo/textstyle.h
/gettext-tools/libgettextpo/time.h
/gettext-tools/libgettextpo/uchar.h
/gettext-tools/libgettextpo/unicase.h
/gettext-tools/libgettextpo/uniconv.h
/gettext-tools/libgettextpo/unictype.h
/gettext-tools/libgettextpo/unilbrk.h
/gettext-tools/libgettextpo/uninorm.h
/gettext-tools/libgettextpo/unistd.h
/gettext-tools/libgettextpo/unistr.h
/gettext-tools/libgettextpo/unitypes.h
/gettext-tools/libgettextpo/uniwidth.h
/gettext-tools/libgettextpo/wchar.h
/gettext-tools/libgettextpo/wctype.h
/gettext-tools/libgrep/fcntl.h
/gettext-tools/libgrep/inttypes.h
/gettext-tools/libgrep/langinfo.h
/gettext-tools/libgrep/limits.h
/gettext-tools/libgrep/locale.h
/gettext-tools/libgrep/pthread.h
/gettext-tools/libgrep/sched.h
/gettext-tools/libgrep/stdbool.h
/gettext-tools/libgrep/stdckdint.h
/gettext-tools/libgrep/stddef.h
/gettext-tools/libgrep/stdint.h
/gettext-tools/libgrep/stdlib.h
/gettext-tools/libgrep/time.h
/gettext-tools/libgrep/unistd.h
/gettext-tools/libgrep/wchar.h
/gettext-tools/libgrep/wctype.h
/gettext-tools/libgrep/sys/types.h
/gettext-tools/po/??@*.insert-header
/gettext-tools/src/gettext.res
/gettext-tools/src/libxgettextts1.a
/gettext-tools/src/libxgettextts2.a
/gettext-tools/src/textstyle.h
/gettext-tools/src/textstyle/stdbool.h
/gettext-tools/src/textstyle/version.h
/gettext-tools/src/textstyle/woe32dll.h

2
.gitmodules vendored
View File

@ -1,3 +1,3 @@
[submodule "gnulib"]
path = gnulib
url = git://git.savannah.gnu.org/gnulib.git
url = git://git.sv.gnu.org/gnulib.git

View File

@ -91,6 +91,3 @@ Assigns past and future changes.
GETTEXT John Darrington
Assigns past and future changes.
(No contributions so far.)
GETTEXT Michele Locati
Assigns past and future changes.

View File

@ -75,13 +75,13 @@ We assume that the following environment variables are set:
run.sh in gettext-runtime/doc/Admin/. Copy resulting matrix.texi
into gettext-runtime/doc/. Update the STATUS date in nls.texi.
- gettext-tools/wizard/po-templates/traditional/Makefile.in.in
- gettext-runtime/po/Makefile.in.in
Update Origin version.
- gettext-runtime/m4/*.m4
Update version at the second line.
Update version at the first line.
- gettext-runtime/intl/libgnuintl.in.h
@ -121,11 +121,9 @@ We assume that the following environment variables are set:
gettext-runtime/src/gettext.c
gettext-runtime/src/gettext.sh.in
gettext-runtime/src/ngettext.c
gettext-runtime/src/printf_gettext.c
gettext-runtime/src/printf_ngettext.c
gettext-tools/wizard/gettextize.in
gettext-tools/autotools/autopoint.in
gettext-tools/autotools/convert-archive.in
gettext-tools/misc/autopoint.in
gettext-tools/misc/convert-archive.in
gettext-tools/misc/gettextize.in
gettext-tools/src/cldr-plurals.c
gettext-tools/src/hostname.c
gettext-tools/src/msgattrib.c
@ -140,12 +138,9 @@ We assume that the following environment variables are set:
gettext-tools/src/msggrep.c
gettext-tools/src/msginit.c
gettext-tools/src/msgmerge.c
gettext-tools/src/msgpre.c
gettext-tools/src/msgunfmt.c
gettext-tools/src/msguniq.c
gettext-tools/src/recode-sr-latin.c
gettext-tools/src/spit.c
gettext-tools/src/spit.py.in
gettext-tools/src/urlget.c
gettext-tools/src/xgettext.c
@ -164,17 +159,44 @@ We assume that the following environment variables are set:
Update ARCHIVE_VERSION.
- gettext-tools/autotools/autopoint.in
- gettext-tools/misc/autopoint.in
Update the 'case' statement around line 410 to include the latest release.
Update the 'case' statement around line 395 to include the latest release.
** If you got any translation updates, update translations:
(cd gettext-runtime/po && ./fetch-po)
(cd gettext-tools/po && ./fetch-po)
(cd gettext-tools/examples/po && ./fetch-po)
wget --mirror --level=1 -nd -nv -A.po -P gettext-runtime/po/new \
https://translationproject.org/latest/gettext-runtime/
Optionally merge:
cd gettext-runtime/po
make update-po
cd new
for f in *.po; do msgmerge --update --lang=${f%.po} --previous $f ../gettext-runtime.pot; done
mv *.po ../
cd ..; rm -rf new
Commit the changes.
wget --mirror --level=1 -nd -nv -A.po -P gettext-tools/po/new \
https://translationproject.org/latest/gettext-tools/
Optionally merge:
cd gettext-tools/po
make update-po
cd new
for f in *.po; do msgmerge --update --lang=${f%.po} --previous $f ../gettext-tools.pot; done
mv *.po ../
cd ..; rm -rf new
wget --mirror --level=1 -nd -nv -A.po -P gettext-tools/examples/po/new \
https://translationproject.org/latest/gettext-examples/
Optionally merge:
cd gettext-tools/examples/po
make update-po
cd new
for f in *.po; do msgmerge --update --lang=${f%.po} --previous $f ../gettext-examples.pot; done
mv *.po ../
cd ..; rm -rf new
Adjust LINGUAS files if any of the languages has been added or
removed since the last release. Commit the changes.
** Create a release:
@ -195,7 +217,7 @@ We assume that the following environment variables are set:
Make 'autopoint' work in the new release:
(cd gettext-tools/autotools
(cd gettext-tools/misc
./add-to-archive ../../gettext-$CURRENT_VERSION.tar.gz)
Update the examples:
@ -234,8 +256,6 @@ We assume that the following environment variables are set:
Then check the build infrastructure of the examples by running
$ cd gettext-tools/examples
$ ./check-examples
(This currently does not work with GCC 15 for the hello-go* examples,
due to <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119098>.)
Finally really make the release tarball:
@ -256,6 +276,16 @@ We assume that the following environment variables are set:
gnulib/build-aux/gnupload --to ftp.gnu.org:gettext \
gettext-$CURRENT_VERSION.tar.{gz,xz,lz}
** Upload autopoint archive to alpha.gnu.org:
This is needed to compile git master after the release (as
autopull.sh fetches the archive).
xz -c -e < gettext-tools/misc/archive.dir.tar > archive.dir-$CURRENT_VERSION.tar.xz
gnulib/build-aux/gnupload \
--to alpha.gnu.org:gettext \
--symlink-regex archive.dir-$CURRENT_VERSION.tar.xz
** Finally:
rm -f .tarball-version

View File

@ -37,14 +37,15 @@ The following packages should be installed before GNU gettext is installed
* libxml2
+ Recommended.
Needed for 'xgettext' and 'msgfmt', so that it can parse XML files.
Also needed for the --color option of the various programs.
Needed for 'xgettext' and 'msgfmt', so that it can parse XML
files. Also needed for the --color option of the various
programs.
If not present, a subset of libxml2 (included in this package) will be
compiled into libgettextlib.
+ Homepage:
https://gitlab.gnome.org/GNOME/libxml2/-/wikis/home
http://xmlsoft.org/
+ Download:
https://download.gnome.org/sources/libxml2/
ftp://xmlsoft.org/libxml2/
+ Pre-built package name:
- On Debian and Debian-based systems: libxml2-dev,
- On Red Hat distributions: libxml2-devel.
@ -52,36 +53,6 @@ The following packages should be installed before GNU gettext is installed
+ If it is installed in a nonstandard directory, pass the option
--with-libxml2-prefix=DIR to 'configure'.
* libjson-c 0.13 or newer
+ Recommended.
Needed for machine translation.
If not present, 'spit' will be a Python script instead of an executable.
+ Homepage:
https://github.com/json-c/json-c/wiki
+ Download:
https://s3.amazonaws.com/json-c_releases/releases/index.html
+ Pre-built package name:
- On Debian and Debian-based systems: libjson-c-dev,
- On Red Hat distributions: json-c-devel.
- Other: https://repology.org/project/json-c/versions
+ When building with the MS Visual C/C++ tool chain, version 0.19 or newer
is required.
* libcurl
+ Recommended.
Needed for machine translation.
If not present, 'spit' will be a Python script instead of an executable.
+ Homepage:
https://curl.se/libcurl/
+ Download:
https://curl.se/download.html
+ Pre-built package name:
- On Debian and Debian-based systems: libcurl4-gnutls-dev or libcurl4-openssl-dev,
- On Red Hat distributions: libcurl-devel.
- Other: https://repology.org/project/curl/versions
+ When building against a static libcurl on Windows, you need to include
"-DCURL_STATICLIB" in the CPPFLAGS.
* libacl
+ Recommended on Linux systems.
Needed so that the creation of backup files respects the access control
@ -95,18 +66,18 @@ The following packages should be installed before GNU gettext is installed
- On Red Hat distributions: acl, libacl-devel.
- Other: https://repology.org/project/acl/versions
* libattr
+ Recommended on Linux systems.
Needed so that the creation of backup files respects the access control
lists (ACLs) set on the original files, with fewer system calls.
+ Homepage:
https://savannah.nongnu.org/projects/attr/
+ Download:
https://download.savannah.nongnu.org/releases/attr/
+ Pre-built package name:
- On Debian and Debian-based systems: libattr1-dev,
- On Red Hat distributions: libattr-devel.
- Other: https://repology.org/project/attr/versions
* libattr
+ Recommended on Linux systems.
Needed so that the creation of backup files respects the access control
lists (ACLs) set on the original files, with fewer system calls.
+ Homepage:
https://savannah.nongnu.org/projects/attr/
+ Download:
https://download.savannah.nongnu.org/releases/attr/
+ Pre-built package name:
- On Debian and Debian-based systems: libattr1-dev,
- On Red Hat distributions: libattr-devel.
- Other: https://repology.org/project/attr/versions
* A Java runtime and compiler (e.g. OpenJDK, AdoptOpenJDK, or kaffe).
+ Recommended.
@ -150,49 +121,6 @@ The following packages should be installed before GNU gettext is installed
+ If more than one C# is installed, pass the option --enable-csharp=IMPL
to 'configure', to disambiguate.
* A D compiler and runtime (e.g. gdc, ldc2, or dmd).
+ Recommended.
Needed for building libintl_d.a.
o gdc:
+ Homepage:
https://wiki.dlang.org/GDC
https://gcc.gnu.org/
+ Pre-built package name:
- On Debian and Debian-based systems: gdc,
- On Red Hat distributions: gcc-gdc.
- Other: --
o ldc2:
+ Homepage:
https://wiki.dlang.org/LDC
+ Download:
https://github.com/ldc-developers/ldc/tags
+ Pre-built package name:
- On Debian and Debian-based systems: ldc,
- On Red Hat distributions: ldc.
- Other: https://repology.org/project/ldc/versions
o dmd:
+ Homepage:
https://wiki.dlang.org/DMD
+ Download:
https://dlang.org/download.html
+ Pre-built package name:
- On Debian and Debian-based systems: --,
- On Red Hat distributions: --.
- Other: https://repology.org/project/dmd/versions
+ If more than one D compiler is installed, set the environment variable
DC, to disambiguate.
* The GNU Modula-2 compiler and runtime.
+ Recommended.
Needed for building libintl_m2.so.
+ Homepage:
https://www.nongnu.org/gm2/about.html
https://gcc.gnu.org/
+ Pre-built package name:
- On Debian and Debian-based systems: gm2,
- On Red Hat distributions: gcc-gm2, libgm2.
- Other: https://repology.org/project/gcc-gm2/versions
* git 1.6 or newer
+ Recommended.
Needed by the 'autopoint' program, if not configured with --without-git
@ -295,29 +223,6 @@ The following packages should be installed when GNU gettext is installed
+ Download:
https://ftp.gnu.org/gnu/gnulib/gnulib-l10n-*
* Python 3.7 or newer.
+ Recommended if GNU Gettext was built without libjson-c or without libcurl.
Needed for machine translation.
+ Homepage:
https://www.python.org/
+ Download:
https://www.python.org/downloads/
+ Pre-built package name:
- On Debian and Debian-based systems: python3,
- On Red Hat distributions: python3.
- Other: https://repology.org/project/python/versions
* The Python module 'requests'.
+ Recommended if GNU Gettext was built without libjson-c or without libcurl.
Needed for machine translation.
+ Homepage:
https://pypi.org/project/requests/
+ Download:
https://pypi.org/project/requests/#files
+ Pre-built package name:
- On Debian and Debian-based systems: python3-requests,
- On Red Hat distributions: python-requests.
- Other: https://repology.org/project/python%3Arequests/versions
The following should be installed when GNU gettext is built, but are not
needed later, once it is installed (build dependencies, but not runtime
@ -325,7 +230,7 @@ dependencies):
* A C runtime, compiler, linker, etc.
+ Mandatory.
Either the platform's native 'cc', or GCC 4.4 or newer.
Either the platform's native 'cc', or GCC 3.1 or newer.
+ GCC Homepage:
https://gcc.gnu.org/
+ Download:

107
HACKING
View File

@ -163,12 +163,6 @@ are skipped. To this effect, you need to install also:
- On Debian and Debian-based systems: gobjc,
- On Red Hat distributions: gcc-objc.
- Other: https://repology.org/project/gcc/versions
* The Boost C++ library
+ Homepage: https://www.boost.org/
+ Pre-built package name:
- On Debian and Debian-based systems: libboost1.83-dev,
- On Red Hat distributions: boost.
- Other: https://repology.org/project/boost/versions
* Python
+ Homepage: https://www.python.org/
@ -240,33 +234,6 @@ are skipped. To this effect, you need to install also:
- Other: https://repology.org/project/rust/versions
https://repology.org/project/cargo/versions
* Go
Either the golang Go implementation or the GCC Go implementation.
o golang Go implementation
+ Recommended where available.
+ Homepage: https://go.dev/
+ Documentation: https://go.dev/doc/
+ Pre-built package name:
- On Debian and Debian-based systems: golang-go,
- On Red Hat distributions: golang.
- Other: https://repology.org/project/go/versions
o GCC Go implementation
+ Recommended on those platforms where the golang Go implementation
is not available. This includes in particular:
- Linux/alpha, Linux/hppa, Linux/m68k, Linux/sparc, Linux/powerpc (32-bit)
- GNU/Hurd
- Solaris/sparc
- Haiku
+ Homepage: https://gcc.gnu.org/
+ Documentation:
- https://go.dev/doc/install/gccgo
- https://gcc.gnu.org/onlinedocs/gccgo/index.html
+ Pre-built package name:
- On Debian and Debian-based systems: gccgo,
- On Red Hat distributions: gcc-go.
- Other: https://repology.org/project/gcc/versions
https://repology.org/project/gccgo/versions
* Ruby
+ Homepage: https://www.ruby-lang.org/en/
+ Pre-built package name:
@ -316,19 +283,6 @@ are skipped. To this effect, you need to install also:
- On Red Hat distributions: --.
- Other: https://repology.org/project/fpc/versions
* OCaml
+ Homepage: https://ocaml.org/
+ Pre-built package name:
- On Debian and Debian-based systems: ocaml,
- On Red Hat distributions: ocaml.
- Other: https://repology.org/project/ocaml/versions
* The OCaml package manager
+ Homepage: https://opam.ocaml.org/
+ Pre-built package name:
- On Debian and Debian-based systems: opam,
- On Red Hat distributions: --.
- Other: https://repology.org/project/opam/versions
* GNU smalltalk
+ Homepage: http://smalltalk.gnu.org/
+ Pre-built package name:
@ -461,63 +415,6 @@ build results here:
https://gitlab.com/gnu-gettext/ci-distcheck/-/jobs?scope=finished
Coding Style
============
For C source code:
* Follow the portability guidelines
https://www.gnu.org/software/gnulib/manual/html_node/Portability-guidelines.html
* Use mixed declarations and statements, as appropriate. (This is supported
since C99.)
* Note: You can't put a label before a declaration, such as in
retry:
int foo = ...;
This is supported only in C23 or newer. Instead, add an empty statement:
retry: ;
int foo = ...;
Similarly, you can't put a declaration immediately after a case label, such
as in
case 1:
int foo = ...;
...
break;
Again, this is supported only in C23 or newer. Instead, use a sub-block:
case 1:
{
int foo = ...;
...
}
break;
* In function definitions and blocks, the pre-C99 style "declare all variables
upfront" is discouraged.
Instead, the following style elements are encouraged (for local non-static
variables):
- Move the declaration of a variable to its initialization.
- Reduce the scope of variables:
. If a variable is only used in a sub-block, declare it in that sub-block.
. If a variable is only used in several sub-blocks and has a separate
initialization in each of the sub-blocks, declare it in each of these
sub-blocks. It's actually several independent variables.
. If a variable is only used in a small part of a function definition or
block (say, 1/3 of it or less), you may surround that part (including
the variable's initialization) with braces, so that it becomes clear
that the variable is not used in the rest of the function / block.
- Usually, try to declare and initialize variables right when they are
needed for the first time, not several computation steps before.
The rationale is:
- It follows the general principle "Put related things close together."
- A function with 3 blocks that each has 4 variables is easier to
understand than a function that has 12 variables, and where the
reader has to find out which variable is used where.
- Variables may represent state, and it is the state and the control flow
that contribute to the complexity of a function.
Only static variables are better kept declared upfront in a function or block.
Submitting patches
==================
@ -526,8 +423,8 @@ list. You can subscribe to the mailing list, or see the list
archives, by following links from
https://savannah.gnu.org/mail/?group=gettext .
To email a patch you can use a shell command like 'git format-patch -1'
to create a file, and then attach the file to your email.
To email a patch you can use a shell command like 'git format-patch
-1' to create a file, and then attach the file to your email.
GNU gettext development no longer stores descriptions of new changes
in ChangeLog files. Instead, a single ChangeLog file is generated

View File

@ -26,7 +26,7 @@ Here, you can give as arguments to 'configure'
described in the INSTALL.generic file.
If you are in a 64-bit multilib system with support for building 32-bit
binaries, you can build 32-bit binaries by configuring like this:
binaries, you can build a 32-bit poke configuring like this:
$ ../configure CC="gcc -m32"

View File

@ -78,6 +78,10 @@ There are three ways to create binaries of this package for Microsoft Windows:
(api-ms-win*.dll) through the Windows Update mechanism, see
https://support.microsoft.com/en-us/kb/2999226 .
Another constraint is that shared libraries built as part of this package
may not work (at least with MSVC 14.0). Therefore, you will need to pass
the configure option '--disable-shared' when building this package.
This recipe requires MS Visual C/C++ 9.0 or newer.
You don't need the Visual Studio IDE, just the C/C++ tool chain.
As of 2016, you can install the MS Visual C/C++ 14.0 tool chain from
@ -172,7 +176,6 @@ There are three ways to create binaries of this package for Microsoft Windows:
win32_target=_WIN32_WINNT_WIN8 # possibly for MSVC >= 10.0
./configure --host=i686-w64-mingw32 --prefix=/usr/local/msvc32 \
--with-included-libunistring \
CC="$HOME/msvc/compile cl -nologo" \
CFLAGS="-MD" \
CXX="$HOME/msvc/compile cl -nologo" \
@ -199,7 +202,6 @@ There are three ways to create binaries of this package for Microsoft Windows:
win32_target=_WIN32_WINNT_WIN8 # possibly for MSVC >= 10.0
./configure --host=x86_64-w64-mingw32 --prefix=/usr/local/msvc64 \
--with-included-libunistring \
CC="$HOME/msvc/compile cl -nologo" \
CFLAGS="-MD" \
CXX="$HOME/msvc/compile cl -nologo" \

View File

@ -66,23 +66,15 @@ $(srcdir)/configure: $(srcdir)/gettext-runtime/configure.ac $(srcdir)/gettext-to
distcheck-hook:
# Verify that some files are the same.
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/Makefile.in.in $(srcdir)/gettext-runtime/po/Makefile.in.in
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/Rules-quot $(srcdir)/gettext-runtime/po/Rules-quot
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/boldquot.sed $(srcdir)/gettext-runtime/po/boldquot.sed
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/quot.sed $(srcdir)/gettext-runtime/po/quot.sed
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/en@quot.header $(srcdir)/gettext-runtime/po/en@quot.header
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/en@boldquot.header $(srcdir)/gettext-runtime/po/en@boldquot.header
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/insert-header.sed $(srcdir)/gettext-runtime/po/insert-header.sed
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/remove-potcdate.sed $(srcdir)/gettext-runtime/po/remove-potcdate.sed
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/Makefile.in.in $(srcdir)/gettext-tools/po/Makefile.in.in
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/Rules-quot $(srcdir)/gettext-tools/po/Rules-quot
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/boldquot.sed $(srcdir)/gettext-tools/po/boldquot.sed
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/quot.sed $(srcdir)/gettext-tools/po/quot.sed
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/en@quot.header $(srcdir)/gettext-tools/po/en@quot.header
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/en@boldquot.header $(srcdir)/gettext-tools/po/en@boldquot.header
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/insert-header.sed $(srcdir)/gettext-tools/po/insert-header.sed
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/remove-potcdate.sed $(srcdir)/gettext-tools/po/remove-potcdate.sed
cmp -s $(srcdir)/gettext-tools/wizard/po-templates/traditional/remove-potcdate.sed $(srcdir)/gettext-tools/examples/po/remove-potcdate.sed
cmp -s $(srcdir)/gettext-runtime/po/Makefile.in.in $(srcdir)/gettext-tools/po/Makefile.in.in
cmp -s $(srcdir)/gettext-runtime/po/Rules-quot $(srcdir)/gettext-tools/po/Rules-quot
cmp -s $(srcdir)/gettext-runtime/po/boldquot.sed $(srcdir)/gettext-tools/po/boldquot.sed
cmp -s $(srcdir)/gettext-runtime/po/quot.sed $(srcdir)/gettext-tools/po/quot.sed
cmp -s $(srcdir)/gettext-runtime/po/en@quot.header $(srcdir)/gettext-tools/po/en@quot.header
cmp -s $(srcdir)/gettext-runtime/po/en@boldquot.header $(srcdir)/gettext-tools/po/en@boldquot.header
cmp -s $(srcdir)/gettext-runtime/po/insert-header.sed $(srcdir)/gettext-tools/po/insert-header.sed
cmp -s $(srcdir)/gettext-runtime/po/remove-potcdate.sed $(srcdir)/gettext-tools/po/remove-potcdate.sed
cmp -s $(srcdir)/gettext-runtime/po/remove-potcdate.sed $(srcdir)/gettext-tools/examples/po/remove-potcdate.sed
cmp -s $(srcdir)/gettext-runtime/m4/build-to-host.m4 $(srcdir)/gettext-tools/gnulib-m4/build-to-host.m4
cmp -s $(srcdir)/gettext-runtime/m4/gettext.m4 $(srcdir)/gettext-tools/gnulib-m4/gettext.m4
cmp -s $(srcdir)/gettext-runtime/man/help2man $(srcdir)/gettext-tools/man/help2man

180
NEWS
View File

@ -1,179 +1,3 @@
Version 1.0 - January 2026
# Improvements for maintainers and distributors:
* In a po/ directory, the PO files are now exactly those that the
translators submitted or committed in version control, or a
translation project's daemon committed on behalf of the translators.
They are no longer regularly updated with respect to the POT file
in the same directory.
The advantage for maintainers is that the maintainer may commit the
PO files in version control, without getting
- lots of modified files shown by "git status",
- frequent merge conflicts when merging between branches,
- a voluminous version control history.
The advantage for distributors is that the role of files in a
release tarball are clearer: The PO files are source code, whereas
the POT file and the *.gmo files are generated files.
ATTENTION translators!
Translators who work directly on a package's source code (without
going through a translation project) now need to run "msginit"
before starting work on a PO file.
* A new program 'po-fetch' is provided, that fetches the translated
PO files from a translation project's site on the internet, and
updates the LINGUAS file accordingly.
* In a po/ directory, a new script 'fetch-po' is now added by 'gettextize'.
It provides the standard interface for fetching the translated PO files.
It typically either invokes the 'po-fetch' program or does nothing.
# Improvements for translators:
* msginit:
- When the PO file already exists, 'msginit' now updates it w.r.t. the
POT file, like 'msgmerge' would do. Previously, 'msginit' failed with
an error message in this situation.
* Pretranslation:
- Two new programs, 'msgpre' and 'spit', are provided, that implement
machine translation through a locally installed Large Language Model
(LLM). 'msgpre' applies to an entire PO file, 'spit' to a single
message.
- The documentation has a new chapter "Pretranslation".
# Improvements for maintainers:
* xgettext:
- The refactoring suggestion when a translatable string contains an URL
or email address can now be inhibited through a command-line option
'--no-check=url' or '--no-check=email', or through a comment in the
source code of the form
/* xgettext: no-url-check */
or
/* xgettext: no-email-check */
# Programming languages support:
* OCaml:
- xgettext now supports OCaml.
- 'msgfmt -c' now verifies the syntax of translations of OCaml format
strings.
- A new example 'hello-ocaml' has been added.
* Rust:
- xgettext now recognizes 'gettextrs::gettext' invocations, like 'gettext'
invocations.
# libgettextpo library:
* The function 'po_message_get_format' now supports distinguishing whether
a negative format string mark, such as 'no-c-format', is set or not.
* The new functions
po_message_has_workflow_flag
po_message_set_workflow_flag
po_message_workflow_flags_iterator, po_flag_next, po_flag_iterator_free
can be used to manipulate or inspect the workflow flags of a message.
* The new functions
po_message_has_sticky_flag
po_message_set_sticky_flag
po_message_sticky_flags_iterator, po_flag_next, po_flag_iterator_free
can be used to manipulate or inspect the sticky flags of a messsage.
# Emacs PO mode:
Restore syntax highlighting in Emacs version 30 or newer.
Version 0.26 - July 2025
# Programming languages support:
* JavaScript:
- xgettext now parses regular expressions with character classes
correctly.
* C, C++, Python, JavaScript, EmacsLisp, librep, Go, Ruby, awk, D, Tcl,
Perl, PHP:
- xgettext's heuristic recognition of format strings has been improved:
strings like "100% complete" (with a space flag in a format directive)
are no longer flagged as format strings by default, unless they occur
in a context that requires a format string. You can override this
heuristic by using a comment of the form /* xgettext: c-format */.
* Shell:
- The documentation now mentions two other approaches for
internationalizing messages with parameters in shell scripts.
- xgettext now recognizes format strings in the 'printf' command syntax.
They are marked as 'sh-printf-format' in POT and PO files.
- Two new programs 'printf_gettext' and 'printf_ngettext' are provided,
that do formatted output with a localized format string in a more
efficient way (without spawning a subshell).
- xgettext now recognizes the \c, \u, and \U escape sequences in dollar-
single-quoted strings $'...'.
# Improvements for maintainers:
* xgettext:
- When extracting a message with plural that is some format string,
xgettext now verifies that the msgid and msgid_plural are compatible
as format strings. For most format string types, this still allows
omitting from msgid a placeholder that is used in msgid_plural. But
when a placeholder is used in both msgid and msgid_plural, its type
must be the same in both.
- xgettext now suggests a refactoring when a translatable string
contains an URL or email address.
# Improvements for translators:
* msggrep:
- msggrep accepts two new options -W/--workflow-flags and -S/--sticky-flags
that allow to select only messages that have a specified flag.
# Bug fixes:
- The AM_GNU_GETTEXT macro now rejects the dysfunctional gettext() function
in libc of Solaris 11.[0-3], Solaris OpenIndiana, and Solaris OmniOS.
- The AM_GNU_GETTEXT macro now recognizes, on MSVC, the GNU libintl built
as a shared library.
Version 0.25.1 - July 2025
# Bug fixes:
- autopoint no longer fails if configure.ac contains no
AM_GNU_GETTEXT_VERSION or AM_GNU_GETTEXT_REQUIRE_VERSION invocation.
- nls.m4 is installed again under $PREFIX/share/aclocal/.
# Portability:
- Building on native Windows with MSVC and --enable-shared is now supported.
Version 0.25 - May 2025
# Programming languages support:
* Go:
- xgettext now supports Go.
- 'msgfmt -c' now verifies the syntax of translations of Go format
strings.
- New examples 'hello-go' and 'hello-go-http' have been added.
* TypeScript:
- xgettext now supports TypeScript and TSX (= TypeScript with JSX
extensions).
* D:
- A new library libintl_d.a contains the runtime for using GNU gettext
message catalogs in the D programming language.
- xgettext now supports D.
- 'msgfmt -c' now verifies the syntax of translations of D format
strings.
- A new example 'hello-d' has been added.
* Modula-2:
- A new library libintl_m2.so contains the runtime for using GNU gettext
message catalogs in the Modula-2 programming language.
- xgettext now supports Modula-2.
- 'msgfmt -c' now verifies the syntax of translations of Modula-2 format
strings.
- A new example 'hello-modula2' has been added.
# Improvements for maintainers:
* xgettext has a new option '--generated' that customizes the way the
'POT-Creation-Date' in the POT file is computed.
Version 0.24.1 - May 2025
* Bug fixes:
- Fix bad interactions between autoreconf and autopoint.
- xgettext: Creating the POT file of a package under Git version control
is now faster. Also, the use of Git can be turned off by specifying
the option '--no-git'.
Version 0.24 - February 2025
# Programming languages support:
@ -814,7 +638,7 @@ Version 0.18.3 - July 2013
set of formatting methods nor translation functions, the
implementation supports only a limited set of formatting methods
and translation functions commonly used in Gjs and other popular
JavaScript implementations and libraries.
JavaScript implemenations and libraries.
- Lua:
xgettext now supports Lua, using Ľubomír Remák's lua-gettext.
@ -930,7 +754,7 @@ Version 0.18 - May 2010
version 0.12.
* msgfilter now sets environment variables during the invocation of the
filter, indicating the msgid and location of the message being processed.
filter, indicating the msgid and location of the messge being processed.
* xgettext now can extract plural forms from Qt 4 programs. The recommended
xgettext command-line options for this case are:

View File

@ -3,24 +3,12 @@ Packaging hints for binary package distributors
Although the source of the gettext package comes as a single package,
I recommend that in distributions of binary packages the installed files
be split into five packages:
be split into three packages:
gettext-runtime
Contents: Runtime libraries and programs.
Audience: Anyone who wants to run internationalized programs.
gettext-runtime-d
Contents: Runtime libraries specifically for the D programming
language.
Audience: Anyone who wants to run internationalized D programs.
Dependencies: requires gettext-runtime.
gettext-runtime-m2
Contents: Runtime libraries specifically for the Modula-2 programming
language.
Audience: Anyone who wants to run internationalized Modula-2 programs.
Dependencies: requires gettext-runtime.
libtextstyle
Contents: Text styling library.
Audience: Anyone who wants to run or develop programs that produce
@ -37,7 +25,7 @@ binary package (420 KB versus 5.5 MB). I recommend to include it in the default
installation list, like GNU 'coreutils'; in fact, the runtime programs are
utilities for sh programs.
The three 'gettext-runtime*' binary packages can be installed by doing
The 'gettext-runtime' binary package can be installed by doing
cd gettext-runtime
./configure
@ -59,16 +47,15 @@ The 'gettext-tools' binary package can be installed by building
make
make install
If you want to install all five at the same time, you simply do at the
If you want to install all three at the same time, you simply do at the
top-level directory:
./configure
make
make install
The precise split between gettext-runtime, gettext-runtime-d,
gettext-runtime-m2, libtextstyle, and gettext-tools is according to
the following file list.
The precise split between gettext-runtime, libtextstyle, and gettext-tools
is according to the following file list.
gettext-runtime
@ -76,19 +63,13 @@ the following file list.
$prefix/bin/gettext
$prefix/bin/ngettext
$prefix/bin/printf_gettext
$prefix/bin/printf_ngettext
$prefix/bin/envsubst
$prefix/bin/gettext.sh
$prefix/share/man/man1/gettext.1
$prefix/share/man/man1/ngettext.1
$prefix/share/man/man1/printf_gettext.1
$prefix/share/man/man1/printf_ngettext.1
$prefix/share/man/man1/envsubst.1
$prefix/share/doc/gettext/gettext.1.html
$prefix/share/doc/gettext/ngettext.1.html
$prefix/share/doc/gettext/printf_gettext.1.html
$prefix/share/doc/gettext/printf_ngettext.1.html
$prefix/share/doc/gettext/envsubst.1.html
$prefix/share/locale/*/LC_MESSAGES/gettext-runtime.mo
@ -109,18 +90,6 @@ the following file list.
$prefix/share/doc/libasprintf/autosprintf*.html
$prefix/share/info/autosprintf.info
gettext-runtime-d
$prefix/lib/libintl_d.a
$prefix/include/d/gnu/libintl/package.d
$prefix/include/d/gnu/libintl/libintl.d
$prefix/include/d/gnu/libintl/internal/low.d
gettext-runtime-m2
$prefix/lib/libintl_m2.*
$prefix/include/m2/Libintl.def
libtextstyle
$prefix/lib/libtextstyle.*
@ -137,23 +106,17 @@ the following file list.
$prefix/bin/xgettext
$prefix/bin/gettextize
$prefix/bin/autopoint
$prefix/bin/po-fetch
$prefix/bin/recode*
$prefix/bin/spit
$prefix/share/man/man1/msg*.1
$prefix/share/man/man1/xgettext.1
$prefix/share/man/man1/gettextize.1
$prefix/share/man/man1/autopoint.1
$prefix/share/man/man1/po-fetch.1
$prefix/share/man/man1/recode*.1
$prefix/share/man/man1/spit.1
$prefix/share/doc/gettext/msg*.1.html
$prefix/share/doc/gettext/xgettext.1.html
$prefix/share/doc/gettext/gettextize.1.html
$prefix/share/doc/gettext/autopoint.1.html
$prefix/share/doc/gettext/po-fetch.1.html
$prefix/share/doc/gettext/recode*.1.html
$prefix/share/doc/gettext/spit.1.html
$prefix/share/doc/gettext/gettext_*.html
$prefix/share/doc/gettext/FAQ.html
$prefix/share/doc/gettext/tutorial.html
@ -169,17 +132,6 @@ the following file list.
$prefix/libexec/gettext/*
$prefix/share/locale/*/LC_MESSAGES/gettext-tools.mo
$prefix/share/gettext/config.rpath
$prefix/share/gettext/m4/build-to-host.m4
$prefix/share/gettext/m4/gettext.m4
$prefix/share/gettext/m4/host-cpu-c-abi.m4
$prefix/share/gettext/m4/iconv.m4
$prefix/share/gettext/m4/intlmacosx.m4
$prefix/share/gettext/m4/lib-ld.m4
$prefix/share/gettext/m4/lib-link.m4
$prefix/share/gettext/m4/lib-prefix.m4
$prefix/share/gettext/m4/nls.m4
$prefix/share/gettext/m4/po.m4
$prefix/share/gettext/m4/progtest.m4
$prefix/share/gettext/po/*
$prefix/share/gettext/projects/*
$prefix/share/gettext/schema/*
@ -193,7 +145,17 @@ the following file list.
$prefix/share/gettext/archive.cvs.tar.* (only installed if --with-cvs specified)
$prefix/share/gettext/disclaim-translations.txt
$prefix/share/gettext-$VERSION/its/*
$prefix/share/aclocal/build-to-host.m4
$prefix/share/aclocal/gettext.m4
$prefix/share/aclocal/host-cpu-c-abi.m4
$prefix/share/aclocal/iconv.m4
$prefix/share/aclocal/intlmacosx.m4
$prefix/share/aclocal/lib-ld.m4
$prefix/share/aclocal/lib-link.m4
$prefix/share/aclocal/lib-prefix.m4
$prefix/share/aclocal/nls.m4
$prefix/share/aclocal/po.m4
$prefix/share/aclocal/progtest.m4
$prefix/share/emacs/site-lisp/po-compat.el
$prefix/share/emacs/site-lisp/po-compat.elc
$prefix/share/emacs/site-lisp/po-mode.el

View File

@ -4,7 +4,7 @@
# also regenerates all aclocal.m4, config.h.in, Makefile.in, configure files
# with new versions of autoconf or automake.
#
# This script requires autoconf-2.64..2.72 and automake-1.13..1.18 in the PATH.
# This script requires autoconf-2.64..2.72 and automake-1.13..1.17 in the PATH.
# Copyright (C) 2003-2025 Free Software Foundation, Inc.
#
@ -21,11 +21,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Prerequisite (if not used from a released tarball):
# - A preceding invocation of './autopull.sh'.
# - If the GNULIB_SRCDIR environment variable was set during the
# './autopull.sh' invocation, pointing to a gnulib checkout, it should
# still be set now, during the './autogen.sh' invocation.
# Prerequisite (if not used from a released tarball): either
# - the GNULIB_SRCDIR environment variable pointing to a gnulib checkout, or
# - a preceding invocation of './autopull.sh'.
#
# Usage: ./autogen.sh [--skip-gnulib]
#
@ -101,48 +99,33 @@ if ! $skip_gnulib; then
basename-lgpl
binary-io
bool
c-ctype
c-strtold
closeout
error
fzprintf-posix
getopt-gnu
gettext-h
havelib
mbrtoc32
mbszero
memmove
noreturn
options
progname
propername
quote
relocatable-prog
setlocale
sigpipe
stdint-h
stdio-h
stdlib-h
strtoimax
strtold
strtoul
strtoumax
unistd-h
unlocked-io
xalloc
xstring-buffer
xstrtold
'
GNULIB_MODULES_RUNTIME_OTHER='
gettext-runtime-misc
ansi-c++-opt
csharpcomp-script
d
dcomp-script
java
javacomp-script
manywarnings
modula2
modula2comp-script
'
$GNULIB_TOOL --dir=gettext-runtime --lib=libgrt --source-base=gnulib-lib --m4-base=gnulib-m4 --no-libtool --local-dir=gnulib-local --local-symlink \
--import $GNULIB_MODULES_RUNTIME_FOR_SRC $GNULIB_MODULES_RUNTIME_OTHER || exit $?
@ -195,7 +178,6 @@ if ! $skip_gnulib; then
c-strcase
c-strcasestr
c-strstr
carray-list
clean-temp
closedir
closeout
@ -218,12 +200,8 @@ if ! $skip_gnulib; then
gcd
getaddrinfo
getline
getrusage
getopt-gnu
gettext-h
gocomp-script
hash-map
hash-set
hashkey-string
iconv
javacomp
javaexec
@ -240,13 +218,11 @@ if ! $skip_gnulib; then
memset
minmax
mkdir
next-prime
noreturn
obstack
open
opendir
openmp-init
options
pipe-filter-ii
progname
propername
@ -254,7 +230,6 @@ if ! $skip_gnulib; then
readdir
relocatable-prog
relocatable-script
set
setlocale
sf-istream
sh-filename
@ -262,7 +237,6 @@ if ! $skip_gnulib; then
sigpipe
sigprocmask
spawn-pipe
stat-time
stdio-h
stdlib-h
stpcpy
@ -295,11 +269,7 @@ if ! $skip_gnulib; then
unistr/u8-mbtouc
unistr/u8-mbtoucr
unistr/u8-uctomb
unistr/u16-check
unistr/u16-to-u8
unistr/u16-mbtouc
unistr/u32-check
unistr/u32-to-u8
uniwidth/width
unlocked-io
unsetenv
@ -310,148 +280,56 @@ if ! $skip_gnulib; then
xalloc
xconcat-filename
xerror
xlist
xmalloca
xmap
xmemdup0
xset
xsetenv
xstrerror
xstriconv
xstriconveh
xstring-buffer
xstring-buffer-reversed
xstring-desc
xvasprintf
'
# Common dependencies of GNULIB_MODULES_TOOLS_FOR_SRC and GNULIB_MODULES_TOOLS_FOR_LIBGREP.
GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES='
absolute-header
alignasof
alloca-opt
assert-h
attribute
basename-lgpl
bool
btowc
builtin-expect
c99
calloc-gnu
calloc-posix
cloexec
close
double-slash-root
dup2
errno-h
error
error-h
exitfail
extensions
extensions-aix
extern-inline
fcntl
fcntl-h
fd-hook
filename
flexmember
fstat
gen-header
getdtablesize
getprogname
gettext-h
gnulib-i18n
hard-locale
ialloc
idx
include_next
intprops
inttypes-h-incomplete
iswblank
iswctype
iswdigit
iswpunct
iswxdigit
largefile
libc-config
limits-h
localcharset
localeconv
locale-h
lock
lstat
malloca
malloc-gnu
localcharset
malloc-posix
mbrtowc
mbsinit
mbszero
mbtowc
memchr
memcmp
memmove
minmax
msvc-inval
msvc-nothrow
multiarch
obstack
once
open
pathmax
pthread-h
pthread-once
reallocarray
realloc-posix
sched-h
setlocale-null
setlocale-null-unlocked
snippet/arg-nonnull
snippet/c++defs
snippet/_Noreturn
snippet/warn-on-use
ssize_t
stat
stat-time
stdckdint-h
stddef-h
std-gnu11
stdint-h
stdio-h
stdlib-h
streq
strerror
strerror-override
string-h
sys_stat-h
sys_types-h
threadlib
time-h
unistd-h
vararrays
verify
wchar-h
wctype
wctype-h
windows-mutex
windows-once
windows-recmutex
windows-rwlock
xalloc
xalloc-die
xalloc-oversized
'
GNULIB_MODULES_TOOLS_OTHER='
gettext-tools-misc
ansi-c++-opt
csharpcomp-script
csharpexec-script
d
dcomp-script
java
javacomp-script
javaexec-script
manywarnings
modula2
modula2comp-script
stdint-h
test-xfail
'
@ -465,21 +343,17 @@ if ! $skip_gnulib; then
GNULIB_MODULES_LIBGETTEXTLIB="$GNULIB_MODULES_TOOLS_FOR_SRC $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES $GNULIB_MODULES_TOOLS_OTHER"
$GNULIB_TOOL --dir=gettext-tools --lib=libgettextlib --source-base=gnulib-lib --m4-base=gnulib-m4 --tests-base=gnulib-tests --makefile-name=Makefile.gnulib --libtool --with-tests --local-dir=gnulib-local --local-symlink \
--import \
--avoid=float-h-tests \
--avoid=hashcode-string1 \
--avoid=fdutimensat-tests --avoid=futimens-tests --avoid=utime-tests --avoid=utimens-tests --avoid=utimensat-tests \
--avoid=array-list-tests --avoid=array-map-tests --avoid=array-oset-tests --avoid=carray-list-tests --avoid=linked-list-tests --avoid=linkedhash-list-tests \
--avoid=uninorm/decomposing-form-tests \
--avoid=array-list-tests --avoid=linked-list-tests --avoid=linkedhash-list-tests \
`for m in $GNULIB_MODULES_TOOLS_LIBUNISTRING_TESTS; do echo --avoid=$m; done` \
$GNULIB_MODULES_LIBGETTEXTLIB || exit $?
$GNULIB_TOOL --copy-file m4/libtextstyle.m4 gettext-tools/gnulib-m4/libtextstyle.m4 || exit $?
# In gettext-tools/libgrep:
GNULIB_MODULES_TOOLS_FOR_LIBGREP='
kwset
mbrlen
regex
'
$GNULIB_TOOL --dir=gettext-tools --macro-prefix=grgl --source-base=libgrep/gnulib-lib --m4-base=libgrep/gnulib-m4 --makefile-name=Makefile.gnulib --witness-c-macro=IN_GETTEXT_TOOLS_LIBGREP --local-dir=gnulib-local --local-symlink \
$GNULIB_TOOL --dir=gettext-tools --macro-prefix=grgl --lib=libgrep --source-base=libgrep --m4-base=libgrep/gnulib-m4 --witness-c-macro=IN_GETTEXT_TOOLS_LIBGREP --makefile-name=Makefile.gnulib --local-dir=gnulib-local --local-symlink \
--import \
`for m in $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES; do \
if test \`$GNULIB_TOOL --extract-applicability $m\` != all; then \
@ -612,7 +486,7 @@ if ! $skip_gnulib; then
done
# Fetch INSTALL.generic.
$GNULIB_TOOL --copy-file doc/INSTALL.UTF-8 INSTALL.generic || exit $?
$GNULIB_TOOL --copy-file doc/INSTALL.UTF-8 INSTALL.generic
fi
# Make sure we get new versions of files brought in by automake.
@ -646,16 +520,6 @@ aclocal -I ../../m4 -I ../m4 -I gnulib-m4 \
|| exit $?
cd "$dir0"
echo "$0: copying common files to gettext-runtime..."
cp -p gettext-tools/wizard/po-templates/traditional/Makefile.in.in gettext-runtime/po/Makefile.in.in
cp -p gettext-tools/wizard/po-templates/traditional/Rules-quot gettext-runtime/po/Rules-quot
cp -p gettext-tools/wizard/po-templates/traditional/boldquot.sed gettext-runtime/po/boldquot.sed
cp -p gettext-tools/wizard/po-templates/traditional/quot.sed gettext-runtime/po/quot.sed
cp -p gettext-tools/wizard/po-templates/traditional/en@quot.header gettext-runtime/po/en@quot.header
cp -p gettext-tools/wizard/po-templates/traditional/en@boldquot.header gettext-runtime/po/en@boldquot.header
cp -p gettext-tools/wizard/po-templates/traditional/insert-header.sed gettext-runtime/po/insert-header.sed
cp -p gettext-tools/wizard/po-templates/traditional/remove-potcdate.sed gettext-runtime/po/remove-potcdate.sed
echo "$0: generating configure in gettext-runtime..."
cd gettext-runtime
aclocal -I m4 -I ../m4 -I gnulib-m4 \
@ -684,17 +548,16 @@ aclocal -I ../../gettext-runtime/m4 -I ../../m4 \
|| exit $?
cd "$dir0"
echo "$0: copying common files to gettext-tools..."
echo "$0: copying common files from gettext-runtime to gettext-tools..."
cp -p gettext-runtime/ABOUT-NLS gettext-tools/ABOUT-NLS
cp -p gettext-tools/wizard/po-templates/traditional/Makefile.in.in gettext-tools/po/Makefile.in.in
cp -p gettext-tools/wizard/po-templates/traditional/Rules-quot gettext-tools/po/Rules-quot
cp -p gettext-tools/wizard/po-templates/traditional/boldquot.sed gettext-tools/po/boldquot.sed
cp -p gettext-tools/wizard/po-templates/traditional/quot.sed gettext-tools/po/quot.sed
cp -p gettext-tools/wizard/po-templates/traditional/en@quot.header gettext-tools/po/en@quot.header
cp -p gettext-tools/wizard/po-templates/traditional/en@boldquot.header gettext-tools/po/en@boldquot.header
cp -p gettext-tools/wizard/po-templates/traditional/insert-header.sed gettext-tools/po/insert-header.sed
cp -p gettext-tools/wizard/po-templates/traditional/remove-potcdate.sed gettext-tools/po/remove-potcdate.sed
cp -p gettext-tools/wizard/po-templates/traditional/remove-potcdate.sed gettext-tools/examples/po/remove-potcdate.sed
cp -p gettext-runtime/po/Makefile.in.in gettext-tools/po/Makefile.in.in
cp -p gettext-runtime/po/Rules-quot gettext-tools/po/Rules-quot
cp -p gettext-runtime/po/boldquot.sed gettext-tools/po/boldquot.sed
cp -p gettext-runtime/po/quot.sed gettext-tools/po/quot.sed
cp -p gettext-runtime/po/en@quot.header gettext-tools/po/en@quot.header
cp -p gettext-runtime/po/en@boldquot.header gettext-tools/po/en@boldquot.header
cp -p gettext-runtime/po/insert-header.sed gettext-tools/po/insert-header.sed
cp -p gettext-runtime/po/remove-potcdate.sed gettext-tools/po/remove-potcdate.sed
echo "$0: generating configure in gettext-tools..."
cd gettext-tools

View File

@ -20,6 +20,10 @@
# This script requires:
# - Wget
# - XZ Utils
#
# In addition, it fetches the archive.dir.tar.gz file, which contains
# data files used by the autopoint program. If you already have the
# file, place it under gettext-tools/misc, before running this script.
# Usage: ./autopull.sh
@ -28,6 +32,23 @@
./gitsub.sh pull || exit 1
# Fetch gettext-tools/misc/archive.dir.tar.
if ! test -f gettext-tools/misc/archive.dir.tar; then
if ! test -f gettext-tools/misc/archive.dir.tar.xz; then
echo "$0: getting gettext-tools/misc/archive.dir.tar..."
wget -q --timeout=5 -O gettext-tools/misc/archive.dir.tar.xz-t "https://alpha.gnu.org/gnu/gettext/archive.dir-latest.tar.xz" \
&& mv gettext-tools/misc/archive.dir.tar.xz-t gettext-tools/misc/archive.dir.tar.xz
retval=$?
rm -f gettext-tools/misc/archive.dir.tar.xz-t
test $retval -eq 0 || exit $retval
fi
xz -d -c < gettext-tools/misc/archive.dir.tar.xz > gettext-tools/misc/archive.dir.tar-t \
&& mv gettext-tools/misc/archive.dir.tar-t gettext-tools/misc/archive.dir.tar
retval=$?
rm -f gettext-tools/misc/archive.dir.tar-t
test $retval -eq 0 || exit $retval
fi
# func_git_clone_shallow SUBDIR URL REVISION
func_git_clone_shallow ()
{
@ -65,11 +86,7 @@ func_git_clone_shallow ()
# Fetch the compilable (mostly generated) tree-sitter source code.
TREE_SITTER_VERSION=0.23.2
TREE_SITTER_GO_VERSION=0.23.4
TREE_SITTER_RUST_VERSION=0.23.2
TREE_SITTER_TYPESCRIPT_VERSION=0.23.2
TREE_SITTER_OCAML_VERSION=0.23.2
TREE_SITTER_D_VERSION=0.8.2
# Cache the relevant source code. Erase the rest of the tree-sitter projects.
test -d gettext-tools/tree-sitter-$TREE_SITTER_VERSION || {
func_git_clone_shallow tree-sitter https://github.com/tree-sitter/tree-sitter.git v$TREE_SITTER_VERSION
@ -79,15 +96,6 @@ test -d gettext-tools/tree-sitter-$TREE_SITTER_VERSION || {
mv tree-sitter/lib gettext-tools/tree-sitter-$TREE_SITTER_VERSION/lib
rm -rf tree-sitter
}
test -d gettext-tools/tree-sitter-go-$TREE_SITTER_GO_VERSION || {
func_git_clone_shallow tree-sitter-go https://github.com/tree-sitter/tree-sitter-go.git v$TREE_SITTER_GO_VERSION
(cd tree-sitter-go && patch -p1) < gettext-tools/build-aux/tree-sitter-go-portability.diff
mkdir gettext-tools/tree-sitter-go-$TREE_SITTER_GO_VERSION
mv tree-sitter-go/LICENSE gettext-tools/tree-sitter-go-$TREE_SITTER_GO_VERSION/LICENSE
mv tree-sitter-go/src gettext-tools/tree-sitter-go-$TREE_SITTER_GO_VERSION/src
mv gettext-tools/tree-sitter-go-$TREE_SITTER_GO_VERSION/src/parser.c gettext-tools/tree-sitter-go-$TREE_SITTER_GO_VERSION/src/go-parser.c
rm -rf tree-sitter-go
}
test -d gettext-tools/tree-sitter-rust-$TREE_SITTER_RUST_VERSION || {
func_git_clone_shallow tree-sitter-rust https://github.com/tree-sitter/tree-sitter-rust.git v$TREE_SITTER_RUST_VERSION
(cd tree-sitter-rust && patch -p1) < gettext-tools/build-aux/tree-sitter-rust-portability.diff
@ -98,55 +106,9 @@ test -d gettext-tools/tree-sitter-rust-$TREE_SITTER_RUST_VERSION || {
mv gettext-tools/tree-sitter-rust-$TREE_SITTER_RUST_VERSION/src/scanner.c gettext-tools/tree-sitter-rust-$TREE_SITTER_RUST_VERSION/src/rust-scanner.c
rm -rf tree-sitter-rust
}
test -d gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION || {
func_git_clone_shallow tree-sitter-typescript https://github.com/tree-sitter/tree-sitter-typescript.git v$TREE_SITTER_TYPESCRIPT_VERSION
(cd tree-sitter-typescript && patch -p1) < gettext-tools/build-aux/tree-sitter-typescript-portability.diff
mkdir gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION
mkdir gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/common
mkdir gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/typescript
mkdir gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/tsx
mv tree-sitter-typescript/LICENSE gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/LICENSE
mv tree-sitter-typescript/common/scanner.h gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/common/scanner.h
mv tree-sitter-typescript/typescript/src gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/typescript/src
mv tree-sitter-typescript/tsx/src gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/tsx/src
mv gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/typescript/src/parser.c gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/typescript/src/ts-parser.c
mv gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/typescript/src/scanner.c gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/typescript/src/ts-scanner.c
mv gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/tsx/src/parser.c gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/tsx/src/tsx-parser.c
mv gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/tsx/src/scanner.c gettext-tools/tree-sitter-typescript-$TREE_SITTER_TYPESCRIPT_VERSION/tsx/src/tsx-scanner.c
rm -rf tree-sitter-typescript
}
test -d gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION || {
func_git_clone_shallow tree-sitter-ocaml https://github.com/tree-sitter/tree-sitter-ocaml.git v$TREE_SITTER_OCAML_VERSION
(cd tree-sitter-ocaml && patch -p1) < gettext-tools/build-aux/tree-sitter-ocaml-portability.diff
mkdir gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION
mkdir gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION/common
mkdir gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION/grammars
mkdir gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION/grammars/ocaml
mv tree-sitter-ocaml/LICENSE gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION/LICENSE
mv tree-sitter-ocaml/common/scanner.h gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION/common/scanner.h
mv tree-sitter-ocaml/grammars/ocaml/src gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION/grammars/ocaml/src
mv gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION/grammars/ocaml/src/parser.c gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION/grammars/ocaml/src/ocaml-parser.c
mv gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION/grammars/ocaml/src/scanner.c gettext-tools/tree-sitter-ocaml-$TREE_SITTER_OCAML_VERSION/grammars/ocaml/src/ocaml-scanner.c
rm -rf tree-sitter-ocaml
}
test -d gettext-tools/tree-sitter-d-$TREE_SITTER_D_VERSION || {
func_git_clone_shallow tree-sitter-d https://github.com/gdamore/tree-sitter-d.git v$TREE_SITTER_D_VERSION
(cd tree-sitter-d && patch -p1) < gettext-tools/build-aux/tree-sitter-d-portability.diff
(cd tree-sitter-d && patch -p1) < gettext-tools/build-aux/tree-sitter-d-optimization-bug.diff
mkdir gettext-tools/tree-sitter-d-$TREE_SITTER_D_VERSION
mv tree-sitter-d/LICENSE.txt gettext-tools/tree-sitter-d-$TREE_SITTER_D_VERSION/LICENSE
mv tree-sitter-d/src gettext-tools/tree-sitter-d-$TREE_SITTER_D_VERSION/src
mv gettext-tools/tree-sitter-d-$TREE_SITTER_D_VERSION/src/parser.c gettext-tools/tree-sitter-d-$TREE_SITTER_D_VERSION/src/d-parser.c
mv gettext-tools/tree-sitter-d-$TREE_SITTER_D_VERSION/src/scanner.c gettext-tools/tree-sitter-d-$TREE_SITTER_D_VERSION/src/d-scanner.c
rm -rf tree-sitter-d
}
cat > gettext-tools/tree-sitter.cfg <<EOF
TREE_SITTER_VERSION=$TREE_SITTER_VERSION
TREE_SITTER_GO_VERSION=$TREE_SITTER_GO_VERSION
TREE_SITTER_RUST_VERSION=$TREE_SITTER_RUST_VERSION
TREE_SITTER_TYPESCRIPT_VERSION=$TREE_SITTER_TYPESCRIPT_VERSION
TREE_SITTER_OCAML_VERSION=$TREE_SITTER_OCAML_VERSION
TREE_SITTER_D_VERSION=$TREE_SITTER_D_VERSION
EOF
dir0=`pwd`

View File

@ -1,5 +1,5 @@
# Sed script for post-processing the trace output of subordinate configures.
# Copyright (C) 2003-2026 Free Software Foundation, Inc.
# Copyright (C) 2003, 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
@ -13,8 +13,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# Written by Bruno Haible.
# Replace invocations of some libtool macros.
s|.AC_ENABLE_SHARED_DEFAULT.|yes|g

View File

@ -1,7 +1,7 @@
#!/bin/sh
# Creating a Java archive (.jar).
# Copyright (C) 2024-2026 Free Software Foundation, Inc.
# Copyright (C) 2024 Free Software Foundation, Inc.
#
# This file is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Bruno Haible.
# Written by Bruno Haible <bruno@clisp.org>, 2024.
# func_usage
# outputs to stdout the --help usage message.
@ -40,7 +40,7 @@ Send patches and bug reports to <bug-gettext@gnu.org>."
func_version ()
{
echo "jar-cf (GNU gettext)"
echo "Copyright (C) 2026 Free Software Foundation, Inc.
echo "Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law."
@ -94,16 +94,13 @@ top_srcdir="$2"
shift
shift
# Unset CDPATH. Otherwise, output from 'cd dir' can surprise callers.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
if $jar_program --help 2>&1 | grep '\--date=' >/dev/null; then
# The JAR_PROGRAM supports the --date option. Its effect is to set the given
# date as time stamp on all the ELEMENTs and also the META-INF/MANIFEST.MF.
# Use it, for reproducibility (cf. <https://reproducible-builds.org/>).
if test -d "$top_srcdir/.git"; then
# We are in a git checkout. Use the date of the latest commit.
date=`cd "$top_srcdir" && git log -n 1 --date=iso --format=fuller | sed -n -e 's/^CommitDate: //p' | sed -e 's/ /T/' -e 's/ \(...\)\(..\)$/\1:\2/'`
date=`git log -n 1 --date=iso --format=fuller | sed -n -e 's/^CommitDate: //p' | sed -e 's/ /T/' -e 's/ \(...\)\(..\)$/\1:\2/'`
else
# We are building from a tarball.
# Use the date of the first entry of the ChangeLog file.

View File

@ -2,11 +2,11 @@
## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
## by inline-source v2019-02-19.15
# libtool (GNU libtool) 2.6.0
# libtool (GNU libtool) 2.5.4
# Provide generalized library-building support services.
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# Copyright (C) 1996-2019, 2021-2025 Free Software Foundation, Inc.
# Copyright (C) 1996-2019, 2021-2024 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.
@ -31,8 +31,8 @@
PROGRAM=libtool
PACKAGE=libtool
VERSION=2.6.0
package_revision=2.6.0
VERSION=2.5.4
package_revision=2.5.4
## ------ ##
@ -2215,7 +2215,7 @@ func_version ()
# End:
# Set a version string.
scriptversion='(GNU libtool) 2.6.0'
scriptversion='(GNU libtool) 2.5.4'
# func_version
# ------------
@ -2299,22 +2299,6 @@ func_help ()
func_usage_message
$ECHO "$long_help_message
If a TAG is supplied, it must use one of the tag names below:
Tag Name Language Name
CC C
CXX C++
OBJC Objective-C
OBJCXX Objective-C++
GCJ Java
F77 Fortran 77
FC Fortran
GO Go
RC Windows Resource
If you do not see a tag name associated with your programming language, then
you are using a compiler that $progname does not support.
MODE must be one of the following:
clean remove files from the build directory
@ -2342,7 +2326,7 @@ include the following information:
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
Report bugs to <bug-libtool@gnu.org>.
GNU libtool home page: <https://www.gnu.org/s/libtool/>.
GNU libtool home page: <https://www.gnu.org/software/libtool/>.
General help using GNU software: <https://www.gnu.org/gethelp/>."
exit 0
}
@ -2739,7 +2723,7 @@ libtool_validate_options ()
case $host_os in
# Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
# see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2* | *linux*)
cygwin* | mingw* | windows* | pw32* | cegcc* | solaris2* | os2*)
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;
@ -3015,9 +2999,8 @@ func_infer_tag ()
# was found and let the user know that the "--tag" command
# line option must be used.
if test -z "$tagname"; then
func_echo "unable to infer tagged configuration with compiler."
func_echo "Possible use of unsupported compiler."
func_fatal_error "specify a tag with '--tag'. For more information, try '$progname --help'."
func_echo "unable to infer tagged configuration"
func_fatal_error "specify a tag with '--tag'"
# else
# func_verbose "using $tagname tagged configuration"
fi
@ -3179,41 +3162,13 @@ func_convert_core_msys_to_w32 ()
{
$debug_cmd
# Compatibility for original MSYS
if test "Xone" = "X$lt_cv_cmd_slashes"; then
func_convert_core_msys_to_w32_result=`( cmd /c echo "$1" ) 2>/dev/null |
$SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
else # Assume 'lt_cv_cmd_slashes = "two"'
# awkward: cmd appends spaces to result
func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
$SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
fi
if test "$?" -ne 0; then
# on failure, ensure result is empty
func_convert_core_msys_to_w32_result=
fi
}
#end: func_convert_core_msys_to_w32
# func_convert_core_msys_to_w32_with_cygpath ARG
# Convert file name or path ARG with cygpath from MSYS format to w32
# format. Return result in func_convert_core_msys_to_w32_with_cygpath_result.
func_convert_core_msys_to_w32_with_cygpath ()
{
$debug_cmd
# Since MSYS2 is packaged with cygpath, call cygpath in $PATH; no need
# to use LT_CYGPATH in this case.
func_convert_core_msys_to_w32_result=`cygpath "$@" 2>/dev/null |
$SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"`
if test "$?" -ne 0; then
# on failure, ensure result is empty
func_convert_core_msys_to_w32_result=
fi
}
#end: func_convert_core_msys_to_w32_with_cygpath
# func_convert_file_check ARG1 ARG2
# Verify that ARG1 (a file name in $build format) was converted to $host
# format in ARG2. Otherwise, emit an error message, but continue (resetting
@ -3348,13 +3303,8 @@ func_convert_file_msys_to_w32 ()
func_to_host_file_result=$1
if test -n "$1"; then
if test "Xyes" = "X$cygpath_installed"; then
func_convert_core_msys_to_w32_with_cygpath -w "$1"
func_to_host_file_result=$func_convert_core_msys_to_w32_with_cygpath_result
else
func_convert_core_msys_to_w32 "$1"
func_to_host_file_result=$func_convert_core_msys_to_w32_result
fi
func_convert_core_msys_to_w32 "$1"
func_to_host_file_result=$func_convert_core_msys_to_w32_result
fi
func_convert_file_check "$1" "$func_to_host_file_result"
}
@ -3405,13 +3355,8 @@ func_convert_file_msys_to_cygwin ()
func_to_host_file_result=$1
if test -n "$1"; then
if test "Xyes" = "X$cygpath_installed"; then
func_convert_core_msys_to_w32_with_cygpath -w "$1"
func_cygpath -u "$func_convert_core_msys_to_w32_with_cygpath_result"
else
func_convert_core_msys_to_w32 "$1"
func_cygpath -u "$func_convert_core_msys_to_w32_result"
fi
func_convert_core_msys_to_w32 "$1"
func_cygpath -u "$func_convert_core_msys_to_w32_result"
func_to_host_file_result=$func_cygpath_result
fi
func_convert_file_check "$1" "$func_to_host_file_result"
@ -3512,13 +3457,8 @@ func_convert_path_msys_to_w32 ()
# and winepath ignores them completely.
func_stripname : : "$1"
func_to_host_path_tmp1=$func_stripname_result
if test "Xyes" = "X$cygpath_installed"; then
func_convert_core_msys_to_w32_with_cygpath -w -p "$func_to_host_path_tmp1"
func_to_host_path_result=$func_convert_core_msys_to_w32_with_cygpath_result
else
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
func_to_host_path_result=$func_convert_core_msys_to_w32_result
fi
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
func_to_host_path_result=$func_convert_core_msys_to_w32_result
func_convert_path_check : ";" \
"$func_to_host_path_tmp1" "$func_to_host_path_result"
func_convert_path_front_back_pathsep ":*" "*:" ";" "$1"
@ -3582,13 +3522,8 @@ func_convert_path_msys_to_cygwin ()
# See func_convert_path_msys_to_w32:
func_stripname : : "$1"
func_to_host_path_tmp1=$func_stripname_result
if test "Xyes" = "X$cygpath_installed"; then
func_convert_core_msys_to_w32_with_cygpath -w -p "$func_to_host_path_tmp1"
func_cygpath -u -p "$func_convert_core_msys_to_w32_with_cygpath_result"
else
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
fi
func_convert_core_msys_to_w32 "$func_to_host_path_tmp1"
func_cygpath -u -p "$func_convert_core_msys_to_w32_result"
func_to_host_path_result=$func_cygpath_result
func_convert_path_check : : \
"$func_to_host_path_tmp1" "$func_to_host_path_result"
@ -4520,14 +4455,6 @@ func_mode_finish ()
fi
echo
echo "After a 'make install' for many GNU/Linux systems, 'ldconfig LIBDIR'"
echo "may need to be executed to help locate newly installed libraries,"
echo "but you should consult with a system administrator before updating"
echo "the shared library cache as this should be done with great care"
echo "and consideration. (See the 'Platform-specific configuration notes'"
echo "section of the documentation for more information.)"
echo
echo "See any operating system documentation about shared libraries for"
case $host in
solaris2.[6789]|solaris2.1[0-9])
@ -4602,7 +4529,7 @@ func_mode_install ()
prev=$arg
fi
;;
-g | -m | -o | -S | -t)
-g | -m | -o)
prev=$arg
;;
-s)
@ -5118,7 +5045,7 @@ extern \"C\" {
# Prepare the list of exported symbols
if test -z "$export_symbols"; then
export_symbols=$output_objdir/$outputname.expsym
export_symbols=$output_objdir/$outputname.exp
$opt_dry_run || {
$RM $export_symbols
eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
@ -5131,8 +5058,8 @@ extern \"C\" {
}
else
$opt_dry_run || {
eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.expsym"'
eval '$GREP -f "$output_objdir/$outputname.expsym" < "$nlist" > "$nlist"T'
eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
eval '$MV "$nlist"T "$nlist"'
case $host in
*cygwin* | *mingw* | *windows* | *cegcc* )
@ -6052,7 +5979,6 @@ int setenv (const char *, const char *, int);
# define getcwd _getcwd
# define putenv _putenv
# define S_IXUSR _S_IEXEC
# define MSVC_ISDIR(m)(((m) & S_IFMT) == S_IFDIR)
#elif defined __MINGW32__
# define setmode _setmode
# define stat _stat
@ -6448,13 +6374,8 @@ check_executable (const char *path)
if ((!path) || (!*path))
return 0;
#ifdef _MSC_VER
if ((stat (path, &st) >= 0) && !MSVC_ISDIR (st.st_mode)
if ((stat (path, &st) >= 0)
&& (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
#else
if ((stat (path, &st) >= 0) && !S_ISDIR (st.st_mode)
&& (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
#endif
return 1;
else
return 0;
@ -7359,13 +7280,8 @@ func_mode_link ()
continue
;;
xlinker)
func_append linker_flags "$qarg,"
# Args in the var 'compiler_flags' causes warnings in MSVC
func_cc_basename "$CC"
case $func_cc_basename_result in
cl|cl.exe) ;;
*) func_append compiler_flags " $wl$qarg" ;;
esac
func_append linker_flags " $qarg"
func_append compiler_flags " $wl$qarg"
prev=
func_append compile_command " $wl$qarg"
func_append finalize_command " $wl$qarg"
@ -7609,6 +7525,8 @@ func_mode_link ()
*-*-cygwin* | *-*-mingw* | *-*-windows* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
# The PATH hackery in wrapper scripts is required on Windows
# and Darwin in order for the loader to find any dlls it needs.
func_warning "'-no-install' is ignored for $host"
func_warning "assuming '-no-fast-install' instead"
fast_install=no
;;
*) no_install=yes ;;
@ -7730,11 +7648,6 @@ func_mode_link ()
arg=$func_stripname_result
;;
-Wl,--as-needed|-Wl,--no-as-needed)
deplibs="$deplibs $arg"
continue
;;
-Wl,*)
func_stripname '-Wl,' '' "$arg"
args=$func_stripname_result
@ -7744,13 +7657,8 @@ func_mode_link ()
IFS=$save_ifs
func_quote_arg pretty "$flag"
func_append arg " $wl$func_quote_arg_result"
# Args in the var 'compiler_flags' causes warnings in MSVC
func_cc_basename "$CC"
case $func_cc_basename_result in
cl|cl.exe) ;;
*) func_append compiler_flags " $wl$func_quote_arg_result" ;;
esac
func_append linker_flags "$func_quote_arg_result,"
func_append compiler_flags " $wl$func_quote_arg_result"
func_append linker_flags " $func_quote_arg_result"
done
IFS=$save_ifs
func_stripname ' ' '' "$arg"
@ -7796,7 +7704,6 @@ func_mode_link ()
# @file GCC response files
# -tp=* Portland pgcc target processor selection
# --sysroot=* for sysroot support
# --target=* for target architecture support
# -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
# -specs=* GCC specs files
# -stdlib=* select c++ std lib with clang
@ -7814,15 +7721,15 @@ func_mode_link ()
# --unwindlib=* select unwinder library with clang
# -f{file|debug|macro|profile}-prefix-map=* needed for lto linking
# -Wa,* Pass flags directly to the assembler
# -W* Warnings, needed for lto
# -Werror, -Werror=* Report (specified) warnings as errors
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*|--target=*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
-O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-no-canonical-prefixes| \
-stdlib=*|-rtlib=*|--unwindlib=*| \
-specs=*|-fsanitize=*|-fno-sanitize*|-shared-libsan|-static-libsan| \
-ffile-prefix-map=*|-fdebug-prefix-map=*|-fmacro-prefix-map=*|-fprofile-prefix-map=*| \
-fdiagnostics-color*|-frecord-gcc-switches| \
-fuse-ld=*|-static-*|-fcilkplus|-W*)
-fuse-ld=*|-static-*|-fcilkplus|-Wa,*|-Werror|-Werror=*)
func_quote_arg pretty "$arg"
arg=$func_quote_arg_result
func_append compile_command " $arg"
@ -8163,15 +8070,6 @@ func_mode_link ()
lib=
found=false
case $deplib in
-Wl,--as-needed|-Wl,--no-as-needed)
if test prog,link = "$linkmode,$pass"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
fi
continue
;;
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \
|-threads|-fopenmp|-fopenmp=*|-openmp|-mp|-xopenmp|-omp|-qsmp=*)
if test prog,link = "$linkmode,$pass"; then
@ -8330,15 +8228,8 @@ func_mode_link ()
fi
case $linkmode in
lib)
# Linking convenience modules and compiler provided static libraries
# into shared libraries is allowed, but linking other static
# libraries is non-portable.
case $deplib in
*/libgcc*.$libext | */libclang_rt*.$libext)
deplibs="$deplib $deplibs"
continue
;;
esac
# Linking convenience modules into shared libraries is allowed,
# but linking other static libraries is non-portable.
case " $dlpreconveniencelibs " in
*" $deplib "*) ;;
*)
@ -9421,21 +9312,29 @@ func_mode_link ()
esac
# Check that each of the things are valid numbers.
if echo "$current" | $EGREP -v '(^0$)|(^[1-9]$)|(^[1-9][0-9]{1,4}$)' > /dev/null; then
func_error "CURRENT '$current' must be a nonnegative integer and <= 5 digits"
case $current in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
func_error "CURRENT '$current' must be a nonnegative integer"
func_fatal_error "'$vinfo' is not valid version information"
fi
;;
esac
# Currently limiting revision length by Unix epoch time in nanoseconds.
if echo "$revision" | $EGREP -v '(^0$)|(^[1-9]$)|(^[1-9][0-9]{1,18}$)' > /dev/null; then
func_error "REVISION '$revision' must be a nonnegative integer and <= 19 digits"
case $revision in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
func_error "REVISION '$revision' must be a nonnegative integer"
func_fatal_error "'$vinfo' is not valid version information"
fi
;;
esac
if echo "$age" | $EGREP -v '(^0$)|(^[1-9]$)|(^[1-9][0-9]{1,4}$)' > /dev/null; then
func_error "AGE '$age' must be a nonnegative integer and <= 5 digits"
case $age in
0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
*)
func_error "AGE '$age' must be a nonnegative integer"
func_fatal_error "'$vinfo' is not valid version information"
fi
;;
esac
if test "$age" -gt "$current"; then
func_error "AGE '$age' is greater than the current interface number '$current'"
@ -10123,7 +10022,7 @@ func_mode_link ()
if test -z "$export_symbols"; then
if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then
func_verbose "generating symbol list for '$libname.la'"
export_symbols=$output_objdir/$libname.expsym
export_symbols=$output_objdir/$libname.exp
$opt_dry_run || $RM $export_symbols
cmds=$export_symbols_cmds
save_ifs=$IFS; IFS='~'
@ -10389,7 +10288,7 @@ func_mode_link ()
${skipped_export-false} && {
func_verbose "generating symbol list for '$libname.la'"
export_symbols=$output_objdir/$libname.expsym
export_symbols=$output_objdir/$libname.exp
$opt_dry_run || $RM $export_symbols
libobjs=$output
# Append the command to create the export file.

View File

@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (C) 2019-2026 Free Software Foundation, Inc.
# Copyright (C) 2019-2025 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -15,7 +15,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# Written by Bruno Haible.
# This script checks whether the files in the GNU gettext package
# have the required copyright headers resp. license notices.
@ -112,11 +111,6 @@ func_check_file ()
# These are a mostly data. They don't have much programmer expression.
return 0 ;;
*/LINGUAS )
# These are generated files that contain only data.
# They don't have any programmer expression.
return 0 ;;
*/ChangeLog* )
# ChangeLog files are convenience information, not worth sueing for.
return 0 ;;
@ -167,7 +161,7 @@ func_check_file ()
# This is a form, used for communication with the FSF.
return 0 ;;
/gettext-tools/autotools/archive.dir.tar )
/gettext-tools/misc/archive.dir.tar )
# This is an archive of files that were part of earlier gettext releases.
# As a binary file, it cannot have a copyright header.
return 0 ;;

View File

@ -17,7 +17,7 @@ dnl along with this program. If not, see <https://www.gnu.org/licenses/>.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
AC_INIT([gettext], [package], [bug-gettext@gnu.org])
AC_INIT([gettext], [dummy], [bug-gettext@gnu.org])
AC_CONFIG_SRCDIR([gettext-tools/src/msgfmt.c])
AC_CONFIG_AUX_DIR([build-aux])
VERSION_NUMBER=`cd $srcdir \

View File

@ -1,3 +1,2 @@
Ulrich Drepper wrote the intl subdirectory.
Bruno Haible added the intl-java, intl-csharp, intl-d, intl-modula2, and
libasprintf subdirectories.
Bruno Haible added the intl-java and libasprintf subdirectories.

View File

@ -1,5 +1,5 @@
## Makefile for the gettext-runtime directory of GNU gettext
## Copyright (C) 1995-2025 Free Software Foundation, Inc.
## Copyright (C) 1995-2024 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@ -26,7 +26,7 @@ SUBDIR_libasprintf = libasprintf
else
SUBDIR_libasprintf =
endif
SUBDIRS = doc intl intl-java intl-csharp intl-d intl-modula2 gnulib-lib $(SUBDIR_libasprintf) src po man m4 tests install-tests
SUBDIRS = doc intl intl-java intl-csharp gnulib-lib $(SUBDIR_libasprintf) src po man m4 tests
EXTRA_DIST = BUGS
@ -52,17 +52,15 @@ EXTRA_DIST += INSTALL.windows
# Hidden from automake, but really activated. Works around an automake bug.
#distdir: distdir1
.PHONY: distdir1
distdir1: man/gettext.1 man/ngettext.1 man/printf_gettext.1 man/printf_ngettext.1 man/envsubst.1
man/gettext.1 man/ngettext.1 man/printf_gettext.1 man/printf_ngettext.1 man/envsubst.1: gen-man1
distdir1: man/gettext.1 man/ngettext.1 man/envsubst.1
man/gettext.1 man/ngettext.1 man/envsubst.1: gen-man1
.PHONY: gen-man1
gen-man1: src/gettext.c man/gettext.x \
src/ngettext.c man/ngettext.x \
src/printf_gettext.c man/printf_gettext.x \
src/printf_ngettext.c man/printf_ngettext.x \
src/envsubst.c man/envsubst.x
cd gnulib-lib && $(MAKE) $(AM_MAKEFLAGS)
cd src && $(MAKE) $(AM_MAKEFLAGS) gettext$(EXEEXT) ngettext$(EXEEXT) printf_gettext$(EXEEXT) printf_ngettext$(EXEEXT) envsubst$(EXEEXT)
cd man && $(MAKE) $(AM_MAKEFLAGS) gettext.1 ngettext.1 printf_gettext.1 printf_ngettext.1 envsubst.1
cd src && $(MAKE) $(AM_MAKEFLAGS) gettext$(EXEEXT) ngettext$(EXEEXT) envsubst$(EXEEXT)
cd man && $(MAKE) $(AM_MAKEFLAGS) gettext.1 ngettext.1 envsubst.1
maintainer-update-po: $(top_builddir)/config.status

View File

@ -1,16 +1,3 @@
Version 0.26 - July 2025
* Two new programs 'printf_gettext' and 'printf_ngettext' are provided,
that do formatted output with a localized format string in a more
efficient way (without spawning a subshell).
Version 0.25 - April 2025
* New library: libintl_d.a contains the runtime for using GNU gettext
message catalogs in the D programming language.
* New library: libintl_m2.so contains the runtime for using GNU gettext
message catalogs in the Modula-2 programming language.
Version 0.23 - December 2023
* In the C.UTF-8 locale, like in the C locale, the *gettext() functions

View File

@ -1,5 +1,5 @@
dnl Configuration for the gettext-runtime directory of GNU gettext
dnl Copyright (C) 1995-2026 Free Software Foundation, Inc.
dnl Copyright (C) 1995-2025 Free Software Foundation, Inc.
dnl
dnl This program is free software: you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
@ -17,7 +17,7 @@ dnl along with this program. If not, see <https://www.gnu.org/licenses/>.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
AC_INIT([gettext-runtime], [package], [bug-gettext@gnu.org])
AC_INIT([gettext-runtime], [dummy], [bug-gettext@gnu.org])
AC_CONFIG_SRCDIR([intl/dcigettext.c])
AC_CONFIG_AUX_DIR([../build-aux])
VERSION_NUMBER=`cd $srcdir/.. \
@ -60,20 +60,6 @@ else
fi
AC_SUBST([BUILDCSHARP])
gt_D_CHOICE
AS_IF([test "$D_CHOICE" != no],
[gt_DCOMP
if test -n "$DC"; then
BUILDD=yes
else
BUILDD=no
fi
],
[BUILDD=no
])
AC_SUBST([BUILDD])
AM_CONDITIONAL([BUILD_D], [test $BUILDD = yes])
dnl Check for host type.
AC_CANONICAL_HOST
@ -131,6 +117,7 @@ AM_GNU_GETTEXT([use-libtool], [need-ngettext], [\${top_builddir}/intl])
dnl Checks for header files, functions and declarations.
gl_INIT
AC_TYPE_SIZE_T
AC_CHECK_FUNCS([setlocale])
dnl Compilation on native Windows and Cygwin needs special Makefile rules,
dnl because
@ -149,10 +136,6 @@ else
is_woe32dll=no
fi
AM_CONDITIONAL([WOE32DLL], [test $is_woe32dll = yes])
if test $is_woe32dll = yes; then
AC_DEFINE([WOE32DLL], [1],
[Define when --enable-shared is used on Windows.])
fi
dnl Put some default definitions into config.h.
AH_BOTTOM([
@ -162,9 +145,11 @@ AH_BOTTOM([
the C macro DLL_EXPORT (together with PIC) when compiling for a shared
library (called DLL under Windows) and does not define it when compiling
an object file meant to be linked statically into some executable. */
/* But in the scope of this configure file (gettext-runtime/ without intl and
libasprintf), there is no shared library. So it's simple. */
#define DLL_VARIABLE
#if (defined _WIN32 || defined __CYGWIN__) && defined DLL_EXPORT && !defined IN_RELOCWRAPPER
# define DLL_VARIABLE __declspec (dllimport)
#else
# define DLL_VARIABLE
#endif
/* Extra OS/2 (emx+gcc) defines. */
#if defined __EMX__ && !defined __KLIBC__
@ -172,43 +157,6 @@ AH_BOTTOM([
#endif
])
gt_MODULA2_CHOICE
AS_IF([test "$MODULA2_CHOICE" != no],
[gt_MODULA2COMP
AS_IF([test -n "$M2C"],
[BUILDMODULA2=yes
AC_COMPUTE_INT([VALUE_OF_LC_ALL], [LC_ALL], [#include <locale.h>])
AC_COMPUTE_INT([VALUE_OF_LC_CTYPE], [LC_CTYPE], [#include <locale.h>])
AC_COMPUTE_INT([VALUE_OF_LC_NUMERIC], [LC_NUMERIC], [#include <locale.h>])
AC_COMPUTE_INT([VALUE_OF_LC_TIME], [LC_TIME], [#include <locale.h>])
AC_COMPUTE_INT([VALUE_OF_LC_COLLATE], [LC_COLLATE], [#include <locale.h>])
AC_COMPUTE_INT([VALUE_OF_LC_MONETARY], [LC_MONETARY], [#include <locale.h>])
AC_COMPUTE_INT([VALUE_OF_LC_MESSAGES], [LC_MESSAGES], [
#include <locale.h>
#if defined _WIN32 && !defined __CYGWIN__
# define LC_MESSAGES 1729
#endif
])
AC_SUBST([VALUE_OF_LC_ALL])
AC_SUBST([VALUE_OF_LC_CTYPE])
AC_SUBST([VALUE_OF_LC_NUMERIC])
AC_SUBST([VALUE_OF_LC_TIME])
AC_SUBST([VALUE_OF_LC_COLLATE])
AC_SUBST([VALUE_OF_LC_MONETARY])
AC_SUBST([VALUE_OF_LC_MESSAGES])
AC_REQUIRE([AC_LIB_RPATH])
M2SHLIBEXT="$acl_shlibext"
AC_SUBST([M2SHLIBEXT])
],
[BUILDMODULA2=no
])
],
[BUILDMODULA2=no
])
AC_SUBST([BUILDMODULA2])
AM_CONDITIONAL([BUILD_MODULA2], [test $BUILDMODULA2 = yes])
AM_CONDITIONAL([USE_INCLUDED_LIBINTL], [test $USE_INCLUDED_LIBINTL = yes])
dnl Check for tools needed for formatting the documentation.
ac_aux_dir_abs=`cd $ac_aux_dir && pwd`
AC_PATH_PROG([PERL], [perl], [$ac_aux_dir_abs/missing perl])
@ -220,6 +168,17 @@ AC_SUBST([CROSS_COMPILING])
dnl Checks for optional programs for the tests/lang-* tests.
gl_PROG_ANSI_CXX([CXX], [ANSICXX])
dnl Checks for special libraries for the tests/test-lock test.
dnl On some systems, sched_yield is in librt, rather than in libpthread.
LIBSCHED=
if test $gl_threads_api = posix; then
dnl Solaris has sched_yield in librt, not in libpthread or libc.
AC_CHECK_LIB([rt], [sched_yield], [LIBSCHED=-lrt],
[dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
AC_CHECK_LIB([posix4], [sched_yield], [LIBSCHED=-lposix4])])
fi
AC_SUBST([LIBSCHED])
dnl Determine whether to build libasprintf.
AC_ARG_ENABLE([libasprintf],
[ --disable-libasprintf do not build libasprintf],
@ -238,26 +197,6 @@ dnl Determine variables used by uninstalled-config.sh.
ENABLE_SHARED="$enable_shared"
AC_SUBST([ENABLE_SHARED])
dnl Test for features used in install-tests.
dnl shlibpath_var and PATH_SEPARATOR are set by LT_INIT.
if test $USE_INCLUDED_LIBINTL = yes; then
INSTALLED_LIBINTL="-lintl $LIBICONV $INTL_MACOSX_LIBS $INTL_WINDOWS_LIBS"
else
INSTALLED_LIBINTL=
fi
AC_SUBST([INSTALLED_LIBINTL])
AC_SUBST([PATH_SEPARATOR])
if test -n "${shlibpath_var}"; then
if test "${shlibpath_var}" = PATH; then
AUGMENT_SHLIBPATH="PATH='\$(bindir)'${PATH_SEPARATOR}\"\$\$PATH\";"
else
AUGMENT_SHLIBPATH="${shlibpath_var}='\$(libdir)':\"\$\$${shlibpath_var}\"; export ${shlibpath_var};"
fi
else
AUGMENT_SHLIBPATH=
fi
AC_SUBST([AUGMENT_SHLIBPATH])
AC_CONFIG_SUBDIRS([intl])
AC_CONFIG_SUBDIRS([libasprintf])
@ -272,11 +211,6 @@ AC_CONFIG_FILES([intl-java/Makefile])
AC_CONFIG_FILES([intl-csharp/Makefile])
AC_CONFIG_FILES([intl-d/Makefile])
AC_CONFIG_FILES([intl-modula2/Makefile])
AC_CONFIG_FILES([intl-modula2/Libintl.def])
AC_CONFIG_FILES([gnulib-lib/Makefile])
AC_CONFIG_FILES([src/Makefile])
@ -291,6 +225,4 @@ AC_CONFIG_FILES([m4/Makefile])
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([install-tests/Makefile])
AC_OUTPUT

View File

@ -1,5 +1,5 @@
## Makefile for the gettext-runtime/doc subdirectory of GNU gettext
## Copyright (C) 1995-2025 Free Software Foundation, Inc.
## Copyright (C) 1995-1997, 2001-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
@ -21,9 +21,4 @@ EXTRA_DIST =
EXTRA_DIST += nls.texi matrix.texi
EXTRA_DIST += \
rt-gettext.texi \
rt-ngettext.texi \
rt-printf_gettext.texi \
rt-printf_ngettext.texi \
rt-envsubst.texi
EXTRA_DIST += rt-gettext.texi rt-ngettext.texi rt-envsubst.texi

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
@c This file is part of the GNU gettext manual.
@c Copyright (C) 1995-2026 Free Software Foundation, Inc.
@c Copyright (C) 1995-2025 Free Software Foundation, Inc.
@c See the file gettext.texi for copying conditions.
@node The original ABOUT-NLS
@ -12,7 +12,7 @@ as a file named @code{ABOUT-NLS}.
@strong{ NOTE: } This documentation section is outdated. It it included
here for historical purposes only.
@set STATUS January 2026
@set STATUS February 2025
Free software is going international! The Free Translation Project is
a way to get maintainers of free software, translators, and users all

View File

@ -1,5 +1,5 @@
@c This file is part of the GNU gettext manual.
@c Copyright (C) 1995-2025 Free Software Foundation, Inc.
@c Copyright (C) 1995-2019 Free Software Foundation, Inc.
@c See the file gettext.texi for copying conditions.
@pindex gettext
@ -13,7 +13,7 @@ gettext [@var{option}] -s [@var{msgid}]...
The @code{gettext} program displays the native language translation of a
textual message.
@noindent @strong{Options and arguments}
@noindent @strong{Arguments}
@table @samp
@item -c @var{context}
@ -43,31 +43,26 @@ interpreted like the System V @samp{echo} program did.
This option is only for compatibility with the @samp{echo} program or shell
built-in. It has no effect.
@item -n
@opindex -n@r{, @code{gettext} option}
This option has only an effect if the @code{-s} option is given. It
suppresses the additional newline at the end.
@item [@var{textdomain}] @var{msgid}
Retrieve translated message corresponding to @var{msgid} from @var{textdomain}.
@end table
@noindent @strong{Informative output}
@table @samp
@item -h
@itemx --help
@opindex -h@r{, @code{gettext} option}
@opindex --help@r{, @code{gettext} option}
Display this help and exit.
@item -n
@opindex -n@r{, @code{gettext} option}
This option has only an effect if the @code{-s} option is given. It
suppresses the additional newline at the end.
@item -V
@itemx --version
@opindex -V@r{, @code{gettext} option}
@opindex --version@r{, @code{gettext} option}
Output version information and exit.
@item [@var{textdomain}] @var{msgid}
Retrieve translated message corresponding to @var{msgid} from @var{textdomain}.
@end table
If the @var{textdomain} parameter is not given, the domain is determined from

View File

@ -1,5 +1,5 @@
@c This file is part of the GNU gettext manual.
@c Copyright (C) 1995-2025 Free Software Foundation, Inc.
@c Copyright (C) 1995-2019 Free Software Foundation, Inc.
@c See the file gettext.texi for copying conditions.
@pindex ngettext
@ -12,7 +12,7 @@ ngettext [@var{option}] [@var{textdomain}] @var{msgid} @var{msgid-plural} @var{c
The @code{ngettext} program displays the native language translation of a
textual message whose grammatical form depends on a number.
@noindent @strong{Options and arguments}
@noindent @strong{Arguments}
@table @samp
@item -c @var{context}
@ -42,20 +42,6 @@ interpreted like the System V @samp{echo} program did.
This option is only for compatibility with the @samp{gettext} program. It has
no effect.
@item @var{textdomain}
Retrieve translated message from @var{textdomain}.
@item @var{msgid} @var{msgid-plural}
Translate @var{msgid} (English singular) / @var{msgid-plural} (English plural).
@item @var{count}
Choose singular/plural form based on this value.
@end table
@noindent @strong{Informative output}
@table @samp
@item -h
@itemx --help
@opindex -h@r{, @code{ngettext} option}
@ -68,6 +54,15 @@ Display this help and exit.
@opindex --version@r{, @code{ngettext} option}
Output version information and exit.
@item @var{textdomain}
Retrieve translated message from @var{textdomain}.
@item @var{msgid} @var{msgid-plural}
Translate @var{msgid} (English singular) / @var{msgid-plural} (English plural).
@item @var{count}
Choose singular/plural form based on this value.
@end table
If the @var{textdomain} parameter is not given, the domain is determined from

View File

@ -1,141 +0,0 @@
@c This file is part of the GNU gettext manual.
@c Copyright (C) 2025 Free Software Foundation, Inc.
@c See the file gettext.texi for copying conditions.
@pindex printf_gettext
@cindex @code{printf_gettext} program, usage
@example
printf_gettext [@var{option}] @var{format} [@var{argument}]...
@end example
@cindex lookup format string translation
@cindex formatted output in Shell
The @code{printf_gettext} program produces formatted output,
applying the native language translation of @var{format}
to the @var{argument}s.
@noindent @strong{Options and arguments}
@table @samp
@item -c @var{context}
@itemx --context=@var{context}
@opindex -c@r{, @code{printf_gettext} option}
@opindex --context@r{, @code{printf_gettext} option}
Specify the context for the format string to be translated.
See @ref{Contexts} for details.
@item @var{format}
The format string.
@item @var{argument}
A string or numeric argument.
@end table
@noindent @strong{Informative output}
@table @samp
@item -h
@itemx --help
@opindex -h@r{, @code{printf_gettext} option}
@opindex --help@r{, @code{printf_gettext} option}
Display this help and exit.
@item -V
@itemx --version
@opindex -V@r{, @code{printf_gettext} option}
@opindex --version@r{, @code{printf_gettext} option}
Output version information and exit.
@end table
The format string consists of
@itemize @bullet
@item
plain text,
@item
directives, that start with @samp{%},
@item
escape sequences, that start with a backslash.
@end itemize
A directive that consumes an argument
@itemize @bullet
@item
starts with @samp{%} or @samp{%@var{m}$} where @var{m} is a positive integer,
@item
is optionally followed by any of the characters
@samp{#}, @samp{0}, @samp{-}, @samp{ }, @samp{+},
each of which acts as a flag,
@item
is optionally followed by a width specification (a nonnegative integer),
@item
is optionally followed by @samp{.} and a precision specification
(an optional nonnegative integer),
@item
is finished by a specifier
@itemize @bullet
@item
@samp{c}, that prints a character,
@item
@samp{s}, that prints a string,
@item
@samp{i}, @samp{d}, that print an integer,
@item
@samp{u}, @samp{o}, @samp{x}, @samp{X},
that print an unsigned (nonnegative) integer,
@item
@samp{e}, @samp{E}, that print a floating-point number in scientific notation,
@item
@samp{f}, @samp{F}, that print a floating-point number without an exponent,
@item
@samp{g}, @samp{G}, that print a floating-point number in general notation,
@item
@samp{a}, @samp{A}, that print a floating-point number in hexadecimal notation.
@end itemize
@end itemize
Some flag+specifier combinations are invalid:
@itemize @bullet
@item
The @samp{#} flag with the specifiers
@samp{c}, @samp{s}, @samp{i}, @samp{d}, @samp{u}.
@item
The @samp{0} flag with the specifiers
@samp{c}, @samp{s}.
@end itemize
Additionally there is the directive @samp{%%}, that prints a single @code{%}.
If a directive specifies the argument by its number (@samp{%@var{m}$} notation),
all directives that consume an argument must do so.
The escape sequences are:
@table @code
@item \\
backslash
@item \a
alert (BEL)
@item \b
backspace (BS)
@item \f
form feed (FF)
@item \n
new line (LF)
@item \r
carriage return (CR)
@item \t
horizontal tab (HT)
@item \v
vertical tab (VT)
@item \@var{nnn}
octal number with 1 to 3 octal digits
@end table
@noindent @strong{Environment Variables}
The translation of the format string is looked up in the translation domain
given by the environment variable @code{TEXTDOMAIN}.
It is looked up in the catalogs directory given by the environment variable
@code{TEXTDOMAINDIR} or, if not present, in the default catalogs directory.

View File

@ -1,149 +0,0 @@
@c This file is part of the GNU gettext manual.
@c Copyright (C) 2025 Free Software Foundation, Inc.
@c See the file gettext.texi for copying conditions.
@pindex printf_ngettext
@cindex @code{printf_ngettext} program, usage
@example
printf_ngettext [@var{option}] @var{format} @var{format-plural} @var{count} [@var{argument}]...
@end example
@cindex lookup format string translation with plural
@cindex formatted output in Shell
The @code{printf_ngettext} program produces formatted output,
applying the native language translation of
@var{format} and @var{format-plural}, depending on @var{count},
to the @var{argument}s.
@noindent @strong{Options and arguments}
@table @samp
@item -c @var{context}
@itemx --context=@var{context}
@opindex -c@r{, @code{printf_ngettext} option}
@opindex --context@r{, @code{printf_ngettext} option}
Specify the context for the format string to be translated.
See @ref{Contexts} for details.
@item @var{format}
English singular form of format string.
@item @var{format-plural}
English plural form of format string.
@item @var{count}
A cardinal number.
The singular/plural form is chosen based on this value.
@item @var{argument}
A string or numeric argument.
@end table
@noindent @strong{Informative output}
@table @samp
@item -h
@itemx --help
@opindex -h@r{, @code{printf_ngettext} option}
@opindex --help@r{, @code{printf_ngettext} option}
Display this help and exit.
@item -V
@itemx --version
@opindex -V@r{, @code{printf_ngettext} option}
@opindex --version@r{, @code{printf_ngettext} option}
Output version information and exit.
@end table
Each format string consists of
@itemize @bullet
@item
plain text,
@item
directives, that start with @samp{%},
@item
escape sequences, that start with a backslash.
@end itemize
A directive that consumes an argument
@itemize @bullet
@item
starts with @samp{%} or @samp{%@var{m}$} where @var{m} is a positive integer,
@item
is optionally followed by any of the characters
@samp{#}, @samp{0}, @samp{-}, @samp{ }, @samp{+},
each of which acts as a flag,
@item
is optionally followed by a width specification (a nonnegative integer),
@item
is optionally followed by @samp{.} and a precision specification
(an optional nonnegative integer),
@item
is finished by a specifier
@itemize @bullet
@item
@samp{c}, that prints a character,
@item
@samp{s}, that prints a string,
@item
@samp{i}, @samp{d}, that print an integer,
@item
@samp{u}, @samp{o}, @samp{x}, @samp{X},
that print an unsigned (nonnegative) integer,
@item
@samp{e}, @samp{E}, that print a floating-point number in scientific notation,
@item
@samp{f}, @samp{F}, that print a floating-point number without an exponent,
@item
@samp{g}, @samp{G}, that print a floating-point number in general notation,
@item
@samp{a}, @samp{A}, that print a floating-point number in hexadecimal notation.
@end itemize
@end itemize
Some flag+specifier combinations are invalid:
@itemize @bullet
@item
The @samp{#} flag with the specifiers
@samp{c}, @samp{s}, @samp{i}, @samp{d}, @samp{u}.
@item
The @samp{0} flag with the specifiers
@samp{c}, @samp{s}.
@end itemize
Additionally there is the directive @samp{%%}, that prints a single @code{%}.
If a directive specifies the argument by its number (@samp{%@var{m}$} notation),
all directives that consume an argument must do so.
The escape sequences are:
@table @code
@item \\
backslash
@item \a
alert (BEL)
@item \b
backspace (BS)
@item \f
form feed (FF)
@item \n
new line (LF)
@item \r
carriage return (CR)
@item \t
horizontal tab (HT)
@item \v
vertical tab (VT)
@item \@var{nnn}
octal number with 1 to 3 octal digits
@end table
@noindent @strong{Environment Variables}
The translation of the format string is looked up in the translation domain
given by the environment variable @code{TEXTDOMAIN}.
It is looked up in the catalogs directory given by the environment variable
@code{TEXTDOMAINDIR} or, if not present, in the default catalogs directory.

View File

@ -1,40 +0,0 @@
## Makefile for gettext-runtime/install-tests.
## Copyright (C) 2025 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## Process this file with automake to produce Makefile.in.
installcheck-local:
$(CC) -I$(includedir) -L$(libdir) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o test-version $(srcdir)/test-version.c $(INSTALLED_LIBINTL)
@AUGMENT_SHLIBPATH@ ./test-version
rm -rf test-version test-version$(EXEEXT)
$(CC) -I$(includedir) -L$(libdir) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-DSRCDIR=\"$(srcdir)/\" \
$(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o test-api $(srcdir)/test-api.c $(INSTALLED_LIBINTL)
@AUGMENT_SHLIBPATH@ ./test-api
rm -rf test-api test-api$(EXEEXT)
PATH='$(bindir)'@PATH_SEPARATOR@"$$PATH"; gettext --version | grep 'GNU gettext' > /dev/null
EXTRA_DIST = \
test-version.c \
test-api.c itest.pot locale/en_US/LC_MESSAGES/itest.mo
CLEANFILES = \
test-version test-version$(EXEEXT) \
test-api test-api$(EXEEXT)

View File

@ -1,22 +0,0 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR Free Software Foundation, Inc.
# This file is distributed under the same license as the GNU gettext package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: GNU gettext 0.25\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-06-18 20:12+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"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: test-api.c:68
msgid "She is the doppelganger of my fiancee."
msgstr ""

View File

@ -1,78 +0,0 @@
/* Test parts of the API.
Copyright (C) 2025-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#include <libintl.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined _WIN32 && !defined __CYGWIN__
# define ENGLISH "English_United States"
# define ENCODING ".1252"
# define LOCALE1 ENGLISH ENCODING
#else
# define LOCALE1 "en_US.UTF-8"
#endif
int
main ()
{
/* Clean up environment. */
#if defined _WIN32 && !defined __CYGWIN__
_putenv ("LANGUAGE=");
_putenv ("OUTPUT_CHARSET=");
#else
unsetenv ("LANGUAGE");
unsetenv ("OUTPUT_CHARSET");
#endif
textdomain ("itest");
#if defined _WIN32 && !defined __CYGWIN__
_putenv ("LC_ALL=" LOCALE1);
#else
setenv ("LC_ALL", LOCALE1, 1);
#endif
if (setlocale (LC_ALL, "") == NULL)
{
fprintf (stderr, "Skipping test: Locale %s is not installed.\n", LOCALE1);
return 0;
}
bindtextdomain ("itest", SRCDIR "locale");
bind_textdomain_codeset ("itest", "UTF-8");
const char *s = gettext ("She is the doppelganger of my fiancee.");
const char *expected = "She is the doppelgänger of my fiancée.";
if (strcmp (s, expected) != 0)
{
fprintf (stderr, "gettext() => %s\n", s);
fprintf (stderr, "Expected: %s\n", expected);
return 1;
}
return 0;
}

View File

@ -1,36 +0,0 @@
/* Test the version information.
Copyright (C) 2025-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#include <libintl.h>
#include <stdio.h>
int
main ()
{
#if defined LIBINTL_VERSION /* GNU libintl, not GNU libc */
if (!(libintl_version == LIBINTL_VERSION))
{
fprintf (stderr, "Installation problem: include file says version 0x%x, whereas library says version 0x%x\n",
LIBINTL_VERSION, libintl_version);
return 1;
}
#endif
return 0;
}

View File

@ -1,5 +1,6 @@
/* GNU gettext for C#
* Copyright (C) 2003-2026 Free Software Foundation, Inc.
* Copyright (C) 2003-2024 Free Software Foundation, Inc.
* Written by Bruno Haible <bruno@clisp.org>, 2003.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@ -15,8 +16,6 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
/* Written by Bruno Haible. */
/*
* Using the GNU gettext approach, compiled message catalogs are assemblies
* containing just one class, a subclass of GettextResourceSet. They are thus

View File

@ -1,66 +0,0 @@
## Makefile for the gettext-runtime/intl-d subdirectory of GNU gettext
## Copyright (C) 2025 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## Process this file with automake to produce Makefile.in.
AUTOMAKE_OPTIONS = 1.10 gnu
RM = rm -f
dincludedir = $(includedir)/d
if BUILD_D
lib_LIBRARIES = libintl_d.a
endif
libintl_d_a_SOURCES = \
gnu/libintl/package.d \
gnu/libintl/libintl.d \
gnu/libintl/internal/low.d
if BUILD_D
libintl_d_a_LIBADD = package.o libintl.o low.o
libintl_d_a_DEPENDENCIES = package.o libintl.o low.o
# Rules for compiling a .d file, that work even without a VPATH variable.
package.o: $(srcdir)/gnu/libintl/package.d
$(SHELL) ../dcomp.sh -I$(srcdir) -c $(srcdir)/gnu/libintl/package.d
libintl.o: $(srcdir)/gnu/libintl/libintl.d
$(SHELL) ../dcomp.sh -I$(srcdir) -c $(srcdir)/gnu/libintl/libintl.d
low.o: $(srcdir)/gnu/libintl/internal/low.d
$(SHELL) ../dcomp.sh -I$(srcdir) -c $(srcdir)/gnu/libintl/internal/low.d
install-data-local: install-d-sources
installdirs-local: installdirs-d-sources
uninstall-local: uninstall-d-sources
install-d-sources:
$(MKDIR_P) $(DESTDIR)$(dincludedir)
$(MKDIR_P) $(DESTDIR)$(dincludedir)/gnu/libintl/internal
@for f in $(libintl_d_a_SOURCES); do \
echo "$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(dincludedir)/$$f"; \
$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(dincludedir)/$$f; \
done
installdirs-d-sources:
$(MKDIR_P) $(DESTDIR)$(dincludedir)
$(MKDIR_P) $(DESTDIR)$(dincludedir)/gnu/libintl/internal
uninstall-d-sources:
@for f in $(libintl_d_a_SOURCES); do \
echo "$(RM) $(DESTDIR)$(dincludedir)/$$f"; \
$(RM) $(DESTDIR)$(dincludedir)/$$f; \
done
endif

View File

@ -1,96 +0,0 @@
/+ D bindings to the GNU gettext runtime library.
Copyright © 2025-2026 Free Software Foundation, Inc.
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
+/
/* Written by Bruno Haible. */
module gnu.libintl.internal.low;
/* <libintl.h> API */
// On some platforms (glibc, musl libc, NetBSD), the symbols have no prefix at
// the linker level. On other platforms, the symbols exist both prefixed with
// 'libintl_' at the linker level and without prefix (see intl-compat.c).
// We can therefore use the symbols without prefix unconditionally.
private extern (C) const(char) * gettext (const(char) *msgid);
private extern (C) const(char) * dgettext (const(char) *domainname, const(char) *msgid);
private extern (C) const(char) * dcgettext (const(char) *domainname, const(char) *msgid, int category);
private extern (C) const(char) * ngettext (const(char) *msgid, const(char) *msgid_plural, ulong n);
private extern (C) const(char) * dngettext (const(char) *domainname, const(char) *msgid, const(char) *msgid_plural, ulong n);
private extern (C) const(char) * dcngettext (const(char) *domainname, const(char) *msgid, const(char) *msgid_plural, ulong n, int category);
private extern (C) const(char) * textdomain (const(char) *domainname);
private extern (C) const(char) * bindtextdomain (const(char) *domainname, const(char) *dirname);
private extern (C) const(char) * bind_textdomain_codeset (const(char) *domainname, const(char) *codeset);
alias unsafe_gettext = gettext;
alias unsafe_dgettext = dgettext;
alias unsafe_dcgettext = dcgettext;
alias unsafe_ngettext = ngettext;
alias unsafe_dngettext = dngettext;
alias unsafe_dcngettext = dcngettext;
alias unsafe_textdomain = textdomain;
alias unsafe_bindtextdomain = bindtextdomain;
alias unsafe_bind_textdomain_codeset = bind_textdomain_codeset;
/+
// The symbols are prefixed with 'libintl_' at the linker level.
private extern (C) const(char) * libintl_gettext (const(char) *msgid);
private extern (C) const(char) * libintl_dgettext (const(char) *domainname, const(char) *msgid);
private extern (C) const(char) * libintl_dcgettext (const(char) *domainname, const(char) *msgid, int category);
private extern (C) const(char) * libintl_ngettext (const(char) *msgid, const(char) *msgid_plural, ulong n);
private extern (C) const(char) * libintl_dngettext (const(char) *domainname, const(char) *msgid, const(char) *msgid_plural, ulong n);
private extern (C) const(char) * libintl_dcngettext (const(char) *domainname, const(char) *msgid, const(char) *msgid_plural, ulong n, int category);
private extern (C) const(char) * libintl_textdomain (const(char) *domainname);
private extern (C) const(char) * libintl_bindtextdomain (const(char) *domainname, const(char) *dirname);
private extern (C) const(char) * libintl_bind_textdomain_codeset (const(char) *domainname, const(char) *codeset);
alias unsafe_gettext = libintl_gettext;
alias unsafe_dgettext = libintl_dgettext;
alias unsafe_dcgettext = libintl_dcgettext;
alias unsafe_ngettext = libintl_ngettext;
alias unsafe_dngettext = libintl_dngettext;
alias unsafe_dcngettext = libintl_dcngettext;
alias unsafe_textdomain = libintl_textdomain;
alias unsafe_bindtextdomain = libintl_bindtextdomain;
alias unsafe_bind_textdomain_codeset = libintl_bind_textdomain_codeset;
+/
/* <locale.h> / <libintl.h> API */
version (OSX)
version = OverriddenSetlocale;
else version (Windows)
version = OverriddenSetlocale;
else version (Cygwin)
version = OverriddenSetlocale;
version (OverriddenSetlocale) {
/* Support for the locale chosen by the user. */
private extern (C) char * libintl_setlocale (int category, const(char) * locale);
alias unsafe_setlocale = libintl_setlocale;
} else {
/* <https://dlang.org/library/core/stdc/locale/setlocale.html>. */
import core.stdc.locale : setlocale;
alias unsafe_setlocale = setlocale;
}

View File

@ -1,157 +0,0 @@
/+ D bindings to the GNU gettext runtime library.
Copyright © 2025-2026 Free Software Foundation, Inc.
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
+/
/* Written by Bruno Haible. */
module gnu.libintl.libintl;
import gnu.libintl.internal.low;
import std.conv;
import std.string;
/* Argument conversion: While string *literals* in D are NUL-terminated, strings
in general are not. Therefore we need to call toStringz, to ensure the C
function receives a NUL-terminated 'const char *'. */
/* Result conversion: When a 'const char *' is passed to a function such as
writeln(), it prints it like a pointer. But we want to print it as a string.
We therefore need to convert the result to 'string'.
For this purpose, to!string works, whereas fromStringz does not. */
public string gettext (string msgid)
{
return to!string(unsafe_gettext(toStringz(msgid)));
}
public string dgettext (string domainname, string msgid)
{
return to!string(unsafe_dgettext(toStringz(domainname), toStringz(msgid)));
}
public string dcgettext (string domainname, string msgid, int category)
{
return to!string(unsafe_dcgettext(toStringz(domainname), toStringz(msgid), category));
}
public string ngettext (string msgid, string msgid_plural, ulong n)
{
return to!string(unsafe_ngettext(toStringz(msgid), toStringz(msgid_plural), n));
}
public string dngettext (string domainname, string msgid, string msgid_plural, ulong n)
{
return to!string(unsafe_dngettext(toStringz(domainname), toStringz(msgid), toStringz(msgid_plural), n));
}
public string dcngettext (string domainname, string msgid, string msgid_plural, ulong n, int category)
{
return to!string(unsafe_dcngettext(toStringz(domainname), toStringz(msgid), toStringz(msgid_plural), n, category));
}
public string pgettext (string msgctxt, string msgid)
{
const(char) * msg_ctxt_id = toStringz(msgctxt ~ "\x04" ~ msgid);
const(char) * translation = unsafe_gettext (msg_ctxt_id);
if (translation == msg_ctxt_id)
return msgid;
else
return to!string(translation);
}
public string dpgettext (string domainname, string msgctxt, string msgid)
{
const(char) * msg_ctxt_id = toStringz(msgctxt ~ "\x04" ~ msgid);
const(char) * translation = unsafe_dgettext (toStringz(domainname), msg_ctxt_id);
if (translation == msg_ctxt_id)
return msgid;
else
return to!string(translation);
}
public string dcpgettext (string domainname, string msgctxt, string msgid, int category)
{
const(char) * msg_ctxt_id = toStringz(msgctxt ~ "\x04" ~ msgid);
const(char) * translation = unsafe_dcgettext (toStringz(domainname), msg_ctxt_id, category);
if (translation == msg_ctxt_id)
return msgid;
else
return to!string(translation);
}
public string npgettext (string msgctxt, string msgid, string msgid_plural, ulong n)
{
const(char) * msg_ctxt_id = toStringz(msgctxt ~ "\x04" ~ msgid);
const(char) * translation = unsafe_ngettext (msg_ctxt_id, toStringz(msgid_plural), n);
if (translation == msg_ctxt_id)
return (n == 1 ? msgid : msgid_plural);
else
return to!string(translation);
}
public string dnpgettext (string domainname, string msgctxt, string msgid, string msgid_plural, ulong n)
{
const(char) * msg_ctxt_id = toStringz(msgctxt ~ "\x04" ~ msgid);
const(char) * translation = unsafe_dngettext (toStringz(domainname), msg_ctxt_id, toStringz(msgid_plural), n);
if (translation == msg_ctxt_id)
return (n == 1 ? msgid : msgid_plural);
else
return to!string(translation);
}
public string dcnpgettext (string domainname, string msgctxt, string msgid, string msgid_plural, ulong n, int category)
{
const(char) * msg_ctxt_id = toStringz(msgctxt ~ "\x04" ~ msgid);
const(char) * translation = unsafe_dcngettext (toStringz(domainname), msg_ctxt_id, toStringz(msgid_plural), n, category);
if (translation == msg_ctxt_id)
return (n == 1 ? msgid : msgid_plural);
else
return to!string(translation);
}
public string textdomain (string domainname)
{
return to!string(unsafe_textdomain(toStringz(domainname)));
}
public string bindtextdomain (string domainname, string dirname)
{
// D uses UTF-8 for its string representation.
unsafe_bindtextdomain(toStringz(domainname), "UTF-8");
return to!string(unsafe_bindtextdomain(toStringz(domainname), toStringz(dirname)));
}
public const(char) * setlocale (int category, const(char) * locale)
{
return unsafe_setlocale (category, locale);
}
unittest
{
import std.stdio;
writeln(gettext("Hello world!"));
}

View File

@ -1,33 +0,0 @@
/+ D bindings to the GNU gettext runtime library.
Copyright © 2025-2026 Free Software Foundation, Inc.
Boost Software License - Version 1.0 - August 17th, 2003
Permission is hereby granted, free of charge, to any person or organization
obtaining a copy of the software and accompanying documentation covered by
this license (the "Software") to use, reproduce, display, distribute,
execute, and transmit the Software, and to prepare derivative works of the
Software, and to permit third-parties to whom the Software is furnished to
do so, all subject to the following:
The copyright notices in the Software and this entire statement, including
the above license grant, this restriction and the following disclaimer,
must be included in all copies of the Software, in whole or in part, and
all derivative works of the Software, unless such copies or derivative
works are solely in the form of machine-executable object code generated by
a source language processor.
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, TITLE AND NON-INFRINGEMENT. IN NO EVENT
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
+/
/* Written by Bruno Haible. */
module gnu.libintl;
public import gnu.libintl.libintl;

View File

@ -1,5 +1,5 @@
/* GNU gettext for Java
* Copyright (C) 2001-2025 Free Software Foundation, Inc.
* Copyright (C) 2001-2024 Free Software Foundation, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@ -99,6 +99,7 @@ public abstract class GettextResource extends ResourceBundle {
// is that we want the generated ResourceBundles to be completely
// standalone, so that migration from the Sun approach to the GNU gettext
// approach (without use of plurals) is as straightforward as possible.
ResourceBundle origCatalog = catalog;
do {
// Try catalog itself.
if (verbose)

View File

@ -1,81 +0,0 @@
All you need to know when hacking (modifying) this directory.
Target platforms
================
Only GNU Modula-2 is supported. We don't care about other Modula-2
implementations.
All platforms supported by GNU Modula-2 are supported. IIRC, this
means all platforms supported by GCC.
Requirements
============
You will need reasonably recent versions of the build tools:
* The GNU Modula-2 compiler and runtime.
+ Homepage:
https://www.nongnu.org/gm2/about.html
https://gcc.gnu.org/
+ Documentation:
https://gcc.gnu.org/onlinedocs/gm2/index.html
+ Pre-built package name:
- On Debian and Debian-based systems: gm2,
- On Red Hat distributions: gcc-gm2, libgm2.
- Other: https://repology.org/project/gcc-gm2/versions
Modula-2 dialects
=================
Essentially, there is PIM4 and ISO.
<https://gcc.gnu.org/onlinedocs/gm2/Dialect.html>
For GNU Modula-2, PIM4 is the default, and -fiso enables ISO extensions.
You need to make sure that the code in this directory does not use ISO
extensions. To do so, run
$ gm2 *.mod
and
$ gm2 -fiso *.mod
and verify that the result is identical in size.
The ISO extensions or differences between PIM4 and ISO are essentially:
* Added data types LONGINT, LONGREAL, COMPLEX, LONGCOMPLEX.
* A LOOP control that is more general than WHILE and REPEAT.
An EXIT statement, like 'break' in C.
* Module definition syntax:
DEFINITION MODULE -> INTERFACE
IMPLEMENTATION MODULE -> IMPLEMENTATION
* More explicit control over visibility and re-exporting.
* Coroutines.
* Exceptions.
* Added and extended standard library modules.
Language reference
==================
For PIM4: https://freepages.modula2.org/report4/modula-2.html
Standard libraries
==================
PIM4 library reference:
https://gcc.gnu.org/onlinedocs/gm2/Standard-procedures.html#Standard-procedures-and-functions-common-to-PIM-and-ISO
https://gcc.gnu.org/onlinedocs/gm2/Base-libraries.html
https://gcc.gnu.org/onlinedocs/gm2/The-PIM-system-module.html
ISO library reference:
https://gcc.gnu.org/onlinedocs/gm2/Standard-procedures.html#ISO-specific-standard-procedures-and-functions
https://gcc.gnu.org/onlinedocs/gm2/M2-ISO-Libraries.html
https://gcc.gnu.org/onlinedocs/gm2/The-ISO-system-module.html
https://www.modula2.org/reference/isomodules/
Implementation in GNU Modula-2:
- The default library is in gcc/m2/gm2-libs/.
- The ISO library is in gcc/m2/gm2-libs-iso/.

View File

@ -1,68 +0,0 @@
(* High-level Modula-2 binding to the GNU libintl library.
Copyright (C) 2025-2026 Free Software Foundation, Inc.
This file 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 file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. *)
(* Written by Bruno Haible. *)
DEFINITION MODULE Libintl;
FROM DynamicStrings IMPORT String;
(* The values of these constants are platform-dependent. *)
CONST LC_ALL = @VALUE_OF_LC_ALL@;
LC_CTYPE = @VALUE_OF_LC_CTYPE@;
LC_NUMERIC = @VALUE_OF_LC_NUMERIC@;
LC_TIME = @VALUE_OF_LC_TIME@;
LC_COLLATE = @VALUE_OF_LC_COLLATE@;
LC_MONETARY = @VALUE_OF_LC_MONETARY@;
LC_MESSAGES = @VALUE_OF_LC_MESSAGES@;
(* const char *setlocale (int category, const char *locale); *)
PROCEDURE SetLocale (category: INTEGER; locale: ARRAY OF CHAR);
(* The *Gettext procedures return a 'String', not an 'ARRAY OF CHAR', because
working with 'ARRAY OF CHAR'
- is clumsy (manual code for copying such arrays in many places),
- is inefficient (copying such arrays takes time),
- introduces arbitrary limits on the length of such arrays. *)
(* const char *gettext (const char *msgid); *)
PROCEDURE Gettext (msgid: ARRAY OF CHAR) : String;
(* const char *dgettext (const char *domainname, const char *msgid); *)
PROCEDURE DGettext (domainname: ARRAY OF CHAR; msgid: ARRAY OF CHAR) : String;
(* const char *dcgettext (const char *domainname, const char *msgid, int category); *)
PROCEDURE DCGettext (domainname: ARRAY OF CHAR; msgid: ARRAY OF CHAR; category: INTEGER) : String;
(* const char *ngettext (const char *msgid, const char *msgid_plural, unsigned long n); *)
PROCEDURE NGettext (msgid: ARRAY OF CHAR; msgid_plural: ARRAY OF CHAR; n: CARDINAL) : String;
(* const char *dngettext (const char *domainname, const char *msgid, const char *msgid_plural, unsigned long n); *)
PROCEDURE DNGettext (domainname: ARRAY OF CHAR; msgid: ARRAY OF CHAR; msgid_plural: ARRAY OF CHAR; n: CARDINAL) : String;
(* const char *dcngettext (const char *domainname, const char *msgid, const char *msgid_plural, unsigned long n, int category); *)
PROCEDURE DCNGettext (domainname: ARRAY OF CHAR; msgid: ARRAY OF CHAR; msgid_plural: ARRAY OF CHAR; n: CARDINAL; category: INTEGER) : String;
(* const char *textdomain (const char *domainname); *)
PROCEDURE TextDomain (domainname: ARRAY OF CHAR);
(* const char *bindtextdomain (const char *domainname, const char *dirname); *)
PROCEDURE BindTextDomain (domainname: ARRAY OF CHAR; dirname: ARRAY OF CHAR);
(* const char *bind_textdomain_codeset (const char *domainname, const char *codeset); *)
PROCEDURE BindTextDomainCodeset (domainname: ARRAY OF CHAR; codeset: ARRAY OF CHAR);
END Libintl.

View File

@ -1,104 +0,0 @@
(* High-level Modula-2 binding to the GNU libintl library.
Copyright (C) 2025-2026 Free Software Foundation, Inc.
This file 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 file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. *)
(* Written by Bruno Haible. *)
IMPLEMENTATION MODULE Libintl;
FROM LibintlFromC IMPORT setlocale,
gettext, dgettext, dcgettext,
ngettext, dngettext, dcngettext,
textdomain, bindtextdomain, bind_textdomain_codeset;
FROM DynamicStrings IMPORT InitStringCharStar, CopyOut;
FROM SYSTEM IMPORT ADDRESS, ADR;
PROCEDURE SetLocale (category: INTEGER; locale: ARRAY OF CHAR);
VAR
unused: ADDRESS;
BEGIN
unused := setlocale(category, ADR(locale));
END SetLocale;
PROCEDURE Gettext (msgid: ARRAY OF CHAR) : String;
VAR
ret: String;
BEGIN
ret := InitStringCharStar(gettext(ADR(msgid)));
RETURN ret;
END Gettext;
PROCEDURE DGettext (domainname: ARRAY OF CHAR; msgid: ARRAY OF CHAR) : String;
VAR
ret: String;
BEGIN
ret := InitStringCharStar(dgettext(ADR(domainname), ADR(msgid)));
RETURN ret;
END DGettext;
PROCEDURE DCGettext (domainname: ARRAY OF CHAR; msgid: ARRAY OF CHAR; category: INTEGER) : String;
VAR
ret: String;
BEGIN
ret := InitStringCharStar(dcgettext(ADR(domainname), ADR(msgid), category));
RETURN ret;
END DCGettext;
PROCEDURE NGettext (msgid: ARRAY OF CHAR; msgid_plural: ARRAY OF CHAR; n: CARDINAL) : String;
VAR
ret: String;
BEGIN
ret := InitStringCharStar(ngettext(ADR(msgid), ADR(msgid_plural), n));
RETURN ret;
END NGettext;
PROCEDURE DNGettext (domainname: ARRAY OF CHAR; msgid: ARRAY OF CHAR; msgid_plural: ARRAY OF CHAR; n: CARDINAL) : String;
VAR
ret: String;
BEGIN
ret := InitStringCharStar(dngettext(ADR(domainname), ADR(msgid), ADR(msgid_plural), n));
RETURN ret;
END DNGettext;
PROCEDURE DCNGettext (domainname: ARRAY OF CHAR; msgid: ARRAY OF CHAR; msgid_plural: ARRAY OF CHAR; n: CARDINAL; category: INTEGER) : String;
VAR
ret: String;
BEGIN
ret := InitStringCharStar(dcngettext(ADR(domainname), ADR(msgid), ADR(msgid_plural), n, category));
RETURN ret;
END DCNGettext;
PROCEDURE TextDomain (domainname: ARRAY OF CHAR);
VAR
unused: ADDRESS;
BEGIN
unused := textdomain(ADR(domainname));
END TextDomain;
PROCEDURE BindTextDomain (domainname: ARRAY OF CHAR; dirname: ARRAY OF CHAR);
VAR
unused: ADDRESS;
BEGIN
unused := bindtextdomain(ADR(domainname), ADR(dirname));
END BindTextDomain;
PROCEDURE BindTextDomainCodeset (domainname: ARRAY OF CHAR; codeset: ARRAY OF CHAR);
VAR
unused: ADDRESS;
BEGIN
unused := bind_textdomain_codeset(ADR(domainname), ADR(codeset));
END BindTextDomainCodeset;
END Libintl.

View File

@ -1,58 +0,0 @@
(* Low-level Modula-2 binding to the GNU libintl library.
Copyright (C) 2025-2026 Free Software Foundation, Inc.
This file 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 file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. *)
(* Written by Bruno Haible. *)
DEFINITION MODULE FOR "C" LibintlFromC;
FROM SYSTEM IMPORT ADDRESS,
CSIZE_T (* should map to 'unsigned long' *);
EXPORT UNQUALIFIED setlocale,
gettext, dgettext, dcgettext, ngettext, dngettext, dcngettext,
textdomain, bindtextdomain, bind_textdomain_codeset;
(* const char *setlocale (int category, const char *locale); *)
PROCEDURE setlocale (category: INTEGER; locale: ADDRESS) : ADDRESS;
(* const char *gettext (const char *msgid); *)
PROCEDURE gettext (msgid: ADDRESS) : ADDRESS;
(* const char *dgettext (const char *domainname, const char *msgid); *)
PROCEDURE dgettext (domainname: ADDRESS; msgid: ADDRESS) : ADDRESS;
(* const char *dcgettext (const char *domainname, const char *msgid, int category); *)
PROCEDURE dcgettext (domainname: ADDRESS; msgid: ADDRESS; category: INTEGER) : ADDRESS;
(* const char *ngettext (const char *msgid, const char *msgid_plural, unsigned long n); *)
PROCEDURE ngettext (msgid: ADDRESS; msgid_plural: ADDRESS; n: CSIZE_T) : ADDRESS;
(* const char *dngettext (const char *domainname, const char *msgid, const char *msgid_plural, unsigned long n); *)
PROCEDURE dngettext (domainname: ADDRESS; msgid: ADDRESS; msgid_plural: ADDRESS; n: CSIZE_T) : ADDRESS;
(* const char *dcngettext (const char *domainname, const char *msgid, const char *msgid_plural, unsigned long n, int category); *)
PROCEDURE dcngettext (domainname: ADDRESS; msgid: ADDRESS; msgid_plural: ADDRESS; n: CSIZE_T; category: INTEGER) : ADDRESS;
(* const char *textdomain (const char *domainname); *)
PROCEDURE textdomain (domainname: ADDRESS) : ADDRESS;
(* const char *bindtextdomain (const char *domainname, const char *dirname); *)
PROCEDURE bindtextdomain (domainname: ADDRESS; dirname: ADDRESS) : ADDRESS;
(* const char *bind_textdomain_codeset (const char *domainname, const char *codeset); *)
PROCEDURE bind_textdomain_codeset (domainname: ADDRESS; codeset: ADDRESS) : ADDRESS;
END LibintlFromC.

View File

@ -1,106 +0,0 @@
## Makefile for the gettext-runtime/intl-modula2 subdirectory of GNU gettext
## Copyright (C) 2025 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## Process this file with automake to produce Makefile.in.
AUTOMAKE_OPTIONS = 1.10 gnu
EXTRA_DIST =
BUILT_SOURCES =
MOSTLYCLEANFILES = core *.stackdump
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
SUFFIXES =
RM = rm -f
# Cf. <https://lists.nongnu.org/archive/html/gm2/2025-04/msg00015.html>
# and <https://lists.nongnu.org/archive/html/gm2/2025-04/msg00022.html>
m2includedir = $(includedir)/m2
if BUILD_MODULA2
lib_LTLIBRARIES = libintl_m2.la
endif
nodist_libintl_m2_la_SOURCES = Libintl.def
libintl_m2_la_SOURCES = Libintl.mod LibintlFromC.def
if BUILD_MODULA2
# What object files to include in libintl_m2.la.
libintl_m2_la_LIBADD = Libintl.lo
libintl_m2_la_DEPENDENCIES = Libintl.lo
if USE_INCLUDED_LIBINTL
libintl_m2_la_LIBADD += ../intl/libintl.la
endif
nodist_m2include_HEADERS = Libintl.def
BUILT_SOURCES += Libintl.def
# Rules for compiling a .mod file, that work even without a VPATH variable.
AM_M2FLAGS = -I. -I$(srcdir)
Libintl.lo: Libintl.def $(srcdir)/Libintl.mod $(srcdir)/LibintlFromC.def
$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(M2C) $(AM_M2FLAGS) $(M2FLAGS) -c -o $@ $(srcdir)/Libintl.mod
# Libtool's library version information for libintl_m2.
# Before making a gettext release, you must change this according to the
# libtool documentation, section "Library interface versions".
LTV_CURRENT=0
LTV_REVISION=0
LTV_AGE=0
# How to build libintl_m2.la.
# Finding the gm2 libm2pim is hairy:
# - In GCC builds from source, the .la files are present and work.
# - In distros, either libm2pim.so may work, or m2/m2pim/libm2pim.so, depending
# on the distro's packaging.
libintl_m2_la_LDFLAGS = \
-no-undefined \
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
-rpath $(libdir) \
$$(libm2=`$(M2C) -print-file-name=libm2pim.la`; \
if test "$$libm2" != 'libm2pim.la'; then dir=`dirname "$$libm2"`; echo "-L$$dir" -lm2pim; else \
libm2=`$(M2C) -print-file-name=libm2pim.$(M2SHLIBEXT)`; \
if test "$$libm2" != 'libm2pim.$(M2SHLIBEXT)'; then dir=`dirname "$$libm2"`; echo "-L$$dir" -lm2pim; else \
libm2=`$(M2C) -print-file-name=m2/m2pim/libm2pim.$(M2SHLIBEXT)`; \
if test "$$libm2" != 'm2/m2pim/libm2pim.$(M2SHLIBEXT)'; then dir=`dirname "$$libm2"`; echo "-L$$dir" -lm2pim; fi; \
fi; \
fi)
# Installation of libintl_m2.la.
install-exec-local: install-exec-libintl
install-exec-libintl: libintl_m2.la
$(mkdir_p) $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=install \
$(INSTALL_DATA) libintl_m2.la $(DESTDIR)$(libdir)/libintl_m2.la; \
if test "@RELOCATABLE@" = yes; then \
dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl_m2.la | sed -e "s,^',," -e "s,'\$$,,"`; \
if test -n "$$dependencies"; then \
rm -f $(DESTDIR)$(libdir)/libintl_m2.la; \
fi; \
fi
installdirs-local: installdirs-libintl
installdirs-libintl:
$(mkdir_p) $(DESTDIR)$(libdir)
uninstall-local: uninstall-libintl
uninstall-libintl:
$(LIBTOOL) --mode=uninstall \
rm -f $(DESTDIR)$(libdir)/libintl_m2.la
endif
EXTRA_DIST += HACKING

View File

@ -1,6 +1,6 @@
## Makefile for the gettext-runtime/intl and gettext-tools/intl subdirectories
## of GNU gettext.
## Copyright (C) 1995-2026 Free Software Foundation, Inc.
## Copyright (C) 1995-2025 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
@ -240,7 +240,6 @@ libgnuintl.h: $(srcdir)/libgnuintl.in.h $(srcdir)/export.h
| sed -e 's,@''HAVE_VISIBILITY''@,@HAVE_VISIBILITY@,g' \
| sed -e 's,@''WOE32DLL''@,@WOE32DLL@,g' \
> libgnuintl.h
BUILT_SOURCES += libgnuintl.h
MOSTLYCLEANFILES += libgnuintl.h
libintl.h: $(srcdir)/libgnuintl.in.h
@ -250,13 +249,7 @@ libintl.h: $(srcdir)/libgnuintl.in.h
-e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
-e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
-e 's,@''ENHANCE_LOCALE_FUNCS''@,@ENHANCE_LOCALE_FUNCS@,g' \
< $(srcdir)/libgnuintl.in.h \
| if test '@WOE32DLL@' = 1; then \
sed -e 's/extern \([^()]*\);/extern __declspec (dllimport) \1;/'; \
else \
cat; \
fi \
| cat > libintl.h
< $(srcdir)/libgnuintl.in.h > libintl.h
MOSTLYCLEANFILES += libintl.h
# The Automake generated .y.c rule is broken: When executed in a VPATH build,
@ -447,7 +440,7 @@ endif
# Before making a gettext release, you must change this according to the
# libtool documentation, section "Library interface versions".
LTV_CURRENT=12
LTV_REVISION=6
LTV_REVISION=3
LTV_AGE=4
# How to build libintl.la and libgnuintl.la.
@ -470,7 +463,7 @@ install-exec-local: install-exec-libintl
install-exec-libintl: libintl.la
$(mkdir_p) $(DESTDIR)$(libdir)
$(LIBTOOL) --mode=install \
$(INSTALL) libintl.la $(DESTDIR)$(libdir)/libintl.la; \
$(INSTALL_DATA) libintl.la $(DESTDIR)$(libdir)/libintl.la; \
if test "@RELOCATABLE@" = yes; then \
dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
if test -n "$$dependencies"; then \

View File

@ -1,5 +1,5 @@
/* Implementation of the bindtextdomain(3) function
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,5 @@
/* Symbols for backward compatibility.
Copyright (C) 2023-2026 Free Software Foundation, Inc.
Copyright (C) 2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#include <config.h>
/* Specification. */

View File

@ -17,7 +17,7 @@ dnl along with this program. If not, see <https://www.gnu.org/licenses/>.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
AC_INIT([libintl], [package], [bug-gettext@gnu.org])
AC_INIT([libintl], [dummy], [bug-gettext@gnu.org])
AC_CONFIG_SRCDIR([dcigettext.c])
AC_CONFIG_AUX_DIR([../../build-aux])
VERSION_NUMBER=`cd $srcdir/../.. \
@ -306,6 +306,9 @@ AH_VERBATIM([znoexport], [
#define gl_locale_name_environ _libintl_locale_name_environ
#define gl_locale_name_default _libintl_locale_name_default
#define gl_locale_name_unsafe _libintl_locale_name_unsafe
#define rpl_newlocale _libintl_newlocale
#define rpl_duplocale _libintl_duplocale
#define rpl_freelocale _libintl_freelocale
/* Symbols defined by gnulib module 'lock'. */
#if USE_ISOC_THREADS || USE_ISOC_AND_POSIX_THREADS
#define glthread_lock_init _libintl_lock_init
@ -452,11 +455,6 @@ if false; then
AC_DEFINE([rpl_vfprintf], [_libintl_vfprintf], [Hidden symbol.])
fi
dnl These symbols must not be hidden; they are exported via libgnuintl.in.h.
AC_DEFINE([rpl_newlocale], [libintl_newlocale], [Exported symbol.])
AC_DEFINE([rpl_duplocale], [libintl_duplocale], [Exported symbol.])
AC_DEFINE([rpl_freelocale], [libintl_freelocale], [Exported symbol.])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([gnulib-lib/Makefile])

View File

@ -1,5 +1,5 @@
/* Implementation of the dcgettext(3) function.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,5 @@
/* Implementation of the internal dcigettext function.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
/* 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. */

View File

@ -1,5 +1,5 @@
/* Implementation of the dcngettext(3) function.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,5 @@
/* Implementation of the dgettext(3) function.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,5 @@
/* Implementation of the dngettext(3) function.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,5 @@
/* Plural expression evaluation.
Copyright (C) 2000-2026 Free Software Foundation, Inc.
Copyright (C) 2000-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifndef STATIC
#define STATIC static
#endif

View File

@ -1,4 +1,5 @@
/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
/* Copyright (C) 1995-2016, 2020 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 Lesser General Public License as published by
@ -13,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,5 @@
/* Control of exported symbols from libintl.
Copyright (C) 2005-2026 Free Software Foundation, Inc.
Copyright (C) 2005-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#if @HAVE_VISIBILITY@ && BUILDING_LIBINTL
# define LIBINTL_SHLIB_EXPORTED __attribute__((__visibility__("default")))
#elif (defined _WIN32 && !defined __CYGWIN__) && @WOE32DLL@ && BUILDING_LIBINTL

View File

@ -1,5 +1,6 @@
/* Handle list of needed message catalogs
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2024 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 Lesser General Public License as published by
@ -14,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,5 @@
/* Implementation of gettext(3) function.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,6 @@
/* Header describing internals of libintl library.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2024 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 Lesser General Public License as published by
@ -14,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifndef _GETTEXTP_H
#define _GETTEXTP_H

View File

@ -1,5 +1,5 @@
/* Description of GNU message catalog format: general file layout.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifndef _GETTEXT_H
#define _GETTEXT_H 1

View File

@ -1,5 +1,5 @@
/* Implements a string hashing function.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2016 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
@ -16,8 +16,6 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,5 @@
/* Description of GNU message catalog format: string hashing function.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
/* @@ end of prolog @@ */
#ifndef attribute_hidden

View File

@ -1,5 +1,5 @@
/* Redirections from public function names to GNU libintl functions.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995, 2000-2003, 2005, 2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,6 @@
/* List of exported symbols of libintl on Cygwin.
Copyright (C) 2006-2026 Free Software Foundation, Inc.
Copyright (C) 2006, 2012-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
/* IMP(x) is a symbol that contains the address of x. */
#if defined _WIN64 || defined _LP64
# define IMP(x) __imp_##x

View File

@ -1,4 +1,5 @@
/* Copyright (C) 1995-2026 Free Software Foundation, Inc.
/* Copyright (C) 1995-2023 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 Lesser General Public License as published by
@ -13,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
/* 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. */

View File

@ -1,5 +1,5 @@
/* Determine the user's language preferences.
Copyright (C) 2004-2026 Free Software Foundation, Inc.
Copyright (C) 2004-2007, 2018-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,8 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible.
Win32 code originally by Michele Cicciotti. */
/* Written by Bruno Haible <bruno@clisp.org>.
Win32 code originally by Michele Cicciotti <hackbunny@reactos.com>. */
#ifdef HAVE_CONFIG_H
# include <config.h>

View File

@ -1,5 +1,5 @@
/* Message catalogs for internationalization.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2025 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifndef _LIBINTL_H
#define _LIBINTL_H 1
@ -56,7 +54,7 @@ extern "C" {
/* Version number: (major<<16) + (minor<<8) + subminor */
#define LIBINTL_VERSION 0x010000
#define LIBINTL_VERSION 0x001800
extern int libintl_version;
@ -122,7 +120,7 @@ extern int libintl_version;
/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
If he doesn't, we choose the method. */
#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
# if ((defined __GNUC__ && __GNUC__ >= 2) || defined __clang__) && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
# if defined __GNUC__ && __GNUC__ >= 2 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1) && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
# define _INTL_REDIRECT_ASM
# else
# if defined __cplusplus && defined _INTL_HAS_FORCE_INLINE

View File

@ -1,5 +1,5 @@
/* Message catalogs for internationalization.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2002, 2004-2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This file is derived from the file libgettext.h in the GNU gettext package.
@ -17,8 +17,6 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper. */
#ifndef _LIBINTL_H
#define _LIBINTL_H 1

View File

@ -1,5 +1,6 @@
/* Copyright (C) 1996-2026 Free Software Foundation, Inc.
/* Copyright (C) 1996-2023 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 Lesser General Public License as published by
@ -14,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifndef _LOADINFO_H
#define _LOADINFO_H 1

View File

@ -1,5 +1,5 @@
/* Load needed message catalogs.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
/* 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. */
@ -1020,10 +1018,7 @@ _nl_load_domain (struct loaded_l10nfile *domain_file,
/* Allocate additional memory. */
mem = (char *) malloc (memneed);
if (mem == NULL)
{
free (sysdep_segment_values);
goto invalid;
}
goto invalid;
domain->malloced = mem;
inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;

View File

@ -1,5 +1,5 @@
/* Handle aliases for locale names.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
/* Locale aliases can be specified in the file $(localedir)/locale.alias.
It consists of lines of the form
<alias> <real-locale-name>

View File

@ -1,5 +1,5 @@
/* Log file output.
Copyright (C) 2003-2026 Free Software Foundation, Inc.
Copyright (C) 2003-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,7 +14,7 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
/* Written by Bruno Haible <bruno@clisp.org>. */
#ifdef HAVE_CONFIG_H
# include <config.h>

View File

@ -1,5 +1,5 @@
/* Implementation of ngettext(3) function.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,5 @@
/* OS/2 compatibility functions.
Copyright (C) 2001-2026 Free Software Foundation, Inc.
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 Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#define OS2_AWARE
#ifdef HAVE_CONFIG_H
#include <config.h>

View File

@ -1,6 +1,6 @@
/* OS/2 compatibility defines.
This file is intended to be included from config.h
Copyright (C) 2001-2026 Free Software Foundation, Inc.
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 Lesser General Public License as published by
@ -15,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
/* When included from os2compat.h we need all the original definitions */
#ifndef OS2_AWARE

View File

@ -1,5 +1,5 @@
/* OS dependent parts of libintl.
Copyright (C) 2001-2026 Free Software Foundation, Inc.
Copyright (C) 2001-2002, 2006, 2012, 2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#if defined __CYGWIN__ || defined __MINGW32__
# include "intl-exports.c"
#elif defined __EMX__ && !defined __KLIBC__

View File

@ -1,5 +1,6 @@
/* Expression parsing for plural form selection.
Copyright (C) 2000-2026 Free Software Foundation, Inc.
Copyright (C) 2000-2023 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 Lesser General Public License as published by
@ -14,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,6 @@
/* Expression parsing and evaluation for plural form selection.
Copyright (C) 2000-2026 Free Software Foundation, Inc.
Copyright (C) 2000-2024 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 Lesser General Public License as published by
@ -14,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper, Bruno Haible, and Daiki Ueno. */
#ifndef _PLURAL_EXP_H
#define _PLURAL_EXP_H

View File

@ -1,6 +1,7 @@
%{
/* Expression parsing for plural form selection.
Copyright (C) 2000-2026 Free Software Foundation, Inc.
Copyright (C) 2000-2023 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 Lesser General Public License as published by
@ -15,8 +16,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper, Bruno Haible, and Daiki Ueno. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,6 @@
/* Formatted output to strings, using POSIX/XSI format strings with positions.
Copyright (C) 2003-2026 Free Software Foundation, Inc.
Copyright (C) 2003, 2006-2007, 2009-2011, 2018, 2020-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,6 @@
/* setlocale() function that respects the locale chosen by the user.
Copyright (C) 2009-2026 Free Software Foundation, Inc.
Copyright (C) 2009, 2011-2025 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@ -58,7 +57,7 @@
# define SHLIB_EXPORTED
#endif
#include "setlocale-fixes.h"
#include "setlocale-messages.h"
#include "localename.h"
#if HAVE_CFLOCALECOPYPREFERREDLANGUAGES || HAVE_CFPREFERENCESCOPYAPPVALUE
@ -871,7 +870,7 @@ setlocale_unixlike (int category, const char *locale)
static char *
setlocale_unixlike (int category, const char *locale)
{
char *result = setlocale_fixed (category, locale);
char *result = setlocale (category, locale);
if (result == NULL)
switch (category)
{
@ -1815,8 +1814,6 @@ libintl_setlocale (int category, const char *locale)
return resultbuf;
}
}
# elif defined __ANDROID__
return setlocale_fixed_null (LC_ALL);
# else
return setlocale (LC_ALL, NULL);
# endif

View File

@ -1,5 +1,5 @@
/* Implementation of the textdomain(3) function.
Copyright (C) 1995-2026 Free Software Foundation, Inc.
Copyright (C) 1995-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Ulrich Drepper and Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,5 @@
/* libintl library version.
Copyright (C) 2005-2026 Free Software Foundation, Inc.
Copyright (C) 2005 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -1,5 +1,5 @@
## Makefile for the gettext-runtime/libasprintf subdirectory of GNU gettext
## Copyright (C) 2002-2025 Free Software Foundation, Inc.
## Copyright (C) 2002-2024 Free Software Foundation, Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU Lesser General Public License as published by
@ -24,7 +24,6 @@ SUBDIRS = gnulib-lib
EXTRA_DIST =
BUILT_SOURCES =
MOSTLYCLEANFILES =
MAINTAINERCLEANFILES =
RM = rm -f
@ -226,7 +225,6 @@ uninstall-html:
$(RM) $(DESTDIR)$(htmldir)/autosprintf.html
EXTRA_DIST += autosprintf_all.html
MAINTAINERCLEANFILES += autosprintf_all.html
# Windows support.

View File

@ -1,5 +1,5 @@
/* Formatted output to strings.
Copyright (C) 1999-2026 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 2006 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#include <config.h>
/* Specification. */

View File

@ -1,5 +1,5 @@
/* Formatted output to strings.
Copyright (C) 1999-2026 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 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 Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#include <config.h>
/* Specification. */

View File

@ -1,5 +1,6 @@
/* Class autosprintf - formatted output to an ostream.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
Copyright (C) 2002, 2013, 2015, 2018, 2021 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#include <config.h>
/* Specification. */

View File

@ -1,5 +1,5 @@
/* Class autosprintf - formatted output to an ostream.
Copyright (C) 2002, 2012-2026 Free Software Foundation, Inc.
Copyright (C) 2002, 2012-2016 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,18 +14,16 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#ifndef _AUTOSPRINTF_H
#define _AUTOSPRINTF_H
/* This feature is available in gcc versions 2.5 and later and in clang. */
#if !((__GNUC__ >= 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || defined __clang__) && !__STRICT_ANSI__)
/* This feature is available in gcc versions 2.5 and later. */
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# define _AUTOSPRINTF_ATTRIBUTE_FORMAT() /* empty */
#else
/* The __-protected variants of 'format' and 'printf' attributes are
accepted by gcc versions 2.6.4 (effectively 2.7) and later and in clang. */
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__
/* 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 _AUTOSPRINTF_ATTRIBUTE_FORMAT() \
__attribute__ ((__format__ (__printf__, 2, 3)))
# else

View File

@ -36,7 +36,7 @@
This file provides documentation for GNU @code{autosprintf} library.
@copying
Copyright (C) 2002-2003, 2006-2007, 2018-2019, 2025 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 2006-2007, 2018-2019 Free Software Foundation, Inc.
This manual is free documentation. It is dually licensed under the
GNU FDL and the GNU GPL. This means that you can redistribute this
@ -172,46 +172,21 @@ given @code{ostream}.
@node Using autosprintf
@chapter Using @code{autosprintf} in own programs
To use the @code{autosprintf} class in your programs, you need to make
changes in the source code and in the build system.
@node Source code changes
@section Source code changes
In source code files that shall use @code{autosprintf}, add
To use the @code{autosprintf} class in your programs, you need to add
@smallexample
#include "autosprintf.h"
using gnu::autosprintf;
@end smallexample
@noindent
to your source code.
The include file defines the class @code{autosprintf}, in a namespace called
@code{gnu}. The @samp{using} statement makes it possible to use the class
without the (otherwise natural) @code{gnu::} prefix.
@node Build system changes
@section Build system changes
When compiling your program with @code{g++}, use the warning option @code{-Wall}.
@c g++ does not warn by default,
@c see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64867
This is needed so that you get a compiler warning when attempting to pass
an @code{std::string} as argument.
For example, if you accidentally write
@smallexample
std::string s = ...;
cout << autosprintf ("Look at %s\n", s);
@end smallexample
@noindent
you want to get a compiler warning about passing an @code{std::string} through
a variadic argument list, so that you can correct your code to
@smallexample
std::string s = ...;
cout << autosprintf ("Look at %s\n", s.c_str ());
@end smallexample
When linking your program, you need to link with @code{libasprintf}, because
that's where the class is defined. In projects that use GNU @code{autoconf},
that's where the class is defined. In projects using GNU @code{autoconf},
this means adding @samp{AC_LIB_LINKFLAGS([asprintf])} to @code{configure.in}
or @code{configure.ac}, and using the @@LIBASPRINTF@@ Makefile variable that
it provides.

View File

@ -1,5 +1,6 @@
/* Library functions for class autosprintf.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 2006, 2018-2019, 2021 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#include <config.h>
#if !(HAVE_VASPRINTF && HAVE_POSIX_PRINTF)

View File

@ -1,5 +1,6 @@
/* Library functions for class autosprintf.
Copyright (C) 2002-2026 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,9 +15,9 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#include <config.h>
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#if HAVE_VASPRINTF && HAVE_POSIX_PRINTF

View File

@ -1,5 +1,5 @@
/* Formatted output to strings.
Copyright (C) 1999-2026 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 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 Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#include <config.h>
/* Specification. */

View File

@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
Copyright (C) 2002-2003, 2012-2026 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -14,8 +14,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible. */
#ifndef _VASPRINTF_H
#define _VASPRINTF_H
@ -23,13 +21,13 @@
#include <stdarg.h>
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later and in clang. */
# if !((__GNUC__ >= 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5) || defined __clang__) && !__STRICT_ANSI__)
/* This feature is available in gcc versions 2.5 and later. */
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
# 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 and in clang. */
# if !(__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || defined __clang__)
/* 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

View File

@ -1,6 +1,6 @@
# gettext.m4
# serial 86 (gettext-1.0)
dnl Copyright (C) 1995-2026 Free Software Foundation, Inc.
# serial 81 (gettext-0.24)
dnl Copyright (C) 1995-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@ -15,7 +15,9 @@ dnl by the GNU Lesser General Public License, and the rest of the GNU
dnl gettext package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl From Ulrich Drepper, Bruno Haible, Daiku Ueno.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <bruno@clisp.org>, 2000-2024.
dnl Macro to add for using GNU gettext.
@ -91,18 +93,9 @@ AC_DEFUN([AM_GNU_GETTEXT],
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
])
dnl On Mac OS X, libintl requires linking with CoreFoundation.
dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
gt_INTL_MACOSX
dnl On native Windows, libintl requires linking with advapi32,
dnl because langprefs.c (_nl_language_preferences_win32_95) uses functions
dnl from advapi32.dll.
AC_REQUIRE([AC_CANONICAL_HOST])
INTL_WINDOWS_LIBS=
case "$host_os" in
mingw* | windows*) INTL_WINDOWS_LIBS='-ladvapi32' ;;
esac
dnl Set USE_NLS.
AC_REQUIRE([AM_NLS])
@ -126,15 +119,15 @@ AC_DEFUN([AM_GNU_GETTEXT],
if test "$USE_NLS" = "yes"; then
gt_use_preinstalled_gnugettext=no
m4_if(gt_building_libintl_in_same_build_tree, yes, [
AC_MSG_CHECKING([whether included libintl is requested])
AC_ARG_WITH([included-libintl],
[ --with-included-libintl use the GNU libintl library included here],
gt_cv_force_use_gnu_libintl=$withval,
gt_cv_force_use_gnu_libintl=no)
AC_MSG_RESULT([$gt_cv_force_use_gnu_libintl])
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])
gt_cv_use_gnu_libintl="$gt_cv_force_use_gnu_libintl"
if test "$gt_cv_force_use_gnu_libintl" != "yes"; then
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
@ -158,37 +151,13 @@ changequote([,])dnl
gt_expression_test_code=
fi
dnl In the test code below:
dnl * We test for the presence of _nl_msg_cat_cntr because GNU libc and
dnl libintl define this variable, whereas Solaris 10 libc/libintl
dnl (which we don't want to use, as it does not support GNU .mo files)
dnl does not define it.
dnl * We don't test for _nl_msg_cat_cntr on MSVC, because the use of a
dnl variable under MSVC depends on whether it is exported by a shared
dnl library or a static library: If libintl is a shared library, we
dnl would have to declare it with __declspec(dllimport), whereas if it
dnl is a static library, we would have to declare it without such a
dnl __declspec. But libintl comes with just one header file,
dnl <libintl.h>, that does not declare _nl_msg_cat_cntr and that does
dnl not tell us whether the library was built shared or static.
dnl * We test for the presence of _nl_domain_bindings because GNU libc
dnl defines this variable, whereas NetBSD libc (which we don't want to
dnl use, as it was broken at least in 2002) does not define it.
dnl * We test for the presence of _nl_expand_alias because GNU libintl
dnl defines this function, whereas NetBSD libintl (which we don't want
dnl to use, as it was broken at least in 2002) does not define it.
AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[
#include <libintl.h>
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#if defined _MSC_VER
#define _nl_msg_cat_cntr 0
#else
extern int _nl_msg_cat_cntr;
#endif
extern int *_nl_domain_bindings;
#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
#else
@ -200,28 +169,7 @@ $gt_revision_test_code
bindtextdomain ("", "");
return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
]])],
[dnl Solaris 11.[0-3] doesn't strip the CODESET part from the locale name,
dnl when looking for a message catalog. E.g. when the locale is fr_FR.UTF-8,
dnl on Solaris 11.[0-3] it looks for
dnl <LOCALEDIR>/fr_FR.UTF-8/LC_MESSAGES/<domain>.mo
dnl <LOCALEDIR>/fr.UTF-8/LC_MESSAGES/<domain>.mo
dnl Similarly, on Solaris 11 OpenIndiana and Solaris 11 OmniOS it looks only for
dnl <LOCALEDIR>/fr_FR.UTF-8/LC_MESSAGES/<domain>.mo
dnl Reported at <https://www.illumos.org/issues/13423>.
dnl On Solaris 11.4 this is fixed: it looks for
dnl <LOCALEDIR>/fr_FR.UTF-8/LC_MESSAGES/<domain>.mo
dnl <LOCALEDIR>/fr.UTF-8/LC_MESSAGES/<domain>.mo
dnl <LOCALEDIR>/fr_FR/LC_MESSAGES/<domain>.mo
dnl <LOCALEDIR>/fr/LC_MESSAGES/<domain>.mo
if test "`uname -sr`" = 'SunOS 5.11'; then
case `uname -v` in
11.4 | 11.4.*) eval "$gt_func_gnugettext_libc=yes" ;;
*) eval "$gt_func_gnugettext_libc=no" ;;
esac
else
eval "$gt_func_gnugettext_libc=yes"
fi
],
[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
@ -246,11 +194,7 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
[[
#include <libintl.h>
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#if defined _MSC_VER
#define _nl_msg_cat_cntr 0
#else
extern int _nl_msg_cat_cntr;
#endif
extern
#ifdef __cplusplus
"C"
@ -269,13 +213,11 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
[eval "$gt_func_gnugettext_libintl=yes"],
[eval "$gt_func_gnugettext_libintl=no"])
dnl Now see whether libintl exists and depends on libiconv or other
dnl OS dependent libraries, specifically on macOS, AIX, and native
dnl Windows.
gt_LIBINTL_EXTRA=
dnl OS dependent libraries, specifically on macOS and AIX.
gt_LIBINTL_EXTRA="$INTL_MACOSX_LIBS"
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
darwin*) gt_LIBINTL_EXTRA="$INTL_MACOSX_LIBS" ;;
aix*) gt_LIBINTL_EXTRA="-lpthread" ;;
mingw* | windows*) gt_LIBINTL_EXTRA="$INTL_WINDOWS_LIBS" ;;
aix*) gt_LIBINTL_EXTRA="-lpthread" ;;
esac
if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } \
&& { test -n "$LIBICONV" || test -n "$gt_LIBINTL_EXTRA"; }; then
@ -285,11 +227,7 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
[[
#include <libintl.h>
#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
#if defined _MSC_VER
#define _nl_msg_cat_cntr 0
#else
extern int _nl_msg_cat_cntr;
#endif
extern
#ifdef __cplusplus
"C"
@ -335,15 +273,11 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
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.
gt_cv_use_gnu_libintl=yes
nls_cv_use_gnu_gettext=yes
fi
fi
AC_REQUIRE([AC_CANONICAL_HOST])
if test "$gt_cv_use_gnu_libintl" = "yes" \
|| case "$host_os" in cygwin*) true;; *) false;; esac; then
dnl GNU gettext is not found in the C library or is,
dnl like on Cygwin, a component of the C library.
if test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions used to generate GNU NLS library.
USE_INCLUDED_LIBINTL=yes
LIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD"
@ -353,7 +287,7 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
CATOBJEXT=
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$gt_cv_use_gnu_libintl" = "yes"; then
|| test "$nls_cv_use_gnu_gettext" = "yes"; then
dnl Mark actions to use GNU gettext tools.
CATOBJEXT=.gmo
fi
@ -361,24 +295,15 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
if test -n "$INTL_MACOSX_LIBS"; then
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$gt_cv_use_gnu_libintl" = "yes"; then
dnl Some extra options are needed during linking.
|| 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 -n "$INTL_WINDOWS_LIBS"; then
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$gt_cv_use_gnu_libintl" = "yes"; then
dnl Some extra options are needed during linking.
LIBINTL="$LIBINTL $INTL_WINDOWS_LIBS"
LTLIBINTL="$LTLIBINTL $INTL_WINDOWS_LIBS"
fi
fi
if test "$gt_use_preinstalled_gnugettext" = "yes" \
|| test "$gt_cv_use_gnu_libintl" = "yes"; then
|| 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.])

View File

@ -1,14 +1,14 @@
# glibc2.m4
# serial 4
dnl Copyright (C) 2000-2026 Free Software Foundation, Inc.
# serial 3
dnl Copyright (C) 2000-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 is offered as-is, without any warranty.
dnl From Bruno Haible.
# Test for the GNU C Library, version 2.0 or newer.
# From Bruno Haible.
dnl Test for the GNU C Library, version 2.0 or newer.
AC_DEFUN([gt_GLIBC2],
[
AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer],

View File

@ -1,6 +1,6 @@
# nls.m4
# serial 7 (gettext-1.0)
dnl Copyright (C) 1995-2026 Free Software Foundation, Inc.
# serial 6 (gettext-0.24)
dnl Copyright (C) 1995-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@ -15,7 +15,9 @@ dnl by the GNU Lesser General Public License, and the rest of the GNU
dnl gettext package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl From Ulrich Drepper, Bruno Haible.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
AC_PREREQ([2.50])

View File

@ -1,6 +1,6 @@
# po.m4
# serial 35 (gettext-1.0)
dnl Copyright (C) 1995-2026 Free Software Foundation, Inc.
# serial 34 (gettext-0.24)
dnl Copyright (C) 1995-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@ -15,7 +15,9 @@ dnl by the GNU Lesser General Public License, and the rest of the GNU
dnl gettext package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl From Ulrich Drepper, Bruno Haible.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <bruno@clisp.org>, 2000-2024.
AC_PREREQ([2.60])

View File

@ -1,6 +1,6 @@
# progtest.m4
# serial 12 (gettext-1.0)
dnl Copyright (C) 1996-2026 Free Software Foundation, Inc.
# serial 10 (gettext-0.24)
dnl Copyright (C) 1996-2025 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@ -15,7 +15,8 @@ dnl by the GNU Lesser General Public License, and the rest of the GNU
dnl gettext package is covered by the GNU General Public License.
dnl They are *not* in the public domain.
dnl From Ulrich Drepper, Bruno Haible.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
AC_PREREQ([2.53])
@ -67,7 +68,7 @@ AC_CACHE_VAL([ac_cv_path_$1],
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:${as_lineno-$LINENO}: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
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

View File

@ -1,5 +1,6 @@
## Makefile for the gettext-runtime/man subdirectory of GNU gettext
## Copyright (C) 2001-2025 Free Software Foundation, Inc.
## Copyright (C) 2001-2003, 2006, 2009, 2013-2014, 2018-2019 Free Software Foundation,
## Inc.
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
@ -23,12 +24,12 @@ EXTRA_DIST =
# A manual page for each of the bin_PROGRAMS in src/Makefile.am.
man_aux = gettext.x ngettext.x printf_gettext.x printf_ngettext.x envsubst.x
man_aux = gettext.x ngettext.x envsubst.x
# Likewise, plus additional manual pages for the libintl functions.
man_MAN1GEN = gettext.1 ngettext.1 printf_gettext.1 printf_ngettext.1
man_MAN1IN = gettext.1.in ngettext.1.in printf_gettext.1.in printf_ngettext.1.in
man_MAN1GEN = gettext.1 ngettext.1
man_MAN1IN = gettext.1.in ngettext.1.in
man_MAN1OTHER = envsubst.1
man_MAN1 = $(man_MAN1GEN) $(man_MAN1OTHER)
man_MAN3 = gettext.3 ngettext.3 \
@ -39,8 +40,8 @@ man_MAN3LINK = dgettext.3 dcgettext.3 dngettext.3 dcngettext.3
man_MANS = $(man_MAN1)
notrans_man_MANS = $(man_MAN3) $(man_MAN3LINK)
man_HTML1GEN = gettext.1.html ngettext.1.html printf_gettext.1.html printf_ngettext.1.html
man_HTML1IN = gettext.1.html.in ngettext.1.html.in printf_gettext.1.html.in printf_ngettext.1.html.in
man_HTML1GEN = gettext.1.html ngettext.1.html
man_HTML1IN = gettext.1.html.in ngettext.1.html.in
man_HTML1OTHER = envsubst.1.html
man_HTML1 = $(man_HTML1GEN) $(man_HTML1OTHER)
man_HTML3 = gettext.3.html ngettext.3.html \
@ -107,8 +108,6 @@ $(man_MAN1GEN): Makefile
gettext.1: gettext.1.in
ngettext.1: ngettext.1.in
printf_gettext.1: printf_gettext.1.in
printf_ngettext.1: printf_ngettext.1.in
$(man_MAN1IN) $(man_MAN1OTHER): help2man $(top_srcdir)/../.version
progname=`echo $@ | sed -e 's/\.in$$//' -e 's/\.1$$//'`; \
@ -117,8 +116,6 @@ $(man_MAN1IN) $(man_MAN1OTHER): help2man $(top_srcdir)/../.version
gettext.1.in: gettext.x ../src/gettext.c
ngettext.1.in: ngettext.x ../src/ngettext.c
printf_gettext.1.in: printf_gettext.x ../src/printf_gettext.c
printf_ngettext.1.in: printf_ngettext.x ../src/printf_ngettext.c
envsubst.1: envsubst.x ../src/envsubst.c
$(man_MAN3): $(top_srcdir)/../.version
@ -146,8 +143,6 @@ $(man_HTML1GEN): Makefile
gettext.1.html: gettext.1.html.in
ngettext.1.html: ngettext.1.html.in
printf_gettext.1.html: printf_gettext.1.html.in
printf_ngettext.1.html: printf_ngettext.1.html.in
$(man_HTML1IN):
srcdir=''; \
@ -158,8 +153,6 @@ $(man_HTML1IN):
gettext.1.html.in: gettext.1.in
ngettext.1.html.in: ngettext.1.in
printf_gettext.1.html.in: printf_gettext.1.in
printf_ngettext.1.html.in: printf_ngettext.1.in
$(man_HTML1OTHER):
srcdir=''; \

Some files were not shown because too many files have changed in this diff Show More