From 28e684b0af6f181b2a1acc662d6ed2cc67ca97fb Mon Sep 17 00:00:00 2001 From: Robb Matzke Date: Mon, 14 Dec 1998 11:19:21 -0500 Subject: [svn-r968] Changes since 19981207 ---------------------- ./MANIFEST Added tcompound2.{dmp,h5} and tdset2.{dmp,h5} used by the h5toh4 testing. ./configure.in ./configure [REGENERATED] ./src/H5config.h.in [REGENERATED] Added check for for Win32. Determines sizeof(char) just so we have a complete list of type sizes defined as preprocessor symbols. ./src/H5detect.c ./src/H5T.c ./src/H5Tpkg.h Detects alignment constraints. In order for this to work the operating system must not correct unaligned data (for instance, on the DEC Alpha one might need to say `uac p sigbus' before running H5detect). ./src/H5private.h Includes because it's needed by H5detect.c to detect alignment constraints. ./src/H5Tconv.c Added extra checks to all hardware conversion functions so they align data when necessary before the conversion. This slows down the conversions somewhat but they're still much faster than the software conversions. ./test/dtypes.c By setting a constant at the top of the source you can test conversions where the data is aligned on various byte boundaries. By setting a constant at the top of the source you can simulate architectures that have alignment constraints on architectures that don't. Changed typo SIZEOF_LDOUBLE to SIZEOF_LONG_DOUBLE in a few places. --- MANIFEST | 4 + README | 2 +- configure | 422 +++++++++------- configure.in | 8 +- src/.distdep | 418 ++++++++-------- src/H5T.c | 140 +++--- src/H5Tconv.c | 1421 ++++++++++++++++++++++++++--------------------------- src/H5Tpkg.h | 20 + src/H5config.h.in | 6 + src/H5detect.c | 167 +++---- src/H5private.h | 1 + test/.distdep | 427 ++++++++-------- test/dtypes.c | 650 ++++++++++++++++-------- 13 files changed, 1957 insertions(+), 1729 deletions(-) diff --git a/MANIFEST b/MANIFEST index 29db282..bd9db7d 100644 --- a/MANIFEST +++ b/MANIFEST @@ -386,12 +386,16 @@ ./tools/testfiles/tcomp-4.ddl ./tools/testfiles/tcompound.dmp ./tools/testfiles/tcompound.h5 +./tools/testfiles/tcompound2.dmp +./tools/testfiles/tcompound2.h5 ./tools/testfiles/tdset-1.ddl ./tools/testfiles/tdset-2.ddl ./tools/testfiles/tdset-3.ddl ./tools/testfiles/tdset-4.ddl ./tools/testfiles/tdset.dmp ./tools/testfiles/tdset.h5 +./tools/testfiles/tdset2.dmp +./tools/testfiles/tdset2.h5 ./tools/testfiles/tgroup-1.ddl ./tools/testfiles/tgroup-2.ddl ./tools/testfiles/tgroup-3.ddl diff --git a/README b/README index a593ceb..a2618d6 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This is hdf5-1.1.33 released on Thu Nov 26 04:22:25 CST 1998 +This is hdf5-1.1.35 released on Fri Dec 11 12:56:16 CST 1998 Please refer to the INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/configure b/configure index 02f7805..edb4d5c 100755 --- a/configure +++ b/configure @@ -1377,7 +1377,7 @@ EOF fi -for ac_hdr in io.h sys/resource.h sys/time.h unistd.h winsock.h +for ac_hdr in sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -1417,7 +1417,7 @@ else fi done -for ac_hdr in sys/ioctl.h sys/stat.h +for ac_hdr in io.h winsock.h sys/timeb.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 @@ -1458,13 +1458,14 @@ fi done + echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:1463: checking for off_t" >&5 +echo "configure:1464: 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 @@ -1492,12 +1493,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:1496: checking for size_t" >&5 +echo "configure:1497: 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 @@ -1525,12 +1526,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:1529: checking for ssize_t" >&5 +echo "configure:1530: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1558,14 +1559,14 @@ EOF fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:1562: checking whether byte ordering is bigendian" >&5 +echo "configure:1563: 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 @@ -1576,11 +1577,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1581: \"$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 @@ -1591,7 +1592,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:1595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1611,7 +1612,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:1629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -1647,8 +1648,47 @@ EOF fi +echo $ac_n "checking size of char""... $ac_c" 1>&6 +echo "configure:1653: checking size of char" >&5 +if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_sizeof_char=1 +else + cat > conftest.$ac_ext < +main() +{ + FILE *f=fopen("conftestval", "w"); + if (!f) exit(1); + fprintf(f, "%d\n", sizeof(char)); + exit(0); +} +EOF +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_char=`cat conftestval` +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_sizeof_char=0 +fi +rm -fr conftest* +fi + +fi +echo "$ac_t""$ac_cv_sizeof_char" 1>&6 +cat >> confdefs.h <&6 -echo "configure:1652: checking size of short" >&5 +echo "configure:1692: 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 @@ -1656,7 +1696,7 @@ else ac_cv_sizeof_short=2 else cat > conftest.$ac_ext < main() @@ -1667,7 +1707,7 @@ main() exit(0); } EOF -if { (eval echo configure:1671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +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_short=`cat conftestval` else @@ -1687,7 +1727,7 @@ EOF echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1691: checking size of int" >&5 +echo "configure:1731: 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 @@ -1695,7 +1735,7 @@ else ac_cv_sizeof_int=4 else cat > conftest.$ac_ext < main() @@ -1706,7 +1746,7 @@ main() exit(0); } EOF -if { (eval echo configure:1710: \"$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_int=`cat conftestval` else @@ -1726,7 +1766,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1730: checking size of long" >&5 +echo "configure:1770: 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 @@ -1734,7 +1774,7 @@ else ac_cv_sizeof_long=4 else cat > conftest.$ac_ext < main() @@ -1745,7 +1785,7 @@ main() exit(0); } EOF -if { (eval echo configure:1749: \"$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_long=`cat conftestval` else @@ -1765,7 +1805,7 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:1769: checking size of long long" >&5 +echo "configure:1809: 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 @@ -1773,7 +1813,7 @@ else ac_cv_sizeof_long_long=8 else cat > conftest.$ac_ext < main() @@ -1784,7 +1824,7 @@ main() exit(0); } EOF -if { (eval echo configure:1788: \"$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_long=`cat conftestval` else @@ -1804,7 +1844,7 @@ EOF echo $ac_n "checking size of __int64""... $ac_c" 1>&6 -echo "configure:1808: checking size of __int64" >&5 +echo "configure:1848: 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 @@ -1812,7 +1852,7 @@ else ac_cv_sizeof___int64=8 else cat > conftest.$ac_ext < main() @@ -1823,7 +1863,7 @@ main() exit(0); } EOF -if { (eval echo configure:1827: \"$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___int64=`cat conftestval` else @@ -1843,7 +1883,7 @@ EOF echo $ac_n "checking size of float""... $ac_c" 1>&6 -echo "configure:1847: checking size of float" >&5 +echo "configure:1887: 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 @@ -1851,7 +1891,7 @@ else ac_cv_sizeof_float=4 else cat > conftest.$ac_ext < main() @@ -1862,7 +1902,7 @@ main() exit(0); } EOF -if { (eval echo configure:1866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1906: \"$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 @@ -1882,7 +1922,7 @@ EOF echo $ac_n "checking size of double""... $ac_c" 1>&6 -echo "configure:1886: checking size of double" >&5 +echo "configure:1926: 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 @@ -1890,7 +1930,7 @@ else ac_cv_sizeof_double=8 else cat > conftest.$ac_ext < main() @@ -1901,7 +1941,7 @@ main() exit(0); } EOF -if { (eval echo configure:1905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1945: \"$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 @@ -1921,7 +1961,7 @@ EOF echo $ac_n "checking size of long double""... $ac_c" 1>&6 -echo "configure:1925: checking size of long double" >&5 +echo "configure:1965: 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 @@ -1929,7 +1969,7 @@ else ac_cv_sizeof_long_double=8 else cat > conftest.$ac_ext < main() @@ -1940,7 +1980,7 @@ main() exit(0); } EOF -if { (eval echo configure:1944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1984: \"$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 @@ -1964,7 +2004,7 @@ cat >>confdefs.h <<\EOF #include EOF echo $ac_n "checking size of int8_t""... $ac_c" 1>&6 -echo "configure:1968: checking size of int8_t" >&5 +echo "configure:2008: checking size of int8_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int8_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1972,7 +2012,7 @@ else ac_cv_sizeof_int8_t=1 else cat > conftest.$ac_ext < main() @@ -1983,7 +2023,7 @@ main() exit(0); } EOF -if { (eval echo configure:1987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int8_t=`cat conftestval` else @@ -2003,7 +2043,7 @@ EOF echo $ac_n "checking size of uint8_t""... $ac_c" 1>&6 -echo "configure:2007: checking size of uint8_t" >&5 +echo "configure:2047: checking size of uint8_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_uint8_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2011,7 +2051,7 @@ else ac_cv_sizeof_uint8_t=1 else cat > conftest.$ac_ext < main() @@ -2022,7 +2062,7 @@ main() exit(0); } EOF -if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_uint8_t=`cat conftestval` else @@ -2042,7 +2082,7 @@ EOF echo $ac_n "checking size of int16_t""... $ac_c" 1>&6 -echo "configure:2046: checking size of int16_t" >&5 +echo "configure:2086: checking size of int16_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2050,7 +2090,7 @@ else ac_cv_sizeof_int16_t=2 else cat > conftest.$ac_ext < main() @@ -2061,7 +2101,7 @@ main() exit(0); } EOF -if { (eval echo configure:2065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int16_t=`cat conftestval` else @@ -2081,7 +2121,7 @@ EOF echo $ac_n "checking size of uint16_t""... $ac_c" 1>&6 -echo "configure:2085: checking size of uint16_t" >&5 +echo "configure:2125: checking size of uint16_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_uint16_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2089,7 +2129,7 @@ else ac_cv_sizeof_uint16_t=2 else cat > conftest.$ac_ext < main() @@ -2100,7 +2140,7 @@ main() exit(0); } EOF -if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_uint16_t=`cat conftestval` else @@ -2120,7 +2160,7 @@ EOF echo $ac_n "checking size of int32_t""... $ac_c" 1>&6 -echo "configure:2124: checking size of int32_t" >&5 +echo "configure:2164: checking size of int32_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2128,7 +2168,7 @@ else ac_cv_sizeof_int32_t=4 else cat > conftest.$ac_ext < main() @@ -2139,7 +2179,7 @@ main() exit(0); } EOF -if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int32_t=`cat conftestval` else @@ -2159,7 +2199,7 @@ EOF echo $ac_n "checking size of uint32_t""... $ac_c" 1>&6 -echo "configure:2163: checking size of uint32_t" >&5 +echo "configure:2203: checking size of uint32_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_uint32_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2167,7 +2207,7 @@ else ac_cv_sizeof_uint32_t=4 else cat > conftest.$ac_ext < main() @@ -2178,7 +2218,7 @@ main() exit(0); } EOF -if { (eval echo configure:2182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_uint32_t=`cat conftestval` else @@ -2198,7 +2238,7 @@ EOF echo $ac_n "checking size of int64_t""... $ac_c" 1>&6 -echo "configure:2202: checking size of int64_t" >&5 +echo "configure:2242: checking size of int64_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2206,7 +2246,7 @@ else ac_cv_sizeof_int64_t=8 else cat > conftest.$ac_ext < main() @@ -2217,7 +2257,7 @@ main() exit(0); } EOF -if { (eval echo configure:2221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int64_t=`cat conftestval` else @@ -2237,7 +2277,7 @@ EOF echo $ac_n "checking size of uint64_t""... $ac_c" 1>&6 -echo "configure:2241: checking size of uint64_t" >&5 +echo "configure:2281: checking size of uint64_t" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_uint64_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2245,7 +2285,7 @@ else ac_cv_sizeof_uint64_t=8 else cat > conftest.$ac_ext < main() @@ -2256,7 +2296,7 @@ main() exit(0); } EOF -if { (eval echo configure:2260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_uint64_t=`cat conftestval` else @@ -2277,7 +2317,7 @@ EOF echo $ac_n "checking size of size_t""... $ac_c" 1>&6 -echo "configure:2281: checking size of size_t" >&5 +echo "configure:2321: 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 @@ -2285,7 +2325,7 @@ else ac_cv_sizeof_size_t=4 else cat > conftest.$ac_ext < main() @@ -2296,7 +2336,7 @@ main() exit(0); } EOF -if { (eval echo configure:2300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2340: \"$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 @@ -2319,7 +2359,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:2323: checking size of off_t" >&5 +echo "configure:2363: 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 @@ -2327,7 +2367,7 @@ else ac_cv_sizeof_off_t=4 else cat > conftest.$ac_ext < main() @@ -2338,7 +2378,7 @@ main() exit(0); } EOF -if { (eval echo configure:2342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2382: \"$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 @@ -2365,7 +2405,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:2369: checking for sizeof hsize_t and hssize_t" >&5 +echo "configure:2409: checking for sizeof hsize_t and hssize_t" >&5 case $HSIZET in no|small) echo "$ac_t""small" 1>&6 @@ -2394,17 +2434,17 @@ case $withval in do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2398: checking for $ac_hdr" >&5 +echo "configure:2438: 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:2408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2431,7 +2471,7 @@ fi done echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:2435: checking for compress in -lz" >&5 +echo "configure:2475: checking for compress in -lz" >&5 ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2439,7 +2479,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2494: \"$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 @@ -2480,7 +2520,7 @@ fi ;; no) echo $ac_n "checking for GNU zlib""... $ac_c" 1>&6 -echo "configure:2484: checking for GNU zlib" >&5 +echo "configure:2524: checking for GNU zlib" >&5 echo "$ac_t""suppressed" 1>&6 ;; *) @@ -2492,17 +2532,17 @@ echo "configure:2484: checking for GNU zlib" >&5 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2496: checking for $ac_hdr" >&5 +echo "configure:2536: 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:2506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2534,17 +2574,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2538: checking for $ac_hdr" >&5 +echo "configure:2578: 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:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2577,7 +2617,7 @@ done saved_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$zlib_lib" echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:2581: checking for compress in -lz" >&5 +echo "configure:2621: checking for compress in -lz" >&5 ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2585,7 +2625,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2640: \"$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 @@ -2626,7 +2666,7 @@ fi else echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6 -echo "configure:2630: checking for compress in -lz" >&5 +echo "configure:2670: checking for compress in -lz" >&5 ac_lib_var=`echo z'_'compress | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2634,7 +2674,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2689: \"$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 @@ -2695,17 +2735,17 @@ case $withval in do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2699: checking for $ac_hdr" >&5 +echo "configure:2739: 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:2709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2733,7 +2773,7 @@ fi done echo $ac_n "checking for main in -ldf""... $ac_c" 1>&6 -echo "configure:2737: checking for main in -ldf" >&5 +echo "configure:2777: checking for main in -ldf" >&5 ac_lib_var=`echo df'_'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 @@ -2741,14 +2781,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ldf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2792: \"$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 @@ -2777,7 +2817,7 @@ unset H5TOH4 TESTH5TOH4 fi echo $ac_n "checking for main in -lmfhdf""... $ac_c" 1>&6 -echo "configure:2781: checking for main in -lmfhdf" >&5 +echo "configure:2821: checking for main in -lmfhdf" >&5 ac_lib_var=`echo mfhdf'_'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 @@ -2785,14 +2825,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lmfhdf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2836: \"$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 @@ -2823,7 +2863,7 @@ fi ;; no) echo $ac_n "checking for HDF4""... $ac_c" 1>&6 -echo "configure:2827: checking for HDF4" >&5 +echo "configure:2867: checking for HDF4" >&5 echo "$ac_t""suppressed" 1>&6 unset H5TOH4 TESTH5TOH4 ;; @@ -2836,17 +2876,17 @@ echo "configure:2827: checking for HDF4" >&5 do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2840: checking for $ac_hdr" >&5 +echo "configure:2880: 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:2850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2880,17 +2920,17 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2884: checking for $ac_hdr" >&5 +echo "configure:2924: 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:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2923,7 +2963,7 @@ done saved_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$hdf4_lib" echo $ac_n "checking for main in -ldf""... $ac_c" 1>&6 -echo "configure:2927: checking for main in -ldf" >&5 +echo "configure:2967: checking for main in -ldf" >&5 ac_lib_var=`echo df'_'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 @@ -2931,14 +2971,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ldf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2982: \"$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 @@ -2967,7 +3007,7 @@ unset H5TOH4 TESTH5TOH4 fi echo $ac_n "checking for main in -lmfhdf""... $ac_c" 1>&6 -echo "configure:2971: checking for main in -lmfhdf" >&5 +echo "configure:3011: checking for main in -lmfhdf" >&5 ac_lib_var=`echo mfhdf'_'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 @@ -2975,14 +3015,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lmfhdf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3026: \"$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 @@ -3012,7 +3052,7 @@ fi else echo $ac_n "checking for main in -ldf""... $ac_c" 1>&6 -echo "configure:3016: checking for main in -ldf" >&5 +echo "configure:3056: checking for main in -ldf" >&5 ac_lib_var=`echo df'_'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 @@ -3020,14 +3060,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ldf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3071: \"$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 @@ -3055,7 +3095,7 @@ else fi echo $ac_n "checking for main in -lmfhdf""... $ac_c" 1>&6 -echo "configure:3059: checking for main in -lmfhdf" >&5 +echo "configure:3099: checking for main in -lmfhdf" >&5 ac_lib_var=`echo mfhdf'_'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 @@ -3063,14 +3103,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lmfhdf $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3114: \"$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 @@ -3104,9 +3144,9 @@ esac echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6 -echo "configure:3108: checking for tm_gmtoff in struct tm" >&5 +echo "configure:3148: checking for tm_gmtoff in struct tm" >&5 cat > conftest.$ac_ext < @@ -3115,7 +3155,7 @@ int main() { struct tm tm; tm.tm_gmtoff=0; ; return 0; } EOF -if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TM_GMTOFF 1 @@ -3131,9 +3171,9 @@ fi rm -f conftest* echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6 -echo "configure:3135: checking for global timezone variable" >&5 +echo "configure:3175: checking for global timezone variable" >&5 cat > conftest.$ac_ext < @@ -3142,7 +3182,7 @@ int main() { timezone=0; ; return 0; } EOF -if { (eval echo configure:3146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIMEZONE 1 @@ -3158,12 +3198,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:3162: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:3202: 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 @@ -3171,7 +3211,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:3175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -3192,12 +3232,12 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:3196: checking for tm_zone in struct tm" >&5 +echo "configure:3236: 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> @@ -3205,7 +3245,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:3209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -3225,12 +3265,12 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:3229: checking for tzname" >&5 +echo "configure:3269: 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. */ @@ -3240,7 +3280,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -3262,9 +3302,9 @@ EOF fi echo $ac_n "checking for struct timezone""... $ac_c" 1>&6 -echo "configure:3266: checking for struct timezone" >&5 +echo "configure:3306: checking for struct timezone" >&5 cat > conftest.$ac_ext < @@ -3274,7 +3314,7 @@ int main() { struct timezone tz; tz.tz_minuteswest=0; ; return 0; } EOF -if { (eval echo configure:3278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STRUCT_TIMEZONE 1 @@ -3290,9 +3330,9 @@ fi rm -f conftest* echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6 -echo "configure:3294: checking for st_blocks in struct stat" >&5 +echo "configure:3334: checking for st_blocks in struct stat" >&5 cat > conftest.$ac_ext < @@ -3300,7 +3340,7 @@ int main() { struct stat sb; sb.st_blocks=0; ; return 0; } EOF -if { (eval echo configure:3304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STAT_ST_BLOCKS 1 @@ -3318,12 +3358,12 @@ rm -f conftest* for ac_func in _getvideoconfig gettextinfo GetConsoleScreenBufferInfo do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3322: checking for $ac_func" >&5 +echo "configure:3362: 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:3390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3373,12 +3413,12 @@ done for ac_func in _scrsize ioctl compress2 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3377: checking for $ac_func" >&5 +echo "configure:3417: 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:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3427,16 +3467,16 @@ done echo $ac_n "checking for struct videoconfig""... $ac_c" 1>&6 -echo "configure:3431: checking for struct videoconfig" >&5 +echo "configure:3471: checking for struct videoconfig" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STRUCT_VIDEOCONFIG 1 @@ -3452,16 +3492,16 @@ fi rm -f conftest* echo $ac_n "checking for struct text_info""... $ac_c" 1>&6 -echo "configure:3456: checking for struct text_info" >&5 +echo "configure:3496: checking for struct text_info" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_STRUCT_TEXT_INFO 1 @@ -3477,16 +3517,16 @@ fi rm -f conftest* echo $ac_n "checking for TIOCGWINSZ""... $ac_c" 1>&6 -echo "configure:3481: checking for TIOCGWINSZ" >&5 +echo "configure:3521: checking for TIOCGWINSZ" >&5 cat > conftest.$ac_ext < int main() { int w=TIOCGWINSZ; ; return 0; } EOF -if { (eval echo configure:3490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIOCGWINSZ 1 @@ -3502,16 +3542,16 @@ fi rm -f conftest* echo $ac_n "checking for TIOCGGETD""... $ac_c" 1>&6 -echo "configure:3506: checking for TIOCGGETD" >&5 +echo "configure:3546: checking for TIOCGGETD" >&5 cat > conftest.$ac_ext < int main() { int w=TIOCGETD; ; return 0; } EOF -if { (eval echo configure:3515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TIOCGETD 1 @@ -3530,12 +3570,12 @@ 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:3534: checking for $ac_func" >&5 +echo "configure:3574: 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:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3585,12 +3625,12 @@ done for ac_func in gettimeofday BSDgettimeofday difftime sigaction snprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3589: checking for $ac_func" >&5 +echo "configure:3629: 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:3657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3639,24 +3679,24 @@ done cat > conftest.$ac_ext < int main() { off64_t n = 0; ; return 0; } EOF -if { (eval echo configure:3650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3690: \"$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:3655: checking for $ac_func" >&5 +echo "configure:3695: 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:3723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3714,12 +3754,12 @@ rm -f conftest* echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:3718: checking for working const" >&5 +echo "configure:3758: 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:3812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3789,21 +3829,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3793: checking for inline" >&5 +echo "configure:3833: 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:3847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3830,16 +3870,16 @@ esac echo $ac_n "checking for __attribute__ extension""... $ac_c" 1>&6 -echo "configure:3834: checking for __attribute__ extension" >&5 +echo "configure:3874: checking for __attribute__ extension" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_ATTRIBUTE 1 @@ -3855,16 +3895,16 @@ fi rm -f conftest* echo $ac_n "checking for __FUNCTION__ extension""... $ac_c" 1>&6 -echo "configure:3859: checking for __FUNCTION__ extension" >&5 +echo "configure:3899: checking for __FUNCTION__ extension" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_FUNCTION 1 @@ -3880,7 +3920,7 @@ fi rm -f conftest* echo $ac_n "checking how to print long long""... $ac_c" 1>&6 -echo "configure:3884: checking how to print long long" >&5 +echo "configure:3924: 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 @@ -3889,7 +3929,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -3900,7 +3940,7 @@ else sprintf(s,"%${hdf5_cv_printf_ll}d",x); exit (strcmp(s,"1099511627776"));} EOF -if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then break else @@ -3921,7 +3961,7 @@ EOF echo $ac_n "checking for debug flags""... $ac_c" 1>&6 -echo "configure:3925: checking for debug flags" >&5 +echo "configure:3965: checking for debug flags" >&5 # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" @@ -3953,7 +3993,7 @@ if test "X" != "X$DEBUG_PKG"; then fi echo $ac_n "checking for API tracing""... $ac_c" 1>&6 -echo "configure:3957: checking for API tracing" >&5; +echo "configure:3997: checking for API tracing" >&5; # Check whether --enable-trace or --disable-trace was given. if test "${enable_trace+set}" = set; then enableval="$enable_trace" @@ -3976,7 +4016,7 @@ if test "${enable_parallel+set}" = set; then fi echo $ac_n "checking for parallel support""... $ac_c" 1>&6 -echo "configure:3980: checking for parallel support" >&5; +echo "configure:4020: checking for parallel support" >&5; @@ -4003,7 +4043,7 @@ case "X-$PARALLEL" in EOF echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6 -echo "configure:4007: checking for main in -lmpi" >&5 +echo "configure:4047: 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 @@ -4011,14 +4051,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:4062: \"$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 @@ -4045,7 +4085,7 @@ else echo "$ac_t""no" 1>&6 fi echo $ac_n "checking for main in -lmpio""... $ac_c" 1>&6 -echo "configure:4049: checking for main in -lmpio" >&5 +echo "configure:4089: 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 @@ -4053,14 +4093,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:4104: \"$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 3a60f86..29141d4 100644 --- a/configure.in +++ b/configure.in @@ -134,8 +134,11 @@ dnl Check for system header files. dnl AC_HEADER_STDC AC_HEADER_TIME -AC_CHECK_HEADERS(io.h sys/resource.h sys/time.h unistd.h winsock.h) -AC_CHECK_HEADERS(sys/ioctl.h sys/stat.h) +dnl Unix +AC_CHECK_HEADERS(sys/resource.h sys/time.h unistd.h sys/ioctl.h sys/stat.h) +dnl Windows +AC_CHECK_HEADERS(io.h winsock.h sys/timeb.h) + dnl ---------------------------------------------------------------------- dnl Data types and their sizes. @@ -144,6 +147,7 @@ AC_TYPE_OFF_T AC_CHECK_TYPE(size_t, unsigned long) AC_CHECK_TYPE(ssize_t, long) AC_C_BIGENDIAN +AC_CHECK_SIZEOF(char, 1) AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) diff --git a/src/.distdep b/src/.distdep index 8d541b6..a039d32 100644 --- a/src/.distdep +++ b/src/.distdep @@ -1,3 +1,34 @@ +H5.o: \ + H5.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Iprivate.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Pprivate.h \ + H5Ppublic.h \ + H5Zpublic.h \ + H5Rpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h H5A.o: \ H5A.c \ H5private.h \ @@ -214,6 +245,32 @@ H5Flow.o: \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h +H5Fmpio.o: \ + H5Fmpio.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Dprivate.h \ + H5Dpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h H5Fsec2.o: \ H5Fsec2.c \ H5private.h \ @@ -366,6 +423,22 @@ H5Gstab.o: \ H5Sprivate.h \ H5Spublic.h \ H5Zprivate.h +H5HG.o: \ + H5HG.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5ACprivate.h \ + H5ACpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Ipublic.h \ + H5Dpublic.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5MFprivate.h H5HL.o: \ H5HL.c \ H5private.h \ @@ -613,6 +686,32 @@ H5Olayout.o: \ H5Zpublic.h \ H5Eprivate.h \ H5Epublic.h +H5Omtime.o: \ + H5Omtime.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h H5Oname.o: \ H5Oname.c \ H5private.h \ @@ -738,6 +837,58 @@ H5Ostab.o: \ H5Sprivate.h \ H5Spublic.h \ H5Zprivate.h +H5P.o: \ + H5P.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Dpublic.h \ + H5Dprivate.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h +H5R.o: \ + H5R.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Iprivate.h \ + H5Ipublic.h \ + H5Dprivate.h \ + H5Dpublic.h \ + H5Fprivate.h \ + H5Fpublic.h \ + H5Gprivate.h \ + H5Gpublic.h \ + H5Bprivate.h \ + H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ + H5HGprivate.h \ + H5HGpublic.h \ + H5Tprivate.h \ + H5Tpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Eprivate.h H5RA.o: \ H5RA.c \ H5RAprivate.h \ @@ -847,8 +998,8 @@ H5Shyper.o: \ H5Zprivate.h \ H5Zpublic.h \ H5Vprivate.h -H5Snone.o: \ - H5Snone.c \ +H5Smpio.o: \ + H5Smpio.c \ H5private.h \ H5public.h \ H5config.h \ @@ -867,22 +1018,15 @@ H5Snone.o: \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Vprivate.h -H5Spoint.o: \ - H5Spoint.c \ + H5HGpublic.h +H5Snone.o: \ + H5Snone.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ H5Sprivate.h \ H5Spublic.h \ H5Fprivate.h \ @@ -898,16 +1042,17 @@ H5Spoint.o: \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Zprivate.h -H5Sselect.o: \ - H5Sselect.c \ + H5Zprivate.h \ + H5Zpublic.h \ + H5Vprivate.h +H5Spoint.o: \ + H5Spoint.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5Iprivate.h \ H5MMprivate.h \ H5MMpublic.h \ H5Sprivate.h \ @@ -924,9 +1069,10 @@ H5Sselect.o: \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h -H5Tbit.o: \ - H5Tbit.c \ + H5Tpublic.h \ + H5Zprivate.h +H5Sselect.o: \ + H5Sselect.c \ H5private.h \ H5public.h \ H5config.h \ @@ -934,39 +1080,10 @@ H5Tbit.o: \ H5Epublic.h \ H5Ipublic.h \ H5Iprivate.h \ - H5Tpkg.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Rprivate.h \ - H5Rpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Gprivate.h \ - H5Gpublic.h -H5TB.o: \ - H5TB.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5Eprivate.h \ - H5Epublic.h \ H5MMprivate.h \ - H5MMpublic.h -H5V.o: \ - H5V.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5Ipublic.h \ - H5Oprivate.h \ - H5Opublic.h \ + H5MMpublic.h \ + H5Sprivate.h \ + H5Spublic.h \ H5Fprivate.h \ H5Fpublic.h \ H5Dpublic.h \ @@ -974,51 +1091,26 @@ H5V.o: \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ H5Tpublic.h -H5Z.o: \ - H5Z.c \ +H5T.o: \ + H5T.c \ H5private.h \ H5public.h \ H5config.h \ - H5Eprivate.h \ - H5Epublic.h \ + H5Dprivate.h \ + H5Dpublic.h \ H5Ipublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ H5Fprivate.h \ H5Fpublic.h \ - H5Dpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h -H5P.o: \ - H5P.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Iprivate.h \ - H5Ipublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Dprivate.h \ - H5Gprivate.h \ - H5Gpublic.h \ H5Oprivate.h \ H5Opublic.h \ H5HGprivate.h \ @@ -1029,19 +1121,23 @@ H5P.o: \ H5Spublic.h \ H5Zprivate.h \ H5Zpublic.h \ - H5Eprivate.h -H5Tconv.o: \ - H5Tconv.c \ H5Iprivate.h \ - H5Ipublic.h \ - H5public.h \ - H5config.h \ - H5private.h \ H5Eprivate.h \ H5Epublic.h \ H5MMprivate.h \ H5MMpublic.h \ H5Tpkg.h \ + H5Rprivate.h +H5Tbit.o: \ + H5Tbit.c \ + H5private.h \ + H5public.h \ + H5config.h \ + H5Eprivate.h \ + H5Epublic.h \ + H5Ipublic.h \ + H5Iprivate.h \ + H5Tpkg.h \ H5HGprivate.h \ H5HGpublic.h \ H5Fprivate.h \ @@ -1074,81 +1170,40 @@ H5Tinit.o: \ H5Rpublic.h \ H5Tprivate.h \ H5Tpublic.h -H5.o: \ - H5.c \ +H5TB.o: \ + H5TB.c \ H5private.h \ H5public.h \ H5config.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ + H5Iprivate.h \ H5Ipublic.h \ - H5Dpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ H5Eprivate.h \ H5Epublic.h \ - H5Iprivate.h \ H5MMprivate.h \ - H5MMpublic.h \ - H5Pprivate.h \ - H5Ppublic.h \ - H5Zpublic.h \ - H5Rpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h -H5Fmpio.o: \ - H5Fmpio.c \ + H5MMpublic.h +H5V.o: \ + H5V.c \ H5private.h \ H5public.h \ H5config.h \ H5Eprivate.h \ H5Epublic.h \ H5Ipublic.h \ - H5Dprivate.h \ - H5Dpublic.h \ + H5Oprivate.h \ + H5Opublic.h \ H5Fprivate.h \ H5Fpublic.h \ + H5Dpublic.h \ H5Gprivate.h \ H5Gpublic.h \ H5Bprivate.h \ H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ H5HGprivate.h \ H5HGpublic.h \ H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h -H5HG.o: \ - H5HG.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5ACprivate.h \ - H5ACpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Ipublic.h \ - H5Dpublic.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5MFprivate.h -H5Omtime.o: \ - H5Omtime.c \ + H5Tpublic.h +H5Z.o: \ + H5Z.c \ H5private.h \ H5public.h \ H5config.h \ @@ -1173,81 +1228,26 @@ H5Omtime.o: \ H5Sprivate.h \ H5Spublic.h \ H5Zprivate.h -H5R.o: \ - H5R.c \ - H5private.h \ - H5public.h \ - H5config.h \ +H5Tconv.o: \ + H5Tconv.c \ H5Iprivate.h \ H5Ipublic.h \ - H5Dprivate.h \ - H5Dpublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ - H5Tprivate.h \ - H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Eprivate.h -H5Smpio.o: \ - H5Smpio.c \ - H5private.h \ H5public.h \ H5config.h \ + H5private.h \ H5Eprivate.h \ H5Epublic.h \ - H5Ipublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Fprivate.h \ - H5Fpublic.h \ - H5Dpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ + H5MMprivate.h \ + H5MMpublic.h \ + H5Tpkg.h \ H5HGprivate.h \ - H5HGpublic.h -H5T.o: \ - H5T.c \ - H5private.h \ - H5public.h \ - H5config.h \ - H5Dprivate.h \ - H5Dpublic.h \ - H5Ipublic.h \ + H5HGpublic.h \ H5Fprivate.h \ H5Fpublic.h \ - H5Gprivate.h \ - H5Gpublic.h \ - H5Bprivate.h \ - H5Bpublic.h \ - H5Oprivate.h \ - H5Opublic.h \ - H5HGprivate.h \ - H5HGpublic.h \ + H5Dpublic.h \ + H5Rprivate.h \ + H5Rpublic.h \ H5Tprivate.h \ H5Tpublic.h \ - H5Sprivate.h \ - H5Spublic.h \ - H5Zprivate.h \ - H5Zpublic.h \ - H5Iprivate.h \ - H5Eprivate.h \ - H5Epublic.h \ - H5MMprivate.h \ - H5MMpublic.h \ - H5Tpkg.h \ - H5Rprivate.h + H5Gprivate.h \ + H5Gpublic.h diff --git a/src/H5T.c b/src/H5T.c index 0566b72..9d66733 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -29,69 +29,83 @@ static char RcsId[] = "@(#)$Revision$"; static intn interface_initialize_g = 0; #define INTERFACE_INIT H5T_init_interface -hid_t H5T_IEEE_F32BE_g = FAIL; -hid_t H5T_IEEE_F32LE_g = FAIL; -hid_t H5T_IEEE_F64BE_g = FAIL; -hid_t H5T_IEEE_F64LE_g = FAIL; - -hid_t H5T_STD_I8BE_g = FAIL; -hid_t H5T_STD_I8LE_g = FAIL; -hid_t H5T_STD_I16BE_g = FAIL; -hid_t H5T_STD_I16LE_g = FAIL; -hid_t H5T_STD_I32BE_g = FAIL; -hid_t H5T_STD_I32LE_g = FAIL; -hid_t H5T_STD_I64BE_g = FAIL; -hid_t H5T_STD_I64LE_g = FAIL; -hid_t H5T_STD_U8BE_g = FAIL; -hid_t H5T_STD_U8LE_g = FAIL; -hid_t H5T_STD_U16BE_g = FAIL; -hid_t H5T_STD_U16LE_g = FAIL; -hid_t H5T_STD_U32BE_g = FAIL; -hid_t H5T_STD_U32LE_g = FAIL; -hid_t H5T_STD_U64BE_g = FAIL; -hid_t H5T_STD_U64LE_g = FAIL; -hid_t H5T_STD_B8BE_g = FAIL; -hid_t H5T_STD_B8LE_g = FAIL; -hid_t H5T_STD_B16BE_g = FAIL; -hid_t H5T_STD_B16LE_g = FAIL; -hid_t H5T_STD_B32BE_g = FAIL; -hid_t H5T_STD_B32LE_g = FAIL; -hid_t H5T_STD_B64BE_g = FAIL; -hid_t H5T_STD_B64LE_g = FAIL; -hid_t H5T_STD_REF_OBJ_g = FAIL; -hid_t H5T_STD_REF_DSETREG_g = FAIL; - -hid_t H5T_UNIX_D32BE_g = FAIL; -hid_t H5T_UNIX_D32LE_g = FAIL; -hid_t H5T_UNIX_D64BE_g = FAIL; -hid_t H5T_UNIX_D64LE_g = FAIL; - -hid_t H5T_C_S1_g = FAIL; - -hid_t H5T_FORTRAN_S1_g = FAIL; - -hid_t H5T_NATIVE_SCHAR_g = FAIL; -hid_t H5T_NATIVE_UCHAR_g = FAIL; -hid_t H5T_NATIVE_SHORT_g = FAIL; -hid_t H5T_NATIVE_USHORT_g = FAIL; -hid_t H5T_NATIVE_INT_g = FAIL; -hid_t H5T_NATIVE_UINT_g = FAIL; -hid_t H5T_NATIVE_LONG_g = FAIL; -hid_t H5T_NATIVE_ULONG_g = FAIL; -hid_t H5T_NATIVE_LLONG_g = FAIL; -hid_t H5T_NATIVE_ULLONG_g = FAIL; -hid_t H5T_NATIVE_FLOAT_g = FAIL; -hid_t H5T_NATIVE_DOUBLE_g = FAIL; -hid_t H5T_NATIVE_LDOUBLE_g = FAIL; -hid_t H5T_NATIVE_B8_g = FAIL; -hid_t H5T_NATIVE_B16_g = FAIL; -hid_t H5T_NATIVE_B32_g = FAIL; -hid_t H5T_NATIVE_B64_g = FAIL; -hid_t H5T_NATIVE_OPAQUE_g = FAIL; -hid_t H5T_NATIVE_HSIZE_g = FAIL; -hid_t H5T_NATIVE_HSSIZE_g = FAIL; -hid_t H5T_NATIVE_HERR_g = FAIL; -hid_t H5T_NATIVE_HBOOL_g = FAIL; +hid_t H5T_IEEE_F32BE_g = FAIL; +hid_t H5T_IEEE_F32LE_g = FAIL; +hid_t H5T_IEEE_F64BE_g = FAIL; +hid_t H5T_IEEE_F64LE_g = FAIL; + +hid_t H5T_STD_I8BE_g = FAIL; +hid_t H5T_STD_I8LE_g = FAIL; +hid_t H5T_STD_I16BE_g = FAIL; +hid_t H5T_STD_I16LE_g = FAIL; +hid_t H5T_STD_I32BE_g = FAIL; +hid_t H5T_STD_I32LE_g = FAIL; +hid_t H5T_STD_I64BE_g = FAIL; +hid_t H5T_STD_I64LE_g = FAIL; +hid_t H5T_STD_U8BE_g = FAIL; +hid_t H5T_STD_U8LE_g = FAIL; +hid_t H5T_STD_U16BE_g = FAIL; +hid_t H5T_STD_U16LE_g = FAIL; +hid_t H5T_STD_U32BE_g = FAIL; +hid_t H5T_STD_U32LE_g = FAIL; +hid_t H5T_STD_U64BE_g = FAIL; +hid_t H5T_STD_U64LE_g = FAIL; +hid_t H5T_STD_B8BE_g = FAIL; +hid_t H5T_STD_B8LE_g = FAIL; +hid_t H5T_STD_B16BE_g = FAIL; +hid_t H5T_STD_B16LE_g = FAIL; +hid_t H5T_STD_B32BE_g = FAIL; +hid_t H5T_STD_B32LE_g = FAIL; +hid_t H5T_STD_B64BE_g = FAIL; +hid_t H5T_STD_B64LE_g = FAIL; +hid_t H5T_STD_REF_OBJ_g = FAIL; +hid_t H5T_STD_REF_DSETREG_g = FAIL; + +hid_t H5T_UNIX_D32BE_g = FAIL; +hid_t H5T_UNIX_D32LE_g = FAIL; +hid_t H5T_UNIX_D64BE_g = FAIL; +hid_t H5T_UNIX_D64LE_g = FAIL; + +hid_t H5T_C_S1_g = FAIL; + +hid_t H5T_FORTRAN_S1_g = FAIL; + +hid_t H5T_NATIVE_SCHAR_g = FAIL; +hid_t H5T_NATIVE_UCHAR_g = FAIL; +hid_t H5T_NATIVE_SHORT_g = FAIL; +hid_t H5T_NATIVE_USHORT_g = FAIL; +hid_t H5T_NATIVE_INT_g = FAIL; +hid_t H5T_NATIVE_UINT_g = FAIL; +hid_t H5T_NATIVE_LONG_g = FAIL; +hid_t H5T_NATIVE_ULONG_g = FAIL; +hid_t H5T_NATIVE_LLONG_g = FAIL; +hid_t H5T_NATIVE_ULLONG_g = FAIL; +hid_t H5T_NATIVE_FLOAT_g = FAIL; +hid_t H5T_NATIVE_DOUBLE_g = FAIL; +hid_t H5T_NATIVE_LDOUBLE_g = FAIL; +hid_t H5T_NATIVE_B8_g = FAIL; +hid_t H5T_NATIVE_B16_g = FAIL; +hid_t H5T_NATIVE_B32_g = FAIL; +hid_t H5T_NATIVE_B64_g = FAIL; +hid_t H5T_NATIVE_OPAQUE_g = FAIL; +hid_t H5T_NATIVE_HSIZE_g = FAIL; +hid_t H5T_NATIVE_HSSIZE_g = FAIL; +hid_t H5T_NATIVE_HERR_g = FAIL; +hid_t H5T_NATIVE_HBOOL_g = FAIL; + +size_t H5T_NATIVE_SCHAR_ALIGN_g = 0; +size_t H5T_NATIVE_UCHAR_ALIGN_g = 0; +size_t H5T_NATIVE_SHORT_ALIGN_g = 0; +size_t H5T_NATIVE_USHORT_ALIGN_g = 0; +size_t H5T_NATIVE_INT_ALIGN_g = 0; +size_t H5T_NATIVE_UINT_ALIGN_g = 0; +size_t H5T_NATIVE_LONG_ALIGN_g = 0; +size_t H5T_NATIVE_ULONG_ALIGN_g = 0; +size_t H5T_NATIVE_LLONG_ALIGN_g = 0; +size_t H5T_NATIVE_ULLONG_ALIGN_g = 0; +size_t H5T_NATIVE_FLOAT_ALIGN_g = 0; +size_t H5T_NATIVE_DOUBLE_ALIGN_g = 0; +size_t H5T_NATIVE_LDOUBLE_ALIGN_g = 0; /* The path database */ static intn H5T_npath_g = 0; /*num paths defined */ diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 1012a20..05187b9 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -1,13 +1,13 @@ /* * Copyright (C) 1998 Spizella Software - * All rights reserved. + * All rights reserved. * - * Programmer: Robb Matzke - * Tuesday, January 13, 1998 + * Programmer: Robb Matzke + * Tuesday, January 13, 1998 * - * Purpose: Data type conversions. + * Purpose: Data type conversions. */ -#define H5T_PACKAGE /*suppress error about including H5Tpkg */ +#define H5T_PACKAGE /*suppress error about including H5Tpkg */ #define PABLO_MASK H5T_conv_mask #include @@ -41,17 +41,17 @@ static intn interface_initialize_g = 0; * magnitude that cannot be represented by the destination type. * * Suffix Description - * ------ ----------- + * ------ ----------- * sS: Signed integers to signed integers where the destination is - * at least as wide as the source. This case cannot generate + * at least as wide as the source. This case cannot generate * overflows. * * sU: Signed integers to unsigned integers where the destination is - * at least as wide as the source. This case experiences + * at least as wide as the source. This case experiences * overflows when the source value is negative. * * uS: Unsigned integers to signed integers where the destination is - * at least as wide as the source. This case can experience + * at least as wide as the source. This case can experience * overflows when the source and destination are the same size. * * uU: Unsigned integers to unsigned integers where the destination @@ -101,8 +101,8 @@ static intn interface_initialize_g = 0; * * DT: The C name for the destination data type (e.g., signed char) * - * D_MIN: The minimum possible destination value. For unsigned - * destination types this should be zero. For signed + * D_MIN: The minimum possible destination value. For unsigned + * destination types this should be zero. For signed * destination types it's a negative value with a magnitude that * is usually one greater than D_MAX. Source values which are * smaller than D_MIN generate overflows. @@ -111,374 +111,217 @@ static intn interface_initialize_g = 0; * are larger than D_MAX generate overflows. * */ - -#define H5T_CONV_sS(CDATA,BUF,NELMTS,ST,DT) { \ - size_t elmtno; /*element number */ \ - ST *s; /*source buffer */ \ - DT *d; /*destination buffer */ \ - \ +#define H5T_CONV_sS(S_ALIGN,D_ALIGN,ST,DT) { \ assert(sizeof(ST)<=sizeof(DT)); \ - switch ((CDATA)->command) { \ - case H5T_CONV_INIT: \ - (CDATA)->need_bkg = H5T_BKG_NO; \ - break; \ - \ - case H5T_CONV_FREE: \ - break; \ - \ - case H5T_CONV_CONV: \ - s = (ST*)(BUF)+(NELMTS); \ - d = (DT*)(BUF)+(NELMTS); \ - \ - for (elmtno=0; elmtno<(NELMTS); elmtno++) { \ - *--d = *--s; \ - } \ - break; \ - \ - default: \ - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ - "unknown conversion command"); \ - } \ + CI_BEGIN(S_ALIGN, D_ALIGN, ST, DT, nelmts-1, --) { \ + *d = *s; \ + } CI_END; \ } -#define H5T_CONV_sU(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT) { \ - size_t elmtno; /*element number */ \ - ST *s; /*source buffer */ \ - DT *d; /*destination buffer */ \ - \ +#define H5T_CONV_sU(STYPE,DTYPE,ST,DT) { \ assert(sizeof(ST)<=sizeof(DT)); \ - switch ((CDATA)->command) { \ - case H5T_CONV_INIT: \ - (CDATA)->need_bkg = H5T_BKG_NO; \ - break; \ - \ - case H5T_CONV_FREE: \ - break; \ - \ - case H5T_CONV_CONV: \ - s = (ST*)(BUF)+(NELMTS)-1; \ - d = (DT*)(BUF)+(NELMTS)-1; \ - \ - for (elmtno=0; elmtno<(NELMTS); elmtno++, --s, --d) { \ - if (*s<0) { \ - if (!H5T_overflow_g || \ - (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ - *d = 0; \ - } \ - } else { \ - *d = *s; \ + CI_BEGIN(STYPE, DTYPE, ST, DT, nelmts-1, --) { \ + if (*s<0) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)(src_id, dst_id, s, d)<0) { \ + *d = 0; \ } \ + } else { \ + *d = *s; \ } \ - break; \ - \ - default: \ - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ - "unknown conversion command"); \ - } \ + } CI_END; \ } -#define H5T_CONV_uS(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MAX) { \ - size_t elmtno; /*element number */ \ - ST *s; /*source buffer */ \ - DT *d; /*destination buffer */ \ - \ +#define H5T_CONV_uS(STYPE,DTYPE,ST,DT,D_MAX) { \ assert(sizeof(ST)<=sizeof(DT)); \ - switch ((CDATA)->command) { \ - case H5T_CONV_INIT: \ - (CDATA)->need_bkg = H5T_BKG_NO; \ - break; \ - \ - case H5T_CONV_FREE: \ - break; \ - \ - case H5T_CONV_CONV: \ - s = (ST*)(BUF)+(NELMTS)-1; \ - d = (DT*)(BUF)+(NELMTS)-1; \ - \ - for (elmtno=0; elmtno<(NELMTS); elmtno++, --s, --d) { \ - if (*s > (D_MAX)) { \ - if (!H5T_overflow_g || \ - (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ - *d = (D_MAX); \ - } \ - } else { \ - *d = *s; \ + CI_BEGIN(STYPE, DTYPE, ST, DT, nelmts-1, --) { \ + if (*s > (D_MAX)) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)(src_id, dst_id, s, d)<0) { \ + *d = (D_MAX); \ } \ + } else { \ + *d = *s; \ } \ - break; \ - \ - default: \ - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ - "unknown conversion command"); \ - } \ + } CI_END; \ } -#define H5T_CONV_uU(CDATA,BUF,NELMTS,ST,DT) { \ - size_t elmtno; /*element number */ \ - ST *s; /*source buffer */ \ - DT *d; /*destination buffer */ \ - \ +#define H5T_CONV_uU(STYPE,DTYPE,ST,DT) { \ assert(sizeof(ST)<=sizeof(DT)); \ - switch ((CDATA)->command) { \ - case H5T_CONV_INIT: \ - (CDATA)->need_bkg = H5T_BKG_NO; \ - break; \ - \ - case H5T_CONV_FREE: \ - break; \ - \ - case H5T_CONV_CONV: \ - s = (ST*)(BUF)+(NELMTS); \ - d = (DT*)(BUF)+(NELMTS); \ - \ - for (elmtno=0; elmtno<(NELMTS); elmtno++) { \ - *--d = *--s; \ - } \ - break; \ - \ - default: \ - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ - "unknown conversion command"); \ - } \ + CI_BEGIN(STYPE, DTYPE, ST, DT, nelmts-1, --) { \ + *d = *s; \ + } CI_END; \ } -#define H5T_CONV_Ss(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MIN,D_MAX) { \ - size_t elmtno; /*element number */ \ - ST *s; /*source buffer */ \ - DT *d; /*destination buffer */ \ - \ +#define H5T_CONV_Ss(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ assert(sizeof(ST)>=sizeof(DT)); \ - switch ((CDATA)->command) { \ - case H5T_CONV_INIT: \ - (CDATA)->need_bkg = H5T_BKG_NO; \ - break; \ - \ - case H5T_CONV_FREE: \ - break; \ - \ - case H5T_CONV_CONV: \ - s = (ST*)(BUF); \ - d = (DT*)(BUF); \ - \ - for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \ - if (*s > (DT)(D_MAX)) { \ - if (!H5T_overflow_g || \ - (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ - *d = (D_MAX); \ - } \ - } else if (*s < (D_MIN)) { \ - if (!H5T_overflow_g || \ - (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ - *d = (D_MIN); \ - } \ - } else { \ - *d = *s; \ + CI_BEGIN(STYPE, DTYPE, ST, DT, 0, ++) { \ + if (*s > (DT)(D_MAX)) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)(src_id, dst_id, s, d)<0) { \ + *d = (D_MAX); \ } \ + } else if (*s < (D_MIN)) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)(src_id, dst_id, s, d)<0) { \ + *d = (D_MIN); \ + } \ + } else { \ + *d = *s; \ } \ - break; \ - \ - default: \ - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ - "unknown conversion command"); \ - } \ + } CI_END; \ } -#define H5T_CONV_Su(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MAX) { \ - size_t elmtno; /*element number */ \ - ST *s; /*source buffer */ \ - DT *d; /*destination buffer */ \ - \ +#define H5T_CONV_Su(STYPE,DTYPE,ST,DT,D_MAX) { \ assert(sizeof(ST)>=sizeof(DT)); \ - switch ((CDATA)->command) { \ - case H5T_CONV_INIT: \ - (CDATA)->need_bkg = H5T_BKG_NO; \ - break; \ - \ - case H5T_CONV_FREE: \ - break; \ - \ - case H5T_CONV_CONV: \ - s = (ST*)(BUF); \ - d = (DT*)(BUF); \ - \ - for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \ - if (*s < 0) { \ - if (!H5T_overflow_g || \ - (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ - *d = 0; \ - } \ - } else if (sizeof(ST)>sizeof(DT) && *s>(D_MAX)) { \ - /*sign vs. unsign ok in previous line*/ \ - if (!H5T_overflow_g || \ - (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ - *d = (D_MAX); \ - } \ - } else { \ - *d = *s; \ + CI_BEGIN(STYPE, DTYPE, ST, DT, 0, ++) { \ + if (*s < 0) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)(src_id, dst_id, s, d)<0) { \ + *d = 0; \ + } \ + } else if (sizeof(ST)>sizeof(DT) && *s>(D_MAX)) { \ + /*sign vs. unsign ok in previous line*/ \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)(src_id, dst_id, s, d)<0) { \ + *d = (D_MAX); \ } \ + } else { \ + *d = *s; \ } \ - break; \ - \ - default: \ - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ - "unknown conversion command"); \ - } \ + } CI_END; \ } -#define H5T_CONV_Us(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MAX) { \ - size_t elmtno; /*element number */ \ - ST *s; /*source buffer */ \ - DT *d; /*destination buffer */ \ - \ +#define H5T_CONV_Us(STYPE,DTYPE,ST,DT,D_MAX) { \ assert(sizeof(ST)>=sizeof(DT)); \ - switch ((CDATA)->command) { \ - case H5T_CONV_INIT: \ - (CDATA)->need_bkg = H5T_BKG_NO; \ - break; \ - \ - case H5T_CONV_FREE: \ - break; \ - \ - case H5T_CONV_CONV: \ - s = (ST*)(BUF); \ - d = (DT*)(BUF); \ - \ - for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \ - if (*s > (D_MAX)) { \ - if (!H5T_overflow_g || \ - (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ - *d = (D_MAX); \ - } \ - } else { \ - *d = *s; \ + CI_BEGIN(STYPE, DTYPE, ST, DT, 0, ++) { \ + if (*s > (D_MAX)) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)(src_id, dst_id, s, d)<0) { \ + *d = (D_MAX); \ } \ + } else { \ + *d = *s; \ } \ - break; \ - \ - default: \ - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ - "unknown conversion command"); \ - } \ + } CI_END; \ } -#define H5T_CONV_Uu(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MAX) { \ - size_t elmtno; /*element number */ \ - ST *s; /*source buffer */ \ - DT *d; /*destination buffer */ \ - \ +#define H5T_CONV_Uu(STYPE,DTYPE,ST,DT,D_MAX) { \ assert(sizeof(ST)>=sizeof(DT)); \ - switch ((CDATA)->command) { \ - case H5T_CONV_INIT: \ - (CDATA)->need_bkg = H5T_BKG_NO; \ - break; \ - \ - case H5T_CONV_FREE: \ - break; \ - \ - case H5T_CONV_CONV: \ - s = (ST*)(BUF); \ - d = (DT*)(BUF); \ - \ - for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \ - if (*s > (D_MAX)) { \ - if (!H5T_overflow_g || \ - (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ - *d = (D_MAX); \ - } \ - } else { \ - *d = *s; \ + CI_BEGIN(STYPE, DTYPE, ST, DT, 0, ++) { \ + if (*s > (D_MAX)) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)(src_id, dst_id, s, d)<0) { \ + *d = (D_MAX); \ } \ + } else { \ + *d = *s; \ } \ - break; \ - \ - default: \ - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ - "unknown conversion command"); \ - } \ + } CI_END; \ } -#define H5T_CONV_su(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT) { \ - size_t elmtno; /*element number */ \ - ST *s; /*source buffer */ \ - DT *d; /*destination buffer */ \ - \ +#define H5T_CONV_su(STYPE,DTYPE,ST,DT) { \ assert(sizeof(ST)==sizeof(DT)); \ - switch ((CDATA)->command) { \ - case H5T_CONV_INIT: \ - (CDATA)->need_bkg = H5T_BKG_NO; \ - break; \ - \ - case H5T_CONV_FREE: \ - break; \ - \ - case H5T_CONV_CONV: \ - s = (ST*)(BUF); \ - d = (DT*)(BUF); \ - \ - for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \ - if (*s < 0) { \ - if (!H5T_overflow_g || \ - (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ - *d = 0; \ - } \ - } else { \ - *d = *s; \ + CI_BEGIN(STYPE, DTYPE, ST, DT, 0, ++) { \ + if (*s < 0) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)(src_id, dst_id, s, d)<0) { \ + *d = 0; \ } \ + } else { \ + *d = *s; \ } \ - break; \ - \ - default: \ - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ - "unknown conversion command"); \ - } \ + } CI_END; \ +} + +#define H5T_CONV_us(STYPE,DTYPE,ST,DT,D_MAX) { \ + assert(sizeof(ST)==sizeof(DT)); \ + CI_BEGIN(STYPE, DTYPE, ST, DT, 0, ++) { \ + if (*s > (D_MAX)) { \ + if (!H5T_overflow_g || \ + (H5T_overflow_g)(src_id, dst_id, s, d)<0) { \ + *d = (D_MAX); \ + } \ + } else { \ + *d = *s; \ + } \ + } CI_END; \ } -#define H5T_CONV_us(CDATA,S_ID,D_ID,BUF,NELMTS,ST,DT,D_MAX) { \ +/* The first part of every integer hardware conversion macro */ +#define CI_BEGIN(STYPE,DTYPE,ST,DT,STRT,DIR) { \ size_t elmtno; /*element number */ \ - ST *s; /*source buffer */ \ - DT *d; /*destination buffer */ \ + ST *src, *s; /*source buffer */ \ + DT *dst, *d; /*destination buffer */ \ + H5T_t *st, *dt; /*src and dest data types */ \ + long_long aligned; /*largest integer type, aligned */ \ + hbool_t s_mv, d_mv; /*move data to align it? */ \ \ - assert(sizeof(ST)==sizeof(DT)); \ - switch ((CDATA)->command) { \ + switch (cdata->command) { \ case H5T_CONV_INIT: \ - (CDATA)->need_bkg = H5T_BKG_NO; \ + cdata->need_bkg = H5T_BKG_NO; \ break; \ - \ case H5T_CONV_FREE: \ break; \ - \ case H5T_CONV_CONV: \ - s = (ST*)(BUF); \ - d = (DT*)(BUF); \ - \ - for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \ - if (*s > (D_MAX)) { \ - if (!H5T_overflow_g || \ - (H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \ - *d = (D_MAX); \ - } \ + src = (ST*)buf+(STRT); \ + dst = (DT*)buf+(STRT); \ + st = H5I_object(src_id); \ + dt = H5I_object(dst_id); \ + assert(st && dt); \ + s_mv = H5T_NATIVE_##STYPE##_ALIGN_g>1 && \ + ((size_t)buf%H5T_NATIVE_##STYPE##_ALIGN_g || \ + st->size%H5T_NATIVE_##STYPE##_ALIGN_g); \ + d_mv = H5T_NATIVE_##DTYPE##_ALIGN_g>1 && \ + ((size_t)buf%H5T_NATIVE_##DTYPE##_ALIGN_g || \ + dt->size%H5T_NATIVE_##DTYPE##_ALIGN_g); \ + CI_DEBUG(s_mv, STYPE, ST); \ + CI_DEBUG(d_mv, DTYPE, DT); \ + for (elmtno=0; elmtnosize); \ + s = (ST*)&aligned; \ } else { \ - *d = *s; \ + s = src; \ } \ - } \ - break; \ - \ + if (d_mv) { \ + d = (DT*)&aligned; \ + } else { \ + d = dst; \ + } + /* ... user-defined stuff here ... */ +#define CI_END \ + if (d_mv) memcpy(dst, &aligned, dt->size); \ + } \ + break; \ default: \ HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \ "unknown conversion command"); \ } \ } +/* Print alignment information */ +#ifdef H5T_DEBUG +# define CI_DEBUG(MV,HDF_TYPE,C_TYPE) { \ + if (MV && H5DEBUG(T)) { \ + fprintf(H5DEBUG(T), "<%d-byte alignment for %s>", \ + H5T_NATIVE_##HDF_TYPE##_ALIGN_g, #C_TYPE); \ + } \ +} +#else +# define CI_DEBUG(MV,HDF_TYPE,C_TYPE) /*void*/ +#endif + /*------------------------------------------------------------------------- - * Function: H5T_conv_noop + * Function: H5T_conv_noop * - * Purpose: The no-op conversion. The library knows about this - * conversion without it being registered. + * Purpose: The no-op conversion. The library knows about this + * conversion without it being registered. * * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Wednesday, January 14, 1998 + * Programmer: Robb Matzke + * Wednesday, January 14, 1998 * * Modifications: * @@ -487,7 +330,7 @@ static intn interface_initialize_g = 0; herr_t H5T_conv_noop(hid_t __unused__ src_id, hid_t __unused__ dst_id, H5T_cdata_t *cdata, size_t __unused__ nelmts, - void __unused__ *buf, void __unused__ *background) + void __unused__ *buf, void __unused__ *background) { FUNC_ENTER(H5T_conv_noop, FAIL); @@ -513,17 +356,17 @@ H5T_conv_noop(hid_t __unused__ src_id, hid_t __unused__ dst_id, } /*------------------------------------------------------------------------- - * Function: H5T_conv_order + * Function: H5T_conv_order * - * Purpose: Convert one type to another when byte order is the only - * difference. + * Purpose: Convert one type to another when byte order is the only + * difference. * - * Note: This is a soft conversion function. + * Note: This is a soft conversion function. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Tuesday, January 13, 1998 + * Programmer: Robb Matzke + * Tuesday, January 13, 1998 * * Modifications: * @@ -531,58 +374,58 @@ H5T_conv_noop(hid_t __unused__ src_id, hid_t __unused__ dst_id, */ herr_t H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, - void *_buf, void __unused__ *background) + void *_buf, void __unused__ *background) { - uint8_t *buf = (uint8_t*)_buf; + uint8_t *buf = (uint8_t*)_buf; uint8_t tmp; - H5T_t *src = NULL; - H5T_t *dst = NULL; + H5T_t *src = NULL; + H5T_t *dst = NULL; size_t i, j, md; FUNC_ENTER(H5T_conv_order, FAIL); switch (cdata->command) { case H5T_CONV_INIT: - /* Capability query */ + /* Capability query */ if (H5I_DATATYPE != H5I_get_type(src_id) || NULL == (src = H5I_object(src_id)) || H5I_DATATYPE != H5I_get_type(dst_id) || NULL == (dst = H5I_object(dst_id))) { HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); } - if (src->size != dst->size || - 0 != src->u.atomic.offset || - 0 != dst->u.atomic.offset || - !((H5T_ORDER_BE == src->u.atomic.order && - H5T_ORDER_LE == dst->u.atomic.order) || - (H5T_ORDER_LE == src->u.atomic.order && - H5T_ORDER_BE == dst->u.atomic.order))) { - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "conversion not supported"); - } - switch (src->type) { - case H5T_INTEGER: - /* nothing to check */ - break; - - case H5T_FLOAT: - if (src->u.atomic.u.f.sign != dst->u.atomic.u.f.sign || - src->u.atomic.u.f.epos != dst->u.atomic.u.f.epos || - src->u.atomic.u.f.esize != dst->u.atomic.u.f.esize || - src->u.atomic.u.f.ebias != dst->u.atomic.u.f.ebias || - src->u.atomic.u.f.mpos != dst->u.atomic.u.f.mpos || - src->u.atomic.u.f.msize != dst->u.atomic.u.f.msize || - src->u.atomic.u.f.norm != dst->u.atomic.u.f.norm || - src->u.atomic.u.f.pad != dst->u.atomic.u.f.pad) { - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "conversion not supported"); - } - break; - - default: - HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, - "conversion not supported"); - } + if (src->size != dst->size || + 0 != src->u.atomic.offset || + 0 != dst->u.atomic.offset || + !((H5T_ORDER_BE == src->u.atomic.order && + H5T_ORDER_LE == dst->u.atomic.order) || + (H5T_ORDER_LE == src->u.atomic.order && + H5T_ORDER_BE == dst->u.atomic.order))) { + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, + "conversion not supported"); + } + switch (src->type) { + case H5T_INTEGER: + /* nothing to check */ + break; + + case H5T_FLOAT: + if (src->u.atomic.u.f.sign != dst->u.atomic.u.f.sign || + src->u.atomic.u.f.epos != dst->u.atomic.u.f.epos || + src->u.atomic.u.f.esize != dst->u.atomic.u.f.esize || + src->u.atomic.u.f.ebias != dst->u.atomic.u.f.ebias || + src->u.atomic.u.f.mpos != dst->u.atomic.u.f.mpos || + src->u.atomic.u.f.msize != dst->u.atomic.u.f.msize || + src->u.atomic.u.f.norm != dst->u.atomic.u.f.norm || + src->u.atomic.u.f.pad != dst->u.atomic.u.f.pad) { + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, + "conversion not supported"); + } + break; + + default: + HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, + "conversion not supported"); + } cdata->need_bkg = H5T_BKG_NO; break; @@ -627,7 +470,7 @@ H5T_conv_order(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke - * Monday, January 26, 1998 + * Monday, January 26, 1998 * * Modifications: * @@ -647,7 +490,7 @@ H5T_conv_struct_init (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) /* * Notice: the thing marked with `!' below really is `dst' and not * `src' because we're only interested in the members of the - * source type that are also in the destination type. + * source type that are also in the destination type. */ cdata->priv = priv = H5MM_calloc (sizeof(H5T_conv_struct_t)); if (NULL==priv) { @@ -788,7 +631,7 @@ H5T_conv_struct_init (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) * Purpose: Converts between compound data types. This is a soft * conversion function. The algorithm is basically: * - * For I=1..NUM_MEMBERS do + * For I=1..NUM_MEMBERS do * If sizeof detination type <= sizeof source type then * Convert member to destination type; * Move member as far left as possible; @@ -798,12 +641,12 @@ H5T_conv_struct_init (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) * Convert member to destination type; * Move member to correct position in BACKGROUND * - * Copy BACKGROUND to BUF + * Copy BACKGROUND to BUF * * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke - * Thursday, January 22, 1998 + * Thursday, January 22, 1998 * * Modifications: * @@ -999,11 +842,11 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke - * Wednesday, June 10, 1998 + * Wednesday, June 10, 1998 * * Modifications: * - * Robb Matzke, 7 Jul 1998 + * Robb Matzke, 7 Jul 1998 * Added overflow handling. * *------------------------------------------------------------------------- @@ -1355,11 +1198,11 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke - * Tuesday, June 23, 1998 + * Tuesday, June 23, 1998 * * Modifications: * - * Robb Matzke, 7 Jul 1998 + * Robb Matzke, 7 Jul 1998 * Added overflow handling. * *------------------------------------------------------------------------- @@ -1371,7 +1214,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, /* Traversal-related variables */ H5T_t *src_p; /*source data type */ H5T_t *dst_p; /*destination data type */ - H5T_atomic_t src; /*atomic source info */ + H5T_atomic_t src; /*atomic source info */ H5T_atomic_t dst; /*atomic destination info */ intn direction; /*forward or backward traversal */ size_t elmtno; /*element number */ @@ -1534,7 +1377,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, /* * Get the exponent as an unsigned quantity from the section of - * the source bit field where it's located. Don't worry about + * the source bit field where it's located. Don't worry about * the exponent bias yet. */ expo = H5T_bit_get_d(s, src.u.f.epos, src.u.f.esize); @@ -1616,7 +1459,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, } else if (expo>=expo_max) { /* * The exponent is too large to fit in the available region - * or it results in the maximum possible value. Use positive + * or it results in the maximum possible value. Use positive * or negative infinity instead unless the application * specifies something else. Before calling the overflow * handler make sure the source buffer we hand it is in the @@ -1645,7 +1488,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, /* * If the destination mantissa is smaller than the source - * mantissa then round the source mantissa. Rounding may cause a + * mantissa then round the source mantissa. Rounding may cause a * carry in which case the exponent has to be re-evaluated for * overflow. That is, if `carry' is clear then the implied * mantissa bit is `1', else it is `10' binary. @@ -1714,7 +1557,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_PAD_ONE==dst.msb_pad); } - /* + /* * Put the destination in the correct byte order. See note at * beginning of loop. */ @@ -1756,7 +1599,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke - * Friday, August 7, 1998 + * Friday, August 7, 1998 * * Modifications: * @@ -1984,7 +1827,7 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * Failure: negative * * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Monday, November 16, 1998 * * Modifications: * @@ -1995,7 +1838,7 @@ H5T_conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_schar_uchar, FAIL); - H5T_CONV_su(cdata, src_id, dst_id, buf, nelmts, + H5T_CONV_su(SCHAR, UCHAR, signed char, unsigned char); FUNC_LEAVE(SUCCEED); } @@ -2011,7 +1854,7 @@ H5T_conv_schar_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Monday, November 16, 1998 * * Modifications: * @@ -2022,8 +1865,9 @@ H5T_conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uchar_schar, FAIL); - H5T_CONV_us(cdata, src_id, dst_id, buf, nelmts, - unsigned char, signed char, SCHAR_MAX); + H5T_CONV_us(UCHAR, SCHAR, + unsigned char, signed char, + SCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -2038,19 +1882,19 @@ H5T_conv_uchar_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_schar_short(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_schar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_schar_short, FAIL); - H5T_CONV_sS(cdata, buf, nelmts, signed char, short); + H5T_CONV_sS(SCHAR, SHORT, + signed char, short); FUNC_LEAVE(SUCCEED); } @@ -2065,7 +1909,7 @@ H5T_conv_schar_short(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2076,7 +1920,7 @@ H5T_conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_schar_ushort, FAIL); - H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, + H5T_CONV_sU(SCHAR, USHORT, signed char, unsigned short); FUNC_LEAVE(SUCCEED); } @@ -2092,7 +1936,7 @@ H5T_conv_schar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2103,8 +1947,9 @@ H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uchar_short, FAIL); - H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, - unsigned char, short, SHRT_MAX); + H5T_CONV_uS(UCHAR, SHORT, + unsigned char, short, + SHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -2119,19 +1964,19 @@ H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_uchar_ushort(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uchar_ushort, FAIL); - H5T_CONV_uU(cdata, buf, nelmts, unsigned char, unsigned short); + H5T_CONV_uU(UCHAR, USHORT, + unsigned char, unsigned short); FUNC_LEAVE(SUCCEED); } @@ -2146,19 +1991,19 @@ H5T_conv_uchar_ushort(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_schar_int(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_schar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_schar_int, FAIL); - H5T_CONV_sS(cdata, buf, nelmts, signed char, int); + H5T_CONV_sS(SCHAR, INT, + signed char, int); FUNC_LEAVE(SUCCEED); } @@ -2173,7 +2018,7 @@ H5T_conv_schar_int(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2184,7 +2029,8 @@ H5T_conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_schar_uint, FAIL); - H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, signed char, unsigned); + H5T_CONV_sU(SCHAR, UINT, + signed char, unsigned); FUNC_LEAVE(SUCCEED); } @@ -2199,7 +2045,7 @@ H5T_conv_schar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2210,8 +2056,9 @@ H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uchar_int, FAIL); - H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, - unsigned char, int, INT_MAX); + H5T_CONV_uS(UCHAR, INT, + unsigned char, int, + INT_MAX); FUNC_LEAVE(SUCCEED); } @@ -2226,19 +2073,19 @@ H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_uchar_uint(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uchar_uint, FAIL); - H5T_CONV_uU(cdata, buf, nelmts, unsigned char, unsigned); + H5T_CONV_uU(UCHAR, UINT, + unsigned char, unsigned); FUNC_LEAVE(SUCCEED); } @@ -2253,19 +2100,19 @@ H5T_conv_uchar_uint(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_schar_long(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_schar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_schar_long, FAIL); - H5T_CONV_sS(cdata, buf, nelmts, signed char, long); + H5T_CONV_sS(SCHAR, LONG, + signed char, long); FUNC_LEAVE(SUCCEED); } @@ -2280,7 +2127,7 @@ H5T_conv_schar_long(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2291,7 +2138,7 @@ H5T_conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_schar_ulong, FAIL); - H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, + H5T_CONV_sU(SCHAR, ULONG, signed char, unsigned long); FUNC_LEAVE(SUCCEED); } @@ -2307,7 +2154,7 @@ H5T_conv_schar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2318,8 +2165,9 @@ H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uchar_long, FAIL); - H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, - unsigned char, long, LONG_MAX); + H5T_CONV_uS(UCHAR, LONG, + unsigned char, long, + LONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -2334,19 +2182,19 @@ H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_uchar_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uchar_ulong, FAIL); - H5T_CONV_uU(cdata, buf, nelmts, unsigned char, unsigned long); + H5T_CONV_uU(UCHAR, ULONG, + unsigned char, unsigned long); FUNC_LEAVE(SUCCEED); } @@ -2361,19 +2209,19 @@ H5T_conv_uchar_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_schar_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_schar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_schar_llong, FAIL); - H5T_CONV_sS(cdata, buf, nelmts, signed char, long_long); + H5T_CONV_sS(SCHAR, LLONG, + signed char, long_long); FUNC_LEAVE(SUCCEED); } @@ -2388,7 +2236,7 @@ H5T_conv_schar_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2399,7 +2247,7 @@ H5T_conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_schar_ullong, FAIL); - H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, + H5T_CONV_sU(SCHAR, ULLONG, signed char, unsigned long_long); FUNC_LEAVE(SUCCEED); } @@ -2415,7 +2263,7 @@ H5T_conv_schar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2426,8 +2274,9 @@ H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uchar_llong, FAIL); - H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, - unsigned char, long_long, LLONG_MAX); + H5T_CONV_uS(UCHAR, LLONG, + unsigned char, long_long, + LLONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -2442,19 +2291,19 @@ H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_uchar_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uchar_ullong, FAIL); - H5T_CONV_uU(cdata, buf, nelmts, unsigned char, unsigned long_long); + H5T_CONV_uU(UCHAR, ULLONG, + unsigned char, unsigned long_long); FUNC_LEAVE(SUCCEED); } @@ -2469,7 +2318,7 @@ H5T_conv_uchar_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2480,8 +2329,9 @@ H5T_conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_short_schar, FAIL); - H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, - short, signed char, SCHAR_MIN, SCHAR_MAX); + H5T_CONV_Ss(SHORT, SCHAR, + short, signed char, + SCHAR_MIN, SCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -2496,7 +2346,7 @@ H5T_conv_short_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2507,8 +2357,9 @@ H5T_conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_short_uchar, FAIL); - H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, - short, unsigned char, UCHAR_MAX); + H5T_CONV_Su(SHORT, UCHAR, + short, unsigned char, + UCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -2523,7 +2374,7 @@ H5T_conv_short_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2534,8 +2385,9 @@ H5T_conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ushort_schar, FAIL); - H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, - unsigned short, signed char, SCHAR_MAX); + H5T_CONV_Us(USHORT, SCHAR, + unsigned short, signed char, + SCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -2550,7 +2402,7 @@ H5T_conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2561,8 +2413,9 @@ H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ushort_uchar, FAIL); - H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, - unsigned short, unsigned char, UCHAR_MAX); + H5T_CONV_Uu(USHORT, UCHAR, + unsigned short, unsigned char, + UCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -2577,7 +2430,7 @@ H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Monday, November 16, 1998 * * Modifications: * @@ -2588,7 +2441,7 @@ H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_short_ushort, FAIL); - H5T_CONV_su(cdata, src_id, dst_id, buf, nelmts, + H5T_CONV_su(SHORT, USHORT, short, unsigned short); FUNC_LEAVE(SUCCEED); } @@ -2604,7 +2457,7 @@ H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Monday, November 16, 1998 * * Modifications: * @@ -2615,8 +2468,9 @@ H5T_conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ushort_short, FAIL); - H5T_CONV_us(cdata, src_id, dst_id, buf, nelmts, - unsigned short, short, SHRT_MAX); + H5T_CONV_us(USHORT, SHORT, + unsigned short, short, + SHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -2631,19 +2485,19 @@ H5T_conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_short_int(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_short_int, FAIL); - H5T_CONV_sS(cdata, buf, nelmts, short, int); + H5T_CONV_sS(SHORT, INT, + short, int); FUNC_LEAVE(SUCCEED); } @@ -2658,7 +2512,7 @@ H5T_conv_short_int(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2669,7 +2523,8 @@ H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_short_uint, FAIL); - H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, short, unsigned); + H5T_CONV_sU(SHORT, UINT, + short, unsigned); FUNC_LEAVE(SUCCEED); } @@ -2684,7 +2539,7 @@ H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2695,8 +2550,9 @@ H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ushort_int, FAIL); - H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, - unsigned short, int, INT_MAX); + H5T_CONV_uS(USHORT, INT, + unsigned short, int, + INT_MAX); FUNC_LEAVE(SUCCEED); } @@ -2711,19 +2567,19 @@ H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_ushort_uint(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ushort_uint, FAIL); - H5T_CONV_uU(cdata, buf, nelmts, unsigned short, unsigned); + H5T_CONV_uU(USHORT, UINT, + unsigned short, unsigned); FUNC_LEAVE(SUCCEED); } @@ -2738,19 +2594,19 @@ H5T_conv_ushort_uint(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_short_long(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_short_long, FAIL); - H5T_CONV_sS(cdata, buf, nelmts, short, long); + H5T_CONV_sS(SHORT, LONG, + short, long); FUNC_LEAVE(SUCCEED); } @@ -2765,7 +2621,7 @@ H5T_conv_short_long(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2776,7 +2632,8 @@ H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_short_ulong, FAIL); - H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, short, unsigned long); + H5T_CONV_sU(SHORT, ULONG, + short, unsigned long); FUNC_LEAVE(SUCCEED); } @@ -2791,7 +2648,7 @@ H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2802,8 +2659,9 @@ H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ushort_long, FAIL); - H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, - unsigned short, long, LONG_MAX); + H5T_CONV_uS(USHORT, LONG, + unsigned short, long, + LONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -2818,19 +2676,19 @@ H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_ushort_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ushort_ulong, FAIL); - H5T_CONV_uU(cdata, buf, nelmts, unsigned short, unsigned long); + H5T_CONV_uU(USHORT, ULONG, + unsigned short, unsigned long); FUNC_LEAVE(SUCCEED); } @@ -2845,19 +2703,19 @@ H5T_conv_ushort_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_short_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_short_llong, FAIL); - H5T_CONV_sS(cdata, buf, nelmts, short, long_long); + H5T_CONV_sS(SHORT, LLONG, + short, long_long); FUNC_LEAVE(SUCCEED); } @@ -2872,7 +2730,7 @@ H5T_conv_short_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2883,7 +2741,7 @@ H5T_conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_short_ullong, FAIL); - H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, + H5T_CONV_sU(SHORT, ULLONG, short, unsigned long_long); FUNC_LEAVE(SUCCEED); } @@ -2899,7 +2757,7 @@ H5T_conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2910,8 +2768,9 @@ H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ushort_llong, FAIL); - H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, - unsigned short, long_long, LLONG_MAX); + H5T_CONV_uS(USHORT, LLONG, + unsigned short, long_long, + LLONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -2926,19 +2785,19 @@ H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_ushort_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ushort_ullong, FAIL); - H5T_CONV_uU(cdata, buf, nelmts, unsigned short, unsigned long_long); + H5T_CONV_uU(USHORT, ULLONG, + unsigned short, unsigned long_long); FUNC_LEAVE(SUCCEED); } @@ -2953,7 +2812,7 @@ H5T_conv_ushort_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2964,8 +2823,9 @@ H5T_conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_int_schar, FAIL); - H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, - int, signed char, SCHAR_MIN, SCHAR_MAX); + H5T_CONV_Ss(INT, SCHAR, + int, signed char, + SCHAR_MIN, SCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -2980,7 +2840,7 @@ H5T_conv_int_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -2991,8 +2851,9 @@ H5T_conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_int_uchar, FAIL); - H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, - int, unsigned char, UCHAR_MAX); + H5T_CONV_Su(INT, UCHAR, + int, unsigned char, + UCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -3007,7 +2868,7 @@ H5T_conv_int_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3018,8 +2879,9 @@ H5T_conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uint_schar, FAIL); - H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, - unsigned, signed char, SCHAR_MAX); + H5T_CONV_Us(UINT, SCHAR, + unsigned, signed char, + SCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -3034,7 +2896,7 @@ H5T_conv_uint_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3045,8 +2907,9 @@ H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uint_uchar, FAIL); - H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, - unsigned, unsigned char, UCHAR_MAX); + H5T_CONV_Uu(UINT, UCHAR, + unsigned, unsigned char, + UCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -3061,7 +2924,7 @@ H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3072,8 +2935,9 @@ H5T_conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_int_short, FAIL); - H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, - int, short, SHRT_MIN, SHRT_MAX); + H5T_CONV_Ss(INT, SHORT, + int, short, + SHRT_MIN, SHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3088,7 +2952,7 @@ H5T_conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3099,8 +2963,9 @@ H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_int_ushort, FAIL); - H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, - int, unsigned short, USHRT_MAX); + H5T_CONV_Su(INT, USHORT, + int, unsigned short, + USHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3115,7 +2980,7 @@ H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3126,8 +2991,9 @@ H5T_conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uint_short, FAIL); - H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, - unsigned, short, SHRT_MAX); + H5T_CONV_Us(UINT, SHORT, + unsigned, short, + SHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3142,7 +3008,7 @@ H5T_conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3153,8 +3019,9 @@ H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uint_ushort, FAIL); - H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, - unsigned, unsigned short, USHRT_MAX); + H5T_CONV_Uu(UINT, USHORT, + unsigned, unsigned short, + USHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3169,7 +3036,7 @@ H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Monday, November 16, 1998 * * Modifications: * @@ -3180,7 +3047,7 @@ H5T_conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_int_uint, FAIL); - H5T_CONV_su(cdata, src_id, dst_id, buf, nelmts, + H5T_CONV_su(INT, UINT, int, unsigned); FUNC_LEAVE(SUCCEED); } @@ -3196,7 +3063,7 @@ H5T_conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Monday, November 16, 1998 * * Modifications: * @@ -3207,8 +3074,9 @@ H5T_conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uint_int, FAIL); - H5T_CONV_us(cdata, src_id, dst_id, buf, nelmts, - unsigned, int, INT_MAX); + H5T_CONV_us(UINT, INT, + unsigned, int, + INT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3223,19 +3091,19 @@ H5T_conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_int_long(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_int_long, FAIL); - H5T_CONV_sS(cdata, buf, nelmts, int, long); + H5T_CONV_sS(INT, LONG, + int, long); FUNC_LEAVE(SUCCEED); } @@ -3250,7 +3118,7 @@ H5T_conv_int_long(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3261,7 +3129,8 @@ H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_int_ulong, FAIL); - H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, int, unsigned long); + H5T_CONV_sU(INT, LONG, + int, unsigned long); FUNC_LEAVE(SUCCEED); } @@ -3276,7 +3145,7 @@ H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3287,8 +3156,9 @@ H5T_conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uint_long, FAIL); - H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, - unsigned, long, LONG_MAX); + H5T_CONV_uS(UINT, LONG, + unsigned, long, + LONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -3303,19 +3173,19 @@ H5T_conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_uint_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uint_ulong, FAIL); - H5T_CONV_uU(cdata, buf, nelmts, unsigned, unsigned long); + H5T_CONV_uU(UINT, ULONG, + unsigned, unsigned long); FUNC_LEAVE(SUCCEED); } @@ -3330,19 +3200,19 @@ H5T_conv_uint_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_int_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_int_llong, FAIL); - H5T_CONV_sS(cdata, buf, nelmts, int, long_long); + H5T_CONV_sS(INT, LLONG, + int, long_long); FUNC_LEAVE(SUCCEED); } @@ -3357,7 +3227,7 @@ H5T_conv_int_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3368,7 +3238,7 @@ H5T_conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_int_ullong, FAIL); - H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, + H5T_CONV_sU(INT, ULLONG, int, unsigned long_long); FUNC_LEAVE(SUCCEED); } @@ -3384,7 +3254,7 @@ H5T_conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3395,8 +3265,9 @@ H5T_conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uint_llong, FAIL); - H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, - unsigned, long_long, LLONG_MAX); + H5T_CONV_uS(UINT, LLONG, + unsigned, long_long, + LLONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -3411,19 +3282,19 @@ H5T_conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_uint_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_uint_ullong, FAIL); - H5T_CONV_uU(cdata, buf, nelmts, unsigned, unsigned long_long); + H5T_CONV_uU(UINT, ULLONG, + unsigned, unsigned long_long); FUNC_LEAVE(SUCCEED); } @@ -3438,7 +3309,7 @@ H5T_conv_uint_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3449,8 +3320,9 @@ H5T_conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_long_schar, FAIL); - H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, - long, signed char, SCHAR_MIN, SCHAR_MAX); + H5T_CONV_Ss(LONG, SCHAR, + long, signed char, + SCHAR_MIN, SCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -3465,7 +3337,7 @@ H5T_conv_long_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3476,8 +3348,9 @@ H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_long_uchar, FAIL); - H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, - long, unsigned char, UCHAR_MAX); + H5T_CONV_Su(LONG, UCHAR, + long, unsigned char, + UCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -3492,7 +3365,7 @@ H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3503,8 +3376,9 @@ H5T_conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ulong_schar, FAIL); - H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, - unsigned long, signed char, SCHAR_MAX); + H5T_CONV_Us(ULONG, SCHAR, + unsigned long, signed char, + SCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -3519,7 +3393,7 @@ H5T_conv_ulong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3530,8 +3404,9 @@ H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ulong_uchar, FAIL); - H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, - unsigned long, unsigned char, UCHAR_MAX); + H5T_CONV_Uu(ULONG, UCHAR, + unsigned long, unsigned char, + UCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -3546,7 +3421,7 @@ H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3557,8 +3432,9 @@ H5T_conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_long_short, FAIL); - H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, - long, short, SHRT_MIN, SHRT_MAX); + H5T_CONV_Ss(LONG, SHORT, + long, short, + SHRT_MIN, SHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3573,7 +3449,7 @@ H5T_conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3584,8 +3460,9 @@ H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_long_ushort, FAIL); - H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, - long, unsigned short, USHRT_MAX); + H5T_CONV_Su(LONG, USHORT, + long, unsigned short, + USHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3600,7 +3477,7 @@ H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3611,8 +3488,9 @@ H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ulong_short, FAIL); - H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, - unsigned long, short, SHRT_MAX); + H5T_CONV_Us(ULONG, SHORT, + unsigned long, short, + SHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3627,7 +3505,7 @@ H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3638,8 +3516,9 @@ H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ulong_ushort, FAIL); - H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, - unsigned long, unsigned short, USHRT_MAX); + H5T_CONV_Uu(ULONG, USHORT, + unsigned long, unsigned short, + USHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3654,7 +3533,7 @@ H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3665,8 +3544,9 @@ H5T_conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_long_int, FAIL); - H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, - long, int, INT_MIN, INT_MAX); + H5T_CONV_Ss(LONG, INT, + long, int, + INT_MIN, INT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3681,7 +3561,7 @@ H5T_conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3692,8 +3572,9 @@ H5T_conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_long_uint, FAIL); - H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, - long, unsigned, UINT_MAX); + H5T_CONV_Su(LONG, UINT, + long, unsigned, + UINT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3708,7 +3589,7 @@ H5T_conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3719,8 +3600,9 @@ H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ulong_int, FAIL); - H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, - unsigned long, int, INT_MAX); + H5T_CONV_Us(ULONG, INT, + unsigned long, int, + INT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3735,7 +3617,7 @@ H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3746,8 +3628,9 @@ H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ulong_uint, FAIL); - H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, - unsigned long, unsigned, UINT_MAX); + H5T_CONV_Uu(ULONG, UINT, + unsigned long, unsigned, + UINT_MAX); FUNC_LEAVE(SUCCEED); } @@ -3762,7 +3645,7 @@ H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Monday, November 16, 1998 * * Modifications: * @@ -3773,7 +3656,7 @@ H5T_conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_long_ulong, FAIL); - H5T_CONV_su(cdata, src_id, dst_id, buf, nelmts, + H5T_CONV_su(LONG, ULONG, long, unsigned long); FUNC_LEAVE(SUCCEED); } @@ -3789,7 +3672,7 @@ H5T_conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Monday, November 16, 1998 * * Modifications: * @@ -3800,8 +3683,9 @@ H5T_conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ulong_long, FAIL); - H5T_CONV_us(cdata, src_id, dst_id, buf, nelmts, - unsigned long, long, LONG_MAX); + H5T_CONV_us(ULONG, LONG, + unsigned long, long, + LONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -3816,19 +3700,19 @@ H5T_conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_long_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_long_llong, FAIL); - H5T_CONV_sS(cdata, buf, nelmts, long, long_long); + H5T_CONV_sS(LONG, LLONG, + long, long_long); FUNC_LEAVE(SUCCEED); } @@ -3843,7 +3727,7 @@ H5T_conv_long_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3854,7 +3738,7 @@ H5T_conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_long_ullong, FAIL); - H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts, + H5T_CONV_sU(LONG, ULLONG, long, unsigned long_long); FUNC_LEAVE(SUCCEED); } @@ -3870,7 +3754,7 @@ H5T_conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3881,8 +3765,9 @@ H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_long_llong, FAIL); - H5T_CONV_uS(cdata, src_id, dst_id, buf, nelmts, - unsigned long, long_long, LLONG_MAX); + H5T_CONV_uS(ULONG, LLONG, + unsigned long, long_long, + LLONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -3897,19 +3782,19 @@ H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_ulong_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ulong_ullong, FAIL); - H5T_CONV_uU(cdata, buf, nelmts, unsigned long, unsigned long_long); + H5T_CONV_uU(ULONG, ULLONG, + unsigned long, unsigned long_long); FUNC_LEAVE(SUCCEED); } @@ -3924,7 +3809,7 @@ H5T_conv_ulong_ullong(hid_t __unused__ src_id, hid_t __unused__ dst_id, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3935,8 +3820,9 @@ H5T_conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_llong_schar, FAIL); - H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, - long_long, signed char, SCHAR_MIN, SCHAR_MAX); + H5T_CONV_Ss(LLONG, SCHAR, + long_long, signed char, + SCHAR_MIN, SCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -3951,7 +3837,7 @@ H5T_conv_llong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3962,8 +3848,9 @@ H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_llong_uchar, FAIL); - H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, - long_long, unsigned char, UCHAR_MAX); + H5T_CONV_Su(LLONG, UCHAR, + long_long, unsigned char, + UCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -3978,7 +3865,7 @@ H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -3989,8 +3876,9 @@ H5T_conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ullong_schar, FAIL); - H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, - unsigned long_long, signed char, SCHAR_MAX); + H5T_CONV_Us(ULLONG, SCHAR, + unsigned long_long, signed char, + SCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -4005,7 +3893,7 @@ H5T_conv_ullong_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4016,8 +3904,9 @@ H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ullong_uchar, FAIL); - H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, - unsigned long_long, unsigned char, UCHAR_MAX); + H5T_CONV_Uu(ULLONG, UCHAR, + unsigned long_long, unsigned char, + UCHAR_MAX); FUNC_LEAVE(SUCCEED); } @@ -4032,7 +3921,7 @@ H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4043,8 +3932,9 @@ H5T_conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_llong_short, FAIL); - H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, - long_long, short, SHRT_MIN, SHRT_MAX); + H5T_CONV_Ss(LLONG, SHORT, + long_long, short, + SHRT_MIN, SHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -4059,7 +3949,7 @@ H5T_conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4070,8 +3960,9 @@ H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_llong_ushort, FAIL); - H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, - long_long, unsigned short, USHRT_MAX); + H5T_CONV_Su(LLONG, USHORT, + long_long, unsigned short, + USHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -4086,7 +3977,7 @@ H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4097,8 +3988,9 @@ H5T_conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ullong_short, FAIL); - H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, - unsigned long_long, short, SHRT_MAX); + H5T_CONV_Us(ULLONG, SHORT, + unsigned long_long, short, + SHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -4113,7 +4005,7 @@ H5T_conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4124,8 +4016,9 @@ H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ullong_ushort, FAIL); - H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, - unsigned long_long, unsigned short, USHRT_MAX); + H5T_CONV_Uu(ULLONG, USHORT, + unsigned long_long, unsigned short, + USHRT_MAX); FUNC_LEAVE(SUCCEED); } @@ -4140,7 +4033,7 @@ H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4151,8 +4044,9 @@ H5T_conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_llong_int, FAIL); - H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, - long_long, int, INT_MIN, INT_MAX); + H5T_CONV_Ss(LLONG, INT, + long_long, int, + INT_MIN, INT_MAX); FUNC_LEAVE(SUCCEED); } @@ -4167,7 +4061,7 @@ H5T_conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4178,8 +4072,9 @@ H5T_conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_llong_uint, FAIL); - H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, - long_long, unsigned, UINT_MAX); + H5T_CONV_Su(LLONG, UINT, + long_long, unsigned, + UINT_MAX); FUNC_LEAVE(SUCCEED); } @@ -4194,7 +4089,7 @@ H5T_conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4205,8 +4100,9 @@ H5T_conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ullong_int, FAIL); - H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, - unsigned long_long, int, INT_MAX); + H5T_CONV_Us(ULLONG, INT, + unsigned long_long, int, + INT_MAX); FUNC_LEAVE(SUCCEED); } @@ -4221,7 +4117,7 @@ H5T_conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4232,8 +4128,9 @@ H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ullong_uint, FAIL); - H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, - unsigned long_long, unsigned, UINT_MAX); + H5T_CONV_Uu(ULLONG, UINT, + unsigned long_long, unsigned, + UINT_MAX); FUNC_LEAVE(SUCCEED); } @@ -4248,7 +4145,7 @@ H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4259,8 +4156,9 @@ H5T_conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_llong_long, FAIL); - H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts, - long_long, long, LONG_MIN, LONG_MAX); + H5T_CONV_Ss(LLONG, LONG, + long_long, long, + LONG_MIN, LONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -4275,7 +4173,7 @@ H5T_conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4286,8 +4184,9 @@ H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_llong_ulong, FAIL); - H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts, - long_long, unsigned long, ULONG_MAX); + H5T_CONV_Su(LLONG, ULONG, + long_long, unsigned long, + ULONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -4302,7 +4201,7 @@ H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4313,8 +4212,9 @@ H5T_conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ullong_long, FAIL); - H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts, - unsigned long_long, long, LONG_MAX); + H5T_CONV_Us(ULLONG, LONG, + unsigned long_long, long, + LONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -4329,7 +4229,7 @@ H5T_conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: Negative * * Programmer: Robb Matzke - * Friday, November 13, 1998 + * Friday, November 13, 1998 * * Modifications: * @@ -4340,8 +4240,9 @@ H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ullong_ulong, FAIL); - H5T_CONV_Uu(cdata, src_id, dst_id, buf, nelmts, - unsigned long_long, unsigned long, ULONG_MAX); + H5T_CONV_Uu(ULLONG, ULONG, + unsigned long_long, unsigned long, + ULONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -4356,7 +4257,7 @@ H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Monday, November 16, 1998 * * Modifications: * @@ -4367,7 +4268,7 @@ H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_llong_ullong, FAIL); - H5T_CONV_su(cdata, src_id, dst_id, buf, nelmts, + H5T_CONV_su(LLONG, ULLONG, long_long, unsigned long_long); FUNC_LEAVE(SUCCEED); } @@ -4383,7 +4284,7 @@ H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Failure: negative * * Programmer: Robb Matzke - * Monday, November 16, 1998 + * Monday, November 16, 1998 * * Modifications: * @@ -4394,8 +4295,9 @@ H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { FUNC_ENTER(H5T_conv_ullong_llong, FAIL); - H5T_CONV_us(cdata, src_id, dst_id, buf, nelmts, - unsigned long_long, long_long, LLONG_MAX); + H5T_CONV_us(ULLONG, LLONG, + unsigned long_long, long_long, + LLONG_MAX); FUNC_LEAVE(SUCCEED); } @@ -4409,20 +4311,22 @@ H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke - * Tuesday, June 23, 1998 + * Tuesday, June 23, 1998 * * Modifications: * *------------------------------------------------------------------------- */ herr_t -H5T_conv_float_double (hid_t __unused__ src_id, hid_t __unused__ dst_id, - H5T_cdata_t *cdata, size_t nelmts, void *buf, - void __unused__ *bkg) +H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + size_t nelmts, void *buf, void __unused__ *bkg) { size_t elmtno; /*element number */ - float *s; /*source buffer */ - double *d; /*destination buffer */ + float *src, *s; /*source buffer */ + double *dst, *d; /*destination buffer */ + H5T_t *st, *dt; /*type descriptors */ + hbool_t src_mv, dst_mv; /*align data? */ + double aligned; /*aligned data */ FUNC_ENTER (H5T_conv_float_double, FAIL); @@ -4435,11 +4339,44 @@ H5T_conv_float_double (hid_t __unused__ src_id, hid_t __unused__ dst_id, break; case H5T_CONV_CONV: - s = (float*)buf + nelmts; - d = (double*)buf + nelmts; + src = (float*)buf + nelmts-1; + dst = (double*)buf + nelmts-1; + st = H5I_object(src_id); + dt = H5I_object(dst_id); + assert(st && dt); + + /* Need alignment? */ + if (H5T_NATIVE_FLOAT_ALIGN_g>1) { + src_mv = ((size_t)buf % H5T_NATIVE_FLOAT_ALIGN_g) || + (st->size % H5T_NATIVE_FLOAT_ALIGN_g); + } else { + src_mv = FALSE; + } + if (H5T_NATIVE_DOUBLE_ALIGN_g>1) { + dst_mv = ((size_t)buf % H5T_NATIVE_DOUBLE_ALIGN_g) || + (dt->size % H5T_NATIVE_DOUBLE_ALIGN_g); + } else { + dst_mv = FALSE; + } + CI_DEBUG(src_mv, FLOAT, float); + CI_DEBUG(dst_mv, DOUBLE, double); + + for (elmtno=0; elmtnosize); + s = (float*)&aligned; + } else { + s = src; + } + if (dst_mv) d = (double*)&aligned; + else d = dst; - for (elmtno=0; elmtnosize); } break; @@ -4461,11 +4398,11 @@ H5T_conv_float_double (hid_t __unused__ src_id, hid_t __unused__ dst_id, * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke - * Tuesday, June 23, 1998 + * Tuesday, June 23, 1998 * * Modifications: * - * Robb Matzke, 7 Jul 1998 + * Robb Matzke, 7 Jul 1998 * Added overflow handling. * *------------------------------------------------------------------------- @@ -4475,8 +4412,11 @@ H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void __unused__ *bkg) { size_t elmtno; /*element number */ - double *s; /*source buffer */ - float *d; /*destination buffer */ + double *src, *s; /*source buffer */ + float *dst, *d; /*destination buffer */ + H5T_t *st, *dt; /*type descriptors */ + hbool_t src_mv, dst_mv; /*align data? */ + double aligned; /*aligned data */ FUNC_ENTER (H5T_conv_double_float, FAIL); @@ -4489,10 +4429,40 @@ H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, break; case H5T_CONV_CONV: - s = (double*)buf; - d = (float*)buf; + src = (double*)buf; + dst = (float*)buf; + st = H5I_object(src_id); + dt = H5I_object(dst_id); + assert(st && dt); + + /* Need alignment? */ + if (H5T_NATIVE_DOUBLE_ALIGN_g>1) { + src_mv = ((size_t)buf % H5T_NATIVE_DOUBLE_ALIGN_g) || + (st->size % H5T_NATIVE_DOUBLE_ALIGN_g); + } else { + src_mv = FALSE; + } + if (H5T_NATIVE_FLOAT_ALIGN_g>1) { + dst_mv = ((size_t)buf % H5T_NATIVE_FLOAT_ALIGN_g) || + (dt->size % H5T_NATIVE_FLOAT_ALIGN_g); + } else { + dst_mv = FALSE; + } + CI_DEBUG(src_mv, DOUBLE, double); + CI_DEBUG(dst_mv, FLOAT, float); + + for (elmtno=0; elmtnosize); + s = (double*)&aligned; + } else { + s = src; + } + if (dst_mv) d = (float*)&aligned; + else d = dst; - for (elmtno=0; elmtno FLT_MAX) { if (!H5T_overflow_g || (H5T_overflow_g)(src_id, dst_id, s, d)<0) { @@ -4506,6 +4476,9 @@ H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, } else { *d = *s; } + + /* Unalign destination */ + if (dst_mv) memcpy(dst, &aligned, dt->size); } break; @@ -4663,7 +4636,7 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, d[5] = d[4] = d[3] = d[1] = d[0] = 0 ; break ; case 31: - d[6] |= 0x0f & (s[3]>>2) ; + d[6] |= 0x0f & (s[3]>>2) ; d[5] = (s[3]<<6) | (s[2]>>2) ; d[4] = (s[2]<<6) | (s[1]>>2) ; d[3] = (s[1]<<6) | (s[0]>>2) ; @@ -4671,7 +4644,7 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, d[1] = d[0] = 0 ; break ; case 30: - d[6] |= 0x0f & (s[3]>>1) ; + d[6] |= 0x0f & (s[3]>>1) ; d[5] = (s[3]<<7) | (s[2]>>1) ; d[4] = (s[2]<<7) | (s[1]>>1) ; d[3] = (s[1]<<7) | (s[0]>>1) ; @@ -4679,7 +4652,7 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, d[1] = d[0] = 0 ; break ; case 29: - d[6] |= 0x0f & s[3] ; + d[6] |= 0x0f & s[3] ; d[5] = s[2] ; d[4] = s[1] ; d[3] = s[0] ; @@ -4687,48 +4660,48 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, break ; case 28: d[6] |= ((s[3]<<1) | (s[2]>>7)) & 0x0f ; - d[5] = (s[2]<<1) | (s[1]>>7) ; - d[4] = (s[1]<<1) | (s[0]>>7) ; - d[3] = (s[0]<<1) ; + d[5] = (s[2]<<1) | (s[1]>>7) ; + d[4] = (s[1]<<1) | (s[0]>>7) ; + d[3] = (s[0]<<1) ; d[2] = d[1] = d[0] = 0 ; break ; case 27: d[6] |= ((s[3]<<2) | (s[2]>>6)) & 0x0f ; - d[5] = (s[2]<<2) | (s[1]>>6) ; - d[4] = (s[1]<<2) | (s[0]>>6) ; - d[3] = (s[0]<<2) ; + d[5] = (s[2]<<2) | (s[1]>>6) ; + d[4] = (s[1]<<2) | (s[0]>>6) ; + d[3] = (s[0]<<2) ; d[2] = d[1] = d[0] = 0 ; break ; case 26: d[6] |= ((s[3]<<3) | (s[2]>>5)) & 0x0f ; - d[5] = (s[2]<<3) | (s[1]>>5) ; - d[4] = (s[1]<<3) | (s[0]>>5) ; - d[3] = (s[0]<<3) ; + d[5] = (s[2]<<3) | (s[1]>>5) ; + d[4] = (s[1]<<3) | (s[0]>>5) ; + d[3] = (s[0]<<3) ; d[2] = d[1] = d[0] = 0 ; break ; case 25: - d[6] |= 0x0f & (s[2]>>4) ; + d[6] |= 0x0f & (s[2]>>4) ; d[5] = (s[2]<<4) | (s[1]>>4) ; d[4] = (s[1]<<4) | (s[0]>>4) ; d[3] = (s[0]<<4) ; d[2] = d[1] = d[0] = 0 ; break ; case 24: - d[6] |= 0x0f & (s[2]>>3) ; + d[6] |= 0x0f & (s[2]>>3) ; d[5] = (s[2]<<5) | (s[1]>>3) ; d[4] = (s[1]<<5) | (s[0]>>3) ; d[3] = (s[0]<<5) ; d[2] = d[1] = d[0] = 0 ; break ; case 23: - d[6] |= 0x0f & (s[2]>>2) ; + d[6] |= 0x0f & (s[2]>>2) ; d[5] = (s[2]<<6) | (s[1]>>2) ; d[4] = (s[1]<<6) | (s[0]>>2) ; d[3] = (s[0]<<6) ; d[2] = d[1] = d[0] = 0 ; break ; case 22: - d[6] |= 0x0f & (s[2]>>1) ; + d[6] |= 0x0f & (s[2]>>1) ; d[5] = (s[2]<<7) | (s[1]>>1) ; d[4] = (s[1]<<7) | (s[0]>>1) ; d[3] = (s[0]<<7) ; @@ -4742,42 +4715,42 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, break ; case 20: d[6] |= ((s[2]<<1) | (s[1]>>7)) & 0x0f ; - d[5] = (s[1]<<1) | (s[0]>>7) ; - d[4] = (s[0]<<1) ; + d[5] = (s[1]<<1) | (s[0]>>7) ; + d[4] = (s[0]<<1) ; d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 19: d[6] |= ((s[2]<<2) | (s[1]>>6)) & 0x0f ; - d[5] = (s[1]<<2) | (s[0]>>6) ; - d[4] = (s[0]<<2) ; + d[5] = (s[1]<<2) | (s[0]>>6) ; + d[4] = (s[0]<<2) ; d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 18: d[6] |= ((s[2]<<3) | (s[1]>>5)) & 0x0f ; - d[5] = (s[1]<<3) | (s[0]>>5) ; - d[4] = (s[0]<<3) ; + d[5] = (s[1]<<3) | (s[0]>>5) ; + d[4] = (s[0]<<3) ; d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 17: - d[6] |= 0x0f & (s[1]>>4) ; + d[6] |= 0x0f & (s[1]>>4) ; d[5] = (s[1]<<4) | (s[0]>>4) ; d[4] = (s[0]<<4) ; d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 16: - d[6] |= 0x0f & (s[1]>>3) ; + d[6] |= 0x0f & (s[1]>>3) ; d[5] = (s[1]<<5) | (s[0]>>3) ; d[4] = (s[0]<<5) ; d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 15: - d[6] |= 0x0f & (s[1]>>2) ; + d[6] |= 0x0f & (s[1]>>2) ; d[5] = (s[1]<<6) | (s[0]>>2) ; d[4] = (s[0]<<6) ; d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 14: - d[6] |= 0x0f & (s[1]>>1) ; + d[6] |= 0x0f & (s[1]>>1) ; d[5] = (s[1]<<7) | (s[0]>>1) ; d[4] = (s[0]<<7) ; d[3] = d[2] = d[1] = d[0] = 0 ; @@ -4789,36 +4762,36 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, break ; case 12: d[6] |= ((s[1]<<1) | (s[0]>>7)) & 0x0f ; - d[5] = (s[0]<<1) ; + d[5] = (s[0]<<1) ; d[4] = d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 11: d[6] |= ((s[1]<<2) | (s[0]>>6)) & 0x0f ; - d[5] = (s[0]<<2) ; + d[5] = (s[0]<<2) ; d[4] = d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 10: d[6] |= ((s[1]<<3) | (s[0]>>5)) & 0x0f ; - d[5] = (s[0]<<3) ; + d[5] = (s[0]<<3) ; d[4] = d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 9: - d[6] |= 0x0f & (s[0]>>4) ; + d[6] |= 0x0f & (s[0]>>4) ; d[5] = (s[0]<<4) ; d[4] = d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 8: - d[6] |= 0x0f & (s[0]>>3) ; + d[6] |= 0x0f & (s[0]>>3) ; d[5] = (s[0]<<5) ; d[4] = d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 7: - d[6] |= 0x0f & (s[0]>>2) ; + d[6] |= 0x0f & (s[0]>>2) ; d[5] = (s[0]<<6) ; d[4] = d[3] = d[2] = d[1] = d[0] = 0 ; break ; case 6: - d[6] |= 0x0f & (s[0]>>1) ; + d[6] |= 0x0f & (s[0]>>1) ; d[5] = (s[0]<<7) ; d[4] = d[3] = d[2] = d[1] = d[0] = 0 ; break ; diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 950d5a5..d31e6ff 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -130,6 +130,26 @@ extern H5T_overflow_t H5T_overflow_g; H5T_path_t *H5T_path_find (const char *name, const H5T_t *src, const H5T_t *dst, hbool_t create, H5T_conv_t func); +/* + * Alignment information for native types. A value of N indicates that the + * data must be aligned on an address ADDR such that 0 == ADDR mod N. When + * N=1 no alignment is required; N=0 implies that alignment constraints were + * not calculated. + */ +extern size_t H5T_NATIVE_SCHAR_ALIGN_g; +extern size_t H5T_NATIVE_UCHAR_ALIGN_g; +extern size_t H5T_NATIVE_SHORT_ALIGN_g; +extern size_t H5T_NATIVE_USHORT_ALIGN_g; +extern size_t H5T_NATIVE_INT_ALIGN_g; +extern size_t H5T_NATIVE_UINT_ALIGN_g; +extern size_t H5T_NATIVE_LONG_ALIGN_g; +extern size_t H5T_NATIVE_ULONG_ALIGN_g; +extern size_t H5T_NATIVE_LLONG_ALIGN_g; +extern size_t H5T_NATIVE_ULLONG_ALIGN_g; +extern size_t H5T_NATIVE_FLOAT_ALIGN_g; +extern size_t H5T_NATIVE_DOUBLE_ALIGN_g; +extern size_t H5T_NATIVE_LDOUBLE_ALIGN_g; + /* Conversion functions */ herr_t H5T_conv_order (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *_buf, void *bkg); diff --git a/src/H5config.h.in b/src/H5config.h.in index 95e70c1..12b7523 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -74,6 +74,9 @@ /* The number of bytes in a __int64. */ #undef SIZEOF___INT64 +/* The number of bytes in a char. */ +#undef SIZEOF_CHAR + /* The number of bytes in a double. */ #undef SIZEOF_DOUBLE @@ -200,6 +203,9 @@ /* Define if you have the header file. */ #undef HAVE_SYS_TIME_H +/* Define if you have the header file. */ +#undef HAVE_SYS_TIMEB_H + /* Define if you have the header file. */ #undef HAVE_UNISTD_H diff --git a/src/H5detect.c b/src/H5detect.c index bf97452..ae1ecb2 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -39,19 +39,19 @@ static const char *FileHeader = "\n\ */ typedef struct detected_t { const char *varname; - int size; /*total byte size*/ - int precision; /*meaningful bits*/ - int offset; /*bit offset to meaningful bits*/ - int perm[32]; - int sign; - int mpos, msize, imp; - int epos, esize; - unsigned long bias; + int size; /*total byte size */ + int precision; /*meaningful bits */ + int offset; /*bit offset to meaningful bits */ + int perm[32]; /*byte order */ + int sign; /*location of sign bit */ + int mpos, msize, imp;/*information about mantissa */ + int epos, esize; /*information about exponent */ + unsigned long bias; /*exponent bias for floating pt.*/ + size_t align; /*required byte alignment */ } detected_t; static void print_results(int nd, detected_t *d); static void iprint(detected_t *); -static void print_known_formats(detected_t *); static int byte_cmp(int, void *, void *); static int bit_cmp(int, int *, void *, void *); static void fix_order(int, int, int, int *, const char **); @@ -59,6 +59,7 @@ static int imp_bit(int, int *, void *, void *); static unsigned long find_bias(int, int, int *, void *); static void precision (detected_t*); static void print_header(void); +static size_t align_g[] = {1, 2, 4, 8, 16}; /*------------------------------------------------------------------------- @@ -114,58 +115,7 @@ precision (detected_t *d) } } - -/*------------------------------------------------------------------------- - * For convenience, we place here in a table descriptions of all - * architectures we've seen so far. That way we can print a description - * of the system on which the program is run. We place the system name - * in the VARNAME field. - *------------------------------------------------------------------------- - */ -#define LE {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15, \ - 16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31} -#define LE_1 LE -#define LE_2 LE -#define LE_4 LE -#define LE_8 LE - -#define BE_1 {0} -#define BE_2 {1,0} -#define BE_4 {3,2,1,0} -#define BE_8 {7,6,5,4,3,2,1,0} -#define INTEGER 0,0,0,0,0,0,0 - -static detected_t Known[] = -{ - /* Single-byte quantities */ - {"Byte addressable", - 1, 8, 0, LE_1, INTEGER}, - - /* Little-endian integer */ - {"Little-endian", - 2, 16, 0, LE_2, INTEGER}, - {"Little-endian", - 4, 32, 0, LE_4, INTEGER}, - - /* Big-endian integer */ - {"Big-endian", - 2, 16, 0, BE_2, INTEGER}, - {"Big-endian", - 4, 32, 0, BE_4, INTEGER}, - - /* Little-endian IEEE floating-point */ - {"Little-endian IEEE", - 4, 32, 0, LE_4, 31, 0, 23, 1, 23, 8, 127}, - {"Little-endian IEEE", - 8, 64, 0, LE_8, 63, 0, 52, 1, 52, 11, 1023}, - - /* Big-endian IEEE floating-point */ - {"Big-endian IEEE", - 4, 32, 0, BE_4, 31, 0, 23, 1, 23, 8, 127}, - {"Big-endian IEEE", - 8, 64, 0, BE_8, 63, 0, 52, 1, 52, 11, 1023}, -}; /*------------------------------------------------------------------------- * Function: DETECT_I @@ -210,6 +160,7 @@ static detected_t Known[] = INFO.perm[_i] = _j; \ } \ INFO.sign = ('U'!=*(#VAR)); \ + ALIGNMENT(TYPE, INFO.align); \ precision (&(INFO)); \ } @@ -286,8 +237,47 @@ static detected_t Known[] = \ _v1 = 1.0; \ INFO.bias = find_bias (INFO.epos, INFO.esize, INFO.perm, &_v1); \ + ALIGNMENT(TYPE, INFO.align); \ precision (&(INFO)); \ } + +#define ALIGNMENT(TYPE,ALIGN) { \ + char *_buf=malloc(sizeof(TYPE)+align_g[NELMTS(align_g)-1]); \ + TYPE _val=0; \ + size_t _ano; \ + pid_t _child; \ + int _status; \ + \ + for (_ano=0; _ano=NELMTS(align_g)) { \ + ALIGN=0; \ + fprintf(stderr, "unable to calculate alignment for %s\n", #TYPE); \ + } \ +} + /*------------------------------------------------------------------------- * Function: print_results @@ -346,8 +336,7 @@ H5T_native_open (void)\n\ /* Print a comment to describe this section of definitions. */ printf("\n /*\n"); - iprint(d + i); - print_known_formats(d + i); + iprint(d+i); printf(" */\n"); /* The part common to fixed and floating types */ @@ -404,6 +393,8 @@ H5T_native_open (void)\n\ \"failure\");\n\ }\n", d[i].varname); + printf(" H5T_NATIVE_%s_ALIGN_g = %lu;\n", + d[i].varname, (unsigned long)(d[i].align)); } printf(" FUNC_LEAVE (SUCCEED);\n}\n"); @@ -475,50 +466,16 @@ iprint(detected_t *d) if (d->msize) { printf(" * Implicit bit? %s\n", d->imp ? "yes" : "no"); } -} - - -/*------------------------------------------------------------------------- - * Function: print_known_formats - * - * Purpose: Prints archetecture names for the specified format - * description, if any. - * - * Return: void - * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Jun 13, 1996 - * - * Modifications: - * - *------------------------------------------------------------------------- - */ -static void -print_known_formats(detected_t *d) -{ - - int i, j, diff; - int n = sizeof(Known) / sizeof(Known[0]); - - for (i=0; isize != Known[i].size) continue; - if (d->precision != Known[i].precision) continue; - if (d->offset != Known[i].offset) continue; - for (j = diff = 0; !diff && j < d->size; j++) { - if (d->perm[j] != Known[i].perm[j]) diff = 1; - } - if (diff) continue; - /* if (d->sign != Known[i].sign) continue; */ - if (d->mpos != Known[i].mpos) continue; - if (d->msize != Known[i].msize) continue; - if (d->imp != Known[i].imp) continue; - if (d->epos != Known[i].epos) continue; - if (d->esize != Known[i].esize) continue; - if (d->bias != Known[i].bias) continue; - - printf(" * %s\n", Known[i].varname); + /* + * Alignment + */ + if (0==d->align) { + printf(" * Alignment: NOT CALCULATED\n"); + } else if (1==d->align) { + printf(" * Alignment: none\n"); + } else { + printf(" * Alignemtn: %lu\n", (unsigned long)(d->align)); } } diff --git a/src/H5private.h b/src/H5private.h index 13fdcb2..e0b349e 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -25,6 +25,7 @@ # include # include # include +# include # include # include # include diff --git a/test/.distdep b/test/.distdep index 0783417..a054a1a 100644 --- a/test/.distdep +++ b/test/.distdep @@ -1,3 +1,33 @@ +h5test.o: \ + h5test.c \ + h5test.h \ + ../src/hdf5.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Ipublic.h \ + ../src/H5Apublic.h \ + ../src/H5ACpublic.h \ + ../src/H5Bpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Epublic.h \ + ../src/H5Fpublic.h \ + ../src/H5Gpublic.h \ + ../src/H5HGpublic.h \ + ../src/H5HLpublic.h \ + ../src/H5MFpublic.h \ + ../src/H5MMpublic.h \ + ../src/H5Opublic.h \ + ../src/H5Ppublic.h \ + ../src/H5Zpublic.h \ + ../src/H5Rpublic.h \ + ../src/H5RApublic.h \ + ../src/H5Spublic.h \ + ../src/H5Tpublic.h \ + ../src/H5private.h \ + ../src/H5Tpkg.h \ + ../src/H5HGprivate.h \ + ../src/H5Fprivate.h \ + ../src/H5Rprivate.h big.o: \ big.c \ h5test.h \ @@ -27,9 +57,7 @@ big.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h + ../src/H5Rprivate.h bittests.o: \ bittests.c \ h5test.h \ @@ -59,9 +87,31 @@ bittests.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h + ../src/H5Rprivate.h +chunk.o: \ + chunk.c \ + ../src/hdf5.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Ipublic.h \ + ../src/H5Apublic.h \ + ../src/H5ACpublic.h \ + ../src/H5Bpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Epublic.h \ + ../src/H5Fpublic.h \ + ../src/H5Gpublic.h \ + ../src/H5HGpublic.h \ + ../src/H5HLpublic.h \ + ../src/H5MFpublic.h \ + ../src/H5MMpublic.h \ + ../src/H5Opublic.h \ + ../src/H5Ppublic.h \ + ../src/H5Zpublic.h \ + ../src/H5Rpublic.h \ + ../src/H5RApublic.h \ + ../src/H5Spublic.h \ + ../src/H5Tpublic.h cmpd_dset.o: \ cmpd_dset.c \ h5test.h \ @@ -91,9 +141,7 @@ cmpd_dset.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h + ../src/H5Rprivate.h dsets.o: \ dsets.c \ h5test.h \ @@ -123,9 +171,37 @@ dsets.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h + ../src/H5Rprivate.h +extend.o: \ + extend.c \ + h5test.h \ + ../src/hdf5.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Ipublic.h \ + ../src/H5Apublic.h \ + ../src/H5ACpublic.h \ + ../src/H5Bpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Epublic.h \ + ../src/H5Fpublic.h \ + ../src/H5Gpublic.h \ + ../src/H5HGpublic.h \ + ../src/H5HLpublic.h \ + ../src/H5MFpublic.h \ + ../src/H5MMpublic.h \ + ../src/H5Opublic.h \ + ../src/H5Ppublic.h \ + ../src/H5Zpublic.h \ + ../src/H5Rpublic.h \ + ../src/H5RApublic.h \ + ../src/H5Spublic.h \ + ../src/H5Tpublic.h \ + ../src/H5private.h \ + ../src/H5Tpkg.h \ + ../src/H5HGprivate.h \ + ../src/H5Fprivate.h \ + ../src/H5Rprivate.h external.o: \ external.c \ h5test.h \ @@ -155,9 +231,7 @@ external.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h + ../src/H5Rprivate.h fillval.o: \ fillval.c \ h5test.h \ @@ -187,9 +261,7 @@ fillval.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h + ../src/H5Rprivate.h flush1.o: \ flush1.c \ h5test.h \ @@ -219,9 +291,7 @@ flush1.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h + ../src/H5Rprivate.h flush2.o: \ flush2.c \ h5test.h \ @@ -251,9 +321,7 @@ flush2.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h + ../src/H5Rprivate.h gheap.o: \ gheap.c \ h5test.h \ @@ -286,9 +354,7 @@ gheap.o: \ ../src/H5Rprivate.h \ ../src/H5Tprivate.h \ ../src/H5Gprivate.h \ - ../src/H5Bprivate.h \ - ../src/H5Eprivate.h \ - ../src/H5Iprivate.h + ../src/H5Bprivate.h hyperslab.o: \ hyperslab.c \ ../src/H5private.h \ @@ -355,7 +421,8 @@ istore.o: \ ../src/H5Oprivate.h \ ../src/H5Sprivate.h \ ../src/H5Zprivate.h \ - ../src/H5Iprivate.h + ../src/H5Iprivate.h \ + ../src/H5Pprivate.h lheap.o: \ lheap.c \ h5test.h \ @@ -387,7 +454,8 @@ lheap.o: \ ../src/H5Fprivate.h \ ../src/H5Rprivate.h \ ../src/H5Tprivate.h \ - ../src/H5Gprivate.h + ../src/H5Gprivate.h \ + ../src/H5Bprivate.h links.o: \ links.c \ h5test.h \ @@ -417,9 +485,7 @@ links.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h + ../src/H5Rprivate.h mount.o: \ mount.c \ h5test.h \ @@ -449,9 +515,37 @@ mount.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h + ../src/H5Rprivate.h +mtime.o: \ + mtime.c \ + h5test.h \ + ../src/hdf5.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Ipublic.h \ + ../src/H5Apublic.h \ + ../src/H5ACpublic.h \ + ../src/H5Bpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Epublic.h \ + ../src/H5Fpublic.h \ + ../src/H5Gpublic.h \ + ../src/H5HGpublic.h \ + ../src/H5HLpublic.h \ + ../src/H5MFpublic.h \ + ../src/H5MMpublic.h \ + ../src/H5Opublic.h \ + ../src/H5Ppublic.h \ + ../src/H5Zpublic.h \ + ../src/H5Rpublic.h \ + ../src/H5RApublic.h \ + ../src/H5Spublic.h \ + ../src/H5Tpublic.h \ + ../src/H5private.h \ + ../src/H5Tpkg.h \ + ../src/H5HGprivate.h \ + ../src/H5Fprivate.h \ + ../src/H5Rprivate.h ohdr.o: \ ohdr.c \ h5test.h \ @@ -487,9 +581,7 @@ ohdr.o: \ ../src/H5Bprivate.h \ ../src/H5Iprivate.h \ ../src/H5Oprivate.h \ - ../src/H5Sprivate.h \ - ../src/H5Zprivate.h \ - ../src/H5Gpkg.h + ../src/H5Sprivate.h overhead.o: \ overhead.c \ ../src/hdf5.h \ @@ -592,33 +684,10 @@ stab.o: \ ../src/H5Fprivate.h \ ../src/H5Rprivate.h \ ../src/H5Tprivate.h \ - ../src/H5Gprivate.h -tfile.o: \ - tfile.c \ - testhdf5.h \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Eprivate.h \ - ../src/H5Epublic.h \ - ../src/H5Ipublic.h \ - ../src/H5Bprivate.h \ - ../src/H5Bpublic.h \ - ../src/H5Fprivate.h \ - ../src/H5Fpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Pprivate.h -tmeta.o: \ - tmeta.c \ - testhdf5.h \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Eprivate.h \ - ../src/H5Epublic.h \ - ../src/H5Ipublic.h -tselect.o: \ - tselect.c \ + ../src/H5Gprivate.h \ + ../src/H5Bprivate.h +tattr.o: \ + tattr.c \ testhdf5.h \ ../src/H5private.h \ ../src/H5public.h \ @@ -641,81 +710,77 @@ tselect.o: \ ../src/H5Ppublic.h \ ../src/H5Zpublic.h \ ../src/H5Rpublic.h -unlink.o: \ - unlink.c \ - h5test.h \ - ../src/hdf5.h \ +testhdf5.o: \ + testhdf5.c \ + testhdf5.h \ + ../src/H5private.h \ + ../src/H5public.h \ + ../src/H5config.h +tfile.o: \ + tfile.c \ + testhdf5.h \ + ../src/H5private.h \ ../src/H5public.h \ ../src/H5config.h \ + ../src/H5Eprivate.h \ + ../src/H5Epublic.h \ ../src/H5Ipublic.h \ - ../src/H5Apublic.h \ - ../src/H5ACpublic.h \ + ../src/H5Bprivate.h \ ../src/H5Bpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Epublic.h \ + ../src/H5Fprivate.h \ ../src/H5Fpublic.h \ - ../src/H5Gpublic.h \ - ../src/H5HGpublic.h \ - ../src/H5HLpublic.h \ - ../src/H5MFpublic.h \ - ../src/H5MMpublic.h \ - ../src/H5Opublic.h \ - ../src/H5Ppublic.h \ - ../src/H5Zpublic.h \ - ../src/H5Rpublic.h \ - ../src/H5RApublic.h \ - ../src/H5Spublic.h \ - ../src/H5Tpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Pprivate.h +th5s.o: \ + th5s.c \ + testhdf5.h \ ../src/H5private.h \ - ../src/H5Tpkg.h \ - ../src/H5HGprivate.h \ - ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h -h5test.o: \ - h5test.c \ - h5test.h \ - ../src/hdf5.h \ ../src/H5public.h \ ../src/H5config.h \ + ../src/H5Eprivate.h \ + ../src/H5Epublic.h \ ../src/H5Ipublic.h \ - ../src/H5Apublic.h \ - ../src/H5ACpublic.h \ + ../src/H5Bprivate.h \ ../src/H5Bpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Epublic.h \ + ../src/H5Fprivate.h \ ../src/H5Fpublic.h \ + ../src/H5Dpublic.h \ + ../src/H5Sprivate.h \ + ../src/H5Spublic.h \ + ../src/H5Gprivate.h \ ../src/H5Gpublic.h \ - ../src/H5HGpublic.h \ - ../src/H5HLpublic.h \ - ../src/H5MFpublic.h \ - ../src/H5MMpublic.h \ + ../src/H5Oprivate.h \ ../src/H5Opublic.h \ - ../src/H5Ppublic.h \ - ../src/H5Zpublic.h \ - ../src/H5Rpublic.h \ - ../src/H5RApublic.h \ - ../src/H5Spublic.h \ - ../src/H5Tpublic.h \ - ../src/H5private.h \ - ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ - ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ + ../src/H5HGpublic.h \ ../src/H5Tprivate.h \ - ../src/H5Gprivate.h -chunk.o: \ - chunk.c \ - ../src/hdf5.h \ + ../src/H5Tpublic.h \ + ../src/H5Zprivate.h \ + ../src/H5Zpublic.h \ + ../src/H5Pprivate.h +tmeta.o: \ + tmeta.c \ + testhdf5.h \ + ../src/H5private.h \ + ../src/H5public.h \ + ../src/H5config.h \ + ../src/H5Eprivate.h \ + ../src/H5Epublic.h \ + ../src/H5Ipublic.h +trefer.o: \ + trefer.c \ + testhdf5.h \ + ../src/H5private.h \ ../src/H5public.h \ ../src/H5config.h \ + ../src/H5Eprivate.h \ + ../src/H5Epublic.h \ ../src/H5Ipublic.h \ + ../src/hdf5.h \ ../src/H5Apublic.h \ ../src/H5ACpublic.h \ ../src/H5Bpublic.h \ ../src/H5Dpublic.h \ - ../src/H5Epublic.h \ ../src/H5Fpublic.h \ ../src/H5Gpublic.h \ ../src/H5HGpublic.h \ @@ -725,22 +790,21 @@ chunk.o: \ ../src/H5Opublic.h \ ../src/H5Ppublic.h \ ../src/H5Zpublic.h \ - ../src/H5Rpublic.h \ - ../src/H5RApublic.h \ - ../src/H5Spublic.h \ - ../src/H5Tpublic.h -dtypes.o: \ - dtypes.c \ - h5test.h \ - ../src/hdf5.h \ + ../src/H5Rpublic.h +tselect.o: \ + tselect.c \ + testhdf5.h \ + ../src/H5private.h \ ../src/H5public.h \ ../src/H5config.h \ + ../src/H5Eprivate.h \ + ../src/H5Epublic.h \ ../src/H5Ipublic.h \ + ../src/hdf5.h \ ../src/H5Apublic.h \ ../src/H5ACpublic.h \ ../src/H5Bpublic.h \ ../src/H5Dpublic.h \ - ../src/H5Epublic.h \ ../src/H5Fpublic.h \ ../src/H5Gpublic.h \ ../src/H5HGpublic.h \ @@ -750,19 +814,9 @@ dtypes.o: \ ../src/H5Opublic.h \ ../src/H5Ppublic.h \ ../src/H5Zpublic.h \ - ../src/H5Rpublic.h \ - ../src/H5RApublic.h \ - ../src/H5Spublic.h \ - ../src/H5Tpublic.h \ - ../src/H5private.h \ - ../src/H5Tpkg.h \ - ../src/H5HGprivate.h \ - ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h -extend.o: \ - extend.c \ + ../src/H5Rpublic.h +unlink.o: \ + unlink.c \ h5test.h \ ../src/hdf5.h \ ../src/H5public.h \ @@ -790,11 +844,9 @@ extend.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h -mtime.o: \ - mtime.c \ + ../src/H5Rprivate.h +dtypes.o: \ + dtypes.c \ h5test.h \ ../src/hdf5.h \ ../src/H5public.h \ @@ -822,87 +874,4 @@ mtime.o: \ ../src/H5Tpkg.h \ ../src/H5HGprivate.h \ ../src/H5Fprivate.h \ - ../src/H5Rprivate.h \ - ../src/H5Tprivate.h \ - ../src/H5Gprivate.h -testhdf5.o: \ - testhdf5.c \ - testhdf5.h \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h -tattr.o: \ - tattr.c \ - testhdf5.h \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Eprivate.h \ - ../src/H5Epublic.h \ - ../src/H5Ipublic.h \ - ../src/hdf5.h \ - ../src/H5Apublic.h \ - ../src/H5ACpublic.h \ - ../src/H5Bpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Fpublic.h \ - ../src/H5Gpublic.h \ - ../src/H5HGpublic.h \ - ../src/H5HLpublic.h \ - ../src/H5MFpublic.h \ - ../src/H5MMpublic.h \ - ../src/H5Opublic.h \ - ../src/H5Ppublic.h \ - ../src/H5Zpublic.h \ - ../src/H5Rpublic.h -th5s.o: \ - th5s.c \ - testhdf5.h \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Eprivate.h \ - ../src/H5Epublic.h \ - ../src/H5Ipublic.h \ - ../src/H5Bprivate.h \ - ../src/H5Bpublic.h \ - ../src/H5Fprivate.h \ - ../src/H5Fpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Sprivate.h \ - ../src/H5Spublic.h \ - ../src/H5Gprivate.h \ - ../src/H5Gpublic.h \ - ../src/H5Oprivate.h \ - ../src/H5Opublic.h \ - ../src/H5HGprivate.h \ - ../src/H5HGpublic.h \ - ../src/H5Tprivate.h \ - ../src/H5Tpublic.h \ - ../src/H5Zprivate.h \ - ../src/H5Zpublic.h \ - ../src/H5Pprivate.h -trefer.o: \ - trefer.c \ - testhdf5.h \ - ../src/H5private.h \ - ../src/H5public.h \ - ../src/H5config.h \ - ../src/H5Eprivate.h \ - ../src/H5Epublic.h \ - ../src/H5Ipublic.h \ - ../src/hdf5.h \ - ../src/H5Apublic.h \ - ../src/H5ACpublic.h \ - ../src/H5Bpublic.h \ - ../src/H5Dpublic.h \ - ../src/H5Fpublic.h \ - ../src/H5Gpublic.h \ - ../src/H5HGpublic.h \ - ../src/H5HLpublic.h \ - ../src/H5MFpublic.h \ - ../src/H5MMpublic.h \ - ../src/H5Opublic.h \ - ../src/H5Ppublic.h \ - ../src/H5Zpublic.h \ - ../src/H5Rpublic.h + ../src/H5Rprivate.h diff --git a/test/dtypes.c b/test/dtypes.c index 5bc9060..2789a51 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -16,6 +16,26 @@ /* Define if you want to see a count of overflows */ #undef SHOW_OVERFLOWS +/* + * Offset from alinged memory returned by malloc(). This can be used to test + * that type conversions handle non-aligned buffers correctly. + */ +#define ALIGNMENT 0 + +/* + * Define if you want to test alignment code on a machine that doesn't + * normally require alignment. When set, all native data types must be aligned + * on a byte boundary equal to the data size. + */ +#undef TEST_ALIGNMENT + +/* Alignment test stuff */ +#ifdef TEST_ALIGNMENT +#define H5T_PACKAGE +#include +#endif +#define SET_ALIGNMENT(TYPE,VAL) \ + H5T_NATIVE_##TYPE##_ALIGN_g=MAX(H5T_NATIVE_##TYPE##_ALIGN_g, VAL) const char *FILENAME[] = { "dtypes1", @@ -35,6 +55,7 @@ typedef struct complex_t { */ #define ENDIAN(Z,I) (H5T_ORDER_BE==endian?(I):(Z)-((I)+1)) + typedef enum flt_t { FLT_FLOAT, FLT_DOUBLE, FLT_LDOUBLE, FLT_OTHER } flt_t; @@ -64,6 +85,10 @@ static int without_hardware_g = 0; # define HANDLE_SIGFPE #endif +/* Allocates memory aligned on a certain boundary. */ +#define aligned_malloc(Z) ((void*)((char*)malloc(ALIGNMENT+Z)+ALIGNMENT)) +#define aligned_free(M) free((char*)(M)-ALIGNMENT) + void some_dummy_func(float x); @@ -227,6 +252,22 @@ reset_hdf5(void) H5Tset_overflow(overflow_handler); #endif if (without_hardware_g) h5_no_hwconv(); +#ifdef TEST_ALIGNMENT + SET_ALIGNMENT(SCHAR, SIZEOF_CHAR); + SET_ALIGNMENT(UCHAR, SIZEOF_CHAR); + SET_ALIGNMENT(SHORT, SIZEOF_SHORT); + SET_ALIGNMENT(USHORT, SIZEOF_SHORT); + SET_ALIGNMENT(INT, SIZEOF_INT); + SET_ALIGNMENT(UINT, SIZEOF_INT); + SET_ALIGNMENT(LONG, SIZEOF_LONG); + SET_ALIGNMENT(ULONG, SIZEOF_LONG); + SET_ALIGNMENT(LLONG, SIZEOF_LONG_LONG); + SET_ALIGNMENT(ULLONG, SIZEOF_LONG_LONG); + SET_ALIGNMENT(FLOAT, SIZEOF_FLOAT); + SET_ALIGNMENT(DOUBLE, SIZEOF_DOUBLE); + SET_ALIGNMENT(LDOUBLE, SIZEOF_LONG_DOUBLE); +#endif + } @@ -1173,6 +1214,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) unsigned char dst_bits[32]; /*dest value in LE order*/ size_t src_nbits; /*source length in bits */ size_t dst_nbits; /*dst length in bits */ + long_long aligned; /*restrictive alignment */ signed char hw_char; unsigned char hw_uchar; short hw_short; @@ -1185,6 +1227,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) unsigned long_long hw_ullong; + /* What are the names of the source and destination types */ if (H5Tequal(src, H5T_NATIVE_SCHAR)) { src_type_name = "signed char"; @@ -1270,8 +1313,8 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) endian = H5Tget_order(H5T_NATIVE_INT); src_size = H5Tget_size(src); dst_size = H5Tget_size(dst); - buf = malloc(nelmts*MAX(src_size, dst_size)); - saved = malloc(nelmts*MAX(src_size, dst_size)); + buf = aligned_malloc(nelmts*MAX(src_size, dst_size)); + saved = aligned_malloc(nelmts*MAX(src_size, dst_size)); noverflows_g = 0; /* The tests */ @@ -1303,34 +1346,47 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) hw = (unsigned char*)&hw_char; switch (src_type) { case INT_CHAR: - hw_char = ((signed char*)saved)[j]; + memcpy(&aligned, (signed char*)saved+j, sizeof(char)); + hw_char = *((signed char*)&aligned); break; case INT_UCHAR: - hw_char = ((unsigned char*)saved)[j]; + memcpy(&aligned, (unsigned char*)saved+j, sizeof(char)); + hw_char = *((unsigned char*)&aligned); break; case INT_SHORT: - hw_char = ((short*)saved)[j]; + memcpy(&aligned, (short*)saved+j, sizeof(short)); + hw_char = *((short*)&aligned); break; case INT_USHORT: - hw_char = ((unsigned short*)saved)[j]; + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + hw_char = *((unsigned short*)&aligned); break; case INT_INT: - hw_char = ((int*)saved)[j]; + memcpy(&aligned, (int*)saved+j, sizeof(int)); + hw_char = *((int*)&aligned); break; case INT_UINT: - hw_char = ((unsigned*)saved)[j]; + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + hw_char = *((unsigned*)&aligned); break; case INT_LONG: - hw_char = ((long*)saved)[j]; + memcpy(&aligned, (long*)saved+j, sizeof(long)); + hw_char = *((long*)&aligned); break; case INT_ULONG: - hw_char = ((unsigned long*)saved)[j]; + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + hw_char = *((unsigned long*)&aligned); break; case INT_LLONG: - hw_char = ((long_long*)saved)[j]; + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + hw_char = *((long_long*)&aligned); break; case INT_ULLONG: - hw_char = ((unsigned long_long*)saved)[j]; + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); + hw_char = *((unsigned long_long*)&aligned); break; case INT_OTHER: break; @@ -1339,34 +1395,49 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) hw = (unsigned char*)&hw_uchar; switch (src_type) { case INT_CHAR: - hw_uchar = ((signed char*)saved)[j]; + memcpy(&aligned, (signed char*)saved+j, + sizeof(signed char)); + hw_uchar = *((signed char*)&aligned); break; case INT_UCHAR: - hw_uchar = ((unsigned char*)saved)[j]; + memcpy(&aligned, (unsigned char*)saved+j, + sizeof(unsigned char)); + hw_uchar = *((unsigned char*)&aligned); break; case INT_SHORT: - hw_uchar = ((short*)saved)[j]; + memcpy(&aligned, (short*)saved+j, sizeof(short)); + hw_uchar = *((short*)&aligned); break; case INT_USHORT: - hw_uchar = ((unsigned short*)saved)[j]; + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + hw_uchar = *((unsigned short*)&aligned); break; case INT_INT: - hw_uchar = ((int*)saved)[j]; + memcpy(&aligned, (int*)saved+j, sizeof(int)); + hw_uchar = *((int*)&aligned); break; case INT_UINT: - hw_uchar = ((unsigned*)saved)[j]; + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + hw_uchar = *((unsigned*)&aligned); break; case INT_LONG: - hw_uchar = ((long*)saved)[j]; + memcpy(&aligned, (long*)saved+j, sizeof(long)); + hw_uchar = *((long*)&aligned); break; case INT_ULONG: - hw_uchar = ((unsigned long*)saved)[j]; + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + hw_uchar = *((unsigned long*)&aligned); break; case INT_LLONG: - hw_uchar = ((long_long*)saved)[j]; + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + hw_uchar = *((long_long*)&aligned); break; case INT_ULLONG: - hw_uchar = ((unsigned long_long*)saved)[j]; + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); + hw_uchar = *((unsigned long_long*)&aligned); break; case INT_OTHER: break; @@ -1375,34 +1446,49 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) hw = (unsigned char*)&hw_short; switch (src_type) { case INT_CHAR: - hw_short = ((signed char*)saved)[j]; + memcpy(&aligned, (signed char*)saved+j, + sizeof(signed char)); + hw_short = *((signed char*)&aligned); break; case INT_UCHAR: - hw_short = ((unsigned char*)saved)[j]; + memcpy(&aligned, (unsigned char*)saved+j, + sizeof(unsigned char)); + hw_short = *((unsigned char*)&aligned); break; case INT_SHORT: - hw_short = ((short*)saved)[j]; + memcpy(&aligned, (short*)saved+j, sizeof(short)); + hw_short = *((short*)&aligned); break; case INT_USHORT: - hw_short = ((unsigned short*)saved)[j]; + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + hw_short = *((unsigned short*)&aligned); break; case INT_INT: - hw_short = ((int*)saved)[j]; + memcpy(&aligned, (int*)saved+j, sizeof(int)); + hw_short = *((int*)&aligned); break; case INT_UINT: - hw_short = ((unsigned*)saved)[j]; + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + hw_short = *((unsigned*)&aligned); break; case INT_LONG: - hw_short = ((long*)saved)[j]; + memcpy(&aligned, (long*)saved+j, sizeof(long)); + hw_short = *((long*)&aligned); break; case INT_ULONG: - hw_short = ((unsigned long*)saved)[j]; + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + hw_short = *((unsigned long*)&aligned); break; case INT_LLONG: - hw_short = ((long_long*)saved)[j]; + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + hw_short = *((long_long*)&aligned); break; case INT_ULLONG: - hw_short = ((unsigned long_long*)saved)[j]; + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); + hw_short = *((unsigned long_long*)&aligned); break; case INT_OTHER: break; @@ -1411,34 +1497,49 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) hw = (unsigned char*)&hw_ushort; switch (src_type) { case INT_CHAR: - hw_ushort = ((signed char*)saved)[j]; + memcpy(&aligned, (signed char*)saved+j, + sizeof(signed char)); + hw_ushort = *((signed char*)&aligned); break; case INT_UCHAR: - hw_ushort = ((unsigned char*)saved)[j]; + memcpy(&aligned, (unsigned char*)saved+j, + sizeof(unsigned char)); + hw_ushort = *((unsigned char*)&aligned); break; case INT_SHORT: - hw_ushort = ((short*)saved)[j]; + memcpy(&aligned, (short*)saved+j, sizeof(short)); + hw_ushort = *((short*)&aligned); break; case INT_USHORT: - hw_ushort = ((unsigned short*)saved)[j]; + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + hw_ushort = *((unsigned short*)&aligned); break; case INT_INT: - hw_ushort = ((int*)saved)[j]; + memcpy(&aligned, (int*)saved+j, sizeof(int)); + hw_ushort = *((int*)&aligned); break; case INT_UINT: - hw_ushort = ((unsigned*)saved)[j]; + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + hw_ushort = *((unsigned*)&aligned); break; case INT_LONG: - hw_ushort = ((long*)saved)[j]; + memcpy(&aligned, (long*)saved+j, sizeof(long)); + hw_ushort = *((long*)&aligned); break; case INT_ULONG: - hw_ushort = ((unsigned long*)saved)[j]; + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + hw_ushort = *((unsigned long*)&aligned); break; case INT_LLONG: - hw_ushort = ((long_long*)saved)[j]; + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + hw_ushort = *((long_long*)&aligned); break; case INT_ULLONG: - hw_ushort = ((unsigned long_long*)saved)[j]; + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); + hw_ushort = *((unsigned long_long*)&aligned); break; case INT_OTHER: break; @@ -1447,34 +1548,49 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) hw = (unsigned char*)&hw_int; switch (src_type) { case INT_CHAR: - hw_int = ((signed char*)saved)[j]; + memcpy(&aligned, (signed char*)saved+j, + sizeof(signed char)); + hw_int = *((signed char*)&aligned); break; case INT_UCHAR: - hw_int = ((unsigned char*)saved)[j]; + memcpy(&aligned, (unsigned char*)saved+j, + sizeof(unsigned char)); + hw_int = *((unsigned char*)&aligned); break; case INT_SHORT: - hw_int = ((short*)saved)[j]; + memcpy(&aligned, (short*)saved+j, sizeof(short)); + hw_int = *((short*)&aligned); break; case INT_USHORT: - hw_int = ((unsigned short*)saved)[j]; + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + hw_int = *((unsigned short*)&aligned); break; case INT_INT: - hw_int = ((int*)saved)[j]; + memcpy(&aligned, (int*)saved+j, sizeof(int)); + hw_int = *((int*)&aligned); break; case INT_UINT: - hw_int = ((unsigned*)saved)[j]; + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + hw_int = *((unsigned*)&aligned); break; case INT_LONG: - hw_int = ((long*)saved)[j]; + memcpy(&aligned, (long*)saved+j, sizeof(long)); + hw_int = *((long*)&aligned); break; case INT_ULONG: - hw_int = ((unsigned long*)saved)[j]; + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + hw_int = *((unsigned long*)&aligned); break; case INT_LLONG: - hw_int = ((long_long*)saved)[j]; + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + hw_int = *((long_long*)&aligned); break; case INT_ULLONG: - hw_int = ((unsigned long_long*)saved)[j]; + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); + hw_int = *((unsigned long_long*)&aligned); break; case INT_OTHER: break; @@ -1483,34 +1599,49 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) hw = (unsigned char*)&hw_uint; switch (src_type) { case INT_CHAR: - hw_uint = ((signed char*)saved)[j]; + memcpy(&aligned, (signed char*)saved+j, + sizeof(signed char)); + hw_uint = *((signed char*)&aligned); break; case INT_UCHAR: - hw_uint = ((unsigned char*)saved)[j]; + memcpy(&aligned, (unsigned char*)saved+j, + sizeof(unsigned char)); + hw_uint = *((unsigned char*)&aligned); break; case INT_SHORT: - hw_uint = ((short*)saved)[j]; + memcpy(&aligned, (short*)saved+j, sizeof(short)); + hw_uint = *((short*)&aligned); break; case INT_USHORT: - hw_uint = ((unsigned short*)saved)[j]; + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + hw_uint = *((unsigned short*)&aligned); break; case INT_INT: - hw_uint = ((int*)saved)[j]; + memcpy(&aligned, (int*)saved+j, sizeof(int)); + hw_uint = *((int*)&aligned); break; case INT_UINT: - hw_uint = ((unsigned*)saved)[j]; + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + hw_uint = *((unsigned*)&aligned); break; case INT_LONG: - hw_uint = ((long*)saved)[j]; + memcpy(&aligned, (long*)saved+j, sizeof(long)); + hw_uint = *((long*)&aligned); break; case INT_ULONG: - hw_uint = ((unsigned long*)saved)[j]; + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + hw_uint = *((unsigned long*)&aligned); break; case INT_LLONG: - hw_uint = ((long_long*)saved)[j]; + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + hw_uint = *((long_long*)&aligned); break; case INT_ULLONG: - hw_uint = ((unsigned long_long*)saved)[j]; + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); + hw_uint = *((unsigned long_long*)&aligned); break; case INT_OTHER: break; @@ -1519,34 +1650,49 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) hw = (unsigned char*)&hw_long; switch (src_type) { case INT_CHAR: - hw_long = ((signed char*)saved)[j]; + memcpy(&aligned, (signed char*)saved+j, + sizeof(signed char)); + hw_long = *((signed char*)&aligned); break; case INT_UCHAR: - hw_long = ((unsigned char*)saved)[j]; + memcpy(&aligned, (unsigned char*)saved+j, + sizeof(unsigned char)); + hw_long = *((unsigned char*)&aligned); break; case INT_SHORT: - hw_long = ((short*)saved)[j]; + memcpy(&aligned, (short*)saved+j, sizeof(short)); + hw_long = *((short*)&aligned); break; case INT_USHORT: - hw_long = ((unsigned short*)saved)[j]; + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + hw_long = *((unsigned short*)&aligned); break; case INT_INT: - hw_long = ((int*)saved)[j]; + memcpy(&aligned, (int*)saved+j, sizeof(int)); + hw_long = *((int*)&aligned); break; case INT_UINT: - hw_long = ((unsigned*)saved)[j]; + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + hw_long = *((unsigned*)&aligned); break; case INT_LONG: - hw_long = ((long*)saved)[j]; + memcpy(&aligned, (long*)saved+j, sizeof(long)); + hw_long = *((long*)&aligned); break; case INT_ULONG: - hw_long = ((unsigned long*)saved)[j]; + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + hw_long = *((unsigned long*)&aligned); break; case INT_LLONG: - hw_long = ((long_long*)saved)[j]; + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + hw_long = *((long_long*)&aligned); break; case INT_ULLONG: - hw_long = ((unsigned long_long*)saved)[j]; + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); + hw_long = *((unsigned long_long*)&aligned); break; case INT_OTHER: break; @@ -1555,34 +1701,49 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) hw = (unsigned char*)&hw_ulong; switch (src_type) { case INT_CHAR: - hw_ulong = ((signed char*)saved)[j]; + memcpy(&aligned, (signed char*)saved+j, + sizeof(signed char)); + hw_ulong = *((signed char*)&aligned); break; case INT_UCHAR: - hw_ulong = ((unsigned char*)saved)[j]; + memcpy(&aligned, (unsigned char*)saved+j, + sizeof(unsigned char)); + hw_ulong = *((unsigned char*)&aligned); break; case INT_SHORT: - hw_ulong = ((short*)saved)[j]; + memcpy(&aligned, (short*)saved+j, sizeof(short)); + hw_ulong = *((short*)&aligned); break; case INT_USHORT: - hw_ulong = ((unsigned short*)saved)[j]; + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + hw_ulong = *((unsigned short*)&aligned); break; case INT_INT: - hw_ulong = ((int*)saved)[j]; + memcpy(&aligned, (int*)saved+j, sizeof(int)); + hw_ulong = *((int*)&aligned); break; case INT_UINT: - hw_ulong = ((unsigned*)saved)[j]; + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + hw_ulong = *((unsigned*)&aligned); break; case INT_LONG: - hw_ulong = ((long*)saved)[j]; + memcpy(&aligned, (long*)saved+j, sizeof(long)); + hw_ulong = *((long*)&aligned); break; case INT_ULONG: - hw_ulong = ((unsigned long*)saved)[j]; + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + hw_ulong = *((unsigned long*)&aligned); break; case INT_LLONG: - hw_ulong = ((long_long*)saved)[j]; + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + hw_ulong = *((long_long*)&aligned); break; case INT_ULLONG: - hw_ulong = ((unsigned long_long*)saved)[j]; + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); + hw_ulong = *((unsigned long_long*)&aligned); break; case INT_OTHER: break; @@ -1591,34 +1752,49 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) hw = (unsigned char*)&hw_llong; switch (src_type) { case INT_CHAR: - hw_llong = ((signed char*)saved)[j]; + memcpy(&aligned, (signed char*)saved+j, + sizeof(signed char)); + hw_llong = *((signed char*)&aligned); break; case INT_UCHAR: - hw_llong = ((unsigned char*)saved)[j]; + memcpy(&aligned, (unsigned char*)saved+j, + sizeof(unsigned char)); + hw_llong = *((unsigned char*)&aligned); break; case INT_SHORT: - hw_llong = ((short*)saved)[j]; + memcpy(&aligned, (short*)saved+j, sizeof(short)); + hw_llong = *((short*)&aligned); break; case INT_USHORT: - hw_llong = ((unsigned short*)saved)[j]; + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + hw_llong = *((unsigned short*)&aligned); break; case INT_INT: - hw_llong = ((int*)saved)[j]; + memcpy(&aligned, (int*)saved+j, sizeof(int)); + hw_llong = *((int*)&aligned); break; case INT_UINT: - hw_llong = ((unsigned*)saved)[j]; + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + hw_llong = *((unsigned*)&aligned); break; case INT_LONG: - hw_llong = ((long*)saved)[j]; + memcpy(&aligned, (long*)saved+j, sizeof(long)); + hw_llong = *((long*)&aligned); break; case INT_ULONG: - hw_llong = ((unsigned long*)saved)[j]; + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + hw_llong = *((unsigned long*)&aligned); break; case INT_LLONG: - hw_llong = ((long_long*)saved)[j]; + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + hw_llong = *((long_long*)&aligned); break; case INT_ULLONG: - hw_llong = ((unsigned long_long*)saved)[j]; + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); + hw_llong = *((unsigned long_long*)&aligned); break; case INT_OTHER: break; @@ -1627,34 +1803,49 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) hw = (unsigned char*)&hw_ullong; switch (src_type) { case INT_CHAR: - hw_ullong = ((signed char*)saved)[j]; + memcpy(&aligned, (signed char*)saved+j, + sizeof(signed char)); + hw_ullong = *((signed char*)&aligned); break; case INT_UCHAR: - hw_ullong = ((unsigned char*)saved)[j]; + memcpy(&aligned, (unsigned char*)saved+j, + sizeof(unsigned char)); + hw_ullong = *((unsigned char*)&aligned); break; case INT_SHORT: - hw_ullong = ((short*)saved)[j]; + memcpy(&aligned, (short*)saved+j, sizeof(short)); + hw_ullong = *((short*)&aligned); break; case INT_USHORT: - hw_ullong = ((unsigned short*)saved)[j]; + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + hw_ullong = *((unsigned short*)&aligned); break; case INT_INT: - hw_ullong = ((int*)saved)[j]; + memcpy(&aligned, (int*)saved+j, sizeof(int)); + hw_ullong = *((int*)&aligned); break; case INT_UINT: - hw_ullong = ((unsigned*)saved)[j]; + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + hw_ullong = *((unsigned*)&aligned); break; case INT_LONG: - hw_ullong = ((long*)saved)[j]; + memcpy(&aligned, (long*)saved+j, sizeof(long)); + hw_ullong = *((long*)&aligned); break; case INT_ULONG: - hw_ullong = ((unsigned long*)saved)[j]; + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + hw_ullong = *((unsigned long*)&aligned); break; case INT_LLONG: - hw_ullong = ((long_long*)saved)[j]; + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + hw_ullong = *((long_long*)&aligned); break; case INT_ULLONG: - hw_ullong = ((unsigned long_long*)saved)[j]; + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); + hw_ullong = *((unsigned long_long*)&aligned); break; case INT_OTHER: break; @@ -1792,35 +1983,49 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) printf("%*s", 3*MAX(0, (ssize_t)dst_size-(ssize_t)src_size), ""); switch (src_type) { case INT_CHAR: - printf(" %29d\n", ((signed char*)saved)[j]); + memcpy(&aligned, (signed char*)saved+j, sizeof(signed char)); + printf(" %29d\n", *((signed char*)&aligned)); break; case INT_UCHAR: - printf(" %29u\n", ((unsigned char*)saved)[j]); + memcpy(&aligned, (unsigned char*)saved+j, + sizeof(unsigned char)); + printf(" %29u\n", *((unsigned char*)&aligned)); break; case INT_SHORT: - printf(" %29d\n", ((short*)saved)[j]); + memcpy(&aligned, (short*)saved+j, sizeof(short)); + printf(" %29d\n", *((short*)&aligned)); break; case INT_USHORT: - printf(" %29u\n", ((unsigned short*)saved)[j]); + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + printf(" %29u\n", *((unsigned short*)&aligned)); break; case INT_INT: - printf(" %29d\n", ((int*)saved)[j]); + memcpy(&aligned, (int*)saved+j, sizeof(int)); + printf(" %29d\n", *((int*)&aligned)); break; case INT_UINT: - printf(" %29u\n", ((unsigned*)saved)[j]); + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + printf(" %29u\n", *((unsigned*)&aligned)); break; case INT_LONG: - printf(" %29ld\n", ((long*)saved)[j]); + memcpy(&aligned, (long*)saved+j, sizeof(long)); + printf(" %29ld\n", *((long*)&aligned)); break; case INT_ULONG: - printf(" %29lu\n", ((unsigned long*)saved)[j]); + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + printf(" %29lu\n", *((unsigned long*)&aligned)); break; case INT_LLONG: - printf(" %29"PRINTF_LL_WIDTH"d\n", ((long_long*)saved)[j]); + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + printf(" %29"PRINTF_LL_WIDTH"d\n", *((long_long*)&aligned)); break; case INT_ULLONG: + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); printf(" %29"PRINTF_LL_WIDTH"u\n", - ((unsigned long_long*)saved)[j]); + *((unsigned long_long*)&aligned)); break; case INT_OTHER: break; @@ -1833,35 +2038,49 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) printf("%*s", 3*MAX(0, (ssize_t)src_size-(ssize_t)dst_size), ""); switch (dst_type) { case INT_CHAR: - printf(" %29d\n", ((signed char*)buf)[j]); + memcpy(&aligned, (signed char*)saved+j, sizeof(signed char)); + printf(" %29d\n", *((signed char*)&aligned)); break; case INT_UCHAR: - printf(" %29u\n", ((unsigned char*)buf)[j]); + memcpy(&aligned, (unsigned char*)saved+j, + sizeof(unsigned char)); + printf(" %29u\n", *((unsigned char*)&aligned)); break; case INT_SHORT: - printf(" %29d\n", ((short*)buf)[j]); + memcpy(&aligned, (short*)saved+j, sizeof(short)); + printf(" %29d\n", *((short*)&aligned)); break; case INT_USHORT: - printf(" %29u\n", ((unsigned short*)buf)[j]); + memcpy(&aligned, (unsigned short*)saved+j, + sizeof(unsigned short)); + printf(" %29u\n", *((unsigned short*)&aligned)); break; case INT_INT: - printf(" %29d\n", ((int*)buf)[j]); + memcpy(&aligned, (int*)saved+j, sizeof(int)); + printf(" %29d\n", *((int*)&aligned)); break; case INT_UINT: - printf(" %29u\n", ((unsigned*)buf)[j]); + memcpy(&aligned, (unsigned*)saved+j, sizeof(unsigned)); + printf(" %29u\n", *((unsigned*)&aligned)); break; case INT_LONG: - printf(" %29ld\n", ((long*)buf)[j]); + memcpy(&aligned, (long*)saved+j, sizeof(long)); + printf(" %29ld\n", *((long*)&aligned)); break; case INT_ULONG: - printf(" %29lu\n", ((unsigned long*)buf)[j]); + memcpy(&aligned, (unsigned long*)saved+j, + sizeof(unsigned long)); + printf(" %29lu\n", *((unsigned long*)&aligned)); break; case INT_LLONG: - printf(" %29"PRINTF_LL_WIDTH"d\n", ((long_long*)buf)[j]); + memcpy(&aligned, (long_long*)saved+j, sizeof(long_long)); + printf(" %29"PRINTF_LL_WIDTH"d\n", *((long_long*)&aligned)); break; case INT_ULLONG: + memcpy(&aligned, (unsigned long_long*)saved+j, + sizeof(unsigned long_long)); printf(" %29"PRINTF_LL_WIDTH"u\n", - ((unsigned long_long*)buf)[j]); + *((unsigned long_long*)&aligned)); break; case INT_OTHER: break; @@ -1922,15 +2141,15 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) #endif done: - if (buf) free(buf); - if (saved) free(saved); + if (buf) aligned_free(buf); + if (saved) aligned_free(saved); fflush(stdout); reset_hdf5(); /*print statistics*/ return (int)fails_all_tests; error: - if (buf) free(buf); - if (saved) free(saved); + if (buf) aligned_free(buf); + if (saved) aligned_free(saved); fflush(stdout); reset_hdf5(); /*print statistics*/ return MAX((int)fails_all_tests, 1); @@ -1956,23 +2175,22 @@ my_isnan(flt_t type, void *val) { int retval; char s[256]; - - switch (type) { - case FLT_FLOAT: - retval = (*((float*)val)!=*((float*)val)); - break; - - case FLT_DOUBLE: - retval = (*((double*)val)!=*((double*)val)); - break; - -#if SIZEOF_LDOUBLE!=SIZEOF_DOUBLE - case FLT_LDOUBLE: - retval = (*((long double*)val)!=*((long double*)val)); - break; + + if (FLT_FLOAT==type) { + float x; + memcpy(&x, val, sizeof(float)); + retval = (x!=x); + } else if (FLT_DOUBLE==type) { + double x; + memcpy(&x, val, sizeof(double)); + retval = (x!=x); +#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE + } else if (FLT_LDOUBLE==type) { + long double x; + memcpy(&x, val, sizeof(long double)); + retval = (x!=x); #endif - - default: + } else { return 0; } @@ -1981,25 +2199,23 @@ my_isnan(flt_t type, void *val) * the result contains a NaN string. */ if (!retval) { - switch (type) { - case FLT_FLOAT: - sprintf(s, "%g", *((float*)val)); - break; - - case FLT_DOUBLE: - sprintf(s, "%g", *((double*)val)); - break; - -#if SIZEOF_LDOUBLE!=SIZEOF_DOUBLE - case FLT_LDOUBLE: - sprintf(s, "%Lg", *((long double*)val)); - break; + if (FLT_FLOAT==type) { + float x; + memcpy(&x, val, sizeof(float)); + sprintf(s, "%g", x); + } else if (FLT_DOUBLE==type) { + double x; + memcpy(&x, val, sizeof(double)); + sprintf(s, "%g", x); +#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE + } else if (FLT_LDOUBLE==type) { + long double x; + memcpy(&x, val, sizeof(long double)); + sprintf(s, "%Lg", x); #endif - - default: + } else { return 0; } - if (!strstr(s, "NaN") || !strstr(s, "NAN") || !strstr(s, "nan")) { retval = 1; } @@ -2044,8 +2260,11 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst) char str[256]; /*hello string */ float hw_f; /*hardware-converted */ double hw_d; /*hardware-converted */ -#if SIZEOF_LDOUBLE!=SIZEOF_DOUBLE +#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE long double hw_ld; /*hardware-converted */ + long double aligned; /*aligned value */ +#else + double aligned; /*aligned value */ #endif unsigned char *hw=NULL; /*ptr to hardware-conv'd*/ size_t i, j, k; /*counters */ @@ -2092,7 +2311,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst) } else if (H5Tequal(src, H5T_NATIVE_DOUBLE)) { src_type_name = "double"; src_type = FLT_DOUBLE; -#if SIZEOF_LDOUBLE!=SIZEOF_DOUBLE +#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE } else if (H5Tequal(src, H5T_NATIVE_LDOUBLE)) { src_type_name = "long double"; src_type = FLT_LDOUBLE; @@ -2108,7 +2327,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst) } else if (H5Tequal(dst, H5T_NATIVE_DOUBLE)) { dst_type_name = "double"; dst_type = FLT_DOUBLE; -#if SIZEOF_LDOUBLE!=SIZEOF_DOUBLE +#if SIZEOF_LONG_DOUBLE!=SIZEOF_DOUBLE } else if (H5Tequal(dst, H5T_NATIVE_LDOUBLE)) { dst_type_name = "long double"; dst_type = FLT_LDOUBLE; @@ -2133,8 +2352,8 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst) endian = H5Tget_order(H5T_NATIVE_FLOAT); src_size = H5Tget_size(src); dst_size = H5Tget_size(dst); - buf = malloc(nelmts*MAX(src_size, dst_size)); - saved = malloc(nelmts*MAX(src_size, dst_size)); + buf = aligned_malloc(nelmts*MAX(src_size, dst_size)); + saved = aligned_malloc(nelmts*MAX(src_size, dst_size)); noverflows_g = 0; for (i=0; i