diff options
author | Daiki Ueno <ueno@gnu.org> | 2016-05-24 12:18:07 +0900 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2016-05-25 15:25:27 +0900 |
commit | 77dde02ef05e63e0ae2b113546e8adb26a962e29 (patch) | |
tree | 2ce365c5afa8a77dd875517afd61bab89321216d /gettext-runtime/intl/plural-exp.c | |
parent | 68ab0dafa99f1941b3ebb47b7cf969381e7310f4 (diff) | |
download | external_gettext-77dde02ef05e63e0ae2b113546e8adb26a962e29.zip external_gettext-77dde02ef05e63e0ae2b113546e8adb26a962e29.tar.gz external_gettext-77dde02ef05e63e0ae2b113546e8adb26a962e29.tar.bz2 |
intl: Pacify pre-C99 compilers
* gettext-runtime/intl/plural-exp.h (HAVE_STRUCT_INITIALIZER): New
macro, based on the check previously in plural-exp.c. Also add check
for __SUNPRO_C for Solaris Studio C compiler.
(GERMANIC_PLURAL): Define as 'struct expression' not 'const struct
expression' if struct/union initializers are not supported by the
compiler.
* gettext-runtime/intl/plural-exp.c: Use HAVE_STRUCT_INITIALIZER.
Reported by Dagobert Michelsen and investigated by pan7 in:
https://savannah.gnu.org/support/?108743
Diffstat (limited to 'gettext-runtime/intl/plural-exp.c')
-rw-r--r-- | gettext-runtime/intl/plural-exp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gettext-runtime/intl/plural-exp.c b/gettext-runtime/intl/plural-exp.c index 7f37e54..b1445ff 100644 --- a/gettext-runtime/intl/plural-exp.c +++ b/gettext-runtime/intl/plural-exp.c @@ -25,9 +25,7 @@ #include "plural-exp.h" -#if (defined __GNUC__ && !(defined __APPLE_CC_ && __APPLE_CC__ > 1) \ - && !defined __cplusplus) \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) +#if HAVE_STRUCT_INITIALIZER /* These structs are the constant expression for the germanic plural form determination. It represents the expression "n != 1". */ |