From: Bruno Haible Date: Tue, 24 Dec 2019 16:37:04 +0000 (+0100) Subject: build: Fix build failures on HP-UX 11.31/hppa with cc. X-Git-Tag: v0.20.2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e2c0116f51153da8ae8d1ce12e6d7e1f89e65c3;p=thirdparty%2Fgettext.git build: Fix build failures on HP-UX 11.31/hppa with cc. * gnulib-local/lib/libxml/parser.c (struct _xmlDefAttrs): Don't use ISO C 99 syntax with this compiler. * gettext-runtime/intl/plural-exp.h (HAVE_STRUCT_INITIALIZER): Set to 0 with this compiler. --- diff --git a/gettext-runtime/intl/plural-exp.h b/gettext-runtime/intl/plural-exp.h index 0d2de37c3..c578bcacd 100644 --- a/gettext-runtime/intl/plural-exp.h +++ b/gettext-runtime/intl/plural-exp.h @@ -1,5 +1,5 @@ /* Expression parsing and evaluation for plural form selection. - Copyright (C) 2000-2016 Free Software Foundation, Inc. + Copyright (C) 2000-2016, 2019 Free Software Foundation, Inc. Written by Ulrich Drepper , 2000. This program is free software: you can redistribute it and/or modify @@ -107,7 +107,8 @@ struct parse_args #if (defined __GNUC__ && !(defined __APPLE_CC_ && __APPLE_CC__ > 1) \ && !defined __cplusplus) \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) \ + || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L \ + && !defined __HP_cc) \ || (defined __SUNPRO_C && 0x560 <= __SUNPRO_C \ && !(defined __STDC__ && __STDC__ == 1)) # define HAVE_STRUCT_INITIALIZER 1 diff --git a/gnulib-local/lib/libxml/parser.c b/gnulib-local/lib/libxml/parser.c index 90f652512..d485a58b8 100644 --- a/gnulib-local/lib/libxml/parser.c +++ b/gnulib-local/lib/libxml/parser.c @@ -1116,7 +1116,7 @@ typedef xmlDefAttrs *xmlDefAttrsPtr; struct _xmlDefAttrs { int nbAttrs; /* number of defaulted attributes on that element */ int maxAttrs; /* the size of the array */ -#if __STDC_VERSION__ >= 199901L +#if __STDC_VERSION__ >= 199901L && !defined __HP_cc /* Using a C99 flexible array member avoids UBSan errors. */ const xmlChar *values[]; /* array of localname/prefix/values/external */ #else