summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2015-04-02 16:18:47 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2015-04-02 16:18:47 (GMT)
commit27d820b8ced76eab5ca70304df51a0965c139e5b (patch)
tree40d2f33893b26bbcaef0434a32fe31364cc67827
parent0f173c15bb3655f04c66deea3bd0502d7dfdecc9 (diff)
downloadhdf5-27d820b8ced76eab5ca70304df51a0965c139e5b.zip
hdf5-27d820b8ced76eab5ca70304df51a0965c139e5b.tar.gz
hdf5-27d820b8ced76eab5ca70304df51a0965c139e5b.tar.bz2
[svn-r26707] Port r26633 from trunk to 1.8 branch.
Tested: jam, koala, ostrich (h5committest) Log from 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)
-rwxr-xr-xconfigure5
-rw-r--r--configure.ac5
-rw-r--r--release_docs/RELEASE.txt7
3 files changed, 17 insertions, 0 deletions
diff --git a/configure b/configure
index e518f9c..699c1c5 100755
--- a/configure
+++ b/configure
@@ -22546,6 +22546,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
diff --git a/configure.ac b/configure.ac
index 75d6d76..919defa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1048,6 +1048,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
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index 52c4ae5..19d3db9 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -183,6 +183,13 @@ New Features
(DER - 2015-03-09, HDFFV-9083 and 9085)
+ - Added -D_DEFAULT_SOURCE to CPPFLAGS on Linux systems. This is the
+ replacement for -D_BSD_SOURCE in versions of glibc since 2.19. Since both
+ are defined, it should work for all versions of glibc. Defining both
+ suppresses the warning about defining _BSD_SOURCE.
+
+ (NAF - 2015-04-02, HDFFV-9079)
+
Library
-------
- Added memory allocation functions that use the library's allocator.