]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix MSVC builds with --enable-shared.
authorBruno Haible <bruno@clisp.org>
Thu, 5 Jun 2025 19:37:01 +0000 (21:37 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 5 Jun 2025 19:37:01 +0000 (21:37 +0200)
This was a regression in commit 8e914861708ed459a2ae8157eb60d89375ab46cd
from 2023-09-06.

Thanks to Kirill Makurin <maiddaisuki@outlook.com> for fruitful discussions.

* autogen.sh: Among the gnulib-tests, avoid the modules array-map-tests,
array-oset-tests, carray-list-tests, and uninorm/decomposing-form-tests, since
they use variables from libgettextlib.
* gettext-tools/configure.ac (GL_GNULIB_LIBUNISTRING_DLL_VARIABLE_NAME): New
variable.
(WOE32DLL): New C macro.
(DLL_VARIABLE): On MSVC with --enable-shared, define to '__declspec(dllexport)'
when compiling libgettextlib, and define to '__declspec(dllimport)' when
compiling the programs in src/.
(LIBGETTEXTSRC_DLL_VARIABLE): New C macro.
* gettext-tools/gnulib-lib/Makefile.am (AM_CPPFLAGS): Define the C macro
IN_LIBGETTEXTLIB.
* gettext-tools/src/Makefile.am (libgettextsrc_la_CPPFLAGS): Define the C macro
IN_LIBGETTEXTSRC.
* gettext-tools/src/format.h: Use LIBGETTEXTSRC_DLL_VARIABLE instead of
DLL_VARIABLE.
* gettext-tools/src/message.h: Likewise.
* gettext-tools/src/msgl-cat.h: Likewise.
* gettext-tools/src/plural-table.h: Likewise.
* gettext-tools/src/po-charset.h: Likewise.
* gettext-tools/src/po-error.h: Likewise.
* gettext-tools/src/read-catalog.h: Likewise.
* gettext-tools/src/read-po.h: Likewise.
* gettext-tools/src/read-properties.h: Likewise.
* gettext-tools/src/read-stringtable.h: Likewise.
* gettext-tools/src/sentence.h: Likewise.
* gettext-tools/src/write-po.h: Likewise.
* gettext-tools/src/write-properties.h: Likewise.
* gettext-tools/src/write-stringtable.h: Likewise.
* gettext-tools/src/xerror-handler.h: Likewise.
* gettext-tools/libgettextpo/Makefile.am (config.h): Override the value of
LIBGETTEXTSRC_DLL_VARIABLE.
* gettext-runtime/configure.ac (WOE32DLL): New C macro.
(DLL_VARIABLE): Define to empty always.

21 files changed:
autogen.sh
gettext-runtime/configure.ac
gettext-tools/configure.ac
gettext-tools/gnulib-lib/Makefile.am
gettext-tools/libgettextpo/Makefile.am
gettext-tools/src/Makefile.am
gettext-tools/src/format.h
gettext-tools/src/message.h
gettext-tools/src/msgl-cat.h
gettext-tools/src/plural-table.h
gettext-tools/src/po-charset.h
gettext-tools/src/po-error.h
gettext-tools/src/read-catalog.h
gettext-tools/src/read-po.h
gettext-tools/src/read-properties.h
gettext-tools/src/read-stringtable.h
gettext-tools/src/sentence.h
gettext-tools/src/write-po.h
gettext-tools/src/write-properties.h
gettext-tools/src/write-stringtable.h
gettext-tools/src/xerror-handler.h

index d587b53a177b4149a0ef7d50144efef2047b9919..b17da5a18ab9ec74f0052557f59a67218bdd7208 100755 (executable)
@@ -370,7 +370,8 @@ if ! $skip_gnulib; then
     --import \
     --avoid=hashcode-string1 \
     --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 \
+    --avoid=array-list-tests --avoid=array-map-tests --avoid=array-oset-tests --avoid=carray-list-tests --avoid=linked-list-tests --avoid=linkedhash-list-tests \
+    --avoid=uninorm/decomposing-form-tests \
     `for m in $GNULIB_MODULES_TOOLS_LIBUNISTRING_TESTS; do echo --avoid=$m; done` \
     $GNULIB_MODULES_LIBGETTEXTLIB || exit $?
   $GNULIB_TOOL --copy-file m4/libtextstyle.m4 gettext-tools/gnulib-m4/libtextstyle.m4 || exit $?
index 81973b78973ab44e56d5eb2e897eb6f1659365ed..3bc90b57c1dc4154b758a50ef01598455c221c71 100644 (file)
@@ -149,6 +149,10 @@ else
   is_woe32dll=no
 fi
 AM_CONDITIONAL([WOE32DLL], [test $is_woe32dll = yes])
+if test $is_woe32dll = yes; then
+  AC_DEFINE([WOE32DLL], [1],
+    [Define when --enable-shared is used on Windows.])
+fi
 
 dnl Put some default definitions into config.h.
 AH_BOTTOM([
@@ -158,11 +162,9 @@ AH_BOTTOM([
    the C macro DLL_EXPORT (together with PIC) when compiling for a shared
    library (called DLL under Windows) and does not define it when compiling
    an object file meant to be linked statically into some executable.  */
-#if (defined _WIN32 || defined __CYGWIN__) && defined DLL_EXPORT && !defined IN_RELOCWRAPPER
-# define DLL_VARIABLE __declspec (dllimport)
-#else
-# define DLL_VARIABLE
-#endif
+/* But in the scope of this configure file (gettext-runtime/ without intl and
+   libasprintf), there is no shared library.  So it's simple.  */
+#define DLL_VARIABLE
 
 /* Extra OS/2 (emx+gcc) defines.  */
 #if defined __EMX__ && !defined __KLIBC__
index ae4434df6dff30b31d0d2f4a626083da785a8b96..b7b490823c3960af6198aee662ae288660a9792f 100644 (file)
@@ -128,6 +128,11 @@ gl_PROG_AR_RANLIB
 dnl Set preferences for the gnulib module 'threadlib'.
 gl_AVOID_WINPTHREAD
 
+dnl Customization of libunistring gnulib modules: The code of these modules
+dnl is compiled into libgettextlib, which is associated with the C macro
+dnl 'DLL_VARIABLE' (see below).
+GL_GNULIB_LIBUNISTRING_DLL_VARIABLE_NAME='DLL_VARIABLE'
+
 dnl Make sure we see all GNU and Solaris extensions.
 gl_EARLY
 grgl_EARLY
@@ -342,6 +347,10 @@ else
   is_woe32dll=no
 fi
 AM_CONDITIONAL([WOE32DLL], [test $is_woe32dll = yes])
+if test $is_woe32dll = yes; then
+  AC_DEFINE([WOE32DLL], [1],
+    [Define when --enable-shared is used on Windows.])
+fi
 
 GETTEXTLIB_EXPORTS_FLAGS=
 dnl woe32dll/gettextlib-exports.c needs to know whether the getopt facility
@@ -403,11 +412,39 @@ AH_BOTTOM([
    the C macro DLL_EXPORT (together with PIC) when compiling for a shared
    library (called DLL under Windows) and does not define it when compiling
    an object file meant to be linked statically into some executable.  */
-#if (defined _WIN32 || defined __CYGWIN__) && defined DLL_EXPORT && !defined IN_RELOCWRAPPER
+/* DLL_VARIABLE               is used for variables defined in libgettextlib.
+   LIBGETTEXTSRC_DLL_VARIABLE is used for variables defined in libgettextsrc.
+ */
+#if defined _MSC_VER && WOE32DLL && !defined IN_RELOCWRAPPER
+# if IN_LIBGETTEXTLIB
+#  if defined DLL_EXPORT
+#   define DLL_VARIABLE __declspec (dllexport)
+#  else
+#   define DLL_VARIABLE
+#  endif
+# else
+#  define DLL_VARIABLE __declspec (dllimport)
+# endif
+#elif (defined _WIN32 || defined __CYGWIN__) && defined DLL_EXPORT && !defined IN_RELOCWRAPPER
 # define DLL_VARIABLE __declspec (dllimport)
 #else
 # define DLL_VARIABLE
 #endif
+#if defined _MSC_VER && WOE32DLL && !defined IN_RELOCWRAPPER
+# if IN_LIBGETTEXTSRC
+#  if defined DLL_EXPORT
+#   define LIBGETTEXTSRC_DLL_VARIABLE __declspec (dllexport)
+#  else
+#   define LIBGETTEXTSRC_DLL_VARIABLE
+#  endif
+# else
+#  define LIBGETTEXTSRC_DLL_VARIABLE __declspec (dllimport)
+# endif
+#elif (defined _WIN32 || defined __CYGWIN__) && defined DLL_EXPORT && !defined IN_RELOCWRAPPER
+# define LIBGETTEXTSRC_DLL_VARIABLE __declspec (dllimport)
+#else
+# define LIBGETTEXTSRC_DLL_VARIABLE
+#endif
 
 /* Extra OS/2 (emx+gcc) defines.  */
 #if defined __EMX__ && !defined __KLIBC__
index a7fa494fa6e0a6b8a3d1c2a56c5fdd41c31d238d..23222d53747a9f49805421d790fc56b2ca46bdd7 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools/gnulib-lib 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
@@ -44,6 +44,9 @@ AM_CPPFLAGS += -I../../gettext-runtime/intl
 # Needed so that woe32dll/export.h is found.
 AM_CPPFLAGS += -I$(top_srcdir)
 
+# Needed for the expansion of DLL_VARIABLE on MSVC.
+AM_CPPFLAGS += -DIN_LIBGETTEXTLIB
+
 # Parametrization of the 'relocatable' module.
 AM_CPPFLAGS += -DDEPENDS_ON_LIBICONV=1 -DDEPENDS_ON_LIBINTL=1
 
index 559c0e91d368c6181931fcc797d00aaea6e0275a..e4d5f6c242f29d7580a8c6b1b3b1f1643a0da704 100644 (file)
@@ -160,7 +160,7 @@ endif
 all check install: config.h
 config.h: $(BUILT_SOURCES)
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         : "Avoid double inclusion, to avoid a warning about redefinition of DLL_VARIABLE."; \
+         : "Avoid double inclusion, to avoid a warning about redefinition of DLL_VARIABLE and LIBGETTEXTSRC_DLL_VARIABLE."; \
          echo '#ifndef GTPO_CONFIG_H'; \
          echo '#define GTPO_CONFIG_H'; \
          echo; \
@@ -173,6 +173,8 @@ config.h: $(BUILT_SOURCES)
          : "No references to variables in other libraries exist."; \
          echo '#undef DLL_VARIABLE'; \
          echo '#define DLL_VARIABLE'; \
+         echo '#undef LIBGETTEXTSRC_DLL_VARIABLE'; \
+         echo '#define LIBGETTEXTSRC_DLL_VARIABLE'; \
          echo; \
          echo '#endif /* GTPO_CONFIG_H */'; \
        } > config.h && \
index a5f02c4e3d994d44b5fd0055046bc53aa38f8816..d873ea00125adeaf1368918feeba24b8e91a039f 100644 (file)
@@ -460,6 +460,9 @@ endif
 
 libgettextsrc_la_CPPFLAGS = $(AM_CPPFLAGS) $(INCXML)
 
+# Needed for the expansion of LIBGETTEXTSRC_DLL_VARIABLE on MSVC.
+libgettextsrc_la_CPPFLAGS += -DIN_LIBGETTEXTSRC
+
 # Tell the mingw or Cygwin linker which symbols to export.
 if WOE32DLL
 libgettextsrc_la_SOURCES += ../woe32dll/gettextsrc-exports.c
index 6db78bc3b6ad7b9d832513fa8958538b39ac6463..a087184618104b2470a8d3db0fe15780b2ecaeec 100644 (file)
@@ -100,44 +100,44 @@ struct formatstring_parser
 };
 
 /* Format string parsers, each defined in its own file.  */
-extern DLL_VARIABLE struct formatstring_parser formatstring_c;
-extern DLL_VARIABLE struct formatstring_parser formatstring_objc;
-extern DLL_VARIABLE struct formatstring_parser formatstring_cplusplus_brace;
-extern DLL_VARIABLE struct formatstring_parser formatstring_python;
-extern DLL_VARIABLE struct formatstring_parser formatstring_python_brace;
-extern DLL_VARIABLE struct formatstring_parser formatstring_java;
-extern DLL_VARIABLE struct formatstring_parser formatstring_java_printf;
-extern DLL_VARIABLE struct formatstring_parser formatstring_csharp;
-extern DLL_VARIABLE struct formatstring_parser formatstring_javascript;
-extern DLL_VARIABLE struct formatstring_parser formatstring_scheme;
-extern DLL_VARIABLE struct formatstring_parser formatstring_lisp;
-extern DLL_VARIABLE struct formatstring_parser formatstring_elisp;
-extern DLL_VARIABLE struct formatstring_parser formatstring_librep;
-extern DLL_VARIABLE struct formatstring_parser formatstring_rust;
-extern DLL_VARIABLE struct formatstring_parser formatstring_go;
-extern DLL_VARIABLE struct formatstring_parser formatstring_ruby;
-extern DLL_VARIABLE struct formatstring_parser formatstring_sh;
-extern DLL_VARIABLE struct formatstring_parser formatstring_awk;
-extern DLL_VARIABLE struct formatstring_parser formatstring_lua;
-extern DLL_VARIABLE struct formatstring_parser formatstring_pascal;
-extern DLL_VARIABLE struct formatstring_parser formatstring_modula2;
-extern DLL_VARIABLE struct formatstring_parser formatstring_d;
-extern DLL_VARIABLE struct formatstring_parser formatstring_smalltalk;
-extern DLL_VARIABLE struct formatstring_parser formatstring_qt;
-extern DLL_VARIABLE struct formatstring_parser formatstring_qt_plural;
-extern DLL_VARIABLE struct formatstring_parser formatstring_kde;
-extern DLL_VARIABLE struct formatstring_parser formatstring_kde_kuit;
-extern DLL_VARIABLE struct formatstring_parser formatstring_boost;
-extern DLL_VARIABLE struct formatstring_parser formatstring_tcl;
-extern DLL_VARIABLE struct formatstring_parser formatstring_perl;
-extern DLL_VARIABLE struct formatstring_parser formatstring_perl_brace;
-extern DLL_VARIABLE struct formatstring_parser formatstring_php;
-extern DLL_VARIABLE struct formatstring_parser formatstring_gcc_internal;
-extern DLL_VARIABLE struct formatstring_parser formatstring_gfc_internal;
-extern DLL_VARIABLE struct formatstring_parser formatstring_ycp;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_c;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_objc;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_cplusplus_brace;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_python;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_python_brace;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_java;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_java_printf;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_csharp;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_javascript;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_scheme;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_lisp;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_elisp;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_librep;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_rust;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_go;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_ruby;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_sh;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_awk;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_lua;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_pascal;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_modula2;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_d;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_smalltalk;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_qt;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_qt_plural;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_kde;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_kde_kuit;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_boost;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_tcl;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_perl;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_perl_brace;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_php;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_gcc_internal;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_gfc_internal;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser formatstring_ycp;
 
 /* Table of all format string parsers.  */
-extern DLL_VARIABLE struct formatstring_parser *formatstring_parsers[NFORMATS];
+extern LIBGETTEXTSRC_DLL_VARIABLE struct formatstring_parser *formatstring_parsers[NFORMATS];
 
 /* Returns an array of the ISO C 99 <inttypes.h> format directives and other
    format flags or directives with a system dependent expansion contained in
index c7f4760b4ded26d38c400d9c97a14807387c71e6..5f242acc5dda3e4f39c8439b96a79b2b2416eb56 100644 (file)
@@ -80,8 +80,8 @@ enum format_type
   format_ycp
 };
 #define NFORMATS 35     /* Number of format_type enum values.  */
-extern DLL_VARIABLE const char *const format_language[NFORMATS];
-extern DLL_VARIABLE const char *const format_language_pretty[NFORMATS];
+extern LIBGETTEXTSRC_DLL_VARIABLE const char *const format_language[NFORMATS];
+extern LIBGETTEXTSRC_DLL_VARIABLE const char *const format_language_pretty[NFORMATS];
 
 /* Is current msgid a format string?  */
 enum is_format
@@ -131,7 +131,7 @@ enum syntax_check_type
   sc_bullet_unicode
 };
 #define NSYNTAXCHECKS 4
-extern DLL_VARIABLE const char *const syntax_check_name[NSYNTAXCHECKS];
+extern LIBGETTEXTSRC_DLL_VARIABLE const char *const syntax_check_name[NSYNTAXCHECKS];
 
 /* Is current msgid subject to a syntax check?  */
 #if 0
index 878fa0558881711821048ec6fdb9092fea583bf7..098ffb3b4b7a139ceb85ece7e2db19a4e606adb7 100644 (file)
@@ -1,5 +1,5 @@
 /* Message list concatenation and duplicate handling.
-   Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001-2025 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -31,20 +31,20 @@ extern "C" {
 
 
 /* These variables control which messages are selected.  */
-extern DLL_VARIABLE int more_than;
-extern DLL_VARIABLE int less_than;
+extern LIBGETTEXTSRC_DLL_VARIABLE int more_than;
+extern LIBGETTEXTSRC_DLL_VARIABLE int less_than;
 
 /* If true, use the first available translation.
    If false, merge all available translations into one and fuzzy it.  */
-extern DLL_VARIABLE bool use_first;
+extern LIBGETTEXTSRC_DLL_VARIABLE bool use_first;
 
 /* If true, merge like msgcomm.
    If false, merge like msgcat and msguniq.  */
-extern DLL_VARIABLE bool msgcomm_mode;
+extern LIBGETTEXTSRC_DLL_VARIABLE bool msgcomm_mode;
 
 /* If true, omit the header entry.
    If false, keep the header entry present in the input.  */
-extern DLL_VARIABLE bool omit_header;
+extern LIBGETTEXTSRC_DLL_VARIABLE bool omit_header;
 
 extern msgdomain_list_ty *
        catenate_msgdomain_list (string_list_ty *file_list,
index e6c52bbe5283015d1882a28a72c985c7d762db6a..5691094fd6a67aa8adfde0ed0edaff33dfeae1ba 100644 (file)
@@ -1,5 +1,5 @@
 /* Table of known plural form expressions.
-   Copyright (C) 2001-2003 Free Software Foundation, Inc.
+   Copyright (C) 2001-2025 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2002.
 
    This program is free software: you can redistribute it and/or modify
@@ -27,7 +27,7 @@ struct plural_table_entry
   const char *value;
 };
 
-extern DLL_VARIABLE struct plural_table_entry plural_table[];
-extern DLL_VARIABLE const size_t plural_table_size;
+extern LIBGETTEXTSRC_DLL_VARIABLE struct plural_table_entry plural_table[];
+extern LIBGETTEXTSRC_DLL_VARIABLE const size_t plural_table_size;
 
 #endif /* _PLURAL_TABLE_H */
index 9b7506bd94cd08c55ea387f0413324ed9acf5b8c..08fba3391914bbc887747da84edb5b646e092b6a 100644 (file)
@@ -1,5 +1,5 @@
 /* Charset handling while reading PO files.
-   Copyright (C) 2001-2024 Free Software Foundation, Inc.
+   Copyright (C) 2001-2025 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -38,10 +38,10 @@ extern "C" {
 extern const char *po_charset_canonicalize (const char *charset);
 
 /* The canonicalized encoding name for ASCII.  */
-extern DLL_VARIABLE const char *po_charset_ascii;
+extern LIBGETTEXTSRC_DLL_VARIABLE const char *po_charset_ascii;
 
 /* The canonicalized encoding name for UTF-8.  */
-extern DLL_VARIABLE const char *po_charset_utf8;
+extern LIBGETTEXTSRC_DLL_VARIABLE const char *po_charset_utf8;
 
 /* Test for ASCII compatibility.  */
 extern bool po_charset_ascii_compatible (const char *canon_charset);
index 1eb72ca1abe2619609fe7a50bac37b57f34d5446..58ac612f607dfe89f546fc1bcb252d682c76cb65 100644 (file)
@@ -1,5 +1,5 @@
 /* Error handling during reading and writing of PO files.
-   Copyright (C) 2004, 2006, 2012 Free Software Foundation, Inc.
+   Copyright (C) 2004-2025 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2004.
 
    This program is free software: you can redistribute it and/or modify
@@ -42,14 +42,14 @@ extern "C" {
      - The functions must increment the error_message_count variable declared
        in error.h.  */
 
-extern DLL_VARIABLE
+extern LIBGETTEXTSRC_DLL_VARIABLE
        void (*po_error) (int status, int errnum,
                          const char *format, ...)
 #if (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) || __GNUC__ > 3
        __attribute__ ((__format__ (__printf__, 3, 4)))
 #endif
        ;
-extern DLL_VARIABLE
+extern LIBGETTEXTSRC_DLL_VARIABLE
        void (*po_error_at_line) (int status, int errnum,
                                  const char *filename, unsigned int lineno,
                                  const char *format, ...)
@@ -63,9 +63,9 @@ extern DLL_VARIABLE
      - multiline_error must increment the error_message_count variable declared
        in error.h if prefix != NULL.  */
 
-extern DLL_VARIABLE
+extern LIBGETTEXTSRC_DLL_VARIABLE
        void (*po_multiline_warning) (char *prefix, char *message);
-extern DLL_VARIABLE
+extern LIBGETTEXTSRC_DLL_VARIABLE
        void (*po_multiline_error) (char *prefix, char *message);
 
 
index b926942c53946cc25b919cfba48f798f21ba290e..3b25295f1a68f0b7e7dcca38a87f238857836f96 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading textual message catalogs (such as PO files).
-   Copyright (C) 1995-2024 Free Software Foundation, Inc.
+   Copyright (C) 1995-2025 Free Software Foundation, Inc.
    This file was written by Bruno Haible <haible@clisp.cons.org>.
 
    This program is free software: you can redistribute it and/or modify
@@ -172,7 +172,7 @@ extern default_catalog_reader_ty *
 /* If false, duplicate msgids in the same domain and file generate an error.
    If true, such msgids are allowed; the caller should treat them
    appropriately.  Defaults to false.  */
-extern DLL_VARIABLE bool allow_duplicates;
+extern LIBGETTEXTSRC_DLL_VARIABLE bool allow_duplicates;
 
 /* Read the input file from a stream.  Returns a list of messages.  */
 extern msgdomain_list_ty *
index baf6bbae55adefd46e884828b9c40517cc4f6b6b..5f0c1acce657267d081b9372cd0bc2060760f8ff 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading PO files.
-   Copyright (C) 2006-2024 Free Software Foundation, Inc.
+   Copyright (C) 2006-2025 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2006.
 
    This program is free software: you can redistribute it and/or modify
@@ -27,14 +27,14 @@ extern "C" {
 
 
 /* Describes a .po / .pot file parser.  */
-extern DLL_VARIABLE const struct catalog_input_format input_format_po;
+extern LIBGETTEXTSRC_DLL_VARIABLE const struct catalog_input_format input_format_po;
 
 
 /* Global variables.  */
 
 /* Number of parse errors within a PO file that cause the program to
    terminate.  Cf. error_message_count, declared in <error.h>.  */
-extern DLL_VARIABLE unsigned int gram_max_allowed_errors;
+extern LIBGETTEXTSRC_DLL_VARIABLE unsigned int gram_max_allowed_errors;
 
 
 #ifdef __cplusplus
index 9c299e6c2ea140807181a982e57924723ed9ecc5..38a54f4df4d109d4ac517308df9264e5c87c7993 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading Java .properties files.
-   Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc.
+   Copyright (C) 2003-2025 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -27,7 +27,7 @@ extern "C" {
 
 
 /* Describes a .properties file parser.  */
-extern DLL_VARIABLE const struct catalog_input_format input_format_properties;
+extern LIBGETTEXTSRC_DLL_VARIABLE const struct catalog_input_format input_format_properties;
 
 
 #ifdef __cplusplus
index 4a107f2ff3ffeb2f178292bbfe0041bba5097d5f..e017360c1f39712df1b0c409a5d100267a6ea15e 100644 (file)
@@ -1,5 +1,5 @@
 /* Reading NeXTstep/GNUstep .strings files.
-   Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc.
+   Copyright (C) 2003-2025 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -27,7 +27,7 @@ extern "C" {
 
 
 /* Describes a .strings file parser.  */
-extern DLL_VARIABLE const struct catalog_input_format input_format_stringtable;
+extern LIBGETTEXTSRC_DLL_VARIABLE const struct catalog_input_format input_format_stringtable;
 
 
 #ifdef __cplusplus
index fd507c39e410c69eb70fdb5722199b9d3f3ed174..e6e493153c478aca3e4f7dad83522cc32326c0c2 100644 (file)
@@ -1,5 +1,5 @@
 /* Sentence handling.
-   Copyright (C) 2015-2024 Free Software Foundation, Inc.
+   Copyright (C) 2015-2025 Free Software Foundation, Inc.
    Written by Daiki Ueno <ueno@gnu.org>, 2015.
 
    This program is free software: you can redistribute it and/or modify
@@ -26,7 +26,7 @@ extern "C" {
 
 /* The minimal number of white spaces which should follow after the
    end of sentence.  */
-extern DLL_VARIABLE int sentence_end_required_spaces;
+extern LIBGETTEXTSRC_DLL_VARIABLE int sentence_end_required_spaces;
 
 /* Locates the position of a sentence end marker (a period, a question
    mark, etc.) in a null-terminated string STR.
index 49ae1c024157973bc8294a649f97efcbd58c0de8..50d89bd8575d76ff99320081a73b6e58b504b591 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU gettext - internationalization aids
-   Copyright (C) 1995-1998, 2000-2003, 2006, 2008, 2014, 2018-2019, 2021, 2023 Free Software Foundation, Inc.
+   Copyright (C) 1995-2025 Free Software Foundation, Inc.
 
    This file was written by Peter Miller <millerp@canb.auug.org.au>
 
@@ -83,7 +83,7 @@ extern bool handle_filepos_comment_option (const char *option);
 
 
 /* Describes a PO file in .po syntax.  */
-extern DLL_VARIABLE const struct catalog_output_format output_format_po;
+extern LIBGETTEXTSRC_DLL_VARIABLE const struct catalog_output_format output_format_po;
 
 
 #ifdef __cplusplus
index 7671afb30f94fa74f7a949439f03b27b3ed8c78a..fe495a0bbca1ce6afc2c1cfe3bae3a077d0e4818 100644 (file)
@@ -1,5 +1,5 @@
 /* Writing Java .properties files.
-   Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc.
+   Copyright (C) 2003-2025 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -27,7 +27,7 @@ extern "C" {
 
 
 /* Describes a PO file in Java .properties syntax.  */
-extern DLL_VARIABLE const struct catalog_output_format output_format_properties;
+extern LIBGETTEXTSRC_DLL_VARIABLE const struct catalog_output_format output_format_properties;
 
 
 #ifdef __cplusplus
index af0b081c87a516377b22e8246ffb1ccbcc867d50..4c0ad3a431e287d675db237258c02fd07c4bd4eb 100644 (file)
@@ -1,5 +1,5 @@
 /* Writing NeXTstep/GNUstep .strings files.
-   Copyright (C) 2003, 2006, 2019 Free Software Foundation, Inc.
+   Copyright (C) 2003-2025 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software: you can redistribute it and/or modify
@@ -27,7 +27,7 @@ extern "C" {
 
 
 /* Describes a PO file in .strings syntax.  */
-extern DLL_VARIABLE const struct catalog_output_format output_format_stringtable;
+extern LIBGETTEXTSRC_DLL_VARIABLE const struct catalog_output_format output_format_stringtable;
 
 
 #ifdef __cplusplus
index 13413a4fe4a4a478627515f7dd36b48f9aa8a3c2..b13edd987cdbf4ac81589aa0f7fbf02bdaed42c9 100644 (file)
@@ -1,5 +1,5 @@
 /* Error handling during reading and writing of textual message catalogs.
-   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
@@ -70,7 +70,7 @@ typedef const struct xerror_handler *xerror_handler_ty;
 
 /* The default xerror_handler, that uses the global variable error_message_count
    from <error.h>, and therefore is not multithread-safe.  */
-extern DLL_VARIABLE const struct xerror_handler textmode_xerror_handler_struct;
+extern LIBGETTEXTSRC_DLL_VARIABLE const struct xerror_handler textmode_xerror_handler_struct;
 #define textmode_xerror_handler (&textmode_xerror_handler_struct)