From: Bruno Haible Date: Sat, 31 May 2025 15:34:38 +0000 (+0200) Subject: build: Fix some crashes when building with --enable-shared on MSVC. X-Git-Tag: v0.26~142 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d1050df577034132b99c133a7fc60ae664154114;p=thirdparty%2Fgettext.git build: Fix some crashes when building with --enable-shared on MSVC. Reported by Kirill Makurin in . * 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. --- diff --git a/gnulib-local/Makefile.am b/gnulib-local/Makefile.am index 71a5d260c..b54b7baba 100644 --- a/gnulib-local/Makefile.am +++ b/gnulib-local/Makefile.am @@ -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 index 000000000..fd8f10d54 --- /dev/null +++ b/gnulib-local/lib/gl_carray_list.h.diff @@ -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 index 000000000..f7c6b82bc --- /dev/null +++ b/gnulib-local/lib/gl_hash_map.h.diff @@ -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 index 000000000..14b178fdc --- /dev/null +++ b/gnulib-local/lib/gl_hash_set.h.diff @@ -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 index 000000000..1c852ec8f --- /dev/null +++ b/gnulib-local/lib/gl_linked_list.h.diff @@ -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