summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-11-10 00:26:33 +0000
committerBruno Haible <bruno@clisp.org>2009-06-21 22:56:20 +0200
commit16fc59ed82f19035c88eb0f72899ca669655d405 (patch)
treef0bd8b78d3fc7476b447478579de30e399d8f713
parent38097b81318ccf9ef8616ca9f1c264e0aca177c1 (diff)
downloadexternal_gettext-16fc59ed82f19035c88eb0f72899ca669655d405.zip
external_gettext-16fc59ed82f19035c88eb0f72899ca669655d405.tar.gz
external_gettext-16fc59ed82f19035c88eb0f72899ca669655d405.tar.bz2
Make PARAMS work better on Solaris.
-rw-r--r--ChangeLog8
-rw-r--r--acconfig.h2
-rw-r--r--intl/ChangeLog17
-rw-r--r--intl/gettextP.h2
-rw-r--r--intl/hash-string.h2
-rw-r--r--intl/libgnuintl.h49
-rw-r--r--intl/loadinfo.h2
-rw-r--r--intl/plural-exp.h2
-rw-r--r--lib/ChangeLog19
-rw-r--r--lib/argmatch.h4
-rw-r--r--lib/c-ctype.h2
-rw-r--r--lib/gcd.h2
-rw-r--r--lib/getline.h4
-rw-r--r--lib/hash.h4
-rw-r--r--lib/linebreak.h2
-rw-r--r--lib/mbswidth.h2
-rw-r--r--lib/mkdtemp.h2
-rw-r--r--lib/setenv.h2
-rw-r--r--lib/strpbrk.h2
-rw-r--r--lib/strstr.h2
-rw-r--r--lib/system.h2
-rw-r--r--lib/tmpdir.h2
22 files changed, 94 insertions, 41 deletions
diff --git a/ChangeLog b/ChangeLog
index d086616..45cc9ba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-11-10 Bruno Haible <haible@clisp.cons.org>
+
+ * acconfig.h (PARAMS): Also test for __GNUC__, __SUNPRO_C, __cplusplus
+ and __PROTOTYPES because on 64-bit Solaris, we need prototypes
+ although __STDC__ is often defined to 0. __GNUC__ covers GCC,
+ __SUNPRO_C covers Sun cc, regardless of compilation flags.
+ __PROTOTYPES, __cplusplus are just for consistency with libgnuintl.h.
+
2001-11-03 Bruno Haible <haible@clisp.cons.org>
* ltmain.sh: chmod 777 the .libs directory, so that "make install"
diff --git a/acconfig.h b/acconfig.h
index 6884703..9238b0a 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -6,7 +6,7 @@
#define DEFAULT_OUTPUT_ALIGNMENT 1
#ifndef PARAMS
-# if __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
diff --git a/intl/ChangeLog b/intl/ChangeLog
index e14a763..b86d004 100644
--- a/intl/ChangeLog
+++ b/intl/ChangeLog
@@ -1,3 +1,20 @@
+2001-11-10 Bruno Haible <haible@clisp.cons.org>
+
+ * libgnuintl.h (_INTL_PARAMS): Renamed from PARAMS, to avoid polluting
+ the user's namespace.
+ Also test for __GNUC__, __SUNPRO_C and __PROTOTYPES because on
+ 64-bit Solaris, we need prototypes although __STDC__ is often defined
+ to 0. __GNUC__ covers GCC, __SUNPRO_C covers Sun cc, regardless of
+ compilation flags. __PROTOTYPES covers other compilers when compiling
+ programs using autoconf's AC_C_PROTOTYPES.
+ * gettextP.h (PARAMS): Also test for __SUNPRO_C, because 64-bit Solaris
+ cc needs prototypes although it defines __STDC__ to 0 by default.
+ Also test for __cplusplus and __PROTOTYPES, just for consistency with
+ libgnuintl.h.
+ * hash-string.h (PARAMS): Likewise.
+ * loadinfo.h (PARAMS): Likewise.
+ * plural-exp.h (PARAMS): Likewise.
+
2001-10-31 Bruno Haible <haible@clisp.cons.org>
* plural.y: Include <stddef.h>, needed for NULL with SunOS 4 cc.
diff --git a/intl/gettextP.h b/intl/gettextP.h
index c4a3ee9..bf77e56 100644
--- a/intl/gettextP.h
+++ b/intl/gettextP.h
@@ -37,7 +37,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) ()
diff --git a/intl/hash-string.h b/intl/hash-string.h
index ccb7acc..b267a87 100644
--- a/intl/hash-string.h
+++ b/intl/hash-string.h
@@ -19,7 +19,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) ()
diff --git a/intl/libgnuintl.h b/intl/libgnuintl.h
index f891deb..7fd547e 100644
--- a/intl/libgnuintl.h
+++ b/intl/libgnuintl.h
@@ -42,11 +42,13 @@
# define gettext gettext
#endif
-#ifndef PARAMS
-# if __STDC__ || defined __cplusplus
-# define PARAMS(args) args
+/* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers
+ used by programs. Similarly, test __PROTOTYPES, not PROTOTYPES. */
+#ifndef _INTL_PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+# define _INTL_PARAMS(args) args
# else
-# define PARAMS(args) ()
+# define _INTL_PARAMS(args) ()
# endif
#endif
@@ -57,49 +59,56 @@ extern "C" {
/* Look up MSGID in the current default message catalog for the current
LC_MESSAGES locale. If not found, returns MSGID itself (the default
text). */
-extern char *gettext PARAMS ((const char *__msgid));
+extern char *gettext _INTL_PARAMS ((const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current
LC_MESSAGES locale. */
-extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
+extern char *dgettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid));
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
locale. */
-extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
- int __category));
+extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid,
+ int __category));
/* Similar to `gettext' but select the plural form corresponding to the
number N. */
-extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
- unsigned long int __n));
+extern char *ngettext _INTL_PARAMS ((const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n));
/* Similar to `dgettext' but select the plural form corresponding to the
number N. */
-extern char *dngettext PARAMS ((const char *__domainname, const char *__msgid1,
- const char *__msgid2, unsigned long int __n));
+extern char *dngettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n));
/* Similar to `dcgettext' but select the plural form corresponding to the
number N. */
-extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
- const char *__msgid2, unsigned long int __n,
- int __category));
+extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n,
+ int __category));
/* Set the current default message catalog to DOMAINNAME.
If DOMAINNAME is null, return the current default.
If DOMAINNAME is "", reset to the default of "messages". */
-extern char *textdomain PARAMS ((const char *__domainname));
+extern char *textdomain _INTL_PARAMS ((const char *__domainname));
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
-extern char *bindtextdomain PARAMS ((const char *__domainname,
- const char *__dirname));
+extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname,
+ const char *__dirname));
/* Specify the character encoding in which the messages from the
DOMAINNAME message catalog will be returned. */
-extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
- const char *__codeset));
+extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname,
+ const char *__codeset));
/* Optimized version of the functions above. */
diff --git a/intl/loadinfo.h b/intl/loadinfo.h
index f1abe8e..d180962 100644
--- a/intl/loadinfo.h
+++ b/intl/loadinfo.h
@@ -33,7 +33,7 @@
*/
#ifndef PARAMS
-# if __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
diff --git a/intl/plural-exp.h b/intl/plural-exp.h
index 52eec48..a4b8e96 100644
--- a/intl/plural-exp.h
+++ b/intl/plural-exp.h
@@ -21,7 +21,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) ()
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 5550aef..539b0f1 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,22 @@
+2001-11-10 Bruno Haible <haible@clisp.cons.org>
+
+ * argmatch.h (PARAMS): Also test for __SUNPRO_C, because 64-bit Solaris
+ cc needs prototypes although it defines __STDC__ to 0 by default.
+ Also test for __cplusplus and __PROTOTYPES, just for consistency with
+ libgnuintl.h.
+ * c-ctype.h (PARAMS): Likewise.
+ * gcd.h (PARAMS): Likewise.
+ * getline.h (PARAMS): Likewise.
+ * hash.h (PARAMS): Likewise.
+ * linebreak.h (PARAMS): Likewise.
+ * mbswidth.h (PARAMS): Likewise.
+ * mkdtemp.h (PARAMS): Likewise.
+ * setenv.h (PARAMS): Likewise.
+ * strpbrk.h (PARAMS): Likewise.
+ * strstr.h (PARAMS): Likewise.
+ * system.h (PARAMS): Likewise.
+ * tmpdir.h (PARAMS): Likewise.
+
2001-11-05 Bruno Haible <haible@clisp.cons.org>
* tmpdir.c: Include string.h.
diff --git a/lib/argmatch.h b/lib/argmatch.h
index 32b318b..380985e 100644
--- a/lib/argmatch.h
+++ b/lib/argmatch.h
@@ -28,11 +28,11 @@
# include <sys/types.h>
# ifndef PARAMS
-# if PROTOTYPES || (defined (__STDC__) && __STDC__)
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
-# endif /* GCC. */
+# endif /* ANSI C. */
# endif /* Not PARAMS. */
/* Assert there are as many real arguments as there are values
diff --git a/lib/c-ctype.h b/lib/c-ctype.h
index 9197102..64222c5 100644
--- a/lib/c-ctype.h
+++ b/lib/c-ctype.h
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define C_CTYPE_H
#ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
diff --git a/lib/gcd.h b/lib/gcd.h
index 8fadde2..37ff21e 100644
--- a/lib/gcd.h
+++ b/lib/gcd.h
@@ -20,7 +20,7 @@
#define _GCD_H
#ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
diff --git a/lib/getline.h b/lib/getline.h
index a2aa231..5d34580 100644
--- a/lib/getline.h
+++ b/lib/getline.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
# include <stdio.h>
# ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
diff --git a/lib/hash.h b/lib/hash.h
index c6ce3e0..d568c11 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 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
@@ -31,7 +31,7 @@ typedef struct hash_table
hash_table;
# ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
diff --git a/lib/linebreak.h b/lib/linebreak.h
index 5c7b7e7..f45e80e 100644
--- a/lib/linebreak.h
+++ b/lib/linebreak.h
@@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define _LINEBREAK_H
#ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
diff --git a/lib/mbswidth.h b/lib/mbswidth.h
index 7b2482a..1f9c660 100644
--- a/lib/mbswidth.h
+++ b/lib/mbswidth.h
@@ -18,7 +18,7 @@
#include <stddef.h>
#ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
diff --git a/lib/mkdtemp.h b/lib/mkdtemp.h
index b56128e..dbc47ac 100644
--- a/lib/mkdtemp.h
+++ b/lib/mkdtemp.h
@@ -16,7 +16,7 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
diff --git a/lib/setenv.h b/lib/setenv.h
index df8fa83..26eec10 100644
--- a/lib/setenv.h
+++ b/lib/setenv.h
@@ -16,7 +16,7 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
diff --git a/lib/strpbrk.h b/lib/strpbrk.h
index bc01c3d..67aa525 100644
--- a/lib/strpbrk.h
+++ b/lib/strpbrk.h
@@ -16,7 +16,7 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
diff --git a/lib/strstr.h b/lib/strstr.h
index 5b89757..0162d09 100644
--- a/lib/strstr.h
+++ b/lib/strstr.h
@@ -16,7 +16,7 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()
diff --git a/lib/system.h b/lib/system.h
index 966aa3d..47c1980 100644
--- a/lib/system.h
+++ b/lib/system.h
@@ -19,7 +19,7 @@
#define _SYSTEM_H 1
#ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(args) args
# else
# define PARAMS(args) ()
diff --git a/lib/tmpdir.h b/lib/tmpdir.h
index 8fe7c31..2a8a37d 100644
--- a/lib/tmpdir.h
+++ b/lib/tmpdir.h
@@ -16,7 +16,7 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef PARAMS
-# if defined (__GNUC__) || __STDC__
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
# define PARAMS(Args) Args
# else
# define PARAMS(Args) ()