summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2020-11-25 15:26:35 (GMT)
committerGitHub <noreply@github.com>2020-11-25 15:26:35 (GMT)
commitffcb3542377c62cf972ff683c101e7268332f8a0 (patch)
tree13169e6a49d7e44298203afa99028b7efb791d29 /config
parent7b9c5e124ba8e5ca4a44fa57e90f291b043a0eb2 (diff)
downloadhdf5-ffcb3542377c62cf972ff683c101e7268332f8a0.zip
hdf5-ffcb3542377c62cf972ff683c101e7268332f8a0.tar.gz
hdf5-ffcb3542377c62cf972ff683c101e7268332f8a0.tar.bz2
Minor/solaris gcc fix (#126)
* Adds gnu99 as the standard when building with gcc on Solaris * Adds a note to RELEASE.txt and improves comments For Solaris + gcc fix (HDFFV-11191)
Diffstat (limited to 'config')
-rw-r--r--config/gnu-flags12
1 files changed, 8 insertions, 4 deletions
diff --git a/config/gnu-flags b/config/gnu-flags
index 7cf90b8..5c6745c 100644
--- a/config/gnu-flags
+++ b/config/gnu-flags
@@ -118,12 +118,16 @@ if test "X-gcc" = "X-$cc_vendor"; then
esac
case "$host_os-$host_cpu" in
- # cygwin needs the "-std=c99" flag removed, so make
- # a specific case for Cygwin without the flag and a default
- # case to add the flag everywhere else
+ # Cygwin needs the "-std=c99" flag removed.
cygwin-*)
;;
-
+ # On Solaris, gcc needs the gnu99 standard to pick up certain POSIX
+ # things. Do NOT use this as the gcc norm as this encourages the use
+ # of non-standard gcc extensions.
+ *solaris*)
+ H5_CFLAGS="$H5_CFLAGS -std=gnu99"
+ ;;
+ # Everybody else gets c99 as the standard.
*)
H5_CFLAGS="$H5_CFLAGS -std=c99"
;;