]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix some crashes when building with --enable-shared on MSVC.
authorBruno Haible <bruno@clisp.org>
Thu, 5 Jun 2025 19:37:04 +0000 (21:37 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 5 Jun 2025 19:37:04 +0000 (21:37 +0200)
Reported by Kirill Makurin <maiddaisuki@outlook.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2025-05/msg00087.html>.

* gnulib-local/lib/gl_carray_list.h.diff: New file.
* gnulib-local/lib/gl_hash_map.h.diff: New file.
* gnulib-local/lib/gl_hash_set.h.diff: New file.
* gnulib-local/Makefile.am (EXTRA_DIST): Add them.

gettext-tools/woe32dll/gettextlib-exports.c
gnulib-local/Makefile.am
gnulib-local/lib/gl_carray_list.h.diff [new file with mode: 0644]
gnulib-local/lib/gl_hash_map.h.diff [new file with mode: 0644]
gnulib-local/lib/gl_hash_set.h.diff [new file with mode: 0644]

index 1330fc76f42226078e631b90ecbcffa7cb1a1394..8fc2ab631580756c9b2df087f52615a05c9e2d5b 100644 (file)
@@ -31,6 +31,9 @@ VARIABLE(error_print_progname)
 #endif
 VARIABLE(error_with_progname)
 VARIABLE(exit_failure)
+VARIABLE(gl_carray_list_implementation)
+VARIABLE(gl_hash_map_implementation)
+VARIABLE(gl_hash_set_implementation)
 VARIABLE(gl_linkedhash_list_implementation)
 VARIABLE(program_name)
 #if GNULIB_DEFINED_GETOPT
index 71a5d260c70a8b70d3867e8d682883f31b7c8374..852774428694e1b91e172cfc700daed219212124 100644 (file)
@@ -34,6 +34,9 @@ lib/getlocalename_l-unsafe.c.diff \
 lib/getopt-core.h.diff \
 lib/gettext.h \
 lib/gl_array_list.h.diff \
+lib/gl_carray_list.h.diff \
+lib/gl_hash_map.h.diff \
+lib/gl_hash_set.h.diff \
 lib/gl_linkedhash_list.h.diff \
 lib/libxml/buf.c \
 lib/libxml/buf.h \
diff --git a/gnulib-local/lib/gl_carray_list.h.diff b/gnulib-local/lib/gl_carray_list.h.diff
new file mode 100644 (file)
index 0000000..fd8f10d
--- /dev/null
@@ -0,0 +1,19 @@
+*** gl_carray_list.h.orig
+--- gl_carray_list.h
+***************
+*** 24,30 ****
+  extern "C" {
+  #endif
+
+! extern const struct gl_list_implementation gl_carray_list_implementation;
+  #define GL_CARRAY_LIST &gl_carray_list_implementation
+
+  #ifdef __cplusplus
+--- 24,30 ----
+  extern "C" {
+  #endif
+
+! extern DLL_VARIABLE const struct gl_list_implementation gl_carray_list_implementation;
+  #define GL_CARRAY_LIST &gl_carray_list_implementation
+
+  #ifdef __cplusplus
diff --git a/gnulib-local/lib/gl_hash_map.h.diff b/gnulib-local/lib/gl_hash_map.h.diff
new file mode 100644 (file)
index 0000000..f7c6b82
--- /dev/null
@@ -0,0 +1,19 @@
+*** gl_hash_map.h.orig
+--- gl_hash_map.h
+***************
+*** 24,30 ****
+  extern "C" {
+  #endif
+
+! extern const struct gl_map_implementation gl_hash_map_implementation;
+  #define GL_HASH_MAP &gl_hash_map_implementation
+
+  #ifdef __cplusplus
+--- 24,30 ----
+  extern "C" {
+  #endif
+
+! extern DLL_VARIABLE const struct gl_map_implementation gl_hash_map_implementation;
+  #define GL_HASH_MAP &gl_hash_map_implementation
+
+  #ifdef __cplusplus
diff --git a/gnulib-local/lib/gl_hash_set.h.diff b/gnulib-local/lib/gl_hash_set.h.diff
new file mode 100644 (file)
index 0000000..14b178f
--- /dev/null
@@ -0,0 +1,19 @@
+*** gl_hash_set.h.orig
+--- gl_hash_set.h
+***************
+*** 24,30 ****
+  extern "C" {
+  #endif
+
+! extern const struct gl_set_implementation gl_hash_set_implementation;
+  #define GL_HASH_SET &gl_hash_set_implementation
+
+  #ifdef __cplusplus
+--- 24,30 ----
+  extern "C" {
+  #endif
+
+! extern DLL_VARIABLE const struct gl_set_implementation gl_hash_set_implementation;
+  #define GL_HASH_SET &gl_hash_set_implementation
+
+  #ifdef __cplusplus