From: Bruno Haible Date: Thu, 5 Jun 2025 19:43:23 +0000 (+0200) Subject: build: Fix MSVC builds with --enable-shared. X-Git-Tag: v0.26~119 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f02b67c633f3f5c2eb2299f7717ce8cc20eaa78e;p=thirdparty%2Fgettext.git build: Fix MSVC builds with --enable-shared. This was a regression in commit 8e914861708ed459a2ae8157eb60d89375ab46cd from 2023-09-06. Thanks to Kirill Makurin 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. --- diff --git a/autogen.sh b/autogen.sh index 32300b3fa..83e284669 100755 --- a/autogen.sh +++ b/autogen.sh @@ -372,7 +372,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 $? diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac index 81973b789..3bc90b57c 100644 --- a/gettext-runtime/configure.ac +++ b/gettext-runtime/configure.ac @@ -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__ diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index ae4434df6..b7b490823 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -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__ diff --git a/gettext-tools/gnulib-lib/Makefile.am b/gettext-tools/gnulib-lib/Makefile.am index a7fa494fa..23222d537 100644 --- a/gettext-tools/gnulib-lib/Makefile.am +++ b/gettext-tools/gnulib-lib/Makefile.am @@ -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 diff --git a/gettext-tools/libgettextpo/Makefile.am b/gettext-tools/libgettextpo/Makefile.am index 559c0e91d..e4d5f6c24 100644 --- a/gettext-tools/libgettextpo/Makefile.am +++ b/gettext-tools/libgettextpo/Makefile.am @@ -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 && \ diff --git a/gettext-tools/src/Makefile.am b/gettext-tools/src/Makefile.am index d54677a15..bad487768 100644 --- a/gettext-tools/src/Makefile.am +++ b/gettext-tools/src/Makefile.am @@ -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 diff --git a/gettext-tools/src/format.h b/gettext-tools/src/format.h index 6db78bc3b..a08718461 100644 --- a/gettext-tools/src/format.h +++ b/gettext-tools/src/format.h @@ -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 format directives and other format flags or directives with a system dependent expansion contained in diff --git a/gettext-tools/src/message.h b/gettext-tools/src/message.h index c7f4760b4..5f242acc5 100644 --- a/gettext-tools/src/message.h +++ b/gettext-tools/src/message.h @@ -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 diff --git a/gettext-tools/src/msgl-cat.h b/gettext-tools/src/msgl-cat.h index 878fa0558..098ffb3b4 100644 --- a/gettext-tools/src/msgl-cat.h +++ b/gettext-tools/src/msgl-cat.h @@ -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 , 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, diff --git a/gettext-tools/src/plural-table.h b/gettext-tools/src/plural-table.h index e6c52bbe5..5691094fd 100644 --- a/gettext-tools/src/plural-table.h +++ b/gettext-tools/src/plural-table.h @@ -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 , 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 */ diff --git a/gettext-tools/src/po-charset.h b/gettext-tools/src/po-charset.h index 9b7506bd9..08fba3391 100644 --- a/gettext-tools/src/po-charset.h +++ b/gettext-tools/src/po-charset.h @@ -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 , 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); diff --git a/gettext-tools/src/po-error.h b/gettext-tools/src/po-error.h index 1eb72ca1a..58ac612f6 100644 --- a/gettext-tools/src/po-error.h +++ b/gettext-tools/src/po-error.h @@ -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 , 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); diff --git a/gettext-tools/src/read-catalog.h b/gettext-tools/src/read-catalog.h index b926942c5..3b25295f1 100644 --- a/gettext-tools/src/read-catalog.h +++ b/gettext-tools/src/read-catalog.h @@ -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 . 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 * diff --git a/gettext-tools/src/read-po.h b/gettext-tools/src/read-po.h index baf6bbae5..5f0c1acce 100644 --- a/gettext-tools/src/read-po.h +++ b/gettext-tools/src/read-po.h @@ -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 , 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 . */ -extern DLL_VARIABLE unsigned int gram_max_allowed_errors; +extern LIBGETTEXTSRC_DLL_VARIABLE unsigned int gram_max_allowed_errors; #ifdef __cplusplus diff --git a/gettext-tools/src/read-properties.h b/gettext-tools/src/read-properties.h index 9c299e6c2..38a54f4df 100644 --- a/gettext-tools/src/read-properties.h +++ b/gettext-tools/src/read-properties.h @@ -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 , 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 diff --git a/gettext-tools/src/read-stringtable.h b/gettext-tools/src/read-stringtable.h index 4a107f2ff..e017360c1 100644 --- a/gettext-tools/src/read-stringtable.h +++ b/gettext-tools/src/read-stringtable.h @@ -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 , 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 diff --git a/gettext-tools/src/sentence.h b/gettext-tools/src/sentence.h index fd507c39e..e6e493153 100644 --- a/gettext-tools/src/sentence.h +++ b/gettext-tools/src/sentence.h @@ -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 , 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. diff --git a/gettext-tools/src/write-po.h b/gettext-tools/src/write-po.h index 49ae1c024..50d89bd85 100644 --- a/gettext-tools/src/write-po.h +++ b/gettext-tools/src/write-po.h @@ -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 @@ -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 diff --git a/gettext-tools/src/write-properties.h b/gettext-tools/src/write-properties.h index 7671afb30..fe495a0bb 100644 --- a/gettext-tools/src/write-properties.h +++ b/gettext-tools/src/write-properties.h @@ -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 , 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 diff --git a/gettext-tools/src/write-stringtable.h b/gettext-tools/src/write-stringtable.h index af0b081c8..4c0ad3a43 100644 --- a/gettext-tools/src/write-stringtable.h +++ b/gettext-tools/src/write-stringtable.h @@ -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 , 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 diff --git a/gettext-tools/src/xerror-handler.h b/gettext-tools/src/xerror-handler.h index 13413a4fe..b13edd987 100644 --- a/gettext-tools/src/xerror-handler.h +++ b/gettext-tools/src/xerror-handler.h @@ -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 , 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)