summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-03-27 22:17:31 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-03-27 22:17:31 (GMT)
commit1756ca5c13d79af26a6bae1c9913c2fbbde09ca0 (patch)
tree306a454a1bf2a5adda06b912771698e86c27ced5 /configure.ac
parent50d7a323300919e20340862fba3caf1f36216877 (diff)
downloadhdf5-1756ca5c13d79af26a6bae1c9913c2fbbde09ca0.zip
hdf5-1756ca5c13d79af26a6bae1c9913c2fbbde09ca0.tar.gz
hdf5-1756ca5c13d79af26a6bae1c9913c2fbbde09ca0.tar.bz2
[svn-r26633] Add -D_DEFAULT_SOURCE to CPPFLAGS on Linux systems. -D_BSD_SOURCE is deprecated
in recent versions of glibc, and -D_DEFAULT_SOURCE is the replacement. Keep -D_BSD_SOURCE for now to support older systems. gcc will not issue a warning about -D_BSD_SOURCE being deprecated when -D_DEFAULT_SOURCE is supplied as well. Tested: jam, koala, ostrich (h5committest)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2150de2..ea7608c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1120,6 +1120,11 @@ case "$host_cpu-$host_vendor-$host_os" in
## however, we do not do this since it breaks the big test on some
## older platforms.
H5_CPPFLAGS="-D_BSD_SOURCE $H5_CPPFLAGS"
+
+ ## _BSD_SOURCE is deprecated as of glibc 2.20, in favor of _DEFAULT_SOURCE.
+ ## To avoid warnings, we define _DEFAULT_SOURCE in addition to _BSD_SOURCE,
+ ## which should work for all versions of glibc.
+ H5_CPPFLAGS="-D_DEFAULT_SOURCE $H5_CPPFLAGS"
;;
esac