This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
intl patches (5)
- To: libc-alpha at sources dot redhat dot com
- Subject: intl patches (5)
- From: Bruno Haible <haible at ilog dot fr>
- Date: Mon, 19 Mar 2001 19:11:10 +0100 (CET)
The header files inside gettext have been reorganized. libgettext.h is now
a convenience header depending on ENABLE_NLS and defining gettext_noop,
whereas libgnuintl.h is the "real" libintl.h. (But it must carry a different
name, because when building on a platform which already has a libintl, the
programs which do #include "libintl.h" want to see the system's libintl.h,
but the testsuite needs to see gettext's own include file.)
Furthermore, intl/dgettext.c and intl/gettext.c need to include gettextP.h
(in order to have dcgettext__ declared) but not locale.h (already included
by libintl.h or libgnuintl.h).
This patch has no effect inside glibc.
2001-01-07 Bruno Haible <haible@clisp.cons.org>
* intl/gettextP.h (gettext__, dgettext__, dcgettext__, textdomain__,
bindtextdomain__, bind_textdomain_codeset__): New declarations, from
old libgettext.h.
* intl/bindtextdom.c: Include libgnuintl.h instead of libgettext.h.
* intl/dcgettext.c: Likewise.
* intl/dcigettext.c: Likewise.
* intl/dcngettext.c: Likewise.
* intl/dngettext.c: Likewise.
* intl/finddomain.c: Likewise.
* intl/ngettext.c: Likewise.
* intl/textdomain.c: Likewise.
* intl/dgettext.c: Include libgnuintl.h instead of libgettext.h.
Include gettextP.h.
* intl/gettext.c: Likewise. Don't include locale.h.
diff -r -c3 intl/gettextP.h intl/gettextP.h
*** intl/gettextP.h Sat Mar 17 17:19:19 2001
--- intl/gettextP.h Sat Mar 17 17:42:23 2001
***************
*** 178,204 ****
internal_function;
#ifdef _LIBC
! 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));
#else
! 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));
#endif
extern int __gettextdebug;
--- 178,228 ----
internal_function;
#ifdef _LIBC
! 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));
#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));
#endif
extern int __gettextdebug;
diff -r -c3 intl/bindtextdom.c intl/bindtextdom.c
*** intl/bindtextdom.c Sat Mar 17 17:19:19 2001
--- intl/bindtextdom.c Sat Mar 17 17:42:23 2001
***************
*** 42,48 ****
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgettext.h"
#endif
#include "gettextP.h"
--- 42,48 ----
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgnuintl.h"
#endif
#include "gettextP.h"
diff -r -c3 intl/dcgettext.c intl/dcgettext.c
*** intl/dcgettext.c Sat Mar 17 17:06:11 2001
--- intl/dcgettext.c Sat Mar 17 17:42:23 2001
***************
*** 24,30 ****
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgettext.h"
#endif
/* @@ end of prolog @@ */
--- 24,30 ----
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
diff -r -c3 intl/dcigettext.c intl/dcigettext.c
*** intl/dcigettext.c Sat Mar 17 17:20:01 2001
--- intl/dcigettext.c Sat Mar 17 17:42:23 2001
***************
*** 93,99 ****
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgettext.h"
#endif
#include "hash-string.h"
--- 93,99 ----
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgnuintl.h"
#endif
#include "hash-string.h"
diff -r -c3 intl/dcngettext.c intl/dcngettext.c
*** intl/dcngettext.c Sat Mar 17 17:06:11 2001
--- intl/dcngettext.c Sat Mar 17 17:42:23 2001
***************
*** 24,30 ****
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgettext.h"
#endif
/* @@ end of prolog @@ */
--- 24,30 ----
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
diff -r -c3 intl/dgettext.c intl/dgettext.c
*** intl/dgettext.c Mon Feb 28 11:34:04 2000
--- intl/dgettext.c Sat Mar 17 17:42:23 2001
***************
*** 1,5 ****
/* Implementation of the dgettext(3) function.
! Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
--- 1,5 ----
/* Implementation of the dgettext(3) function.
! Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
***************
*** 24,33 ****
# include <locale.h>
#endif
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgettext.h"
#endif
/* @@ end of prolog @@ */
--- 24,34 ----
# include <locale.h>
#endif
+ #include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
diff -r -c3 intl/dngettext.c intl/dngettext.c
*** intl/dngettext.c Sat Mar 17 17:06:11 2001
--- intl/dngettext.c Sat Mar 17 17:42:23 2001
***************
*** 28,34 ****
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgettext.h"
#endif
/* @@ end of prolog @@ */
--- 28,34 ----
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
diff -r -c3 intl/finddomain.c intl/finddomain.c
*** intl/finddomain.c Sat Mar 17 17:06:11 2001
--- intl/finddomain.c Sat Mar 17 17:42:23 2001
***************
*** 51,57 ****
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgettext.h"
#endif
/* @@ end of prolog @@ */
--- 51,57 ----
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
diff -r -c3 intl/gettext.c intl/gettext.c
*** intl/gettext.c Mon Apr 10 19:27:07 2000
--- intl/gettext.c Sat Mar 17 17:42:23 2001
***************
*** 1,5 ****
/* Implementation of gettext(3) function.
! Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
--- 1,5 ----
/* Implementation of gettext(3) function.
! Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
***************
*** 35,48 ****
# endif
#endif
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgettext.h"
#endif
- #include <locale.h>
-
/* @@ end of prolog @@ */
/* Names for the libintl functions are a problem. They must not clash
--- 35,47 ----
# endif
#endif
+ #include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
/* Names for the libintl functions are a problem. They must not clash
diff -r -c3 intl/ngettext.c intl/ngettext.c
*** intl/ngettext.c Sat Mar 17 17:06:11 2001
--- intl/ngettext.c Sat Mar 17 17:42:23 2001
***************
*** 39,45 ****
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgettext.h"
#endif
#include <locale.h>
--- 39,45 ----
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgnuintl.h"
#endif
#include <locale.h>
diff -r -c3 intl/textdomain.c intl/textdomain.c
*** intl/textdomain.c Sat Mar 17 17:12:46 2001
--- intl/textdomain.c Sat Mar 17 17:42:23 2001
***************
*** 36,42 ****
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgettext.h"
#endif
#include "gettextP.h"
--- 36,42 ----
#ifdef _LIBC
# include <libintl.h>
#else
! # include "libgnuintl.h"
#endif
#include "gettextP.h"