From: Bruno Haible Date: Mon, 6 Nov 2006 12:49:33 +0000 (+0000) Subject: Move declarations to gettextP.h. X-Git-Tag: v0.17~683 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fefd7ac2120c4f38a45df0a253a5157f7758e084;p=thirdparty%2Fgettext.git Move declarations to gettextP.h. --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index b253c2f54..7d7ca6f6d 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,17 @@ +2006-10-30 Bruno Haible + + Move declarations to header files. + * gettextP.h (_nl_default_dirname, _nl_domain_bindings): New + declarations and aliases. + (_nl_default_default_domain, _nl_current_default_domain): New + declarations and aliases. + * bindtextdom.c (_nl_default_dirname, _nl_domain_bindings): Remove + declarations and aliases. + * dcigettext.c (_nl_default_default_domain, _nl_current_default_domain, + _nl_default_dirname, _nl_domain_bindings): Remove aliases. + * textdomain.c (_nl_default_default_domain, _nl_current_default_domain): + Remove declarations and aliases. + 2006-11-01 Bruno Haible * printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results. diff --git a/gettext-runtime/intl/bindtextdom.c b/gettext-runtime/intl/bindtextdom.c index d1b1f9028..dab5d4f35 100644 --- a/gettext-runtime/intl/bindtextdom.c +++ b/gettext-runtime/intl/bindtextdom.c @@ -41,14 +41,6 @@ # include "lock.h" #endif -/* The internal variables in the standalone libintl.a must have different - names than the internal variables in GNU libc, otherwise programs - using libintl.a cannot be linked statically. */ -#if !defined _LIBC -# define _nl_default_dirname libintl_nl_default_dirname -# define _nl_domain_bindings libintl_nl_domain_bindings -#endif - /* Some compilers, like SunOS4 cc, don't have offsetof in . */ #ifndef offsetof # define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) @@ -56,15 +48,6 @@ /* @@ end of prolog @@ */ -/* Contains the default location of the message catalogs. */ -extern const char _nl_default_dirname[]; -#ifdef _LIBC -libc_hidden_proto (_nl_default_dirname) -#endif - -/* List with bindings of specific domains. */ -extern struct binding *_nl_domain_bindings; - /* Lock variable to protect the global data in the gettext implementation. */ gl_rwlock_define (extern, _nl_state_lock attribute_hidden) diff --git a/gettext-runtime/intl/dcigettext.c b/gettext-runtime/intl/dcigettext.c index c3cf6eb53..d2b306c5d 100644 --- a/gettext-runtime/intl/dcigettext.c +++ b/gettext-runtime/intl/dcigettext.c @@ -125,16 +125,6 @@ extern int errno; ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2) #endif -/* The internal variables in the standalone libintl.a must have different - names than the internal variables in GNU libc, otherwise programs - using libintl.a cannot be linked statically. */ -#if !defined _LIBC -# define _nl_default_default_domain libintl_nl_default_default_domain -# define _nl_current_default_domain libintl_nl_current_default_domain -# define _nl_default_dirname libintl_nl_default_dirname -# define _nl_domain_bindings libintl_nl_domain_bindings -#endif - /* Some compilers, like SunOS4 cc, don't have offsetof in . */ #ifndef offsetof # define offsetof(type,ident) ((size_t)&(((type*)0)->ident)) diff --git a/gettext-runtime/intl/gettextP.h b/gettext-runtime/intl/gettextP.h index 2c08d4198..bba3c2ea8 100644 --- a/gettext-runtime/intl/gettextP.h +++ b/gettext-runtime/intl/gettextP.h @@ -246,6 +246,37 @@ char *_nl_find_msg (struct loaded_l10nfile *domain_file, internal_function; #endif +/* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ +#if !defined _LIBC +# define _nl_default_dirname libintl_nl_default_dirname +# define _nl_domain_bindings libintl_nl_domain_bindings +#endif + +/* Contains the default location of the message catalogs. */ +extern const char _nl_default_dirname[]; +#ifdef _LIBC +libc_hidden_proto (_nl_default_dirname) +#endif + +/* List with bindings of specific domains. */ +extern struct binding *_nl_domain_bindings; + +/* The internal variables in the standalone libintl.a must have different + names than the internal variables in GNU libc, otherwise programs + using libintl.a cannot be linked statically. */ +#if !defined _LIBC +# define _nl_default_default_domain libintl_nl_default_default_domain +# define _nl_current_default_domain libintl_nl_current_default_domain +#endif + +/* Name of the default text domain. */ +extern const char _nl_default_default_domain[] attribute_hidden; + +/* Default text domain in which entries for gettext(3) are to be found. */ +extern const char *_nl_current_default_domain attribute_hidden; + /* @@ begin of epilog @@ */ #endif /* gettextP.h */ diff --git a/gettext-runtime/intl/textdomain.c b/gettext-runtime/intl/textdomain.c index c316460fd..70131bc80 100644 --- a/gettext-runtime/intl/textdomain.c +++ b/gettext-runtime/intl/textdomain.c @@ -40,22 +40,8 @@ # include "lock.h" #endif -/* The internal variables in the standalone libintl.a must have different - names than the internal variables in GNU libc, otherwise programs - using libintl.a cannot be linked statically. */ -#if !defined _LIBC -# define _nl_default_default_domain libintl_nl_default_default_domain -# define _nl_current_default_domain libintl_nl_current_default_domain -#endif - /* @@ end of prolog @@ */ -/* Name of the default text domain. */ -extern const char _nl_default_default_domain[] attribute_hidden; - -/* Default text domain in which entries for gettext(3) are to be found. */ -extern const char *_nl_current_default_domain 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