From db31594e6824688b03963fa092761b02d9179296 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Thu, 11 May 2006 23:16:10 -0500 Subject: [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. --- config/powerpc-ibm-aix5.x | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/powerpc-ibm-aix5.x b/config/powerpc-ibm-aix5.x index 833ae3f..3a32a5d 100644 --- a/config/powerpc-ibm-aix5.x +++ b/config/powerpc-ibm-aix5.x @@ -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" -- cgit v0.12