mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
* intl/gettext.h: Renamed to ...
* intl/gmo.h: ... here. * intl/Makefile (distribute): Add gmo.h, remove gettext.h. * intl/gettextP.h: Update. * intl/loadmsgcat.c: Update. * intl/gettextP.h (PARAMS): Make more portable. (attribute_hidden): Define as empty macro if not already defined. * intl/hash-string.h (PARAMS): Make more portable. * intl/loadinfo.h (PARAMS): Likewise. * intl/plural-exp.h (PARAMS): Likewise. (attribute_hidden): Move definition near the definition of internal_function. * intl/gettextP.h (_nl_locale_name) [!_LIBC]: New declaration. * intl/plural-exp.h (plural_eval) [!_LIBC]: New declaration. 2002-07-13 Bruno Haible <bruno@clisp.org> * intl/dcigettext.c (freea): New macro. (FREE_BLOCKS): Free also the registered blocks. (DCIGETTEXT): Free the 'search' variable. Reported by Andreas Fischer <a.fischer@asentics.de>. 2002-04-27 Bruno Haible <bruno@clisp.org> * intl/gettextP.h [! _LIBC]: Use prefix libintl_ instead of suffix __. * intl/dcigettext.c: Likewise. * intl/dcgettext.c: Likewise. * intl/dgettext.c: Likewise. * intl/gettext.c: Likewise. * intl/dcngettext.c: Likewise. * intl/dngettext.c: Likewise. * intl/ngettext.c: Likewise. * intl/textdomain.c: Likewise. * intl/bindtextdom.c: Likewise. * intl/plural-exp.h: Likewise. 2002-01-02 Bruno Haible <bruno@clisp.org> * intl/loadmsgcat.c (_nl_init_domain_conv): Use PARAMS in extern decl. 2001-04-30 Bruno Haible <bruno@clisp.org> * intl/dcigettext.c (getuid, getgid, geteuid, getegid): Provide default macro definitions. Needed for mingw32.
This commit is contained in:
parent
5cb5cfa2a2
commit
0f1316460c
49
ChangeLog
49
ChangeLog
@ -1,3 +1,52 @@
|
||||
2002-12-11 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* intl/gettext.h: Renamed to ...
|
||||
* intl/gmo.h: ... here.
|
||||
* intl/Makefile (distribute): Add gmo.h, remove gettext.h.
|
||||
* intl/gettextP.h: Update.
|
||||
* intl/loadmsgcat.c: Update.
|
||||
|
||||
* intl/gettextP.h (PARAMS): Make more portable.
|
||||
(attribute_hidden): Define as empty macro if not already defined.
|
||||
* intl/hash-string.h (PARAMS): Make more portable.
|
||||
* intl/loadinfo.h (PARAMS): Likewise.
|
||||
* intl/plural-exp.h (PARAMS): Likewise.
|
||||
(attribute_hidden): Move definition near the definition of
|
||||
internal_function.
|
||||
|
||||
* intl/gettextP.h (_nl_locale_name) [!_LIBC]: New declaration.
|
||||
* intl/plural-exp.h (plural_eval) [!_LIBC]: New declaration.
|
||||
|
||||
2002-07-13 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* intl/dcigettext.c (freea): New macro.
|
||||
(FREE_BLOCKS): Free also the registered blocks.
|
||||
(DCIGETTEXT): Free the 'search' variable.
|
||||
Reported by Andreas Fischer <a.fischer@asentics.de>.
|
||||
|
||||
2002-04-27 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* intl/gettextP.h [! _LIBC]: Use prefix libintl_ instead of suffix __.
|
||||
* intl/dcigettext.c: Likewise.
|
||||
* intl/dcgettext.c: Likewise.
|
||||
* intl/dgettext.c: Likewise.
|
||||
* intl/gettext.c: Likewise.
|
||||
* intl/dcngettext.c: Likewise.
|
||||
* intl/dngettext.c: Likewise.
|
||||
* intl/ngettext.c: Likewise.
|
||||
* intl/textdomain.c: Likewise.
|
||||
* intl/bindtextdom.c: Likewise.
|
||||
* intl/plural-exp.h: Likewise.
|
||||
|
||||
2002-01-02 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* intl/loadmsgcat.c (_nl_init_domain_conv): Use PARAMS in extern decl.
|
||||
|
||||
2001-04-30 Bruno Haible <bruno@clisp.org>
|
||||
|
||||
* intl/dcigettext.c (getuid, getgid, geteuid, getegid): Provide
|
||||
default macro definitions. Needed for mingw32.
|
||||
|
||||
2002-12-10 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/i386/bits/byteswap.h (__bswap_64): Apply
|
||||
|
@ -46,8 +46,8 @@
|
||||
names than the internal variables in GNU libc, otherwise programs
|
||||
using libintl.a cannot be linked statically. */
|
||||
#if !defined _LIBC
|
||||
# define _nl_default_dirname _nl_default_dirname__
|
||||
# define _nl_domain_bindings _nl_domain_bindings__
|
||||
# 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 <stddef.h>. */
|
||||
@ -83,8 +83,8 @@ __libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
|
||||
# define strdup(str) __strdup (str)
|
||||
# endif
|
||||
#else
|
||||
# define BINDTEXTDOMAIN bindtextdomain__
|
||||
# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
|
||||
# define BINDTEXTDOMAIN libintl_bindtextdomain
|
||||
# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
|
||||
#endif
|
||||
|
||||
/* Prototypes for local functions. */
|
||||
|
@ -38,8 +38,8 @@
|
||||
# define DCGETTEXT __dcgettext
|
||||
# define DCIGETTEXT __dcigettext
|
||||
#else
|
||||
# define DCGETTEXT dcgettext__
|
||||
# define DCIGETTEXT dcigettext__
|
||||
# define DCGETTEXT libintl_dcgettext
|
||||
# define DCIGETTEXT libintl_dcigettext
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
|
@ -103,10 +103,10 @@ extern int errno;
|
||||
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 _nl_default_default_domain__
|
||||
# define _nl_current_default_domain _nl_current_default_domain__
|
||||
# define _nl_default_dirname _nl_default_dirname__
|
||||
# define _nl_domain_bindings _nl_domain_bindings__
|
||||
# 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 <stddef.h>. */
|
||||
@ -280,6 +280,7 @@ static const char *category_to_name PARAMS ((int category)) internal_function;
|
||||
some additional code emulating it. */
|
||||
#ifdef HAVE_ALLOCA
|
||||
/* Nothing has to be done. */
|
||||
# define freea(p) /* nothing */
|
||||
# define ADD_BLOCK(list, address) /* nothing */
|
||||
# define FREE_BLOCKS(list) /* nothing */
|
||||
#else
|
||||
@ -304,11 +305,13 @@ struct block_list
|
||||
while (list != NULL) { \
|
||||
struct block_list *old = list; \
|
||||
list = list->next; \
|
||||
free (old->address); \
|
||||
free (old); \
|
||||
} \
|
||||
} while (0)
|
||||
# undef alloca
|
||||
# define alloca(size) (malloc (size))
|
||||
# define freea(p) free (p)
|
||||
#endif /* have alloca */
|
||||
|
||||
|
||||
@ -332,7 +335,7 @@ typedef unsigned char transmem_block_t;
|
||||
#ifdef _LIBC
|
||||
# define DCIGETTEXT __dcigettext
|
||||
#else
|
||||
# define DCIGETTEXT dcigettext__
|
||||
# define DCIGETTEXT libintl_dcigettext
|
||||
#endif
|
||||
|
||||
/* Lock variable to protect the global data in the gettext implementation. */
|
||||
@ -346,6 +349,18 @@ __libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
|
||||
# define ENABLE_SECURE __libc_enable_secure
|
||||
# define DETERMINE_SECURE
|
||||
#else
|
||||
# ifndef HAVE_GETUID
|
||||
# define getuid() 0
|
||||
# endif
|
||||
# ifndef HAVE_GETGID
|
||||
# define getgid() 0
|
||||
# endif
|
||||
# ifndef HAVE_GETEUID
|
||||
# define geteuid() getuid()
|
||||
# endif
|
||||
# ifndef HAVE_GETEGID
|
||||
# define getegid() getgid()
|
||||
# endif
|
||||
static int enable_secure;
|
||||
# define ENABLE_SECURE (enable_secure == 1)
|
||||
# define DETERMINE_SECURE \
|
||||
@ -425,6 +440,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
|
||||
search->category = category;
|
||||
|
||||
foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
|
||||
freea (search);
|
||||
if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
|
||||
{
|
||||
/* Now deal with plural. */
|
||||
|
@ -38,8 +38,8 @@
|
||||
# define DCNGETTEXT __dcngettext
|
||||
# define DCIGETTEXT __dcigettext
|
||||
#else
|
||||
# define DCNGETTEXT dcngettext__
|
||||
# define DCIGETTEXT dcigettext__
|
||||
# define DCNGETTEXT libintl_dcngettext
|
||||
# define DCIGETTEXT libintl_dcigettext
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||
|
@ -40,8 +40,8 @@
|
||||
# define DGETTEXT __dgettext
|
||||
# define DCGETTEXT INTUSE(__dcgettext)
|
||||
#else
|
||||
# define DGETTEXT dgettext__
|
||||
# define DCGETTEXT dcgettext__
|
||||
# define DGETTEXT libintl_dgettext
|
||||
# define DCGETTEXT libintl_dcgettext
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog of the current
|
||||
|
@ -40,8 +40,8 @@
|
||||
# define DNGETTEXT __dngettext
|
||||
# define DCNGETTEXT __dcngettext
|
||||
#else
|
||||
# define DNGETTEXT dngettext__
|
||||
# define DCNGETTEXT dcngettext__
|
||||
# define DNGETTEXT libintl_dngettext
|
||||
# define DCNGETTEXT libintl_dcngettext
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the DOMAINNAME message catalog of the current
|
||||
|
@ -45,8 +45,8 @@
|
||||
# define GETTEXT __gettext
|
||||
# define DCGETTEXT INTUSE(__dcgettext)
|
||||
#else
|
||||
# define GETTEXT gettext__
|
||||
# define DCGETTEXT dcgettext__
|
||||
# define GETTEXT libintl_gettext
|
||||
# define DCGETTEXT libintl_dcgettext
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
|
@ -33,12 +33,12 @@
|
||||
|
||||
#include "loadinfo.h"
|
||||
|
||||
#include "gettext.h" /* Get nls_uint32. */
|
||||
#include "gmo.h" /* Get nls_uint32. */
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__
|
||||
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
@ -49,6 +49,10 @@
|
||||
# define internal_function
|
||||
#endif
|
||||
|
||||
#ifndef attribute_hidden
|
||||
# define attribute_hidden
|
||||
#endif
|
||||
|
||||
/* Tell the compiler when a conditional or integer expression is
|
||||
almost always true or almost always false. */
|
||||
#ifndef HAVE_BUILTIN_EXPECT
|
||||
@ -157,6 +161,10 @@ struct binding
|
||||
This variable is part of the external ABI of the GNU libintl. */
|
||||
extern int _nl_msg_cat_cntr;
|
||||
|
||||
#ifndef _LIBC
|
||||
const char *_nl_locale_name PARAMS ((int category, const char *categoryname));
|
||||
#endif
|
||||
|
||||
struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
|
||||
char *__locale,
|
||||
const char *__domainname,
|
||||
@ -203,28 +211,33 @@ extern char *__bindtextdomain PARAMS ((const char *__domainname,
|
||||
extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
|
||||
const char *__codeset));
|
||||
#else
|
||||
extern char *gettext__ PARAMS ((const char *__msgid));
|
||||
extern char *dgettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid));
|
||||
extern char *dcgettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid, int __category));
|
||||
extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n));
|
||||
extern char *dngettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n));
|
||||
extern char *dcngettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
unsigned long int __n, int __category));
|
||||
extern char *dcigettext__ PARAMS ((const char *__domainname,
|
||||
const char *__msgid1, const char *__msgid2,
|
||||
int __plural, unsigned long int __n,
|
||||
int __category));
|
||||
extern char *textdomain__ PARAMS ((const char *__domainname));
|
||||
extern char *bindtextdomain__ PARAMS ((const char *__domainname,
|
||||
const char *__dirname));
|
||||
extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
|
||||
const char *__codeset));
|
||||
extern char *libintl_gettext PARAMS ((const char *__msgid));
|
||||
extern char *libintl_dgettext PARAMS ((const char *__domainname,
|
||||
const char *__msgid));
|
||||
extern char *libintl_dcgettext PARAMS ((const char *__domainname,
|
||||
const char *__msgid, int __category));
|
||||
extern char *libintl_ngettext PARAMS ((const char *__msgid1,
|
||||
const char *__msgid2,
|
||||
unsigned long int __n));
|
||||
extern char *libintl_dngettext PARAMS ((const char *__domainname,
|
||||
const char *__msgid1,
|
||||
const char *__msgid2,
|
||||
unsigned long int __n));
|
||||
extern char *libintl_dcngettext PARAMS ((const char *__domainname,
|
||||
const char *__msgid1,
|
||||
const char *__msgid2,
|
||||
unsigned long int __n,
|
||||
int __category));
|
||||
extern char *libintl_dcigettext PARAMS ((const char *__domainname,
|
||||
const char *__msgid1,
|
||||
const char *__msgid2,
|
||||
int __plural, unsigned long int __n,
|
||||
int __category));
|
||||
extern char *libintl_textdomain PARAMS ((const char *__domainname));
|
||||
extern char *libintl_bindtextdomain PARAMS ((const char *__domainname,
|
||||
const char *__dirname));
|
||||
extern char *libintl_bind_textdomain_codeset PARAMS ((const char *__domainname,
|
||||
const char *__codeset));
|
||||
#endif
|
||||
|
||||
/* @@ begin of epilog @@ */
|
||||
|
@ -20,7 +20,7 @@
|
||||
/* @@ end of prolog @@ */
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__
|
||||
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
|
||||
# define PARAMS(Args) Args
|
||||
# else
|
||||
# define PARAMS(Args) ()
|
||||
|
@ -20,8 +20,20 @@
|
||||
#ifndef _LOADINFO_H
|
||||
#define _LOADINFO_H 1
|
||||
|
||||
/* Declarations of locale dependent catalog lookup functions.
|
||||
Implemented in
|
||||
|
||||
localealias.c Possibly replace a locale name by another.
|
||||
explodename.c Split a locale name into its various fields.
|
||||
l10nflist.c Generate a list of filenames of possible message catalogs.
|
||||
finddomain.c Find and open the relevant message catalogs.
|
||||
|
||||
The main function _nl_find_domain() in finddomain.c is declared
|
||||
in gettextP.h.
|
||||
*/
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__
|
||||
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
|
@ -80,7 +80,7 @@ char *alloca ();
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#include "gettext.h"
|
||||
#include "gmo.h"
|
||||
#include "gettextP.h"
|
||||
#include "hash-string.h"
|
||||
#include "plural-exp.h"
|
||||
@ -808,7 +808,7 @@ _nl_init_domain_conv (domain_file, domain, domainbinding)
|
||||
outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
|
||||
# else
|
||||
# if HAVE_ICONV
|
||||
extern const char *locale_charset (void);
|
||||
extern const char *locale_charset PARAMS ((void));
|
||||
outcharset = locale_charset ();
|
||||
# endif
|
||||
# endif
|
||||
|
@ -47,8 +47,8 @@
|
||||
# define NGETTEXT __ngettext
|
||||
# define DCNGETTEXT __dcngettext
|
||||
#else
|
||||
# define NGETTEXT ngettext__
|
||||
# define DCNGETTEXT dcngettext__
|
||||
# define NGETTEXT libintl_ngettext
|
||||
# define DCNGETTEXT libintl_dcngettext
|
||||
#endif
|
||||
|
||||
/* Look up MSGID in the current default message catalog for the current
|
||||
|
@ -22,7 +22,7 @@
|
||||
#define _PLURAL_EXP_H
|
||||
|
||||
#ifndef PARAMS
|
||||
# if __STDC__
|
||||
# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
|
||||
# define PARAMS(args) args
|
||||
# else
|
||||
# define PARAMS(args) ()
|
||||
@ -33,6 +33,10 @@
|
||||
# define internal_function
|
||||
#endif
|
||||
|
||||
#ifndef attribute_hidden
|
||||
# define attribute_hidden
|
||||
#endif
|
||||
|
||||
|
||||
/* This is the representation of the expressions to determine the
|
||||
plural form. */
|
||||
@ -95,10 +99,10 @@ struct parse_args
|
||||
# define GERMANIC_PLURAL __gettext_germanic_plural
|
||||
# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
|
||||
#elif defined (IN_LIBINTL)
|
||||
# define FREE_EXPRESSION gettext_free_exp__
|
||||
# define PLURAL_PARSE gettextparse__
|
||||
# define GERMANIC_PLURAL gettext_germanic_plural__
|
||||
# define EXTRACT_PLURAL_EXPRESSION gettext_extract_plural__
|
||||
# define FREE_EXPRESSION libintl_gettext_free_exp
|
||||
# define PLURAL_PARSE libintl_gettextparse
|
||||
# define GERMANIC_PLURAL libintl_gettext_germanic_plural
|
||||
# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
|
||||
#else
|
||||
# define FREE_EXPRESSION free_plural_expression
|
||||
# define PLURAL_PARSE parse_plural_expression
|
||||
@ -106,10 +110,6 @@ struct parse_args
|
||||
# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
|
||||
#endif
|
||||
|
||||
#ifndef attribute_hidden
|
||||
# define attribute_hidden
|
||||
#endif
|
||||
|
||||
extern void FREE_EXPRESSION PARAMS ((struct expression *exp))
|
||||
internal_function;
|
||||
extern int PLURAL_PARSE PARAMS ((void *arg));
|
||||
@ -119,4 +119,9 @@ extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry,
|
||||
unsigned long int *npluralsp))
|
||||
internal_function;
|
||||
|
||||
#if !defined (_LIBC) && !defined (IN_LIBINTL)
|
||||
extern unsigned long int plural_eval PARAMS ((struct expression *pexp,
|
||||
unsigned long int n));
|
||||
#endif
|
||||
|
||||
#endif /* _PLURAL_EXP_H */
|
||||
|
@ -45,8 +45,8 @@
|
||||
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 _nl_default_default_domain__
|
||||
# define _nl_current_default_domain _nl_current_default_domain__
|
||||
# define _nl_default_default_domain libintl_nl_default_default_domain
|
||||
# define _nl_current_default_domain libintl_nl_current_default_domain
|
||||
#endif
|
||||
|
||||
/* @@ end of prolog @@ */
|
||||
@ -68,7 +68,7 @@ extern const char *_nl_current_default_domain attribute_hidden;
|
||||
# define strdup(str) __strdup (str)
|
||||
# endif
|
||||
#else
|
||||
# define TEXTDOMAIN textdomain__
|
||||
# define TEXTDOMAIN libintl_textdomain
|
||||
#endif
|
||||
|
||||
/* Lock variable to protect the global data in the gettext implementation. */
|
||||
|
Loading…
Reference in New Issue
Block a user