mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r3893] Purpose:
Bug Fix Description: Small fix. The "off_t" typedef's size wasn't being set correctly. Solution: The tests for 64-bit files (getdents64() in particular) needed to occur before checking for the sizeof off_t. Platforms tested: Linux
This commit is contained in:
parent
93129f271e
commit
8edf0ec438
@ -82,6 +82,8 @@ New Features
|
||||
7 and contains the sizes of the data buffer dimensions.
|
||||
* F90 static library is available on Windows platforms. See
|
||||
INSTALL_Windows.txt for details.
|
||||
* File sizes greater than 2GB on Linux 2.4.x and higher kernels are
|
||||
now supported.
|
||||
|
||||
|
||||
Platforms Tested
|
||||
|
58
configure.in
58
configure.in
@ -430,6 +430,37 @@ case "$host" in
|
||||
;;
|
||||
esac
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Test for 64bit stuff before the data types and their sizes. The
|
||||
dnl result could effect the outcome of the sizeof macros below.
|
||||
dnl
|
||||
case "$host_cpu-$host_vendor-$host_os" in
|
||||
*linux*)
|
||||
AC_CHECK_FUNCS(getdents64,
|
||||
dnl Add the large file support flags to the CPPFLAGS macro if
|
||||
dnl we're on a Linux system which austensibly supports LFS. (We
|
||||
dnl think it does if it has the ``getdents64'' syscall).
|
||||
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
|
||||
if test $cc_vers_all -gt 2095000 -a $cc_vers_all -lt 2096000; then
|
||||
dnl For GCC compilers 2.95.x, the -malign-double flag plays
|
||||
dnl havoc with the LFS stuff. Remove it. It apparently works
|
||||
dnl for 2.96, though, so...
|
||||
CFLAGS_saved=$CFLAGS
|
||||
CFLAGS=""
|
||||
for flag in X $CFLAGS_saved; do
|
||||
if test "$flag" != "X" -a "$flag" != "-malign-double"; then
|
||||
CFLAGS="$CFLAGS $flag"
|
||||
fi
|
||||
done
|
||||
fi)
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_TRY_COMPILE([#include <sys/types.h>],
|
||||
[off64_t n = 0;],
|
||||
AC_CHECK_FUNCS(lseek64 fseek64),
|
||||
AC_MSG_RESULT([skipping test for lseek64() and fseek64()]))
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Data types and their sizes.
|
||||
dnl
|
||||
@ -1033,33 +1064,6 @@ dnl
|
||||
AC_CHECK_FUNCS(compress2 difftime fork gethostname getpwuid getrusage)
|
||||
AC_CHECK_FUNCS(gettimeofday BSDgettimeofday longjmp setsysinfo sigaction)
|
||||
AC_CHECK_FUNCS(signal snprintf vsnprintf strdup system waitpid)
|
||||
AC_TRY_COMPILE([#include<sys/types.h>],
|
||||
[off64_t n = 0;],
|
||||
AC_CHECK_FUNCS(lseek64 fseek64),
|
||||
AC_MSG_RESULT([skipping test for lseek64() and fseek64()]))
|
||||
|
||||
case "$host_cpu-$host_vendor-$host_os" in
|
||||
*linux*)
|
||||
AC_CHECK_FUNCS(getdents64,
|
||||
dnl Add the large file support flags to the CPPFLAGS macro if
|
||||
dnl we're on a Linux system which austensibly supports LFS. (We
|
||||
dnl think it does if it has the ``getdents64'' syscall).
|
||||
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
|
||||
if test $cc_vers_all -gt 2095000 -a $cc_vers_all -lt 2096000; then
|
||||
dnl For GCC compilers 2.95.x, the -malign-double flag plays
|
||||
dnl havoc with the LFS stuff. Remove it. It apparently works
|
||||
dnl for 2.96, though, so...
|
||||
CFLAGS_saved=$CFLAGS
|
||||
CFLAGS=""
|
||||
for flag in X $CFLAGS_saved; do
|
||||
if test "$flag" != "X" -a "$flag" != "-malign-double"; then
|
||||
CFLAGS="$CFLAGS $flag"
|
||||
fi
|
||||
done
|
||||
fi)
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
dnl Check compiler characteristics
|
||||
|
Loading…
Reference in New Issue
Block a user