mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-30 15:32:37 +08:00
[svn-r4213] Purpose:
Bug fix... (sorta) Description: Added --enable-linux-lfs configure flag to have better control over whether the enable large file support on Linux machines. Also removed the -malign-double flag for gcc since it can potentially cause errors which are difficult to detect. Platforms tested: Linix 2.2 & 2.4 (eirene and dangermouse)
This commit is contained in:
parent
6e7e3dc8c7
commit
00f62b983a
@ -90,10 +90,10 @@ case "$host_os-$host_cpu" in
|
|||||||
# This check should be kept in sync with the *-i686 check below
|
# This check should be kept in sync with the *-i686 check below
|
||||||
case "$cc_vendor-$cc_version" in
|
case "$cc_vendor-$cc_version" in
|
||||||
gcc-2.95*)
|
gcc-2.95*)
|
||||||
ARCH=${ARCH:="-march=i686 -malign-double"}
|
ARCH=${ARCH:="-march=i686"}
|
||||||
;;
|
;;
|
||||||
gcc-*|egcs-*|pgcc-*)
|
gcc-*|egcs-*|pgcc-*)
|
||||||
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro -malign-double"}
|
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro"}
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@ -103,10 +103,10 @@ case "$host_os-$host_cpu" in
|
|||||||
*-i686)
|
*-i686)
|
||||||
case "$cc_vendor-$cc_version" in
|
case "$cc_vendor-$cc_version" in
|
||||||
gcc-2.9[56]*)
|
gcc-2.9[56]*)
|
||||||
ARCH=${ARCH:="-march=i686 -malign-double"}
|
ARCH=${ARCH:="-march=i686"}
|
||||||
;;
|
;;
|
||||||
gcc-*|egcs-*|pgcc-*)
|
gcc-*|egcs-*|pgcc-*)
|
||||||
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro -malign-double"}
|
ARCH=${ARCH:="-mcpu=pentiumpro -march=pentiumpro"}
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
51
configure.in
51
configure.in
@ -441,27 +441,44 @@ dnl result could effect the outcome of the sizeof macros below.
|
|||||||
dnl
|
dnl
|
||||||
case "$host_cpu-$host_vendor-$host_os" in
|
case "$host_cpu-$host_vendor-$host_os" in
|
||||||
*linux*)
|
*linux*)
|
||||||
AC_CHECK_FUNCS(getdents64,
|
dnl ----------------------------------------------------------------------
|
||||||
dnl Add the large file support flags to the CPPFLAGS macro if
|
dnl Enable large file support on linux? Store the result in the LINUX_LFS
|
||||||
dnl we're on a Linux system which austensibly supports LFS. (We
|
dnl variable for posterity
|
||||||
dnl think it does if it has the ``getdents64'' syscall).
|
AC_ARG_ENABLE(linux-lfs,
|
||||||
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
|
[ --enable-linux-lfs Enable support for large (64-bit) files on linux. [default=check]])
|
||||||
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
|
case "X-$enable_linux_lfs" in
|
||||||
dnl havoc with the LFS stuff. Remove it. It apparently works
|
X-yes)
|
||||||
dnl for 2.96, though, so...
|
LINUX_LFS=yes
|
||||||
CFLAGS_saved=$CFLAGS
|
;;
|
||||||
CFLAGS=""
|
X-no)
|
||||||
for flag in X $CFLAGS_saved; do
|
LINUX_LFS=no
|
||||||
if test "$flag" != "X" -a "$flag" != "-malign-double"; then
|
;;
|
||||||
CFLAGS="$CFLAGS $flag"
|
X-|*)
|
||||||
fi
|
LINUX_LFS=no
|
||||||
done
|
AC_CHECK_FUNCS(getdents64,
|
||||||
fi)
|
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).
|
||||||
|
LINUX_LFS=yes
|
||||||
|
)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for large file support on linux mode)
|
||||||
|
if test "X$LINUX_LFS" = "Xyes"; then
|
||||||
|
AC_MSG_RESULT(enabled)
|
||||||
|
|
||||||
|
CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE $CPPFLAGS"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(disabled)
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Add POSIX support on Linux systems, so <features.h> defines
|
dnl Add POSIX support on Linux systems, so <features.h> defines
|
||||||
dnl __USE_POSIX, which is required to get the prototype for fdopen
|
dnl __USE_POSIX, which is required to get the prototype for fdopen
|
||||||
dnl defined correctly in <stdio.h>
|
dnl defined correctly in <stdio.h>
|
||||||
CPPFLAGS="-D_POSIX_SOURCE $CPPFLAGS"
|
CPPFLAGS="-D_POSIX_SOURCE $CPPFLAGS"
|
||||||
|
|
||||||
dnl Also add BSD support on Linux systems, so <features.h> defines
|
dnl Also add BSD support on Linux systems, so <features.h> defines
|
||||||
dnl __USE_BSD, which is required to get the prototype for strdup
|
dnl __USE_BSD, which is required to get the prototype for strdup
|
||||||
dnl defined correctly in <string.h> and snprintf & vsnprintf defined
|
dnl defined correctly in <string.h> and snprintf & vsnprintf defined
|
||||||
|
@ -66,6 +66,8 @@ Configuration
|
|||||||
* Changed the default value of $NPROCS from 2 to 3 since 3 processes
|
* Changed the default value of $NPROCS from 2 to 3 since 3 processes
|
||||||
have a much bigger chance catching parallel errors than just 2.
|
have a much bigger chance catching parallel errors than just 2.
|
||||||
* Basic port to Compaq (nee DEC) Alpha OSF 5.
|
* Basic port to Compaq (nee DEC) Alpha OSF 5.
|
||||||
|
* Added --enable-linux-lfs flag to allow more control over whether to enable
|
||||||
|
or disable large file support on Linux.
|
||||||
|
|
||||||
|
|
||||||
Tools
|
Tools
|
||||||
|
@ -1965,7 +1965,7 @@ H5FDread(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t size
|
|||||||
void *buf/*out*/)
|
void *buf/*out*/)
|
||||||
{
|
{
|
||||||
FUNC_ENTER(H5FDread, FAIL);
|
FUNC_ENTER(H5FDread, FAIL);
|
||||||
H5TRACE6("e","xMtiahx",file,type,dxpl_id,addr,size,buf);
|
H5TRACE6("e","xMtiazx",file,type,dxpl_id,addr,size,buf);
|
||||||
|
|
||||||
/* Check args */
|
/* Check args */
|
||||||
if (!file || !file->cls) {
|
if (!file || !file->cls) {
|
||||||
@ -2121,7 +2121,7 @@ H5FDwrite(H5FD_t *file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, size_t siz
|
|||||||
const void *buf)
|
const void *buf)
|
||||||
{
|
{
|
||||||
FUNC_ENTER(H5FDwrite, FAIL);
|
FUNC_ENTER(H5FDwrite, FAIL);
|
||||||
H5TRACE6("e","xMtiahx",file,type,dxpl_id,addr,size,buf);
|
H5TRACE6("e","xMtiazx",file,type,dxpl_id,addr,size,buf);
|
||||||
|
|
||||||
/* Check args */
|
/* Check args */
|
||||||
if (!file || !file->cls) {
|
if (!file || !file->cls) {
|
||||||
|
@ -2685,8 +2685,7 @@ H5Pset_cache(hid_t plist_id, int mdc_nelmts,
|
|||||||
H5F_access_t *fapl = NULL;
|
H5F_access_t *fapl = NULL;
|
||||||
|
|
||||||
FUNC_ENTER (H5Pset_cache, FAIL);
|
FUNC_ENTER (H5Pset_cache, FAIL);
|
||||||
H5TRACE5("e","iIsIszd",plist_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,
|
H5TRACE5("e","iIszzd",plist_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,rdcc_w0);
|
||||||
rdcc_w0);
|
|
||||||
|
|
||||||
/* Check arguments */
|
/* Check arguments */
|
||||||
if (H5P_FILE_ACCESS!=H5P_get_class (plist_id) ||
|
if (H5P_FILE_ACCESS!=H5P_get_class (plist_id) ||
|
||||||
@ -2739,7 +2738,7 @@ H5Pget_cache(hid_t plist_id, int *mdc_nelmts,
|
|||||||
H5F_access_t *fapl = NULL;
|
H5F_access_t *fapl = NULL;
|
||||||
|
|
||||||
FUNC_ENTER (H5Pget_cache, FAIL);
|
FUNC_ENTER (H5Pget_cache, FAIL);
|
||||||
H5TRACE5("e","i*Is*Is*z*d",plist_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,
|
H5TRACE5("e","i*Is*z*z*d",plist_id,mdc_nelmts,rdcc_nelmts,rdcc_nbytes,
|
||||||
rdcc_w0);
|
rdcc_w0);
|
||||||
|
|
||||||
/* Check arguments */
|
/* Check arguments */
|
||||||
@ -2792,7 +2791,7 @@ H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg)
|
|||||||
H5D_xfer_t *plist = NULL;
|
H5D_xfer_t *plist = NULL;
|
||||||
|
|
||||||
FUNC_ENTER (H5Pset_buffer, FAIL);
|
FUNC_ENTER (H5Pset_buffer, FAIL);
|
||||||
H5TRACE4("e","ihxx",plist_id,size,tconv,bkg);
|
H5TRACE4("e","izxx",plist_id,size,tconv,bkg);
|
||||||
|
|
||||||
/* Check arguments */
|
/* Check arguments */
|
||||||
if (H5P_DATASET_XFER != H5P_get_class (plist_id) ||
|
if (H5P_DATASET_XFER != H5P_get_class (plist_id) ||
|
||||||
|
Loading…
Reference in New Issue
Block a user