]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix compilation error on MSVC due to conflict of different stdlib.h files.
authorBruno Haible <bruno@clisp.org>
Thu, 5 Jun 2025 09:11:03 +0000 (11:11 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 5 Jun 2025 09:11:03 +0000 (11:11 +0200)
Reported by Kirill Makurin <maiddaisuki@outlook.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-05/msg00071.html>.

* autogen.sh: Change gnulib-tool invocation for libgrep.
* gettext-tools/configure.ac (AC_CONFIG_FILES): Add libgrep/gnulib-lib/Makefile.
* gettext-tools/libgrep/Makefile.am: Don't include Makefile.gnulib.
(SUBDIRS): New variable.
(noinst_LIBRARIES): Add libgrep.a.
(AM_CPPFLAGS): Add -I options for gnulib-lib subdirectory.
(libgrep_a_DEPENDENCIES): New variable.
* gettext-tools/libgrep/gnulib-lib/Makefile.am: New file.
* gettext-tools/src/Makefile.am (LIBGREP): Add ../libgrep/gnulib-lib/libgnu.a.

.gitignore
autogen.sh
gettext-tools/configure.ac
gettext-tools/libgrep/Makefile.am
gettext-tools/libgrep/gnulib-lib/Makefile.am [new file with mode: 0644]
gettext-tools/src/Makefile.am

index 945cb1574758708cfa259a0f2fd6deb5ed639a39..da3a226b5c2b8b5a4b932b6b0d407cf241299872 100644 (file)
 /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/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/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/libgrep/gnulib-lib/
+!/gettext-tools/libgrep/gnulib-lib/Makefile.am
 /gettext-tools/man/x-to-1.in
 /gettext-tools/tests/gnulib-m4/
 /gettext-tools/tests/gnulib-lib/
@@ -924,22 +869,6 @@ core
 /gettext-tools/libgettextpo/uniwidth.h
 /gettext-tools/libgettextpo/wchar.h
 /gettext-tools/libgettextpo/wctype.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/textstyle.h
index 18449aa33b6cfe68c2748d47c7f05f2f031c24e5..67eae659af1a3e0b732594301cb1abcc06042ff1 100755 (executable)
@@ -6,7 +6,7 @@
 #
 # This script requires autoconf-2.64..2.72 and automake-1.13..1.17 in the PATH.
 
-# Copyright (C) 2003-2024 Free Software Foundation, Inc.
+# Copyright (C) 2003-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
@@ -346,7 +346,7 @@ if ! $skip_gnulib; then
     mbrlen
     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 \
+  $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 \
     --import \
     `for m in $GNULIB_MODULES_TOOLS_FOR_SRC_COMMON_DEPENDENCIES; do \
        if test \`$GNULIB_TOOL --extract-applicability $m\` != all; then \
index 3b1f461d8014f3a24482d4fc13c3e94235ec3665..e29b2bf82c1c610f443f48a937b1d58deb293884 100644 (file)
@@ -1,5 +1,5 @@
 dnl Configuration for the gettext-tools directory of GNU gettext
-dnl Copyright (C) 1995-2024 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
@@ -632,6 +632,7 @@ AC_CONFIG_FILES([its/Makefile])
 AC_CONFIG_FILES([gnulib-lib/Makefile])
 
 AC_CONFIG_FILES([libgrep/Makefile])
+AC_CONFIG_FILES([libgrep/gnulib-lib/Makefile])
 
 AC_CONFIG_FILES([src/Makefile])
 AC_CONFIG_FILES([src/user-email:src/user-email.sh.in])
index 9353631df4aed3252315341e291725d47d2abba2..760b1676ced142004f6450fe24c8d0722a866608 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for libgrep directory in GNU gettext package.
-## Copyright (C) 2005-2024 Free Software Foundation, Inc.
+## Copyright (C) 2005-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
@@ -17,6 +17,9 @@
 ## Process this file with automake to produce Makefile.in.
 
 AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
+
+SUBDIRS = gnulib-lib
+
 EXTRA_DIST =
 BUILT_SOURCES =
 MOSTLYCLEANFILES = core *.stackdump
@@ -25,26 +28,26 @@ CLEANFILES =
 DISTCLEANFILES =
 MAINTAINERCLEANFILES =
 
-noinst_LIBRARIES =
+noinst_LIBRARIES = libgrep.a
 
 # Note that Automake's $(DEFAULT_INCLUDES) already contains
 # -I. -I$(srcdir) -I$(top_builddir).
 AM_CPPFLAGS = \
+  -Ignulib-lib -I$(srcdir)/gnulib-lib \
   -I../gnulib-lib -I$(top_srcdir)/gnulib-lib \
   -I../../gettext-runtime/intl
 
 # Enable more warning options in this directory.
 AM_CFLAGS = @WARN_CFLAGS@
 
-# Rules generated and collected by gnulib-tool, for building libgrep.a.
-include Makefile.gnulib
-
 # Sources that are compiled on all platforms.
 
-libgrep_a_SOURCES += \
+libgrep_a_SOURCES = \
   libgrep.h \
   kwset.h kwset.c \
   m-fgrep.c m-regex.c
 
+libgrep_a_DEPENDENCIES = gnulib-lib/libgnu.a
+
 # Allow users to use "gnulib-tool --update".
 EXTRA_DIST += gnulib-m4/gnulib-cache.m4
diff --git a/gettext-tools/libgrep/gnulib-lib/Makefile.am b/gettext-tools/libgrep/gnulib-lib/Makefile.am
new file mode 100644 (file)
index 0000000..dc8c010
--- /dev/null
@@ -0,0 +1,37 @@
+## Makefile for the gettext-tools/libgrep/gnulib-lib 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.5 gnits subdir-objects
+EXTRA_DIST =
+BUILT_SOURCES =
+MOSTLYCLEANFILES = core *.stackdump
+MOSTLYCLEANDIRS =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+SUFFIXES =
+
+noinst_LIBRARIES =
+
+# Note that Automake's $(DEFAULT_INCLUDES) already contains
+# -I. -I$(srcdir) -I$(top_builddir).
+AM_CPPFLAGS = \
+  -I../../gnulib-lib -I$(top_srcdir)/gnulib-lib
+
+# Rules generated and collected by gnulib-tool.
+include Makefile.gnulib
index cde2ad29f69aa03cd7a1425efb39166d82e4f057..73ee1e089777f34d9333b3efeb988118e4070c3e 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools/src subdirectory of GNU gettext
-## Copyright (C) 1995-2024 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 General Public License as published by
@@ -233,7 +233,7 @@ libgettextsrc_la_SOURCES = \
   search-path.c
 
 # msggrep needs pattern matching.
-LIBGREP = ../libgrep/libgrep.a
+LIBGREP = ../libgrep/libgrep.a ../libgrep/gnulib-lib/libgnu.a
 
 # Source dependencies.
 msgcmp_SOURCES = msgcmp.c