From: Bruno Haible Date: Mon, 28 Dec 2020 13:05:05 +0000 (+0100) Subject: Update after gnulib changed: Fix link errors on native Windows. X-Git-Tag: v0.22~280 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a61553ac8b619caeb46a1202c14eff6f669f2d4b;p=thirdparty%2Fgettext.git Update after gnulib changed: Fix link errors on native Windows. * autogen.sh (GNULIB_MODULES_TOOLS_FOR_SRC, GNULIB_MODULES_LIBGETTEXTPO): Add strdup-posix. Avoid the *-list-tests, since they reference a variable, leading to a problem with --enable-shared. * gettext-tools/libgettextpo/Makefile.am (config.h): Undefine GNULIB_GETCWD and REPLACE_FCHDIR that are defined in the parent config.h. --- diff --git a/.gitignore b/.gitignore index 254a7ceff..4110c15b1 100644 --- a/.gitignore +++ b/.gitignore @@ -219,6 +219,7 @@ /gettext-tools/libgettextpo/str-two-way.h /gettext-tools/libgettextpo/strchrnul.c /gettext-tools/libgettextpo/strchrnul.valgrind +/gettext-tools/libgettextpo/strdup.c /gettext-tools/libgettextpo/streq.h /gettext-tools/libgettextpo/strerror-override.c /gettext-tools/libgettextpo/strerror-override.h diff --git a/autogen.sh b/autogen.sh index 02b4a3fb9..d766977b3 100755 --- a/autogen.sh +++ b/autogen.sh @@ -197,6 +197,7 @@ if ! $skip_gnulib; then stpncpy strchrnul strcspn + strdup-posix strerror strpbrk strtol @@ -281,8 +282,11 @@ if ! $skip_gnulib; then uniwidth/width-tests ' $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=fdutimensat-tests --avoid=futimens-tests --avoid=utime-tests --avoid=utimens-tests --avoid=utimensat-tests \ - `for m in $GNULIB_MODULES_TOOLS_LIBUNISTRING_TESTS; do echo --avoid=$m; done` $GNULIB_MODULES_TOOLS_FOR_SRC $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES $GNULIB_MODULES_TOOLS_OTHER || exit $? + --import \ + --avoid=fdutimensat-tests --avoid=futimens-tests --avoid=utime-tests --avoid=utimens-tests --avoid=utimensat-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_TOOLS_FOR_SRC $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES $GNULIB_MODULES_TOOLS_OTHER || exit $? $GNULIB_TOOL --copy-file m4/libtextstyle.m4 gettext-tools/gnulib-m4/libtextstyle.m4 || exit $? # In gettext-tools/libgrep: GNULIB_MODULES_TOOLS_FOR_LIBGREP=' @@ -290,7 +294,9 @@ if ! $skip_gnulib; then regex ' $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 echo --avoid=$m; fi; done` $GNULIB_MODULES_TOOLS_FOR_LIBGREP || exit $? + --import \ + `for m in $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES; do if test \`$GNULIB_TOOL --extract-applicability $m\` != all; then echo --avoid=$m; fi; done` \ + $GNULIB_MODULES_TOOLS_FOR_LIBGREP || exit $? # In gettext-tools/libgettextpo: # This is a subset of the GNULIB_MODULES_TOOLS_FOR_SRC. GNULIB_MODULES_LIBGETTEXTPO=' @@ -325,6 +331,7 @@ if ! $skip_gnulib; then stpcpy stpncpy strchrnul + strdup-posix strerror unictype/ctype-space unilbrk/ulc-width-linebreaks diff --git a/gettext-tools/libgettextpo/Makefile.am b/gettext-tools/libgettextpo/Makefile.am index 59b016ee4..a5ba8398f 100644 --- a/gettext-tools/libgettextpo/Makefile.am +++ b/gettext-tools/libgettextpo/Makefile.am @@ -154,6 +154,10 @@ config.h: $(BUILT_SOURCES) echo '#define GTPO_CONFIG_H'; \ echo; \ echo '#include "../config.h"'; \ + : "We use gnulib module 'getcwd-lgpl' here, not module 'getcwd'."; \ + echo '#undef GNULIB_GETCWD'; \ + : "We don't use gnulib module 'fchdir' here."; \ + echo '#undef REPLACE_FCHDIR'; \ : "Turn all gettext() calls into dgettext() calls."; \ echo '#define DEFAULT_TEXT_DOMAIN "gettext-tools"'; \ : "All code is collected in a single library,"; \