From: Bruno Haible Date: Wed, 4 Dec 2024 08:26:15 +0000 (+0100) Subject: intl: Fix a gcc 14 -Wmissing-variable-declarations warning. X-Git-Tag: v0.24~124 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=87d4ab056ce7688320158cdc6abd39835e7b4fad;p=thirdparty%2Fgettext.git intl: Fix a gcc 14 -Wmissing-variable-declarations warning. * gettext-runtime/intl/gettextP.h (_nl_state_lock): New declaration. * gettext-runtime/intl/bindtextdom.c (_nl_state_lock): Remove declaration. * gettext-runtime/intl/textdomain.c (_nl_state_lock): Remove declaration. --- diff --git a/gettext-runtime/intl/bindtextdom.c b/gettext-runtime/intl/bindtextdom.c index 0b35c8e33..73ddf76ff 100644 --- a/gettext-runtime/intl/bindtextdom.c +++ b/gettext-runtime/intl/bindtextdom.c @@ -1,5 +1,5 @@ /* Implementation of the bindtextdomain(3) function - Copyright (C) 1995-2023 Free Software Foundation, Inc. + Copyright (C) 1995-2024 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -43,9 +43,6 @@ /* @@ end of prolog @@ */ -/* Lock variable to protect the global data in the gettext implementation. */ -gl_rwlock_define (extern, _nl_state_lock attribute_hidden) - /* Names for the libintl functions are a problem. They must not clash with existing names and they should follow ANSI C. But this source diff --git a/gettext-runtime/intl/gettextP.h b/gettext-runtime/intl/gettextP.h index 8059a7641..ee1b4fb72 100644 --- a/gettext-runtime/intl/gettextP.h +++ b/gettext-runtime/intl/gettextP.h @@ -109,6 +109,10 @@ SWAP (nls_uint32 i) #endif +/* Lock variable to protect the global data in the gettext implementation. */ +gl_rwlock_define (extern, _nl_state_lock attribute_hidden) + + /* In-memory representation of system dependent string. */ struct sysdep_string_desc { diff --git a/gettext-runtime/intl/textdomain.c b/gettext-runtime/intl/textdomain.c index 6db0f7227..d73d90f6f 100644 --- a/gettext-runtime/intl/textdomain.c +++ b/gettext-runtime/intl/textdomain.c @@ -1,5 +1,5 @@ /* Implementation of the textdomain(3) function. - Copyright (C) 1995-2023 Free Software Foundation, Inc. + Copyright (C) 1995-2024 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -54,9 +54,6 @@ # define TEXTDOMAIN libintl_textdomain #endif -/* Lock variable to protect the global data in the gettext implementation. */ -gl_rwlock_define (extern, _nl_state_lock attribute_hidden) - /* Set the current default message catalog to DOMAINNAME. If DOMAINNAME is null, return the current default. If DOMAINNAME is "", reset to the default of "messages". */