From: Bruno Haible Date: Sat, 16 Sep 2023 10:32:25 +0000 (+0200) Subject: Fix a misnomer. X-Git-Tag: v0.23~395 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f4fa39c03b485cceb479c3d0798da5f962a2d39;p=thirdparty%2Fgettext.git Fix a misnomer. * gettext-runtime/configure.ac: Prefer the term "shared library", since the term "DLL" applies only to Windows. * gettext-runtime/intl/configure.ac: Likewise. * gettext-tools/configure.ac: Likewise. * gettext-runtime/intl/export.h (LIBINTL_SHLIB_EXPORTED): Renamed from LIBINTL_DLL_EXPORTED. Prefer the term "shared library", since the term "DLL" applies only to Windows. * gettext-runtime/intl/Makefile.am (AM_CPPFLAGS): Update comment. (libgnuintl.h): Insert LIBINTL_SHLIB_EXPORTED instead of LIBINTL_DLL_EXPORTED. * gettext-runtime/intl/gettextP.h: Use LIBGLOCALE_SHLIB_EXPORTED instead of LIBGLOCALE_DLL_EXPORTED. Use LIBINTL_SHLIB_EXPORTED instead of LIBINTL_DLL_EXPORTED. * gettext-runtime/intl/loadinfo.h (LIBINTL_SHLIB_EXPORTED): Renamed from LIBINTL_DLL_EXPORTED. * gettext-runtime/intl/intl-compat.c (SHLIB_EXPORTED): Renamed from DLL_EXPORTED. Prefer the term "shared library", since the term "DLL" applies only to Windows. * gettext-runtime/intl/printf.c (SHLIB_EXPORTED): Likewise. * gettext-runtime/intl/setlocale.c (SHLIB_EXPORTED): Likewise. * gettext-tools/woe32dll/export.h: Update comment. --- diff --git a/gettext-runtime/configure.ac b/gettext-runtime/configure.ac index 35b020fec..456fa1210 100644 --- a/gettext-runtime/configure.ac +++ b/gettext-runtime/configure.ac @@ -138,9 +138,9 @@ AH_BOTTOM([ /* On Windows, variables that may be in a DLL must be marked specially. The symbols marked with DLL_VARIABLE should be exported if and only if the object file gets included in a DLL. Libtool, on Windows platforms, defines - the C macro DLL_EXPORT (together with PIC) when compiling for a DLL - and does not define it when compiling an object file meant to be linked - statically into some executable. */ + 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 diff --git a/gettext-runtime/intl/Makefile.am b/gettext-runtime/intl/Makefile.am index aee3bd5d3..99f4e0519 100644 --- a/gettext-runtime/intl/Makefile.am +++ b/gettext-runtime/intl/Makefile.am @@ -31,8 +31,8 @@ DISTCLEANFILES = MAINTAINERCLEANFILES = SUFFIXES = -# -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro. -# -DBUILDING_DLL: Change expansion of DLL_EXPORTED macro. We're compiling +# -DBUILDING_LIBINTL: Change expansion of LIBINTL_SHLIB_EXPORTED macro. +# -DBUILDING_DLL: Change expansion of SHLIB_EXPORTED macro. We're compiling # a library. Exporting the relevant symbols is desired. AM_CPPFLAGS = \ -Ignulib-lib -I$(srcdir)/gnulib-lib \ @@ -237,7 +237,7 @@ libgnuintl.h: $(srcdir)/libgnuintl.in.h $(srcdir)/export.h else \ cat; \ fi \ - | sed -e 's/extern \([^"]\)/extern LIBINTL_DLL_EXPORTED \1/' \ + | sed -e 's/extern \([^"]\)/extern LIBINTL_SHLIB_EXPORTED \1/' \ -e "/#define _LIBINTL_H/r $(srcdir)/export.h" \ | sed -e '/#define _LIBINTL_H/,/[*][/]$$/{/#define _LIBINTL_H/!d;}' \ | sed -e 's,@''HAVE_VISIBILITY''@,@HAVE_VISIBILITY@,g' \ diff --git a/gettext-runtime/intl/configure.ac b/gettext-runtime/intl/configure.ac index f4223d1c6..190d9a8bf 100644 --- a/gettext-runtime/intl/configure.ac +++ b/gettext-runtime/intl/configure.ac @@ -241,9 +241,9 @@ AH_BOTTOM([ /* On Windows, variables that may be in a DLL must be marked specially. The symbols marked with DLL_VARIABLE should be exported if and only if the object file gets included in a DLL. Libtool, on Windows platforms, defines - the C macro DLL_EXPORT (together with PIC) when compiling for a DLL - and does not define it when compiling an object file meant to be linked - statically into some executable. */ + 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 _MSC_VER && defined DLL_EXPORT) && !defined IN_RELOCWRAPPER # define DLL_VARIABLE __declspec (dllimport) #else diff --git a/gettext-runtime/intl/export.h b/gettext-runtime/intl/export.h index aadf1633e..9b5655b8c 100644 --- a/gettext-runtime/intl/export.h +++ b/gettext-runtime/intl/export.h @@ -15,20 +15,20 @@ along with this program. If not, see . */ #if @HAVE_VISIBILITY@ && BUILDING_LIBINTL -# define LIBINTL_DLL_EXPORTED __attribute__((__visibility__("default"))) +# define LIBINTL_SHLIB_EXPORTED __attribute__((__visibility__("default"))) #elif (defined _WIN32 && !defined __CYGWIN__) && @WOE32DLL@ && BUILDING_LIBINTL /* The symbols from this file should be exported if and only if the object file gets included in a DLL. Libtool, on Windows platforms, defines - the C macro DLL_EXPORT (together with PIC) when compiling for a DLL - and does not define it when compiling an object file meant to be linked - statically into some executable. */ + 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 DLL_EXPORT -# define LIBINTL_DLL_EXPORTED __declspec(dllexport) +# define LIBINTL_SHLIB_EXPORTED __declspec(dllexport) # else -# define LIBINTL_DLL_EXPORTED +# define LIBINTL_SHLIB_EXPORTED # endif #elif (defined _WIN32 && !defined __CYGWIN__) && @WOE32DLL@ -# define LIBINTL_DLL_EXPORTED __declspec(dllimport) +# define LIBINTL_SHLIB_EXPORTED __declspec(dllimport) #else -# define LIBINTL_DLL_EXPORTED +# define LIBINTL_SHLIB_EXPORTED #endif diff --git a/gettext-runtime/intl/gettextP.h b/gettext-runtime/intl/gettextP.h index e8e1edd9a..1f875069a 100644 --- a/gettext-runtime/intl/gettextP.h +++ b/gettext-runtime/intl/gettextP.h @@ -222,9 +222,9 @@ struct binding #endif #ifdef IN_LIBGLOCALE # include -extern LIBGLOCALE_DLL_EXPORTED int _nl_msg_cat_cntr; +extern LIBGLOCALE_SHLIB_EXPORTED int _nl_msg_cat_cntr; #else -extern LIBINTL_DLL_EXPORTED int _nl_msg_cat_cntr; +extern LIBINTL_SHLIB_EXPORTED int _nl_msg_cat_cntr; #endif #ifndef _LIBC diff --git a/gettext-runtime/intl/intl-compat.c b/gettext-runtime/intl/intl-compat.c index a33dacb7e..c17f78285 100644 --- a/gettext-runtime/intl/intl-compat.c +++ b/gettext-runtime/intl/intl-compat.c @@ -51,11 +51,11 @@ #undef bind_textdomain_codeset -/* When building a DLL, we must export some functions. Note that because - the functions are only defined for binary backward compatibility, we - don't need to use __declspec(dllimport) in any case. */ +/* When building a shared library, we must export some functions. + Note that because this is a .c file, not a .h file, we don't need to use + __declspec(dllimport) in any case. */ #if HAVE_VISIBILITY && BUILDING_DLL -# define DLL_EXPORTED __attribute__((__visibility__("default"))) +# define SHLIB_EXPORTED __attribute__((__visibility__("default"))) #elif defined _MSC_VER && BUILDING_DLL /* When building with MSVC, exporting a symbol means that the object file contains a "linker directive" of the form /EXPORT:symbol. This can be @@ -63,20 +63,20 @@ "dumpbin /directives FILE" commands. The symbols from this file should be exported if and only if the object file gets included in a DLL. Libtool, on Windows platforms, defines - the C macro DLL_EXPORT (together with PIC) when compiling for a DLL - and does not define it when compiling an object file meant to be linked - statically into some executable. */ + 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 DLL_EXPORT -# define DLL_EXPORTED __declspec(dllexport) +# define SHLIB_EXPORTED __declspec(dllexport) # else -# define DLL_EXPORTED +# define SHLIB_EXPORTED # endif #else -# define DLL_EXPORTED +# define SHLIB_EXPORTED #endif -DLL_EXPORTED +SHLIB_EXPORTED char * gettext (const char *msgid) { @@ -84,7 +84,7 @@ gettext (const char *msgid) } -DLL_EXPORTED +SHLIB_EXPORTED char * dgettext (const char *domainname, const char *msgid) { @@ -92,7 +92,7 @@ dgettext (const char *domainname, const char *msgid) } -DLL_EXPORTED +SHLIB_EXPORTED char * dcgettext (const char *domainname, const char *msgid, int category) { @@ -100,7 +100,7 @@ dcgettext (const char *domainname, const char *msgid, int category) } -DLL_EXPORTED +SHLIB_EXPORTED char * ngettext (const char *msgid1, const char *msgid2, unsigned long int n) { @@ -108,7 +108,7 @@ ngettext (const char *msgid1, const char *msgid2, unsigned long int n) } -DLL_EXPORTED +SHLIB_EXPORTED char * dngettext (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n) @@ -117,7 +117,7 @@ dngettext (const char *domainname, } -DLL_EXPORTED +SHLIB_EXPORTED char * dcngettext (const char *domainname, const char *msgid1, const char *msgid2, unsigned long int n, @@ -127,7 +127,7 @@ dcngettext (const char *domainname, } -DLL_EXPORTED +SHLIB_EXPORTED char * textdomain (const char *domainname) { @@ -135,7 +135,7 @@ textdomain (const char *domainname) } -DLL_EXPORTED +SHLIB_EXPORTED char * bindtextdomain (const char *domainname, const char *dirname) { @@ -143,7 +143,7 @@ bindtextdomain (const char *domainname, const char *dirname) } -DLL_EXPORTED +SHLIB_EXPORTED char * bind_textdomain_codeset (const char *domainname, const char *codeset) { diff --git a/gettext-runtime/intl/loadinfo.h b/gettext-runtime/intl/loadinfo.h index 97d8dd4a1..a15436253 100644 --- a/gettext-runtime/intl/loadinfo.h +++ b/gettext-runtime/intl/loadinfo.h @@ -34,8 +34,8 @@ # define internal_function #endif -#ifndef LIBINTL_DLL_EXPORTED -# define LIBINTL_DLL_EXPORTED +#ifndef LIBINTL_SHLIB_EXPORTED +# define LIBINTL_SHLIB_EXPORTED #endif /* Tell the compiler when a conditional or integer expression is @@ -130,7 +130,7 @@ _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, NAME is not a locale alias (but possibly a real locale name). The return value is statically allocated and must not be freed. */ /* Part of the libintl ABI only for the sake of the gettext.m4 macro. */ -extern LIBINTL_DLL_EXPORTED const char *_nl_expand_alias (const char *name); +extern LIBINTL_SHLIB_EXPORTED const char *_nl_expand_alias (const char *name); /* Split a locale name NAME into its pieces: language, modifier, territory, codeset. diff --git a/gettext-runtime/intl/printf.c b/gettext-runtime/intl/printf.c index 4395d698c..25099ca8e 100644 --- a/gettext-runtime/intl/printf.c +++ b/gettext-runtime/intl/printf.c @@ -58,11 +58,11 @@ char *alloca (); # define EOVERFLOW E2BIG #endif -/* When building a DLL, we must export some functions. Note that because - the functions are only defined for binary backward compatibility, we - don't need to use __declspec(dllimport) in any case. */ +/* When building a shared library, we must export some functions. + Note that because this is a .c file, not a .h file, we don't need to use + __declspec(dllimport) in any case. */ #if HAVE_VISIBILITY && BUILDING_DLL -# define DLL_EXPORTED __attribute__((__visibility__("default"))) +# define SHLIB_EXPORTED __attribute__((__visibility__("default"))) #elif defined _MSC_VER && BUILDING_DLL /* When building with MSVC, exporting a symbol means that the object file contains a "linker directive" of the form /EXPORT:symbol. This can be @@ -70,16 +70,16 @@ char *alloca (); "dumpbin /directives FILE" commands. The symbols from this file should be exported if and only if the object file gets included in a DLL. Libtool, on Windows platforms, defines - the C macro DLL_EXPORT (together with PIC) when compiling for a DLL - and does not define it when compiling an object file meant to be linked - statically into some executable. */ + 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 DLL_EXPORT -# define DLL_EXPORTED __declspec(dllexport) +# define SHLIB_EXPORTED __declspec(dllexport) # else -# define DLL_EXPORTED +# define SHLIB_EXPORTED # endif #else -# define DLL_EXPORTED +# define SHLIB_EXPORTED #endif #define STATIC static @@ -126,7 +126,7 @@ char *alloca (); the *printf functions with _INTL_ATTRIBUTE_FORMAT_PRINTF_STANDARD. */ #define USE_REPLACEMENT_CODE_ALWAYS 1 -DLL_EXPORTED +SHLIB_EXPORTED int libintl_vfprintf (FILE *stream, const char *format, va_list args) { @@ -155,7 +155,7 @@ libintl_vfprintf (FILE *stream, const char *format, va_list args) } } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_fprintf (FILE *stream, const char *format, ...) { @@ -168,14 +168,14 @@ libintl_fprintf (FILE *stream, const char *format, ...) return retval; } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_vprintf (const char *format, va_list args) { return libintl_vfprintf (stdout, format, args); } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_printf (const char *format, ...) { @@ -188,7 +188,7 @@ libintl_printf (const char *format, ...) return retval; } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_vsprintf (char *resultbuf, const char *format, va_list args) { @@ -215,7 +215,7 @@ libintl_vsprintf (char *resultbuf, const char *format, va_list args) } } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_sprintf (char *resultbuf, const char *format, ...) { @@ -243,7 +243,7 @@ libintl_sprintf (char *resultbuf, const char *format, ...) # define system_vsnprintf vsnprintf # endif -DLL_EXPORTED +SHLIB_EXPORTED int libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args) { @@ -278,7 +278,7 @@ libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list a } } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_snprintf (char *resultbuf, size_t length, const char *format, ...) { @@ -295,7 +295,7 @@ libintl_snprintf (char *resultbuf, size_t length, const char *format, ...) #if HAVE_ASPRINTF -DLL_EXPORTED +SHLIB_EXPORTED int libintl_vasprintf (char **resultp, const char *format, va_list args) { @@ -313,7 +313,7 @@ libintl_vasprintf (char **resultp, const char *format, va_list args) return length; } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_asprintf (char **resultp, const char *format, ...) { @@ -362,7 +362,7 @@ libintl_asprintf (char **resultp, const char *format, ...) # define system_vswprintf vswprintf # endif -DLL_EXPORTED +SHLIB_EXPORTED int libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args) { @@ -394,7 +394,7 @@ libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args) } } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_fwprintf (FILE *stream, const wchar_t *format, ...) { @@ -407,14 +407,14 @@ libintl_fwprintf (FILE *stream, const wchar_t *format, ...) return retval; } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_vwprintf (const wchar_t *format, va_list args) { return libintl_vfwprintf (stdout, format, args); } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_wprintf (const wchar_t *format, ...) { @@ -427,7 +427,7 @@ libintl_wprintf (const wchar_t *format, ...) return retval; } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args) { @@ -468,7 +468,7 @@ libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_ } } -DLL_EXPORTED +SHLIB_EXPORTED int libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...) { diff --git a/gettext-runtime/intl/setlocale.c b/gettext-runtime/intl/setlocale.c index ea671833e..a6a3f8006 100644 --- a/gettext-runtime/intl/setlocale.c +++ b/gettext-runtime/intl/setlocale.c @@ -33,11 +33,11 @@ #include #include -/* When building a DLL, we must export some functions. Note that because - the functions are only defined for binary backward compatibility, we - don't need to use __declspec(dllimport) in any case. */ +/* When building a shared library, we must export some functions. + Note that because this is a .c file, not a .h file, we don't need to use + __declspec(dllimport) in any case. */ #if HAVE_VISIBILITY && BUILDING_DLL -# define DLL_EXPORTED __attribute__((__visibility__("default"))) +# define SHLIB_EXPORTED __attribute__((__visibility__("default"))) #elif defined _MSC_VER && BUILDING_DLL /* When building with MSVC, exporting a symbol means that the object file contains a "linker directive" of the form /EXPORT:symbol. This can be @@ -45,16 +45,16 @@ "dumpbin /directives FILE" commands. The symbols from this file should be exported if and only if the object file gets included in a DLL. Libtool, on Windows platforms, defines - the C macro DLL_EXPORT (together with PIC) when compiling for a DLL - and does not define it when compiling an object file meant to be linked - statically into some executable. */ + 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 DLL_EXPORT -# define DLL_EXPORTED __declspec(dllexport) +# define SHLIB_EXPORTED __declspec(dllexport) # else -# define DLL_EXPORTED +# define SHLIB_EXPORTED # endif #else -# define DLL_EXPORTED +# define SHLIB_EXPORTED #endif #include "localename.h" @@ -1406,7 +1406,7 @@ get_main_locale_with_same_territory (const char *locale) # endif -DLL_EXPORTED +SHLIB_EXPORTED char * libintl_setlocale (int category, const char *locale) { @@ -1679,7 +1679,7 @@ libintl_setlocale (int category, const char *locale) # if HAVE_NEWLOCALE -DLL_EXPORTED +SHLIB_EXPORTED locale_t libintl_newlocale (int category_mask, const char *locale, locale_t base) { diff --git a/gettext-tools/configure.ac b/gettext-tools/configure.ac index 9a543d4e6..1506d8160 100644 --- a/gettext-tools/configure.ac +++ b/gettext-tools/configure.ac @@ -338,9 +338,9 @@ AH_BOTTOM([ /* On Windows, variables that may be in a DLL must be marked specially. The symbols marked with DLL_VARIABLE should be exported if and only if the object file gets included in a DLL. Libtool, on Windows platforms, defines - the C macro DLL_EXPORT (together with PIC) when compiling for a DLL - and does not define it when compiling an object file meant to be linked - statically into some executable. */ + 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 diff --git a/gettext-tools/woe32dll/export.h b/gettext-tools/woe32dll/export.h index 3705deef3..02b9b61ad 100644 --- a/gettext-tools/woe32dll/export.h +++ b/gettext-tools/woe32dll/export.h @@ -54,9 +54,9 @@ to define a -DBUILDING_LIBXYZ flag for the library. Example: #ifdef BUILDING_LIBICONV - #define LIBICONV_DLL_EXPORTED __declspec(dllexport) + #define LIBICONV_SHLIB_EXPORTED __declspec(dllexport) #else - #define LIBICONV_DLL_EXPORTED __declspec(dllimport) + #define LIBICONV_SHLIB_EXPORTED __declspec(dllimport) #endif We use this technique for the libintl and the libiconv libraries.