]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix some crashes when building with --enable-shared on MSVC.
authorBruno Haible <bruno@clisp.org>
Sat, 31 May 2025 15:34:38 +0000 (17:34 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 31 May 2025 15:34:38 +0000 (17:34 +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/lib/gl_linked_list.h.diff: New file.
* gnulib-local/Makefile.am (EXTRA_DIST): Add them.

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]
gnulib-local/lib/gl_linked_list.h.diff [new file with mode: 0644]

index 71a5d260c70a8b70d3867e8d682883f31b7c8374..b54b7baba82e5765f40e358a9227261e98855d75 100644 (file)
@@ -34,7 +34,11 @@ 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/gl_linked_list.h.diff \
 lib/libxml/buf.c \
 lib/libxml/buf.h \
 lib/libxml/c14n.c \
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
diff --git a/gnulib-local/lib/gl_linked_list.h.diff b/gnulib-local/lib/gl_linked_list.h.diff
new file mode 100644 (file)
index 0000000..1c852ec
--- /dev/null
@@ -0,0 +1,19 @@
+*** gl_linked_list.h.orig
+--- gl_linked_list.h
+***************
+*** 24,30 ****
+  extern "C" {
+  #endif
+
+! extern const struct gl_list_implementation gl_linked_list_implementation;
+  #define GL_LINKED_LIST &gl_linked_list_implementation
+
+  #ifdef __cplusplus
+--- 24,30 ----
+  extern "C" {
+  #endif
+
+! extern DLL_VARIABLE const struct gl_list_implementation gl_linked_list_implementation;
+  #define GL_LINKED_LIST &gl_linked_list_implementation
+
+  #ifdef __cplusplus