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.
This commit is contained in:
Bruno Haible 2019-12-24 17:37:04 +01:00
parent 4d1d5b649b
commit 2e2c0116f5
2 changed files with 4 additions and 3 deletions

View File

@ -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 <drepper@cygnus.com>, 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

View File

@ -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