diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-01-27 03:31:03 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-01-27 03:31:03 (GMT) |
commit | b10f26ab1801d5ac152c8396b9226ec4fafe6797 (patch) | |
tree | 12ea17210020effdfba6de374c44214544b5875e | |
parent | 4e37d30dbaa04b907cf05a6ec7ffe9df3abcfb62 (diff) | |
download | hdf5-b10f26ab1801d5ac152c8396b9226ec4fafe6797.zip hdf5-b10f26ab1801d5ac152c8396b9226ec4fafe6797.tar.gz hdf5-b10f26ab1801d5ac152c8396b9226ec4fafe6797.tar.bz2 |
[svn-r26042] Updated configure.ac so that POSIX_C_SOURCE=200112L and GNU_SOURCE
are defined. The former is for posix_memalign() and the latter for
the O_DIRECT flag for open(). Both are for direct VFD support.
Fixes HDFFV-9088
Tested on: jam
-rwxr-xr-x | configure | 13 | ||||
-rw-r--r-- | configure.ac | 13 |
2 files changed, 22 insertions, 4 deletions
@@ -23573,19 +23573,28 @@ case "$host_cpu-$host_vendor-$host_os" in ## Add POSIX support on Linux systems, so <features.h> defines ## __USE_POSIX, which is required to get the prototype for fdopen ## defined correctly in <stdio.h>. + ## ## This flag was removed from h5cc as of 2009-10-17 when it was found ## that the flag broke compiling netCDF-4 code with h5cc, but kept in ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen ## is used only by H5_debug_mask which is used only when debugging in ## H5_init_library (all in H5.c). When the flag was removed this was ## the only compile failure noted. + ## ## This was originally defined as _POSIX_SOURCE which was updated to ## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX ## functionality so clock_gettime and CLOCK_MONOTONIC are defined - ## correctly. + ## correctly. This was later updated to 200112L so that + ## posix_memalign() is visible for the direct VFD code on Linux + ## systems. + ## ## POSIX feature information can be found in the gcc manual at: ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - H5_CPPFLAGS="-D_POSIX_C_SOURCE=199506L $H5_CPPFLAGS" + H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" + + ## Need to add this so that O_DIRECT is visible for the direct + ## VFD on Linux systems. + AM_CPPFLAGS="-D_GNU_SOURCE $AM_CPPFLAGS" ## Also add BSD support on Linux systems, so <features.h> defines ## __USE_BSD, which is required to get the prototype for strdup diff --git a/configure.ac b/configure.ac index d7804a6..e7bbda5 100644 --- a/configure.ac +++ b/configure.ac @@ -1479,19 +1479,28 @@ case "$host_cpu-$host_vendor-$host_os" in ## Add POSIX support on Linux systems, so <features.h> defines ## __USE_POSIX, which is required to get the prototype for fdopen ## defined correctly in <stdio.h>. + ## ## This flag was removed from h5cc as of 2009-10-17 when it was found ## that the flag broke compiling netCDF-4 code with h5cc, but kept in ## H5_CPPFLAGS because fdopen and HDfdopen fail without it. HDfdopen ## is used only by H5_debug_mask which is used only when debugging in ## H5_init_library (all in H5.c). When the flag was removed this was ## the only compile failure noted. + ## ## This was originally defined as _POSIX_SOURCE which was updated to ## _POSIX_C_SOURCE=199506L to expose a greater amount of POSIX ## functionality so clock_gettime and CLOCK_MONOTONIC are defined - ## correctly. + ## correctly. This was later updated to 200112L so that + ## posix_memalign() is visible for the direct VFD code on Linux + ## systems. + ## ## POSIX feature information can be found in the gcc manual at: ## http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html - H5_CPPFLAGS="-D_POSIX_C_SOURCE=199506L $H5_CPPFLAGS" + H5_CPPFLAGS="-D_POSIX_C_SOURCE=200112L $H5_CPPFLAGS" + + ## Need to add this so that O_DIRECT is visible for the direct + ## VFD on Linux systems. + AM_CPPFLAGS="-D_GNU_SOURCE $AM_CPPFLAGS" ## Also add BSD support on Linux systems, so <features.h> defines ## __USE_BSD, which is required to get the prototype for strdup |