mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-21 01:04:10 +08:00
[svn-r301] Changes since 19980226
---------------------- ./bin/release Changed default to not tag CVS sources. ./src/H5F.c Replaced a constant switch with preprocessor directives. Removed a local variable which was set but not used. ./src/H5Fprivate.h Changed `long long' to `int64' to get rid of ansi warnings in a few places. Fixed bugs in INT64DECODE() and UINT64DECODE() for big-endian architectures. This fixes all the bugs with the Irix -64 compile. ./src/H5F.c The default address and length sizes are set according to the sizeof(size_t) now that the bugs have been fixed. ./src/H5Fpublic.h Removed a trailing comma in an enumerated type. ./src/H5Fstdio.c ./src/H5Fsec2.c Added two more calls to fseek64() and lseek64(). Removed `long long' in place of `int64' to suppress -ansi warnings. ./src/H5P.c Replaced a FAIL with H5F_LOW_ERROR. ./src/H5private.h ./configure.in Increased version number to hdf5-1.0.1a since we've already released hdf5-1.0.0a. Include <sys/types.h>. Fixed indentation. Fixed detection of off64_t for old Irix systems where it might be a struct. ./src/Makefile.in Moved a comment from the shell to the makefile since some versions of sh barf on interactive comments. ./config/linux Allow overriding of the CC variable from the command-line. It still defaults to gcc but this allows us to specify a complete path from test scripts by saying: CC=/usr/local/tools/gnu/gcc sh configure
This commit is contained in:
parent
ed6d456f28
commit
0b4d32bb4a
@ -210,9 +210,9 @@ EOF
|
|||||||
if (-d "CVS") {
|
if (-d "CVS") {
|
||||||
my $tag = $ver;
|
my $tag = $ver;
|
||||||
$tag =~ s/\./-/g;
|
$tag =~ s/\./-/g;
|
||||||
print "Tag CVS sources with \"$tag\"? [y] ";
|
print "Tag CVS sources with \"$tag\"? [n] ";
|
||||||
chomp ($_ = <STDIN>);
|
chomp ($_ = <STDIN>);
|
||||||
if (!$_ || $_ eq 'y') {
|
if ($_ eq 'y') {
|
||||||
print "Tagging CVS sources...\n";
|
print "Tagging CVS sources...\n";
|
||||||
my $status = system "cvs tag -R $tag";
|
my $status = system "cvs tag -R $tag";
|
||||||
die "cvs tag failed" if $status >> 8;
|
die "cvs tag failed" if $status >> 8;
|
||||||
|
@ -33,9 +33,8 @@
|
|||||||
# $debug $warn -DH5F_LOW_DFLT=H5F_LOW_SEC2
|
# $debug $warn -DH5F_LOW_DFLT=H5F_LOW_SEC2
|
||||||
#
|
#
|
||||||
|
|
||||||
# Unconditionally set the compiler to gcc since the following flags
|
# The following flags only apply to the gcc compiler.
|
||||||
# only apply to that compiler.
|
CC=${CC:-gcc}
|
||||||
CC=gcc
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
163
configure
vendored
163
configure
vendored
@ -1149,7 +1149,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
for ac_func in lseek64 fseek64 getpwuid gethostname
|
for ac_func in getpwuid gethostname
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:1156: checking for $ac_func" >&5
|
echo "configure:1156: checking for $ac_func" >&5
|
||||||
@ -1205,16 +1205,89 @@ fi
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 1210 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
#include<sys/types.h>
|
||||||
|
int main() {
|
||||||
|
off64_t n = 0;
|
||||||
|
; return 0; }
|
||||||
|
EOF
|
||||||
|
if { (eval echo configure:1217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
|
rm -rf conftest*
|
||||||
|
for ac_func in lseek64 fseek64
|
||||||
|
do
|
||||||
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
|
echo "configure:1222: checking for $ac_func" >&5
|
||||||
|
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||||
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
|
else
|
||||||
|
cat > conftest.$ac_ext <<EOF
|
||||||
|
#line 1227 "configure"
|
||||||
|
#include "confdefs.h"
|
||||||
|
/* System header to define __stub macros and hopefully few prototypes,
|
||||||
|
which can conflict with char $ac_func(); below. */
|
||||||
|
#include <assert.h>
|
||||||
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
char $ac_func();
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
/* The GNU C library defines this for functions which it implements
|
||||||
|
to always fail with ENOSYS. Some functions are actually named
|
||||||
|
something starting with __ and the normal name is an alias. */
|
||||||
|
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
|
||||||
|
choke me
|
||||||
|
#else
|
||||||
|
$ac_func();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
; return 0; }
|
||||||
|
EOF
|
||||||
|
if { (eval echo configure:1250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_func_$ac_func=yes"
|
||||||
|
else
|
||||||
|
echo "configure: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
rm -rf conftest*
|
||||||
|
eval "ac_cv_func_$ac_func=no"
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
fi
|
||||||
|
|
||||||
|
if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
|
||||||
|
echo "$ac_t""yes" 1>&6
|
||||||
|
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||||
|
cat >> confdefs.h <<EOF
|
||||||
|
#define $ac_tr_func 1
|
||||||
|
EOF
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "$ac_t""no" 1>&6
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "configure: failed program was:" >&5
|
||||||
|
cat conftest.$ac_ext >&5
|
||||||
|
rm -rf conftest*
|
||||||
|
echo "$ac_t""skipping test for lseek64() and fseek64()" 1>&6
|
||||||
|
fi
|
||||||
|
rm -f conftest*
|
||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
|
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
|
||||||
echo "configure:1211: checking whether byte ordering is bigendian" >&5
|
echo "configure:1284: checking whether byte ordering is bigendian" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_cv_c_bigendian=unknown
|
ac_cv_c_bigendian=unknown
|
||||||
# See if sys/param.h defines the BYTE_ORDER macro.
|
# See if sys/param.h defines the BYTE_ORDER macro.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1218 "configure"
|
#line 1291 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -1225,11 +1298,11 @@ int main() {
|
|||||||
#endif
|
#endif
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
# It does; now see whether it defined to BIG_ENDIAN or not.
|
# It does; now see whether it defined to BIG_ENDIAN or not.
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1233 "configure"
|
#line 1306 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -1240,7 +1313,7 @@ int main() {
|
|||||||
#endif
|
#endif
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_c_bigendian=yes
|
ac_cv_c_bigendian=yes
|
||||||
else
|
else
|
||||||
@ -1260,7 +1333,7 @@ if test "$cross_compiling" = yes; then
|
|||||||
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1264 "configure"
|
#line 1337 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
main () {
|
main () {
|
||||||
/* Are we little or big endian? From Harbison&Steele. */
|
/* Are we little or big endian? From Harbison&Steele. */
|
||||||
@ -1273,7 +1346,7 @@ main () {
|
|||||||
exit (u.c[sizeof (long) - 1] == 1);
|
exit (u.c[sizeof (long) - 1] == 1);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:1350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
ac_cv_c_bigendian=no
|
ac_cv_c_bigendian=no
|
||||||
else
|
else
|
||||||
@ -1297,7 +1370,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking size of short""... $ac_c" 1>&6
|
echo $ac_n "checking size of short""... $ac_c" 1>&6
|
||||||
echo "configure:1301: checking size of short" >&5
|
echo "configure:1374: checking size of short" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -1305,7 +1378,7 @@ else
|
|||||||
ac_cv_sizeof_short=2
|
ac_cv_sizeof_short=2
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1309 "configure"
|
#line 1382 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
main()
|
main()
|
||||||
@ -1316,7 +1389,7 @@ main()
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:1393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
ac_cv_sizeof_short=`cat conftestval`
|
ac_cv_sizeof_short=`cat conftestval`
|
||||||
else
|
else
|
||||||
@ -1336,7 +1409,7 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking size of int""... $ac_c" 1>&6
|
echo $ac_n "checking size of int""... $ac_c" 1>&6
|
||||||
echo "configure:1340: checking size of int" >&5
|
echo "configure:1413: checking size of int" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -1344,7 +1417,7 @@ else
|
|||||||
ac_cv_sizeof_int=4
|
ac_cv_sizeof_int=4
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1348 "configure"
|
#line 1421 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
main()
|
main()
|
||||||
@ -1355,7 +1428,7 @@ main()
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
ac_cv_sizeof_int=`cat conftestval`
|
ac_cv_sizeof_int=`cat conftestval`
|
||||||
else
|
else
|
||||||
@ -1375,7 +1448,7 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking size of long""... $ac_c" 1>&6
|
echo $ac_n "checking size of long""... $ac_c" 1>&6
|
||||||
echo "configure:1379: checking size of long" >&5
|
echo "configure:1452: checking size of long" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -1383,7 +1456,7 @@ else
|
|||||||
ac_cv_sizeof_long=4
|
ac_cv_sizeof_long=4
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1387 "configure"
|
#line 1460 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
main()
|
main()
|
||||||
@ -1394,7 +1467,7 @@ main()
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:1471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
ac_cv_sizeof_long=`cat conftestval`
|
ac_cv_sizeof_long=`cat conftestval`
|
||||||
else
|
else
|
||||||
@ -1414,7 +1487,7 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking size of long long""... $ac_c" 1>&6
|
echo $ac_n "checking size of long long""... $ac_c" 1>&6
|
||||||
echo "configure:1418: checking size of long long" >&5
|
echo "configure:1491: checking size of long long" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -1422,7 +1495,7 @@ else
|
|||||||
ac_cv_sizeof_long_long=8
|
ac_cv_sizeof_long_long=8
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1426 "configure"
|
#line 1499 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
main()
|
main()
|
||||||
@ -1433,7 +1506,7 @@ main()
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:1510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
ac_cv_sizeof_long_long=`cat conftestval`
|
ac_cv_sizeof_long_long=`cat conftestval`
|
||||||
else
|
else
|
||||||
@ -1453,7 +1526,7 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking size of float""... $ac_c" 1>&6
|
echo $ac_n "checking size of float""... $ac_c" 1>&6
|
||||||
echo "configure:1457: checking size of float" >&5
|
echo "configure:1530: checking size of float" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -1461,7 +1534,7 @@ else
|
|||||||
ac_cv_sizeof_float=4
|
ac_cv_sizeof_float=4
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1465 "configure"
|
#line 1538 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
main()
|
main()
|
||||||
@ -1472,7 +1545,7 @@ main()
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:1549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
ac_cv_sizeof_float=`cat conftestval`
|
ac_cv_sizeof_float=`cat conftestval`
|
||||||
else
|
else
|
||||||
@ -1492,7 +1565,7 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking size of double""... $ac_c" 1>&6
|
echo $ac_n "checking size of double""... $ac_c" 1>&6
|
||||||
echo "configure:1496: checking size of double" >&5
|
echo "configure:1569: checking size of double" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
@ -1500,7 +1573,7 @@ else
|
|||||||
ac_cv_sizeof_double=8
|
ac_cv_sizeof_double=8
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1504 "configure"
|
#line 1577 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
main()
|
main()
|
||||||
@ -1511,7 +1584,7 @@ main()
|
|||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
|
||||||
then
|
then
|
||||||
ac_cv_sizeof_double=`cat conftestval`
|
ac_cv_sizeof_double=`cat conftestval`
|
||||||
else
|
else
|
||||||
@ -1535,12 +1608,12 @@ EOF
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
echo $ac_n "checking for working const""... $ac_c" 1>&6
|
||||||
echo "configure:1539: checking for working const" >&5
|
echo "configure:1612: checking for working const" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1544 "configure"
|
#line 1617 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
@ -1589,7 +1662,7 @@ ccp = (char const *const *) p;
|
|||||||
|
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_c_const=yes
|
ac_cv_c_const=yes
|
||||||
else
|
else
|
||||||
@ -1610,21 +1683,21 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for inline""... $ac_c" 1>&6
|
echo $ac_n "checking for inline""... $ac_c" 1>&6
|
||||||
echo "configure:1614: checking for inline" >&5
|
echo "configure:1687: checking for inline" >&5
|
||||||
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
else
|
else
|
||||||
ac_cv_c_inline=no
|
ac_cv_c_inline=no
|
||||||
for ac_kw in inline __inline__ __inline; do
|
for ac_kw in inline __inline__ __inline; do
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1621 "configure"
|
#line 1694 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
} $ac_kw foo() {
|
} $ac_kw foo() {
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
ac_cv_c_inline=$ac_kw; break
|
ac_cv_c_inline=$ac_kw; break
|
||||||
else
|
else
|
||||||
@ -1651,16 +1724,16 @@ esac
|
|||||||
|
|
||||||
|
|
||||||
echo $ac_n "checking for __attribute__ extension""... $ac_c" 1>&6
|
echo $ac_n "checking for __attribute__ extension""... $ac_c" 1>&6
|
||||||
echo "configure:1655: checking for __attribute__ extension" >&5
|
echo "configure:1728: checking for __attribute__ extension" >&5
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1657 "configure"
|
#line 1730 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
int __attribute__((unused)) f(void){return 1;}
|
int __attribute__((unused)) f(void){return 1;}
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
#define HAVE_ATTRIBUTE 1
|
#define HAVE_ATTRIBUTE 1
|
||||||
@ -1676,16 +1749,16 @@ fi
|
|||||||
rm -f conftest*
|
rm -f conftest*
|
||||||
|
|
||||||
echo $ac_n "checking for __FUNCTION__ extension""... $ac_c" 1>&6
|
echo $ac_n "checking for __FUNCTION__ extension""... $ac_c" 1>&6
|
||||||
echo "configure:1680: checking for __FUNCTION__ extension" >&5
|
echo "configure:1753: checking for __FUNCTION__ extension" >&5
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1682 "configure"
|
#line 1755 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
int f(void){return __FUNCTION__;}
|
int f(void){return __FUNCTION__;}
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1689: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
if { (eval echo configure:1762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
#define HAVE_FUNCTION 1
|
#define HAVE_FUNCTION 1
|
||||||
@ -1708,7 +1781,7 @@ if test "${enable_parallel+set}" = set; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo $ac_n "checking for parallel support""... $ac_c" 1>&6
|
echo $ac_n "checking for parallel support""... $ac_c" 1>&6
|
||||||
echo "configure:1712: checking for parallel support" >&5;
|
echo "configure:1785: checking for parallel support" >&5;
|
||||||
|
|
||||||
RUNTEST=""
|
RUNTEST=""
|
||||||
|
|
||||||
@ -1734,7 +1807,7 @@ EOF
|
|||||||
CPPFLAGS="$CPPFLAGS $MPI_INC"
|
CPPFLAGS="$CPPFLAGS $MPI_INC"
|
||||||
CFLAGS="$CFLAGS $MPI_LIB"
|
CFLAGS="$CFLAGS $MPI_LIB"
|
||||||
echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6
|
echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6
|
||||||
echo "configure:1738: checking for main in -lmpi" >&5
|
echo "configure:1811: checking for main in -lmpi" >&5
|
||||||
ac_lib_var=`echo mpi'_'main | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo mpi'_'main | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -1742,14 +1815,14 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lmpi $LIBS"
|
LIBS="-lmpi $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1746 "configure"
|
#line 1819 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
main()
|
main()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
@ -1776,7 +1849,7 @@ else
|
|||||||
echo "$ac_t""no" 1>&6
|
echo "$ac_t""no" 1>&6
|
||||||
fi
|
fi
|
||||||
echo $ac_n "checking for main in -lmpio""... $ac_c" 1>&6
|
echo $ac_n "checking for main in -lmpio""... $ac_c" 1>&6
|
||||||
echo "configure:1780: checking for main in -lmpio" >&5
|
echo "configure:1853: checking for main in -lmpio" >&5
|
||||||
ac_lib_var=`echo mpio'_'main | sed 'y%./+-%__p_%'`
|
ac_lib_var=`echo mpio'_'main | sed 'y%./+-%__p_%'`
|
||||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||||
echo $ac_n "(cached) $ac_c" 1>&6
|
echo $ac_n "(cached) $ac_c" 1>&6
|
||||||
@ -1784,14 +1857,14 @@ else
|
|||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
LIBS="-lmpio $LIBS"
|
LIBS="-lmpio $LIBS"
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 1788 "configure"
|
#line 1861 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
main()
|
main()
|
||||||
; return 0; }
|
; return 0; }
|
||||||
EOF
|
EOF
|
||||||
if { (eval echo configure:1795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||||
rm -rf conftest*
|
rm -rf conftest*
|
||||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||||
else
|
else
|
||||||
|
@ -107,7 +107,12 @@ AC_TYPE_SIZE_T
|
|||||||
dnl ----------------------------------------------------------------------
|
dnl ----------------------------------------------------------------------
|
||||||
dnl Check for functions.
|
dnl Check for functions.
|
||||||
dnl
|
dnl
|
||||||
AC_CHECK_FUNCS(lseek64 fseek64 getpwuid gethostname)
|
AC_CHECK_FUNCS(getpwuid gethostname)
|
||||||
|
|
||||||
|
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 ----------------------------------------------------------------------
|
||||||
|
39
src/H5F.c
39
src/H5F.c
@ -77,8 +77,8 @@ const H5F_create_t H5F_create_dflt = {
|
|||||||
0, /* unused */
|
0, /* unused */
|
||||||
0, /* unused */
|
0, /* unused */
|
||||||
},
|
},
|
||||||
4, /* Default offset size */
|
sizeof(size_t), /* Default offset size */
|
||||||
4, /* Default length size */
|
sizeof(size_t), /* Default length size */
|
||||||
HDF5_BOOTBLOCK_VERSION, /* Current Boot-Block version # */
|
HDF5_BOOTBLOCK_VERSION, /* Current Boot-Block version # */
|
||||||
HDF5_SMALLOBJECT_VERSION, /* Current Small-Object heap version # */
|
HDF5_SMALLOBJECT_VERSION, /* Current Small-Object heap version # */
|
||||||
HDF5_FREESPACE_VERSION, /* Current Free-Space info version # */
|
HDF5_FREESPACE_VERSION, /* Current Free-Space info version # */
|
||||||
@ -143,23 +143,23 @@ H5F_init_interface(void)
|
|||||||
|
|
||||||
/* Initialize the default file access template */
|
/* Initialize the default file access template */
|
||||||
H5F_access_dflt.driver = H5F_LOW_DFLT;
|
H5F_access_dflt.driver = H5F_LOW_DFLT;
|
||||||
switch (H5F_LOW_DFLT) {
|
#if (H5F_LOW_DFLT == H5F_LOW_SEC2)
|
||||||
case H5F_LOW_STDIO:
|
/* Nothing to initialize */
|
||||||
case H5F_LOW_SEC2:
|
#elif (H5F_LOW_DFLT == H5F_LOW_STDIO)
|
||||||
case H5F_LOW_CORE:
|
/* Nothing to initialize */
|
||||||
case H5F_LOW_SPLIT:
|
#elif (H5F_LOW_DFLT == H5F_LOW_CORE)
|
||||||
case H5F_LOW_FAMILY:
|
H5F_access_dflt.u.core.increment = 10*1024;
|
||||||
/* nothing more to init */
|
#elif (H5F_LOW_DFLT == H5F_LOW_MPI)
|
||||||
break;
|
H5F_access_dflt.u.mpio.access_mode = 0;
|
||||||
|
H5F_access_dflt.u.mpio.comm = MPI_COMM_NULL;
|
||||||
case H5F_LOW_MPI:
|
H5F_access_dflt.u.mpio.info = MPI_INFO_NULL;
|
||||||
#ifdef HAVE_PARALLEL
|
#elif (H5F_LOW_DFLT == H5F_LOW_SPLIT)
|
||||||
H5F_access_dflt.u.mpio.access_mode = 0;
|
/* Nothing to initialize */
|
||||||
H5F_access_dflt.u.mpio.comm = MPI_COMM_NULL;
|
#elif (H5F_LOW_DFLT == H5F_LOW_FAMILY)
|
||||||
H5F_access_dflt.u.mpio.info = MPI_INFO_NULL;
|
/* Nothing to initialize */
|
||||||
|
#else
|
||||||
|
# error "Unknown default file driver"
|
||||||
#endif
|
#endif
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
FUNC_LEAVE(ret_value);
|
FUNC_LEAVE(ret_value);
|
||||||
}
|
}
|
||||||
@ -1388,7 +1388,6 @@ H5F_close(H5F_t *f)
|
|||||||
herr_t
|
herr_t
|
||||||
H5Fclose(hid_t fid)
|
H5Fclose(hid_t fid)
|
||||||
{
|
{
|
||||||
H5F_t *file = NULL; /* file struct for file to close */
|
|
||||||
herr_t ret_value = SUCCEED;
|
herr_t ret_value = SUCCEED;
|
||||||
|
|
||||||
FUNC_ENTER(H5Fclose, FAIL);
|
FUNC_ENTER(H5Fclose, FAIL);
|
||||||
@ -1397,7 +1396,7 @@ H5Fclose(hid_t fid)
|
|||||||
if (H5_FILE != H5A_group(fid)) {
|
if (H5_FILE != H5A_group(fid)) {
|
||||||
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file atom");
|
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file atom");
|
||||||
}
|
}
|
||||||
if (NULL == (file = H5A_object(fid))) {
|
if (NULL == H5A_object(fid)) {
|
||||||
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't unatomize file");
|
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't unatomize file");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,10 +143,10 @@
|
|||||||
# define INT64DECODE(p, n) { \
|
# define INT64DECODE(p, n) { \
|
||||||
/* WE DON'T CHECK FOR OVERFLOW! */ \
|
/* WE DON'T CHECK FOR OVERFLOW! */ \
|
||||||
size_t _i; \
|
size_t _i; \
|
||||||
n = 0; \
|
n = 0; \
|
||||||
(p) += 8; \
|
(p) += 8; \
|
||||||
for (_i=0; _i<sizeof(int64); _i++, n<<=8) { \
|
for (_i=0; _i<sizeof(int64); _i++) { \
|
||||||
n |= *(--p); \
|
n = (n<<8) | *(--p); \
|
||||||
} \
|
} \
|
||||||
(p) += 8; \
|
(p) += 8; \
|
||||||
}
|
}
|
||||||
@ -154,10 +154,10 @@
|
|||||||
# define UINT64DECODE(p, n) { \
|
# define UINT64DECODE(p, n) { \
|
||||||
/* WE DON'T CHECK FOR OVERFLOW! */ \
|
/* WE DON'T CHECK FOR OVERFLOW! */ \
|
||||||
size_t _i; \
|
size_t _i; \
|
||||||
n = 0; \
|
n = 0; \
|
||||||
(p) += 8; \
|
(p) += 8; \
|
||||||
for (_i=0; _i<sizeof(uint64); _i++, n<<=8) { \
|
for (_i=0; _i<sizeof(uint64); _i++) { \
|
||||||
n |= *(--p); \
|
n = (n<<8) | *(--p); \
|
||||||
} \
|
} \
|
||||||
(p) += 8; \
|
(p) += 8; \
|
||||||
}
|
}
|
||||||
@ -339,7 +339,7 @@ typedef struct H5F_low_t {
|
|||||||
FILE *f; /* Posix stdio file */
|
FILE *f; /* Posix stdio file */
|
||||||
H5F_fileop_t op; /* Previous file operation */
|
H5F_fileop_t op; /* Previous file operation */
|
||||||
#ifdef HAVE_FSEEK64
|
#ifdef HAVE_FSEEK64
|
||||||
long long cur; /* Current file position */
|
int64 cur; /* Current file position */
|
||||||
#else
|
#else
|
||||||
off_t cur; /* Current file position */
|
off_t cur; /* Current file position */
|
||||||
#endif
|
#endif
|
||||||
|
@ -55,7 +55,7 @@ typedef enum H5F_driver_t {
|
|||||||
H5F_LOW_MPI = 2, /*use indep or collective MPI-IO */
|
H5F_LOW_MPI = 2, /*use indep or collective MPI-IO */
|
||||||
H5F_LOW_CORE = 3, /*use malloc() and free() */
|
H5F_LOW_CORE = 3, /*use malloc() and free() */
|
||||||
H5F_LOW_SPLIT = 4, /*separate meta data from raw data */
|
H5F_LOW_SPLIT = 4, /*separate meta data from raw data */
|
||||||
H5F_LOW_FAMILY = 5, /*split addr space over many files */
|
H5F_LOW_FAMILY = 5 /*split addr space over many files */
|
||||||
} H5F_driver_t;
|
} H5F_driver_t;
|
||||||
|
|
||||||
|
|
||||||
|
@ -177,9 +177,9 @@ H5F_sec2_read(H5F_low_t *lf, const H5F_access_t *access_parms,
|
|||||||
HRETURN_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed");
|
HRETURN_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed");
|
||||||
}
|
}
|
||||||
#ifdef HAVE_LSEEK64
|
#ifdef HAVE_LSEEK64
|
||||||
offset = (off64_t)(addr->offset); /*checked for overflow*/
|
offset = (off64_t)(addr->offset); /*checked for overflow above*/
|
||||||
#else
|
#else
|
||||||
offset = (off_t)(addr->offset); /*checked for overflow*/
|
offset = (off_t)(addr->offset); /*checked for overflow above*/
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Check easy cases */
|
/* Check easy cases */
|
||||||
@ -196,9 +196,15 @@ H5F_sec2_read(H5F_low_t *lf, const H5F_access_t *access_parms,
|
|||||||
if (!H5F_OPT_SEEK ||
|
if (!H5F_OPT_SEEK ||
|
||||||
lf->u.sec2.op == H5F_OP_UNKNOWN ||
|
lf->u.sec2.op == H5F_OP_UNKNOWN ||
|
||||||
lf->u.sec2.cur != offset) {
|
lf->u.sec2.cur != offset) {
|
||||||
|
#ifdef HAVE_LSEEK64
|
||||||
|
if (lseek64 (lf->u.sec2.fd, offset, SEEK_SET)<0) {
|
||||||
|
HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL, "lseek64 failed");
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (lseek(lf->u.sec2.fd, offset, SEEK_SET) < 0) {
|
if (lseek(lf->u.sec2.fd, offset, SEEK_SET) < 0) {
|
||||||
HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "lseek failed");
|
HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "lseek failed");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
lf->u.sec2.cur = offset;
|
lf->u.sec2.cur = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t *access_parms,
|
|||||||
size_t n;
|
size_t n;
|
||||||
uint64 mask;
|
uint64 mask;
|
||||||
#ifdef HAVE_FSEEK64
|
#ifdef HAVE_FSEEK64
|
||||||
long long offset;
|
int64 offset;
|
||||||
#else
|
#else
|
||||||
off_t offset;
|
off_t offset;
|
||||||
#endif
|
#endif
|
||||||
@ -200,7 +200,7 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t *access_parms,
|
|||||||
HRETURN_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed");
|
HRETURN_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed");
|
||||||
}
|
}
|
||||||
#ifdef HAVE_FSEEK64
|
#ifdef HAVE_FSEEK64
|
||||||
offset = (long long)(addr->offset); /*checked for overflow*/
|
offset = (int64)(addr->offset); /*checked for overflow*/
|
||||||
#else
|
#else
|
||||||
offset = (off_t)(addr->offset); /*checked for overflow*/
|
offset = (off_t)(addr->offset); /*checked for overflow*/
|
||||||
#endif
|
#endif
|
||||||
@ -218,9 +218,15 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t *access_parms,
|
|||||||
if (!H5F_OPT_SEEK ||
|
if (!H5F_OPT_SEEK ||
|
||||||
lf->u.stdio.op != H5F_OP_READ ||
|
lf->u.stdio.op != H5F_OP_READ ||
|
||||||
lf->u.stdio.cur != offset) {
|
lf->u.stdio.cur != offset) {
|
||||||
|
#ifdef HAVE_FSEEK64
|
||||||
|
if (fseek64 (lf->u.stdio.f, offset, SEEK_SET)<0) {
|
||||||
|
HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL, "fseek64 failed");
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (fseek(lf->u.stdio.f, offset, SEEK_SET) < 0) {
|
if (fseek(lf->u.stdio.f, offset, SEEK_SET) < 0) {
|
||||||
HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "fseek failed");
|
HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "fseek failed");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
lf->u.stdio.cur = offset;
|
lf->u.stdio.cur = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,7 +256,11 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t *access_parms,
|
|||||||
* Update the file position data.
|
* Update the file position data.
|
||||||
*/
|
*/
|
||||||
lf->u.stdio.op = H5F_OP_READ;
|
lf->u.stdio.op = H5F_OP_READ;
|
||||||
lf->u.stdio.cur = offset + n;
|
#ifdef HAVE_FSEEK64
|
||||||
|
lf->u.stdio.cur = (int64)(offset+n); /*checked for overflow above*/
|
||||||
|
#else
|
||||||
|
lf->u.stdio.cur = (off_t)(offset+n); /*checked for overflow above*/
|
||||||
|
#endif
|
||||||
FUNC_LEAVE(SUCCEED);
|
FUNC_LEAVE(SUCCEED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,7 +294,7 @@ H5F_stdio_write(H5F_low_t *lf, const H5F_access_t *access_parms,
|
|||||||
ssize_t n;
|
ssize_t n;
|
||||||
uint64 mask;
|
uint64 mask;
|
||||||
#ifdef HAVE_FSEEK64
|
#ifdef HAVE_FSEEK64
|
||||||
long long offset;
|
int64 offset;
|
||||||
#else
|
#else
|
||||||
off_t offset;
|
off_t offset;
|
||||||
#endif
|
#endif
|
||||||
@ -299,8 +309,8 @@ H5F_stdio_write(H5F_low_t *lf, const H5F_access_t *access_parms,
|
|||||||
HRETURN_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed");
|
HRETURN_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed");
|
||||||
}
|
}
|
||||||
#ifdef HAVE_FSEEK64
|
#ifdef HAVE_FSEEK64
|
||||||
offset = (long long)(addr->offset); /*checked for overflow*/
|
offset = (int64)(addr->offset); /*checked for overflow*/
|
||||||
n = (long long)size; /*checked for overflow*/
|
n = (int64)size; /*checked for overflow*/
|
||||||
#else
|
#else
|
||||||
offset = (long)(addr->offset); /*checked for overflow*/
|
offset = (long)(addr->offset); /*checked for overflow*/
|
||||||
n = (off_t)size; /*checked for overflow*/
|
n = (off_t)size; /*checked for overflow*/
|
||||||
@ -312,9 +322,15 @@ H5F_stdio_write(H5F_low_t *lf, const H5F_access_t *access_parms,
|
|||||||
if (!H5F_OPT_SEEK ||
|
if (!H5F_OPT_SEEK ||
|
||||||
lf->u.stdio.op != H5F_OP_WRITE ||
|
lf->u.stdio.op != H5F_OP_WRITE ||
|
||||||
lf->u.stdio.cur != offset) {
|
lf->u.stdio.cur != offset) {
|
||||||
|
#ifdef HAVE_FSEEK64
|
||||||
|
if (fseek64 (lf->u.stdio.f, offset, SEEK_SET)<0) {
|
||||||
|
HRETURN_ERROR (H5E_IO, H5E_SEEKERROR, FAIL, "fseek64 failed");
|
||||||
|
}
|
||||||
|
#else
|
||||||
if (fseek(lf->u.stdio.f, offset, SEEK_SET) < 0) {
|
if (fseek(lf->u.stdio.f, offset, SEEK_SET) < 0) {
|
||||||
HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "fseek failed");
|
HRETURN_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "fseek failed");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
lf->u.stdio.cur = offset;
|
lf->u.stdio.cur = offset;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -983,7 +983,7 @@ H5Pget_driver (hid_t tid)
|
|||||||
/* Check arguments */
|
/* Check arguments */
|
||||||
if (H5P_FILE_ACCESS != H5Pget_class (tid) ||
|
if (H5P_FILE_ACCESS != H5Pget_class (tid) ||
|
||||||
NULL == (tmpl = H5A_object (tid))) {
|
NULL == (tmpl = H5A_object (tid))) {
|
||||||
HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL,
|
HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, H5F_LOW_ERROR,
|
||||||
"not a file access property list");
|
"not a file access property list");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
/* Version #'s of library code */
|
/* Version #'s of library code */
|
||||||
#define HDF5_MAJOR_VERSION 1 /* For major interface changes */
|
#define HDF5_MAJOR_VERSION 1 /* For major interface changes */
|
||||||
#define HDF5_MINOR_VERSION 0 /* For minor interface changes */
|
#define HDF5_MINOR_VERSION 0 /* For minor interface changes */
|
||||||
#define HDF5_RELEASE_VERSION 0 /* For interface tweaks & bug-fixes */
|
#define HDF5_RELEASE_VERSION 1 /* For interface tweaks & bug-fixes */
|
||||||
#define HDF5_PATCH_VERSION 0 /* For small groups of bug fixes */
|
#define HDF5_PATCH_VERSION 0 /* For small groups of bug fixes */
|
||||||
|
|
||||||
/* Version #'s of the major components of the file format */
|
/* Version #'s of the major components of the file format */
|
||||||
@ -38,61 +38,62 @@
|
|||||||
* Include those things that almost all source files need.
|
* Include those things that almost all source files need.
|
||||||
*/
|
*/
|
||||||
#ifdef STDC_HEADERS
|
#ifdef STDC_HEADERS
|
||||||
# include <assert.h>
|
# include <assert.h>
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
# include <stdio.h>
|
# include <stdio.h>
|
||||||
# include <stdlib.h>
|
# include <stdlib.h>
|
||||||
# include <string.h>
|
# include <string.h>
|
||||||
# include <unistd.h>
|
# include <sys/types.h>
|
||||||
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pablo support files.
|
* Pablo support files.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_PABLO
|
#ifdef HAVE_PABLO
|
||||||
# define IOTRACE
|
# define IOTRACE
|
||||||
# include "IOTrace.h"
|
# include "IOTrace.h"
|
||||||
# include "ProcIDS.h"
|
# include "ProcIDS.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Does the compiler support the __attribute__(()) syntax? */
|
/* Does the compiler support the __attribute__(()) syntax? */
|
||||||
#ifndef HAVE_ATTRIBUTE
|
#ifndef HAVE_ATTRIBUTE
|
||||||
# define __attribute__(X) /*void */
|
# define __attribute__(X) /*void */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Does the compiler expand __FUNCTION__? */
|
/* Does the compiler expand __FUNCTION__? */
|
||||||
#ifndef HAVE_FUNCTION
|
#ifndef HAVE_FUNCTION
|
||||||
# define __FUNCTION__ "NoFuntionName"
|
# define __FUNCTION__ "NoFuntionName"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* number of members in an array */
|
/* number of members in an array */
|
||||||
#ifndef NELMTS
|
#ifndef NELMTS
|
||||||
# define NELMTS(X) (sizeof(X)/sizeof(X[0]))
|
# define NELMTS(X) (sizeof(X)/sizeof(X[0]))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* minimum of two values */
|
/* minimum of two values */
|
||||||
#ifndef MIN
|
#ifndef MIN
|
||||||
# define MIN(a,b) (((a)<(b)) ? (a) : (b))
|
# define MIN(a,b) (((a)<(b)) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* maximum of two values */
|
/* maximum of two values */
|
||||||
#ifndef MAX
|
#ifndef MAX
|
||||||
# define MAX(a,b) (((a)>(b)) ? (a) : (b))
|
# define MAX(a,b) (((a)>(b)) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* absolute value */
|
/* absolute value */
|
||||||
#ifndef ABS
|
#ifndef ABS
|
||||||
# define ABS(a) (((a)>=0) ? (a) : -(a))
|
# define ABS(a) (((a)>=0) ? (a) : -(a))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* sign of argument */
|
/* sign of argument */
|
||||||
#ifndef SIGN
|
#ifndef SIGN
|
||||||
# define SIGN(a) ((a)>0 ? 1 : (a)<0 ? -1 : 0)
|
# define SIGN(a) ((a)>0 ? 1 : (a)<0 ? -1 : 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* maximum of three values */
|
/* maximum of three values */
|
||||||
#ifndef MAX3
|
#ifndef MAX3
|
||||||
# define MAX3(a,b,c) MAX(MAX(a,b),c)
|
# define MAX3(a,b,c) MAX(MAX(a,b),c)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -112,29 +113,6 @@ typedef struct {
|
|||||||
uint64 offset; /*offset within an HDF5 file */
|
uint64 offset; /*offset within an HDF5 file */
|
||||||
} haddr_t;
|
} haddr_t;
|
||||||
|
|
||||||
/*
|
|
||||||
* We try to use lseek64() and fseek64() if they're available, but they're
|
|
||||||
* not Posix and thus take different arguments on different systems. These
|
|
||||||
* macros attempt to overcome those problems.
|
|
||||||
*/
|
|
||||||
#ifdef HAVE_LSEEK64
|
|
||||||
# ifdef _MIPS_SZLONG
|
|
||||||
/* SGI systems */
|
|
||||||
# if (_MIPS_SZLONG == 64)
|
|
||||||
# define OFF64_SET(VAR,VAL) VAR=VAL
|
|
||||||
# elif defined(_LONGLONG)
|
|
||||||
# define OFF64_SET(VAR,VAL) VAR=VAL
|
|
||||||
# else
|
|
||||||
# define OFF64_SET(VAR,VAL) (VAR.hi32=VAL>>32, \
|
|
||||||
VAR.lo32=(int)(VAL & 0xffffffff), \
|
|
||||||
VAL)
|
|
||||||
# endif
|
|
||||||
# else
|
|
||||||
# warn "HAVE_LSEEK64 has been turned off"
|
|
||||||
# undef HAVE_LSEEK64
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some compilers have problems declaring auto variables that point
|
* Some compilers have problems declaring auto variables that point
|
||||||
* to string constants. Use the CONSTR() macro so it's easy to fix
|
* to string constants. Use the CONSTR() macro so it's easy to fix
|
||||||
|
@ -48,8 +48,9 @@ PRIVATE_HDR=H5private.h H5Aprivate.h H5ACprivate.h H5Bprivate.h \
|
|||||||
H5Tinit.c: H5detect
|
H5Tinit.c: H5detect
|
||||||
$(RUNTEST) ./H5detect >H5Tinit.c
|
$(RUNTEST) ./H5detect >H5Tinit.c
|
||||||
|
|
||||||
|
# no $(LIB) in the action below since that's being made now.
|
||||||
H5detect: H5detect.o
|
H5detect: H5detect.o
|
||||||
$(CC) $(CFLAGS) -o $@ H5detect.o $(LIBS) # no $(LIB) which is being made
|
$(CC) $(CFLAGS) -o $@ H5detect.o $(LIBS)
|
||||||
|
|
||||||
# How to build the programs...
|
# How to build the programs...
|
||||||
debug: debug.o $(LIB)
|
debug: debug.o $(LIB)
|
||||||
|
Loading…
Reference in New Issue
Block a user