From 254ae8d43d796c02aedfb7393726a80be14b95d5 Mon Sep 17 00:00:00 2001 From: Robb Matzke Date: Mon, 2 Nov 1998 12:58:28 -0500 Subject: [svn-r859] Changes since 19981030 ---------------------- ./MANIFEST Added new Pablo files HDF5record_RT.h and ProcIDs.h ./acconfig.h ./configure [REGENERATED] ./configure.in ./src/H5.c ./src/H5Vprivate.h ./src/H5config.h.in [REGENERATED] ./src/H5private.h ./src/H5public.h ./test/big.c Added more configuration stuff for the Win32 environment. Removed all the #ifdef WIN32 from the source and replaced them with OS-independent stuff. Specifics follow: Check for non-Posix.1 `st_blocks' field in `struct stat' which is used by the big file test to decide if the file system supports holes. If the st_blocks field isn't present then we just skip the test. Configure checks for and and defines HAVE_IO_H, HAVE_SYS_RESOURCE_H, HAVE_SYS_TIME_H and HAVE_WINSOCK_H when they're found. Configure checks whether both and can be included and defines SYS_TIME_WITH_TIME if so. Otherwise include only or even if both exist. Configure checks sizeof(__int64) and defines SIZEOF___INT64 to the result or to zero if __int64 isn't defined. The source uses `long long' in preference to `__int64'. Removed null WIN32 definition for `inline' since such a definition already exists in H5config.h Protected gettimeofday() calls in debugging code with HAVE_GETTIMEOFDAY instead of WIN32. ./src/H5F.c ./src/H5Flow.c ./src/H5Fmpio.c ./src/H5Fsec2.c ./src/H5Fstdio.h ./src/H5P.c ./src/H5Tconv.c ./src/H5private.h Removed #include of system files from library source files and consolodated them into H5private.h where they're protected by various configuration macros (most of them were duplicated there already anyway). ./test/big.c ./test/chunk.c ./test/cmpd_dset.c ./test/dsets.c ./test/dtypes.c ./test/extend.c ./test/external.c ./test/fillval.c ./test/flush1.c ./test/flush2.c ./test/iopipe.c ./test/links.c ./test/mount.c ./test/mtime.c ./test/overhead.c ./test/ragged.c ./test/shtype.c ./test/unlink.c Protected system #include's with #ifdef's from H5config.h. Undefined NDEBUG since some of the tests rely on assert() to check return values. Removed WIN32 definitions for __unused__ since this can be controlled by the definition of HAVE_ATTRIBUTE in H5config.h ./test/testhdf5.h Removed the CLEAN_CMD definition because we no longer use it. Albert's cleanup() functions replaced it. ./test/fillval.c Initialized auto hid_t variables to fix warnings in error recovery code when data flow analysis is turned on in compilers. ./test/h5tools.c Initialized an auto variable to fix a compiler warning. ./test/chunk.c ./test/ragged.c The WIN32 had some unsigned variables changed to signed because the compiler generates warnings when coercing unsigned to double(?). I changed them back to unsigned because they really are unsigned quantities. If this the change was just to shut up extraneous warnings then perhaps a compiler flag can do the same; otherwise if the compiler generates bad code then we should supply a patch file instead messing up source code with bug work-arounds. ./src/H5detect.c Protected system #include's with #ifdef's from H5config.h thereby removing a WIN32. If getpwuid() doesn't exist (HAVE_GETPWUID) then we assume that `struct passwd' doesn't exist either (we don't really need it in that case). The H5T_NATIVE_LLONG and H5T_NATIVE_ULLONG are defined in terms of `long long' or else `__int64' or else `long' depending on what's available. ./src/H5Flow.c ./src/H5Ofill.c Added __unused__ to some function arguments that aren't used when assertions are turned off. ./src/H5V.c Changed an auto variable name in some hand-inlined code to get rid of a warning about the variable shadowing a previous auto. --- MANIFEST | 2 + README | 2 +- acconfig.h | 5 +- configure | 291 ++++++++++++++++++++++++++++++++++++------------------ configure.in | 13 ++- src/.distdep | 243 +++++++++++++++++++++++---------------------- src/H5.c | 56 ++++------- src/H5F.c | 4 - src/H5Flow.c | 5 +- src/H5Fmpio.c | 3 - src/H5Fsec2.c | 3 - src/H5Fstdio.c | 3 - src/H5Gnode.c | 20 ++-- src/H5Ofill.c | 11 ++- src/H5P.c | 2 - src/H5Rpublic.h | 12 +-- src/H5Tconv.c | 2 - src/H5V.c | 20 ++-- src/H5Vprivate.h | 5 - src/H5config.h.in | 18 ++++ src/H5detect.c | 66 ++++++++----- src/H5private.h | 190 +++++++++++++++++++++-------------- src/H5public.h | 32 +++--- test/.distdep | 142 ++++++++++---------------- test/big.c | 35 ++++--- test/chunk.c | 29 +++--- test/cmpd_dset.c | 21 ++-- test/dsets.c | 32 +++--- test/dtypes.c | 37 ++++--- test/extend.c | 12 ++- test/external.c | 35 ++++--- test/fillval.c | 33 ++++--- test/flush1.c | 13 ++- test/flush2.c | 16 ++- test/iopipe.c | 80 ++++++++------- test/links.c | 17 ++-- test/mount.c | 16 +-- test/mtime.c | 34 ++++--- test/overhead.c | 23 +++-- test/ragged.c | 30 +++--- test/shtype.c | 18 ++-- test/testhdf5.h | 12 --- test/unlink.c | 16 +-- tools/h5tools.c | 2 +- 44 files changed, 923 insertions(+), 738 deletions(-) diff --git a/MANIFEST b/MANIFEST index ff2a079..6b0635e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -188,11 +188,13 @@ ./examples/h5_select.c ./examples/h5_attribute.c +./pablo/HDF5record_RT.h ./pablo/HDFentries.txt ./pablo/Makefile.in ./pablo/PabloHDF.c ./pablo/PabloHDF_RT.c ./pablo/PabloHDF_SDDF.c +./pablo/ProcIDs.h ./src/.distdep ./src/.indent.pro _DO_NOT_DISTRIBUTE_ diff --git a/README b/README index 7f018f4..63db73c 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This is hdf5-1.1.5 released on Mon Nov 2 04:20:02 CST 1998 +This is hdf5-1.1.20 released on Mon Nov 2 12:13:25 CST 1998 Please refer to the INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/acconfig.h b/acconfig.h index 5d3b861..35cbfac 100644 --- a/acconfig.h +++ b/acconfig.h @@ -10,7 +10,7 @@ /* Define if it's safe to use `long long' for hsize_t and hssize_t */ #undef HAVE_LARGE_HSIZET -/* The width parameter for printf formats for type `long long', us. `ll' */ +/* Width for printf() for type `long long' or `__int64', us. `ll' */ #undef PRINTF_LL_WIDTH /* Define if `tm_gmtoff' is a member of `struct tm' */ @@ -21,3 +21,6 @@ /* Define if `struct timezone' is defined */ #undef HAVE_STRUCT_TIMEZONE + +/* Define if `struct stat' has the `st_blocks' field */ +#undef HAVE_STAT_ST_BLOCKS diff --git a/configure b/configure index 5365521..fcab0d4 100755 --- a/configure +++ b/configure @@ -1298,21 +1298,56 @@ EOF fi -for ac_hdr in unistd.h zlib.h +echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 +echo "configure:1303: checking whether time.h and sys/time.h may both be included" >&5 +if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#include +#include +int main() { +struct tm *tp; +; return 0; } +EOF +if { (eval echo configure:1317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_time=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_time=no +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_header_time" 1>&6 +if test $ac_cv_header_time = yes; then + cat >> confdefs.h <<\EOF +#define TIME_WITH_SYS_TIME 1 +EOF + +fi + +for ac_hdr in io.h sys/resource.h sys/time.h unistd.h winsock.h zlib.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1306: checking for $ac_hdr" >&5 +echo "configure:1341: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1341,12 +1376,12 @@ done echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:1345: checking for off_t" >&5 +echo "configure:1380: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1374,12 +1409,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1378: checking for size_t" >&5 +echo "configure:1413: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1407,14 +1442,14 @@ EOF fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1411: checking whether byte ordering is bigendian" >&5 +echo "configure:1446: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -1425,11 +1460,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -1440,7 +1475,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1479: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1460,7 +1495,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1497,7 +1532,7 @@ EOF fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:1501: checking size of short" >&5 +echo "configure:1536: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1505,7 +1540,7 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < main() @@ -1516,7 +1551,7 @@ main() exit(0); } EOF -if { (eval echo configure:1520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -1536,7 +1571,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1540: checking size of int" >&5 +echo "configure:1575: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1544,7 +1579,7 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < main() @@ -1555,7 +1590,7 @@ main() exit(0); } EOF -if { (eval echo configure:1559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -1575,7 +1610,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1579: checking size of long" >&5 +echo "configure:1614: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1583,7 +1618,7 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < main() @@ -1594,7 +1629,7 @@ main() exit(0); } EOF -if { (eval echo configure:1598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -1614,7 +1649,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:1618: checking size of long long" >&5 +echo "configure:1653: checking size of long long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1622,7 +1657,7 @@ else ac_cv_sizeof_long_long=8 else cat > conftest.$ac_ext < main() @@ -1633,7 +1668,7 @@ main() exit(0); } EOF -if { (eval echo configure:1637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_long=`cat conftestval` else @@ -1652,8 +1687,47 @@ cat >> confdefs.h <&6 +echo "configure:1692: checking size of __int64" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof___int64'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof___int64=8 +else + cat > conftest.$ac_ext < +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(__int64)); + exit(0); +} +EOF +if { (eval echo configure:1711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +then + ac_cv_sizeof___int64=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof___int64=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof___int64" 1>&6 +cat >> confdefs.h <&6 -echo "configure:1657: checking size of float" >&5 +echo "configure:1731: checking size of float" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1661,7 +1735,7 @@ else ac_cv_sizeof_float=4 else cat > conftest.$ac_ext < main() @@ -1672,7 +1746,7 @@ main() exit(0); } EOF -if { (eval echo configure:1676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_float=`cat conftestval` else @@ -1692,7 +1766,7 @@ EOF echo $ac_n "checking size of double""... $ac_c" 1>&6 -echo "configure:1696: checking size of double" >&5 +echo "configure:1770: checking size of double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1700,7 +1774,7 @@ else ac_cv_sizeof_double=8 else cat > conftest.$ac_ext < main() @@ -1711,7 +1785,7 @@ main() exit(0); } EOF -if { (eval echo configure:1715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_double=`cat conftestval` else @@ -1731,7 +1805,7 @@ EOF echo $ac_n "checking size of long double""... $ac_c" 1>&6 -echo "configure:1735: checking size of long double" >&5 +echo "configure:1809: checking size of long double" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1739,7 +1813,7 @@ else ac_cv_sizeof_long_double=8 else cat > conftest.$ac_ext < main() @@ -1750,7 +1824,7 @@ main() exit(0); } EOF -if { (eval echo configure:1754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long_double=`cat conftestval` else @@ -1770,7 +1844,7 @@ EOF echo $ac_n "checking size of size_t""... $ac_c" 1>&6 -echo "configure:1774: checking size of size_t" >&5 +echo "configure:1848: checking size of size_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1778,7 +1852,7 @@ else ac_cv_sizeof_size_t=4 else cat > conftest.$ac_ext < main() @@ -1789,7 +1863,7 @@ main() exit(0); } EOF -if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_size_t=`cat conftestval` else @@ -1812,7 +1886,7 @@ cat >>confdefs.h <<\EOF #include /*for off_t definition*/ EOF echo $ac_n "checking size of off_t""... $ac_c" 1>&6 -echo "configure:1816: checking size of off_t" >&5 +echo "configure:1890: checking size of off_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1820,7 +1894,7 @@ else ac_cv_sizeof_off_t=4 else cat > conftest.$ac_ext < main() @@ -1831,7 +1905,7 @@ main() exit(0); } EOF -if { (eval echo configure:1835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_off_t=`cat conftestval` else @@ -1858,7 +1932,7 @@ if test "${enable_hsizet+set}" = set; then fi echo $ac_n "checking for sizeof hsize_t and hssize_t""... $ac_c" 1>&6 -echo "configure:1862: checking for sizeof hsize_t and hssize_t" >&5 +echo "configure:1936: checking for sizeof hsize_t and hssize_t" >&5 case $HSIZET in no|small) echo "$ac_t""small" 1>&6 @@ -1874,9 +1948,9 @@ esac echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:1878: checking for tm_gmtoff in struct tm" >&5 +echo "configure:1952: checking for tm_gmtoff in struct tm" >&5 cat > conftest.$ac_ext < @@ -1885,7 +1959,7 @@ int main() { struct tm tm; tm.tm_gmtoff=0; ; return 0; } EOF -if { (eval echo configure:1889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TM_GMTOFF 1 @@ -1901,9 +1975,9 @@ fi rm -f conftest* echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6 -echo "configure:1905: checking for global timezone variable" >&5 +echo "configure:1979: checking for global timezone variable" >&5 cat > conftest.$ac_ext < @@ -1912,7 +1986,7 @@ int main() { timezone=0; ; return 0; } EOF -if { (eval echo configure:1916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIMEZONE 1 @@ -1928,12 +2002,12 @@ fi rm -f conftest* echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:1932: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:2006: checking whether struct tm is in sys/time.h or time.h" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1941,7 +2015,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:1945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -1962,12 +2036,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:1966: checking for tm_zone in struct tm" >&5 +echo "configure:2040: checking for tm_zone in struct tm" >&5 if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -1975,7 +2049,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:1979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -1995,12 +2069,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:1999: checking for tzname" >&5 +echo "configure:2073: checking for tzname" >&5 if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -2010,7 +2084,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:2014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -2032,9 +2106,9 @@ EOF fi echo $ac_n "checking for struct timezone""... $ac_c" 1>&6 -echo "configure:2036: checking for struct timezone" >&5 +echo "configure:2110: checking for struct timezone" >&5 cat > conftest.$ac_ext < @@ -2044,7 +2118,7 @@ int main() { struct timezone tz; tz.tz_minuteswest=0; ; return 0; } EOF -if { (eval echo configure:2048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STRUCT_TIMEZONE 1 @@ -2059,16 +2133,41 @@ else fi rm -f conftest* +echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 +echo "configure:2138: checking for st_blocks in struct stat" >&5 +cat > conftest.$ac_ext < +int main() { +struct stat sb; sb.st_blocks=0; +; return 0; } +EOF +if { (eval echo configure:2148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + cat >> confdefs.h <<\EOF +#define HAVE_STAT_ST_BLOCKS 1 +EOF + +echo "$ac_t""yes" 1>&6 +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* for ac_func in getpwuid gethostname system getrusage fork waitpid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2067: checking for $ac_func" >&5 +echo "configure:2166: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2118,12 +2217,12 @@ done for ac_func in gettimeofday BSDgettimeofday difftime sigaction do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2122: checking for $ac_func" >&5 +echo "configure:2221: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2172,24 +2271,24 @@ done cat > conftest.$ac_ext < int main() { off64_t n = 0; ; return 0; } EOF -if { (eval echo configure:2183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2282: \"$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:2188: checking for $ac_func" >&5 +echo "configure:2287: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2247,12 +2346,12 @@ rm -f conftest* echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2251: checking for working const" >&5 +echo "configure:2350: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2322,21 +2421,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:2326: checking for inline" >&5 +echo "configure:2425: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -2363,16 +2462,16 @@ esac echo $ac_n "checking for __attribute__ extension""... $ac_c" 1>&6 -echo "configure:2367: checking for __attribute__ extension" >&5 +echo "configure:2466: checking for __attribute__ extension" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_ATTRIBUTE 1 @@ -2388,16 +2487,16 @@ fi rm -f conftest* echo $ac_n "checking for __FUNCTION__ extension""... $ac_c" 1>&6 -echo "configure:2392: checking for __FUNCTION__ extension" >&5 +echo "configure:2491: checking for __FUNCTION__ extension" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2500: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_FUNCTION 1 @@ -2413,7 +2512,7 @@ fi rm -f conftest* echo $ac_n "checking how to print long long""... $ac_c" 1>&6 -echo "configure:2417: checking how to print long long" >&5 +echo "configure:2516: checking how to print long long" >&5 if eval "test \"`echo '$''{'hdf5_cv_printf_ll'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2422,7 +2521,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -2433,7 +2532,7 @@ else sprintf(s,"%${hdf5_cv_printf_ll}d",x); exit (strcmp(s,"1099511627776"));} EOF -if { (eval echo configure:2437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then break else @@ -2454,7 +2553,7 @@ EOF echo $ac_n "checking for debug flags""... $ac_c" 1>&6 -echo "configure:2458: checking for debug flags" >&5 +echo "configure:2557: checking for debug flags" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" @@ -2486,7 +2585,7 @@ if test "X" != "X$DEBUG_PKG"; then fi echo $ac_n "checking for API tracing""... $ac_c" 1>&6 -echo "configure:2490: checking for API tracing" >&5; +echo "configure:2589: checking for API tracing" >&5; # Check whether --enable-trace or --disable-trace was given. if test "${enable_trace+set}" = set; then enableval="$enable_trace" @@ -2509,7 +2608,7 @@ if test "${enable_parallel+set}" = set; then fi echo $ac_n "checking for parallel support""... $ac_c" 1>&6 -echo "configure:2513: checking for parallel support" >&5; +echo "configure:2612: checking for parallel support" >&5; case "X-$PARALLEL" in @@ -2534,7 +2633,7 @@ EOF CFLAGS="$CFLAGS $MPI_LIB" RUNTEST="$RUNTEST" echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:2538: checking for main in -lmpi" >&5 +echo "configure:2637: checking for main in -lmpi" >&5 ac_lib_var=`echo mpi'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2542,14 +2641,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2576,7 +2675,7 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for main in -lmpio""... $ac_c" 1>&6 -echo "configure:2580: checking for main in -lmpio" >&5 +echo "configure:2679: checking for main in -lmpio" >&5 ac_lib_var=`echo mpio'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2584,14 +2683,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lmpio $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else diff --git a/configure.in b/configure.in index a6b562e..c26a3c3 100644 --- a/configure.in +++ b/configure.in @@ -133,7 +133,8 @@ dnl ---------------------------------------------------------------------- dnl Check for header files. dnl AC_HEADER_STDC -AC_CHECK_HEADERS(unistd.h zlib.h) +AC_HEADER_TIME +AC_CHECK_HEADERS(io.h sys/resource.h sys/time.h unistd.h winsock.h zlib.h) dnl ---------------------------------------------------------------------- @@ -146,6 +147,7 @@ AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) AC_CHECK_SIZEOF(long long, 8) +AC_CHECK_SIZEOF(__int64, 8) AC_CHECK_SIZEOF(float, 4) AC_CHECK_SIZEOF(double, 8) AC_CHECK_SIZEOF(long double, 8) @@ -208,6 +210,15 @@ AC_DEFINE(HAVE_STRUCT_TIMEZONE) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) +dnl ---------------------------------------------------------------------- +dnl Does the struct stat have the st_blocks field? This field is not Posix. +dnl +AC_MSG_CHECKING(for st_blocks in struct stat) +AC_TRY_COMPILE([ +#include ],[struct stat sb; sb.st_blocks=0;], +AC_DEFINE(HAVE_STAT_ST_BLOCKS) +AC_MSG_RESULT(yes), +AC_MSG_RESULT(no)) dnl ---------------------------------------------------------------------- dnl Check for functions. diff --git a/src/.distdep b/src/.distdep index fbc62fa..24cf35b 100644 --- a/src/.distdep +++ b/src/.distdep @@ -25,7 +25,10 @@ H5.o: \ H5Gprivate.h \ H5Gpublic.h \ H5Oprivate.h \ - H5Opublic.h + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h H5A.o: \ H5A.c \ H5private.h \ @@ -56,9 +59,7 @@ H5A.o: \ H5MMprivate.h \ H5MMpublic.h \ H5Pprivate.h \ - H5Ppublic.h \ - H5Apkg.h \ - H5Aprivate.h + H5Ppublic.h H5AC.o: \ H5AC.c \ H5private.h \ @@ -69,9 +70,7 @@ H5AC.o: \ H5Fprivate.h \ H5Fpublic.h \ H5Ipublic.h \ - H5Dpublic.h \ - H5Eprivate.h \ - H5Epublic.h + H5Dpublic.h H5B.o: \ H5B.c \ H5private.h \ @@ -87,9 +86,7 @@ H5B.o: \ H5Bpublic.h \ H5Eprivate.h \ H5Epublic.h \ - H5MFprivate.h \ - H5MFpublic.h \ - H5MMprivate.h + H5MFprivate.h H5D.o: \ H5D.c \ H5private.h \ @@ -125,17 +122,13 @@ H5D.o: \ H5MFpublic.h \ H5MMprivate.h \ H5MMpublic.h \ - H5Pprivate.h \ - H5Ppublic.h \ - H5TBprivate.h + H5Pprivate.h H5E.o: \ H5E.c \ H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5Eprivate.h + H5Iprivate.h H5F.o: \ H5F.c \ H5private.h \ @@ -166,11 +159,7 @@ H5F.o: \ H5ACprivate.h \ H5ACpublic.h \ H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h \ - H5Ppublic.h + H5Epublic.h H5Farray.o: \ H5Farray.c \ H5private.h \ @@ -196,9 +185,7 @@ H5Farray.o: \ H5Zprivate.h \ H5Zpublic.h \ H5Eprivate.h \ - H5Epublic.h \ - H5MFprivate.h \ - H5MFpublic.h + H5Epublic.h H5Fcore.o: \ H5Fcore.c \ H5private.h \ @@ -206,7 +193,10 @@ H5Fcore.o: \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ - H5Ipublic.h + H5Ipublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h H5Ffamily.o: \ H5Ffamily.c \ H5private.h \ @@ -214,7 +204,10 @@ H5Ffamily.o: \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ - H5Ipublic.h + H5Ipublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h H5Fistore.o: \ H5Fistore.c \ H5private.h \ @@ -240,9 +233,7 @@ H5Fistore.o: \ H5Zprivate.h \ H5Zpublic.h \ H5Eprivate.h \ - H5Epublic.h \ - H5MFprivate.h \ - H5MFpublic.h + H5Epublic.h H5Flow.o: \ H5Flow.c \ H5private.h \ @@ -253,9 +244,7 @@ H5Flow.o: \ H5Ipublic.h \ H5Fprivate.h \ H5Fpublic.h \ - H5Dpublic.h \ - H5MMprivate.h \ - H5MMpublic.h + H5Dpublic.h H5Fmpio.o: \ H5Fmpio.c \ H5private.h \ @@ -281,9 +270,7 @@ H5Fmpio.o: \ H5Sprivate.h \ H5Spublic.h \ H5Zprivate.h \ - H5Zpublic.h \ - H5MMprivate.h \ - H5MMpublic.h + H5Zpublic.h H5Fsec2.o: \ H5Fsec2.c \ H5private.h \ @@ -294,9 +281,7 @@ H5Fsec2.o: \ H5Ipublic.h \ H5Fprivate.h \ H5Fpublic.h \ - H5Dpublic.h \ - H5MMprivate.h \ - H5MMpublic.h + H5Dpublic.h H5Fsplit.o: \ H5Fsplit.c \ H5private.h \ @@ -307,9 +292,7 @@ H5Fsplit.o: \ H5Ipublic.h \ H5Fprivate.h \ H5Fpublic.h \ - H5Dpublic.h \ - H5MFprivate.h \ - H5MFpublic.h + H5Dpublic.h H5Fstdio.o: \ H5Fstdio.c \ H5private.h \ @@ -320,9 +303,7 @@ H5Fstdio.o: \ H5Ipublic.h \ H5Fprivate.h \ H5Fpublic.h \ - H5Dpublic.h \ - H5MMprivate.h \ - H5MMpublic.h + H5Dpublic.h H5G.o: \ H5G.c \ H5private.h \ @@ -355,7 +336,10 @@ H5G.o: \ H5ACprivate.h \ H5ACpublic.h \ H5HLprivate.h \ - H5HLpublic.h + H5HLpublic.h \ + H5Iprivate.h \ + H5MMprivate.h \ + H5MMpublic.h H5Gent.o: \ H5Gent.c \ H5private.h \ @@ -373,7 +357,10 @@ H5Gent.o: \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ - H5Bpublic.h + H5Bpublic.h \ + H5HLprivate.h \ + H5HLpublic.h \ + H5MMprivate.h H5Gnode.o: \ H5Gnode.c \ H5private.h \ @@ -404,9 +391,7 @@ H5Gnode.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h + H5Sprivate.h H5Gstab.o: \ H5Gstab.c \ H5private.h \ @@ -435,7 +420,9 @@ H5Gstab.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h H5HG.o: \ H5HG.c \ H5private.h \ @@ -451,9 +438,7 @@ H5HG.o: \ H5Epublic.h \ H5HGprivate.h \ H5HGpublic.h \ - H5MFprivate.h \ - H5MFpublic.h \ - H5MMprivate.h + H5MFprivate.h H5HL.o: \ H5HL.c \ H5private.h \ @@ -469,17 +454,13 @@ H5HL.o: \ H5Epublic.h \ H5HLprivate.h \ H5HLpublic.h \ - H5MFprivate.h \ - H5MFpublic.h \ - H5MMprivate.h + H5MFprivate.h H5I.o: \ H5I.c \ H5private.h \ H5public.h \ H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5Eprivate.h + H5Iprivate.h H5MF.o: \ H5MF.c \ H5private.h \ @@ -487,15 +468,16 @@ H5MF.o: \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ - H5Ipublic.h + H5Ipublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h H5MM.o: \ H5MM.c \ H5private.h \ H5public.h \ H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h + H5Eprivate.h H5O.o: \ H5O.c \ H5private.h \ @@ -521,9 +503,7 @@ H5O.o: \ H5Bpublic.h \ H5HGprivate.h \ H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h + H5Tprivate.h H5Oattr.o: \ H5Oattr.c \ H5private.h \ @@ -549,9 +529,7 @@ H5Oattr.o: \ H5Tpublic.h \ H5Sprivate.h \ H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Apkg.h + H5Zprivate.h H5Ocomp.o: \ H5Ocomp.c \ H5private.h \ @@ -574,7 +552,10 @@ H5Ocomp.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h H5Ocont.o: \ H5Ocont.c \ H5private.h \ @@ -597,7 +578,10 @@ H5Ocont.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h H5Odtype.o: \ H5Odtype.c \ H5private.h \ @@ -623,9 +607,7 @@ H5Odtype.o: \ H5Tpublic.h \ H5Sprivate.h \ H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Tpkg.h + H5Zprivate.h H5Oefl.o: \ H5Oefl.c \ H5private.h \ @@ -651,9 +633,7 @@ H5Oefl.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h + H5Sprivate.h H5Ofill.o: \ H5Ofill.c \ H5private.h \ @@ -676,7 +656,10 @@ H5Ofill.o: \ H5Bpublic.h \ H5HGprivate.h \ H5HGpublic.h \ - H5Tprivate.h + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h H5Olayout.o: \ H5Olayout.c \ H5private.h \ @@ -699,7 +682,10 @@ H5Olayout.o: \ H5Tpublic.h \ H5Sprivate.h \ H5Spublic.h \ - H5Zprivate.h + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h \ + H5Epublic.h H5Omtime.o: \ H5Omtime.c \ H5private.h \ @@ -722,7 +708,10 @@ H5Omtime.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h H5Oname.o: \ H5Oname.c \ H5private.h \ @@ -745,7 +734,10 @@ H5Oname.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h H5Onull.o: \ H5Onull.c \ H5private.h \ @@ -763,7 +755,10 @@ H5Onull.o: \ H5Bpublic.h \ H5HGprivate.h \ H5HGpublic.h \ - H5Tprivate.h + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h H5Osdspace.o: \ H5Osdspace.c \ H5private.h \ @@ -786,7 +781,10 @@ H5Osdspace.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h H5Oshared.o: \ H5Oshared.c \ H5private.h \ @@ -809,7 +807,10 @@ H5Oshared.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h H5Ostab.o: \ H5Ostab.c \ H5private.h \ @@ -832,7 +833,10 @@ H5Ostab.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h H5P.o: \ H5P.c \ H5private.h \ @@ -858,9 +862,7 @@ H5P.o: \ H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h + H5Eprivate.h H5R.o: \ H5R.c \ H5private.h \ @@ -886,9 +888,7 @@ H5R.o: \ H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Rprivate.h + H5Eprivate.h H5RA.o: \ H5RA.c \ H5RAprivate.h \ @@ -916,7 +916,10 @@ H5RA.o: \ H5Zprivate.h \ H5Zpublic.h \ H5Eprivate.h \ - H5Epublic.h + H5Epublic.h \ + H5Iprivate.h \ + H5MMprivate.h \ + H5MMpublic.h H5S.o: \ H5S.c \ H5private.h \ @@ -939,7 +942,10 @@ H5S.o: \ H5Bpublic.h \ H5HGprivate.h \ H5HGpublic.h \ - H5Tprivate.h + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h H5Sall.o: \ H5Sall.c \ H5private.h \ @@ -962,7 +968,10 @@ H5Sall.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h + H5Tpublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Vprivate.h H5Shyper.o: \ H5Shyper.c \ H5private.h \ @@ -988,9 +997,7 @@ H5Shyper.o: \ H5Tpublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Vprivate.h \ - H5MMprivate.h \ - H5MMpublic.h + H5Vprivate.h H5Smpio.o: \ H5Smpio.c \ H5private.h \ @@ -1011,9 +1018,7 @@ H5Smpio.o: \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h + H5HGpublic.h H5Spoint.o: \ H5Spoint.c \ H5private.h \ @@ -1039,9 +1044,7 @@ H5Spoint.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Vprivate.h + H5Zprivate.h H5Sselect.o: \ H5Sselect.c \ H5private.h \ @@ -1067,9 +1070,7 @@ H5Sselect.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Zprivate.h \ - H5Zpublic.h + H5Tpublic.h H5T.o: \ H5T.c \ H5private.h \ @@ -1097,7 +1098,10 @@ H5T.o: \ H5Iprivate.h \ H5Eprivate.h \ H5Epublic.h \ - H5MMprivate.h + H5MMprivate.h \ + H5MMpublic.h \ + H5Tpkg.h \ + H5Rprivate.h H5Tbit.o: \ H5Tbit.c \ H5private.h \ @@ -1115,7 +1119,10 @@ H5Tbit.o: \ H5Dpublic.h \ H5Rprivate.h \ H5Rpublic.h \ - H5Tprivate.h + H5Tprivate.h \ + H5Tpublic.h \ + H5Gprivate.h \ + H5Gpublic.h H5Tconv.o: \ H5Tconv.c \ H5Iprivate.h \ @@ -1138,9 +1145,7 @@ H5Tconv.o: \ H5Tprivate.h \ H5Tpublic.h \ H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h + H5Gpublic.h H5Tinit.o: \ H5Tinit.c \ H5private.h \ @@ -1161,9 +1166,7 @@ H5Tinit.o: \ H5Rprivate.h \ H5Rpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Gprivate.h \ - H5Gpublic.h + H5Tpublic.h H5TB.o: \ H5TB.c \ H5private.h \ @@ -1171,7 +1174,10 @@ H5TB.o: \ H5config.h \ H5Iprivate.h \ H5Ipublic.h \ - H5Eprivate.h + H5Eprivate.h \ + H5Epublic.h \ + H5MMprivate.h \ + H5MMpublic.h H5V.o: \ H5V.c \ H5private.h \ @@ -1192,9 +1198,7 @@ H5V.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h + H5Tpublic.h H5Z.o: \ H5Z.c \ H5private.h \ @@ -1220,5 +1224,4 @@ H5Z.o: \ H5Tpublic.h \ H5Sprivate.h \ H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h + H5Zprivate.h diff --git a/src/H5.c b/src/H5.c index 0f58941..02fd278 100644 --- a/src/H5.c +++ b/src/H5.c @@ -35,18 +35,6 @@ static char RcsId[] = "@(#)$Revision$"; H5_init_interface -- initialize the H5 interface + */ -#include -#include -#include -#include -#if defined(WIN32) -#include -#else -#include -#include -#endif -/* We need this on Irix64 even though we've included stdio.h as documented */ -FILE *fdopen(int fd, const char *mode); /* private headers */ #include /*library */ @@ -61,6 +49,9 @@ FILE *fdopen(int fd, const char *mode); #include /*data types */ #include /*filters */ +/* We need this on Irix64 even though we've included stdio.h as documented */ +FILE *fdopen(int fd, const char *mode); + #define PABLO_MASK H5_mask hbool_t library_initialize_g = FALSE; @@ -653,27 +644,21 @@ HDfprintf (FILE *stream, const char *fmt, ...) if (HDstrchr ("ZHhlq", *s)) { switch (*s) { case 'H': - if (sizeof(hsize_t)==sizeof(long)) { + if (sizeof(hsize_t)offset)==SIZEOF_LONG_LONG) { HDstrcat(template, PRINTF_LL_WIDTH); HDstrcat(template, "d"); + } else if (sizeof(x->offset)==SIZEOF___INT64) { + HDstrcat(template, PRINTF_LL_WIDTH); + HDstrcat(template, "d"); } n = fprintf(stream, template, x->offset); } else { @@ -1003,7 +983,6 @@ H5_timer_reset (H5_timer_t *timer) void H5_timer_begin (H5_timer_t *timer) { -#if !defined(WIN32) #ifdef HAVE_GETRUSAGE struct rusage rusage; #endif @@ -1024,7 +1003,6 @@ H5_timer_begin (H5_timer_t *timer) gettimeofday (&etime, NULL); timer->etime = (double)etime.tv_sec + (double)etime.tv_usec/1e6; -#endif } diff --git a/src/H5F.c b/src/H5F.c index 5785efe..38f17e9 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -49,10 +49,6 @@ static char RcsId[] = "@(#)$Revision$"; #include /*property lists */ #include /*data types */ -#include -#include -#include - /* * Define the following if you want H5F_block_read() and H5F_block_write() to * keep track of the file position and attempt to minimize calls to the file diff --git a/src/H5Flow.c b/src/H5Flow.c index 5193f36..5b13715 100644 --- a/src/H5Flow.c +++ b/src/H5Flow.c @@ -15,9 +15,6 @@ #include #include -#include -#include - #define addr_defined(X) (((uint64)(-1)!=(X)->offset) ? TRUE : FALSE) #define PABLO_MASK H5F_low @@ -1017,7 +1014,7 @@ H5F_addr_hash(const haddr_t *addr, uintn mod) *------------------------------------------------------------------------- */ herr_t -H5F_addr_pack(H5F_t *f, haddr_t *addr, const long objno[2]) +H5F_addr_pack(H5F_t __unused__ *f, haddr_t *addr, const long objno[2]) { assert(f); assert(objno); diff --git a/src/H5Fmpio.c b/src/H5Fmpio.c index d9ba4b0..1ade4b6 100644 --- a/src/H5Fmpio.c +++ b/src/H5Fmpio.c @@ -47,9 +47,6 @@ #include #include -#include -#include - #ifndef HAVE_PARALLEL /* * The H5F_mpio_xxxx functions are for parallel I/O only and are diff --git a/src/H5Fsec2.c b/src/H5Fsec2.c index 874172b..172ec1c 100644 --- a/src/H5Fsec2.c +++ b/src/H5Fsec2.c @@ -19,9 +19,6 @@ #include #include -#include -#include - #define PABLO_MASK H5F_sec2 static hbool_t interface_initialize_g = FALSE; #define INTERFACE_INIT NULL diff --git a/src/H5Fstdio.c b/src/H5Fstdio.c index 5863dd6..ae31305 100644 --- a/src/H5Fstdio.c +++ b/src/H5Fstdio.c @@ -13,9 +13,6 @@ #include #include -#include -#include - #define PABLO_MASK H5F_stdio static hbool_t interface_initialize_g = FALSE; #define INTERFACE_INIT NULL diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 57ad6bd..1107e56 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -20,16 +20,16 @@ #define H5G_PACKAGE /*suppress error message about including H5Gpkg.h */ /* Packages needed by this file... */ -#include /*library */ -#include /*cache */ -#include /*B-link trees */ -#include /*error handling */ -#include /*file access */ -#include /*me */ -#include /*heap */ -#include /*file memory management */ -#include /*core memory management */ -#include /*header messages */ +#include /*library */ +#include /*cache */ +#include /*B-link trees */ +#include /*error handling */ +#include /*file access */ +#include /*me */ +#include /*local heap */ +#include /*file memory management */ +#include /*core memory management */ +#include /*header messages */ #define PABLO_MASK H5G_node_mask diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 3755e7a..4e680f9 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -61,7 +61,8 @@ static hbool_t interface_initialize_g = FALSE; *------------------------------------------------------------------------- */ static void * -H5O_fill_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh) +H5O_fill_decode(H5F_t __unused__ *f, const uint8 *p, + H5O_shared_t __unused__ *sh) { H5O_fill_t *mesg=NULL; void *ret_value = NULL; @@ -110,7 +111,7 @@ H5O_fill_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh) *------------------------------------------------------------------------- */ static herr_t -H5O_fill_encode(H5F_t *f, uint8 *p, const void *_mesg) +H5O_fill_encode(H5F_t __unused__ *f, uint8 *p, const void *_mesg) { const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg; @@ -201,7 +202,7 @@ H5O_fill_copy(const void *_mesg, void *_dest) *------------------------------------------------------------------------- */ static size_t -H5O_fill_size(H5F_t *f, const void *_mesg) +H5O_fill_size(H5F_t __unused__ *f, const void *_mesg) { const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg; @@ -261,8 +262,8 @@ H5O_fill_reset(void *_mesg) *------------------------------------------------------------------------- */ static herr_t -H5O_fill_debug(H5F_t *f, const void *_mesg, FILE *stream, intn indent, - intn fwidth) +H5O_fill_debug(H5F_t __unused__ *f, const void *_mesg, FILE *stream, + intn indent, intn fwidth) { const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg; diff --git a/src/H5P.c b/src/H5P.c index b5517af..164ef19 100644 --- a/src/H5P.c +++ b/src/H5P.c @@ -16,8 +16,6 @@ static char RcsId[] = "@(#)$Revision$"; /* $Id$ */ -#include - /* Private header files */ #include /* Generic Functions */ #include /* IDs */ diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h index 48a5765..7447694 100644 --- a/src/H5Rpublic.h +++ b/src/H5Rpublic.h @@ -24,11 +24,11 @@ * Reference types allowed. */ typedef enum { - H5R_BADTYPE = (-1), /* invalid Reference Type */ - H5R_OBJECT, /* Object reference */ - H5R_DATASET_REGION, /* Dataset Region Reference */ - H5R_INTERNAL, /* Internal Reference */ - H5R_MAXTYPE /* highest type in group (Invalid as true type)*/ + H5R_BADTYPE = (-1), /*invalid Reference Type */ + H5R_OBJECT, /*Object reference */ + H5R_DATASET_REGION, /*Dataset Region Reference */ + H5R_INTERNAL, /*Internal Reference */ + H5R_MAXTYPE /*highest type (Invalid as true type) */ } H5R_type_t; #ifdef LATER @@ -53,7 +53,7 @@ extern "C" { /* Functions in H5R.c */ herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, - H5R_type_t ref_type, hid_t space_id); + H5R_type_t ref_type, hid_t space_id); hid_t H5Rdereference(hid_t dataset, H5R_type_t ref_type, void *ref); hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, void *ref); diff --git a/src/H5Tconv.c b/src/H5Tconv.c index f46524f..2e34c36 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -14,8 +14,6 @@ #include #include #include -#include /*for ceil() */ -#include /*for FLT_MAX and HUGE_VAL */ /* Conversion data for H5T_conv_struct() */ typedef struct H5T_conv_struct_t { diff --git a/src/H5V.c b/src/H5V.c index 4a916ab..c7bf735 100644 --- a/src/H5V.c +++ b/src/H5V.c @@ -415,7 +415,7 @@ H5V_hyper_copy(intn n, const hsize_t *_size, { hsize_t dst_acc; /*accumulator */ hsize_t src_acc; /*accumulator */ - int i; /*counter */ + int ii; /*counter */ /* init */ dst_stride[n-1] = 1; @@ -424,17 +424,17 @@ H5V_hyper_copy(intn n, const hsize_t *_size, src_start = src_offset ? src_offset[n-1] : 0; /* others */ - for (i=n-2, dst_acc=1, src_acc=1; i>=0; --i) { - hsize_t tmp1 = dst_acc * (dst_size[i+1] - size[i+1]); - hsize_t tmp2 = src_acc * (src_size[i+1] - size[i+1]); + for (ii=n-2, dst_acc=1, src_acc=1; ii>=0; --ii) { + hsize_t tmp1 = dst_acc * (dst_size[ii+1] - size[ii+1]); + hsize_t tmp2 = src_acc * (src_size[ii+1] - size[ii+1]); assert (tmp1<((hsize_t)1<<(8*sizeof(hssize_t)-1))); assert (tmp2<((hsize_t)1<<(8*sizeof(hssize_t)-1))); - dst_stride[i] = (hssize_t)tmp1; /*overflow checked*/ - src_stride[i] = (hssize_t)tmp2; /*overflow checked*/ - dst_acc *= dst_size[i+1]; - src_acc *= src_size[i+1]; - dst_start += dst_acc * (dst_offset ? dst_offset[i] : 0); - src_start += src_acc * (src_offset ? src_offset[i] : 0); + dst_stride[ii] = (hssize_t)tmp1; /*overflow checked*/ + src_stride[ii] = (hssize_t)tmp2; /*overflow checked*/ + dst_acc *= dst_size[ii+1]; + src_acc *= src_size[ii+1]; + dst_start += dst_acc * (dst_offset ? dst_offset[ii] : 0); + src_start += src_acc * (src_offset ? src_offset[ii] : 0); } } #endif /* NO_INLINED_CODE */ diff --git a/src/H5Vprivate.h b/src/H5Vprivate.h index 616202e..b3d55e9 100644 --- a/src/H5Vprivate.h +++ b/src/H5Vprivate.h @@ -22,11 +22,6 @@ #define H5V_vector_le_u(N,V1,V2) (H5V_vector_cmp_u (N, V1, V2)<=0) #define H5V_vector_ge_u(N,V1,V2) (H5V_vector_cmp_u (N, V1, V2)>=0) -#if defined(WIN32) -#undef inline -#define inline -#endif - /* Other functions */ #define H5V_vector_cpy(N,DST,SRC) { \ assert (sizeof(*(DST))==sizeof(*(SRC))); \ diff --git a/src/H5config.h.in b/src/H5config.h.in index f244669..755ec7e 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -22,6 +22,9 @@ /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Define if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + /* Define if your declares struct tm. */ #undef TM_IN_SYS_TIME @@ -53,6 +56,9 @@ /* Define if `struct timezone' is defined */ #undef HAVE_STRUCT_TIMEZONE +/* The number of bytes in a __int64. */ +#undef SIZEOF___INT64 + /* The number of bytes in a double. */ #undef SIZEOF_DOUBLE @@ -116,9 +122,21 @@ /* Define if you have the waitpid function. */ #undef HAVE_WAITPID +/* Define if you have the header file. */ +#undef HAVE_IO_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_RESOURCE_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_TIME_H + /* Define if you have the header file. */ #undef HAVE_UNISTD_H +/* Define if you have the header file. */ +#undef HAVE_WINSOCK_H + /* Define if you have the header file. */ #undef HAVE_ZLIB_H diff --git a/src/H5detect.c b/src/H5detect.c index bbd9ba9..9979135 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -30,19 +30,33 @@ static const char *FileHeader = "\n\ *------------------------------------------------------------------------- */ #undef NDEBUG -#include -#include -#include -#include -#include -#include -#if !defined(WIN32) -#include -#include -#include +#include + +/* See H5private.h for how to include files */ +#ifdef STDC_HEADERS +# include +# include +# include +# include +# include #endif -#include +#ifdef HAVE_UNISTD_H +# include +# include +#endif +#ifdef _POSIX_VERSION +# include +#endif + +#if defined(TIME_WITH_SYS_TIME) +# include +# include +#elif defined(HAVE_SYS_TIME_H) +# include +#else +# include +#endif #define MAXDETECT 16 @@ -801,11 +815,15 @@ print_header(void) time_t now = time(NULL); struct tm *tm = localtime(&now); - struct passwd *pwd = NULL; char real_name[30]; char host_name[256]; int i; const char *s; +#ifdef HAVE_GETPWUID + struct passwd *pwd = NULL; +#else + int pwd = 1; +#endif static const char *month_name[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", @@ -895,7 +913,7 @@ bit.\n"; if (pwd || real_name[0] || host_name[0]) { printf(" *\t\t\t"); if (real_name[0]) printf("%s <", real_name); -#if !defined(WIN32) +#ifdef HAVE_GETPWUID if (pwd) fputs(pwd->pw_name, stdout); #endif if (host_name[0]) printf("@%s", host_name); @@ -953,23 +971,21 @@ main(void) DETECT_I(long, LONG, d[nd]); nd++; DETECT_I(unsigned long, ULONG, d[nd]); nd++; -#if SIZEOF_LONG == SIZEOF_LONG_LONG +#if SIZEOF_LONG_LONG > SIZEOF_LONG + DETECT_I(long long, LLONG, d[nd]); nd++; + DETECT_I(unsigned long long, ULLONG, d[nd]); nd++; +#elif SIZEOF___INT64 > SIZEOF_LONG + DETECT_I(__int64, LLONG, d[nd]); nd++; + DETECT_I(unsigned __int64, ULLONG, d[nd]); nd++; +#else /* - * If sizeof(long)==sizeof(long long) then assume that `long long' isn't - * supported and use `long' instead. This suppresses warnings on some - * systems. + * This architecture doesn't support an integer type larger than `long' + * so we'll just make H5T_NATIVE_LLONG the same as H5T_NATIVE_LONG. */ DETECT_I(long, LLONG, d[nd]); nd++; DETECT_I(unsigned long, ULLONG, d[nd]); nd++; -#else -#if defined(WIN32) - DETECT_I(__int64, LLONG, d[nd]); nd++; - DETECT_I(unsigned __int64, ULLONG, d[nd]); nd++; -#else - DETECT_I(long long, LLONG, d[nd]); nd++; - DETECT_I(unsigned long long, ULLONG, d[nd]); nd++; -#endif #endif + DETECT_F(float, FLOAT, d[nd]); nd++; DETECT_F(double, DOUBLE, d[nd]); nd++; diff --git a/src/H5private.h b/src/H5private.h index 25e93f6..2769269 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -1,70 +1,90 @@ -/**************************************************************************** - * NCSA HDF * - * Software Development Group * - * National Center for Supercomputing Applications * - * University of Illinois at Urbana-Champaign * - * 605 E. Springfield, Champaign IL 61820 * - * * - * For conditions of distribution and use, see the accompanying * - * hdf/COPYING file. * - * * - ****************************************************************************/ - -/* $Id$ */ - /* - * This file contains macros & private information for general HDF5 functions. - * Every HDF5 source file will include this file immediately after any - * system include files but before any other private include files. + * Copyright (C) 1998 NCSA + * All rights reserved. + * + * Programmer: Robb Matzke + * Friday, October 30, 1998 + * + * Purpose: This file is included by all HDF5 library source files to + * define common things which are not defined in the HDF5 API. + * The configuration constants like HAVE_UNISTD_H etc. are + * defined in H5config.h which is included by H5public.h. */ #ifndef _H5private_H #define _H5private_H #include /* Include Public Definitions */ -/* Version #'s of the major components of the file format */ -#define HDF5_BOOTBLOCK_VERSION 0 /* of the boot block format */ -#define HDF5_FREESPACE_VERSION 0 /* of the Free-Space Info */ -#define HDF5_OBJECTDIR_VERSION 0 /* of the Object Directory format */ -#define HDF5_SHAREDHEADER_VERSION 0 /* of the Shared-Header Info */ - -/* - * Status return values for the `herr_t' type. - * Since some unix/c routines use 0 and -1 (or more precisely, non-negative - * vs. negative) as their return code, and some assumption had been made in - * the code about that, it is important to keep these constants the same - * values. When checking the success or failure of an integer-valued - * function, remember to compare against zero and not one of these two - * values. - */ -#define SUCCEED 0 -#define FAIL (-1) -#define UFAIL (unsigned)(-1) - - /* - * Include those things that almost all source files need. + * Include ANSI-C header files. */ #ifdef STDC_HEADERS # include # include +# include # include +# include +# include +# include # include # include # include -# include +#endif -#if defined(WIN32) -# include -# include -#define F_OK 00 -#define R_OK 04 -#define W_OK 02 -#else -# include +/* + * If _POSIX_VERSION is defined in unistd.h then this system is Posix.1 + * compliant. Otherwise all bets are off. + */ +#ifdef HAVE_UNISTD_H # include # include -#endif /*if defined(WIN32)*/ +#endif +#ifdef _POSIX_VERSION +# include +# include +# include +#endif +/* + * If a program may include both `time.h' and `sys/time.h' then + * TIME_WITH_SYS_TIME is defined (see AC_HEADER_TIME in configure.in). + * On some older systems, `sys/time.h' includes `time.h' but `time.h' is not + * protected against multiple inclusion, so programs should not explicitly + * include both files. This macro is useful in programs that use, for example, + * `struct timeval' or `struct timezone' as well as `struct tm'. It is best + * used in conjunction with `HAVE_SYS_TIME_H', whose existence is checked + * by `AC_CHECK_HEADERS(sys/time.h)' in configure.in. + */ +#if defined(TIME_WITH_SYS_TIME) +# include +# include +#elif defined(HAVE_SYS_TIME_H) +# include +#else +# include +#endif + +/* + * Resource usage is not Posix.1 but HDF5 uses it anyway for some performance + * and debugging code if available. + */ +#ifdef HAVE_SYS_RESOURCE_H +# include +#endif + +/* + * Win32 is severely broken when it comes to ANSI-C and Posix.1 compliance. + */ +#ifdef HAVE_IO_H +# include +#endif +#ifdef HAVE_WINSOCK_H +# include +# include +#endif +#ifndef F_OK +# define F_OK 00 +# define W_OK 02 +# define R_OK 04 #endif /* @@ -77,44 +97,64 @@ # include "ProcIDs.h" #endif -/* Does the compiler support the __attribute__(()) syntax? */ -#ifndef HAVE_ATTRIBUTE +/* + * Does the compiler support the __attribute__(()) syntax? This is how gcc + * suppresses warnings about unused function arguments. It's no big deal if + * we don't. + */ +#ifdef HAVE_ATTRIBUTE +# define __unused__ __attribute__((unused)) +#else # define __attribute__(X) /*void*/ # define __unused__ /*void*/ -#else -# define __unused__ __attribute__((unused)) -#endif - -#if defined(WIN32) -#undef __unused__ -#define __unused__ #endif -/* Does the compiler expand __FUNCTION__? */ +/* + * Does the compiler expand __FUNCTION__ to be the name of the function + * currently being defined? If not then define it to be some constant + * string. + */ #ifndef HAVE_FUNCTION -# define __FUNCTION__ "NoFuntionName" +# define __FUNCTION__ "NoFunctionName" #endif +/* Version #'s of the major components of the file format */ +#define HDF5_BOOTBLOCK_VERSION 0 /* of the boot block format */ +#define HDF5_FREESPACE_VERSION 0 /* of the Free-Space Info */ +#define HDF5_OBJECTDIR_VERSION 0 /* of the Object Directory format */ +#define HDF5_SHAREDHEADER_VERSION 0 /* of the Shared-Header Info */ + +/* + * Status return values for the `herr_t' type. + * Since some unix/c routines use 0 and -1 (or more precisely, non-negative + * vs. negative) as their return code, and some assumption had been made in + * the code about that, it is important to keep these constants the same + * values. When checking the success or failure of an integer-valued + * function, remember to compare against zero and not one of these two + * values. + */ +#define SUCCEED 0 +#define FAIL (-1) +#define UFAIL (unsigned)(-1) + /* number of members in an array */ #ifndef NELMTS # define NELMTS(X) (sizeof(X)/sizeof(X[0])) #endif /* minimum of two, three, or four values */ -#ifndef MIN -# define MIN(a,b) (((a)<(b)) ? (a) : (b)) -# define MIN2(a,b) MIN(a,b) -# define MIN3(a,b,c) MIN(a,MIN(b,c)) -# define MIN4(a,b,c,d) MIN(MIN(a,b),MIN(c,d)) -#endif +#undef MIN +#define MIN(a,b) (((a)<(b)) ? (a) : (b)) +#define MIN2(a,b) MIN(a,b) +#define MIN3(a,b,c) MIN(a,MIN(b,c)) +#define MIN4(a,b,c,d) MIN(MIN(a,b),MIN(c,d)) /* maximum of two, three, or four values */ -#ifndef MAX -# define MAX(a,b) (((a)>(b)) ? (a) : (b)) -# define MAX2(a,b) MAX(a,b) -# define MAX3(a,b,c) MAX(a,MAX(b,c)) -# define MAX4(a,b,c,d) MAX(MAX(a,b),MAX(c,d)) -#endif +#undef MAX +#define MAX(a,b) (((a)>(b)) ? (a) : (b)) +#define MAX2(a,b) MAX(a,b) +#define MAX3(a,b,c) MAX(a,MAX(b,c)) +#define MAX4(a,b,c,d) MAX(MAX(a,b),MAX(c,d)) /* limit the middle value to be within a range (inclusive) */ #define RANGE(LO,X,HI) MAX(LO,MIN(X,HI)) @@ -178,13 +218,11 @@ typedef unsigned uint64; typedef long int64; typedef unsigned long uint64; #elif SIZEOF_LONG_LONG==8 -#if defined(WIN32) -typedef __int64 int64; -typedef unsigned __int64 uint64; -#else typedef long long int64; typedef unsigned long long uint64; -#endif +#elif SIZEOF___INT64==8 +typedef __int64 int64; +typedef unsigned __int64 uint64; #else # error "no 64-bit integer type" #endif diff --git a/src/H5public.h b/src/H5public.h index 3c4ec4e..6e49151 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -27,10 +27,10 @@ /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 1 /* For minor interface/format changes */ -#define H5_VERS_RELEASE 6 /* For tweaks, bug-fixes, or development */ +#define H5_VERS_RELEASE 20 /* For tweaks, bug-fixes, or development */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ - H5_VERS_RELEASE) + H5_VERS_RELEASE) /* * Status return values. Failed integer functions in HDF5 result almost @@ -64,24 +64,22 @@ typedef int herr_t; typedef unsigned int hbool_t; typedef int htri_t; - /* - * The sizes of file-objects in hdf5 have their own types defined here. On - * most systems, these are the same as size_t and ssize_t, but on systems - * with small address spaces these are defined to be larger. + * The sizes of file objects have their own types defined here. If large + * sizes are enabled then use a 64-bit data type, otherwise use the size of + * memory objects. */ -#if defined(HAVE_LARGE_HSIZET) && SIZEOF_SIZE_T * Wednesday, April 8, 1998 */ -#include -#include -#include -#include -#include -#include -#include -#include +/* See H5private.h for how to include headers */ +#undef NDEBUG +#include + +#ifdef STDC_HEADERS +# include +# include +# include +# include +# include +# include +# include +#endif + +#include #include /*needed for HDfprintf() */ #define FNAME "big%05d.h5" @@ -21,11 +28,15 @@ #define WRT_N 50 #define WRT_SIZE 4*1024 #define FAMILY_SIZE 1024*1024*1024 -#if defined(WIN32) + +#if SIZEOF_LONG_LONG > SIZEOF_LONG +#define GB8LL ((unsigned long long)8*1024*1024*1024) +#elif SIZEOF___INT64 > SIZEOF_LONG #define GB8LL ((unsigned __int64)8*1024*1024*1024) #else -#define GB8LL ((unsigned long long)8*1024*1024*1024) +#define GB8LL ((long)1) #endif + static hsize_t randll (hsize_t limit) { @@ -90,10 +101,10 @@ is_sparse(void) if (5!=write(fd, "hello", 5)) return 0; if (stat("x.h5", &sb)<0) return 0; if (unlink("x.h5")<0) return 0; -#if !defined(WIN32) +#ifdef HAVE_STAT_ST_BLOCKS return (sb.st_blocks*512 < (unsigned)sb.st_size); #else - return (0); + return (0); #endif } diff --git a/test/chunk.c b/test/chunk.c index 5af7d46..55f3f0f 100644 --- a/test/chunk.c +++ b/test/chunk.c @@ -8,15 +8,21 @@ * Purpose: Checks the effect of various I/O request sizes and raw data * cache sizes. Performance depends on the amount of data read * from disk and we use a filter to get that number. - */ -#include -#include -#include -#include -#include +/* See H5private.h for how to include headers */ +#undef NDEBUG #include + +#ifdef STDC_HEADERS +# include +# include +# include +# include +#endif + +#include + #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ @@ -25,11 +31,6 @@ # define __unused__ __attribute__((unused)) #endif -#if defined(WIN32) -#undef __unused__ -#define __unused__ -#endif - #define FILE_NAME "chunk.h5" #define LINESPOINTS "lines" #define CH_SIZE 100 /*squared in terms of bytes */ @@ -241,11 +242,7 @@ test_diag (int op, hsize_t cache_size, hsize_t io_size, hsize_t offset) { hid_t file, dset, mem_space, file_space; hsize_t i, hs_size[2]; -#if defined(WIN32) - hssize_t nio = 0; -#else - hsize_t nio = 0; -#endif + hsize_t nio = 0; hssize_t hs_offset[2]; char *buf = calloc (1, SQUARE (io_size)); int mdc_nelmts, rdcc_nelmts; diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index 92671e5..1c8a235 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -5,14 +5,20 @@ * Programmer: Robb Matzke * Friday, January 23, 1998 */ + +/* See H5private.h for how to include headers */ #undef NDEBUG -#include +#include + +#ifdef STDC_HEADERS +# include +# include +# include +# include +#endif + #include -#include -#include -#include -#include #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ @@ -21,11 +27,6 @@ # define __unused__ __attribute__((unused)) #endif -#if defined(WIN32) -#undef __unused__ -#define __unused__ -#endif - #define TEST_FILE_NAME "cmpd_dset.h5" /* The first dataset */ diff --git a/test/dsets.c b/test/dsets.c index a929842..4640d03 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -7,16 +7,26 @@ * * Purpose: Tests the dataset interface (H5D) */ -#include -#include -#include -#include -#include -#include -#if !defined(WIN32) -#include -#endif + +/* See H5private.h for how to include files */ +#undef NDEBUG #include + +#ifdef STDC_HEADERS +# include +# include +# include +# include +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +# include +#endif + +#include + #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ @@ -24,10 +34,6 @@ #else # define __unused__ __attribute__((unused)) #endif -#if defined(WIN32) -#undef __unused__ -#define __unused__ -#endif #ifndef HAVE_FUNCTION # undef __FUNCTION__ diff --git a/test/dtypes.c b/test/dtypes.c index f35b3da..865cf2b 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -7,24 +7,33 @@ * * Purpose: Tests the data type interface (H5T) */ -#include -#include -#include -#include -#include -#include -#include -#include -#if !defined (WIN32) -#include -#include + +/* See H5private.h for how to include headers */ +#undef NDEBUG +#include + +#ifdef STDC_HEADERS +# include +# include +# include +# include +# include +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +# include +#endif +#ifdef _POSIX_VERSION +# include #endif +#include #define H5T_PACKAGE #include /*to turn off hardware conversions*/ -#include #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ @@ -32,10 +41,6 @@ #else # define __unused__ __attribute__((unused)) #endif -#if defined(WIN32) -#undef __unused__ -#define __unused__ -#endif #if SIZEOF_DOUBLE != SIZEOF_LONG_DOUBLE # define USE_LDOUBLE diff --git a/test/extend.c b/test/extend.c index 361592f..86afe3f 100644 --- a/test/extend.c +++ b/test/extend.c @@ -7,9 +7,17 @@ * * Purpose: Tests extendible datasets. */ -#include + +/* See H5private.h for how to include headers */ +#undef NDEBUG +#include + +#ifdef STDC_HEADERS +# include +# include +#endif + #include -#include #define TEST_FILE_NAME "extend.h5" #define NX 100 /* USE AN EVEN NUMBER!*/ diff --git a/test/external.c b/test/external.c index 28fd264..363a9f2 100644 --- a/test/external.c +++ b/test/external.c @@ -7,17 +7,26 @@ * * Purpose: Tests datasets stored in external raw files. */ -#include -#include -#include -#include -#include -#include -#if !defined(WIN32) -#include -#endif +/* See H5private.h for how to include headers */ +#undef NDEBUG #include + +#ifdef STDC_HEADERS +# include +# include +# include +# include +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +# include +#endif + +#include + #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ @@ -26,11 +35,6 @@ # define __unused__ __attribute__((unused)) #endif -#if defined(WIN32) -#undef __unused__ -#define __unused__ -#endif - #define TEST_FILE_NAME1 "extern_1.h5" #define TEST_FILE_NAME2 "extern_2.h5" #define TEST_FILE_NAME3 "extern_3.h5" @@ -606,7 +610,8 @@ test_2 (void) hs_space = H5Scopy (space); assert (hs_space>=0); - status = H5Sselect_hyperslab (hs_space, H5S_SELECT_SET, &hs_start, NULL, &hs_count, NULL); + status = H5Sselect_hyperslab (hs_space, H5S_SELECT_SET, &hs_start, + NULL, &hs_count, NULL); assert (status>=0); memset (whole, 0, sizeof(whole)); diff --git a/test/fillval.c b/test/fillval.c index 23673fc..feb704f 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -7,12 +7,23 @@ * * Purpose: Tests dataset fill values. */ -#include -#include -#include -#if !defined(WIN32) -#include + +/* See H5private.h for how to include headers */ +#undef NDEBUG +#include + +#ifdef STDC_HEADERS +# include +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +# include #endif + +#include + /* * Define NO_FILLING if you want to compare how this test works when there is * no fill value (that is, when the fill value is zero). @@ -28,7 +39,6 @@ #define FILE_NAME_6 "fillval_6.h5" #define FILE_NAME_RAW "fillval.raw" -#include #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ @@ -36,10 +46,7 @@ #else # define __unused__ __attribute__((unused)) #endif -#if defined(WIN32) -#undef __unused__ -#define __unused__ -#endif + /*------------------------------------------------------------------------- * Function: cleanup @@ -232,7 +239,7 @@ test_getset(void) static int test_create(const char *filename, H5D_layout_t layout) { - hid_t file, space, dcpl, dset1, dset2, dset3; + hid_t file=-1, space=-1, dcpl=-1, dset1=-1, dset2=-1, dset3=-1; hsize_t cur_size[5] = {32, 16, 8, 4, 2}; hsize_t ch_size[5] = {1, 1, 1, 4, 2}; short rd_s, fill_s = 0x1234; @@ -376,7 +383,7 @@ test_create(const char *filename, H5D_layout_t layout) static int test_rdwr(const char *filename, H5D_layout_t layout) { - hid_t file, fspace, mspace, dcpl, dset; + hid_t file=-1, fspace=-1, mspace=-1, dcpl=-1, dset=-1; hsize_t cur_size[5] = {32, 16, 8, 4, 2}; hsize_t ch_size[5] = {1, 16, 8, 4, 2}; hsize_t one[5] = {1, 1, 1, 1, 1}; @@ -520,7 +527,7 @@ test_rdwr(const char *filename, H5D_layout_t layout) static int test_extend(const char *filename, H5D_layout_t layout) { - hid_t file, fspace, mspace, dcpl, dset; + hid_t file=-1, fspace=-1, mspace=-1, dcpl=-1, dset=-1; hsize_t cur_size[5] = {32, 16, 8, 4, 2}; hsize_t max_size[5] = {128, 64, 32, 16, 8}; hsize_t ch_size[5] = {1, 16, 8, 4, 2}; diff --git a/test/flush1.c b/test/flush1.c index 02ddbca..4596f86 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -11,11 +11,18 @@ * calling _exit(0) since this doesn't flush HDF5 caches but * still exits with success. */ -#include -#include -#include +/* See H5private.h for how to include headers */ +#undef NDEBUG #include + +#ifdef STDC_HEADERS +# include +# include +#endif + +#include + #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ diff --git a/test/flush2.c b/test/flush2.c index 6e24075..f9ab526 100644 --- a/test/flush2.c +++ b/test/flush2.c @@ -10,14 +10,20 @@ * as the file was flushed first. This half tries to read the * file created by the first half. */ + +/* See H5private.h for how to include headers */ #undef NDEBUG -#include +#include + +#ifdef STDC_HEADERS +# include +# include +# include +# include +#endif + #include -#include -#include -#include -#include #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ diff --git a/test/iopipe.c b/test/iopipe.c index bac63e1..6cdbd2b 100644 --- a/test/iopipe.c +++ b/test/iopipe.c @@ -5,25 +5,43 @@ * Programmer: Robb Matzke * Thursday, March 12, 1998 */ + +/* See H5private.h for how to include headers */ #undef NDEBUG -#include -#include -#include -#include -#include -#include -#include +#include +#ifdef STDC_HEADERS +# include +# include +# include +# include +# include +#endif -#if defined(WIN32) -#include -#include +#ifdef HAVE_UNISTD_H +# include +# include +#endif + +#if defined(TIME_WITH_SYS_TIME) +# include +# include +#elif defined(HAVE_SYS_TIME_H) +# include #else -#include -#include -#include +# include +#endif + +#ifdef HAVE_SYS_RESOURCE_H +# include #endif +#ifdef HAVE_WINSOCK_H +#include +#endif + +#include + #define RAW_FILE_NAME "iopipe.raw" #define HDF5_FILE_NAME "iopipe.h5" #define HEADING "%-16s" @@ -148,20 +166,16 @@ synchronize (void) int main (void) { -#if defined(WIN32) - static hssize_t size[2] = {REQUEST_SIZE_X, REQUEST_SIZE_Y}; -#else static hsize_t size[2] = {REQUEST_SIZE_X, REQUEST_SIZE_Y}; -#endif static int nread=NREAD_REQUESTS, nwrite=NWRITE_REQUESTS; unsigned char *the_data = NULL; hid_t file, dset, file_space=-1; herr_t status; -#if !defined(WIN32) +#ifdef HAVE_GETRUSAGE struct rusage r_start, r_stop; #else - struct timeval r_start, r_stop; + struct timeval r_start, r_stop; #endif struct timeval t_start, t_stop; int i, fd; @@ -194,7 +208,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #endif fprintf (stderr, HEADING, "fill raw"); @@ -206,7 +220,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #endif putc ('\n', stderr); @@ -220,7 +234,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #endif fprintf (stderr, HEADING, "fill hdf5"); @@ -234,7 +248,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #endif putc ('\n', stderr); @@ -247,7 +261,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #endif fprintf (stderr, HEADING, "out raw"); @@ -262,7 +276,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #endif putc ('\n', stderr); @@ -275,7 +289,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #endif fprintf (stderr, HEADING, "out hdf5"); @@ -289,7 +303,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #endif putc ('\n', stderr); @@ -302,7 +316,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #endif fprintf (stderr, HEADING, "in raw"); @@ -317,7 +331,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #endif putc ('\n', stderr); @@ -331,7 +345,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #endif fprintf (stderr, HEADING, "in hdf5"); @@ -345,7 +359,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #endif putc ('\n', stderr); @@ -363,7 +377,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_start); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_start, NULL); #endif fprintf (stderr, HEADING, "in hdf5 partial"); @@ -377,7 +391,7 @@ main (void) #ifdef HAVE_GETRUSAGE getrusage (RUSAGE_SELF, &r_stop); #endif -#if !defined(WIN32) +#ifdef HAVE_GETTIMEOFDAY gettimeofday (&t_stop, NULL); #endif putc ('\n', stderr); diff --git a/test/links.c b/test/links.c index 5dc9d89..f824a7b 100644 --- a/test/links.c +++ b/test/links.c @@ -7,11 +7,18 @@ * * Purpose: Tests hard and soft (symbolic) links. */ -#include -#include -#include +/* See H5private.h for how to include headers */ +#undef NDEBUG #include + +#ifdef STDC_HEADERS +# include +# include +#endif + +#include + #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ @@ -20,10 +27,6 @@ # define __unused__ __attribute__((unused)) #endif -#if defined(WIN32) -#undef __unused__ -#define __unused__ -#endif #define TEST_FILE_NAME "links.h5" #define FALSE 0 diff --git a/test/mount.c b/test/mount.c index b6231a8..5eb0d49 100644 --- a/test/mount.c +++ b/test/mount.c @@ -7,8 +7,16 @@ * * Purpose: Tests file mounting. */ + +/* See H5private.h for how to include headers */ +#undef NDEBUG +#include + +#ifdef STDC_HEADERS +# include +#endif + #include -#include #define FALSE 0 #define TRUE 1 @@ -17,7 +25,6 @@ #define FILE_NAME_2 "mount_2.h5" #define FILE_NAME_3 "mount_3.h5" -#include #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ @@ -26,11 +33,6 @@ # define __unused__ __attribute__((unused)) #endif -#if defined(WIN32) -#undef __unused__ -#define __unused__ -#endif - /*------------------------------------------------------------------------- * Function: cleanup diff --git a/test/mtime.c b/test/mtime.c index 2a5e797..0c019a6 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -10,19 +10,30 @@ * very OS-dependent and this test tries to figure out if it's * working properly. */ -#include -#include -#include -#if !defined(WIN32) -#include + +/* See H5private.h for how to include headers */ +#undef NDEBUG +#include + +#ifdef STDC_HEADERS +# include +# include +#endif + +#if defined(TIME_WITH_SYS_TIME) +# include +# include +#elif defined(HAVE_SYS_TIME_H) +# include +#else +# include #endif -#include -#define FALSE 0 -#define TRUE 1 +#include +#include /*for HDdifftime()*/ + #define FILE_NAME_1 "mtime.h5" -#include #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ @@ -30,10 +41,7 @@ #else # define __unused__ __attribute__((unused)) #endif -#if defined(WIN32) -#undef __unused__ -#define __unused__ -#endif + /*------------------------------------------------------------------------- * Function: display_error_cb diff --git a/test/overhead.c b/test/overhead.c index 4fdc6d3..d95fed4 100644 --- a/test/overhead.c +++ b/test/overhead.c @@ -7,14 +7,25 @@ * * Purpose: Creates a chunked dataset and measures the storage overhead. */ -#include -#include -#include -#include -#include -#include +/* See H5private.h for how to include headers */ +#undef NDEBUG #include + +#ifdef STDC_HEADERS +# include +# include +# include +# include +#endif + +#ifdef HAVE_UNISTD_H +# include +# include +#endif + +#include + #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ diff --git a/test/ragged.c b/test/ragged.c index 903a32e..fa1f8b0 100644 --- a/test/ragged.c +++ b/test/ragged.c @@ -5,10 +5,18 @@ * Programmer: Robb Matzke * Tuesday, August 25, 1998 */ -#include + +/* See H5private.h for how to include headers */ +#undef NDEBUG +#include + +#ifdef STDC_HEADERS +# include +# include +# include +#endif + #include -#include -#include #include /*for performance monitoring*/ @@ -196,11 +204,7 @@ ragged_write_all(hid_t ra, hsize_t rows_at_once) hssize_t row; /*current row number */ hsize_t i; /*counter */ hsize_t max_width = quant_g[NELMTS(quant_g)-1].hi; -#if !defined(WIN32) hsize_t interval_nelmts; /*elmts/interval timer */ -#else - hssize_t interval_nelmts; /*elmts/interval timer */ -#endif hsize_t *size=NULL; /*size of each row */ void **buf=NULL; /*buffer for each row */ H5_timer_t timer, timer_total; /*performance timers */ @@ -302,11 +306,7 @@ ragged_read_all(hid_t ra, hsize_t rows_at_once) int total_nelmts=0; hsize_t i, j; /*counters */ hssize_t row; /*current row number */ -#if !defined(WIN32) hsize_t interval_nelmts; /*elmts/interval timer */ -#else - hssize_t interval_nelmts; /*elmts/interval timer */ -#endif hsize_t *size=NULL; /*size of each row */ C_MTYPE **buf=NULL; /*buffer for each row */ H5_timer_t timer, timer_total; /*performance timers */ @@ -437,14 +437,8 @@ ragged_read_short(hid_t ra, hsize_t rows_at_once, hsize_t width) int total_nelmts=0; hsize_t i, j; hssize_t row; /*current row number */ -#if !defined(WIN32) hsize_t interval_nelmts; /*elmts/interval timer */ - hsize_t read_nelmts=0; /*total elements read */ -#else - hssize_t read_nelmts=0; /*total elements read */ - hssize_t interval_nelmts; /*elmts/interval timer */ -#endif - + hsize_t read_nelmts=0; /*total elements read */ hsize_t *size=NULL; /*size of each row */ C_MTYPE **buf=NULL; /*buffer for each row */ H5_timer_t timer, timer_total; /*performance timers */ diff --git a/test/shtype.c b/test/shtype.c index 80eccc0..7b05ed2 100644 --- a/test/shtype.c +++ b/test/shtype.c @@ -7,11 +7,18 @@ * * Purpose: Tests datasets with shared data types. */ -#include -#include -#include +/* See H5private.h for how to include headers */ +#undef NDEBUG #include + +#ifdef STDC_HEADERS +# include +# include +#endif + +#include + #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ @@ -20,11 +27,6 @@ # define __unused__ __attribute__((unused)) #endif -#if defined(WIN32) -#undef __unused__ -#define __unused__ -#endif - #define TEST_FILE_NAME0 "shtype0.h5" #define TEST_FILE_NAME1 "shtype1.h5" #define TEST_FILE_NAME2A "shtype2a.h5" diff --git a/test/testhdf5.h b/test/testhdf5.h index 16df4e5..3aafe88 100644 --- a/test/testhdf5.h +++ b/test/testhdf5.h @@ -113,18 +113,6 @@ extern int Verbosity; #define TEST_STR "Test" #define CLEAN_STR "Cleanup" -/* System command to use for Cleanup */ -#ifdef VMS -#define CLEAN_CMD "delete *.hdf;*" -#else -# ifdef WIN32 -# define CLEAN_CMD "del *.hdf" -# else -/* default is Unix */ -# define CLEAN_CMD "rm -f *.hdf" -# endif /* WIN32 */ -#endif /*VMS */ - /* Prototypes for the support routines */ int print_func(const char *,...); diff --git a/test/unlink.c b/test/unlink.c index c4e6d2c..0f63274 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -7,10 +7,17 @@ * * Purpose: Test H5Gunlink(). */ -#include -#include +/* See H5private.h for how to include headers */ +#undef NDEBUG #include + +#ifdef STDC_HEADERS +# include +#endif + +#include + #ifndef HAVE_ATTRIBUTE # undef __attribute__ # define __attribute__(X) /*void*/ @@ -18,15 +25,10 @@ #else # define __unused__ __attribute__((unused)) #endif -#if defined(WIN32) -#undef __unused__ -#define __unused__ -#endif #define FILE_NAME_1 "unlink.h5" #define THE_OBJECT "/foo" - /*------------------------------------------------------------------------- * Function: cleanup diff --git a/tools/h5tools.c b/tools/h5tools.c index ced4e48..d3c9615 100644 --- a/tools/h5tools.c +++ b/tools/h5tools.c @@ -53,7 +53,7 @@ h5dump_prefix(char *s/*out*/, const h5dump_t *info, hsize_t elmtno, int ndims, hsize_t min_idx[], hsize_t max_idx[]) { hsize_t p_prod[H5S_MAX_RANK], p_idx[H5S_MAX_RANK]; - hsize_t n, i; + hsize_t n, i=0; char temp[1024]; if (ndims>0) { -- cgit v0.12