intl patches (2)
Bruno Haible
bruno@clisp.org
Wed Dec 11 10:34:00 GMT 2002
This patch updates the PARAMS macro so that it works on more platforms,
thus avoiding a compilation failure when using Sun C++ on Solaris.
Also define attribute_hidden to avoid a compilation failure on every
system outside glibc.
2002-12-11 Bruno Haible <bruno@clisp.org>
* 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.
--- glibc-20021126/intl/gettextP.h.bak Mon Jul 29 14:31:01 2002
+++ glibc-20021126/intl/gettextP.h Wed Dec 11 15:25:06 2002
@@ -38,7 +38,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) ()
@@ -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
--- glibc-20021126/intl/hash-string.h.bak Tue Jul 10 22:58:51 2001
+++ glibc-20021126/intl/hash-string.h Wed Dec 11 15:26:05 2002
@@ -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) ()
--- glibc-20021126/intl/loadinfo.h.bak Sat Nov 30 02:49:40 2002
+++ glibc-20021126/intl/loadinfo.h Wed Dec 11 15:27:15 2002
@@ -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) ()
--- glibc-20021126/intl/plural-exp.h.bak Thu Apr 4 20:11:22 2002
+++ glibc-20021126/intl/plural-exp.h Wed Dec 11 15:36:03 2002
@@ -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. */
@@ -106,10 +110,6 @@
# 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));
More information about the Libc-alpha
mailing list