]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make PARAMS work better on Solaris.
authorBruno Haible <bruno@clisp.org>
Sat, 10 Nov 2001 00:26:33 +0000 (00:26 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 20:56:20 +0000 (22:56 +0200)
22 files changed:
ChangeLog
acconfig.h
intl/ChangeLog
intl/gettextP.h
intl/hash-string.h
intl/libgnuintl.h
intl/loadinfo.h
intl/plural-exp.h
lib/ChangeLog
lib/argmatch.h
lib/c-ctype.h
lib/gcd.h
lib/getline.h
lib/hash.h
lib/linebreak.h
lib/mbswidth.h
lib/mkdtemp.h
lib/setenv.h
lib/strpbrk.h
lib/strstr.h
lib/system.h
lib/tmpdir.h

index d086616d35c833c9a436f8d632a12989afa6ab57..45cc9baa7357aeeb8b04f3487fd6d83e715b0f63 100644 (file)
--- 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"
index 68847033f0ce360903a749262af3c57aaeb031cf..9238b0a41f66b3c2771362ecb8f8a0ff5485d600 100644 (file)
@@ -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) ()
index e14a7639f02b0d70bd2501aa273ee0641dc716ce..b86d004d3a275efa5733cafde12a2368390a4c35 100644 (file)
@@ -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.
index c4a3ee9d837aacdc4563eb2f64a365c24ba30474..bf77e5658c6db8815be3dcda00f216fbb85d3748 100644 (file)
@@ -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) ()
index ccb7acca65895a915d775d682edaa1dc8aaaedb7..b267a87788f1c7eec5d8d3068577c264eeec429e 100644 (file)
@@ -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) ()
index f891deb9636692416434e3affe55ad0bd1abfa02..7fd547ef04846016d98c0d03b5c4aafba038e0ed 100644 (file)
 # 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.  */
index f1abe8ef27976bc43aa4f4ce9c767503986dba66..d180962f5258841798ff1ddb763b03931a433bc1 100644 (file)
@@ -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) ()
index 52eec48b6705d7dd0cafa9e89177a6e0fb04a263..a4b8e965d2625c036e1db676094e27c9d5a778e7 100644 (file)
@@ -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) ()
index 5550aef02f5a5a09bbac65ae234710e099bb14df..539b0f166b46d9e18a6f81c143937199e777ae35 100644 (file)
@@ -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.
index 32b318b338a679c50346888c886531a94c6ab0d0..380985ea978df66f215b55db112bc71d6aaf9caf 100644 (file)
 # 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
index 919710262fcec7a5860ccf051a3f8f92fd881758..64222c59b4a43fac60f48d542ae17cba1a09c4a3 100644 (file)
@@ -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) ()
index 8fadde2ec1c8a2911be541711e52d7a9e1628fa8..37ff21ea52127fb21cad4921dfa45a9187cdc608 100644 (file)
--- 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) ()
index a2aa231df2620048e1f07e291863da6c2d3a4c1e..5d3458020f03149fcf6bd9d7e5125486629ebbc7 100644 (file)
@@ -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) ()
index c6ce3e0158cd4b91dd66895207dc22bf5f6686e4..d568c11e9b4eedf52ee6743db397876346a0c8cb 100644 (file)
@@ -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) ()
index 5c7b7e73267d87f590f9b2adb0067df3d212b96a..f45e80e1984fd5ad3628accb81699e140bc82a90 100644 (file)
@@ -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) ()
index 7b2482a5428c70ff33432672fdb558312843d27b..1f9c660014028567ed7ff658cc0549a77f6d38b5 100644 (file)
@@ -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) ()
index b56128eb03098be88d4e5210aeb283e8c0a33bcc..dbc47ac3625efe85857b3b93bc50a73d27066458 100644 (file)
@@ -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) ()
index df8fa83fb46a99a55ab2d847104f861fe0726f7e..26eec10676c63fb99a1cfdc608bc5c06b8907847 100644 (file)
@@ -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) ()
index bc01c3d65c7981e7aa2282ada40096be131451dd..67aa525d94ff653f99902aa6828d7afdc562ebc4 100644 (file)
@@ -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) ()
index 5b897579a6f8f6ceb4295b518e902f267746740c..0162d097102f9f2c2194010dd591328b54fb8be3 100644 (file)
@@ -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) ()
index 966aa3de8fd353c3c78a67071d1f2d6f494ad228..47c19804c72c77a08bd55bd1679a1e1ab23a8abf 100644 (file)
@@ -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) ()
index 8fe7c31c526e861cae3a705719ffd1135da2bcab..2a8a37d66dafaee88d9df33c845a15f73b91c37e 100644 (file)
@@ -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) ()