mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-30 15:32:37 +08:00
[svn-r12344] Purpose:
Bug fix. Description: C++ testhdf5 failed when it tried to inspect the size of a file via the HDstat call. The reason was that the CFLAGS has -D_LARGE_FILES hardset in it while the CXXFLAGS does not. So, C is using an off_t that is 8 bytes while C++ is using off_t as 4 bytes. C is using a version of 64bits stat/off_t/etc while C++ uses the 32 bits version. Thus a failure. Solution: Added -D_LARGE_FILES to $CXXFLAGES so that both C and C++ are using the same version of stat/off_t/etc. Platforms tested: Tested in Copper only, both 32 and 64 bits since the changes affected the AIX platform only.
This commit is contained in:
parent
f857bb3d75
commit
db31594e68
@ -19,6 +19,7 @@
|
||||
|
||||
# Use AIX supplied C compiler by default, xlc for serial, mpcc_r for parallel.
|
||||
# Use -D_LARGE_FILES by default to support large file size.
|
||||
# Make sure this is applied to other API compile options such as C++.
|
||||
if test "X-" = "X-$CC"; then
|
||||
if test "X-$enable_parallel" = "X-yes"; then
|
||||
CC=mpcc_r
|
||||
@ -45,6 +46,7 @@ case $CC_BASENAME in
|
||||
# Turn off shared lib option. It causes some test suite to fail.
|
||||
enable_shared="${enable_shared:-no}"
|
||||
# Use -D_LARGE_FILES by default to support large file size.
|
||||
# Make sure this is applied to other API compile options such as C++.
|
||||
CFLAGS="-qlanglvl=ansi -D_LARGE_FILES -DSTDC $CFLAGS"
|
||||
DEBUG_CFLAGS="-g -qfullpath"
|
||||
DEBUG_CPPFLAGS=
|
||||
@ -153,6 +155,7 @@ CXX=${CXX=xlC}
|
||||
|
||||
# Added -qweaksymbol to suppress linker messages warning of duplicate
|
||||
# symbols; these warnings are harmless. - BMR
|
||||
CXXFLAGS="$CXXFLAGS -qweaksymbol"
|
||||
# Use -D_LARGE_FILES by default to support large file size.
|
||||
CXXFLAGS="$CXXFLAGS -qweaksymbol -D_LARGE_FILES"
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user