]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
build: Fix build failures on HP-UX 11.31/hppa with cc.
authorBruno Haible <bruno@clisp.org>
Tue, 24 Dec 2019 16:37:04 +0000 (17:37 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Apr 2020 11:39:01 +0000 (13:39 +0200)
* 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.

gettext-runtime/intl/plural-exp.h
gnulib-local/lib/libxml/parser.c

index 0d2de37c3dec9f016754d23bbc24ea37bc3dfe02..c578bcacdf8de5819c5fbec45613809c656bcc3d 100644 (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
index 90f652512ad936c6c7d624730a5178c347c4430e..d485a58b8ea3dc21a44418c7a80ef8fd2b369c2f 100644 (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