+2002-04-08 Ulrich Drepper <drepper@redhat.com>
+
+ * Makeconfig (CPPFLAGS): Also add CPPFLAGS-<basename> where <basename>
+ is the name of the source file without extension.
+ * Makefile (distribute): Add cppflags-iterator.mk.
+ * cppflags-iterator.mk: New file.
+ * extra-lib.mk: For the sources of the library run
+ cppflags-iterator.mk.
+
+ * include/libintl.h: Declare __dcgettext_internal and
+ _libc_intl_domainname_internal. Define __dcgettext using these
+ two symbols if used in libc itself.
+ * argp/argp-help.c: Define dgettext using __dcgettext_internal and
+ _libc_intl_domainname_internal.
+ * argp/argp-parse.c: Likewise.
+ * intl/dcgettext.c (__dcgettext): Use INTDEF to define alias.
+ * intl/dgettext.c: Call __dcgettext_internal instead of __dcgettext.
+ * intl/gettext.c: Likewise.
+ * locale/SYS_libc.c (_libc_intl_domainname): Use INTDEF to define
+ alias.
+ * posix/regcomp.c (gettext): Use __dcgettext_internal instead of
+ __dcgettext.
+ * posix/regex_internal.c (gettext): Likewise.
+
2002-04-08 Andreas Jaeger <aj@suse.de>
* sysdeps/x86_64/fpu/s_llrint.S: New.
rpm/template rpm/rpmrc glibcbug.in abi-tags stub-tag.h \
test-skeleton.c include/des.h include/libc-internal.h \
include/shlib-compat.h include/pthread.h Versions.def \
- INTERFACE CONFORMANCE NAMESPACE \
+ cppflags-iterator.mk INTERFACE CONFORMANCE NAMESPACE \
$(addprefix scripts/, \
rellns-sh config.sub config.guess \
mkinstalldirs move-if-change install-sh \
/* Hierarchial argument parsing help output
- Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
# include <libintl.h>
# ifdef _LIBC
# undef dgettext
-# define dgettext(domain, msgid) __dcgettext (domain, msgid, LC_MESSAGES)
+# define dgettext(domain, msgid) \
+ INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES)
# endif
# else
# define dgettext(domain, msgid) (msgid)
# include <libintl.h>
# ifdef _LIBC
# undef dgettext
-# define dgettext(domain, msgid) __dcgettext (domain, msgid, LC_MESSAGES)
+# define dgettext(domain, msgid) \
+ INTUSE(__dcgettext) (domain, msgid, LC_MESSAGES)
# endif
# else
# define dgettext(domain, msgid) (msgid)
--- /dev/null
+# This file is included several times in a row, once
+# for each element of $(lib)-routines and $(lib)-sysdeps_routines.
+
+cpp-src := $(firstword $(cpp-srcs-left))
+cpp-srcs-left := $(filter-out $(cpp-src),$(cpp-srcs-left))
+
+CPPFLAGS-$(cpp-src) = -DNOT_IN_LIBC -DIS_IN_$(lib)
endif
endif
+
+cpp-srcs-left = $(lib)-routines
+ifneq (,$($(lib)-routines))
+cpp-srcs-left = $($(lib)-routines)
+include $(patsubst %,$(..)cppflags-iterator.mk,$($(lib)-routines))
+endif
+ifneq (,$($(lib)-sysdep_routines))
+cpp-srcs-left = $($(lib)-sysdep_routines)
+include $(patsubst %,$(..)cppflags-iterator.mk,$($(lib)-sysdep_routines))
+endif
__const char *__msgid);
extern char *__dcgettext (__const char *__domainname,
__const char *__msgid, int __category);
+extern char *__dcgettext_internal (__const char *__domainname,
+ __const char *__msgid, int __category)
+ attribute_hidden;
extern char *__textdomain (__const char *__domainname);
extern char *__bindtextdomain (__const char *__domainname,
__const char *__dirname);
extern char *__bind_textdomain_codeset (__const char *__domainname,
__const char *__codeset);
extern const char _libc_intl_domainname[];
+extern const char _libc_intl_domainname_internal[] attribute_hidden;
/* Define the macros `_' and `N_' for conveniently marking translatable
strings in the libc source code. We have to make sure we get the
# undef _
/* This is defined as an optimizing macro, so use it. */
-# define _(msgid) __dcgettext (_libc_intl_domainname, (msgid), LC_MESSAGES)
+# if !defined NOT_IN_LIBC && defined SHARED
+# define _(msgid) \
+ __dcgettext_internal (_libc_intl_domainname_internal, (msgid), LC_MESSAGES)
+# else
+# define _(msgid) \
+ __dcgettext (_libc_intl_domainname, (msgid), LC_MESSAGES)
+#endif
#endif
/* Implementation of the dcgettext(3) function.
- Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
+INTDEF(__dcgettext)
weak_alias (__dcgettext, dcgettext);
#endif
/* Implementation of the dgettext(3) function.
- Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-1997, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define DGETTEXT __dgettext
-# define DCGETTEXT __dcgettext
+# define DCGETTEXT INTUSE(__dcgettext)
#else
# define DGETTEXT dgettext__
# define DCGETTEXT dcgettext__
/* Implementation of gettext(3) function.
- Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define GETTEXT __gettext
-# define DCGETTEXT __dcgettext
+# define DCGETTEXT INTUSE(__dcgettext)
#else
# define GETTEXT gettext__
# define DCGETTEXT dcgettext__
so the string constant is not repeated in dozens of object files. */
const char _libc_intl_domainname[] = "libc";
+INTDEF(_libc_intl_domainname)
# include <libintl.h>
# ifdef _LIBC
# undef gettext
-# define gettext(msgid) __dcgettext ("libc", msgid, LC_MESSAGES)
+# define gettext(msgid) \
+ INTUSE(__dcgettext) (_libc_intl_domainname_internal, msgid, LC_MESSAGES)
# endif
#else
# define gettext(msgid) (msgid)
# include <libintl.h>
# ifdef _LIBC
# undef gettext
-# define gettext(msgid) __dcgettext ("libc", msgid, LC_MESSAGES)
+# define gettext(msgid) \
+ INTUSE(__dcgettext) (_libc_intl_domainname_internal, msgid, LC_MESSAGES)
# endif
#else
# define gettext(msgid) (msgid)