summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--INSTALL.parallel28
-rw-r--r--README2
-rwxr-xr-xconfigure837
-rw-r--r--configure.in33
-rw-r--r--src/.distdep26
-rw-r--r--src/H5.c18
-rw-r--r--src/H5A.c7
-rw-r--r--src/H5B.c42
-rw-r--r--src/H5Bprivate.h10
-rw-r--r--src/H5D.c13
-rw-r--r--src/H5Distore.c28
-rw-r--r--src/H5F.c29
-rw-r--r--src/H5Farray.c10
-rw-r--r--src/H5Fcore.c10
-rw-r--r--src/H5Ffamily.c10
-rw-r--r--src/H5Fistore.c28
-rw-r--r--src/H5Flow.c20
-rw-r--r--src/H5Fmpio.c14
-rw-r--r--src/H5Fprivate.h128
-rw-r--r--src/H5Fsec2.c18
-rw-r--r--src/H5Fsplit.c8
-rw-r--r--src/H5Fstdio.c32
-rw-r--r--src/H5G.c1
-rw-r--r--src/H5Gent.c14
-rw-r--r--src/H5Gnode.c14
-rw-r--r--src/H5Gpkg.h4
-rw-r--r--src/H5Gprivate.h4
-rw-r--r--src/H5HG.c18
-rw-r--r--src/H5HL.c12
-rw-r--r--src/H5I.c3
-rw-r--r--src/H5O.c16
-rw-r--r--src/H5Oattr.c10
-rw-r--r--src/H5Ocomp.c8
-rw-r--r--src/H5Ocont.c8
-rw-r--r--src/H5Odtype.c20
-rw-r--r--src/H5Oefl.c16
-rw-r--r--src/H5Ofill.c8
-rw-r--r--src/H5Olayout.c8
-rw-r--r--src/H5Omtime.c8
-rw-r--r--src/H5Oname.c8
-rw-r--r--src/H5Oprivate.h14
-rw-r--r--src/H5Osdspace.c8
-rw-r--r--src/H5Oshared.c8
-rw-r--r--src/H5Ostab.c8
-rw-r--r--src/H5P.c1
-rw-r--r--src/H5R.c17
-rw-r--r--src/H5RA.c7
-rw-r--r--src/H5S.c3
-rw-r--r--src/H5Sall.c22
-rw-r--r--src/H5Shyper.c30
-rw-r--r--src/H5Snone.c10
-rw-r--r--src/H5Spoint.c36
-rw-r--r--src/H5Sprivate.h14
-rw-r--r--src/H5Sselect.c2
-rw-r--r--src/H5T.c750
-rw-r--r--src/H5TB.c1
-rw-r--r--src/H5Tbit.c28
-rw-r--r--src/H5Tconv.c1314
-rw-r--r--src/H5Tpkg.h107
-rw-r--r--src/H5Tprivate.h2
-rw-r--r--src/H5Tpublic.h4
-rw-r--r--src/H5V.c38
-rw-r--r--src/H5Z.c5
-rw-r--r--src/H5config.h.in30
-rw-r--r--src/H5detect.c17
-rw-r--r--src/H5private.h136
-rw-r--r--test/big.c2
-rw-r--r--test/bittests.c8
-rw-r--r--test/dtypes.c984
-rw-r--r--test/gheap.c12
-rw-r--r--test/hyperslab.c40
-rw-r--r--test/istore.c10
-rw-r--r--test/tmeta.c34
-rw-r--r--test/trefer.c16
-rw-r--r--test/tselect.c96
-rw-r--r--tools/h5debug.c19
-rw-r--r--tools/h5tools.c4
77 files changed, 4347 insertions, 1021 deletions
diff --git a/INSTALL.parallel b/INSTALL.parallel
new file mode 100644
index 0000000..278d4f3
--- /dev/null
+++ b/INSTALL.parallel
@@ -0,0 +1,28 @@
+This file contains instructions for the installation a version of HDF5
+that uses the parallel file I/O facilities of the MPI-IO library. A
+parallel version of HDF5 can run in a serial environment as long as
+the appropriate MPI-IO and MPI header files and libraries are
+available.
+
+The parallel version of hdf5 can be build by generally following the
+instructions in the INSTALL file for building a serial version and
+using `mpicc' as the C compiler. This can be done by setting the CC
+environment variable before invoking configure as with:
+
+ $ CC=mpicc ./configure
+
+If the mpicc compiler is not available then a parallel library can
+still be built as long as the appropriate header files and libraries
+can be found. If these files are part of the default compiler search
+paths then configuration is as simple as:
+
+ $ ./configure --enable-parallel
+
+Otherwise, if the MPI and MPI-IO header files or library cannot be
+found then the compiler search paths can be corrected, the files can
+be moved, or configure can be told about the file locations. The
+latter is done with something like:
+
+ $ CPPFLAGS=-I/usr/local/mpi/include \
+ LDFLAGS=-L/usr/local/mpi/lib/LINUX/ch_p4 \
+ ./configure --enable-parallel
diff --git a/README b/README
index 1ebcc9a..584a2c8 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-This is hdf5-1.1.27 released on Fri Nov 13 04:20:29 CST 1998
+This is hdf5-1.1.28 released on Wed Nov 18 10:21:47 CST 1998
Please refer to the INSTALL file for installation instructions.
------------------------------------------------------------------------------
diff --git a/configure b/configure
index a8717cf..72475f2 100755
--- a/configure
+++ b/configure
@@ -1046,8 +1046,54 @@ else
echo "$ac_t""no" 1>&6
fi
-echo $ac_n "checking for main in -lcoug""... $ac_c" 1>&6
-echo "configure:1051: checking for main in -lcoug" >&5
+echo $ac_n "checking for xdr_int in -lnsl""... $ac_c" 1>&6
+echo "configure:1051: checking for xdr_int in -lnsl" >&5
+ac_lib_var=`echo nsl'_'xdr_int | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lnsl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 1059 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char xdr_int();
+
+int main() {
+xdr_int()
+; return 0; }
+EOF
+if { (eval echo configure:1070: \"$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
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lnsl $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+ echo $ac_n "checking for main in -lcoug""... $ac_c" 1>&6
+echo "configure:1097: checking for main in -lcoug" >&5
ac_lib_var=`echo coug'_'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
@@ -1055,14 +1101,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcoug $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1059 "configure"
+#line 1105 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:1066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1112: \"$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
@@ -1088,8 +1134,8 @@ EOF
else
echo "$ac_t""no" 1>&6
fi
- echo $ac_n "checking for main in -ljpeg""... $ac_c" 1>&6
-echo "configure:1093: checking for main in -ljpeg" >&5
+ echo $ac_n "checking for main in -ljpeg""... $ac_c" 1>&6
+echo "configure:1139: checking for main in -ljpeg" >&5
ac_lib_var=`echo jpeg'_'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
@@ -1097,14 +1143,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ljpeg $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1101 "configure"
+#line 1147 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:1108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1154: \"$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
@@ -1132,7 +1178,7 @@ else
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1136: checking how to run the C preprocessor" >&5
+echo "configure:1182: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1147,13 +1193,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1151 "configure"
+#line 1197 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1164,13 +1210,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1168 "configure"
+#line 1214 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1174: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1193,12 +1239,12 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1197: checking for ANSI C header files" >&5
+echo "configure:1243: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1202 "configure"
+#line 1248 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -1206,7 +1252,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1223,7 +1269,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1227 "configure"
+#line 1273 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -1241,7 +1287,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1245 "configure"
+#line 1291 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -1262,7 +1308,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 1266 "configure"
+#line 1312 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -1273,7 +1319,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:1277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
:
else
@@ -1297,12 +1343,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1301: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1347: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1306 "configure"
+#line 1352 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1311,7 +1357,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1335,17 +1381,17 @@ for ac_hdr in io.h sys/resource.h sys/time.h unistd.h winsock.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1339: checking for $ac_hdr" >&5
+echo "configure:1385: 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
-#line 1344 "configure"
+#line 1390 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1375,17 +1421,17 @@ for ac_hdr in 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
-echo "configure:1379: checking for $ac_hdr" >&5
+echo "configure:1425: 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
-#line 1384 "configure"
+#line 1430 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1413,12 +1459,12 @@ done
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:1417: checking for off_t" >&5
+echo "configure:1463: 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 <<EOF
-#line 1422 "configure"
+#line 1468 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1446,12 +1492,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:1450: checking for size_t" >&5
+echo "configure:1496: 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 <<EOF
-#line 1455 "configure"
+#line 1501 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1479,12 +1525,12 @@ EOF
fi
echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:1483: checking for ssize_t" >&5
+echo "configure:1529: 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 <<EOF
-#line 1488 "configure"
+#line 1534 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -1512,14 +1558,14 @@ EOF
fi
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:1516: checking whether byte ordering is bigendian" >&5
+echo "configure:1562: 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 <<EOF
-#line 1523 "configure"
+#line 1569 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -1530,11 +1576,11 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:1534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1580: \"$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 <<EOF
-#line 1538 "configure"
+#line 1584 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
@@ -1545,7 +1591,7 @@ int main() {
#endif
; return 0; }
EOF
-if { (eval echo configure:1549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_bigendian=yes
else
@@ -1565,7 +1611,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 <<EOF
-#line 1569 "configure"
+#line 1615 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
@@ -1578,7 +1624,7 @@ main () {
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-if { (eval echo configure:1582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_c_bigendian=no
else
@@ -1602,7 +1648,7 @@ EOF
fi
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1606: checking size of short" >&5
+echo "configure:1652: 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
@@ -1610,7 +1656,7 @@ else
ac_cv_sizeof_short=2
else
cat > conftest.$ac_ext <<EOF
-#line 1614 "configure"
+#line 1660 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1621,7 +1667,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1671: \"$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
@@ -1641,7 +1687,7 @@ EOF
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1645: checking size of int" >&5
+echo "configure:1691: 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
@@ -1649,7 +1695,7 @@ else
ac_cv_sizeof_int=4
else
cat > conftest.$ac_ext <<EOF
-#line 1653 "configure"
+#line 1699 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1660,7 +1706,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1710: \"$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
@@ -1680,7 +1726,7 @@ EOF
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1684: checking size of long" >&5
+echo "configure:1730: 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
@@ -1688,7 +1734,7 @@ else
ac_cv_sizeof_long=4
else
cat > conftest.$ac_ext <<EOF
-#line 1692 "configure"
+#line 1738 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1699,7 +1745,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1749: \"$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
@@ -1719,7 +1765,7 @@ EOF
echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:1723: checking size of long long" >&5
+echo "configure:1769: 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
@@ -1727,7 +1773,7 @@ else
ac_cv_sizeof_long_long=8
else
cat > conftest.$ac_ext <<EOF
-#line 1731 "configure"
+#line 1777 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1738,7 +1784,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1788: \"$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
@@ -1758,7 +1804,7 @@ EOF
echo $ac_n "checking size of __int64""... $ac_c" 1>&6
-echo "configure:1762: checking size of __int64" >&5
+echo "configure:1808: 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
@@ -1766,7 +1812,7 @@ else
ac_cv_sizeof___int64=8
else
cat > conftest.$ac_ext <<EOF
-#line 1770 "configure"
+#line 1816 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1777,7 +1823,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1827: \"$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
@@ -1797,7 +1843,7 @@ EOF
echo $ac_n "checking size of float""... $ac_c" 1>&6
-echo "configure:1801: checking size of float" >&5
+echo "configure:1847: 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
@@ -1805,7 +1851,7 @@ else
ac_cv_sizeof_float=4
else
cat > conftest.$ac_ext <<EOF
-#line 1809 "configure"
+#line 1855 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1816,7 +1862,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1866: \"$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
@@ -1836,7 +1882,7 @@ EOF
echo $ac_n "checking size of double""... $ac_c" 1>&6
-echo "configure:1840: checking size of double" >&5
+echo "configure:1886: 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
@@ -1844,7 +1890,7 @@ else
ac_cv_sizeof_double=8
else
cat > conftest.$ac_ext <<EOF
-#line 1848 "configure"
+#line 1894 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1855,7 +1901,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1905: \"$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
@@ -1875,7 +1921,7 @@ EOF
echo $ac_n "checking size of long double""... $ac_c" 1>&6
-echo "configure:1879: checking size of long double" >&5
+echo "configure:1925: 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
@@ -1883,7 +1929,7 @@ else
ac_cv_sizeof_long_double=8
else
cat > conftest.$ac_ext <<EOF
-#line 1887 "configure"
+#line 1933 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1894,7 +1940,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1944: \"$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
@@ -1913,8 +1959,325 @@ cat >> confdefs.h <<EOF
EOF
+
+cat >>confdefs.h <<\EOF
+#include <sys/types.h>
+EOF
+echo $ac_n "checking size of int8_t""... $ac_c" 1>&6
+echo "configure:1968: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_sizeof_int8_t=1
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1976 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(int8_t));
+ 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
+then
+ ac_cv_sizeof_int8_t=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_int8_t=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_int8_t" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT8_T $ac_cv_sizeof_int8_t
+EOF
+
+
+echo $ac_n "checking size of uint8_t""... $ac_c" 1>&6
+echo "configure:2007: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_sizeof_uint8_t=1
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2015 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(uint8_t));
+ 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
+then
+ ac_cv_sizeof_uint8_t=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_uint8_t=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_uint8_t" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_UINT8_T $ac_cv_sizeof_uint8_t
+EOF
+
+
+echo $ac_n "checking size of int16_t""... $ac_c" 1>&6
+echo "configure:2046: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_sizeof_int16_t=2
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2054 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(int16_t));
+ 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
+then
+ ac_cv_sizeof_int16_t=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_int16_t=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_int16_t" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT16_T $ac_cv_sizeof_int16_t
+EOF
+
+
+echo $ac_n "checking size of uint16_t""... $ac_c" 1>&6
+echo "configure:2085: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_sizeof_uint16_t=2
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2093 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(uint16_t));
+ 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
+then
+ ac_cv_sizeof_uint16_t=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_uint16_t=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_uint16_t" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_UINT16_T $ac_cv_sizeof_uint16_t
+EOF
+
+
+echo $ac_n "checking size of int32_t""... $ac_c" 1>&6
+echo "configure:2124: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_sizeof_int32_t=4
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2132 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(int32_t));
+ 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
+then
+ ac_cv_sizeof_int32_t=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_int32_t=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_int32_t" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT32_T $ac_cv_sizeof_int32_t
+EOF
+
+
+echo $ac_n "checking size of uint32_t""... $ac_c" 1>&6
+echo "configure:2163: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_sizeof_uint32_t=4
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2171 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(uint32_t));
+ 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
+then
+ ac_cv_sizeof_uint32_t=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_uint32_t=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_uint32_t" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_UINT32_T $ac_cv_sizeof_uint32_t
+EOF
+
+
+echo $ac_n "checking size of int64_t""... $ac_c" 1>&6
+echo "configure:2202: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_sizeof_int64_t=8
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2210 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(int64_t));
+ 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
+then
+ ac_cv_sizeof_int64_t=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_int64_t=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_int64_t" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT64_T $ac_cv_sizeof_int64_t
+EOF
+
+
+echo $ac_n "checking size of uint64_t""... $ac_c" 1>&6
+echo "configure:2241: 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
+ if test "$cross_compiling" = yes; then
+ ac_cv_sizeof_uint64_t=8
+else
+ cat > conftest.$ac_ext <<EOF
+#line 2249 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) exit(1);
+ fprintf(f, "%d\n", sizeof(uint64_t));
+ 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
+then
+ ac_cv_sizeof_uint64_t=`cat conftestval`
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -fr conftest*
+ ac_cv_sizeof_uint64_t=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_uint64_t" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_UINT64_T $ac_cv_sizeof_uint64_t
+EOF
+
+
+
echo $ac_n "checking size of size_t""... $ac_c" 1>&6
-echo "configure:1918: checking size of size_t" >&5
+echo "configure:2281: 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
@@ -1922,7 +2285,7 @@ else
ac_cv_sizeof_size_t=4
else
cat > conftest.$ac_ext <<EOF
-#line 1926 "configure"
+#line 2289 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1933,7 +2296,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1937: \"$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_size_t=`cat conftestval`
else
@@ -1956,7 +2319,7 @@ cat >>confdefs.h <<\EOF
#include <sys/types.h> /*for off_t definition*/
EOF
echo $ac_n "checking size of off_t""... $ac_c" 1>&6
-echo "configure:1960: checking size of off_t" >&5
+echo "configure:2323: 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
@@ -1964,7 +2327,7 @@ else
ac_cv_sizeof_off_t=4
else
cat > conftest.$ac_ext <<EOF
-#line 1968 "configure"
+#line 2331 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
@@ -1975,7 +2338,7 @@ main()
exit(0);
}
EOF
-if { (eval echo configure:1979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2342: \"$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
@@ -2002,7 +2365,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:2006: checking for sizeof hsize_t and hssize_t" >&5
+echo "configure:2369: checking for sizeof hsize_t and hssize_t" >&5
case $HSIZET in
no|small)
echo "$ac_t""small" 1>&6
@@ -2031,17 +2394,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:2035: checking for $ac_hdr" >&5
+echo "configure:2398: 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
-#line 2040 "configure"
+#line 2403 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2067,27 +2430,27 @@ else
fi
done
- echo $ac_n "checking for compress2 in -lz""... $ac_c" 1>&6
-echo "configure:2072: checking for compress2 in -lz" >&5
-ac_lib_var=`echo z'_'compress2 | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6
+echo "configure:2435: 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
else
ac_save_LIBS="$LIBS"
LIBS="-lz $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2080 "configure"
+#line 2443 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char compress2();
+char compress();
int main() {
-compress2()
+compress()
; return 0; }
EOF
-if { (eval echo configure:2091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2454: \"$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
@@ -2117,7 +2480,7 @@ fi
;;
no)
echo $ac_n "checking for GNU zlib""... $ac_c" 1>&6
-echo "configure:2121: checking for GNU zlib" >&5
+echo "configure:2484: checking for GNU zlib" >&5
echo "$ac_t""suppressed" 1>&6
;;
*)
@@ -2129,17 +2492,17 @@ echo "configure:2121: 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:2133: checking for $ac_hdr" >&5
+echo "configure:2496: 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
-#line 2138 "configure"
+#line 2501 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2171,17 +2534,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2175: checking for $ac_hdr" >&5
+echo "configure:2538: 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
-#line 2180 "configure"
+#line 2543 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2213,27 +2576,27 @@ done
if test "X" != "$zlb_lib"; then
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$zlib_lib"
- echo $ac_n "checking for compress2 in -lz""... $ac_c" 1>&6
-echo "configure:2218: checking for compress2 in -lz" >&5
-ac_lib_var=`echo z'_'compress2 | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6
+echo "configure:2581: 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
else
ac_save_LIBS="$LIBS"
LIBS="-lz $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2226 "configure"
+#line 2589 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char compress2();
+char compress();
int main() {
-compress2()
+compress()
; return 0; }
EOF
-if { (eval echo configure:2237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2600: \"$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
@@ -2262,27 +2625,27 @@ LDFLAGS="$saved_LDFLAGS"
fi
else
- echo $ac_n "checking for compress2 in -lz""... $ac_c" 1>&6
-echo "configure:2267: checking for compress2 in -lz" >&5
-ac_lib_var=`echo z'_'compress2 | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for compress in -lz""... $ac_c" 1>&6
+echo "configure:2630: 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
else
ac_save_LIBS="$LIBS"
LIBS="-lz $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2275 "configure"
+#line 2638 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
-char compress2();
+char compress();
int main() {
-compress2()
+compress()
; return 0; }
EOF
-if { (eval echo configure:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2649: \"$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
@@ -2332,17 +2695,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:2336: checking for $ac_hdr" >&5
+echo "configure:2699: 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
-#line 2341 "configure"
+#line 2704 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2369,23 +2732,23 @@ unset H5TOH4 TESTH5TOH4
fi
done
- echo $ac_n "checking for main in -lmfhdf""... $ac_c" 1>&6
-echo "configure:2374: checking for main in -lmfhdf" >&5
-ac_lib_var=`echo mfhdf'_'main | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for main in -ldf""... $ac_c" 1>&6
+echo "configure:2737: 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
else
ac_save_LIBS="$LIBS"
-LIBS="-lmfhdf $LIBS"
+LIBS="-ldf $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2382 "configure"
+#line 2745 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2752: \"$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
@@ -2400,36 +2763,36 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo mfhdf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ ac_tr_lib=HAVE_LIB`echo df | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
- LIBS="-lmfhdf $LIBS"
+ LIBS="-ldf $LIBS"
else
echo "$ac_t""no" 1>&6
unset H5TOH4 TESTH5TOH4
fi
- echo $ac_n "checking for main in -ldf""... $ac_c" 1>&6
-echo "configure:2418: checking for main in -ldf" >&5
-ac_lib_var=`echo df'_'main | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for main in -lmfhdf""... $ac_c" 1>&6
+echo "configure:2781: 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
else
ac_save_LIBS="$LIBS"
-LIBS="-ldf $LIBS"
+LIBS="-lmfhdf $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2426 "configure"
+#line 2789 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2796: \"$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
@@ -2444,13 +2807,13 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo df | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ ac_tr_lib=HAVE_LIB`echo mfhdf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
- LIBS="-ldf $LIBS"
+ LIBS="-lmfhdf $LIBS"
else
echo "$ac_t""no" 1>&6
@@ -2460,7 +2823,7 @@ fi
;;
no)
echo $ac_n "checking for HDF4""... $ac_c" 1>&6
-echo "configure:2464: checking for HDF4" >&5
+echo "configure:2827: checking for HDF4" >&5
echo "$ac_t""suppressed" 1>&6
unset H5TOH4 TESTH5TOH4
;;
@@ -2473,17 +2836,17 @@ echo "configure:2464: 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:2477: checking for $ac_hdr" >&5
+echo "configure:2840: 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
-#line 2482 "configure"
+#line 2845 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2850: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2517,17 +2880,17 @@ done
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2521: checking for $ac_hdr" >&5
+echo "configure:2884: 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
-#line 2526 "configure"
+#line 2889 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -2559,23 +2922,23 @@ done
if test "X" != "$hdf4_lib"; then
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$hdf4_lib"
- echo $ac_n "checking for main in -lmfhdf""... $ac_c" 1>&6
-echo "configure:2564: checking for main in -lmfhdf" >&5
-ac_lib_var=`echo mfhdf'_'main | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for main in -ldf""... $ac_c" 1>&6
+echo "configure:2927: 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
else
ac_save_LIBS="$LIBS"
-LIBS="-lmfhdf $LIBS"
+LIBS="-ldf $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2572 "configure"
+#line 2935 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2942: \"$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
@@ -2590,36 +2953,36 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo mfhdf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ ac_tr_lib=HAVE_LIB`echo df | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
- LIBS="-lmfhdf $LIBS"
+ LIBS="-ldf $LIBS"
else
echo "$ac_t""no" 1>&6
unset H5TOH4 TESTH5TOH4
fi
- echo $ac_n "checking for main in -ldf""... $ac_c" 1>&6
-echo "configure:2608: checking for main in -ldf" >&5
-ac_lib_var=`echo df'_'main | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for main in -lmfhdf""... $ac_c" 1>&6
+echo "configure:2971: 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
else
ac_save_LIBS="$LIBS"
-LIBS="-ldf $LIBS"
+LIBS="-lmfhdf $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2616 "configure"
+#line 2979 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2986: \"$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
@@ -2634,13 +2997,13 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo df | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ ac_tr_lib=HAVE_LIB`echo mfhdf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
- LIBS="-ldf $LIBS"
+ LIBS="-lmfhdf $LIBS"
else
echo "$ac_t""no" 1>&6
@@ -2648,23 +3011,23 @@ unset H5TOH4 TESTH5TOH4
fi
else
- echo $ac_n "checking for main in -lmfhdf""... $ac_c" 1>&6
-echo "configure:2653: checking for main in -lmfhdf" >&5
-ac_lib_var=`echo mfhdf'_'main | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for main in -ldf""... $ac_c" 1>&6
+echo "configure:3016: 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
else
ac_save_LIBS="$LIBS"
-LIBS="-lmfhdf $LIBS"
+LIBS="-ldf $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2661 "configure"
+#line 3024 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3031: \"$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
@@ -2679,35 +3042,35 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo mfhdf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ ac_tr_lib=HAVE_LIB`echo df | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
- LIBS="-lmfhdf $LIBS"
+ LIBS="-ldf $LIBS"
else
echo "$ac_t""no" 1>&6
fi
- echo $ac_n "checking for main in -ldf""... $ac_c" 1>&6
-echo "configure:2696: checking for main in -ldf" >&5
-ac_lib_var=`echo df'_'main | sed 'y%./+-%__p_%'`
+ echo $ac_n "checking for main in -lmfhdf""... $ac_c" 1>&6
+echo "configure:3059: 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
else
ac_save_LIBS="$LIBS"
-LIBS="-ldf $LIBS"
+LIBS="-lmfhdf $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2704 "configure"
+#line 3067 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3074: \"$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
@@ -2722,13 +3085,13 @@ LIBS="$ac_save_LIBS"
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo df | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ ac_tr_lib=HAVE_LIB`echo mfhdf | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
EOF
- LIBS="-ldf $LIBS"
+ LIBS="-lmfhdf $LIBS"
else
echo "$ac_t""no" 1>&6
@@ -2741,9 +3104,9 @@ esac
echo $ac_n "checking for tm_gmtoff in struct tm""... $ac_c" 1>&6
-echo "configure:2745: checking for tm_gmtoff in struct tm" >&5
+echo "configure:3108: checking for tm_gmtoff in struct tm" >&5
cat > conftest.$ac_ext <<EOF
-#line 2747 "configure"
+#line 3110 "configure"
#include "confdefs.h"
#include <sys/time.h>
@@ -2752,7 +3115,7 @@ int main() {
struct tm tm; tm.tm_gmtoff=0;
; return 0; }
EOF
-if { (eval echo configure:2756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_TM_GMTOFF 1
@@ -2768,9 +3131,9 @@ fi
rm -f conftest*
echo $ac_n "checking for global timezone variable""... $ac_c" 1>&6
-echo "configure:2772: checking for global timezone variable" >&5
+echo "configure:3135: checking for global timezone variable" >&5
cat > conftest.$ac_ext <<EOF
-#line 2774 "configure"
+#line 3137 "configure"
#include "confdefs.h"
#include <sys/time.h>
@@ -2779,7 +3142,7 @@ int main() {
timezone=0;
; return 0; }
EOF
-if { (eval echo configure:2783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_TIMEZONE 1
@@ -2795,12 +3158,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:2799: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:3162: 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 <<EOF
-#line 2804 "configure"
+#line 3167 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
@@ -2808,7 +3171,7 @@ int main() {
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:2812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3175: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
@@ -2829,12 +3192,12 @@ EOF
fi
echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
-echo "configure:2833: checking for tm_zone in struct tm" >&5
+echo "configure:3196: 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 <<EOF
-#line 2838 "configure"
+#line 3201 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_cv_struct_tm>
@@ -2842,7 +3205,7 @@ int main() {
struct tm tm; tm.tm_zone;
; return 0; }
EOF
-if { (eval echo configure:2846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm_zone=yes
else
@@ -2862,12 +3225,12 @@ EOF
else
echo $ac_n "checking for tzname""... $ac_c" 1>&6
-echo "configure:2866: checking for tzname" >&5
+echo "configure:3229: 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 <<EOF
-#line 2871 "configure"
+#line 3234 "configure"
#include "confdefs.h"
#include <time.h>
#ifndef tzname /* For SGI. */
@@ -2877,7 +3240,7 @@ int main() {
atoi(*tzname);
; return 0; }
EOF
-if { (eval echo configure:2881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
ac_cv_var_tzname=yes
else
@@ -2899,9 +3262,9 @@ EOF
fi
echo $ac_n "checking for struct timezone""... $ac_c" 1>&6
-echo "configure:2903: checking for struct timezone" >&5
+echo "configure:3266: checking for struct timezone" >&5
cat > conftest.$ac_ext <<EOF
-#line 2905 "configure"
+#line 3268 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -2911,7 +3274,7 @@ int main() {
struct timezone tz; tz.tz_minuteswest=0;
; return 0; }
EOF
-if { (eval echo configure:2915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_TIMEZONE 1
@@ -2927,9 +3290,9 @@ fi
rm -f conftest*
echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
-echo "configure:2931: checking for st_blocks in struct stat" >&5
+echo "configure:3294: checking for st_blocks in struct stat" >&5
cat > conftest.$ac_ext <<EOF
-#line 2933 "configure"
+#line 3296 "configure"
#include "confdefs.h"
#include <sys/stat.h>
@@ -2937,7 +3300,7 @@ int main() {
struct stat sb; sb.st_blocks=0;
; return 0; }
EOF
-if { (eval echo configure:2941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_STAT_ST_BLOCKS 1
@@ -2955,12 +3318,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:2959: checking for $ac_func" >&5
+echo "configure:3322: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2964 "configure"
+#line 3327 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2983,7 +3346,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3007,15 +3370,15 @@ else
fi
done
-for ac_func in _scrsize ioctl
+for ac_func in _scrsize ioctl compress2
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3014: checking for $ac_func" >&5
+echo "configure:3377: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3019 "configure"
+#line 3382 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3038,7 +3401,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3064,16 +3427,16 @@ done
echo $ac_n "checking for struct videoconfig""... $ac_c" 1>&6
-echo "configure:3068: checking for struct videoconfig" >&5
+echo "configure:3431: checking for struct videoconfig" >&5
cat > conftest.$ac_ext <<EOF
-#line 3070 "configure"
+#line 3433 "configure"
#include "confdefs.h"
int main() {
struct videoconfig w; w.numtextcols=0;
; return 0; }
EOF
-if { (eval echo configure:3077: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_VIDEOCONFIG 1
@@ -3089,16 +3452,16 @@ fi
rm -f conftest*
echo $ac_n "checking for struct text_info""... $ac_c" 1>&6
-echo "configure:3093: checking for struct text_info" >&5
+echo "configure:3456: checking for struct text_info" >&5
cat > conftest.$ac_ext <<EOF
-#line 3095 "configure"
+#line 3458 "configure"
#include "confdefs.h"
int main() {
struct text_info w; w.screenwidth=0;
; return 0; }
EOF
-if { (eval echo configure:3102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_STRUCT_TEXT_INFO 1
@@ -3114,16 +3477,16 @@ fi
rm -f conftest*
echo $ac_n "checking for TIOCGWINSZ""... $ac_c" 1>&6
-echo "configure:3118: checking for TIOCGWINSZ" >&5
+echo "configure:3481: checking for TIOCGWINSZ" >&5
cat > conftest.$ac_ext <<EOF
-#line 3120 "configure"
+#line 3483 "configure"
#include "confdefs.h"
#include <sys/ioctl.h>
int main() {
int w=TIOCGWINSZ;
; return 0; }
EOF
-if { (eval echo configure:3127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_TIOCGWINSZ 1
@@ -3139,16 +3502,16 @@ fi
rm -f conftest*
echo $ac_n "checking for TIOCGGETD""... $ac_c" 1>&6
-echo "configure:3143: checking for TIOCGGETD" >&5
+echo "configure:3506: checking for TIOCGGETD" >&5
cat > conftest.$ac_ext <<EOF
-#line 3145 "configure"
+#line 3508 "configure"
#include "confdefs.h"
#include <sys/ioctl.h>
int main() {
int w=TIOCGETD;
; return 0; }
EOF
-if { (eval echo configure:3152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_TIOCGETD 1
@@ -3167,12 +3530,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:3171: checking for $ac_func" >&5
+echo "configure:3534: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3176 "configure"
+#line 3539 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3195,7 +3558,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3222,12 +3585,12 @@ done
for ac_func in gettimeofday BSDgettimeofday difftime sigaction
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3226: checking for $ac_func" >&5
+echo "configure:3589: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3231 "configure"
+#line 3594 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3250,7 +3613,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3276,24 +3639,24 @@ done
cat > conftest.$ac_ext <<EOF
-#line 3280 "configure"
+#line 3643 "configure"
#include "confdefs.h"
#include<sys/types.h>
int main() {
off64_t n = 0;
; return 0; }
EOF
-if { (eval echo configure:3287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3650: \"$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:3292: checking for $ac_func" >&5
+echo "configure:3655: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 3297 "configure"
+#line 3660 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3316,7 +3679,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3351,12 +3714,12 @@ rm -f conftest*
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:3355: checking for working const" >&5
+echo "configure:3718: 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 <<EOF
-#line 3360 "configure"
+#line 3723 "configure"
#include "confdefs.h"
int main() {
@@ -3405,7 +3768,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:3409: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -3426,21 +3789,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:3430: checking for inline" >&5
+echo "configure:3793: 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 <<EOF
-#line 3437 "configure"
+#line 3800 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:3444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -3467,16 +3830,16 @@ esac
echo $ac_n "checking for __attribute__ extension""... $ac_c" 1>&6
-echo "configure:3471: checking for __attribute__ extension" >&5
+echo "configure:3834: checking for __attribute__ extension" >&5
cat > conftest.$ac_ext <<EOF
-#line 3473 "configure"
+#line 3836 "configure"
#include "confdefs.h"
int main() {
int __attribute__((unused)) f(void){return 1;}
; return 0; }
EOF
-if { (eval echo configure:3480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_ATTRIBUTE 1
@@ -3492,16 +3855,16 @@ fi
rm -f conftest*
echo $ac_n "checking for __FUNCTION__ extension""... $ac_c" 1>&6
-echo "configure:3496: checking for __FUNCTION__ extension" >&5
+echo "configure:3859: checking for __FUNCTION__ extension" >&5
cat > conftest.$ac_ext <<EOF
-#line 3498 "configure"
+#line 3861 "configure"
#include "confdefs.h"
int main() {
int f(void){return __FUNCTION__;}
; return 0; }
EOF
-if { (eval echo configure:3505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:3868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_FUNCTION 1
@@ -3517,7 +3880,7 @@ fi
rm -f conftest*
echo $ac_n "checking how to print long long""... $ac_c" 1>&6
-echo "configure:3521: checking how to print long long" >&5
+echo "configure:3884: 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
@@ -3526,7 +3889,7 @@ else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 3530 "configure"
+#line 3893 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -3537,7 +3900,7 @@ else
sprintf(s,"%${hdf5_cv_printf_ll}d",x);
exit (strcmp(s,"1099511627776"));}
EOF
-if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
break
else
@@ -3558,7 +3921,7 @@ EOF
echo $ac_n "checking for debug flags""... $ac_c" 1>&6
-echo "configure:3562: checking for debug flags" >&5
+echo "configure:3925: checking for debug flags" >&5
# Check whether --enable-debug or --disable-debug was given.
if test "${enable_debug+set}" = set; then
enableval="$enable_debug"
@@ -3590,7 +3953,7 @@ if test "X" != "X$DEBUG_PKG"; then
fi
echo $ac_n "checking for API tracing""... $ac_c" 1>&6
-echo "configure:3594: checking for API tracing" >&5;
+echo "configure:3957: checking for API tracing" >&5;
# Check whether --enable-trace or --disable-trace was given.
if test "${enable_trace+set}" = set; then
enableval="$enable_trace"
@@ -3613,7 +3976,7 @@ if test "${enable_parallel+set}" = set; then
fi
echo $ac_n "checking for parallel support""... $ac_c" 1>&6
-echo "configure:3617: checking for parallel support" >&5;
+echo "configure:3980: checking for parallel support" >&5;
@@ -3640,7 +4003,7 @@ case "X-$PARALLEL" in
EOF
echo $ac_n "checking for main in -lmpi""... $ac_c" 1>&6
-echo "configure:3644: checking for main in -lmpi" >&5
+echo "configure:4007: 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
@@ -3648,14 +4011,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmpi $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3652 "configure"
+#line 4015 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4022: \"$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
@@ -3682,7 +4045,7 @@ else
echo "$ac_t""no" 1>&6
fi
echo $ac_n "checking for main in -lmpio""... $ac_c" 1>&6
-echo "configure:3686: checking for main in -lmpio" >&5
+echo "configure:4049: 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
@@ -3690,14 +4053,14 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lmpio $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3694 "configure"
+#line 4057 "configure"
#include "confdefs.h"
int main() {
main()
; return 0; }
EOF
-if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:4064: \"$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 9120fbd..6f1eba3 100644
--- a/configure.in
+++ b/configure.in
@@ -124,8 +124,9 @@ esac
dnl ----------------------------------------------------------------------
dnl Check for system libraries.
dnl
-AC_CHECK_LIB(m, ceil)
-AC_CHECK_LIB(coug, main) dnl ...for ASCI/Red
+AC_CHECK_LIB(m,ceil)
+AC_CHECK_LIB(nsl,xdr_int) dnl ...for Solaris and hdf4
+AC_CHECK_LIB(coug,main) dnl ...for ASCI/Red
AC_CHECK_LIB(jpeg,main) dnl ...required for linking hdf4 apps
dnl ----------------------------------------------------------------------
@@ -151,6 +152,20 @@ AC_CHECK_SIZEOF(__int64, 8)
AC_CHECK_SIZEOF(float, 4)
AC_CHECK_SIZEOF(double, 8)
AC_CHECK_SIZEOF(long double, 8)
+
+dnl Posix.1g types
+cat >>confdefs.h <<\EOF
+#include <sys/types.h>
+EOF
+AC_CHECK_SIZEOF( int8_t, 1)
+AC_CHECK_SIZEOF( uint8_t, 1)
+AC_CHECK_SIZEOF( int16_t, 2)
+AC_CHECK_SIZEOF(uint16_t, 2)
+AC_CHECK_SIZEOF( int32_t, 4)
+AC_CHECK_SIZEOF(uint32_t, 4)
+AC_CHECK_SIZEOF( int64_t, 8)
+AC_CHECK_SIZEOF(uint64_t, 8)
+
AC_CHECK_SIZEOF(size_t, 4)
cat >>confdefs.h <<\EOF
#include <sys/types.h> /*for off_t definition*/
@@ -188,7 +203,7 @@ AC_ARG_WITH(zlib,[ --with-zlib=INC,LIB Use the GNU zlib compression],
case $withval in
yes)
AC_CHECK_HEADERS(zlib.h)
- AC_CHECK_LIB(z, compress2)
+ AC_CHECK_LIB(z, compress)
;;
no)
AC_MSG_CHECKING(for GNU zlib)
@@ -208,9 +223,9 @@ case $withval in
if test "X" != "$zlb_lib"; then
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$zlib_lib"
- AC_CHECK_LIB(z, compress2,,LDFLAGS="$saved_LDFLAGS")
+ AC_CHECK_LIB(z, compress,,LDFLAGS="$saved_LDFLAGS")
else
- AC_CHECK_LIB(z, compress2)
+ AC_CHECK_LIB(z, compress)
fi
;;
esac
@@ -229,8 +244,8 @@ AC_ARG_WITH(hdf4,[ --with-hdf4=INC,LIB Use the HDF4 library],,withval=yes)
case $withval in
yes)
AC_CHECK_HEADERS(mfhdf.h,,unset H5TOH4 TESTH5TOH4)
- AC_CHECK_LIB(mfhdf,main,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(df,main,,unset H5TOH4 TESTH5TOH4)
+ AC_CHECK_LIB(mfhdf,main,,unset H5TOH4 TESTH5TOH4)
;;
no)
AC_MSG_CHECKING(for HDF4)
@@ -254,11 +269,11 @@ case $withval in
if test "X" != "$hdf4_lib"; then
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$hdf4_lib"
- AC_CHECK_LIB(mfhdf,main,,unset H5TOH4 TESTH5TOH4)
AC_CHECK_LIB(df,main,,unset H5TOH4 TESTH5TOH4)
+ AC_CHECK_LIB(mfhdf,main,,unset H5TOH4 TESTH5TOH4)
else
- AC_CHECK_LIB(mfhdf,main)
AC_CHECK_LIB(df,main)
+ AC_CHECK_LIB(mfhdf,main)
fi
;;
esac
@@ -312,7 +327,7 @@ dnl ----------------------------------------------------------------------
dnl How do we figure out the width of a tty in characters?
dnl
AC_CHECK_FUNCS(_getvideoconfig gettextinfo GetConsoleScreenBufferInfo)
-AC_CHECK_FUNCS(_scrsize ioctl)
+AC_CHECK_FUNCS(_scrsize ioctl compress2)
AC_MSG_CHECKING(for struct videoconfig)
AC_TRY_COMPILE(,[struct videoconfig w; w.numtextcols=0;],
diff --git a/src/.distdep b/src/.distdep
index 24cf35b..4dfd2fb 100644
--- a/src/.distdep
+++ b/src/.distdep
@@ -1019,6 +1019,32 @@ H5Smpio.o: \
H5Opublic.h \
H5HGprivate.h \
H5HGpublic.h
+H5Snone.o: \
+ H5Snone.c \
+ H5private.h \
+ H5public.h \
+ H5config.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 \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
+ H5Zprivate.h \
+ H5Zpublic.h \
+ H5Vprivate.h
H5Spoint.o: \
H5Spoint.c \
H5private.h \
diff --git a/src/H5.c b/src/H5.c
index 06c164c..47a0024 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -709,7 +709,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
long x = va_arg (ap, long);
n = fprintf (stream, template, x);
} else {
- int64 x = va_arg(ap, int64);
+ int64_t x = va_arg(ap, int64_t);
n = fprintf (stream, template, x);
}
break;
@@ -728,7 +728,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
unsigned long x = va_arg (ap, unsigned long);
n = fprintf (stream, template, x);
} else {
- uint64 x = va_arg(ap, uint64);
+ uint64_t x = va_arg(ap, uint64_t);
n = fprintf (stream, template, x);
}
break;
@@ -837,7 +837,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
/*-------------------------------------------------------------------------
* Function: HDstrtoll
*
- * Purpose: Converts the string S to an int64 value according to the
+ * Purpose: Converts the string S to an int64_t value according to the
* given BASE, which must be between 2 and 36 inclusive, or be
* the special value zero.
*
@@ -849,7 +849,7 @@ HDfprintf (FILE *stream, const char *fmt, ...)
* unless the next character is a `0', in which case it is taken
* as 8 (octal).
*
- * The remainder of the string is converted to an int64 in the
+ * The remainder of the string is converted to an int64_t in the
* obvious manner, stopping at the first character which is not
* a valid digit in the given base. (In bases above 10, the
* letter `A' in either upper or lower case represetns 10, `B'
@@ -878,10 +878,10 @@ HDfprintf (FILE *stream, const char *fmt, ...)
*
*-------------------------------------------------------------------------
*/
-int64
+int64_t
HDstrtoll (const char *s, const char **rest, int base)
{
- int64 sign=1, acc=0;
+ int64_t sign=1, acc=0;
hbool_t overflow = FALSE;
errno = 0;
@@ -918,7 +918,7 @@ HDstrtoll (const char *s, const char **rest, int base)
(*s>='a' && *s<'a'+base-10) ||
(*s>='A' && *s<'A'+base-10)))) {
if (!overflow) {
- int64 digit = 0;
+ int64_t digit = 0;
if (*s>='0' && *s<='9') digit = *s - '0';
else if (*s>='a' && *s<='z') digit = *s-'a'+10;
else digit = *s-'A'+10;
@@ -935,9 +935,9 @@ HDstrtoll (const char *s, const char **rest, int base)
/* Overflow */
if (overflow) {
if (sign>0) {
- acc = ((uint64)1<<(8*sizeof(int64)-1))-1;
+ acc = ((uint64_t)1<<(8*sizeof(int64_t)-1))-1;
} else {
- acc = (uint64)1<<(8*sizeof(int64)-1);
+ acc = (uint64_t)1<<(8*sizeof(int64_t)-1);
}
errno = ERANGE;
}
diff --git a/src/H5A.c b/src/H5A.c
index 5e9cacf..89ee492 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -107,6 +107,7 @@ static void
H5A_term_interface(void)
{
H5I_destroy_group(H5I_ATTR);
+ interface_initialize_g = FALSE;
}
@@ -609,7 +610,7 @@ H5Awrite(hid_t attr_id, hid_t type_id, void *buf)
static herr_t
H5A_write(H5A_t *attr, const H5T_t *mem_type, void *buf)
{
- uint8 *tconv_buf = NULL; /* data type conv buffer */
+ uint8_t *tconv_buf = NULL; /* data type conv buffer */
size_t nelmts; /* elements in attribute */
H5T_conv_t tconv_func = NULL; /* conversion function */
H5T_cdata_t *cdata = NULL; /* type conversion data */
@@ -780,7 +781,7 @@ H5Aread(hid_t attr_id, hid_t type_id, void *buf)
static herr_t
H5A_read(H5A_t *attr, const H5T_t *mem_type, void *buf)
{
- uint8 *tconv_buf = NULL; /* data type conv buffer*/
+ uint8_t *tconv_buf = NULL; /* data type conv buffer*/
size_t nelmts; /* elements in attribute*/
H5T_conv_t tconv_func = NULL; /* conversion function */
H5T_cdata_t *cdata = NULL; /* type conversion data */
@@ -1389,7 +1390,7 @@ H5A_close(H5A_t *attr)
/* Check if the attribute has any data yet, if not, fill with zeroes */
if(attr->ent_opened && !attr->initialized) {
- uint8 *tmp_buf=H5MM_calloc(attr->data_size);
+ uint8_t *tmp_buf=H5MM_calloc(attr->data_size);
if (NULL == tmp_buf) {
HRETURN_ERROR(H5E_ATTR, H5E_NOSPACE, FAIL,
"memory allocation failed for attribute fill-value");
diff --git a/src/H5B.c b/src/H5B.c
index 32fb141..8b45638 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -103,10 +103,10 @@
static H5B_ins_t H5B_insert_helper(H5F_t *f, const haddr_t *addr,
const H5B_class_t *type,
const double split_ratios[],
- uint8 *lt_key,
+ uint8_t *lt_key,
hbool_t *lt_key_changed,
- uint8 *md_key, void *udata,
- uint8 *rt_key,
+ uint8_t *md_key, void *udata,
+ uint8_t *rt_key,
hbool_t *rt_key_changed,
haddr_t *retval);
static herr_t H5B_insert_child(H5F_t *f, const H5B_class_t *type,
@@ -285,7 +285,7 @@ H5B_load(H5F_t *f, const haddr_t *addr, const void *_type, void *udata)
size_t size, total_nkey_size;
H5B_t *bt = NULL;
intn i;
- uint8 *p;
+ uint8_t *p;
H5B_t *ret_value = NULL;
FUNC_ENTER(H5B_load, NULL);
@@ -336,8 +336,8 @@ H5B_load(H5F_t *f, const haddr_t *addr, const void *_type, void *udata)
UINT16DECODE(p, bt->nchildren);
/* sibling pointers */
- H5F_addr_decode(f, (const uint8 **) &p, &(bt->left));
- H5F_addr_decode(f, (const uint8 **) &p, &(bt->right));
+ H5F_addr_decode(f, (const uint8_t **) &p, &(bt->left));
+ H5F_addr_decode(f, (const uint8_t **) &p, &(bt->right));
/* the child/key pairs */
for (i = 0; i < 2 * H5B_K(f, type); i++) {
@@ -348,7 +348,7 @@ H5B_load(H5F_t *f, const haddr_t *addr, const void *_type, void *udata)
bt->key[i].nkey = NULL;
if (i < bt->nchildren) {
- H5F_addr_decode(f, (const uint8 **) &p, bt->child + i);
+ H5F_addr_decode(f, (const uint8_t **) &p, bt->child + i);
} else {
H5F_addr_undef(bt->child + i);
p += H5F_SIZEOF_ADDR(f);
@@ -392,7 +392,7 @@ H5B_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5B_t *bt)
{
intn i;
size_t size = 0;
- uint8 *p = bt->page;
+ uint8_t *p = bt->page;
FUNC_ENTER(H5B_flush, FAIL);
@@ -840,17 +840,17 @@ H5B_insert(H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
/*
* These are defined this way to satisfy alignment constraints.
*/
- uint64 _lt_key[128], _md_key[128], _rt_key[128];
- uint8 *lt_key=(uint8*)_lt_key;
- uint8 *md_key=(uint8*)_md_key;
- uint8 *rt_key=(uint8*)_rt_key;
+ uint64_t _lt_key[128], _md_key[128], _rt_key[128];
+ uint8_t *lt_key=(uint8_t*)_lt_key;
+ uint8_t *md_key=(uint8_t*)_md_key;
+ uint8_t *rt_key=(uint8_t*)_rt_key;
hbool_t lt_key_changed = FALSE, rt_key_changed = FALSE;
haddr_t child, old_root;
intn level;
H5B_t *bt;
size_t size;
- uint8 *buf = NULL;
+ uint8_t *buf = NULL;
H5B_ins_t my_ins = H5B_INS_ERROR;
herr_t ret_value = FAIL;
@@ -1128,9 +1128,9 @@ H5B_insert_child(H5F_t *f, const H5B_class_t *type, H5B_t *bt,
*/
static H5B_ins_t
H5B_insert_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
- const double split_ratios[], uint8 *lt_key,
- hbool_t *lt_key_changed, uint8 *md_key, void *udata,
- uint8 *rt_key, hbool_t *rt_key_changed,
+ const double split_ratios[], uint8_t *lt_key,
+ hbool_t *lt_key_changed, uint8_t *md_key, void *udata,
+ uint8_t *rt_key, hbool_t *rt_key_changed,
haddr_t *new_node/*out*/)
{
H5B_t *bt = NULL, *twin = NULL, *tmp_bt = NULL;
@@ -1590,9 +1590,9 @@ H5B_iterate (H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
*/
static H5B_ins_t
H5B_remove_helper(H5F_t *f, const haddr_t *addr, const H5B_class_t *type,
- intn level, uint8 *lt_key/*out*/,
+ intn level, uint8_t *lt_key/*out*/,
hbool_t *lt_key_changed/*out*/, void *udata,
- uint8 *rt_key/*out*/, hbool_t *rt_key_changed/*out*/)
+ uint8_t *rt_key/*out*/, hbool_t *rt_key_changed/*out*/)
{
H5B_t *bt = NULL, *sibling = NULL;
H5B_ins_t ret_value = H5B_INS_ERROR;
@@ -1874,9 +1874,9 @@ H5B_remove(H5F_t *f, const H5B_class_t *type, const haddr_t *addr,
void *udata)
{
/* These are defined this way to satisfy alignment constraints */
- uint64 _lt_key[128], _rt_key[128];
- uint8 *lt_key = (uint8*)_lt_key; /*left key*/
- uint8 *rt_key = (uint8*)_rt_key; /*right key*/
+ uint64_t _lt_key[128], _rt_key[128];
+ uint8_t *lt_key = (uint8_t*)_lt_key; /*left key*/
+ uint8_t *rt_key = (uint8_t*)_rt_key; /*right key*/
hbool_t lt_key_changed = FALSE; /*left key changed?*/
hbool_t rt_key_changed = FALSE; /*right key changed?*/
H5B_t *bt = NULL; /*btree node */
diff --git a/src/H5Bprivate.h b/src/H5Bprivate.h
index da89026..3fd21b6 100644
--- a/src/H5Bprivate.h
+++ b/src/H5Bprivate.h
@@ -89,8 +89,8 @@ typedef struct H5B_class_t {
void*, void*, hbool_t*);
herr_t (*list)(H5F_t*, const haddr_t*, void*); /*walk leaf nodes*/
- herr_t (*decode)(H5F_t*, struct H5B_t*, uint8*, void*);
- herr_t (*encode)(H5F_t*, struct H5B_t*, uint8*, void*);
+ herr_t (*decode)(H5F_t*, struct H5B_t*, uint8_t*, void*);
+ herr_t (*encode)(H5F_t*, struct H5B_t*, uint8_t*, void*);
herr_t (*debug_key)(FILE*, intn, intn, const void*, const void*);
} H5B_class_t;
@@ -99,7 +99,7 @@ typedef struct H5B_class_t {
*/
typedef struct H5B_key_t {
hbool_t dirty; /*native key is more recent than raw key */
- uint8 *rkey; /*ptr into node->page for raw key */
+ uint8_t *rkey; /*ptr into node->page for raw key */
void *nkey; /*null or ptr into node->native for key */
} H5B_key_t;
@@ -112,8 +112,8 @@ typedef struct H5B_t {
haddr_t left; /*address of left sibling */
haddr_t right; /*address of right sibling */
intn nchildren; /*number of child pointers */
- uint8 *page; /*disk page */
- uint8 *native; /*array of keys in native format */
+ uint8_t *page; /*disk page */
+ uint8_t *native; /*array of keys in native format */
H5B_key_t *key; /*2k+1 key entries */
haddr_t *child; /*2k child pointers */
} H5B_t;
diff --git a/src/H5D.c b/src/H5D.c
index 4162c34..15c0956 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -148,6 +148,7 @@ static void
H5D_term_interface(void)
{
H5I_destroy_group(H5I_DATASET);
+ interface_initialize_g = FALSE;
}
/*-------------------------------------------------------------------------
@@ -1448,8 +1449,8 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
size_t smine_start; /*strip mine start loc */
size_t n, smine_nelmts; /*elements per strip */
hid_t tconv_id=FAIL, bkg_id=FAIL; /* Conversion buffer IDs */
- uint8 *tconv_buf = NULL; /*data type conv buffer */
- uint8 *bkg_buf = NULL; /*background buffer */
+ uint8_t *tconv_buf = NULL; /*data type conv buffer */
+ uint8_t *bkg_buf = NULL; /*background buffer */
H5T_conv_t tconv_func = NULL; /*conversion function */
hid_t src_id = -1, dst_id = -1;/*temporary type atoms */
H5S_conv_t *sconv=NULL; /*space conversion funcs*/
@@ -1684,7 +1685,7 @@ H5D_read(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
printf("%s: check 6.5\n",FUNC);
{
int i;
- uint16 *b;
+ uint16_t *b;
if(qak_debug) {
b=tconv_buf;
@@ -1807,8 +1808,8 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
size_t smine_start; /*strip mine start loc */
size_t n, smine_nelmts; /*elements per strip */
hid_t tconv_id=FAIL, bkg_id=FAIL; /* Conversion buffer IDs */
- uint8 *tconv_buf = NULL; /*data type conv buffer */
- uint8 *bkg_buf = NULL; /*background buffer */
+ uint8_t *tconv_buf = NULL; /*data type conv buffer */
+ uint8_t *bkg_buf = NULL; /*background buffer */
H5T_conv_t tconv_func = NULL; /*conversion function */
hid_t src_id = -1, dst_id = -1;/*temporary type atoms */
H5S_conv_t *sconv=NULL; /*space conversion funcs*/
@@ -2050,7 +2051,7 @@ H5D_write(H5D_t *dataset, const H5T_t *mem_type, const H5S_t *mem_space,
#ifdef QAK
{
int i;
- uint16 *b;
+ uint16_t *b;
if(qak_debug) {
b=tconv_buf;
diff --git a/src/H5Distore.c b/src/H5Distore.c
index c30a24f..92c0dd3 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -86,7 +86,7 @@ typedef struct H5F_rdcc_ent_t {
size_t wr_count; /*bytes remaining to be written */
size_t chunk_size; /*size of a chunk */
size_t alloc_size; /*amount allocated for the chunk */
- uint8 *chunk; /*the unfiltered chunk data */
+ uint8_t *chunk; /*the unfiltered chunk data */
intn idx; /*index in hash table */
struct H5F_rdcc_ent_t *next;/*next item in doubly-linked list */
struct H5F_rdcc_ent_t *prev;/*previous item in doubly-linked list */
@@ -108,9 +108,9 @@ static H5B_ins_t H5F_istore_insert(H5F_t *f, const haddr_t *addr,
void *_md_key, void *_udata,
void *_rt_key, hbool_t *rt_key_changed,
haddr_t *new_node/*out*/);
-static herr_t H5F_istore_decode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
+static herr_t H5F_istore_decode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
-static herr_t H5F_istore_encode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
+static herr_t H5F_istore_encode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
static herr_t H5F_istore_debug_key (FILE *stream, intn indent, intn fwidth,
const void *key, const void *udata);
@@ -228,7 +228,7 @@ H5F_istore_sizeof_rkey(H5F_t __unused__ *f, const void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
+H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8_t *raw, void *_key)
{
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
intn i;
@@ -269,7 +269,7 @@ H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
-H5F_istore_encode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
+H5F_istore_encode_key(H5F_t __unused__ *f, H5B_t *bt, uint8_t *raw, void *_key)
{
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
intn ndims = H5F_ISTORE_NDIMS(bt);
@@ -506,7 +506,7 @@ H5F_istore_new_node(H5F_t *f, H5B_ins_t op,
rt_key->nbytes = 0;
rt_key->filter_mask = 0;
for (i=0; i<udata->mesg.ndims; i++) {
- assert (udata->mesg.dim[i] < MAX_HSSIZET);
+ assert (udata->mesg.dim[i] < HSSIZET_MAX);
assert (udata->key.offset[i]+(hssize_t)(udata->mesg.dim[i]) >
udata->key.offset[i]);
rt_key->offset[i] = udata->key.offset[i] +
@@ -1434,7 +1434,7 @@ H5F_istore_unlock (H5F_t *f, const H5O_layout_t *layout,
const double split_ratios[],
const H5O_pline_t *pline, hbool_t dirty,
const hssize_t offset[], intn *idx_hint,
- uint8 *chunk, size_t naccessed)
+ uint8_t *chunk, size_t naccessed)
{
H5F_rdcc_t *rdcc = &(f->shared->rdcc);
H5F_rdcc_ent_t *ent = NULL;
@@ -1527,7 +1527,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
intn i, carry;
size_t naccessed; /*bytes accessed in chnk*/
- uint8 *chunk=NULL; /*ptr to a chunk buffer */
+ uint8_t *chunk=NULL; /*ptr to a chunk buffer */
intn idx_hint=0; /*cache index hint */
FUNC_ENTER(H5F_istore_read, FAIL);
@@ -1554,7 +1554,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0; i<layout->ndims; i++) {
assert (offset_f[i]>=0); /*negative offsets not supported*/
assert (offset_m[i]>=0); /*negative offsets not supported*/
- assert (size[i]<MAX_SIZET);
+ assert (size[i]<SIZET_MAX);
assert(offset_m[i]+(hssize_t)size[i]<=(hssize_t)size_m[i]);
assert(layout->dim[i]>0);
}
@@ -1575,7 +1575,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
while (1) {
for (i=0, naccessed=1; i<layout->ndims; i++) {
/* The location and size of the chunk being accessed */
- assert (layout->dim[i] < MAX_HSSIZET);
+ assert (layout->dim[i] < HSSIZET_MAX);
chunk_offset[i] = idx_cur[i] * (hssize_t)(layout->dim[i]);
/* The offset and size wrt the chunk */
@@ -1697,7 +1697,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
hssize_t offset_wrt_chunk[H5O_LAYOUT_NDIMS];
hssize_t sub_offset_m[H5O_LAYOUT_NDIMS];
- uint8 *chunk=NULL;
+ uint8_t *chunk=NULL;
intn idx_hint=0;
size_t chunk_size, naccessed;
@@ -1726,7 +1726,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0; i<layout->ndims; i++) {
assert (offset_f[i]>=0); /*negative offsets not supported*/
assert (offset_m[i]>=0); /*negative offsets not supported*/
- assert(size[i]<MAX_SIZET);
+ assert(size[i]<SIZET_MAX);
assert(offset_m[i]+(hssize_t)size[i]<=(hssize_t)size_m[i]);
assert(layout->dim[i]>0);
}
@@ -1749,7 +1749,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0, naccessed=1; i<layout->ndims; i++) {
/* The location and size of the chunk being accessed */
- assert (layout->dim[i] < MAX_HSSIZET);
+ assert (layout->dim[i] < HSSIZET_MAX);
chunk_offset[i] = idx_cur[i] * (hssize_t)(layout->dim[i]);
/* The offset and size wrt the chunk */
@@ -2064,7 +2064,7 @@ H5F_istore_allocate (H5F_t *f, const H5O_layout_t *layout,
intn i, carry;
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
- uint8 *chunk=NULL;
+ uint8_t *chunk=NULL;
intn idx_hint=0;
size_t chunk_size;
#ifdef AKC
diff --git a/src/H5F.c b/src/H5F.c
index 38f17e9..39e9bb3 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -215,6 +215,7 @@ static void
H5F_term_interface(void)
{
H5I_destroy_group(H5I_FILE);
+ interface_initialize_g = FALSE;
}
@@ -224,8 +225,8 @@ H5F_term_interface(void)
USAGE
void H5F_encode_length_unusual(f, p, l)
const H5F_t *f; IN: pointer to the file record
- uint8 **p; IN: pointer to buffer pointer to encode length in
- uint8 *l; IN: pointer to length to encode
+ uint8_t **p; IN: pointer to buffer pointer to encode length in
+ uint8_t *l; IN: pointer to length to encode
ERRORS
@@ -235,7 +236,7 @@ H5F_term_interface(void)
Encode non-standard (i.e. not 2, 4 or 8-byte) lengths in file meta-data.
--------------------------------------------------------------------------*/
void
-H5F_encode_length_unusual(const H5F_t *f, uint8 **p, uint8 *l)
+H5F_encode_length_unusual(const H5F_t *f, uint8_t **p, uint8_t *l)
{
intn i = (intn)H5F_SIZEOF_SIZE(f)-1;
@@ -411,9 +412,9 @@ H5F_locate_signature(H5F_low_t *f_handle, const H5F_access_t *access_parms,
haddr_t *addr/*out*/)
{
herr_t ret_value=FAIL;
- haddr_t max_addr;
- uint8 buf[H5F_SIGNATURE_LEN];
- uintn n = 9;
+ haddr_t max_addr;
+ uint8_t buf[H5F_SIGNATURE_LEN];
+ uintn n = 9;
FUNC_ENTER(H5F_locate_signature, FAIL);
@@ -765,8 +766,8 @@ H5F_open(const char *name, uintn flags,
H5F_low_t *fd = NULL; /*low level file desc */
hbool_t empty_file = FALSE; /*is file empty? */
hbool_t file_exists = FALSE; /*file already exists */
- uint8 buf[256]; /*I/O buffer.. */
- const uint8 *p = NULL; /* ..and pointer into it */
+ uint8_t buf[256]; /*I/O buffer.. */
+ const uint8_t *p = NULL; /* ..and pointer into it */
size_t fixed_size = 24; /*size of fixed part of boot blk*/
size_t variable_size; /*variable part of boot block */
H5F_create_t *cp = NULL; /*file creation parameters */
@@ -1453,7 +1454,7 @@ H5Fflush(hid_t object_id, H5F_scope_t scope)
static herr_t
H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate)
{
- uint8 buf[2048], *p = buf;
+ uint8_t buf[2048], *p = buf;
haddr_t reserved_addr;
uintn nerrors=0, i;
@@ -1504,9 +1505,9 @@ H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate)
*p++ = 0; /*reserved*/
*p++ = f->shared->create_parms->sharedheader_ver;
assert (H5F_SIZEOF_ADDR(f)<=255);
- *p++ = (uint8)H5F_SIZEOF_ADDR(f);
+ *p++ = (uint8_t)H5F_SIZEOF_ADDR(f);
assert (H5F_SIZEOF_SIZE(f)<=255);
- *p++ = (uint8)H5F_SIZEOF_SIZE(f);
+ *p++ = (uint8_t)H5F_SIZEOF_SIZE(f);
*p++ = 0; /*reserved */
UINT16ENCODE(p, f->shared->create_parms->sym_leaf_k);
UINT16ENCODE(p, f->shared->create_parms->btree_k[H5B_SNODE_ID]);
@@ -1675,7 +1676,7 @@ H5F_close(H5F_t *f)
USAGE
herr_t H5Fclose(file_id)
- int32 file_id; IN: File ID of file to close
+ int32_t file_id; IN: File ID of file to close
ERRORS
ARGS BADTYPE Not a file atom.
@@ -2196,7 +2197,7 @@ H5F_block_read(H5F_t *f, const haddr_t *addr, hsize_t size,
FUNC_ENTER(H5F_block_read, FAIL);
- assert (size < MAX_SIZET);
+ assert (size < SIZET_MAX);
/* convert the relative address to an absolute address */
abs_addr = f->shared->base_addr;
@@ -2241,7 +2242,7 @@ H5F_block_write(H5F_t *f, const haddr_t *addr, hsize_t size,
FUNC_ENTER(H5F_block_write, FAIL);
- assert (size < MAX_SIZET);
+ assert (size < SIZET_MAX);
if (0 == (f->intent & H5F_ACC_RDWR)) {
HRETURN_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "no write intent");
diff --git a/src/H5Farray.c b/src/H5Farray.c
index 0c77bb5..38f3f07 100644
--- a/src/H5Farray.c
+++ b/src/H5Farray.c
@@ -8,7 +8,7 @@
* Purpose: Provides I/O facilities for multi-dimensional arrays of bytes
* stored with various layout policies. If the caller is
* interested in arrays of elements >1 byte then add an extra
- * dimension. For example, a 10x20 array of int32 would
+ * dimension. For example, a 10x20 array of int would
* translate to a 10x20x4 array of bytes at this level.
*/
#include <H5private.h>
@@ -120,7 +120,7 @@ H5F_arr_read (H5F_t *f, const H5D_xfer_t *xfer,
const hsize_t mem_size[], const hssize_t mem_offset[],
const hssize_t file_offset[], void *_buf/*out*/)
{
- uint8 *buf = (uint8 *)_buf; /*cast for arithmetic */
+ uint8_t *buf = (uint8_t*)_buf; /*cast for arithmetic */
hssize_t file_stride[H5O_LAYOUT_NDIMS]; /*strides through file */
hssize_t mem_stride[H5O_LAYOUT_NDIMS]; /*strides through memory*/
hsize_t hslab_size[H5O_LAYOUT_NDIMS]; /*hyperslab size */
@@ -164,7 +164,7 @@ H5F_arr_read (H5F_t *f, const H5D_xfer_t *xfer,
for(i=0; i<layout->ndims; i++)
printf("%s: %d: hslab_size=%d, mem_size=%d, mem_offset=%d, file_offset=%d\n",FUNC,i,(int)_hslab_size[i],(int)mem_size[i],(int)mem_offset[i],(int)file_offset[i]);
if(qak_debug) {
- printf("%s: *buf=%d, *(buf+1)=%d\n", FUNC,(int)*(const uint16 *)buf,(int)*((const uint16 *)buf+1));
+ printf("%s: *buf=%d, *(buf+1)=%d\n", FUNC,(int)*(const uint16_t *)buf,(int)*((const uint16 *)buf+1));
}
}
#endif /* QAK */
@@ -343,7 +343,7 @@ H5F_arr_write (H5F_t *f, const H5D_xfer_t *xfer,
const hssize_t mem_offset[], const hssize_t file_offset[],
const void *_buf)
{
- const uint8 *buf = (const uint8 *)_buf; /*cast for arithmetic */
+ const uint8_t *buf = (const uint8_t *)_buf; /*cast for arithmetic */
hssize_t file_stride[H5O_LAYOUT_NDIMS]; /*strides through file */
hssize_t mem_stride[H5O_LAYOUT_NDIMS]; /*strides through memory*/
hsize_t hslab_size[H5O_LAYOUT_NDIMS]; /*hyperslab size */
@@ -391,7 +391,7 @@ H5F_arr_write (H5F_t *f, const H5D_xfer_t *xfer,
(int)mem_size[i],(int)mem_offset[i],(int)file_offset[i]);
if(qak_debug) {
printf("%s: *buf=%d, *(buf+1)=%d\n", FUNC,
- (int)*(const uint16 *)buf, (int)*((const uint16 *)buf+1));
+ (int)*(const uint16_t *)buf, (int)*((const uint16_t *)buf+1));
}
}
#endif /* QAK */
diff --git a/src/H5Fcore.c b/src/H5Fcore.c
index d67eebd..557aed2 100644
--- a/src/H5Fcore.c
+++ b/src/H5Fcore.c
@@ -34,11 +34,11 @@ static H5F_low_t *H5F_core_open(const char *name,
static herr_t H5F_core_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_core_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8 *buf);
+ const haddr_t *addr, size_t size, uint8_t *buf);
static herr_t H5F_core_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
- const uint8 *buf);
+ const uint8_t *buf);
const H5F_low_class_t H5F_LOW_CORE_g[1] = {{
H5F_core_access, /*access method */
@@ -185,7 +185,7 @@ H5F_core_close(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms)
static herr_t
H5F_core_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
- const haddr_t *addr, size_t size, uint8 *buf)
+ const haddr_t *addr, size_t size, uint8_t *buf)
{
size_t n;
size_t eof;
@@ -233,11 +233,11 @@ H5F_core_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
static herr_t
H5F_core_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
- const haddr_t *addr, size_t size, const uint8 *buf)
+ const haddr_t *addr, size_t size, const uint8_t *buf)
{
size_t need_more, na;
size_t increment = 1;
- uint8 *x = NULL;
+ uint8_t *x = NULL;
FUNC_ENTER(H5F_core_write, FAIL);
diff --git a/src/H5Ffamily.c b/src/H5Ffamily.c
index 79a9314..d9fb032 100644
--- a/src/H5Ffamily.c
+++ b/src/H5Ffamily.c
@@ -44,11 +44,11 @@ static H5F_low_t *H5F_fam_open(const char *name,
static herr_t H5F_fam_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_fam_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8 *buf);
+ const haddr_t *addr, size_t size, uint8_t *buf);
static herr_t H5F_fam_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
- const uint8 *buf);
+ const uint8_t *buf);
static herr_t H5F_fam_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
const H5F_low_class_t H5F_LOW_FAMILY_g[1] = {{
@@ -314,7 +314,7 @@ H5F_fam_close(H5F_low_t *lf, const H5F_access_t *access_parms)
static herr_t
H5F_fam_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8 *buf)
+ const haddr_t *addr, size_t size, uint8_t *buf)
{
size_t nbytes;
haddr_t cur_addr;
@@ -379,7 +379,7 @@ H5F_fam_read(H5F_low_t *lf, const H5F_access_t *access_parms,
static herr_t
H5F_fam_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, const uint8 *buf)
+ const haddr_t *addr, size_t size, const uint8_t *buf)
{
size_t nbytes;
haddr_t cur_addr, max_addr;
@@ -497,7 +497,7 @@ static herr_t
H5F_fam_flush(H5F_low_t *lf, const H5F_access_t *access_parms)
{
int membno, nerrors = 0;
- uint8 buf[1];
+ uint8_t buf[1];
haddr_t addr1, addr2, addr3;
hsize_t max_offset;
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index c30a24f..92c0dd3 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -86,7 +86,7 @@ typedef struct H5F_rdcc_ent_t {
size_t wr_count; /*bytes remaining to be written */
size_t chunk_size; /*size of a chunk */
size_t alloc_size; /*amount allocated for the chunk */
- uint8 *chunk; /*the unfiltered chunk data */
+ uint8_t *chunk; /*the unfiltered chunk data */
intn idx; /*index in hash table */
struct H5F_rdcc_ent_t *next;/*next item in doubly-linked list */
struct H5F_rdcc_ent_t *prev;/*previous item in doubly-linked list */
@@ -108,9 +108,9 @@ static H5B_ins_t H5F_istore_insert(H5F_t *f, const haddr_t *addr,
void *_md_key, void *_udata,
void *_rt_key, hbool_t *rt_key_changed,
haddr_t *new_node/*out*/);
-static herr_t H5F_istore_decode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
+static herr_t H5F_istore_decode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
-static herr_t H5F_istore_encode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
+static herr_t H5F_istore_encode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
static herr_t H5F_istore_debug_key (FILE *stream, intn indent, intn fwidth,
const void *key, const void *udata);
@@ -228,7 +228,7 @@ H5F_istore_sizeof_rkey(H5F_t __unused__ *f, const void *_udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
+H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8_t *raw, void *_key)
{
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
intn i;
@@ -269,7 +269,7 @@ H5F_istore_decode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
-H5F_istore_encode_key(H5F_t __unused__ *f, H5B_t *bt, uint8 *raw, void *_key)
+H5F_istore_encode_key(H5F_t __unused__ *f, H5B_t *bt, uint8_t *raw, void *_key)
{
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
intn ndims = H5F_ISTORE_NDIMS(bt);
@@ -506,7 +506,7 @@ H5F_istore_new_node(H5F_t *f, H5B_ins_t op,
rt_key->nbytes = 0;
rt_key->filter_mask = 0;
for (i=0; i<udata->mesg.ndims; i++) {
- assert (udata->mesg.dim[i] < MAX_HSSIZET);
+ assert (udata->mesg.dim[i] < HSSIZET_MAX);
assert (udata->key.offset[i]+(hssize_t)(udata->mesg.dim[i]) >
udata->key.offset[i]);
rt_key->offset[i] = udata->key.offset[i] +
@@ -1434,7 +1434,7 @@ H5F_istore_unlock (H5F_t *f, const H5O_layout_t *layout,
const double split_ratios[],
const H5O_pline_t *pline, hbool_t dirty,
const hssize_t offset[], intn *idx_hint,
- uint8 *chunk, size_t naccessed)
+ uint8_t *chunk, size_t naccessed)
{
H5F_rdcc_t *rdcc = &(f->shared->rdcc);
H5F_rdcc_ent_t *ent = NULL;
@@ -1527,7 +1527,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
intn i, carry;
size_t naccessed; /*bytes accessed in chnk*/
- uint8 *chunk=NULL; /*ptr to a chunk buffer */
+ uint8_t *chunk=NULL; /*ptr to a chunk buffer */
intn idx_hint=0; /*cache index hint */
FUNC_ENTER(H5F_istore_read, FAIL);
@@ -1554,7 +1554,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0; i<layout->ndims; i++) {
assert (offset_f[i]>=0); /*negative offsets not supported*/
assert (offset_m[i]>=0); /*negative offsets not supported*/
- assert (size[i]<MAX_SIZET);
+ assert (size[i]<SIZET_MAX);
assert(offset_m[i]+(hssize_t)size[i]<=(hssize_t)size_m[i]);
assert(layout->dim[i]>0);
}
@@ -1575,7 +1575,7 @@ H5F_istore_read(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
while (1) {
for (i=0, naccessed=1; i<layout->ndims; i++) {
/* The location and size of the chunk being accessed */
- assert (layout->dim[i] < MAX_HSSIZET);
+ assert (layout->dim[i] < HSSIZET_MAX);
chunk_offset[i] = idx_cur[i] * (hssize_t)(layout->dim[i]);
/* The offset and size wrt the chunk */
@@ -1697,7 +1697,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
hssize_t offset_wrt_chunk[H5O_LAYOUT_NDIMS];
hssize_t sub_offset_m[H5O_LAYOUT_NDIMS];
- uint8 *chunk=NULL;
+ uint8_t *chunk=NULL;
intn idx_hint=0;
size_t chunk_size, naccessed;
@@ -1726,7 +1726,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0; i<layout->ndims; i++) {
assert (offset_f[i]>=0); /*negative offsets not supported*/
assert (offset_m[i]>=0); /*negative offsets not supported*/
- assert(size[i]<MAX_SIZET);
+ assert(size[i]<SIZET_MAX);
assert(offset_m[i]+(hssize_t)size[i]<=(hssize_t)size_m[i]);
assert(layout->dim[i]>0);
}
@@ -1749,7 +1749,7 @@ H5F_istore_write(H5F_t *f, const H5D_xfer_t *xfer, const H5O_layout_t *layout,
for (i=0, naccessed=1; i<layout->ndims; i++) {
/* The location and size of the chunk being accessed */
- assert (layout->dim[i] < MAX_HSSIZET);
+ assert (layout->dim[i] < HSSIZET_MAX);
chunk_offset[i] = idx_cur[i] * (hssize_t)(layout->dim[i]);
/* The offset and size wrt the chunk */
@@ -2064,7 +2064,7 @@ H5F_istore_allocate (H5F_t *f, const H5O_layout_t *layout,
intn i, carry;
hssize_t chunk_offset[H5O_LAYOUT_NDIMS];
- uint8 *chunk=NULL;
+ uint8_t *chunk=NULL;
intn idx_hint=0;
size_t chunk_size;
#ifdef AKC
diff --git a/src/H5Flow.c b/src/H5Flow.c
index 7add2f9..3bed7f0 100644
--- a/src/H5Flow.c
+++ b/src/H5Flow.c
@@ -15,7 +15,7 @@
#include <H5Fprivate.h>
#include <H5MMprivate.h>
-#define addr_defined(X) (((uint64)(-1)!=(X)->offset) ? TRUE : FALSE)
+#define addr_defined(X) (((uint64_t)(-1)!=(X)->offset) ? TRUE : FALSE)
#define PABLO_MASK H5F_low
static hbool_t interface_initialize_g = FALSE;
@@ -217,7 +217,7 @@ H5F_low_close(H5F_low_t *lf, const H5F_access_t *access_parms)
herr_t
H5F_low_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8 *buf/*out*/)
+ const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
{
herr_t ret_value = FAIL;
@@ -272,7 +272,7 @@ H5F_low_read(H5F_low_t *lf, const H5F_access_t *access_parms,
herr_t
H5F_low_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, const uint8 *buf)
+ const haddr_t *addr, size_t size, const uint8_t *buf)
{
herr_t ret_value = FAIL;
haddr_t tmp_addr;
@@ -359,7 +359,7 @@ herr_t
H5F_low_flush(H5F_low_t *lf, const H5F_access_t *access_parms)
{
haddr_t last_byte;
- uint8 buf[1];
+ uint8_t buf[1];
FUNC_ENTER(H5F_low_flush, FAIL);
@@ -689,7 +689,7 @@ H5F_addr_undef(haddr_t *addr/*out*/)
{
assert(addr);
- addr->offset = (uint64)(-1);
+ addr->offset = (uint64_t)(-1);
}
/*-------------------------------------------------------------------------
@@ -776,7 +776,7 @@ H5F_addr_zerop(const haddr_t *addr)
*-------------------------------------------------------------------------
*/
void
-H5F_addr_encode(H5F_t *f, uint8 **pp, const haddr_t *addr)
+H5F_addr_encode(H5F_t *f, uint8_t **pp, const haddr_t *addr)
{
uintn i;
haddr_t tmp;
@@ -788,7 +788,7 @@ H5F_addr_encode(H5F_t *f, uint8 **pp, const haddr_t *addr)
if (addr_defined(addr)) {
tmp = *addr;
for (i=0; i<H5F_SIZEOF_ADDR(f); i++) {
- *(*pp)++ = (uint8)(tmp.offset & 0xff);
+ *(*pp)++ = (uint8_t)(tmp.offset & 0xff);
tmp.offset >>= 8;
}
assert("overflow" && 0 == tmp.offset);
@@ -820,11 +820,11 @@ H5F_addr_encode(H5F_t *f, uint8 **pp, const haddr_t *addr)
*-------------------------------------------------------------------------
*/
void
-H5F_addr_decode(H5F_t *f, const uint8 **pp, haddr_t *addr/*out*/)
+H5F_addr_decode(H5F_t *f, const uint8_t **pp, haddr_t *addr/*out*/)
{
uintn i;
haddr_t tmp;
- uint8 c;
+ uint8_t c;
hbool_t all_zero = TRUE;
assert(f);
@@ -1021,7 +1021,7 @@ H5F_addr_pack(H5F_t __unused__ *f, haddr_t *addr, const long objno[2])
assert(addr);
addr->offset=objno[0];
- addr->offset|=((uint64)objno[1])<<(8*sizeof(long));
+ addr->offset|=((uint64_t)objno[1])<<(8*sizeof(long));
return(SUCCEED);
}
diff --git a/src/H5Fmpio.c b/src/H5Fmpio.c
index 74981fe..dc67fba 100644
--- a/src/H5Fmpio.c
+++ b/src/H5Fmpio.c
@@ -108,12 +108,12 @@ static herr_t H5F_mpio_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_mpio_read(H5F_low_t *lf, H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
- uint8 *buf/*out*/);
+ uint8_t *buf/*out*/);
htri_t H5F_mpio_tas_allsame(H5F_low_t *lf, hbool_t newval );
static herr_t H5F_mpio_write(H5F_low_t *lf, H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
- const uint8 *buf);
+ const uint8_t *buf);
static herr_t H5F_mpio_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_MPIOff_to_haddr(MPI_Offset mpi_off, haddr_t *addr);
static herr_t H5F_haddr_to_MPIOff(haddr_t addr, MPI_Offset *mpi_off);
@@ -127,14 +127,14 @@ const H5F_low_class_t H5F_LOW_MPIO_g[1] = {{
* this is ugly, but removing the const modifier from access_parms
* in the parameter list of the write function in H5F_low_class_t
* would propagate to a lot of functions that don't change that param */
- (int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms, const H5D_transfer_t xfer_mode, const haddr_t *addr, size_t size, uint8 *buf))
+ (int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms, const H5D_transfer_t xfer_mode, const haddr_t *addr, size_t size, uint8_t *buf))
H5F_mpio_read, /*read method */
/* rky 980816
* this is ugly, but removing the const modifier from access_parms
* in the parameter list of the write function in H5F_low_class_t
* would propagate to a lot of functions that don't change that param */
- (int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms, const H5D_transfer_t xfer_mode, const haddr_t *addr, size_t size, const uint8 *buf))
+ (int(*)(struct H5F_low_t *lf, const H5F_access_t *access_parms, const H5D_transfer_t xfer_mode, const haddr_t *addr, size_t size, const uint8_t *buf))
H5F_mpio_write, /*write method */
H5F_mpio_flush, /*flush method */
@@ -492,7 +492,7 @@ H5F_mpio_close(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms)
static herr_t
H5F_mpio_read(H5F_low_t *lf, H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8 *buf/*out*/)
+ const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
{
MPI_Offset mpi_off, mpi_disp;
MPI_Status mpi_stat;
@@ -739,7 +739,7 @@ H5F_mpio_tas_allsame(H5F_low_t *lf, hbool_t newval )
static herr_t
H5F_mpio_write(H5F_low_t *lf, H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, const uint8 *buf)
+ const haddr_t *addr, size_t size, const uint8_t *buf)
{
MPI_Offset mpi_off, mpi_disp;
MPI_Status mpi_stat;
@@ -957,7 +957,7 @@ H5F_MPIOff_to_haddr( MPI_Offset mpi_off, haddr_t *addr )
{
herr_t ret_val = FAIL;
- addr->offset = (uint64) mpi_off;
+ addr->offset = (uint64_t) mpi_off;
if (addr->offset == mpi_off)
ret_val = SUCCEED;
diff --git a/src/H5Fprivate.h b/src/H5Fprivate.h
index 173e4c5..2efea45 100644
--- a/src/H5Fprivate.h
+++ b/src/H5Fprivate.h
@@ -68,77 +68,77 @@
/* For non-little-endian platforms, encode each byte by itself */
#ifdef WORDS_BIGENDIAN
# define INT16ENCODE(p, i) { \
- *(p) = (uint8)( (uintn)(i) & 0xff); (p)++; \
- *(p) = (uint8)(((uintn)(i) >> 8) & 0xff); (p)++; \
+ *(p) = (uint8_t)( (uintn)(i) & 0xff); (p)++; \
+ *(p) = (uint8_t)(((uintn)(i) >> 8) & 0xff); (p)++; \
}
# define UINT16ENCODE(p, i) { \
- *(p) = (uint8)( (i) & 0xff); (p)++; \
- *(p) = (uint8)(((uintn)(i) >> 8) & 0xff); (p)++; \
+ *(p) = (uint8_t)( (i) & 0xff); (p)++; \
+ *(p) = (uint8_t)(((uintn)(i) >> 8) & 0xff); (p)++; \
}
# define INT32ENCODE(p, i) { \
- *(p) = (uint8)( (uint32)(i) & 0xff); (p)++; \
- *(p) = (uint8)(((uint32)(i) >> 8) & 0xff); (p)++; \
- *(p) = (uint8)(((uint32)(i) >> 16) & 0xff); (p)++; \
- *(p) = (uint8)(((uint32)(i) >> 24) & 0xff); (p)++; \
+ *(p) = (uint8_t)( (uint32_t)(i) & 0xff); (p)++; \
+ *(p) = (uint8_t)(((uint32_t)(i) >> 8) & 0xff); (p)++; \
+ *(p) = (uint8_t)(((uint32_t)(i) >> 16) & 0xff); (p)++; \
+ *(p) = (uint8_t)(((uint32_t)(i) >> 24) & 0xff); (p)++; \
}
# define UINT32ENCODE(p, i) { \
- *(p) = (uint8)( (i) & 0xff); (p)++; \
- *(p) = (uint8)(((i) >> 8) & 0xff); (p)++; \
- *(p) = (uint8)(((i) >> 16) & 0xff); (p)++; \
- *(p) = (uint8)(((i) >> 24) & 0xff); (p)++; \
+ *(p) = (uint8_t)( (i) & 0xff); (p)++; \
+ *(p) = (uint8_t)(((i) >> 8) & 0xff); (p)++; \
+ *(p) = (uint8_t)(((i) >> 16) & 0xff); (p)++; \
+ *(p) = (uint8_t)(((i) >> 24) & 0xff); (p)++; \
}
# define INT64ENCODE(p, n) { \
- int64 _n = (n); \
+ int64_t _n = (n); \
size_t _i; \
- uint8 *_p = (uint8*)(p); \
- for (_i=0; _i<sizeof(int64); _i++, _n>>=8) { \
- *_p++ = (uint8)(_n & 0xff); \
+ uint8_t *_p = (uint8_t*)(p); \
+ for (_i=0; _i<sizeof(int64_t); _i++, _n>>=8) { \
+ *_p++ = (uint8_t)(_n & 0xff); \
} \
for (/*void*/; _i<8; _i++) { \
*_p++ = (n)<0 ? 0xff : 0; \
} \
- (p) = (uint8*)(p)+8; \
+ (p) = (uint8_t*)(p)+8; \
}
# define UINT64ENCODE(p, n) { \
- uint64 _n = (n); \
+ uint64_t _n = (n); \
size_t _i; \
- uint8 *_p = (uint8*)(p); \
- for (_i=0; _i<sizeof(uint64); _i++, _n>>=8) { \
- *_p++ = (uint8)(_n & 0xff); \
+ uint8_t *_p = (uint8_t*)(p); \
+ for (_i=0; _i<sizeof(uint64_t); _i++, _n>>=8) { \
+ *_p++ = (uint8_t)(_n & 0xff); \
} \
for (/*void*/; _i<8; _i++) { \
*_p++ = 0; \
} \
- (p) = (uint8*)(p)+8; \
+ (p) = (uint8_t*)(p)+8; \
}
# define INT16DECODE(p, i) { \
- (i) = (int16)((*(p) & 0xff)); (p)++; \
- (i) |= (int16)((*(p) & 0xff) << 8); (p)++; \
+ (i) = (int16_t)((*(p) & 0xff)); (p)++; \
+ (i) |= (int16_t)((*(p) & 0xff) << 8); (p)++; \
}
# define UINT16DECODE(p, i) { \
- (i) = (uint16) (*(p) & 0xff); (p)++; \
- (i) |= (uint16)((*(p) & 0xff) << 8); (p)++; \
+ (i) = (uint16_t) (*(p) & 0xff); (p)++; \
+ (i) |= (uint16_t)((*(p) & 0xff) << 8); (p)++; \
}
# define INT32DECODE(p, i) { \
- (i) = ( *(p) & 0xff); (p)++; \
- (i) |= ((int32)(*(p) & 0xff) << 8); (p)++; \
- (i) |= ((int32)(*(p) & 0xff) << 16); (p)++; \
- (i) |= ((int32)(*(p) & 0xff) << 24); (p)++; \
+ (i) = ( *(p) & 0xff); (p)++; \
+ (i) |= ((int32_t)(*(p) & 0xff) << 8); (p)++; \
+ (i) |= ((int32_t)(*(p) & 0xff) << 16); (p)++; \
+ (i) |= ((int32_t)(*(p) & 0xff) << 24); (p)++; \
}
# define UINT32DECODE(p, i) { \
- (i) = (uint32)(*(p) & 0xff); (p)++; \
- (i) |= ((uint32)(*(p) & 0xff) << 8); (p)++; \
- (i) |= ((uint32)(*(p) & 0xff) << 16); (p)++; \
- (i) |= ((uint32)(*(p) & 0xff) << 24); (p)++; \
+ (i) = (uint32_t)(*(p) & 0xff); (p)++; \
+ (i) |= ((uint32_t)(*(p) & 0xff) << 8); (p)++; \
+ (i) |= ((uint32_t)(*(p) & 0xff) << 16); (p)++; \
+ (i) |= ((uint32_t)(*(p) & 0xff) << 24); (p)++; \
}
# define INT64DECODE(p, n) { \
@@ -146,7 +146,7 @@
size_t _i; \
n = 0; \
(p) += 8; \
- for (_i=0; _i<sizeof(int64); _i++) { \
+ for (_i=0; _i<sizeof(int64_t); _i++) { \
n = (n<<8) | *(--p); \
} \
(p) += 8; \
@@ -157,7 +157,7 @@
size_t _i; \
n = 0; \
(p) += 8; \
- for (_i=0; _i<sizeof(uint64); _i++) { \
+ for (_i=0; _i<sizeof(uint64_t); _i++) { \
n = (n<<8) | *(--p); \
} \
(p) += 8; \
@@ -165,15 +165,15 @@
#else
/* For little-endian platforms, make the compiler do the work */
-# define INT16ENCODE(p, i) { *((int16 *)(p)) = (int16)(i); (p)+=2; }
-# define UINT16ENCODE(p, i) { *((uint16 *)(p)) = (uint16)(i); (p)+=2; }
-# define INT32ENCODE(p, i) { *((int32 *)(p)) = (int32)(i); (p)+=4; }
-# define UINT32ENCODE(p, i) { *((uint32 *)(p)) = (uint32)(i); (p)+=4; }
+# define INT16ENCODE(p, i) {*((int16_t*)(p))=(int16_t)(i);(p)+=2;}
+# define UINT16ENCODE(p, i) {*((uint16_t*)(p))=(uint16_t)(i);(p)+=2;}
+# define INT32ENCODE(p, i) {*((int32_t*)(p))=(int32_t)(i);(p)+=4;}
+# define UINT32ENCODE(p, i) {*((uint32_t*)(p))=(uint32_t)(i);(p)+=4;}
# define INT64ENCODE(p, i) { \
- *((int64 *)(p)) = (int64)(i); \
- (p) += sizeof(int64); \
- if (4==sizeof(int64)) { \
+ *((int64_t *)(p)) = (int64_t)(i); \
+ (p) += sizeof(int64_t); \
+ if (4==sizeof(int64_t)) { \
*(p)++ = (i)<0?0xff:0x00; \
*(p)++ = (i)<0?0xff:0x00; \
*(p)++ = (i)<0?0xff:0x00; \
@@ -182,9 +182,9 @@
}
# define UINT64ENCODE(p, i) { \
- *((uint64 *)(p)) = (uint64)(i); \
- (p) += sizeof(uint64); \
- if (4==sizeof(uint64)) { \
+ *((uint64_t *)(p)) = (uint64_t)(i); \
+ (p) += sizeof(uint64_t); \
+ if (4==sizeof(uint64_t)) { \
*(p)++ = 0x00; \
*(p)++ = 0x00; \
*(p)++ = 0x00; \
@@ -192,12 +192,12 @@
} \
}
-# define INT16DECODE(p, i) { (i) = (int16)(*(const int16 *)(p)); (p)+=2; }
-# define UINT16DECODE(p, i) { (i) = (uint16)(*(const uint16 *)(p)); (p)+=2; }
-# define INT32DECODE(p, i) { (i) = (int32)(*(const int32 *)(p)); (p)+=4; }
-# define UINT32DECODE(p, i) { (i) = (uint32)(*(const uint32 *)(p)); (p)+=4; }
-# define INT64DECODE(p, i) { (i) = (int64)(*(const int64 *)(p)); (p)+=8; }
-# define UINT64DECODE(p, i) { (i) = (uint64)(*(const uint64 *)(p)); (p)+=8; }
+# define INT16DECODE(p, i) {(i)=(int16_t)(*(const int16_t*)(p));(p)+=2;}
+# define UINT16DECODE(p, i) {(i)=(uint16_t)(*(const uint16_t*)(p));(p)+=2;}
+# define INT32DECODE(p, i) {(i)=(int32_t)(*(const int32_t*)(p));(p)+=4;}
+# define UINT32DECODE(p, i) {(i)=(uint32_t)(*(const uint32_t*)(p));(p)+=4;}
+# define INT64DECODE(p, i) {(i)=(int64_t)(*(const int64_t*)(p));(p)+=8;}
+# define UINT64DECODE(p, i) {(i)=(uint64_t)(*(const uint64_t*)(p));(p)+=8;}
#endif
@@ -321,10 +321,10 @@ typedef struct H5F_low_class_t {
const H5F_access_t *access_parms);
herr_t (*read)(struct H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8 *buf);
+ const haddr_t *addr, size_t size, uint8_t *buf);
herr_t (*write)(struct H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, const uint8 *buf);
+ const haddr_t *addr, size_t size, const uint8_t *buf);
herr_t (*flush)(struct H5F_low_t *lf,
const H5F_access_t *access_parms);
herr_t (*extend)(struct H5F_low_t *lf,
@@ -353,7 +353,7 @@ typedef struct H5F_low_t {
/* Split meta/raw data */
struct {
char *name; /* Base name w/o extension */
- uint64 mask; /* Bit that determines which file to use*/
+ uint64_t mask; /* Bit that determines which file to use*/
struct H5F_low_t *meta; /* Meta data file */
struct H5F_low_t *raw; /* Raw data file */
} split;
@@ -374,7 +374,7 @@ typedef struct H5F_low_t {
FILE *f; /* Posix stdio file */
H5F_fileop_t op; /* Previous file operation */
#ifdef HAVE_FSEEK64
- int64 cur; /* Current file position */
+ int64_t cur; /* Current file position */
#else
long cur; /* Current file position */
#endif
@@ -382,7 +382,7 @@ typedef struct H5F_low_t {
/* In-core temp file */
struct {
- uint8 *mem; /* Mem image of the file */
+ uint8_t *mem; /* Mem image of the file */
size_t size; /* Current file size */
size_t alloc; /* Current size of MEM buffer */
} core;
@@ -454,7 +454,7 @@ typedef struct H5F_file_t {
uintn flags; /* Access Permissions for file */
H5F_low_t *lf; /* Lower level file handle for I/O */
uintn nrefs; /* Ref count for times file is opened */
- uint32 consist_flags; /* File Consistency Flags */
+ uint32_t consist_flags; /* File Consistency Flags */
haddr_t boot_addr; /* Absolute address of boot block */
haddr_t base_addr; /* Absolute base address for rel.addrs. */
haddr_t freespace_addr; /* Relative address of free-space info */
@@ -489,7 +489,7 @@ typedef struct H5F_t {
#define H5F_ENCODE_OFFSET(f,p,o) (H5F_SIZEOF_ADDR(f)==4 ? UINT32ENCODE(p,o) \
: H5F_SIZEOF_ADDR(f)==8 ? UINT64ENCODE(p,o) \
: H5F_SIZEOF_ADDR(f)==2 ? UINT16ENCODE(p,o) \
- : H5FPencode_unusual_offset(f,&(p),(uint8 *)&(o)))
+ : H5FPencode_unusual_offset(f,&(p),(uint8_t*)&(o)))
#else /* NOT_YET */
#define H5F_ENCODE_OFFSET(f,p,o) switch(H5F_SIZEOF_ADDR(f)) { \
case 4: UINT32ENCODE(p,o); break; \
@@ -544,7 +544,7 @@ extern hbool_t H5_mpi_1_metawrite_g;
/* Private functions, not part of the publicly documented API */
herr_t H5F_init_interface(void);
-void H5F_encode_length_unusual(const H5F_t *f, uint8 **p, uint8 *l);
+void H5F_encode_length_unusual(const H5F_t *f, uint8_t **p, uint8_t *l);
H5F_t *H5F_open(const char *name, uintn flags,
const H5F_create_t *create_parms,
const H5F_access_t *access_parms);
@@ -621,10 +621,10 @@ H5F_low_t *H5F_low_close(H5F_low_t *lf, const H5F_access_t *access_parms);
hsize_t H5F_low_size(H5F_low_t *lf, haddr_t *addr);
herr_t H5F_low_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8 *buf);
+ const haddr_t *addr, size_t size, uint8_t *buf);
herr_t H5F_low_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, const uint8 *buf);
+ const haddr_t *addr, size_t size, const uint8_t *buf);
herr_t H5F_low_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
/* Functions that operate on addresses */
@@ -640,8 +640,8 @@ htri_t H5F_addr_defined(const haddr_t *);
void H5F_addr_undef(haddr_t *);
void H5F_addr_reset(haddr_t *);
htri_t H5F_addr_zerop(const haddr_t *);
-void H5F_addr_encode(H5F_t *, uint8 **, const haddr_t *);
-void H5F_addr_decode(H5F_t *, const uint8 **, haddr_t *);
+void H5F_addr_encode(H5F_t *, uint8_t **, const haddr_t *);
+void H5F_addr_decode(H5F_t *, const uint8_t **, haddr_t *);
void H5F_addr_print(FILE *, const haddr_t *);
void H5F_addr_pow2(uintn, haddr_t *);
void H5F_addr_inc(haddr_t *addr/*in,out*/, hsize_t inc);
diff --git a/src/H5Fsec2.c b/src/H5Fsec2.c
index 172ec1c..97ecaeb 100644
--- a/src/H5Fsec2.c
+++ b/src/H5Fsec2.c
@@ -30,11 +30,11 @@ static herr_t H5F_sec2_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_sec2_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
- uint8 *buf/*out*/);
+ uint8_t *buf/*out*/);
static herr_t H5F_sec2_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
- const uint8 *buf);
+ const uint8_t *buf);
const H5F_low_class_t H5F_LOW_SEC2_g[1] = {{
NULL, /* access method */
@@ -159,10 +159,10 @@ H5F_sec2_close(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms)
static herr_t
H5F_sec2_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
- const haddr_t *addr, size_t size, uint8 *buf)
+ const haddr_t *addr, size_t size, uint8_t *buf)
{
ssize_t n;
- uint64 mask;
+ uint64_t mask;
#ifdef HAVE_LSEEK64
off64_t offset;
#else
@@ -172,7 +172,7 @@ H5F_sec2_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
FUNC_ENTER(H5F_sec2_read, FAIL);
/* Check for overflow */
- mask = (uint64)1 << (8*sizeof(offset)-1);
+ mask = (uint64_t)1 << (8*sizeof(offset)-1);
if (addr->offset >= mask ||
addr->offset+size < addr->offset ||
addr->offset+size >= mask) {
@@ -186,7 +186,7 @@ H5F_sec2_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
/* Check easy cases */
if (0 == size) HRETURN(SUCCEED);
- if ((uint64)offset >= lf->eof.offset) {
+ if ((uint64_t)offset >= lf->eof.offset) {
HDmemset(buf, 0, size);
HRETURN(SUCCEED);
}
@@ -264,9 +264,9 @@ H5F_sec2_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
static herr_t
H5F_sec2_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
- const haddr_t *addr, size_t size, const uint8 *buf)
+ const haddr_t *addr, size_t size, const uint8_t *buf)
{
- uint64 mask;
+ uint64_t mask;
ssize_t n;
#ifdef HAVE_LSEEK64
off64_t offset;
@@ -277,7 +277,7 @@ H5F_sec2_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
FUNC_ENTER(H5F_sec2_write, FAIL);
/* Check for overflow */
- mask = (uint64)1 << (8*sizeof(offset)-1);
+ mask = (uint64_t)1 << (8*sizeof(offset)-1);
if (addr->offset >= mask ||
addr->offset+size < addr->offset ||
addr->offset+size >= mask) {
diff --git a/src/H5Fsplit.c b/src/H5Fsplit.c
index 1b3eb8e..7655054 100644
--- a/src/H5Fsplit.c
+++ b/src/H5Fsplit.c
@@ -35,11 +35,11 @@ static herr_t H5F_split_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_split_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
- uint8 *buf/*out*/);
+ uint8_t *buf/*out*/);
static herr_t H5F_split_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
- const uint8 *buf);
+ const uint8_t *buf);
static herr_t H5F_split_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_split_extend(H5F_low_t *lf, const H5F_access_t *access_parms,
intn op, hsize_t size, haddr_t *addr/*out*/);
@@ -213,7 +213,7 @@ H5F_split_close(H5F_low_t *lf, const H5F_access_t *access_parms)
static herr_t
H5F_split_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, uint8 *buf/*out*/)
+ const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
{
haddr_t tmp_addr;
H5F_low_t *sub = NULL;
@@ -263,7 +263,7 @@ H5F_split_read(H5F_low_t *lf, const H5F_access_t *access_parms,
static herr_t
H5F_split_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
- const haddr_t *addr, size_t size, const uint8 *buf)
+ const haddr_t *addr, size_t size, const uint8_t *buf)
{
haddr_t tmp_addr;
H5F_low_t *sub = NULL;
diff --git a/src/H5Fstdio.c b/src/H5Fstdio.c
index ae31305..eff325f 100644
--- a/src/H5Fstdio.c
+++ b/src/H5Fstdio.c
@@ -24,11 +24,11 @@ static herr_t H5F_stdio_close(H5F_low_t *lf, const H5F_access_t *access_parms);
static herr_t H5F_stdio_read(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
- uint8 *buf/*out*/);
+ uint8_t *buf/*out*/);
static herr_t H5F_stdio_write(H5F_low_t *lf, const H5F_access_t *access_parms,
const H5D_transfer_t xfer_mode,
const haddr_t *addr, size_t size,
- const uint8 *buf);
+ const uint8_t *buf);
static herr_t H5F_stdio_flush(H5F_low_t *lf, const H5F_access_t *access_parms);
const H5F_low_class_t H5F_LOW_STDIO_g[1] = {{
@@ -184,12 +184,12 @@ H5F_stdio_close(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms)
static herr_t
H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
- const haddr_t *addr, size_t size, uint8 *buf/*out*/)
+ const haddr_t *addr, size_t size, uint8_t *buf/*out*/)
{
size_t n;
- uint64 mask;
+ uint64_t mask;
#ifdef HAVE_FSEEK64
- int64 offset;
+ int64_t offset;
#else
long offset;
#endif
@@ -197,21 +197,21 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
FUNC_ENTER(H5F_stdio_read, FAIL);
/* Check for overflow */
- mask = (uint64)1 << (8*sizeof(offset)-1);
+ mask = (uint64_t)1 << (8*sizeof(offset)-1);
if (addr->offset >= mask ||
addr->offset + size < addr->offset ||
addr->offset+size >= mask) {
HRETURN_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed");
}
#ifdef HAVE_FSEEK64
- offset = (int64)(addr->offset); /*checked for overflow*/
+ offset = (int64_t)(addr->offset); /*checked for overflow*/
#else
offset = (long)(addr->offset); /*checked for overflow*/
#endif
/* Check easy cases */
if (0 == size) HRETURN(SUCCEED);
- if ((uint64)offset >= lf->eof.offset) {
+ if ((uint64_t)offset >= lf->eof.offset) {
HDmemset(buf, 0, size);
HRETURN(SUCCEED);
}
@@ -261,7 +261,7 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
*/
lf->u.stdio.op = H5F_OP_READ;
#ifdef HAVE_FSEEK64
- lf->u.stdio.cur = (int64)(offset+n); /*checked for overflow above*/
+ lf->u.stdio.cur = (int64_t)(offset+n); /*checked for overflow above*/
#else
lf->u.stdio.cur = (off_t)(offset+n); /*checked for overflow above*/
#endif
@@ -293,12 +293,12 @@ H5F_stdio_read(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
static herr_t
H5F_stdio_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
const H5D_transfer_t __unused__ xfer_mode,
- const haddr_t *addr, size_t size, const uint8 *buf)
+ const haddr_t *addr, size_t size, const uint8_t *buf)
{
- uint64 mask;
+ uint64_t mask;
#ifdef HAVE_FSEEK64
- int64 offset;
- uint64 n;
+ int64_t offset;
+ uint64_t n;
#else
long offset;
size_t n;
@@ -307,14 +307,14 @@ H5F_stdio_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
FUNC_ENTER(H5F_stdio_write, FAIL);
/* Check for overflow */
- mask = (uint64)1 << (8*sizeof(offset)-1);
+ mask = (uint64_t)1 << (8*sizeof(offset)-1);
if (addr->offset >= mask ||
addr->offset+size < addr->offset ||
addr->offset+size >= mask) {
HRETURN_ERROR (H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed");
}
#ifdef HAVE_FSEEK64
- offset = (int64)(addr->offset); /*checked for overflow*/
+ offset = (int64_t)(addr->offset); /*checked for overflow*/
n = size; /*checked for overflow*/
#else
offset = (long)(addr->offset); /*checked for overflow*/
@@ -353,7 +353,7 @@ H5F_stdio_write(H5F_low_t *lf, const H5F_access_t __unused__ *access_parms,
* Update seek optimizing data.
*/
lf->u.stdio.op = H5F_OP_WRITE;
- lf->u.stdio.cur = offset + (int64)n;
+ lf->u.stdio.cur = offset + (int64_t)n;
FUNC_LEAVE(SUCCEED);
}
diff --git a/src/H5G.c b/src/H5G.c
index 74fd26e..71f2e77 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -731,6 +731,7 @@ H5G_term_interface(void)
/* Destroy the group object id group */
H5I_destroy_group(H5I_GROUP);
+ interface_initialize_g = FALSE;
}
diff --git a/src/H5Gent.c b/src/H5Gent.c
index bc93735..70421ca 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -101,7 +101,7 @@ H5G_ent_modified(H5G_entry_t *ent, H5G_type_t cache_type)
*-------------------------------------------------------------------------
*/
herr_t
-H5G_ent_decode_vec(H5F_t *f, const uint8 **pp, H5G_entry_t *ent, intn n)
+H5G_ent_decode_vec(H5F_t *f, const uint8_t **pp, H5G_entry_t *ent, intn n)
{
intn i;
@@ -146,10 +146,10 @@ H5G_ent_decode_vec(H5F_t *f, const uint8 **pp, H5G_entry_t *ent, intn n)
*-------------------------------------------------------------------------
*/
herr_t
-H5G_ent_decode(H5F_t *f, const uint8 **pp, H5G_entry_t *ent)
+H5G_ent_decode(H5F_t *f, const uint8_t **pp, H5G_entry_t *ent)
{
- const uint8 *p_ret = *pp;
- uint32 tmp;
+ const uint8_t *p_ret = *pp;
+ uint32_t tmp;
FUNC_ENTER(H5G_ent_decode, FAIL);
@@ -213,7 +213,7 @@ H5G_ent_decode(H5F_t *f, const uint8 **pp, H5G_entry_t *ent)
*-------------------------------------------------------------------------
*/
herr_t
-H5G_ent_encode_vec(H5F_t *f, uint8 **pp, const H5G_entry_t *ent, intn n)
+H5G_ent_encode_vec(H5F_t *f, uint8_t **pp, const H5G_entry_t *ent, intn n)
{
intn i;
@@ -261,9 +261,9 @@ H5G_ent_encode_vec(H5F_t *f, uint8 **pp, const H5G_entry_t *ent, intn n)
*-------------------------------------------------------------------------
*/
herr_t
-H5G_ent_encode(H5F_t *f, uint8 **pp, const H5G_entry_t *ent)
+H5G_ent_encode(H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
{
- uint8 *p_ret = *pp + H5G_SIZEOF_ENTRY(f);
+ uint8_t *p_ret = *pp + H5G_SIZEOF_ENTRY(f);
FUNC_ENTER(H5G_ent_encode, FAIL);
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 1107e56..b7810c0 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -34,9 +34,9 @@
#define PABLO_MASK H5G_node_mask
/* PRIVATE PROTOTYPES */
-static herr_t H5G_node_decode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
+static herr_t H5G_node_decode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
-static herr_t H5G_node_encode_key(H5F_t *f, H5B_t *bt, uint8 *raw,
+static herr_t H5G_node_encode_key(H5F_t *f, H5B_t *bt, uint8_t *raw,
void *_key);
static size_t H5G_node_size(H5F_t *f);
static herr_t H5G_node_create(H5F_t *f, H5B_ins_t op, void *_lt_key,
@@ -136,7 +136,7 @@ H5G_node_sizeof_rkey(H5F_t *f, const void __unused__ *udata)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_decode_key(H5F_t *f, H5B_t __unused__ *bt, uint8 *raw, void *_key)
+H5G_node_decode_key(H5F_t *f, H5B_t __unused__ *bt, uint8_t *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
@@ -168,7 +168,7 @@ H5G_node_decode_key(H5F_t *f, H5B_t __unused__ *bt, uint8 *raw, void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_encode_key(H5F_t *f, H5B_t __unused__ *bt, uint8 *raw, void *_key)
+H5G_node_encode_key(H5F_t *f, H5B_t __unused__ *bt, uint8_t *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
@@ -303,7 +303,7 @@ static herr_t
H5G_node_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr,
H5G_node_t *sym)
{
- uint8 *buf = NULL, *p = NULL;
+ uint8_t *buf = NULL, *p = NULL;
size_t size;
herr_t status;
int i;
@@ -395,8 +395,8 @@ H5G_node_load(H5F_t *f, const haddr_t *addr, const void __unused__ *_udata1,
{
H5G_node_t *sym = NULL;
size_t size = 0;
- uint8 *buf = NULL;
- const uint8 *p = NULL;
+ uint8_t *buf = NULL;
+ const uint8_t *p = NULL;
H5G_node_t *ret_value = NULL; /*for error handling */
FUNC_ENTER(H5G_node_load, NULL);
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index 03a2629..2584eb0 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -130,8 +130,8 @@ herr_t H5G_stab_remove(H5G_entry_t *grp_ent, const char *name);
/*
* Functions that understand symbol table entries.
*/
-herr_t H5G_ent_decode_vec (H5F_t *f, const uint8 **pp, H5G_entry_t *ent,
+herr_t H5G_ent_decode_vec (H5F_t *f, const uint8_t **pp, H5G_entry_t *ent,
intn n);
-herr_t H5G_ent_encode_vec (H5F_t *f, uint8 **pp, const H5G_entry_t *ent,
+herr_t H5G_ent_encode_vec (H5F_t *f, uint8_t **pp, const H5G_entry_t *ent,
intn n);
#endif
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h
index ac430c1..598aa33 100644
--- a/src/H5Gprivate.h
+++ b/src/H5Gprivate.h
@@ -141,8 +141,8 @@ H5F_t *H5G_insertion_file(H5G_entry_t *loc, const char *name);
herr_t H5G_traverse_slink (H5G_entry_t *grp_ent/*in,out*/,
H5G_entry_t *obj_ent/*in,out*/,
intn *nlinks/*in,out*/);
-herr_t H5G_ent_encode (H5F_t *f, uint8 **pp, const H5G_entry_t *ent);
-herr_t H5G_ent_decode (H5F_t *f, const uint8 **pp, H5G_entry_t *ent/*out*/);
+herr_t H5G_ent_encode (H5F_t *f, uint8_t **pp, const H5G_entry_t *ent);
+herr_t H5G_ent_decode (H5F_t *f, const uint8_t **pp, H5G_entry_t *ent/*out*/);
/*
* These functions operate on symbol table nodes.
diff --git a/src/H5HG.c b/src/H5HG.c
index 2cf3c25..c72f47d 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -36,14 +36,14 @@
typedef struct H5HG_obj_t {
intn nrefs; /*reference count */
size_t size; /*total size of object */
- uint8 *begin; /*ptr to object into heap->chunk*/
+ uint8_t *begin; /*ptr to object into heap->chunk*/
} H5HG_obj_t;
struct H5HG_heap_t {
haddr_t addr; /*collection address */
hbool_t dirty; /*does heap need to be saved? */
size_t size; /*total size of collection */
- uint8 *chunk; /*the collection, incl. header */
+ uint8_t *chunk; /*the collection, incl. header */
intn nalloc; /*numb object slots allocated */
H5HG_obj_t *obj; /*array of object descriptions */
};
@@ -94,7 +94,7 @@ H5HG_create (H5F_t *f, size_t size)
{
H5HG_heap_t *heap = NULL;
H5HG_heap_t *ret_value = NULL;
- uint8 *p = NULL;
+ uint8_t *p = NULL;
haddr_t addr;
FUNC_ENTER (H5HG_create, NULL);
@@ -200,7 +200,7 @@ H5HG_load (H5F_t *f, const haddr_t *addr, const void __unused__ *udata1,
{
H5HG_heap_t *heap = NULL;
H5HG_heap_t *ret_value = NULL;
- uint8 *p = NULL;
+ uint8_t *p = NULL;
intn i;
size_t nalloc;
@@ -286,7 +286,7 @@ H5HG_load (H5F_t *f, const haddr_t *addr, const void __unused__ *udata1,
p += heap->obj[0].size;
} else {
intn idx;
- uint8 *begin = p;
+ uint8_t *begin = p;
UINT16DECODE (p, idx);
assert (idx<heap->nalloc);
assert (NULL==heap->obj[idx].begin);
@@ -422,7 +422,7 @@ static intn
H5HG_alloc (H5F_t *f, H5HG_heap_t *heap, int cwfsno, size_t size)
{
int idx;
- uint8 *p = NULL;
+ uint8_t *p = NULL;
size_t need = H5HG_ALIGN(H5HG_SIZEOF_OBJHDR(f) + size);
FUNC_ENTER (H5HG_alloc, FAIL);
@@ -671,7 +671,7 @@ H5HG_read (H5F_t *f, H5HG_t *hobj, void *object/*out*/)
H5HG_heap_t *heap = NULL;
intn i;
size_t size;
- uint8 *p = NULL;
+ uint8_t *p = NULL;
FUNC_ENTER (H5HG_read, NULL);
@@ -786,7 +786,7 @@ H5HG_link (H5F_t *f, H5HG_t *hobj, intn adjust)
herr_t
H5HG_remove (H5F_t *f, H5HG_t *hobj)
{
- uint8 *p=NULL, *obj_start=NULL;
+ uint8_t *p=NULL, *obj_start=NULL;
H5HG_heap_t *heap = NULL;
size_t need;
intn i;
@@ -893,7 +893,7 @@ H5HG_debug(H5F_t *f, const haddr_t *addr, FILE *stream, intn indent,
H5HG_heap_t *h = NULL;
char buf[64];
size_t size;
- uint8 *p = NULL;
+ uint8_t *p = NULL;
FUNC_ENTER(H5HG_debug, FAIL);
diff --git a/src/H5HL.c b/src/H5HL.c
index d85ed30..edc267f 100644
--- a/src/H5HL.c
+++ b/src/H5HL.c
@@ -41,7 +41,7 @@ typedef struct H5HL_t {
haddr_t addr; /*address of data */
size_t disk_alloc; /*data bytes allocated on disk */
size_t mem_alloc; /*data bytes allocated in mem */
- uint8 *chunk; /*the chunk, including header */
+ uint8_t *chunk; /*the chunk, including header */
H5HL_free_t *freelist; /*the free list */
} H5HL_t;
@@ -188,8 +188,8 @@ static H5HL_t *
H5HL_load(H5F_t *f, const haddr_t *addr, const void __unused__ *udata1,
void __unused__ *udata2)
{
- uint8 hdr[52];
- const uint8 *p = NULL;
+ uint8_t hdr[52];
+ const uint8_t *p = NULL;
H5HL_t *heap = NULL;
H5HL_free_t *fl = NULL, *tail = NULL;
size_t free_block = H5HL_FREE_NULL;
@@ -311,7 +311,7 @@ H5HL_load(H5F_t *f, const haddr_t *addr, const void __unused__ *udata1,
static herr_t
H5HL_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5HL_t *heap)
{
- uint8 *p = heap->chunk;
+ uint8_t *p = heap->chunk;
H5HL_free_t *fl = heap->freelist;
haddr_t hdr_end_addr;
@@ -918,9 +918,9 @@ H5HL_debug(H5F_t *f, const haddr_t *addr, FILE * stream, intn indent,
{
H5HL_t *h = NULL;
int i, j, overlap;
- uint8 c;
+ uint8_t c;
H5HL_free_t *freelist = NULL;
- uint8 *marker = NULL;
+ uint8_t *marker = NULL;
size_t amount_free = 0;
FUNC_ENTER(H5HL_debug, FAIL);
diff --git a/src/H5I.c b/src/H5I.c
index 13df5e5..dfceb41 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -941,4 +941,7 @@ H5I_term_interface(void)
id_group_list[i] = NULL;
}
}
+
+ /* Indicate interface closed */
+ interface_initialize_g = FALSE;
}
diff --git a/src/H5O.c b/src/H5O.c
index d1e1d07..e2de522 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -318,14 +318,14 @@ H5O_load(H5F_t *f, const haddr_t *addr, const void __unused__ *_udata1,
{
H5O_t *oh = NULL;
H5O_t *ret_value = NULL;
- uint8 buf[16], *p;
+ uint8_t buf[16], *p;
size_t hdr_size, mesg_size;
uintn id;
intn mesgno, chunkno, curmesg = 0, nmesgs;
haddr_t chunk_addr;
size_t chunk_size;
H5O_cont_t *cont = NULL;
- uint8 flags;
+ uint8_t flags;
FUNC_ENTER(H5O_load, NULL);
@@ -454,7 +454,7 @@ H5O_load(H5F_t *f, const haddr_t *addr, const void __unused__ *_udata1,
!H5F_addr_defined(&chunk_addr) && curmesg < oh->nmesgs;
curmesg++) {
if (H5O_CONT_ID == oh->mesg[curmesg].type->id) {
- uint8 *p2 = oh->mesg[curmesg].raw;
+ uint8_t *p2 = oh->mesg[curmesg].raw;
cont = (H5O_CONT->decode) (f, p2, NULL);
oh->mesg[curmesg].native = cont;
chunk_addr = cont->addr;
@@ -505,10 +505,10 @@ H5O_load(H5F_t *f, const haddr_t *addr, const void __unused__ *_udata1,
static herr_t
H5O_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr, H5O_t *oh)
{
- uint8 buf[16], *p;
+ uint8_t buf[16], *p;
intn i, id;
H5O_cont_t *cont = NULL;
- herr_t (*encode)(H5F_t*, uint8*, const void*) = NULL;
+ herr_t (*encode)(H5F_t*, uint8_t*, const void*) = NULL;
FUNC_ENTER(H5O_flush, FAIL);
@@ -1573,7 +1573,7 @@ H5O_alloc_extend_chunk(H5O_t *oh, intn chunkno, size_t size)
{
intn idx, i;
size_t delta;
- uint8 *old_addr;
+ uint8_t *old_addr;
FUNC_ENTER(H5O_alloc_extend_chunk, FAIL);
@@ -1702,7 +1702,7 @@ H5O_alloc_new_chunk(H5F_t *f, H5O_t *oh, size_t size)
intn found_null = (-1); /*best fit null message */
intn found_other = (-1); /*best fit other message */
intn idx = FAIL; /*message number return value */
- uint8 *p = NULL; /*ptr into new chunk */
+ uint8_t *p = NULL; /*ptr into new chunk */
H5O_cont_t *cont = NULL; /*native continuation message */
intn i, chunkno;
@@ -2059,7 +2059,7 @@ H5O_debug(H5F_t *f, const haddr_t *addr, FILE * stream, intn indent,
int *sequence;
haddr_t tmp_addr;
herr_t ret_value = FAIL;
- void *(*decode)(H5F_t*, const uint8*, H5O_shared_t*);
+ void *(*decode)(H5F_t*, const uint8_t*, H5O_shared_t*);
herr_t (*debug)(H5F_t*, const void*, FILE*, intn, intn)=NULL;
FUNC_ENTER(H5O_debug, FAIL);
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 32e9252..afdd533 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -28,8 +28,8 @@ static char RcsId[] = "@(#)$Revision$";
#define PABLO_MASK H5O_attr_mask
/* PRIVATE PROTOTYPES */
-static herr_t H5O_attr_encode (H5F_t *f, uint8 *p, const void *mesg);
-static void *H5O_attr_decode (H5F_t *f, const uint8 *p, H5O_shared_t *sh);
+static herr_t H5O_attr_encode (H5F_t *f, uint8_t *p, const void *mesg);
+static void *H5O_attr_decode (H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static void *H5O_attr_copy (const void *_mesg, void *_dest);
static size_t H5O_attr_size (H5F_t *f, const void *_mesg);
static herr_t H5O_attr_reset (void *_mesg);
@@ -67,7 +67,7 @@ static hbool_t interface_initialize_g = FALSE;
void *H5O_attr_decode(f, raw_size, p)
H5F_t *f; IN: pointer to the HDF5 file struct
size_t raw_size; IN: size of the raw information buffer
- const uint8 *p; IN: the raw information buffer
+ const uint8_t *p; IN: the raw information buffer
RETURNS
Pointer to the new message in native order on success, NULL on failure
DESCRIPTION
@@ -83,7 +83,7 @@ static hbool_t interface_initialize_g = FALSE;
* Added a version number at the beginning.
--------------------------------------------------------------------------*/
static void *
-H5O_attr_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
+H5O_attr_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5A_t *attr = NULL;
H5S_simple_t *simple; /*simple dimensionality information */
@@ -195,7 +195,7 @@ H5O_attr_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
* Added a version number at the beginning.
--------------------------------------------------------------------------*/
static herr_t
-H5O_attr_encode(H5F_t *f, uint8 *p, const void *mesg)
+H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
{
const H5A_t *attr = (const H5A_t *) mesg;
size_t name_len; /* Attribute name length */
diff --git a/src/H5Ocomp.c b/src/H5Ocomp.c
index a7e1969..90fd622 100644
--- a/src/H5Ocomp.c
+++ b/src/H5Ocomp.c
@@ -19,8 +19,8 @@ static hbool_t interface_initialize_g = FALSE;
#define H5O_PLINE_VERSION 1
-static herr_t H5O_pline_encode (H5F_t *f, uint8 *p, const void *mesg);
-static void *H5O_pline_decode (H5F_t *f, const uint8 *p, H5O_shared_t *sh);
+static herr_t H5O_pline_encode (H5F_t *f, uint8_t *p, const void *mesg);
+static void *H5O_pline_decode (H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static void *H5O_pline_copy (const void *_mesg, void *_dest);
static size_t H5O_pline_size (H5F_t *f, const void *_mesg);
static herr_t H5O_pline_reset (void *_mesg);
@@ -61,7 +61,7 @@ const H5O_class_t H5O_PLINE[1] = {{
*-------------------------------------------------------------------------
*/
static void *
-H5O_pline_decode(H5F_t __unused__ *f, const uint8 *p,
+H5O_pline_decode(H5F_t __unused__ *f, const uint8_t *p,
H5O_shared_t __unused__ *sh)
{
H5O_pline_t *pline = NULL;
@@ -165,7 +165,7 @@ H5O_pline_decode(H5F_t __unused__ *f, const uint8 *p,
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_pline_encode (H5F_t __unused__ *f, uint8 *p/*out*/, const void *mesg)
+H5O_pline_encode (H5F_t __unused__ *f, uint8_t *p/*out*/, const void *mesg)
{
const H5O_pline_t *pline = (const H5O_pline_t*)mesg;
size_t i, j, name_length;
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index d864322..3ba9b24 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -25,8 +25,8 @@
#define PABLO_MASK H5O_cont_mask
/* PRIVATE PROTOTYPES */
-static void *H5O_cont_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
-static herr_t H5O_cont_encode(H5F_t *f, uint8 *p, const void *_mesg);
+static void *H5O_cont_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
+static herr_t H5O_cont_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static herr_t H5O_cont_debug(H5F_t *f, const void *_mesg, FILE * stream,
intn indent, intn fwidth);
@@ -67,7 +67,7 @@ static intn interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
-H5O_cont_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
+H5O_cont_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5O_cont_t *cont = NULL;
@@ -105,7 +105,7 @@ H5O_cont_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_cont_encode(H5F_t *f, uint8 *p, const void *_mesg)
+H5O_cont_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index e68d352..2ccdfec 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -28,8 +28,8 @@ static char RcsId[] = "@(#)$Revision$";
#define PABLO_MASK H5O_dtype_mask
/* PRIVATE PROTOTYPES */
-static herr_t H5O_dtype_encode (H5F_t *f, uint8 *p, const void *mesg);
-static void *H5O_dtype_decode (H5F_t *f, const uint8 *p, H5O_shared_t *sh);
+static herr_t H5O_dtype_encode (H5F_t *f, uint8_t *p, const void *mesg);
+static void *H5O_dtype_decode (H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
static void *H5O_dtype_copy (const void *_mesg, void *_dest);
static size_t H5O_dtype_size (H5F_t *f, const void *_mesg);
static herr_t H5O_dtype_reset (void *_mesg);
@@ -76,7 +76,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_dtype_decode_helper(const uint8 **pp, H5T_t *dt)
+H5O_dtype_decode_helper(const uint8_t **pp, H5T_t *dt)
{
uintn flags, perm_word, version;
intn i, j;
@@ -251,7 +251,7 @@ H5O_dtype_decode_helper(const uint8 **pp, H5T_t *dt)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_dtype_encode_helper(uint8 **pp, const H5T_t *dt)
+H5O_dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
{
uintn flags = 0;
uintn perm_word;
@@ -403,13 +403,13 @@ H5O_dtype_encode_helper(uint8 **pp, const H5T_t *dt)
UINT16ENCODE(*pp, dt->u.atomic.offset);
UINT16ENCODE(*pp, dt->u.atomic.prec);
assert (dt->u.atomic.u.f.epos<=255);
- *(*pp)++ = (uint8)(dt->u.atomic.u.f.epos);
+ *(*pp)++ = (uint8_t)(dt->u.atomic.u.f.epos);
assert (dt->u.atomic.u.f.esize<=255);
- *(*pp)++ = (uint8)(dt->u.atomic.u.f.esize);
+ *(*pp)++ = (uint8_t)(dt->u.atomic.u.f.esize);
assert (dt->u.atomic.u.f.mpos<=255);
- *(*pp)++ = (uint8)(dt->u.atomic.u.f.mpos);
+ *(*pp)++ = (uint8_t)(dt->u.atomic.u.f.mpos);
assert (dt->u.atomic.u.f.msize<=255);
- *(*pp)++ = (uint8)(dt->u.atomic.u.f.msize);
+ *(*pp)++ = (uint8_t)(dt->u.atomic.u.f.msize);
UINT32ENCODE(*pp, dt->u.atomic.u.f.ebias);
break;
@@ -498,7 +498,7 @@ H5O_dtype_encode_helper(uint8 **pp, const H5T_t *dt)
function using malloc() and is returned to the caller.
--------------------------------------------------------------------------*/
static void *
-H5O_dtype_decode(H5F_t __unused__ *f, const uint8 *p,
+H5O_dtype_decode(H5F_t __unused__ *f, const uint8_t *p,
H5O_shared_t __unused__ *sh)
{
H5T_t *dt = NULL;
@@ -540,7 +540,7 @@ H5O_dtype_decode(H5F_t __unused__ *f, const uint8 *p,
message in the "raw" disk form.
--------------------------------------------------------------------------*/
static herr_t
-H5O_dtype_encode(H5F_t __unused__ *f, uint8 *p, const void *mesg)
+H5O_dtype_encode(H5F_t __unused__ *f, uint8_t *p, const void *mesg)
{
const H5T_t *dt = (const H5T_t *) mesg;
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 5c1249c..f812c3f 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -14,8 +14,8 @@
#define PABLO_MASK H5O_efl_mask
/* PRIVATE PROTOTYPES */
-static void *H5O_efl_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
-static herr_t H5O_efl_encode(H5F_t *f, uint8 *p, const void *_mesg);
+static void *H5O_efl_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
+static herr_t H5O_efl_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_efl_copy(const void *_mesg, void *_dest);
static size_t H5O_efl_size(H5F_t *f, const void *_mesg);
static herr_t H5O_efl_reset(void *_mesg);
@@ -64,7 +64,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
-H5O_efl_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
+H5O_efl_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5O_efl_t *mesg = NULL;
intn i, version;
@@ -148,7 +148,7 @@ H5O_efl_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_efl_encode(H5F_t *f, uint8 *p, const void *_mesg)
+H5O_efl_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
int i;
@@ -406,7 +406,7 @@ H5O_efl_total_size (H5O_efl_t *efl)
*/
herr_t
H5O_efl_read (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr,
- hsize_t size, uint8 *buf)
+ hsize_t size, uint8_t *buf)
{
int i, fd=-1;
size_t to_read, cur, skip=0;
@@ -418,7 +418,7 @@ H5O_efl_read (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr,
/* Check args */
assert (efl && efl->nused>0);
assert (addr && H5F_addr_defined (addr));
- assert (size < MAX_SIZET);
+ assert (size < SIZET_MAX);
assert (buf || 0==size);
/* Find the first efl member from which to read */
@@ -490,7 +490,7 @@ H5O_efl_read (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr,
*/
herr_t
H5O_efl_write (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr,
- hsize_t size, const uint8 *buf)
+ hsize_t size, const uint8_t *buf)
{
int i, fd=-1;
size_t to_write, cur, skip=0;
@@ -501,7 +501,7 @@ H5O_efl_write (H5F_t __unused__ *f, const H5O_efl_t *efl, haddr_t *addr,
/* Check args */
assert (efl && efl->nused>0);
assert (addr && H5F_addr_defined (addr));
- assert (size < MAX_SIZET);
+ assert (size < SIZET_MAX);
assert (buf || 0==size);
/* Find the first efl member in which to write */
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 4e680f9..6d77bb8 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -16,8 +16,8 @@
#define PABLO_MASK H5O_fill_mask
-static void *H5O_fill_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
-static herr_t H5O_fill_encode(H5F_t *f, uint8 *p, const void *_mesg);
+static void *H5O_fill_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
+static herr_t H5O_fill_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_fill_copy(const void *_mesg, void *_dest);
static size_t H5O_fill_size(H5F_t *f, const void *_mesg);
static herr_t H5O_fill_reset(void *_mesg);
@@ -61,7 +61,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
-H5O_fill_decode(H5F_t __unused__ *f, const uint8 *p,
+H5O_fill_decode(H5F_t __unused__ *f, const uint8_t *p,
H5O_shared_t __unused__ *sh)
{
H5O_fill_t *mesg=NULL;
@@ -111,7 +111,7 @@ H5O_fill_decode(H5F_t __unused__ *f, const uint8 *p,
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_fill_encode(H5F_t __unused__ *f, uint8 *p, const void *_mesg)
+H5O_fill_encode(H5F_t __unused__ *f, uint8_t *p, const void *_mesg)
{
const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg;
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index 4d57cc3..363277c 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -14,8 +14,8 @@
#include <H5Oprivate.h>
/* PRIVATE PROTOTYPES */
-static void *H5O_layout_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
-static herr_t H5O_layout_encode(H5F_t *f, uint8 *p, const void *_mesg);
+static void *H5O_layout_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
+static herr_t H5O_layout_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_layout_copy(const void *_mesg, void *_dest);
static size_t H5O_layout_size(H5F_t *f, const void *_mesg);
static herr_t H5O_layout_debug(H5F_t *f, const void *_mesg, FILE * stream,
@@ -64,7 +64,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
-H5O_layout_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
+H5O_layout_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5O_layout_t *mesg = NULL;
intn i, version;
@@ -132,7 +132,7 @@ H5O_layout_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_layout_encode(H5F_t *f, uint8 *p, const void *_mesg)
+H5O_layout_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
int i;
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index f634184..86e19b8 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -14,8 +14,8 @@
#define PABLO_MASK H5O_mtime_mask
-static void *H5O_mtime_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
-static herr_t H5O_mtime_encode(H5F_t *f, uint8 *p, const void *_mesg);
+static void *H5O_mtime_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
+static herr_t H5O_mtime_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_mtime_copy(const void *_mesg, void *_dest);
static size_t H5O_mtime_size(H5F_t *f, const void *_mesg);
static herr_t H5O_mtime_debug(H5F_t *f, const void *_mesg, FILE *stream,
@@ -60,7 +60,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
-H5O_mtime_decode(H5F_t __unused__ *f, const uint8 *p,
+H5O_mtime_decode(H5F_t __unused__ *f, const uint8_t *p,
H5O_shared_t __unused__ *sh)
{
time_t *mesg, the_time;
@@ -172,7 +172,7 @@ H5O_mtime_decode(H5F_t __unused__ *f, const uint8 *p,
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_mtime_encode(H5F_t __unused__ *f, uint8 *p, const void *_mesg)
+H5O_mtime_encode(H5F_t __unused__ *f, uint8_t *p, const void *_mesg)
{
const time_t *mesg = (const time_t *) _mesg;
struct tm *tm;
diff --git a/src/H5Oname.c b/src/H5Oname.c
index 00527d6..50ae81e 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -22,8 +22,8 @@
#define PABLO_MASK H5O_name_mask
/* PRIVATE PROTOTYPES */
-static void *H5O_name_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
-static herr_t H5O_name_encode(H5F_t *f, uint8 *p, const void *_mesg);
+static void *H5O_name_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
+static herr_t H5O_name_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_name_copy(const void *_mesg, void *_dest);
static size_t H5O_name_size(H5F_t *f, const void *_mesg);
static herr_t H5O_name_reset(void *_mesg);
@@ -69,7 +69,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
-H5O_name_decode(H5F_t __unused__ *f, const uint8 *p,
+H5O_name_decode(H5F_t __unused__ *f, const uint8_t *p,
H5O_shared_t __unused__ *sh)
{
H5O_name_t *mesg;
@@ -109,7 +109,7 @@ H5O_name_decode(H5F_t __unused__ *f, const uint8 *p,
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_name_encode(H5F_t __unused__ *f, uint8 *p, const void *_mesg)
+H5O_name_encode(H5F_t __unused__ *f, uint8_t *p, const void *_mesg)
{
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index 16fbded..3bccafc 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -71,8 +71,8 @@ typedef struct H5O_class_t {
intn id; /*message type ID on disk */
const char *name; /*for debugging */
size_t native_size; /*size of native message */
- void *(*decode)(H5F_t*, const uint8*, struct H5O_shared_t*);
- herr_t (*encode)(H5F_t*, uint8*, const void*);
+ void *(*decode)(H5F_t*, const uint8_t*, struct H5O_shared_t*);
+ herr_t (*encode)(H5F_t*, uint8_t*, const void*);
void *(*copy)(const void*, void*); /*copy native value */
size_t (*raw_size)(H5F_t*, const void*);/*sizeof raw val */
herr_t (*reset)(void *); /*free nested data structs */
@@ -84,9 +84,9 @@ typedef struct H5O_class_t {
typedef struct H5O_mesg_t {
const H5O_class_t *type; /*type of message */
hbool_t dirty; /*raw out of date wrt native */
- uint8 flags; /*message flags */
+ uint8_t flags; /*message flags */
void *native; /*native format message */
- uint8 *raw; /*ptr to raw data */
+ uint8_t *raw; /*ptr to raw data */
size_t raw_size; /*size with alignment */
intn chunkno; /*chunk number for this mesg */
} H5O_mesg_t;
@@ -95,7 +95,7 @@ typedef struct H5O_chunk_t {
hbool_t dirty; /*dirty flag */
haddr_t addr; /*chunk file address */
size_t size; /*chunk size */
- uint8 *image; /*image of file */
+ uint8_t *image; /*image of file */
} H5O_chunk_t;
typedef struct H5O_t {
@@ -291,9 +291,9 @@ herr_t H5O_debug (H5F_t *f, const haddr_t *addr, FILE * stream, intn indent,
/* EFL operators */
hsize_t H5O_efl_total_size (H5O_efl_t *efl);
herr_t H5O_efl_read (H5F_t *f, const H5O_efl_t *efl, haddr_t *addr,
- hsize_t size, uint8 *buf);
+ hsize_t size, uint8_t *buf);
herr_t H5O_efl_write (H5F_t *f, const H5O_efl_t *efl, haddr_t *addr,
- hsize_t size, const uint8 *buf);
+ hsize_t size, const uint8_t *buf);
/* Fill value operators */
herr_t H5O_fill_convert(H5O_fill_t *fill, H5T_t *type);
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 74634cc..4dfaaa5 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -25,8 +25,8 @@ static char RcsId[] = "@(#)$Revision$";
#define PABLO_MASK H5O_sdspace_mask
/* PRIVATE PROTOTYPES */
-static void *H5O_sdspace_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
-static herr_t H5O_sdspace_encode(H5F_t *f, uint8 *p, const void *_mesg);
+static void *H5O_sdspace_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
+static herr_t H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_sdspace_copy(const void *_mesg, void *_dest);
static size_t H5O_sdspace_size(H5F_t *f, const void *_mesg);
static herr_t H5O_sdspace_debug(H5F_t *f, const void *_mesg,
@@ -81,7 +81,7 @@ static hbool_t interface_initialize_g = FALSE;
Added a version number and reformatted the message for aligment.
--------------------------------------------------------------------------*/
static void *
-H5O_sdspace_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
+H5O_sdspace_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5S_simple_t *sdim = NULL;/* New simple dimensionality structure */
void *ret_value = NULL;
@@ -175,7 +175,7 @@ H5O_sdspace_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
Added a version number and reformatted the message for aligment.
--------------------------------------------------------------------------*/
static herr_t
-H5O_sdspace_encode(H5F_t *f, uint8 *p, const void *mesg)
+H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *mesg)
{
const H5S_simple_t *sdim = (const H5S_simple_t *) mesg;
intn u; /* Local counting variable */
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index c9cca9c..ba3971f 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -18,8 +18,8 @@
#include <H5MMprivate.h>
#include <H5Oprivate.h>
-static void *H5O_shared_decode (H5F_t*, const uint8*, H5O_shared_t *sh);
-static herr_t H5O_shared_encode (H5F_t*, uint8*, const void*);
+static void *H5O_shared_decode (H5F_t*, const uint8_t*, H5O_shared_t *sh);
+static herr_t H5O_shared_encode (H5F_t*, uint8_t*, const void*);
static size_t H5O_shared_size (H5F_t*, const void*);
static herr_t H5O_shared_debug (H5F_t*, const void*, FILE*, intn, intn);
@@ -64,7 +64,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
-H5O_shared_decode (H5F_t *f, const uint8 *buf, H5O_shared_t __unused__ *sh)
+H5O_shared_decode (H5F_t *f, const uint8_t *buf, H5O_shared_t __unused__ *sh)
{
H5O_shared_t *mesg;
uintn flags, version;
@@ -125,7 +125,7 @@ H5O_shared_decode (H5F_t *f, const uint8 *buf, H5O_shared_t __unused__ *sh)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_shared_encode (H5F_t *f, uint8 *buf/*out*/, const void *_mesg)
+H5O_shared_encode (H5F_t *f, uint8_t *buf/*out*/, const void *_mesg)
{
const H5O_shared_t *mesg = (const H5O_shared_t *)_mesg;
uintn flags;
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 80beed5..9f48c9d 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -23,8 +23,8 @@
#define PABLO_MASK H5O_stab_mask
/* PRIVATE PROTOTYPES */
-static void *H5O_stab_decode(H5F_t *f, const uint8 *p, H5O_shared_t *sh);
-static herr_t H5O_stab_encode(H5F_t *f, uint8 *p, const void *_mesg);
+static void *H5O_stab_decode(H5F_t *f, const uint8_t *p, H5O_shared_t *sh);
+static herr_t H5O_stab_encode(H5F_t *f, uint8_t *p, const void *_mesg);
static void *H5O_stab_copy(const void *_mesg, void *_dest);
static size_t H5O_stab_size(H5F_t *f, const void *_mesg);
static herr_t H5O_stab_debug(H5F_t *f, const void *_mesg,
@@ -68,7 +68,7 @@ static hbool_t interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static void *
-H5O_stab_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
+H5O_stab_decode(H5F_t *f, const uint8_t *p, H5O_shared_t __unused__ *sh)
{
H5O_stab_t *stab;
@@ -106,7 +106,7 @@ H5O_stab_decode(H5F_t *f, const uint8 *p, H5O_shared_t __unused__ *sh)
*-------------------------------------------------------------------------
*/
static herr_t
-H5O_stab_encode(H5F_t *f, uint8 *p, const void *_mesg)
+H5O_stab_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
diff --git a/src/H5P.c b/src/H5P.c
index 164ef19..f529128 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -119,6 +119,7 @@ H5P_term_interface(void)
for (i = 0; i < H5P_NCLASSES; i++) {
H5I_destroy_group((H5I_type_t)(H5I_TEMPLATE_0 + i));
}
+ interface_initialize_g = FALSE;
}
/*--------------------------------------------------------------------------
diff --git a/src/H5R.c b/src/H5R.c
index 9a25a06..209de7f 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -90,6 +90,7 @@ H5R_term_interface(void)
{
/* Free ID group */
H5I_destroy_group(H5I_REFERENCE);
+ interface_initialize_g = FALSE;
} /* end H5R_term_interface() */
@@ -141,10 +142,10 @@ H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type,
{
haddr_t addr;
hobj_ref_t *ref=(hobj_ref_t *)_ref; /* Get pointer to correct type of reference struct */
- uint8 *p; /* Pointer to OID to store */
+ uint8_t *p; /* Pointer to OID to store */
/* Set information for reference */
- p=(uint8 *)ref->oid;
+ p=(uint8_t *)ref->oid;
H5F_addr_pack(loc->file,&addr,&sb.objno[0]);
H5F_addr_encode(loc->file,&p,&addr);
break;
@@ -155,11 +156,11 @@ H5R_create(void *_ref, H5G_entry_t *loc, const char *name, H5R_type_t ref_type,
haddr_t addr;
hdset_reg_ref_t *ref=(hdset_reg_ref_t *)_ref; /* Get pointer to correct type of reference struct */
hssize_t buf_size; /* Size of buffer needed to serialize selection */
- uint8 *p; /* Pointer to OID to store */
- uint8 *buf; /* Buffer to store serialized selection in */
+ uint8_t *p; /* Pointer to OID to store */
+ uint8_t *buf; /* Buffer to store serialized selection in */
/* Set information for dataset OID */
- p=(uint8 *)ref->oid;
+ p=(uint8_t *)ref->oid;
H5F_addr_pack(loc->file,&addr,&sb.objno[0]);
H5F_addr_encode(loc->file,&p,&addr);
@@ -292,7 +293,7 @@ H5R_dereference(H5D_t *dset, H5R_type_t ref_type, void *_ref)
H5D_t *dataset; /* Pointer to dataset to open */
hobj_ref_t *ref=(hobj_ref_t *)_ref; /* Only object references currently supported */
H5G_entry_t ent; /* Symbol table entry */
- uint8 *p; /* Pointer to OID to store */
+ uint8_t *p; /* Pointer to OID to store */
hid_t ret_value = FAIL;
FUNC_ENTER(H5R_dereference, FAIL);
@@ -308,8 +309,8 @@ H5R_dereference(H5D_t *dset, H5R_type_t ref_type, void *_ref)
HDmemset(&ent,0,sizeof(H5G_entry_t));
ent.type=H5G_NOTHING_CACHED;
ent.file=H5D_get_file(dset);
- p=(uint8 *)ref->oid;
- H5F_addr_decode(ent.file,(const uint8 **)&p,&(ent.header));
+ p=(uint8_t *)ref->oid;
+ H5F_addr_decode(ent.file,(const uint8_t **)&p,&(ent.header));
/* Open the dataset object */
if ((dataset=H5D_open_oid(&ent)) == NULL) {
diff --git a/src/H5RA.c b/src/H5RA.c
index 1f05424..d9eb0b5 100644
--- a/src/H5RA.c
+++ b/src/H5RA.c
@@ -122,6 +122,7 @@ H5RA_term_interface(void)
H5I_destroy_group(H5I_RAGGED);
H5T_close(H5RA_meta_type_g);
H5RA_meta_type_g = NULL;
+ interface_initialize_g = FALSE;
}
@@ -690,7 +691,7 @@ H5RA_write(H5RA_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
hsize_t raw_cur_size[2]; /*raw data current size */
hssize_t hs_offset[2]; /*hyperslab offset */
hsize_t hs_size[2]; /*hyperslab size */
- uint8 *raw_buf=NULL; /*raw buffer */
+ uint8_t *raw_buf=NULL; /*raw buffer */
size_t type_size; /*size of the TYPE argument */
hsize_t i;
@@ -778,7 +779,7 @@ H5RA_write(H5RA_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
for (i=0; i<nrows; i++) {
if (size[i]>raw_cur_size[1]) {
H5RA_fix_overflow(ra, type, meta+i, size[i]-raw_cur_size[1],
- (uint8*)(buf[i])+raw_cur_size[1]*type_size);
+ (uint8_t*)(buf[i])+raw_cur_size[1]*type_size);
}
meta[i].nelmts = size[i];
}
@@ -1041,7 +1042,7 @@ H5RA_read(H5RA_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
hsize_t raw_read_size[2]; /*amount of raw data to read */
hssize_t hs_offset[2]; /*hyperslab offset */
hsize_t hs_size[2]; /*hyperslab size */
- uint8 *raw_buf=NULL; /*raw buffer */
+ uint8_t *raw_buf=NULL; /*raw buffer */
size_t type_size; /*size of the TYPE argument */
void **buf_out=NULL; /*output BUF values */
hsize_t i; /*counter */
diff --git a/src/H5S.c b/src/H5S.c
index 61359e4..9675eae 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -207,6 +207,7 @@ H5S_term_interface(void)
for (i=0; i<H5S_nconv_g; i++) H5MM_xfree(H5S_conv_g[i]);
H5S_conv_g = H5MM_xfree(H5S_conv_g);
H5S_nconv_g = H5S_aconv_g = 0;
+ interface_initialize_g = FALSE;
}
@@ -795,7 +796,7 @@ H5S_get_npoints_max(const H5S_t *ds)
if (ds->extent.u.simple.max) {
for (ret_value=1, i=0; i<ds->extent.u.simple.rank; i++) {
if (H5S_UNLIMITED==ds->extent.u.simple.max[i]) {
- ret_value = MAX_HSIZET;
+ ret_value = HSIZET_MAX;
break;
} else {
ret_value *= ds->extent.u.simple.max[i];
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 9ac5940..8904339 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -177,7 +177,7 @@ H5S_all_fgath (H5F_t *f, const struct H5O_layout_t *layout,
hssize_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of slab in file*/
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero */
- uint8 *buf=(uint8 *)_buf; /* Alias for pointer arithmetic */
+ uint8_t *buf=(uint8_t*)_buf; /*for pointer arithmetic*/
hsize_t acc; /*accumulator */
intn space_ndims; /*dimensionality of space*/
intn i; /*counters */
@@ -265,7 +265,7 @@ H5S_all_fscat (H5F_t *f, const struct H5O_layout_t *layout,
hssize_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of hyperslab */
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero vector */
- const uint8 *buf=(const uint8 *)_buf; /* Alias for pointer arithmetic */
+ const uint8_t *buf=(const uint8_t*)_buf; /*for pointer arithmetic*/
hsize_t acc; /*accumulator */
intn space_ndims; /*space dimensionality */
intn i; /*counters */
@@ -350,8 +350,8 @@ H5S_all_mgath (const void *_buf, size_t elmt_size,
hsize_t mem_size[H5O_LAYOUT_NDIMS]; /*total size of app buf */
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero */
- const uint8 *buf=(const uint8 *)_buf; /* Get local copies for address arithmetic */
- uint8 *tconv_buf=(uint8 *)_tconv_buf;
+ const uint8_t *buf=(const uint8_t*)_buf; /* Get local copies for address arithmetic */
+ uint8_t *tconv_buf=(uint8_t*)_tconv_buf;
hsize_t acc; /*accumulator */
intn space_ndims; /*dimensionality of space*/
intn i; /*counters */
@@ -438,8 +438,8 @@ H5S_all_mscat (const void *_tconv_buf, size_t elmt_size,
hsize_t mem_size[H5O_LAYOUT_NDIMS]; /*total size of app buf */
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero */
- uint8 *buf=(uint8 *)_buf; /* Get local copies for address arithmetic */
- const uint8 *tconv_buf=(const uint8 *)_tconv_buf;
+ uint8_t *buf=(uint8_t*)_buf; /* Get local copies for address arithmetic */
+ const uint8_t *tconv_buf=(const uint8_t *)_tconv_buf;
hsize_t acc; /*accumulator */
intn space_ndims; /*dimensionality of space*/
intn i; /*counters */
@@ -584,7 +584,7 @@ H5S_all_npoints (const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_all_select_serialize (const H5S_t *space, uint8 *buf)
+H5S_all_select_serialize (const H5S_t *space, uint8_t *buf)
{
herr_t ret_value=FAIL; /* return value */
@@ -593,10 +593,10 @@ H5S_all_select_serialize (const H5S_t *space, uint8 *buf)
assert(space);
/* Store the preamble information */
- UINT32ENCODE(buf, (uint32)space->select.type); /* Store the type of selection */
- UINT32ENCODE(buf, (uint32)1); /* Store the version number */
- UINT32ENCODE(buf, (uint32)0); /* Store the un-used padding */
- UINT32ENCODE(buf, (uint32)0); /* Store the additional information length */
+ UINT32ENCODE(buf, (uint32_t)space->select.type); /* Store the type of selection */
+ UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */
+ UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
+ UINT32ENCODE(buf, (uint32_t)0); /* Store the additional information length */
/* Set success */
ret_value=SUCCEED;
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 03f364c..a3fef1e 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -723,7 +723,7 @@ H5S_hyper_fread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info)
} /* end else */
/* Advance the pointer in the buffer */
- fhyper_info->dst = ((uint8 *)fhyper_info->dst) +
+ fhyper_info->dst = ((uint8_t *)fhyper_info->dst) +
region_size*fhyper_info->elmt_size;
/* Increment the number of elements read */
@@ -989,7 +989,7 @@ H5S_hyper_fwrite (intn dim, H5S_hyper_fhyper_info_t *fhyper_info)
} /* end else */
/* Advance the pointer in the buffer */
- fhyper_info->src = ((const uint8 *)fhyper_info->src) +
+ fhyper_info->src = ((const uint8_t *)fhyper_info->src) +
region_size*fhyper_info->elmt_size;
/* Increment the number of elements read */
@@ -1243,7 +1243,7 @@ H5S_hyper_mread (intn dim, H5S_hyper_fhyper_info_t *fhyper_info)
}
/* Advance the pointer in the buffer */
- fhyper_info->dst = ((uint8 *)fhyper_info->dst) +
+ fhyper_info->dst = ((uint8_t *)fhyper_info->dst) +
region_size*fhyper_info->elmt_size;
/* Increment the number of elements read */
@@ -1514,7 +1514,7 @@ H5S_hyper_mwrite (intn dim, H5S_hyper_fhyper_info_t *fhyper_info)
}
/* Advance the pointer in the buffer */
- fhyper_info->src = ((const uint8 *)fhyper_info->src) +
+ fhyper_info->src = ((const uint8_t *)fhyper_info->src) +
region_size*fhyper_info->elmt_size;
/* Increment the number of elements read */
@@ -2737,11 +2737,11 @@ H5S_hyper_select_serial_size (const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_hyper_select_serialize (const H5S_t *space, uint8 *buf)
+H5S_hyper_select_serialize (const H5S_t *space, uint8_t *buf)
{
H5S_hyper_node_t *curr; /* Hyperslab information nodes */
- uint8 *lenp; /* pointer to length location for later storage */
- uint32 len=0; /* number of bytes used */
+ uint8_t *lenp; /* pointer to length location for later storage */
+ uint32_t len=0; /* number of bytes used */
intn i; /* local counting variable */
herr_t ret_value=FAIL; /* return value */
@@ -2750,18 +2750,18 @@ H5S_hyper_select_serialize (const H5S_t *space, uint8 *buf)
assert(space);
/* Store the preamble information */
- UINT32ENCODE(buf, (uint32)space->select.type); /* Store the type of selection */
- UINT32ENCODE(buf, (uint32)1); /* Store the version number */
- UINT32ENCODE(buf, (uint32)0); /* Store the un-used padding */
+ UINT32ENCODE(buf, (uint32_t)space->select.type); /* Store the type of selection */
+ UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */
+ UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
lenp=buf; /* keep the pointer to the length location for later */
buf+=4; /* skip over space for length */
/* Encode number of dimensions */
- UINT32ENCODE(buf, (uint32)space->extent.u.simple.rank);
+ UINT32ENCODE(buf, (uint32_t)space->extent.u.simple.rank);
len+=4;
/* Encode number of elements */
- UINT32ENCODE(buf, (uint32)space->select.sel_info.hslab.hyper_lst->count);
+ UINT32ENCODE(buf, (uint32_t)space->select.sel_info.hslab.hyper_lst->count);
len+=4;
/* Encode each point in selection */
@@ -2772,17 +2772,17 @@ H5S_hyper_select_serialize (const H5S_t *space, uint8 *buf)
/* Encode starting point */
for(i=0; i<space->extent.u.simple.rank; i++)
- UINT32ENCODE(buf, (uint32)curr->start[i]);
+ UINT32ENCODE(buf, (uint32_t)curr->start[i]);
/* Encode starting point */
for(i=0; i<space->extent.u.simple.rank; i++)
- UINT32ENCODE(buf, (uint32)curr->end[i]);
+ UINT32ENCODE(buf, (uint32_t)curr->end[i]);
curr=curr->next;
} /* end while */
/* Encode length */
- UINT32ENCODE(lenp, (uint32)len); /* Store the length of the extra information */
+ UINT32ENCODE(lenp, (uint32_t)len); /* Store the length of the extra information */
/* Set success */
ret_value=SUCCEED;
diff --git a/src/H5Snone.c b/src/H5Snone.c
index cbb3d1e..6721d98 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -39,7 +39,7 @@ static intn interface_initialize_g = FALSE;
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_none_select_serialize (const H5S_t *space, uint8 *buf)
+H5S_none_select_serialize (const H5S_t *space, uint8_t *buf)
{
herr_t ret_value=FAIL; /* return value */
@@ -48,10 +48,10 @@ H5S_none_select_serialize (const H5S_t *space, uint8 *buf)
assert(space);
/* Store the preamble information */
- UINT32ENCODE(buf, (uint32)space->select.type); /* Store the type of selection */
- UINT32ENCODE(buf, (uint32)1); /* Store the version number */
- UINT32ENCODE(buf, (uint32)0); /* Store the un-used padding */
- UINT32ENCODE(buf, (uint32)0); /* Store the additional information length */
+ UINT32ENCODE(buf, (uint32_t)space->select.type); /* Store the type of selection */
+ UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */
+ UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
+ UINT32ENCODE(buf, (uint32_t)0); /* Store the additional information length */
/* Set success */
ret_value=SUCCEED;
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index 66f6b8b..e52eb14 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -275,10 +275,10 @@ H5S_point_fgath (H5F_t *f, const struct H5O_layout_t *layout,
hssize_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of slab in file*/
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero */
- uint8 *buf=(uint8 *)_buf; /* Alias for pointer arithmetic */
- uintn ndims; /* Number of dimensions of dataset */
+ uint8_t *buf=(uint8_t *)_buf; /* Alias for pointer arithmetic */
+ uintn ndims; /* Number of dimensions of dataset */
intn i; /*counters */
- size_t num_read; /* number of elements read into buffer */
+ size_t num_read; /* number of elements read into buffer */
FUNC_ENTER (H5S_point_fgath, 0);
@@ -382,7 +382,7 @@ H5S_point_fscat (H5F_t *f, const struct H5O_layout_t *layout,
hssize_t file_offset[H5O_LAYOUT_NDIMS]; /*offset of hyperslab */
hsize_t hsize[H5O_LAYOUT_NDIMS]; /*size of hyperslab */
hssize_t zero[H5O_LAYOUT_NDIMS]; /*zero vector */
- const uint8 *buf=(const uint8 *)_buf; /* Alias for pointer arithmetic */
+ const uint8_t *buf=(const uint8_t *)_buf; /* Alias for pointer arithmetic */
uintn ndims; /* Number of dimensions of dataset */
intn i; /*counters */
size_t num_written; /* number of elements written from buffer */
@@ -494,8 +494,8 @@ H5S_point_mgath (const void *_buf, size_t elmt_size,
size_t nelmts, void *_tconv_buf/*out*/)
{
hsize_t mem_size[H5O_LAYOUT_NDIMS]; /*total size of app buf */
- const uint8 *buf=(const uint8 *)_buf; /* Get local copies for address arithmetic */
- uint8 *tconv_buf=(uint8 *)_tconv_buf;
+ const uint8_t *buf=(const uint8_t *)_buf; /* Get local copies for address arithmetic */
+ uint8_t *tconv_buf=(uint8_t *)_tconv_buf;
hsize_t acc; /* coordinate accumulator */
hsize_t off; /* coordinate offset */
intn space_ndims; /*dimensionality of space*/
@@ -570,8 +570,8 @@ H5S_point_mscat (const void *_tconv_buf, size_t elmt_size,
size_t nelmts, void *_buf/*out*/)
{
hsize_t mem_size[H5O_LAYOUT_NDIMS]; /*total size of app buf */
- uint8 *buf=(uint8 *)_buf; /* Get local copies for address arithmetic */
- const uint8 *tconv_buf=(const uint8 *)_tconv_buf;
+ uint8_t *buf=(uint8_t *)_buf; /* Get local copies for address arithmetic */
+ const uint8_t *tconv_buf=(const uint8_t *)_tconv_buf;
hsize_t acc; /* coordinate accumulator */
hsize_t off; /* coordinate offset */
intn space_ndims; /*dimensionality of space*/
@@ -898,11 +898,11 @@ H5S_point_select_serial_size (const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_point_select_serialize (const H5S_t *space, uint8 *buf)
+H5S_point_select_serialize (const H5S_t *space, uint8_t *buf)
{
H5S_pnt_node_t *curr; /* Point information nodes */
- uint8 *lenp; /* pointer to length location for later storage */
- uint32 len=0; /* number of bytes used */
+ uint8_t *lenp; /* pointer to length location for later storage */
+ uint32_t len=0; /* number of bytes used */
intn i; /* local counting variable */
herr_t ret_value=FAIL; /* return value */
@@ -911,18 +911,18 @@ H5S_point_select_serialize (const H5S_t *space, uint8 *buf)
assert(space);
/* Store the preamble information */
- UINT32ENCODE(buf, (uint32)space->select.type); /* Store the type of selection */
- UINT32ENCODE(buf, (uint32)1); /* Store the version number */
- UINT32ENCODE(buf, (uint32)0); /* Store the un-used padding */
+ UINT32ENCODE(buf, (uint32_t)space->select.type); /* Store the type of selection */
+ UINT32ENCODE(buf, (uint32_t)1); /* Store the version number */
+ UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
lenp=buf; /* keep the pointer to the length location for later */
buf+=4; /* skip over space for length */
/* Encode number of dimensions */
- UINT32ENCODE(buf, (uint32)space->extent.u.simple.rank);
+ UINT32ENCODE(buf, (uint32_t)space->extent.u.simple.rank);
len+=4;
/* Encode number of elements */
- UINT32ENCODE(buf, (uint32)space->select.num_elem);
+ UINT32ENCODE(buf, (uint32_t)space->select.num_elem);
len+=4;
/* Encode each point in selection */
@@ -933,13 +933,13 @@ H5S_point_select_serialize (const H5S_t *space, uint8 *buf)
/* Encode each point */
for(i=0; i<space->extent.u.simple.rank; i++)
- UINT32ENCODE(buf, (uint32)curr->pnt[i]);
+ UINT32ENCODE(buf, (uint32_t)curr->pnt[i]);
curr=curr->next;
} /* end while */
/* Encode length */
- UINT32ENCODE(lenp, (uint32)len); /* Store the length of the extra information */
+ UINT32ENCODE(lenp, (uint32_t)len); /* Store the length of the extra information */
/* Set success */
ret_value=SUCCEED;
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index 817d654..3e593f6 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -81,8 +81,8 @@ typedef struct H5S_hyper_node_tag {
uintn size; /* Size of cached block (in elements) */
uintn left; /* Elements left to access in block */
hid_t block_id; /* Temporary buffer ID */
- uint8 *block; /* Pointer into temporary buffer for cache */
- uint8 *pos; /* Pointer to current location within block */
+ uint8_t *block; /* Pointer into temporary buffer for cache */
+ uint8_t *pos; /* Pointer to current location within block */
} cinfo;
struct H5S_hyper_node_tag *next; /* pointer to next hyperslab in list */
} H5S_hyper_node_t;
@@ -326,7 +326,7 @@ herr_t H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, intn indent,
herr_t H5S_register(H5S_sel_type cls, const H5S_fconv_t *fconv,
const H5S_mconv_t *mconv);
hssize_t H5S_select_serial_size(const H5S_t *space);
-herr_t H5S_select_serialize(const H5S_t *space, uint8 *buf);
+herr_t H5S_select_serialize(const H5S_t *space, uint8_t *buf);
/* Point select functions */
herr_t H5S_point_add (H5S_t *space, size_t num_elemn, const hssize_t **coord);
@@ -335,12 +335,12 @@ hsize_t H5S_point_npoints (const H5S_t *space);
herr_t H5S_point_copy (H5S_t *dst, const H5S_t *src);
htri_t H5S_point_select_valid (const H5S_t *space);
hssize_t H5S_point_select_serial_size(const H5S_t *space);
-herr_t H5S_point_select_serialize(const H5S_t *space, uint8 *buf);
+herr_t H5S_point_select_serialize(const H5S_t *space, uint8_t *buf);
/* "All" select functions */
herr_t H5S_all_release (H5S_t *space);
hsize_t H5S_all_npoints (const H5S_t *space);
-herr_t H5S_all_select_serialize(const H5S_t *space, uint8 *buf);
+herr_t H5S_all_select_serialize(const H5S_t *space, uint8_t *buf);
/* Hyperslab selection functions */
herr_t H5S_hyper_add (H5S_t *space, const hssize_t *start, const hsize_t *end);
@@ -354,10 +354,10 @@ htri_t H5S_hyper_select_valid (const H5S_t *space);
herr_t H5S_hyper_node_add (H5S_hyper_node_t **head, intn endflag, intn rank, const hssize_t *start, const hsize_t *size);
herr_t H5S_hyper_clip (H5S_t *space, H5S_hyper_node_t *nodes, H5S_hyper_node_t **uniq, H5S_hyper_node_t **overlap);
hssize_t H5S_hyper_select_serial_size(const H5S_t *space);
-herr_t H5S_hyper_select_serialize(const H5S_t *space, uint8 *buf);
+herr_t H5S_hyper_select_serialize(const H5S_t *space, uint8_t *buf);
/* "None" selection functions */
-herr_t H5S_none_select_serialize(const H5S_t *space, uint8 *buf);
+herr_t H5S_none_select_serialize(const H5S_t *space, uint8_t *buf);
#ifdef HAVE_PARALLEL
/* MPI-IO function to read directly from app buffer to file rky980813 */
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 7564680..f5db9ad 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -1007,7 +1007,7 @@ H5S_select_serial_size (const H5S_t *space)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5S_select_serialize (const H5S_t *space, uint8 *buf)
+H5S_select_serialize (const H5S_t *space, uint8_t *buf)
{
herr_t ret_value=FAIL; /* return value */
diff --git a/src/H5T.c b/src/H5T.c
index 6249208..2dc75d9 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -139,7 +139,7 @@ H5T_init_interface(void)
* Initialize pre-defined native data types from code generated during
* the library configuration by H5detect.
*/
- ret_value = H5T_init();
+ ret_value = H5T_native_open();
/*------------------------------------------------------------
* Native types
@@ -606,7 +606,8 @@ H5T_init_interface(void)
*/
/* Object pointer (i.e. object header address in file) */
if (NULL==(dt = H5MM_calloc(sizeof(H5T_t)))) {
- HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
+ HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed");
}
dt->state = H5T_STATE_IMMUTABLE;
H5F_addr_undef (&(dt->ent.header));
@@ -624,7 +625,8 @@ H5T_init_interface(void)
}
/* Dataset Region pointer (i.e. selection inside a dataset) */
if (NULL==(dt = H5MM_calloc(sizeof(H5T_t)))) {
- HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed");
+ HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
+ "memory allocation failed");
}
dt->state = H5T_STATE_IMMUTABLE;
H5F_addr_undef (&(dt->ent.header));
@@ -682,6 +684,14 @@ H5T_init_interface(void)
HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to register conversion function");
}
+
+ /*
+ * Native conversions should be listed last since we can use hardware to
+ * perform the conversion. We list the odd types like `llong', `long',
+ * and `short' before the usual types like `int' and `char' so that when
+ * diagnostics are printed we favor the usual names over the odd names
+ * when two or more types are the same size.
+ */
if (H5Tregister_hard("flt_dbl", H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE,
H5T_conv_float_double)<0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
@@ -693,6 +703,466 @@ H5T_init_interface(void)
"unable to register conversion function");
}
+ /* from long long */
+ if (H5Tregister_hard("llong_ullong", H5T_NATIVE_LLONG, H5T_NATIVE_ULLONG,
+ H5T_conv_llong_ullong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ullong_llong", H5T_NATIVE_ULLONG, H5T_NATIVE_LLONG,
+ H5T_conv_ullong_llong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("llong_long", H5T_NATIVE_LLONG, H5T_NATIVE_LONG,
+ H5T_conv_llong_long)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("llong_ulong", H5T_NATIVE_LLONG, H5T_NATIVE_ULONG,
+ H5T_conv_llong_ulong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ullong_long", H5T_NATIVE_ULLONG, H5T_NATIVE_LONG,
+ H5T_conv_ullong_long)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ullong_ulong", H5T_NATIVE_ULLONG, H5T_NATIVE_ULONG,
+ H5T_conv_ullong_ulong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("llong_short", H5T_NATIVE_LLONG, H5T_NATIVE_SHORT,
+ H5T_conv_llong_short)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("llong_ushort", H5T_NATIVE_LLONG, H5T_NATIVE_USHORT,
+ H5T_conv_llong_ushort)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ullong_short", H5T_NATIVE_ULLONG, H5T_NATIVE_SHORT,
+ H5T_conv_ullong_short)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ullong_ushort", H5T_NATIVE_ULLONG, H5T_NATIVE_USHORT,
+ H5T_conv_ullong_ushort)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("llong_int", H5T_NATIVE_LLONG, H5T_NATIVE_INT,
+ H5T_conv_llong_int)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("llong_uint", H5T_NATIVE_LLONG, H5T_NATIVE_UINT,
+ H5T_conv_llong_uint)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ullong_int", H5T_NATIVE_ULLONG, H5T_NATIVE_INT,
+ H5T_conv_ullong_int)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ullong_uint", H5T_NATIVE_ULLONG, H5T_NATIVE_UINT,
+ H5T_conv_ullong_uint)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("llong_char", H5T_NATIVE_LLONG, H5T_NATIVE_CHAR,
+ H5T_conv_llong_char)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("llong_uchar", H5T_NATIVE_LLONG, H5T_NATIVE_UCHAR,
+ H5T_conv_llong_uchar)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ullong_char", H5T_NATIVE_ULLONG, H5T_NATIVE_CHAR,
+ H5T_conv_ullong_char)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ullong_uchar", H5T_NATIVE_ULLONG, H5T_NATIVE_UCHAR,
+ H5T_conv_ullong_uchar)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+
+ /* From long */
+ if (H5Tregister_hard("long_llong", H5T_NATIVE_LONG, H5T_NATIVE_LLONG,
+ H5T_conv_long_llong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("long_ullong", H5T_NATIVE_LONG, H5T_NATIVE_ULLONG,
+ H5T_conv_long_ullong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ulong_llong", H5T_NATIVE_ULONG, H5T_NATIVE_LLONG,
+ H5T_conv_ulong_llong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ulong_ullong", H5T_NATIVE_ULONG, H5T_NATIVE_ULLONG,
+ H5T_conv_ulong_ullong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("long_ulong", H5T_NATIVE_LONG, H5T_NATIVE_ULONG,
+ H5T_conv_long_ulong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ulong_long", H5T_NATIVE_ULONG, H5T_NATIVE_LONG,
+ H5T_conv_ulong_long)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("long_short", H5T_NATIVE_LONG, H5T_NATIVE_SHORT,
+ H5T_conv_long_short)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("long_ushort", H5T_NATIVE_LONG, H5T_NATIVE_USHORT,
+ H5T_conv_long_ushort)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ulong_short", H5T_NATIVE_ULONG, H5T_NATIVE_SHORT,
+ H5T_conv_ulong_short)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ulong_ushort", H5T_NATIVE_ULONG, H5T_NATIVE_USHORT,
+ H5T_conv_ulong_ushort)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("long_int", H5T_NATIVE_LONG, H5T_NATIVE_INT,
+ H5T_conv_long_int)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("long_uint", H5T_NATIVE_LONG, H5T_NATIVE_UINT,
+ H5T_conv_long_uint)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ulong_int", H5T_NATIVE_ULONG, H5T_NATIVE_INT,
+ H5T_conv_ulong_int)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ulong_uint", H5T_NATIVE_ULONG, H5T_NATIVE_UINT,
+ H5T_conv_ulong_uint)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("long_char", H5T_NATIVE_LONG, H5T_NATIVE_CHAR,
+ H5T_conv_long_char)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("long_uchar", H5T_NATIVE_LONG, H5T_NATIVE_UCHAR,
+ H5T_conv_long_uchar)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ulong_char", H5T_NATIVE_ULONG, H5T_NATIVE_CHAR,
+ H5T_conv_ulong_char)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ulong_uchar", H5T_NATIVE_ULONG, H5T_NATIVE_UCHAR,
+ H5T_conv_ulong_uchar)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+
+ /* From short */
+ if (H5Tregister_hard("short_llong", H5T_NATIVE_SHORT, H5T_NATIVE_LLONG,
+ H5T_conv_short_llong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("short_ullong", H5T_NATIVE_SHORT, H5T_NATIVE_ULLONG,
+ H5T_conv_short_ullong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ushort_llong", H5T_NATIVE_USHORT, H5T_NATIVE_LLONG,
+ H5T_conv_ushort_llong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ushort_ullong", H5T_NATIVE_USHORT, H5T_NATIVE_ULLONG,
+ H5T_conv_ushort_ullong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("short_long", H5T_NATIVE_SHORT, H5T_NATIVE_LONG,
+ H5T_conv_short_long)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("short_ulong", H5T_NATIVE_SHORT, H5T_NATIVE_ULONG,
+ H5T_conv_short_ulong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ushort_long", H5T_NATIVE_USHORT, H5T_NATIVE_LONG,
+ H5T_conv_ushort_long)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ushort_ulong", H5T_NATIVE_USHORT, H5T_NATIVE_ULONG,
+ H5T_conv_ushort_ulong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("short_ushort", H5T_NATIVE_SHORT, H5T_NATIVE_USHORT,
+ H5T_conv_short_ushort)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ushort_short", H5T_NATIVE_USHORT, H5T_NATIVE_SHORT,
+ H5T_conv_ushort_short)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("short_int", H5T_NATIVE_SHORT, H5T_NATIVE_INT,
+ H5T_conv_short_int)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("short_uint", H5T_NATIVE_SHORT, H5T_NATIVE_UINT,
+ H5T_conv_short_uint)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ushort_int", H5T_NATIVE_USHORT, H5T_NATIVE_INT,
+ H5T_conv_ushort_int)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ushort_uint", H5T_NATIVE_USHORT, H5T_NATIVE_UINT,
+ H5T_conv_ushort_uint)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("short_char", H5T_NATIVE_SHORT, H5T_NATIVE_CHAR,
+ H5T_conv_short_char)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("short_uchar", H5T_NATIVE_SHORT, H5T_NATIVE_UCHAR,
+ H5T_conv_short_uchar)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ushort_char", H5T_NATIVE_USHORT, H5T_NATIVE_CHAR,
+ H5T_conv_ushort_char)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("ushort_uchar", H5T_NATIVE_USHORT, H5T_NATIVE_UCHAR,
+ H5T_conv_ushort_uchar)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+
+ /* From int */
+ if (H5Tregister_hard("int_llong", H5T_NATIVE_INT, H5T_NATIVE_LLONG,
+ H5T_conv_int_llong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("int_ullong", H5T_NATIVE_INT, H5T_NATIVE_ULLONG,
+ H5T_conv_int_ullong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uint_llong", H5T_NATIVE_UINT, H5T_NATIVE_LLONG,
+ H5T_conv_uint_llong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uint_ullong", H5T_NATIVE_UINT, H5T_NATIVE_ULLONG,
+ H5T_conv_uint_ullong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("int_long", H5T_NATIVE_INT, H5T_NATIVE_LONG,
+ H5T_conv_int_long)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("int_ulong", H5T_NATIVE_INT, H5T_NATIVE_ULONG,
+ H5T_conv_int_ulong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uint_long", H5T_NATIVE_UINT, H5T_NATIVE_LONG,
+ H5T_conv_uint_long)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uint_ulong", H5T_NATIVE_UINT, H5T_NATIVE_ULONG,
+ H5T_conv_uint_ulong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("int_short", H5T_NATIVE_INT, H5T_NATIVE_SHORT,
+ H5T_conv_int_short)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("int_ushort", H5T_NATIVE_INT, H5T_NATIVE_USHORT,
+ H5T_conv_int_ushort)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uint_short", H5T_NATIVE_UINT, H5T_NATIVE_SHORT,
+ H5T_conv_uint_short)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uint_ushort", H5T_NATIVE_UINT, H5T_NATIVE_USHORT,
+ H5T_conv_uint_ushort)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("int_uint", H5T_NATIVE_INT, H5T_NATIVE_UINT,
+ H5T_conv_int_uint)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uint_int", H5T_NATIVE_UINT, H5T_NATIVE_INT,
+ H5T_conv_uint_int)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("int_char", H5T_NATIVE_INT, H5T_NATIVE_CHAR,
+ H5T_conv_int_char)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("int_uchar", H5T_NATIVE_INT, H5T_NATIVE_UCHAR,
+ H5T_conv_int_uchar)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uint_char", H5T_NATIVE_UINT, H5T_NATIVE_CHAR,
+ H5T_conv_uint_char)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uint_uchar", H5T_NATIVE_UINT, H5T_NATIVE_UCHAR,
+ H5T_conv_uint_uchar)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+
+ /* From char */
+ if (H5Tregister_hard("char_llong", H5T_NATIVE_CHAR, H5T_NATIVE_LLONG,
+ H5T_conv_char_llong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("char_ullong", H5T_NATIVE_CHAR, H5T_NATIVE_ULLONG,
+ H5T_conv_char_ullong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uchar_llong", H5T_NATIVE_UCHAR, H5T_NATIVE_LLONG,
+ H5T_conv_uchar_llong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uchar_llong", H5T_NATIVE_UCHAR, H5T_NATIVE_LLONG,
+ H5T_conv_uchar_llong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("char_long", H5T_NATIVE_CHAR, H5T_NATIVE_LONG,
+ H5T_conv_char_long)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("char_ulong", H5T_NATIVE_CHAR, H5T_NATIVE_ULONG,
+ H5T_conv_char_ulong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uchar_long", H5T_NATIVE_UCHAR, H5T_NATIVE_LONG,
+ H5T_conv_uchar_long)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uchar_ulong", H5T_NATIVE_UCHAR, H5T_NATIVE_ULONG,
+ H5T_conv_uchar_ulong)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("char_short", H5T_NATIVE_CHAR, H5T_NATIVE_SHORT,
+ H5T_conv_char_short)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("char_ushort", H5T_NATIVE_CHAR, H5T_NATIVE_USHORT,
+ H5T_conv_char_ushort)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uchar_short", H5T_NATIVE_UCHAR, H5T_NATIVE_SHORT,
+ H5T_conv_uchar_short)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uchar_ushort", H5T_NATIVE_UCHAR, H5T_NATIVE_USHORT,
+ H5T_conv_uchar_ushort)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("char_int", H5T_NATIVE_CHAR, H5T_NATIVE_INT,
+ H5T_conv_char_int)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("char_uint", H5T_NATIVE_CHAR, H5T_NATIVE_UINT,
+ H5T_conv_char_uint)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uchar_int", H5T_NATIVE_UCHAR, H5T_NATIVE_INT,
+ H5T_conv_uchar_int)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uchar_uint", H5T_NATIVE_UCHAR, H5T_NATIVE_UINT,
+ H5T_conv_uchar_uint)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("char_uchar", H5T_NATIVE_CHAR, H5T_NATIVE_UCHAR,
+ H5T_conv_char_uchar)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+ if (H5Tregister_hard("uchar_char", H5T_NATIVE_UCHAR, H5T_NATIVE_CHAR,
+ H5T_conv_uchar_char)<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
+ "unable to register conversion function");
+ }
+
FUNC_LEAVE(ret_value);
}
@@ -772,7 +1242,7 @@ H5T_term_interface(void)
#ifdef H5T_DEBUG
if (H5DEBUG(T)) {
fprintf (H5DEBUG(T), "H5T: conversion function failed "
- "to free private data\n");
+ "to free private data for %s\n", path->name);
}
#endif
H5E_clear(); /*ignore the error*/
@@ -781,7 +1251,7 @@ H5T_term_interface(void)
if (H5DEBUG(T) && path->cdata.stats->ncalls>0) {
if (0==nprint++) {
HDfprintf (H5DEBUG(T), "H5T: type conversion statistics "
- "accumulated over life of library:\n");
+ "accumulated over life of function:\n");
HDfprintf (H5DEBUG(T),
" %-16s %10s %10s %8s %8s %8s %10s\n",
"Conversion", "Elmts", "Calls", "User",
@@ -863,6 +1333,7 @@ H5T_term_interface(void)
/* Unlock all datatypes, then free them */
H5I_search (H5I_DATATYPE, H5T_unlock_cb, NULL);
H5I_destroy_group(H5I_DATATYPE);
+ interface_initialize_g = FALSE;
}
@@ -2961,6 +3432,8 @@ H5Tregister_hard(const char *name, hid_t src_id, hid_t dst_id,
H5T_t *dst = NULL;
H5T_path_t *path = NULL;
intn i;
+ hsize_t nbytes;
+ char bandwidth[32];
FUNC_ENTER(H5Tregister_hard, FAIL);
H5TRACE4("e","siix",name,src_id,dst_id,func);
@@ -2977,12 +3450,57 @@ H5Tregister_hard(const char *name, hid_t src_id, hid_t dst_id,
HRETURN_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
}
+ if (!func && (path=H5T_path_find(NULL, src, dst, FALSE, NULL))) {
+ /* Free the private data for the function */
+ path->cdata.command = H5T_CONV_FREE;
+ if ((func)(FAIL, FAIL, &(path->cdata), 0, NULL, NULL)<0) {
+#ifdef H5T_DEBUG
+ if (H5DEBUG(T)) {
+ fprintf(H5DEBUG(T), "H5T: conversion function free failed "
+ "for %s\n", path->name);
+ }
+#endif
+ H5E_clear(); /*ignore the failure*/
+ }
+
+#ifdef H5T_DEBUG
+ /*
+ * Print statistics about the function we're removing because we
+ * won't get a chance to do it later.
+ */
+ if (H5DEBUG(T) && path->cdata.stats->ncalls>0) {
+ HDfprintf(H5DEBUG(T), "H5T: conversion statistics accumulated "
+ "over life of function:\n");
+ nbytes = MAX(H5T_get_size(path->src), H5T_get_size(path->dst));
+ nbytes *= path->cdata.stats->nelmts;
+ H5_bandwidth(bandwidth, (double)nbytes,
+ path->cdata.stats->timer.etime);
+ HDfprintf(H5DEBUG(T),
+ " %-16s %10Hd %10d %8.2f %8.2f %8.2f %10s\n",
+ path->name,
+ path->cdata.stats->nelmts,
+ path->cdata.stats->ncalls,
+ path->cdata.stats->timer.utime,
+ path->cdata.stats->timer.stime,
+ path->cdata.stats->timer.etime,
+ bandwidth);
+ }
+#endif
+
+ /* Clear the path */
+ path->name[0] = '\0';
+ path->func = NULL;
+ path->is_hard = FALSE;
+ path->cdata.stats = H5MM_xfree(path->cdata.stats);
+ }
+
/* Locate or create a new conversion path */
if (NULL == (path = H5T_path_find(name, src, dst, TRUE, func))) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to locate/allocate conversion path");
}
+
/*
* Notify all other functions to recalculate private data since some
* functions might cache a list of conversion functions. For instance,
@@ -4469,6 +4987,8 @@ H5T_path_find(const char *name, const H5T_t *src, const H5T_t *dst,
H5T_path_t *path = NULL; /*path found */
int i;
hid_t src_id, dst_id;
+ hsize_t nbytes;
+ char bandwidth[32];
FUNC_ENTER(H5T_path_find, NULL);
@@ -4477,115 +4997,169 @@ H5T_path_find(const char *name, const H5T_t *src, const H5T_t *dst,
assert(dst);
/* Binary search */
- while (lt < rt) {
- md = (lt + rt) / 2;
+ while (cmp && lt<rt) {
+ md = (lt+rt) / 2;
assert (H5T_path_g[md]);
cmp = H5T_cmp(src, H5T_path_g[md]->src);
- if (0 == cmp) cmp = H5T_cmp(dst, H5T_path_g[md]->dst);
+ if (0==cmp) cmp = H5T_cmp(dst, H5T_path_g[md]->dst);
- if (cmp < 0) {
+ if (cmp<0) {
rt = md;
- } else if (cmp > 0) {
- lt = md + 1;
- } else {
- HRETURN(H5T_path_g[md]);
+ } else if (cmp>0) {
+ lt = md+1;
}
}
- /* Insert */
- if (create) {
+ /* Return if the path is not found and we're not creating a new one */
+ if (cmp && !create) HRETURN(NULL);
+
+ /*
+ * If we found it then remember the path structure, otherwise create a
+ * new entry with a new path struct.
+ */
+ if (!cmp) {
+ path = H5T_path_g[md];
+ } else {
if (H5T_npath_g >= H5T_apath_g) {
- size_t na = MAX(64, 2 * H5T_apath_g);
+ size_t na = MAX(128, 2 * H5T_apath_g);
H5T_path_t **x = H5MM_realloc (H5T_path_g,
- na*sizeof(H5T_path_t*));
+ na*sizeof(H5T_path_t*));
if (!x) {
- HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
- "memory allocation failed");
+ HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed");
}
H5T_apath_g = (intn)na;
H5T_path_g = x;
}
if (cmp > 0) md++;
-
- /* make room */
HDmemmove(H5T_path_g + md + 1, H5T_path_g + md,
- (H5T_npath_g - md) * sizeof(H5T_path_t*));
+ (H5T_npath_g - md) * sizeof(H5T_path_t*));
H5T_npath_g++;
-
- /* insert */
if (NULL==(path=H5T_path_g[md]=H5MM_calloc (sizeof(H5T_path_t)))) {
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
- "memory allocation failed");
+ "memory allocation failed");
}
path->src = H5T_copy(src, H5T_COPY_ALL);
path->dst = H5T_copy(dst, H5T_COPY_ALL);
+ }
- /* Associate a function with the path if possible */
- if (func) {
- HDstrncpy (path->name, name, H5T_NAMELEN);
- path->name[H5T_NAMELEN-1] = '\0';
- path->func = func;
- path->is_hard = TRUE;
- path->cdata.command = H5T_CONV_INIT;
- if (NULL==(path->cdata.stats=H5MM_calloc(sizeof(H5T_stats_t)))) {
- HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
- "memory allocation failed");
- }
- if ((src_id=H5I_register(H5I_DATATYPE,
- H5T_copy(path->src, H5T_COPY_ALL))) < 0 ||
- (dst_id=H5I_register(H5I_DATATYPE,
- H5T_copy(path->dst, H5T_COPY_ALL))) < 0) {
- HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
- "unable to register conv types for query");
- }
- if ((func)(src_id, dst_id, &(path->cdata), 0, NULL, NULL)<0) {
+ /*
+ * If a hard function is specified and the function doesn't match the one
+ * registered for the path then remove the one from the path.
+ */
+ if (func && path->func && func!=path->func) {
+
+ /* Free the private data for the function */
+ path->cdata.command = H5T_CONV_FREE;
+ if ((func)(FAIL, FAIL, &(path->cdata), 0, NULL, NULL)<0) {
#ifdef H5T_DEBUG
- if (H5DEBUG(T)) {
- fprintf (H5DEBUG(T), "H5T: conversion function init "
- "failed\n");
- }
+ if (H5DEBUG(T)) {
+ fprintf(H5DEBUG(T), "H5T: conversion function free failed "
+ "for %s\n", path->name);
+ }
#endif
- H5E_clear(); /*ignore the failure*/
- }
- H5I_dec_ref(src_id);
- H5I_dec_ref(dst_id);
- } else {
- /* Locate a soft function */
- for (i=H5T_nsoft_g-1; i>=0 && !path->func; --i) {
- if (src->type!=H5T_soft_g[i].src ||
- dst->type!=H5T_soft_g[i].dst) {
- continue;
- }
- if ((src_id=H5I_register(H5I_DATATYPE,
- H5T_copy(path->src,
- H5T_COPY_ALL))) < 0 ||
- (dst_id=H5I_register(H5I_DATATYPE,
- H5T_copy(path->dst,
- H5T_COPY_ALL))) < 0) {
- HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
- "unable to register conv types for query");
- }
- path->cdata.command = H5T_CONV_INIT;
- path->cdata.stats = H5MM_calloc (sizeof(H5T_stats_t));
- if (NULL==path->cdata.stats) {
- HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
- "memory allocation failed");
- }
- if ((H5T_soft_g[i].func) (src_id, dst_id, &(path->cdata),
- H5T_CONV_INIT, NULL, NULL) < 0) {
- H5MM_xfree(path->cdata.stats);
- HDmemset (&(path->cdata), 0, sizeof(H5T_cdata_t));
- H5E_clear(); /*ignore the error*/
- } else {
- HDstrcpy (path->name, H5T_soft_g[i].name);
- path->func = H5T_soft_g[i].func;
- }
- H5I_dec_ref(src_id);
- H5I_dec_ref(dst_id);
- }
- }
+ H5E_clear(); /*ignore the failure*/
+ }
+
+#ifdef H5T_DEBUG
+ /*
+ * Print statistics about the function we're removing because we
+ * won't get a chance to do it later.
+ */
+ if (H5DEBUG(T) && path->cdata.stats->ncalls>0) {
+ HDfprintf(H5DEBUG(T), "H5T: conversion statistics accumulated "
+ "over life of function:\n");
+ nbytes = MAX(H5T_get_size(path->src), H5T_get_size(path->dst));
+ nbytes *= path->cdata.stats->nelmts;
+ H5_bandwidth(bandwidth, (double)nbytes,
+ path->cdata.stats->timer.etime);
+ HDfprintf(H5DEBUG(T),
+ " %-16s %10Hd %10d %8.2f %8.2f %8.2f %10s\n",
+ path->name,
+ path->cdata.stats->nelmts,
+ path->cdata.stats->ncalls,
+ path->cdata.stats->timer.utime,
+ path->cdata.stats->timer.stime,
+ path->cdata.stats->timer.etime,
+ bandwidth);
+ }
+#endif
+
+ /* Clear the path */
+ path->name[0] = '\0';
+ path->func = NULL;
+ path->is_hard = FALSE;
+ path->cdata.stats = H5MM_xfree(path->cdata.stats);
+ }
+
+ /* If a hard function is specified then add it to the path */
+ if (func) {
+ HDstrncpy(path->name, name && *name?name:"NONAME", H5T_NAMELEN);
+ path->name[H5T_NAMELEN-1] = '\0';
+ path->func = func;
+ path->is_hard = TRUE;
+ path->cdata.command = H5T_CONV_INIT;
+ if (NULL==(path->cdata.stats=H5MM_calloc(sizeof(H5T_stats_t)))) {
+ HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed");
+ }
+ if ((src_id=H5I_register(H5I_DATATYPE,
+ H5T_copy(path->src, H5T_COPY_ALL)))<0 ||
+ (dst_id=H5I_register(H5I_DATATYPE,
+ H5T_copy(path->dst, H5T_COPY_ALL)))<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
+ "unable to register conv types for query");
+ }
+ if ((func)(src_id, dst_id, &(path->cdata), 0, NULL, NULL)<0) {
+#ifdef H5T_DEBUG
+ if (H5DEBUG(T)) {
+ fprintf (H5DEBUG(T), "H5T: conversion function init failed "
+ "for %s\n", path->name);
+ }
+#endif
+ H5E_clear(); /*ignore the failure*/
+ }
+ H5I_dec_ref(src_id);
+ H5I_dec_ref(dst_id);
+ }
+
+ /*
+ * If the path doesn't have a function by now (because it's a new path
+ * and the caller didn't supply a hard function) then scan the soft list
+ * for an applicable function and add it to the path.
+ */
+ for (i=H5T_nsoft_g-1; i>=0 && !path->func; --i) {
+ if (src->type!=H5T_soft_g[i].src ||
+ dst->type!=H5T_soft_g[i].dst) {
+ continue;
+ }
+ if ((src_id=H5I_register(H5I_DATATYPE,
+ H5T_copy(path->src, H5T_COPY_ALL)))<0 ||
+ (dst_id=H5I_register(H5I_DATATYPE,
+ H5T_copy(path->dst, H5T_COPY_ALL)))<0) {
+ HRETURN_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, NULL,
+ "unable to register conv types for query");
+ }
+ path->cdata.command = H5T_CONV_INIT;
+ path->cdata.stats = H5MM_calloc (sizeof(H5T_stats_t));
+ if (NULL==path->cdata.stats) {
+ HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
+ "memory allocation failed");
+ }
+ if ((H5T_soft_g[i].func) (src_id, dst_id, &(path->cdata),
+ H5T_CONV_INIT, NULL, NULL)<0) {
+ H5MM_xfree(path->cdata.stats);
+ HDmemset (&(path->cdata), 0, sizeof(H5T_cdata_t));
+ H5E_clear(); /*ignore the error*/
+ } else {
+ HDstrcpy (path->name, H5T_soft_g[i].name);
+ path->func = H5T_soft_g[i].func;
+ }
+ H5I_dec_ref(src_id);
+ H5I_dec_ref(dst_id);
}
+
FUNC_LEAVE(path);
}
@@ -4704,7 +5278,7 @@ H5T_debug(H5T_t *dt, FILE * stream)
{
const char *s1="", *s2="";
int i, j;
- uint64 tmp;
+ uint64_t tmp;
FUNC_ENTER(H5T_debug, FAIL);
diff --git a/src/H5TB.c b/src/H5TB.c
index ff5147d..de6473c 100644
--- a/src/H5TB.c
+++ b/src/H5TB.c
@@ -131,6 +131,7 @@ H5TB_term_interface(void)
/* Reset head & tail pointers */
H5TB_list_head=H5TB_list_tail=NULL;
+ interface_initialize_g = FALSE;
}
/*-------------------------------------------------------------------------
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index 74db048..6a5474d 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -36,7 +36,7 @@ static intn interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
void
-H5T_bit_copy (uint8 *dst, size_t dst_offset, const uint8 *src,
+H5T_bit_copy (uint8_t *dst, size_t dst_offset, const uint8_t *src,
size_t src_offset, size_t size)
{
intn shift;
@@ -165,7 +165,7 @@ H5T_bit_copy (uint8 *dst, size_t dst_offset, const uint8 *src,
*-------------------------------------------------------------------------
*/
hsize_t
-H5T_bit_get_d (uint8 *buf, size_t offset, size_t size)
+H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size)
{
hsize_t val=0;
size_t i, hs;
@@ -173,16 +173,16 @@ H5T_bit_get_d (uint8 *buf, size_t offset, size_t size)
FUNC_ENTER (H5T_bit_get_d, 0);
assert (8*sizeof(val)>=size);
- H5T_bit_copy ((uint8*)&val, 0, buf, offset, size);
+ H5T_bit_copy ((uint8_t*)&val, 0, buf, offset, size);
switch (((H5T_t*)(H5I_object(H5T_NATIVE_INT_g)))->u.atomic.order) {
case H5T_ORDER_LE:
break;
case H5T_ORDER_BE:
for (i=0, hs=sizeof(val)/2; i<hs; i++) {
- uint8 tmp = ((uint8*)&val)[i];
- ((uint8*)&val)[i] = ((uint8*)&val)[sizeof(val)-(i+1)];
- ((uint8*)&val)[sizeof(val)-(i+1)] = tmp;
+ uint8_t tmp = ((uint8_t*)&val)[i];
+ ((uint8_t*)&val)[i] = ((uint8_t*)&val)[sizeof(val)-(i+1)];
+ ((uint8_t*)&val)[sizeof(val)-(i+1)] = tmp;
}
break;
@@ -209,7 +209,7 @@ H5T_bit_get_d (uint8 *buf, size_t offset, size_t size)
*-------------------------------------------------------------------------
*/
void
-H5T_bit_set_d (uint8 *buf, size_t offset, size_t size, hsize_t val)
+H5T_bit_set_d (uint8_t *buf, size_t offset, size_t size, hsize_t val)
{
size_t i, hs;
@@ -221,9 +221,9 @@ H5T_bit_set_d (uint8 *buf, size_t offset, size_t size, hsize_t val)
case H5T_ORDER_BE:
for (i=0, hs=sizeof(val)/2; i<hs; i++) {
- uint8 tmp = ((uint8*)&val)[i];
- ((uint8*)&val)[i] = ((uint8*)&val)[sizeof(val)-(i+1)];
- ((uint8*)&val)[sizeof(val)-(i+1)] = tmp;
+ uint8_t tmp = ((uint8_t*)&val)[i];
+ ((uint8_t*)&val)[i] = ((uint8_t*)&val)[sizeof(val)-(i+1)];
+ ((uint8_t*)&val)[sizeof(val)-(i+1)] = tmp;
}
break;
@@ -231,7 +231,7 @@ H5T_bit_set_d (uint8 *buf, size_t offset, size_t size, hsize_t val)
HDabort ();
}
- H5T_bit_copy (buf, offset, (uint8*)&val, 0, size);
+ H5T_bit_copy (buf, offset, (uint8_t*)&val, 0, size);
}
@@ -251,7 +251,7 @@ H5T_bit_set_d (uint8 *buf, size_t offset, size_t size, hsize_t val)
*-------------------------------------------------------------------------
*/
void
-H5T_bit_set (uint8 *buf, size_t offset, size_t size, hbool_t value)
+H5T_bit_set (uint8_t *buf, size_t offset, size_t size, hbool_t value)
{
intn idx;
@@ -309,7 +309,7 @@ H5T_bit_set (uint8 *buf, size_t offset, size_t size, hbool_t value)
*-------------------------------------------------------------------------
*/
ssize_t
-H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction,
+H5T_bit_find (uint8_t *buf, size_t offset, size_t size, H5T_sdir_t direction,
hbool_t value)
{
ssize_t base=(ssize_t)offset;
@@ -415,7 +415,7 @@ H5T_bit_find (uint8 *buf, size_t offset, size_t size, H5T_sdir_t direction,
*-------------------------------------------------------------------------
*/
htri_t
-H5T_bit_inc(uint8 *buf, size_t start, size_t size)
+H5T_bit_inc(uint8_t *buf, size_t start, size_t size)
{
size_t idx = start / 8;
unsigned carry = 1;
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 1c631e3..cbbeb13 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -75,6 +75,15 @@ static intn interface_initialize_g = FALSE;
* least as large as the destination. Overflows can occur if the
* destination is narrower than the source.
*
+ * su: Conversion from signed integers to unsigned integers where
+ * the source and destination are the same size. Overflow occurs
+ * when the source value is negative.
+ *
+ * us: Conversion from unsigned integers to signed integers where
+ * the source and destination are the same size. Overflow
+ * occurs when the source magnitude is too large for the
+ * destination.
+ *
* The macros take a subset of these arguments in the order listed here:
*
* CDATA: A pointer to the H5T_cdata_t structure that was passed to the
@@ -252,7 +261,7 @@ static intn interface_initialize_g = FALSE;
d = (DT*)(BUF); \
\
for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \
- if (*s > (D_MAX)) { \
+ if (*s > (DT)(D_MAX)) { \
if (!H5T_overflow_g || \
(H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \
*d = (D_MAX); \
@@ -293,15 +302,16 @@ static intn interface_initialize_g = FALSE;
d = (DT*)(BUF); \
\
for (elmtno=0; elmtno<(NELMTS); elmtno++, d++, s++) { \
- if (sizeof(ST)>sizeof(DT) && *s>(D_MAX)) {/*sign vs. unsign ok*/ \
+ if (*s < 0) { \
if (!H5T_overflow_g || \
(H5T_overflow_g)((S_ID), (D_ID), s, d)<0) { \
- *d = (D_MAX); \
+ *d = 0; \
} \
- } else if (*s < 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 = 0; \
+ *d = (D_MAX); \
} \
} else { \
*d = *s; \
@@ -387,6 +397,78 @@ static intn interface_initialize_g = FALSE;
} \
}
+#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 */ \
+ \
+ 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; \
+ } \
+ } \
+ break; \
+ \
+ default: \
+ HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
+ "unknown conversion command"); \
+ } \
+}
+
+#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 */ \
+ \
+ 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; \
+ } \
+ } \
+ break; \
+ \
+ default: \
+ HRETURN_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, \
+ "unknown conversion command"); \
+ } \
+}
+
/*-------------------------------------------------------------------------
* Function: H5T_conv_noop
*
@@ -451,8 +533,8 @@ 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)
{
- uint8 *buf = (uint8 *) _buf;
- uint8 tmp;
+ uint8_t *buf = (uint8_t*)_buf;
+ uint8_t tmp;
H5T_t *src = NULL;
H5T_t *dst = NULL;
size_t i, j, md;
@@ -731,8 +813,8 @@ herr_t
H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
void *_buf, void *_bkg)
{
- uint8 *buf = (uint8 *)_buf; /*cast for pointer arithmetic */
- uint8 *bkg = (uint8 *)_bkg; /*background pointer arithmetic */
+ uint8_t *buf = (uint8_t *)_buf; /*cast for pointer arithmetic */
+ uint8_t *bkg = (uint8_t *)_bkg; /*background pointer arithmetic */
H5T_t *src = NULL; /*source data type */
H5T_t *dst = NULL; /*destination data type */
intn *src2dst = NULL; /*maps src member to dst member */
@@ -936,8 +1018,8 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t elmtno; /*element number */
size_t half_size; /*half the type size */
size_t olap; /*num overlapping elements */
- uint8 *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8 dbuf[64]; /*temp destination buffer */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ uint8_t dbuf[64]; /*temp destination buffer */
size_t first;
ssize_t sfirst; /*a signed version of `first' */
size_t i;
@@ -987,17 +1069,17 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
* overlapping?
*/
if (src->size==dst->size) {
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = nelmts;
} else if (src->size>=dst->size) {
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = (size_t)(HDceil((double)(src->size)/
(double)(src->size-dst->size))-1);
} else {
- sp = (uint8*)buf + (nelmts-1) * src->size;
- dp = (uint8*)buf + (nelmts-1) * dst->size;
+ sp = (uint8_t*)buf + (nelmts-1) * src->size;
+ dp = (uint8_t*)buf + (nelmts-1) * dst->size;
direction = -1;
olap = (size_t)(HDceil((double)(dst->size)/
(double)(dst->size-src->size))-1);
@@ -1036,7 +1118,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
if (H5T_ORDER_BE==src->u.atomic.order) {
half_size = src->size/2;
for (i=0; i<half_size; i++) {
- uint8 tmp = s[src->size-(i+1)];
+ uint8_t tmp = s[src->size-(i+1)];
s[src->size-(i+1)] = s[i];
s[i] = tmp;
}
@@ -1237,7 +1319,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
if (H5T_ORDER_BE==dst->u.atomic.order) {
half_size = dst->size/2;
for (i=0; i<half_size; i++) {
- uint8 tmp = d[dst->size-(i+1)];
+ uint8_t tmp = d[dst->size-(i+1)];
d[dst->size-(i+1)] = d[i];
d[i] = tmp;
}
@@ -1296,8 +1378,8 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t half_size; /*half the type size */
size_t olap; /*num overlapping elements */
ssize_t bitno; /*bit number */
- uint8 *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8 dbuf[64]; /*temp destination buffer */
+ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/
+ uint8_t dbuf[64]; /*temp destination buffer */
/* Conversion-related variables */
hssize_t expo; /*exponent */
@@ -1364,17 +1446,17 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
* overlapping?
*/
if (src_p->size==dst_p->size) {
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = nelmts;
} else if (src_p->size>=dst_p->size) {
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = (size_t)(HDceil((double)(src_p->size)/
(double)(src_p->size-dst_p->size))-1);
} else {
- sp = (uint8*)buf + (nelmts-1) * src_p->size;
- dp = (uint8*)buf + (nelmts-1) * dst_p->size;
+ sp = (uint8_t*)buf + (nelmts-1) * src_p->size;
+ dp = (uint8_t*)buf + (nelmts-1) * dst_p->size;
direction = -1;
olap = (size_t)(HDceil((double)(dst_p->size)/
(double)(dst_p->size-src_p->size))-1);
@@ -1412,7 +1494,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
if (H5T_ORDER_BE==src.order) {
half_size = src_p->size/2;
for (i=0; i<half_size; i++) {
- uint8 tmp = s[src_p->size-(i+1)];
+ uint8_t tmp = s[src_p->size-(i+1)];
s[src_p->size-(i+1)] = s[i];
s[i] = tmp;
}
@@ -1541,7 +1623,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
* original byte order.
*/
if (H5T_overflow_g) {
- uint8 over_src[256];
+ uint8_t over_src[256];
assert(src_p->size<=sizeof over_src);
if (H5T_ORDER_BE==src.order) {
for (i=0; i<src_p->size; i++) {
@@ -1639,7 +1721,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
if (H5T_ORDER_BE==dst.order) {
half_size = dst_p->size/2;
for (i=0; i<half_size; i++) {
- uint8 tmp = d[dst_p->size-(i+1)];
+ uint8_t tmp = d[dst_p->size-(i+1)];
d[dst_p->size-(i+1)] = d[i];
d[i] = tmp;
}
@@ -1690,8 +1772,8 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
size_t elmtno; /*element number */
size_t olap; /*num overlapping elements */
size_t nchars=0; /*number of characters copied */
- uint8 *s, *sp, *d, *dp; /*src and dst traversal pointers*/
- uint8 *dbuf=NULL; /*temp buf for overlap convers. */
+ uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/
+ uint8_t *dbuf=NULL; /*temp buf for overlap convers. */
herr_t ret_value=FAIL; /*return value */
FUNC_ENTER(H5T_conv_s_s, FAIL);
@@ -1745,17 +1827,17 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
* When the source and destination are the same size we can do
* all the conversions in place.
*/
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = 0;
} else if (src->size>=dst->size) {
- sp = dp = (uint8*)buf;
+ sp = dp = (uint8_t*)buf;
direction = 1;
olap = (size_t)(HDceil((double)(src->size)/
(double)(src->size-dst->size))-1);
} else {
- sp = (uint8*)buf + (nelmts-1) * src->size;
- dp = (uint8*)buf + (nelmts-1) * dst->size;
+ sp = (uint8_t*)buf + (nelmts-1) * src->size;
+ dp = (uint8_t*)buf + (nelmts-1) * dst->size;
direction = -1;
olap = (size_t)(HDceil((double)(dst->size)/
(double)(dst->size-src->size))-1);
@@ -1893,9 +1975,63 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_char_uchar
+ *
+ * Purpose: Converts `signed char' to `unsigned char'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_char_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_char_uchar, FAIL);
+ H5T_CONV_su(cdata, src_id, dst_id, buf, nelmts,
+ signed char, unsigned char);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uchar_char
+ *
+ * Purpose: Converts `unsigned char' to `signed char'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_uchar_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_char_short, FAIL);
+ H5T_CONV_us(cdata, src_id, dst_id, buf, nelmts,
+ unsigned char, signed char, CHAR_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_char_short
*
- * Purpose: Convertes `signed char' to `short'
+ * Purpose: Converts `signed char' to `short'
*
* Return: Success: Non-negative
*
@@ -1922,7 +2058,7 @@ H5T_conv_char_short(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_char_ushort
*
- * Purpose: Convertes `signed char' to `unsigned short'
+ * Purpose: Converts `signed char' to `unsigned short'
*
* Return: Success: Non-negative
*
@@ -2030,7 +2166,7 @@ H5T_conv_char_int(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_char_uint
*
- * Purpose: Convertes `signed char' to `unsigned int'
+ * Purpose: Converts `signed char' to `unsigned int'
*
* Return: Success: Non-negative
*
@@ -2056,7 +2192,7 @@ H5T_conv_char_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
* Function: H5T_conv_uchar_int
*
- * Purpose: Convertes `unsigned char' to `int'
+ * Purpose: Converts `unsigned char' to `int'
*
* Return: Success: Non-negative
*
@@ -2137,7 +2273,7 @@ H5T_conv_char_long(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_char_ulong
*
- * Purpose: Convertes `signed char' to `unsigned long'
+ * Purpose: Converts `signed char' to `unsigned long'
*
* Return: Success: Non-negative
*
@@ -2164,7 +2300,7 @@ H5T_conv_char_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
* Function: H5T_conv_uchar_long
*
- * Purpose: Convertes `unsigned char' to `long'
+ * Purpose: Converts `unsigned char' to `long'
*
* Return: Success: Non-negative
*
@@ -2216,6 +2352,114 @@ H5T_conv_uchar_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_char_llong
+ *
+ * Purpose: Converts `signed char' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_char_llong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
+ H5T_cdata_t *cdata, size_t nelmts, void *buf,
+ void __unused__ *bkg)
+{
+ FUNC_ENTER(H5T_conv_char_llong, FAIL);
+ H5T_CONV_sS(cdata, buf, nelmts, signed char, long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_char_ullong
+ *
+ * Purpose: Converts `signed char' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_char_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_char_ullong, FAIL);
+ H5T_CONV_sU(cdata, src_id, dst_id, buf, nelmts,
+ signed char, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uchar_llong
+ *
+ * Purpose: Converts `unsigned char' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uchar_ullong
+ *
+ * Purpose: Converts `unsigned char' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * 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)
+{
+ FUNC_ENTER(H5T_conv_uchar_ullong, FAIL);
+ H5T_CONV_uU(cdata, buf, nelmts, unsigned char, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_short_char
*
* Purpose: Converts `short' to `signed char'
@@ -2324,6 +2568,60 @@ H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_short_ushort
+ *
+ * Purpose: Converts `short' to `unsigned short'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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,
+ short, unsigned short);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ushort_short
+ *
+ * Purpose: Converts `unsigned short' to `short'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_short_int
*
* Purpose: Converts `short' to `int'
@@ -2353,7 +2651,7 @@ H5T_conv_short_int(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_short_uint
*
- * Purpose: Convertes `short' to `unsigned int'
+ * Purpose: Converts `short' to `unsigned int'
*
* Return: Success: Non-negative
*
@@ -2379,7 +2677,7 @@ H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
* Function: H5T_conv_ushort_int
*
- * Purpose: Convertes `unsigned short' to `int'
+ * Purpose: Converts `unsigned short' to `int'
*
* Return: Success: Non-negative
*
@@ -2460,7 +2758,7 @@ H5T_conv_short_long(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_short_ulong
*
- * Purpose: Convertes `short' to `unsigned long'
+ * Purpose: Converts `short' to `unsigned long'
*
* Return: Success: Non-negative
*
@@ -2486,7 +2784,7 @@ H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
* Function: H5T_conv_ushort_long
*
- * Purpose: Convertes `unsigned short' to `long'
+ * Purpose: Converts `unsigned short' to `long'
*
* Return: Success: Non-negative
*
@@ -2538,6 +2836,114 @@ H5T_conv_ushort_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_short_llong
+ *
+ * Purpose: Converts `short' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * 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)
+{
+ FUNC_ENTER(H5T_conv_short_llong, FAIL);
+ H5T_CONV_sS(cdata, buf, nelmts, short, long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_short_ullong
+ *
+ * Purpose: Converts `short' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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,
+ short, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ushort_llong
+ *
+ * Purpose: Converts `unsigned short' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ushort_ullong
+ *
+ * Purpose: Converts `unsigned short' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * 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)
+{
+ FUNC_ENTER(H5T_conv_ushort_ullong, FAIL);
+ H5T_CONV_uU(cdata, buf, nelmts, unsigned short, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_int_char
*
* Purpose: Converts `int' to `signed char'
@@ -2754,6 +3160,60 @@ H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_int_uint
+ *
+ * Purpose: Converts `int' to `unsigned int'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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,
+ int, unsigned);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uint_int
+ *
+ * Purpose: Converts `unsigned int' to `int'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_int_long
*
* Purpose: Converts `int' to `long'
@@ -2783,7 +3243,7 @@ H5T_conv_int_long(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
* Function: H5T_conv_int_ulong
*
- * Purpose: Convertes `int' to `unsigned long'
+ * Purpose: Converts `int' to `unsigned long'
*
* Return: Success: Non-negative
*
@@ -2809,7 +3269,7 @@ H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
* Function: H5T_conv_uint_long
*
- * Purpose: Convertes `unsigned int' to `long'
+ * Purpose: Converts `unsigned int' to `long'
*
* Return: Success: Non-negative
*
@@ -2861,6 +3321,114 @@ H5T_conv_uint_ulong(hid_t __unused__ src_id, hid_t __unused__ dst_id,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_int_llong
+ *
+ * Purpose: Converts `int' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * 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)
+{
+ FUNC_ENTER(H5T_conv_int_llong, FAIL);
+ H5T_CONV_sS(cdata, buf, nelmts, int, long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_int_ullong
+ *
+ * Purpose: Converts `int' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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,
+ int, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uint_llong
+ *
+ * Purpose: Converts `unsigned int' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_uint_ullong
+ *
+ * Purpose: Converts `unsigned int' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * 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)
+{
+ FUNC_ENTER(H5T_conv_uint_ullong, FAIL);
+ H5T_CONV_uU(cdata, buf, nelmts, unsigned, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_long_char
*
* Purpose: Converts `long' to `signed char'
@@ -2909,7 +3477,7 @@ H5T_conv_long_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
{
FUNC_ENTER(H5T_conv_long_uchar, FAIL);
H5T_CONV_Su(cdata, src_id, dst_id, buf, nelmts,
- long, unsigned char, CHAR_MAX);
+ long, unsigned char, UCHAR_MAX);
FUNC_LEAVE(SUCCEED);
}
@@ -3185,6 +3753,654 @@ H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
/*-------------------------------------------------------------------------
+ * Function: H5T_conv_long_ulong
+ *
+ * Purpose: Converts `long' to `unsigned long'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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,
+ long, unsigned long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ulong_long
+ *
+ * Purpose: Converts `unsigned long' to `long'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_long_llong
+ *
+ * Purpose: Converts `long' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * 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)
+{
+ FUNC_ENTER(H5T_conv_long_llong, FAIL);
+ H5T_CONV_sS(cdata, buf, nelmts, long, long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_long_ullong
+ *
+ * Purpose: Converts `long' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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,
+ long, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ulong_llong
+ *
+ * Purpose: Converts `unsigned long' to `long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ulong_ullong
+ *
+ * Purpose: Converts `unsigned long' to `unsigned long long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * 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)
+{
+ FUNC_ENTER(H5T_conv_ulong_ullong, FAIL);
+ H5T_CONV_uU(cdata, buf, nelmts, unsigned long, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_char
+ *
+ * Purpose: Converts `long long' to `signed char'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_llong_char(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_char, FAIL);
+ H5T_CONV_Ss(cdata, src_id, dst_id, buf, nelmts,
+ long long, signed char, CHAR_MIN, CHAR_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_uchar
+ *
+ * Purpose: Converts `long long' to `unsigned char'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_char
+ *
+ * Purpose: Converts `unsigned long long' to `signed char'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5T_conv_ullong_char(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_char, FAIL);
+ H5T_CONV_Us(cdata, src_id, dst_id, buf, nelmts,
+ unsigned long long, signed char, CHAR_MAX);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_uchar
+ *
+ * Purpose: Converts `unsigned long long' to `unsigned char'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_short
+ *
+ * Purpose: Converts `long long' to `short'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_ushort
+ *
+ * Purpose: Converts `long long' to `unsigned short'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_short
+ *
+ * Purpose: Converts `unsigned long long' to `short'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_ushort
+ *
+ * Purpose: Converts `unsigned long long' to `unsigned short'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_int
+ *
+ * Purpose: Converts `long long' to `int'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_uint
+ *
+ * Purpose: Converts `long long' to `unsigned int'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_int
+ *
+ * Purpose: Converts `unsigned long long' to `int'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_uint
+ *
+ * Purpose: Converts `unsigned long long' to `unsigned int'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_long
+ *
+ * Purpose: Converts `long long' to `long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_ulong
+ *
+ * Purpose: Converts `long long' to `unsigned long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_long
+ *
+ * Purpose: Converts `unsigned long long' to `long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_ulong
+ *
+ * Purpose: Converts `unsigned long long' to `unsigned long'
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Robb Matzke
+ * Friday, November 13, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_llong_ullong
+ *
+ * Purpose: Converts `long long' to `unsigned long long'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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,
+ long long, unsigned long long);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5T_conv_ullong_llong
+ *
+ * Purpose: Converts `unsigned long long' to `long long'
+ *
+ * Return: Success: non-negative
+ *
+ * Failure: negative
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+herr_t
+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);
+ FUNC_LEAVE(SUCCEED);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_conv_float_double
*
* Purpose: Convert native `float' to native `double' using hardware.
@@ -3322,8 +4538,8 @@ herr_t
H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void __unused__ *bkg)
{
- uint8 *s=NULL, *d=NULL; /*src and dst buf pointers */
- uint8 tmp[8]; /*temporary destination buffer */
+ uint8_t *s=NULL, *d=NULL; /*src and dst buf pointers */
+ uint8_t tmp[8]; /*temporary destination buffer */
H5T_t *src = NULL; /*source data type */
size_t elmtno; /*element counter */
uintn sign; /*sign bit */
@@ -3353,8 +4569,8 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type");
}
- s = (uint8*)buf + 4*(nelmts-1);
- d = (uint8*)buf + 8*(nelmts-1);
+ s = (uint8_t*)buf + 4*(nelmts-1);
+ d = (uint8_t*)buf + 8*(nelmts-1);
for (elmtno=0; elmtno<nelmts; elmtno++, s-=4, d-=8) {
/*
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 13fa389..2679b75 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -44,7 +44,7 @@ typedef struct H5T_atomic_t {
size_t sign; /*bit position of sign bit */
size_t epos; /*position of lsb of exponent */
size_t esize; /*size of exponent in bits */
- uint64 ebias; /*exponent bias */
+ uint64_t ebias; /*exponent bias */
size_t mpos; /*position of lsb of mantissa */
size_t msize; /*size of mantissa */
H5T_norm_t norm; /*normalization */
@@ -141,6 +141,10 @@ herr_t H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
herr_t H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *_buf, void *bkg);
+herr_t H5T_conv_char_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_uchar_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@@ -149,7 +153,6 @@ herr_t H5T_conv_uchar_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uchar_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
-
herr_t H5T_conv_char_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@@ -158,7 +161,6 @@ herr_t H5T_conv_uchar_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uchar_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
-
herr_t H5T_conv_char_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_char_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@@ -167,6 +169,14 @@ herr_t H5T_conv_uchar_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uchar_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_char_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_char_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_uchar_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_uchar_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
@@ -176,7 +186,10 @@ herr_t H5T_conv_ushort_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ushort_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
-
+herr_t H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ushort_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@@ -185,7 +198,6 @@ herr_t H5T_conv_ushort_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ushort_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
-
herr_t H5T_conv_short_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_short_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@@ -194,6 +206,14 @@ herr_t H5T_conv_ushort_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ushort_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_short_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_short_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ushort_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ushort_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
@@ -203,7 +223,6 @@ herr_t H5T_conv_uint_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
-
herr_t H5T_conv_int_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@@ -212,7 +231,10 @@ herr_t H5T_conv_uint_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uint_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
-
+herr_t H5T_conv_int_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_uint_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_int_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@@ -221,6 +243,14 @@ herr_t H5T_conv_uint_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_uint_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_int_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_int_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_uint_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_uint_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_long_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
@@ -230,7 +260,6 @@ herr_t H5T_conv_ulong_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ulong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
-
herr_t H5T_conv_long_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_long_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@@ -239,7 +268,6 @@ herr_t H5T_conv_ulong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ulong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
-
herr_t H5T_conv_long_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_long_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
@@ -248,22 +276,71 @@ herr_t H5T_conv_ulong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_ulong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_long_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ulong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_long_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_long_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ulong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_llong_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_llong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ullong_char(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ullong_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_llong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_llong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ullong_short(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ullong_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_llong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_llong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ullong_int(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ullong_uint(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_llong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_llong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ullong_long(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ullong_ulong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_llong_ullong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
+herr_t H5T_conv_ullong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_float_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
herr_t H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *buf, void *bkg);
+
herr_t H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *_buf, void *bkg);
/* Bit twiddling functions */
-void H5T_bit_copy (uint8 *dst, size_t dst_offset, const uint8 *src,
+void H5T_bit_copy (uint8_t *dst, size_t dst_offset, const uint8_t *src,
size_t src_offset, size_t size);
-void H5T_bit_set (uint8 *buf, size_t offset, size_t size, hbool_t value);
-hsize_t H5T_bit_get_d (uint8 *buf, size_t offset, size_t size);
-void H5T_bit_set_d (uint8 *buf, size_t offset, size_t size, hsize_t val);
-ssize_t H5T_bit_find (uint8 *buf, size_t offset, size_t size,
+void H5T_bit_set (uint8_t *buf, size_t offset, size_t size, hbool_t value);
+hsize_t H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size);
+void H5T_bit_set_d (uint8_t *buf, size_t offset, size_t size, hsize_t val);
+ssize_t H5T_bit_find (uint8_t *buf, size_t offset, size_t size,
H5T_sdir_t direction, hbool_t value);
-htri_t H5T_bit_inc(uint8 *buf, size_t start, size_t size);
+htri_t H5T_bit_inc(uint8_t *buf, size_t start, size_t size);
#endif
diff --git a/src/H5Tprivate.h b/src/H5Tprivate.h
index 3b602a1..8cdc4f1 100644
--- a/src/H5Tprivate.h
+++ b/src/H5Tprivate.h
@@ -42,7 +42,7 @@ typedef enum H5T_copy_t {
} H5T_copy_t;
/* Private functions */
-herr_t H5T_init (void);
+herr_t H5T_native_open(void);
herr_t H5T_init_interface (void);
htri_t H5T_isa(H5G_entry_t *ent);
H5T_t *H5T_open (H5G_entry_t *loc, const char *name);
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index 188d3d6..c2f8279 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -209,8 +209,8 @@ extern hid_t H5T_IEEE_F64LE_g;
#define H5T_STD_B32LE (H5open(), H5T_STD_B32LE_g)
#define H5T_STD_B64BE (H5open(), H5T_STD_B64BE_g)
#define H5T_STD_B64LE (H5open(), H5T_STD_B64LE_g)
-#define H5T_STD_REF_OBJ (H5open(), H5T_STD_REF_OBJ_g)
-#define H5T_STD_REF_DSETREG (H5open(), H5T_STD_REF_DSETREG_g)
+#define H5T_STD_REF_OBJ (H5open(), H5T_STD_REF_OBJ_g)
+#define H5T_STD_REF_DSETREG (H5open(), H5T_STD_REF_DSETREG_g)
extern hid_t H5T_STD_I8BE_g;
extern hid_t H5T_STD_I8LE_g;
extern hid_t H5T_STD_I16BE_g;
diff --git a/src/H5V.c b/src/H5V.c
index c7bf735..6504ed0 100644
--- a/src/H5V.c
+++ b/src/H5V.c
@@ -251,8 +251,8 @@ H5V_hyper_disjointp(intn n,
if (!n || !size1 || !size2) return TRUE;
for (i=0; i<n; i++) {
- assert (size1[i]<MAX_HSSIZET);
- assert (size2[i]<MAX_HSSIZET);
+ assert (size1[i]<HSSIZET_MAX);
+ assert (size2[i]<HSSIZET_MAX);
if (0==size1[i] || 0==size2[i]) return TRUE;
if (((offset1?offset1[i]:0) < (offset2?offset2[i]:0) &&
@@ -293,7 +293,7 @@ H5V_hyper_fill(intn n, const hsize_t *_size,
const hsize_t *total_size, const hssize_t *offset, void *_dst,
uintn fill_value)
{
- uint8 *dst = (uint8 *) _dst; /*cast for ptr arithmetic */
+ uint8_t *dst = (uint8_t*)_dst; /*cast for ptr arithmetic */
hsize_t size[H5V_HYPER_NDIMS]; /*a modifiable copy of _size */
hssize_t dst_stride[H5V_HYPER_NDIMS]; /*destination stride info */
hsize_t dst_start; /*byte offset to start of stride*/
@@ -374,8 +374,8 @@ H5V_hyper_copy(intn n, const hsize_t *_size,
const hsize_t *src_size, const hssize_t *src_offset,
const void *_src)
{
- const uint8 *src = (const uint8 *)_src; /*cast for ptr arithmtc */
- uint8 *dst = (uint8 *) _dst; /*cast for ptr arithmtc */
+ const uint8_t *src = (const uint8_t*)_src; /*cast for ptr arithmtc */
+ uint8_t *dst = (uint8_t*) _dst; /*cast for ptr arithmtc */
hsize_t size[H5V_HYPER_NDIMS]; /*a modifiable _size */
hssize_t src_stride[H5V_HYPER_NDIMS]; /*source stride info */
hssize_t dst_stride[H5V_HYPER_NDIMS]; /*dest stride info */
@@ -469,7 +469,7 @@ herr_t
H5V_stride_fill(intn n, hsize_t elmt_size, const hsize_t *size,
const hssize_t *stride, void *_dst, uintn fill_value)
{
- uint8 *dst = (uint8 *) _dst; /*cast for ptr arithmetic */
+ uint8_t *dst = (uint8_t*)_dst; /*cast for ptr arithmetic */
hsize_t idx[H5V_HYPER_NDIMS]; /*1-origin indices */
hsize_t nelmts; /*number of elements to fill */
hsize_t i; /*counter */
@@ -477,7 +477,7 @@ H5V_stride_fill(intn n, hsize_t elmt_size, const hsize_t *size,
hbool_t carry; /*subtraction carray value */
FUNC_ENTER(H5V_stride_fill, FAIL);
- assert (elmt_size < MAX_SIZET);
+ assert (elmt_size < SIZET_MAX);
H5V_vector_cpy(n, idx, size);
nelmts = H5V_vector_reduce_product(n, size);
@@ -524,8 +524,8 @@ H5V_stride_copy(int n, hsize_t elmt_size, const hsize_t *size,
const hssize_t *dst_stride, void *_dst,
const hssize_t *src_stride, const void *_src)
{
- uint8 *dst = (uint8 *) _dst; /*cast for ptr arithmetic*/
- const uint8 *src = (const uint8 *) _src; /*cast for ptr arithmetic*/
+ uint8_t *dst = (uint8_t*)_dst; /*cast for ptr arithmetic*/
+ const uint8_t *src = (const uint8_t*) _src; /*cast for ptr arithmetic*/
hsize_t idx[H5V_HYPER_NDIMS]; /*1-origin indices */
hsize_t nelmts; /*num elements to copy */
hsize_t i; /*counter */
@@ -533,7 +533,7 @@ H5V_stride_copy(int n, hsize_t elmt_size, const hsize_t *size,
hbool_t carry; /*carray for subtraction*/
FUNC_ENTER(H5V_stride_copy, FAIL);
- assert (elmt_size<MAX_SIZET);
+ assert (elmt_size<SIZET_MAX);
if (n) {
H5V_vector_cpy(n, idx, size);
@@ -591,8 +591,8 @@ H5V_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
const hssize_t *src_stride,
const void *_src)
{
- uint8 *dst = (uint8 *) _dst;
- const uint8 *src = (const uint8 *) _src;
+ uint8_t *dst = (uint8_t *) _dst;
+ const uint8_t *src = (const uint8_t *) _src;
hsize_t dst_idx[H5V_HYPER_NDIMS];
hsize_t src_idx[H5V_HYPER_NDIMS];
hsize_t i;
@@ -600,7 +600,7 @@ H5V_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
hbool_t carry;
FUNC_ENTER(H5V_stride_copy2, FAIL);
- assert (elmt_size < MAX_SIZET);
+ assert (elmt_size < SIZET_MAX);
H5V_vector_cpy(dst_n, dst_idx, dst_size);
H5V_vector_cpy(src_n, src_idx, src_size);
@@ -645,16 +645,16 @@ H5V_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
herr_t
H5V_array_fill(void *_dst, const void *src, size_t size, size_t count)
{
- size_t copy_size; /* size of the buffer to copy */
- size_t copy_items; /* number of items currently copying */
- size_t items_left; /* number of items left to copy */
- uint8 *dst=(uint8 *)_dst; /* alias for pointer arithmetic */
+ size_t copy_size; /* size of the buffer to copy */
+ size_t copy_items; /* number of items currently copying*/
+ size_t items_left; /* number of items left to copy */
+ uint8_t *dst=(uint8_t*)_dst;/* alias for pointer arithmetic */
FUNC_ENTER(H5V_array_fill, FAIL);
assert (dst);
assert (src);
- assert (size < MAX_SIZET && size > 0);
- assert (count < MAX_SIZET && count > 0);
+ assert (size < SIZET_MAX && size > 0);
+ assert (count < SIZET_MAX && count > 0);
HDmemcpy(dst, src, size); /* copy first item */
diff --git a/src/H5Z.c b/src/H5Z.c
index 72f4213..1a52b78 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -137,6 +137,7 @@ H5Z_term_interface (void)
}
H5Z_table_g = H5MM_xfree(H5Z_table_g);
H5Z_table_used_g = H5Z_table_alloc_g = 0;
+ interface_initialize_g = FALSE;
}
@@ -501,7 +502,7 @@ H5Z_filter_deflate (uintn flags, size_t cd_nelmts, const uintn cd_values[],
size_t ret_value = 0;
int aggression = 6;
void *outbuf = NULL;
-#if defined(HAVE_LIBZ) && defined(HAVE_ZLIB_H)
+#if defined(HAVE_COMPRESS2)
int status;
#endif
@@ -514,7 +515,7 @@ H5Z_filter_deflate (uintn flags, size_t cd_nelmts, const uintn cd_values[],
}
aggression = cd_values[0];
-#if defined(HAVE_LIBZ) && defined (HAVE_ZLIB_H)
+#if defined(HAVE_COMPRESS2)
if (flags & H5Z_FLAG_REVERSE) {
/* Input; uncompress */
z_stream z_strm;
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 3bdd638..11a538a 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -83,6 +83,18 @@
/* The number of bytes in a int. */
#undef SIZEOF_INT
+/* The number of bytes in a int16_t. */
+#undef SIZEOF_INT16_T
+
+/* The number of bytes in a int32_t. */
+#undef SIZEOF_INT32_T
+
+/* The number of bytes in a int64_t. */
+#undef SIZEOF_INT64_T
+
+/* The number of bytes in a int8_t. */
+#undef SIZEOF_INT8_T
+
/* The number of bytes in a long. */
#undef SIZEOF_LONG
@@ -101,6 +113,18 @@
/* The number of bytes in a size_t. */
#undef SIZEOF_SIZE_T
+/* The number of bytes in a uint16_t. */
+#undef SIZEOF_UINT16_T
+
+/* The number of bytes in a uint32_t. */
+#undef SIZEOF_UINT32_T
+
+/* The number of bytes in a uint64_t. */
+#undef SIZEOF_UINT64_T
+
+/* The number of bytes in a uint8_t. */
+#undef SIZEOF_UINT8_T
+
/* Define if you have the BSDgettimeofday function. */
#undef HAVE_BSDGETTIMEOFDAY
@@ -113,6 +137,9 @@
/* Define if you have the _scrsize function. */
#undef HAVE__SCRSIZE
+/* Define if you have the compress2 function. */
+#undef HAVE_COMPRESS2
+
/* Define if you have the difftime function. */
#undef HAVE_DIFFTIME
@@ -200,5 +227,8 @@
/* Define if you have the mpio library (-lmpio). */
#undef HAVE_LIBMPIO
+/* Define if you have the nsl library (-lnsl). */
+#undef HAVE_LIBNSL
+
/* Define if you have the z library (-lz). */
#undef HAVE_LIBZ
diff --git a/src/H5detect.c b/src/H5detect.c
index 9979135..26024b1 100644
--- a/src/H5detect.c
+++ b/src/H5detect.c
@@ -357,18 +357,23 @@ static hbool_t interface_initialize_g = FALSE;\n\
#define INTERFACE_INIT NULL\n\
\n");
- /* Function declaration */
+ /* The interface termination function */
+ printf("\n\
+static void\n\
+H5T_native_close(void)\n\
+{\n\
+ interface_initialize_g = FALSE;\n\
+}\n");
+
+ /* The interface initialization function */
printf("\n\
herr_t\n\
-H5T_init (void)\n\
+H5T_native_open (void)\n\
{\n\
H5T_t *dt = NULL;\n\
- static intn ncalls = 0;\n\
\n\
FUNC_ENTER (H5T_init, FAIL);\n\
-\n\
- if (ncalls++) return SUCCEED; /*already initialized*/\n\
-\n");
+ H5_add_exit(&H5T_native_close);\n");
for (i = 0; i < nd; i++) {
diff --git a/src/H5private.h b/src/H5private.h
index f32b9a8..f9e16f4 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -23,15 +23,14 @@
# include <errno.h>
# include <fcntl.h>
# include <float.h>
+# include <limits.h>
# include <math.h>
# include <stdarg.h>
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
-# include <limits.h>
#endif
-
/*
* If _POSIX_VERSION is defined in unistd.h then this system is Posix.1
* compliant. Otherwise all bets are off.
@@ -186,12 +185,6 @@
# define SIGN(a) ((a)>0 ? 1 : (a)<0 ? -1 : 0)
#endif
-/* maximum value of various types */
-#define MAX_SIZET ((hsize_t)(size_t)(ssize_t)(-1))
-#define MAX_SSIZET ((hsize_t)(ssize_t)((size_t)1<<(8*sizeof(ssize_t)-1)))
-#define MAX_HSIZET ((hsize_t)(hssize_t)(-1))
-#define MAX_HSSIZET ((hsize_t)1<<(8*sizeof(hssize_t)-1))
-
/*
* HDF Boolean type.
*/
@@ -203,45 +196,80 @@
#endif
/*
- * Numeric data types
+ * Numeric data types. Some of these might be defined in Posix.1g, otherwise
+ * we define them with the closest available type which is at least as large
+ * as the number of bits indicated in the type name.
*/
-typedef char char8;
-typedef signed char int8;
-typedef unsigned char uchar8, uint8;
+#if SIZEOF_INT8_T==0
+typedef signed char int8_t;
+#endif
-#if SIZEOF_SHORT==2
-typedef short int16;
-typedef unsigned short uint16;
-#else
-typedef int int16; /*not really */
-typedef unsigned uint16; /*not really */
+#if SIZEOF_UINT8_T==0
+typedef unsigned char uint8_t;
#endif
-#if SIZEOF_INT==4
-typedef int int32;
-typedef unsigned int uint32;
-#elif SIZEOF_LONG==4
-typedef long int32;
-typedef unsigned long uint32;
-#else
-typedef int int32; /*not really */
-typedef unsigned uint32; /*not really */
-#endif
-
-#if SIZEOF_INT==8
-typedef int int64;
-typedef unsigned uint64;
-#elif SIZEOF_LONG==8
-typedef long int64;
-typedef unsigned long uint64;
-#elif SIZEOF_LONG_LONG==8
-typedef long long int64;
-typedef unsigned long long uint64;
-#elif SIZEOF___INT64==8
-typedef __int64 int64;
-typedef unsigned __int64 uint64;
-#else
-# error "no 64-bit integer type"
+#if SIZEOF_INT16_T==0
+# if SIZEOF_SHORT==2
+typedef short int16_t;
+# else
+typedef int int16_t; /*not really */
+# endif
+#endif
+
+#if SIZEOF_UINT16_T==0
+# if SIZEOF_SHORT==2
+typedef unsigned short uint16_t;
+# else
+typedef unsigned uint16_t; /*not really */
+# endif
+#endif
+
+#if SIZEOF_INT32_T==0
+# if SIZEOF_INT==4
+typedef int int32_t;
+# elif SIZEOF_LONG==4
+typedef long int32_t;
+# else
+typedef int int32_t; /*not really */
+# endif
+#endif
+
+#if SIZEOF_UINT32_T==0
+# if SIZEOF_INT==4
+typedef unsigned int uint32_t;
+# elif SIZEOF_LONG==4
+typedef unsigned long uint32_t;
+# else
+typedef unsigned uint32_t; /*not really */
+# endif
+#endif
+
+#if SIZEOF_INT64_T==0
+# if SIZEOF_INT==8
+typedef int int64_t;
+# elif SIZEOF_LONG==8
+typedef long int64_t;
+# elif SIZEOF_LONG_LONG==8
+typedef long long int64_t;
+# elif SIZEOF___INT64==8
+typedef __int64 int64_t;
+# else
+# error "no signed 64-bit integer type"
+# endif
+#endif
+
+#if SIZEOF_UINT64_T==0
+# if SIZEOF_INT==8
+typedef unsigned uint64_t;
+# elif SIZEOF_LONG==8
+typedef unsigned long uint64_t;
+# elif SIZEOF_LONG_LONG==8
+typedef unsigned long long uint64_t;
+# elif SIZEOF___INT64==8
+typedef unsigned __int64 uint64_t;
+# else
+# error "no unsigned 64-bit integer type"
+# endif
#endif
#if SIZEOF_FLOAT==4
@@ -269,10 +297,26 @@ typedef unsigned uintn;
* File addresses.
*/
typedef struct {
- uint64 offset; /*offset within an HDF5 file */
+ uint64_t offset; /*offset within an HDF5 file */
} haddr_t;
-#define H5F_ADDR_UNDEF {((uint64)(-1L))}
+#define H5F_ADDR_UNDEF {((uint64_t)(-1L))}
+
+/*
+ * Maximum and minimum values. These should be defined in <limits.h> for the
+ * most part.
+ */
+#ifndef LLONG_MAX
+# define LLONG_MAX ((long long)(((unsigned long long)1 \
+ <<(8*sizeof(long long)-1))-1))
+# define ULLONG_MAX ((unsigned long long)((long long)(-1)))
+#endif
+#ifndef SIZET_MAX
+# define SIZET_MAX ((hsize_t)(size_t)(ssize_t)(-1))
+# define SSIZET_MAX ((hsize_t)(ssize_t)((size_t)1<<(8*sizeof(ssize_t)-1)))
+#endif
+#define HSIZET_MAX ((hsize_t)(hssize_t)(-1))
+#define HSSIZET_MAX ((hsize_t)1<<(8*sizeof(hssize_t)-1))
/*
* Some compilers have problems declaring auto variables that point
@@ -510,7 +554,7 @@ int HDfprintf (FILE *stream, const char *fmt, ...);
#define HDstrtod(S,R) strtod(S,R)
#define HDstrtok(X,Y) strtok(X,Y)
#define HDstrtol(S,R,N) strtol(S,R,N)
-int64 HDstrtoll (const char *s, const char **rest, int base);
+int64_t HDstrtoll (const char *s, const char **rest, int base);
#define HDstrtoul(S,R,N) strtoul(S,R,N)
#define HDstrxfrm(X,Y,Z) strxfrm(X,Y,Z)
#define HDsysconf(N) sysconf(N)
diff --git a/test/big.c b/test/big.c
index 58e7fbc..9de9f3d 100644
--- a/test/big.c
+++ b/test/big.c
@@ -36,7 +36,7 @@
#elif SIZEOF_LONG >= 8
#define GB8LL ((unsigned long)8*1024*1024*1024)
#else
-#define GB8LL ((unsigned long)0) /* can not do the test */
+#define GB8LL ((unsigned long)0) /* cannot do the test */
#endif
static hsize_t
diff --git a/test/bittests.c b/test/bittests.c
index e0e47b5..6b1f1d9 100644
--- a/test/bittests.c
+++ b/test/bittests.c
@@ -34,7 +34,7 @@
static herr_t
test_find (void)
{
- uint8 v1[8];
+ uint8_t v1[8];
intn i;
ssize_t n;
@@ -154,7 +154,7 @@ test_find (void)
static herr_t
test_copy (void)
{
- uint8 v1[8], v2[8];
+ uint8_t v1[8], v2[8];
size_t s_offset, d_offset, size;
intn i, j;
ssize_t n;
@@ -277,7 +277,7 @@ test_copy (void)
static herr_t
test_set (void)
{
- uint8 v2[8];
+ uint8_t v2[8];
size_t d_offset, size;
intn i, j;
ssize_t n;
@@ -395,7 +395,7 @@ test_set (void)
static herr_t
test_clear (void)
{
- uint8 v2[8];
+ uint8_t v2[8];
size_t d_offset, size;
intn i, j;
ssize_t n;
diff --git a/test/dtypes.c b/test/dtypes.c
index 865cf2b..5611c16 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -61,15 +61,20 @@ typedef struct complex_t {
/*
* Count up or down depending on whether the machine is big endian or little
- * endian. If `E' is H5T_ORDER_BE then the result will be I, otherwise the
- * result will be Z-(I+1).
+ * endian. If local variable `endian' is H5T_ORDER_BE then the result will
+ * be I, otherwise the result will be Z-(I+1).
*/
-#define ENDIAN(E,Z,I) (H5T_ORDER_BE==(E)?(I):(Z)-((I)+1))
+#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;
+typedef enum int_t {
+ INT_CHAR, INT_UCHAR, INT_SHORT, INT_USHORT, INT_INT, INT_UINT,
+ INT_LONG, INT_ULONG, INT_OTHER
+} int_t;
+
/* Count the number of overflows */
static int noverflows_g = 0;
@@ -77,6 +82,12 @@ static int noverflows_g = 0;
static int skip_overflow_tests_g = 0;
/*
+ * If set then all known hardware conversion functions are unregistered when
+ * the library is reset.
+ */
+static int without_hardware_g = 0;
+
+/*
* Although we check whether a floating point overflow generates a SIGFPE and
* turn off overflow tests in that case, it might still be possible for an
* overflow condition to occur. Once a SIGFPE is raised the program cannot
@@ -274,6 +285,101 @@ display_error_cb (void __unused__ *client_data)
/*-------------------------------------------------------------------------
+ * Function: reset_hdf5
+ *
+ * Purpose: Reset the hdf5 library. This causes statistics to be printed
+ * and counters to be reset.
+ *
+ * Return: void
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static void
+reset_hdf5(void)
+{
+ fflush(stdout);
+ fflush(stderr);
+ H5close();
+ H5Eset_auto (display_error_cb, NULL);
+ H5Tset_overflow(overflow_handler);
+
+ if (without_hardware_g) {
+ H5Tunregister(H5T_conv_char_uchar);
+ H5Tunregister(H5T_conv_char_short);
+ H5Tunregister(H5T_conv_char_ushort);
+ H5Tunregister(H5T_conv_char_int);
+ H5Tunregister(H5T_conv_char_uint);
+ H5Tunregister(H5T_conv_char_long);
+ H5Tunregister(H5T_conv_char_ulong);
+
+ H5Tunregister(H5T_conv_uchar_char);
+ H5Tunregister(H5T_conv_uchar_short);
+ H5Tunregister(H5T_conv_uchar_ushort);
+ H5Tunregister(H5T_conv_uchar_int);
+ H5Tunregister(H5T_conv_uchar_uint);
+ H5Tunregister(H5T_conv_uchar_long);
+ H5Tunregister(H5T_conv_uchar_ulong);
+
+ H5Tunregister(H5T_conv_short_char);
+ H5Tunregister(H5T_conv_short_uchar);
+ H5Tunregister(H5T_conv_short_ushort);
+ H5Tunregister(H5T_conv_short_int);
+ H5Tunregister(H5T_conv_short_uint);
+ H5Tunregister(H5T_conv_short_long);
+ H5Tunregister(H5T_conv_short_ulong);
+
+ H5Tunregister(H5T_conv_ushort_char);
+ H5Tunregister(H5T_conv_ushort_uchar);
+ H5Tunregister(H5T_conv_ushort_short);
+ H5Tunregister(H5T_conv_ushort_int);
+ H5Tunregister(H5T_conv_ushort_uint);
+ H5Tunregister(H5T_conv_ushort_long);
+ H5Tunregister(H5T_conv_ushort_ulong);
+
+ H5Tunregister(H5T_conv_int_char);
+ H5Tunregister(H5T_conv_int_uchar);
+ H5Tunregister(H5T_conv_int_short);
+ H5Tunregister(H5T_conv_int_ushort);
+ H5Tunregister(H5T_conv_int_uint);
+ H5Tunregister(H5T_conv_int_long);
+ H5Tunregister(H5T_conv_int_ulong);
+
+ H5Tunregister(H5T_conv_uint_char);
+ H5Tunregister(H5T_conv_uint_uchar);
+ H5Tunregister(H5T_conv_uint_short);
+ H5Tunregister(H5T_conv_uint_ushort);
+ H5Tunregister(H5T_conv_uint_int);
+ H5Tunregister(H5T_conv_uint_long);
+ H5Tunregister(H5T_conv_uint_ulong);
+
+ H5Tunregister(H5T_conv_long_char);
+ H5Tunregister(H5T_conv_long_uchar);
+ H5Tunregister(H5T_conv_long_short);
+ H5Tunregister(H5T_conv_long_ushort);
+ H5Tunregister(H5T_conv_long_int);
+ H5Tunregister(H5T_conv_long_uint);
+ H5Tunregister(H5T_conv_long_ulong);
+
+ H5Tunregister(H5T_conv_ulong_char);
+ H5Tunregister(H5T_conv_ulong_uchar);
+ H5Tunregister(H5T_conv_ulong_short);
+ H5Tunregister(H5T_conv_ulong_ushort);
+ H5Tunregister(H5T_conv_ulong_int);
+ H5Tunregister(H5T_conv_ulong_uint);
+ H5Tunregister(H5T_conv_ulong_long);
+
+ H5Tunregister(H5T_conv_float_double);
+ H5Tunregister(H5T_conv_double_float);
+ }
+}
+
+
+/*-------------------------------------------------------------------------
* Function: test_classes
*
* Purpose: Test type classes
@@ -962,9 +1068,11 @@ test_conv_str_1(void)
H5Tclose(dst_type);
puts(" PASSED");
+ reset_hdf5();
return 0;
error:
+ reset_hdf5();
return -1;
}
@@ -1023,6 +1131,7 @@ test_conv_str_2(void)
error:
if (buf) free(buf);
+ reset_hdf5();
return ret_value;
}
@@ -1070,7 +1179,9 @@ test_conv_int (void)
}
if (byte[0]!=0xff || byte[1]!=0xff) {
puts ("*FAILED*");
- puts (" (unsigned)0x80000000 -> (unsigned)0xffff");
+ printf(" src: 0x80000000 unsigned\n");
+ printf(" dst: 0x%02x%02x unsigned\n", byte[1], byte[0]);
+ printf(" ans: 0xffff unsigned\n");
goto error;
}
@@ -1081,7 +1192,9 @@ test_conv_int (void)
}
if (byte[0]!=0xff || byte[1]!=0x7f) {
puts ("*FAILED*");
- puts (" (unsigned)0xffffffff -> (signed)0x7f");
+ printf(" src: 0xffffffff unsigned\n");
+ printf(" dst: 0x%02x%02x signed\n", byte[1], byte[0]);
+ printf(" ans: 0x7fff signed\n");
goto error;
}
@@ -1092,7 +1205,9 @@ test_conv_int (void)
}
if (byte[0]!=0x00 || byte[1]!=0x00) {
puts ("*FAILED*");
- puts (" (signed)0xffffffff -> (unsigned)0x00");
+ printf(" src: 0xffffffff signed\n");
+ printf(" dst: 0x%02x%02x unsigned\n", byte[1], byte[0]);
+ printf(" ans: 0x0000 unsigned\n");
goto error;
}
@@ -1104,7 +1219,9 @@ test_conv_int (void)
}
if (byte[0]!=0xff || byte[1]!=0xff) {
puts ("*FAILED*");
- puts (" (signed)0x7fffffff -> (unsigned)0xffff");
+ printf(" src: 0x7fffffff signed\n");
+ printf(" dst: 0x%02x%02x unsigned\n", byte[1], byte[0]);
+ printf(" ans: 0xffff unsigned\n");
goto error;
}
@@ -1116,7 +1233,9 @@ test_conv_int (void)
}
if (byte[0]!=0xff || byte[1]!=0x7f) {
puts ("*FAILED*");
- puts (" (signed)0x7fffffff -> (signed)0x7fff");
+ printf(" src: 0x7fffffff signed\n");
+ printf(" dst: 0x%02x%02x signed\n", byte[1], byte[0]);
+ printf(" ans: 0x7fff signed\n");
goto error;
}
@@ -1128,7 +1247,9 @@ test_conv_int (void)
}
if (byte[0]!=0x00 || byte[1]!=0x80) {
puts ("*FAILED*");
- puts (" (signed)0xbfffffff -> (signed)0x8000");
+ printf(" src: 0xbfffffff signed\n");
+ printf(" dst: 0x%02x%02x signed\n", byte[1], byte[0]);
+ printf(" ans: 0x8000 signed\n");
goto error;
}
@@ -1173,16 +1294,664 @@ test_conv_int (void)
puts (" PASSED");
free (buf);
free (saved);
+ reset_hdf5();
return 0;
error:
if (buf) free (buf);
if (saved) free (saved);
+ reset_hdf5();
return -1;
}
/*-------------------------------------------------------------------------
+ * Function: test_conv_int_1
+ *
+ * Purpose: Test conversion of random integer values from SRC to DST.
+ * These types should be any combination of:
+ *
+ * H5T_NATIVE_CHAR H5T_NATIVE_UCHAR
+ * H5T_NATIVE_SHORT H5T_NATIVE_USHORT
+ * H5T_NATIVE_INT H5T_NATIVE_UINT
+ * H5T_NATIVE_LONG H5T_NATIVE_ULONG
+ *
+ * Return: Success: 0
+ *
+ * Failure: -1
+ *
+ * Programmer: Robb Matzke
+ * Monday, November 16, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+static int
+test_conv_int_1(const char *name, hid_t src, hid_t dst)
+{
+ const size_t ntests=5; /*number of tests */
+ const size_t nelmts=200000; /*num values per test */
+ const size_t max_fails=8; /*max number of failures*/
+ size_t fails_all_tests=0; /*number of failures */
+ size_t fails_this_test; /*fails for this test */
+ char str[256]; /*hello string */
+ int_t src_type, dst_type; /*data types */
+ const char *src_type_name=NULL; /*source type name */
+ const char *dst_type_name=NULL; /*destination type name */
+ int endian; /*machine endianess */
+ size_t src_size, dst_size; /*type sizes */
+ unsigned char *buf=NULL; /*buffer for conversion */
+ unsigned char *saved=NULL; /*original values */
+ size_t i, j, k; /*counters */
+ unsigned char *hw=NULL; /*hardware conv result */
+ unsigned char src_bits[32]; /*src value in LE order */
+ 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 */
+ signed char hw_char;
+ unsigned char hw_uchar;
+ short hw_short;
+ unsigned short hw_ushort;
+ int hw_int;
+ unsigned hw_uint;
+ long hw_long;
+ unsigned long hw_ulong;
+
+
+ /* What are the names of the source and destination types */
+ if (H5Tequal(src, H5T_NATIVE_CHAR)) {
+ src_type_name = "signed char";
+ src_type = INT_CHAR;
+ } else if (H5Tequal(src, H5T_NATIVE_UCHAR)) {
+ src_type_name = "unsigned char";
+ src_type = INT_UCHAR;
+ } else if (H5Tequal(src, H5T_NATIVE_SHORT)) {
+ src_type_name = "short";
+ src_type = INT_SHORT;
+ } else if (H5Tequal(src, H5T_NATIVE_USHORT)) {
+ src_type_name = "unsigned short";
+ src_type = INT_USHORT;
+ } else if (H5Tequal(src, H5T_NATIVE_INT)) {
+ src_type_name = "int";
+ src_type = INT_INT;
+ } else if (H5Tequal(src, H5T_NATIVE_UINT)) {
+ src_type_name = "unsigned int";
+ src_type = INT_UINT;
+ } else if (H5Tequal(src, H5T_NATIVE_LONG)) {
+ src_type_name = "long";
+ src_type = INT_LONG;
+ } else if (H5Tequal(src, H5T_NATIVE_ULONG)) {
+ src_type_name = "unsigned long";
+ src_type = INT_ULONG;
+ } else {
+ src_type_name = "UNKNOWN";
+ src_type = INT_OTHER;
+ }
+
+ if (H5Tequal(dst, H5T_NATIVE_CHAR)) {
+ dst_type_name = "signed char";
+ dst_type = INT_CHAR;
+ } else if (H5Tequal(dst, H5T_NATIVE_UCHAR)) {
+ dst_type_name = "unsigned char";
+ dst_type = INT_UCHAR;
+ } else if (H5Tequal(dst, H5T_NATIVE_SHORT)) {
+ dst_type_name = "short";
+ dst_type = INT_SHORT;
+ } else if (H5Tequal(dst, H5T_NATIVE_USHORT)) {
+ dst_type_name = "unsigned short";
+ dst_type = INT_USHORT;
+ } else if (H5Tequal(dst, H5T_NATIVE_INT)) {
+ dst_type_name = "int";
+ dst_type = INT_INT;
+ } else if (H5Tequal(dst, H5T_NATIVE_UINT)) {
+ dst_type_name = "unsigned int";
+ dst_type = INT_UINT;
+ } else if (H5Tequal(dst, H5T_NATIVE_LONG)) {
+ dst_type_name = "long";
+ dst_type = INT_LONG;
+ } else if (H5Tequal(dst, H5T_NATIVE_ULONG)) {
+ dst_type_name = "unsigned long";
+ dst_type = INT_ULONG;
+ } else {
+ dst_type_name = "UNKNOWN";
+ dst_type = INT_OTHER;
+ }
+
+ /* Sanity checks */
+ if (INT_OTHER==src_type || INT_OTHER==dst_type) {
+ sprintf(str, "Testing random %s %s -> %s conversions",
+ name, src_type_name, dst_type_name);
+ printf("%-70s", str);
+ puts("*FAILED*");
+ puts(" Unknown data type.");
+ goto error;
+ }
+
+ /* Allocate buffers */
+ 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));
+ noverflows_g = 0;
+
+ /* The tests */
+ for (i=0; i<ntests; i++) {
+ sprintf(str, "Testing random %s %s -> %s conversions (test %d/%d)",
+ name, src_type_name, dst_type_name, (int)i+1, (int)ntests);
+ printf("%-70s", str);
+ fflush(stdout);
+ fails_this_test=0;
+
+ /*
+ * Initialize the source buffers to random bits. The `buf' buffer
+ * will be used for the conversion while the `saved' buffer will be
+ * sed for the comparison later.
+ */
+ for (j=0; j<nelmts*src_size; j++) buf[j] = saved[j] = rand();
+
+ /* Perform the conversion */
+ if (H5Tconvert(src, dst, nelmts, buf, NULL)<0) goto error;
+
+ /* Check the results from the library against hardware */
+ for (j=0; j<nelmts; j++) {
+ if (INT_CHAR==dst_type) {
+ hw = (unsigned char*)&hw_char;
+ switch (src_type) {
+ case INT_CHAR:
+ hw_char = ((signed char*)saved)[j];
+ break;
+ case INT_UCHAR:
+ hw_char = ((unsigned char*)saved)[j];
+ break;
+ case INT_SHORT:
+ hw_char = ((short*)saved)[j];
+ break;
+ case INT_USHORT:
+ hw_char = ((unsigned short*)saved)[j];
+ break;
+ case INT_INT:
+ hw_char = ((int*)saved)[j];
+ break;
+ case INT_UINT:
+ hw_char = ((unsigned*)saved)[j];
+ break;
+ case INT_LONG:
+ hw_char = ((long*)saved)[j];
+ break;
+ case INT_ULONG:
+ hw_char = ((unsigned long*)saved)[j];
+ break;
+ case INT_OTHER:
+ break;
+ }
+ } else if (INT_UCHAR==dst_type) {
+ hw = (unsigned char*)&hw_uchar;
+ switch (src_type) {
+ case INT_CHAR:
+ hw_uchar = ((signed char*)saved)[j];
+ break;
+ case INT_UCHAR:
+ hw_uchar = ((unsigned char*)saved)[j];
+ break;
+ case INT_SHORT:
+ hw_uchar = ((short*)saved)[j];
+ break;
+ case INT_USHORT:
+ hw_uchar = ((unsigned short*)saved)[j];
+ break;
+ case INT_INT:
+ hw_uchar = ((int*)saved)[j];
+ break;
+ case INT_UINT:
+ hw_uchar = ((unsigned*)saved)[j];
+ break;
+ case INT_LONG:
+ hw_uchar = ((long*)saved)[j];
+ break;
+ case INT_ULONG:
+ hw_uchar = ((unsigned long*)saved)[j];
+ break;
+ case INT_OTHER:
+ break;
+ }
+ } else if (INT_SHORT==dst_type) {
+ hw = (unsigned char*)&hw_short;
+ switch (src_type) {
+ case INT_CHAR:
+ hw_short = ((signed char*)saved)[j];
+ break;
+ case INT_UCHAR:
+ hw_short = ((unsigned char*)saved)[j];
+ break;
+ case INT_SHORT:
+ hw_short = ((short*)saved)[j];
+ break;
+ case INT_USHORT:
+ hw_short = ((unsigned short*)saved)[j];
+ break;
+ case INT_INT:
+ hw_short = ((int*)saved)[j];
+ break;
+ case INT_UINT:
+ hw_short = ((unsigned*)saved)[j];
+ break;
+ case INT_LONG:
+ hw_short = ((long*)saved)[j];
+ break;
+ case INT_ULONG:
+ hw_short = ((unsigned long*)saved)[j];
+ break;
+ case INT_OTHER:
+ break;
+ }
+ } else if (INT_USHORT==dst_type) {
+ hw = (unsigned char*)&hw_ushort;
+ switch (src_type) {
+ case INT_CHAR:
+ hw_ushort = ((signed char*)saved)[j];
+ break;
+ case INT_UCHAR:
+ hw_ushort = ((unsigned char*)saved)[j];
+ break;
+ case INT_SHORT:
+ hw_ushort = ((short*)saved)[j];
+ break;
+ case INT_USHORT:
+ hw_ushort = ((unsigned short*)saved)[j];
+ break;
+ case INT_INT:
+ hw_ushort = ((int*)saved)[j];
+ break;
+ case INT_UINT:
+ hw_ushort = ((unsigned*)saved)[j];
+ break;
+ case INT_LONG:
+ hw_ushort = ((long*)saved)[j];
+ break;
+ case INT_ULONG:
+ hw_ushort = ((unsigned long*)saved)[j];
+ break;
+ case INT_OTHER:
+ break;
+ }
+ } else if (INT_INT==dst_type) {
+ hw = (unsigned char*)&hw_int;
+ switch (src_type) {
+ case INT_CHAR:
+ hw_int = ((signed char*)saved)[j];
+ break;
+ case INT_UCHAR:
+ hw_int = ((unsigned char*)saved)[j];
+ break;
+ case INT_SHORT:
+ hw_int = ((short*)saved)[j];
+ break;
+ case INT_USHORT:
+ hw_int = ((unsigned short*)saved)[j];
+ break;
+ case INT_INT:
+ hw_int = ((int*)saved)[j];
+ break;
+ case INT_UINT:
+ hw_int = ((unsigned*)saved)[j];
+ break;
+ case INT_LONG:
+ hw_int = ((long*)saved)[j];
+ break;
+ case INT_ULONG:
+ hw_int = ((unsigned long*)saved)[j];
+ break;
+ case INT_OTHER:
+ break;
+ }
+ } else if (INT_UINT==dst_type) {
+ hw = (unsigned char*)&hw_uint;
+ switch (src_type) {
+ case INT_CHAR:
+ hw_uint = ((signed char*)saved)[j];
+ break;
+ case INT_UCHAR:
+ hw_uint = ((unsigned char*)saved)[j];
+ break;
+ case INT_SHORT:
+ hw_uint = ((short*)saved)[j];
+ break;
+ case INT_USHORT:
+ hw_uint = ((unsigned short*)saved)[j];
+ break;
+ case INT_INT:
+ hw_uint = ((int*)saved)[j];
+ break;
+ case INT_UINT:
+ hw_uint = ((unsigned*)saved)[j];
+ break;
+ case INT_LONG:
+ hw_uint = ((long*)saved)[j];
+ break;
+ case INT_ULONG:
+ hw_uint = ((unsigned long*)saved)[j];
+ break;
+ case INT_OTHER:
+ break;
+ }
+ } else if (INT_LONG==dst_type) {
+ hw = (unsigned char*)&hw_long;
+ switch (src_type) {
+ case INT_CHAR:
+ hw_long = ((signed char*)saved)[j];
+ break;
+ case INT_UCHAR:
+ hw_long = ((unsigned char*)saved)[j];
+ break;
+ case INT_SHORT:
+ hw_long = ((short*)saved)[j];
+ break;
+ case INT_USHORT:
+ hw_long = ((unsigned short*)saved)[j];
+ break;
+ case INT_INT:
+ hw_long = ((int*)saved)[j];
+ break;
+ case INT_UINT:
+ hw_long = ((unsigned*)saved)[j];
+ break;
+ case INT_LONG:
+ hw_long = ((long*)saved)[j];
+ break;
+ case INT_ULONG:
+ hw_long = ((unsigned long*)saved)[j];
+ break;
+ case INT_OTHER:
+ break;
+ }
+ } else if (INT_ULONG==dst_type) {
+ hw = (unsigned char*)&hw_ulong;
+ switch (src_type) {
+ case INT_CHAR:
+ hw_ulong = ((signed char*)saved)[j];
+ break;
+ case INT_UCHAR:
+ hw_ulong = ((unsigned char*)saved)[j];
+ break;
+ case INT_SHORT:
+ hw_ulong = ((short*)saved)[j];
+ break;
+ case INT_USHORT:
+ hw_ulong = ((unsigned short*)saved)[j];
+ break;
+ case INT_INT:
+ hw_ulong = ((int*)saved)[j];
+ break;
+ case INT_UINT:
+ hw_ulong = ((unsigned*)saved)[j];
+ break;
+ case INT_LONG:
+ hw_ulong = ((long*)saved)[j];
+ break;
+ case INT_ULONG:
+ hw_ulong = ((unsigned long*)saved)[j];
+ break;
+ case INT_OTHER:
+ break;
+ }
+ }
+
+ /* Are the two results the same */
+ for (k=0; k<dst_size; k++) {
+ if (buf[j*dst_size+k]!=hw[k]) break;
+ }
+ if (k==dst_size) continue; /*no error*/
+
+ /*
+ * Convert the source and destination values to little endian
+ * order so we can use the HDF5 bit vector operations to test
+ * certain things. These routines have already been tested by
+ * the `bittests' program.
+ */
+ src_nbits = 8*src_size;
+ for (k=0; k<src_size; k++) {
+ src_bits[src_size-(k+1)] = saved[j*src_size+
+ ENDIAN(src_size, k)];
+ }
+
+ dst_nbits = 8*dst_size;
+ for (k=0; k<dst_size; k++) {
+ dst_bits[dst_size-(k+1)] = buf[j*dst_size+
+ ENDIAN(dst_size, k)];
+ }
+
+
+ /*
+ * Hardware usually doesn't handle overflows too gracefully. The
+ * hardware conversion result during overflows is usually garbage
+ * so we must handle those cases differetly when checking results.
+ */
+ if (H5T_SGN_2==H5Tget_sign(src) &&
+ H5T_SGN_2==H5Tget_sign(dst)) {
+ if (src_size>dst_size &&
+ 0==H5T_bit_get_d(src_bits, src_nbits-1, 1) &&
+ H5T_bit_find(src_bits, dst_nbits-1, (src_nbits-dst_nbits),
+ H5T_BIT_MSB, 1)>=0) {
+ /*
+ * Source is positive and the magnitude is too large for
+ * the destination. The destination should be set to the
+ * maximum possible value: 0x7f...f
+ */
+ if (0==H5T_bit_get_d(dst_bits, dst_nbits-1, 1) &&
+ H5T_bit_find(dst_bits, 0, dst_nbits-1,
+ H5T_BIT_LSB, 0)<0) {
+ continue; /*no error*/
+ }
+ } else if (src_size>dst_size &&
+ 1==H5T_bit_get_d(src_bits, src_nbits-1, 1) &&
+ H5T_bit_find(src_bits, 0, src_nbits-1, H5T_BIT_MSB,
+ 0)+1>=(ssize_t)dst_nbits) {
+ /*
+ * Source is negative but the magnitude is too large for
+ * the destination. The destination should be set to the
+ * smallest possible value: 0x80...0
+ */
+ if (1==H5T_bit_get_d(dst_bits, dst_nbits-1, 1) &&
+ H5T_bit_find(dst_bits, 0, dst_nbits-1,
+ H5T_BIT_LSB, 1)<0) {
+ continue; /*no error*/
+ }
+ }
+
+ } else if (H5T_SGN_2==H5Tget_sign(src) &&
+ H5T_SGN_NONE==H5Tget_sign(dst)) {
+ if (H5T_bit_get_d(src_bits, src_nbits-1, 1)) {
+ /*
+ * The source is negative so the result should be zero.
+ * The source is negative if the most significant bit is
+ * set. The destination is zero if all bits are zero.
+ */
+ if (H5T_bit_find(dst_bits, 0, dst_nbits, H5T_BIT_LSB, 1)<0)
+ continue; /*no error*/
+ } else if (src_size>dst_size &&
+ H5T_bit_find(src_bits, dst_nbits-1,
+ src_nbits-dst_nbits, H5T_BIT_LSB,
+ 1)>=0) {
+ /*
+ * The source is a value with a magnitude too large for
+ * the destination. The destination should be the
+ * largest possible value: 0xff...f
+ */
+ if (H5T_bit_find(dst_bits, 0, dst_nbits, H5T_BIT_LSB,
+ 0)<0) {
+ continue; /*no error*/
+ }
+ }
+
+ } else if (H5T_SGN_NONE==H5Tget_sign(src) &&
+ H5T_SGN_2==H5Tget_sign(dst)) {
+ if (src_size>=dst_size &&
+ H5T_bit_find(src_bits, dst_nbits-1,
+ (src_nbits-dst_nbits)+1, H5T_BIT_LSB, 1)>=0) {
+ /*
+ * The source value has a magnitude that is larger than
+ * the destination can handle. The destination should be
+ * set to the largest possible positive value: 0x7f...f
+ */
+ if (0==H5T_bit_get_d(dst_bits, dst_nbits-1, 1) &&
+ H5T_bit_find(dst_bits, 0, dst_nbits-1, H5T_BIT_LSB,
+ 0)<0) {
+ continue; /*no error*/
+ }
+ }
+
+ } else {
+ if (src_size>dst_size &&
+ H5T_bit_find(src_bits, dst_nbits, src_nbits-dst_nbits,
+ H5T_BIT_LSB, 1)>=0) {
+ /*
+ * The unsigned source has a value which is too large for
+ * the unsigned destination. The destination should be
+ * set to the largest possible value: 0xff...f
+ */
+ if (H5T_bit_find(dst_bits, 0, dst_nbits, H5T_BIT_LSB,
+ 0)<0) {
+ continue; /*no error*/
+ }
+ }
+ }
+
+ /* Print errors */
+ if (0==fails_this_test++) puts("*FAILED*");
+ printf(" test %u elmt %u\n", (unsigned)i+1, (unsigned)j);
+
+ printf(" src = ");
+ for (k=0; k<src_size; k++) {
+ printf(" %02x", saved[j*src_size+ENDIAN(src_size, k)]);
+ }
+ 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]);
+ break;
+ case INT_UCHAR:
+ printf(" %29u\n", ((unsigned char*)saved)[j]);
+ break;
+ case INT_SHORT:
+ printf(" %29d\n", ((short*)saved)[j]);
+ break;
+ case INT_USHORT:
+ printf(" %29u\n", ((unsigned short*)saved)[j]);
+ break;
+ case INT_INT:
+ printf(" %29d\n", ((int*)saved)[j]);
+ break;
+ case INT_UINT:
+ printf(" %29u\n", ((unsigned*)saved)[j]);
+ break;
+ case INT_LONG:
+ printf(" %29ld\n", ((long*)saved)[j]);
+ break;
+ case INT_ULONG:
+ printf(" %29lu\n", ((unsigned long*)saved)[j]);
+ break;
+ case INT_OTHER:
+ break;
+ }
+
+ printf(" dst = ");
+ for (k=0; k<dst_size; k++) {
+ printf(" %02x", buf[j*dst_size+ENDIAN(dst_size, k)]);
+ }
+ 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]);
+ break;
+ case INT_UCHAR:
+ printf(" %29u\n", ((unsigned char*)buf)[j]);
+ break;
+ case INT_SHORT:
+ printf(" %29d\n", ((short*)buf)[j]);
+ break;
+ case INT_USHORT:
+ printf(" %29u\n", ((unsigned short*)buf)[j]);
+ break;
+ case INT_INT:
+ printf(" %29d\n", ((int*)buf)[j]);
+ break;
+ case INT_UINT:
+ printf(" %29u\n", ((unsigned*)buf)[j]);
+ break;
+ case INT_LONG:
+ printf(" %29ld\n", ((long*)buf)[j]);
+ break;
+ case INT_ULONG:
+ printf(" %29lu\n", ((unsigned long*)buf)[j]);
+ break;
+ case INT_OTHER:
+ break;
+ }
+
+ printf(" ans = ");
+ for (k=0; k<dst_size; k++) {
+ printf(" %02x", hw[ENDIAN(dst_size, k)]);
+ }
+ printf("%*s", 3*MAX(0, (ssize_t)src_size-(ssize_t)dst_size), "");
+ switch (dst_type) {
+ case INT_CHAR:
+ printf(" %29d\n", *((signed char*)hw));
+ break;
+ case INT_UCHAR:
+ printf(" %29u\n", *((unsigned char*)hw));
+ break;
+ case INT_SHORT:
+ printf(" %29d\n", *((short*)hw));
+ break;
+ case INT_USHORT:
+ printf(" %29u\n", *((unsigned short*)hw));
+ break;
+ case INT_INT:
+ printf(" %29d\n", *((int*)hw));
+ break;
+ case INT_UINT:
+ printf(" %29u\n", *((unsigned*)hw));
+ break;
+ case INT_LONG:
+ printf(" %29ld\n", *((long*)hw));
+ break;
+ case INT_ULONG:
+ printf(" %29lu\n", *((unsigned long*)hw));
+ break;
+ case INT_OTHER:
+ break;
+ }
+
+ if (++fails_all_tests>=max_fails) {
+ puts(" maximum failures reached, aborting test...");
+ goto done;
+ }
+ }
+ puts(" PASSED");
+ }
+ if (noverflows_g>0) {
+ printf(" %d overflow%s\n", noverflows_g, 1==noverflows_g?"":"s");
+ }
+
+ done:
+ if (buf) free(buf);
+ if (saved) free(saved);
+ fflush(stdout);
+ reset_hdf5(); /*print statistics*/
+ return (int)fails_all_tests;
+
+ error:
+ if (buf) free(buf);
+ if (saved) free(saved);
+ fflush(stdout);
+ reset_hdf5(); /*print statistics*/
+ return MAX((int)fails_all_tests, 1);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: my_isnan
*
* Purpose: Determines whether VAL points to NaN.
@@ -1403,16 +2172,12 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
for (j=0; j<nelmts*src_size; j++) buf[j] = saved[j] = rand();
} else {
for (j=0; j<nelmts; j++) {
-#if 0
- unsigned char temp[32];
-#else
/* Do it this way for alignment reasons */
#ifdef USE_LDOUBLE
long double temp[1];
#else
double temp[1];
#endif
-#endif
if (src_size<=dst_size) {
for (k=0; k<dst_size; k++) buf[j*src_size+k] = rand();
} else {
@@ -1563,7 +2328,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
printf(" src =");
for (k=0; k<src_size; k++) {
- printf(" %02x", saved[j*src_size+ENDIAN(endian,src_size,k)]);
+ printf(" %02x", saved[j*src_size+ENDIAN(src_size,k)]);
}
printf("%*s", 3*MAX(0, (ssize_t)dst_size-(ssize_t)src_size), "");
if (FLT_FLOAT==src_type) {
@@ -1578,7 +2343,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
printf(" dst =");
for (k=0; k<dst_size; k++) {
- printf(" %02x", buf[j*dst_size+ENDIAN(endian,dst_size,k)]);
+ printf(" %02x", buf[j*dst_size+ENDIAN(dst_size,k)]);
}
printf("%*s", 3*MAX(0, (ssize_t)src_size-(ssize_t)dst_size), "");
if (FLT_FLOAT==dst_type) {
@@ -1593,7 +2358,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
printf(" ans =");
for (k=0; k<dst_size; k++) {
- printf(" %02x", hw[ENDIAN(endian,dst_size,k)]);
+ printf(" %02x", hw[ENDIAN(dst_size,k)]);
}
printf("%*s", 3*MAX(0, (ssize_t)src_size-(ssize_t)dst_size), "");
if (FLT_FLOAT==dst_type) {
@@ -1620,18 +2385,22 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
done:
if (buf) free (buf);
if (saved) free (saved);
+ fflush(stdout);
#ifdef HANDLE_SIGFPE
exit(MIN((int)fails_all_tests, 254));
#else
+ reset_hdf5();
return (int)fails_all_tests;
#endif
error:
if (buf) free (buf);
+ fflush(stdout);
if (saved) free (saved);
#ifdef HANDLE_SIGFPE
exit(MIN(MAX((int)fails_all_tests, 1), 254));
#else
+ reset_hdf5();
return MAX((int)fails_all_tests, 1);
#endif
}
@@ -1658,11 +2427,7 @@ main(void)
{
unsigned long nerrors = 0;
- /* Set the error handler */
- H5Eset_auto (display_error_cb, NULL);
-
- /* Set the overflow handler */
- H5Tset_overflow(overflow_handler);
+ reset_hdf5();
/* Do the tests */
nerrors += test_classes()<0 ? 1 : 0;
@@ -1670,6 +2435,8 @@ main(void)
nerrors += test_compound()<0 ? 1 : 0;
nerrors += test_transient ()<0 ? 1 : 0;
nerrors += test_named ()<0 ? 1 : 0;
+ reset_hdf5();
+
nerrors += test_conv_str_1()<0 ? 1 : 0;
nerrors += test_conv_str_2()<0 ? 1 : 0;
nerrors += test_conv_int ()<0 ? 1 : 0;
@@ -1681,13 +2448,180 @@ main(void)
nerrors += test_conv_flt_1("noop", H5T_NATIVE_FLOAT, H5T_NATIVE_FLOAT);
nerrors += test_conv_flt_1("noop", H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE);
- /* Test hardware conversion functions */
+ /* Test hardware integer conversion functions */
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_CHAR, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_CHAR, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_CHAR, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_CHAR, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_CHAR, H5T_NATIVE_UINT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_CHAR, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_CHAR, H5T_NATIVE_ULONG);
+#endif
+
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UCHAR, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UCHAR, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UCHAR, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UCHAR, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UCHAR, H5T_NATIVE_UINT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UCHAR, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UCHAR, H5T_NATIVE_ULONG);
+#endif
+
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_SHORT, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_SHORT, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_SHORT, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_SHORT, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_SHORT, H5T_NATIVE_UINT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_SHORT, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_SHORT, H5T_NATIVE_ULONG);
+#endif
+
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_USHORT, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_USHORT, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_USHORT, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_USHORT, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_USHORT, H5T_NATIVE_UINT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_USHORT, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_USHORT, H5T_NATIVE_ULONG);
+#endif
+
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_INT, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_INT, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_INT, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_INT, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_INT, H5T_NATIVE_UINT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_INT, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_INT, H5T_NATIVE_ULONG);
+#endif
+
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UINT, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UINT, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UINT, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UINT, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UINT, H5T_NATIVE_INT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UINT, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_UINT, H5T_NATIVE_ULONG);
+#endif
+
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_LONG, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_LONG, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_LONG, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_LONG, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_LONG, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_LONG, H5T_NATIVE_UINT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_LONG, H5T_NATIVE_ULONG);
+#endif
+
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_ULONG, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_ULONG, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_ULONG, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_ULONG, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_ULONG, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_ULONG, H5T_NATIVE_UINT);
+ nerrors += test_conv_int_1("hw", H5T_NATIVE_ULONG, H5T_NATIVE_LONG);
+#endif
+
+ /* Test hardware floating-point conversion functions */
nerrors += test_conv_flt_1("hw", H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1("hw", H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT);
- /* Test software conversion functions */
- H5Tunregister(H5T_conv_float_double);
- H5Tunregister(H5T_conv_double_float);
+ /*----------------------------------------------------------------------
+ * Software tests follow
+ *----------------------------------------------------------------------
+ */
+ without_hardware_g = TRUE;
+ reset_hdf5();
+
+ /* Test software integer conversion functions */
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_CHAR, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_CHAR, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_CHAR, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_CHAR, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_CHAR, H5T_NATIVE_UINT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_CHAR, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_CHAR, H5T_NATIVE_ULONG);
+#endif
+
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UCHAR, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UCHAR, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UCHAR, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UCHAR, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UCHAR, H5T_NATIVE_UINT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UCHAR, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UCHAR, H5T_NATIVE_ULONG);
+#endif
+
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_SHORT, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_SHORT, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_SHORT, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_SHORT, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_SHORT, H5T_NATIVE_UINT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_SHORT, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_SHORT, H5T_NATIVE_ULONG);
+#endif
+
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_USHORT, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_USHORT, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_USHORT, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_USHORT, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_USHORT, H5T_NATIVE_UINT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_USHORT, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_USHORT, H5T_NATIVE_ULONG);
+#endif
+
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_INT, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_INT, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_INT, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_INT, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_INT, H5T_NATIVE_UINT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_INT, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_INT, H5T_NATIVE_ULONG);
+#endif
+
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UINT, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UINT, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UINT, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UINT, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UINT, H5T_NATIVE_INT);
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UINT, H5T_NATIVE_LONG);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_UINT, H5T_NATIVE_ULONG);
+#endif
+
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_LONG, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_LONG, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_LONG, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_LONG, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_LONG, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_LONG, H5T_NATIVE_UINT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_LONG, H5T_NATIVE_ULONG);
+#endif
+
+#if SIZEOF_INT != SIZEOF_LONG
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_ULONG, H5T_NATIVE_CHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_ULONG, H5T_NATIVE_UCHAR);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_ULONG, H5T_NATIVE_SHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_ULONG, H5T_NATIVE_USHORT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_ULONG, H5T_NATIVE_INT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_ULONG, H5T_NATIVE_UINT);
+ nerrors += test_conv_int_1("sw", H5T_NATIVE_ULONG, H5T_NATIVE_LONG);
+#endif
+
+ /* Test software floating-point conversion functions */
nerrors += test_conv_flt_1("sw", H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE);
nerrors += test_conv_flt_1("sw", H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT);
#ifdef USE_LDOUBLE
diff --git a/test/gheap.c b/test/gheap.c
index d4d4633..9218c3a 100644
--- a/test/gheap.c
+++ b/test/gheap.c
@@ -86,8 +86,8 @@ test_1 (void)
{
H5F_t *f;
H5HG_t obj[1024];
- uint8 out[1024];
- uint8 in[1024];
+ uint8_t out[1024];
+ uint8_t in[1024];
int i;
size_t size;
herr_t status;
@@ -169,8 +169,8 @@ test_2 (void)
{
H5F_t *f;
H5HG_t obj[1024];
- uint8 out[1024];
- uint8 in[1024];
+ uint8_t out[1024];
+ uint8_t in[1024];
int i;
size_t size;
herr_t status;
@@ -247,7 +247,7 @@ test_3 (void)
{
H5F_t *f;
H5HG_t obj[1024];
- uint8 out[1024];
+ uint8_t out[1024];
int i;
size_t size;
herr_t status;
@@ -316,7 +316,7 @@ test_4 (void)
{
H5F_t *f;
H5HG_t obj[1024];
- uint8 out[1024];
+ uint8_t out[1024];
int i;
size_t size;
herr_t status;
diff --git a/test/hyperslab.c b/test/hyperslab.c
index b645dfd..6fdfaa5 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -43,10 +43,10 @@
*-------------------------------------------------------------------------
*/
static uintn
-init_full(uint8 *array, size_t nx, size_t ny, size_t nz)
+init_full(uint8_t *array, size_t nx, size_t ny, size_t nz)
{
size_t i, j, k;
- uint8 acc = 128;
+ uint8_t acc = 128;
uintn total = 0;
for (i=0; i<nx; i++) {
@@ -75,7 +75,7 @@ init_full(uint8 *array, size_t nx, size_t ny, size_t nz)
*-------------------------------------------------------------------------
*/
static void
-print_array(uint8 *array, size_t nx, size_t ny, size_t nz)
+print_array(uint8_t *array, size_t nx, size_t ny, size_t nz)
{
size_t i, j, k;
@@ -118,9 +118,9 @@ print_array(uint8 *array, size_t nx, size_t ny, size_t nz)
static void
print_ref(size_t nx, size_t ny, size_t nz)
{
- uint8 *array;
+ uint8_t *array;
- array = H5MM_calloc(nx*ny*nz*sizeof(uint8));
+ array = H5MM_calloc(nx*ny*nz*sizeof(uint8_t));
printf("Reference array:\n");
init_full(array, nx, ny, nz);
@@ -148,7 +148,7 @@ test_fill(size_t nx, size_t ny, size_t nz,
size_t di, size_t dj, size_t dk,
size_t ddx, size_t ddy, size_t ddz)
{
- uint8 *dst = NULL; /*destination array */
+ uint8_t *dst = NULL; /*destination array */
hsize_t hs_size[3]; /*hyperslab size */
hsize_t dst_size[3]; /*destination total size */
hssize_t dst_offset[3]; /*offset of hyperslab in dest */
@@ -312,8 +312,8 @@ test_copy(int mode,
size_t di, size_t dj, size_t dk,
size_t ddx, size_t ddy, size_t ddz)
{
- uint8 *src = NULL; /*source array */
- uint8 *dst = NULL; /*destination array */
+ uint8_t *src = NULL; /*source array */
+ uint8_t *dst = NULL; /*destination array */
hsize_t hs_size[3]; /*hyperslab size */
hsize_t dst_size[3]; /*destination total size */
hsize_t src_size[3]; /*source total size */
@@ -650,13 +650,13 @@ test_multifill(size_t nx)
printf(" fill={%d,%g,%d}\n ",
fill.left, fill.mid, fill.right);
for (j = 0; j < sizeof(fill); j++) {
- printf(" %02x", ((uint8 *) &fill)[j]);
+ printf(" %02x", ((uint8_t *) &fill)[j]);
}
printf("\n dst[%lu]={%d,%g,%d}\n ",
(unsigned long)i,
dst[i].left, dst[i].mid, dst[i].right);
for (j = 0; j < sizeof(dst[i]); j++) {
- printf(" %02x", ((uint8 *) (dst + i))[j]);
+ printf(" %02x", ((uint8_t *) (dst + i))[j]);
}
printf("\n");
}
@@ -696,8 +696,8 @@ test_multifill(size_t nx)
static herr_t
test_endian(size_t nx)
{
- uint8 *src = NULL; /*source array */
- uint8 *dst = NULL; /*destination array */
+ uint8_t *src = NULL; /*source array */
+ uint8_t *dst = NULL; /*destination array */
hssize_t src_stride[2]; /*source strides */
hssize_t dst_stride[2]; /*destination strides */
hsize_t size[2]; /*size vector */
@@ -880,9 +880,9 @@ test_transpose(size_t nx, size_t ny)
static herr_t
test_sub_super(size_t nx, size_t ny)
{
- uint8 *full = NULL; /*original image */
- uint8 *half = NULL; /*image at 1/2 resolution */
- uint8 *twice = NULL; /*2x2 pixels */
+ uint8_t *full = NULL; /*original image */
+ uint8_t *half = NULL; /*image at 1/2 resolution */
+ uint8_t *twice = NULL; /*2x2 pixels */
hssize_t src_stride[4]; /*source stride info */
hssize_t dst_stride[4]; /*destination stride info */
hsize_t size[4]; /*number of sample points */
@@ -910,7 +910,7 @@ test_sub_super(size_t nx, size_t ny)
dst_stride[1] = 1;
/* Copy */
- H5V_stride_copy(2, (hsize_t)sizeof(uint8), size,
+ H5V_stride_copy(2, (hsize_t)sizeof(uint8_t), size,
dst_stride, half, src_stride, full);
/* Check */
@@ -956,12 +956,12 @@ test_sub_super(size_t nx, size_t ny)
src_stride[2] = 0;
src_stride[3] = 0;
dst_stride[0] = (ssize_t)(2 * ny);
- dst_stride[1] = (ssize_t)(2 * sizeof(uint8) - 4 * ny);
- dst_stride[2] = (ssize_t)(2 * ny - 2 * sizeof(uint8));
- dst_stride[3] = sizeof(uint8);
+ dst_stride[1] = (ssize_t)(2 * sizeof(uint8_t) - 4 * ny);
+ dst_stride[2] = (ssize_t)(2 * ny - 2 * sizeof(uint8_t));
+ dst_stride[3] = sizeof(uint8_t);
/* Copy */
- H5V_stride_copy(4, (hsize_t)sizeof(uint8), size,
+ H5V_stride_copy(4, (hsize_t)sizeof(uint8_t), size,
dst_stride, twice, src_stride, half);
/* Check */
diff --git a/test/istore.c b/test/istore.c
index 6f73d82..da458a4 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -59,7 +59,7 @@ hssize_t zero[H5O_LAYOUT_NDIMS];
*-------------------------------------------------------------------------
*/
static void
-print_array(uint8 *array, size_t nx, size_t ny, size_t nz)
+print_array(uint8_t *array, size_t nx, size_t ny, size_t nz)
{
size_t i, j, k;
@@ -210,7 +210,7 @@ test_extend(H5F_t *f, const char *prefix,
H5G_entry_t handle;
hsize_t i, j, k, ctr;
int ndims;
- uint8 *buf = NULL, *check = NULL, *whole = NULL;
+ uint8_t *buf = NULL, *check = NULL, *whole = NULL;
char dims[64], s[256], name[256];
hssize_t offset[3];
hssize_t max_corner[3];
@@ -441,7 +441,7 @@ test_sparse(H5F_t *f, const char *prefix, size_t nblocks,
hsize_t size[3], total = 0;
H5G_entry_t handle;
H5O_layout_t layout;
- uint8 *buf = NULL;
+ uint8_t *buf = NULL;
if (!nz) {
if (!ny) {
@@ -617,8 +617,8 @@ main(int argc, char *argv[])
/* Create the test file */
if (NULL == (f = H5F_open(FILENAME,
- (H5F_ACC_CREAT | H5F_ACC_RDWR | H5F_ACC_TRUNC |
- H5F_ACC_DEBUG),
+ (H5F_ACC_CREAT | H5F_ACC_RDWR | H5F_ACC_TRUNC |
+ H5F_ACC_DEBUG),
creation_template, NULL))) {
printf("Cannot create file %s; test aborted\n", FILENAME);
exit(1);
diff --git a/test/tmeta.c b/test/tmeta.c
index 601964e..ade015a 100644
--- a/test/tmeta.c
+++ b/test/tmeta.c
@@ -34,21 +34,21 @@ static char RcsId[] = "$Revision$";
#define TEST_INT32_VALUE -981236
#define TEST_UINT32_VALUE 3476589
-uint8 compar_buffer[] =
+uint8_t compar_buffer[] =
{
/* Little-endian encoded version of the 16-bit signed integer */
- (uint8) ((TEST_INT16_VALUE) & 0xff), (uint8) ((TEST_INT16_VALUE >> 8) & 0xff),
+ (uint8_t) ((TEST_INT16_VALUE) & 0xff), (uint8_t) ((TEST_INT16_VALUE >> 8) & 0xff),
/* Little-endian encoded version of the 16-bit unsigned integer */
- (uint8) ((TEST_UINT16_VALUE) & 0xff), (uint8) ((TEST_UINT16_VALUE >> 8) & 0xff),
+ (uint8_t) ((TEST_UINT16_VALUE) & 0xff), (uint8_t) ((TEST_UINT16_VALUE >> 8) & 0xff),
/* Little-endian encoded version of the 32-bit signed integer */
- (uint8) ((TEST_INT32_VALUE) & 0xff), (uint8) ((TEST_INT32_VALUE >> 8) & 0xff),
- (uint8) ((TEST_INT32_VALUE >> 16) & 0xff), (uint8) ((TEST_INT32_VALUE >> 24) & 0xff),
+ (uint8_t) ((TEST_INT32_VALUE) & 0xff), (uint8_t) ((TEST_INT32_VALUE >> 8) & 0xff),
+ (uint8_t) ((TEST_INT32_VALUE >> 16) & 0xff), (uint8_t) ((TEST_INT32_VALUE >> 24) & 0xff),
/* Little-endian encoded version of the 32-bit unsigned integer */
- (uint8) ((TEST_UINT32_VALUE) & 0xff), (uint8) ((TEST_UINT32_VALUE >> 8) & 0xff),
- (uint8) ((TEST_UINT32_VALUE >> 16) & 0xff), (uint8) ((TEST_UINT32_VALUE >> 24) & 0xff),
+ (uint8_t) ((TEST_UINT32_VALUE) & 0xff), (uint8_t) ((TEST_UINT32_VALUE >> 8) & 0xff),
+ (uint8_t) ((TEST_UINT32_VALUE >> 16) & 0xff), (uint8_t) ((TEST_UINT32_VALUE >> 24) & 0xff),
};
-uint8 encode_buffer[sizeof(compar_buffer)];
+uint8_t encode_buffer[sizeof(compar_buffer)];
/****************************************************************
**
@@ -58,15 +58,15 @@ uint8 encode_buffer[sizeof(compar_buffer)];
void
test_metadata(void)
{
- int16 ei16 = TEST_INT16_VALUE; /* variables to hold the values to encode */
- uint16 eu16 = TEST_UINT16_VALUE;
- int32 ei32 = TEST_INT32_VALUE;
- uint32 eu32 = TEST_UINT32_VALUE;
- int16 di16; /* variables to hold the decoded values */
- uint16 du16;
- int32 di32;
- uint32 du32;
- uint8 *p; /* pointer into the buffer being en/de-coded */
+ int16_t ei16 = TEST_INT16_VALUE; /* variables to hold the values to encode */
+ uint16_t eu16 = TEST_UINT16_VALUE;
+ int32_t ei32 = TEST_INT32_VALUE;
+ uint32_t eu32 = TEST_UINT32_VALUE;
+ int16_t di16; /* variables to hold the decoded values */
+ uint16_t du16;
+ int32_t di32;
+ uint32_t du32;
+ uint8_t *p; /* pointer into the buffer being en/de-coded */
/* Output message about test being performed */
MESSAGE(5, ("Testing Metadata encode/decode code\n"));
diff --git a/test/trefer.c b/test/trefer.c
index c72b5d8..dd7618b 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -62,7 +62,7 @@ test_reference_obj(void)
hobj_ref_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf; /* temp. buffer read from disk */
- uint32 *tu32; /* Temporary pointer to uint32 data */
+ uint32_t *tu32; /* Temporary pointer to uint32 data */
intn i; /* counting variables */
herr_t ret; /* Generic return value */
@@ -94,7 +94,7 @@ test_reference_obj(void)
dataset=H5Dcreate(fid1,"Dataset1",H5T_STD_U32LE,sid1,H5P_DEFAULT);
CHECK(dataset, FAIL, "H5Dcreate");
- for(tu32=(uint32 *)wbuf,i=0; i<SPACE1_DIM1; i++)
+ for(tu32=(uint32_t *)wbuf,i=0; i<SPACE1_DIM1; i++)
*tu32++=i*3;
/* Write selection to disk */
@@ -170,8 +170,8 @@ test_reference_obj(void)
ret=H5Dread(dset2,H5T_STD_U32LE,H5S_ALL,H5S_ALL,H5P_DEFAULT,tbuf);
CHECK(ret, FAIL, "H5Dread");
- for(tu32=(uint32 *)tbuf,i=0; i<SPACE1_DIM1; i++,tu32++)
- VERIFY(*tu32, (uint32)(i*3), "Data");
+ for(tu32=(uint32_t *)tbuf,i=0; i<SPACE1_DIM1; i++,tu32++)
+ VERIFY(*tu32, (uint32_t)(i*3), "Data");
/* Close dereferenced Dataset */
ret = H5Dclose(dset2);
@@ -215,9 +215,9 @@ test_reference_region(void)
hssize_t coord1[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
hdset_reg_ref_t *wbuf, /* buffer to write to disk */
*rbuf; /* buffer read from disk */
- uint8 *dwbuf, /* Buffer for writing numeric data to disk */
+ uint8_t *dwbuf, /* Buffer for writing numeric data to disk */
*drbuf; /* Buffer for reading numeric data from disk */
- uint8 *tu8; /* Temporary pointer to uint8 data */
+ uint8_t *tu8; /* Temporary pointer to uint8 data */
intn i; /* counting variables */
herr_t ret; /* Generic return value */
@@ -227,8 +227,8 @@ test_reference_region(void)
/* Allocate write & read buffers */
wbuf=malloc(sizeof(hdset_reg_ref_t)*SPACE1_DIM1);
rbuf=malloc(sizeof(hdset_reg_ref_t)*SPACE1_DIM1);
- dwbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
- drbuf=calloc(sizeof(uint8),SPACE2_DIM1*SPACE2_DIM2);
+ dwbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
+ drbuf=calloc(sizeof(uint8_t),SPACE2_DIM1*SPACE2_DIM2);
/* Create file */
fid1 = H5Fcreate(FILE, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/test/tselect.c b/test/tselect.c
index 651cb41..a538518 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -81,7 +81,7 @@ test_select_hyper(void)
hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
- uint8 *wbuf, /* buffer to write to disk */
+ uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@@ -93,13 +93,13 @@ test_select_hyper(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
- rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
+ wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
+ rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
- *tbuf++=(uint8)((i*SPACE2_DIM2)+j);
+ *tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -211,7 +211,7 @@ test_select_point(void)
hssize_t coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
hssize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
hssize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
- uint8 *wbuf, /* buffer to write to disk */
+ uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@@ -222,13 +222,13 @@ test_select_point(void)
MESSAGE(5, ("Testing Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
- rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
+ wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
+ rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
- *tbuf++=(uint8)((i*SPACE2_DIM2)+j);
+ *tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -352,7 +352,7 @@ test_select_all(void)
hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
- uint8 *wbuf, /* buffer to write to disk */
+ uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@@ -364,13 +364,13 @@ test_select_all(void)
MESSAGE(5, ("Testing 'All' Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
- rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
+ wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
+ rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
- *tbuf++=(uint8)((i*SPACE2_DIM2)+j);
+ *tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -492,7 +492,7 @@ test_select_combo(void)
hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
- uint8 *wbuf, /* buffer to write to disk */
+ uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@@ -503,13 +503,13 @@ test_select_combo(void)
MESSAGE(5, ("Testing Combination of Hyperslab & Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
- rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
+ wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
+ rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
- *tbuf++=(uint8)((i*SPACE2_DIM2)+j);
+ *tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -633,7 +633,7 @@ test_select_hyper_stride(void)
hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
- uint16 *wbuf, /* buffer to write to disk */
+ uint16_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@@ -668,13 +668,13 @@ test_select_hyper_stride(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf=malloc(sizeof(uint16)*SPACE2_DIM1*SPACE2_DIM2);
- rbuf=calloc(sizeof(uint16),SPACE3_DIM1*SPACE3_DIM2);
+ wbuf=malloc(sizeof(uint16_t)*SPACE2_DIM1*SPACE2_DIM2);
+ rbuf=calloc(sizeof(uint16_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
- *tbuf++=(uint16)((i*SPACE2_DIM2)+j);
+ *tbuf++=(uint16_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -787,7 +787,7 @@ test_select_hyper_copy(void)
hsize_t stride[SPACE1_RANK]; /* Stride of hyperslab */
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
- uint16 *wbuf, /* buffer to write to disk */
+ uint16_t *wbuf, /* buffer to write to disk */
*rbuf, /* 1st buffer read from disk */
*rbuf2, /* 2nd buffer read from disk */
*tbuf; /* temporary buffer pointer */
@@ -798,14 +798,14 @@ test_select_hyper_copy(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf=malloc(sizeof(uint16)*SPACE2_DIM1*SPACE2_DIM2);
- rbuf=calloc(sizeof(uint16),SPACE3_DIM1*SPACE3_DIM2);
- rbuf2=calloc(sizeof(uint16),SPACE3_DIM1*SPACE3_DIM2);
+ wbuf=malloc(sizeof(uint16_t)*SPACE2_DIM1*SPACE2_DIM2);
+ rbuf=calloc(sizeof(uint16_t),SPACE3_DIM1*SPACE3_DIM2);
+ rbuf2=calloc(sizeof(uint16_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
- *tbuf++=(uint16)((i*SPACE2_DIM2)+j);
+ *tbuf++=(uint16_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -886,7 +886,7 @@ test_select_hyper_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if(HDmemcmp(rbuf,rbuf2,sizeof(uint16)*SPACE3_DIM1*SPACE3_DIM2)) {
+ if(HDmemcmp(rbuf,rbuf2,sizeof(uint16_t)*SPACE3_DIM1*SPACE3_DIM2)) {
printf("hyperslab values don't match!\n");
} /* end if */
@@ -938,7 +938,7 @@ test_select_point_copy(void)
hssize_t coord1[POINT1_NPOINTS][SPACE1_RANK]; /* Coordinates for point selection */
hssize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
hssize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
- uint16 *wbuf, /* buffer to write to disk */
+ uint16_t *wbuf, /* buffer to write to disk */
*rbuf, /* 1st buffer read from disk */
*rbuf2, /* 2nd buffer read from disk */
*tbuf; /* temporary buffer pointer */
@@ -949,14 +949,14 @@ test_select_point_copy(void)
MESSAGE(5, ("Testing Hyperslabs with Strides Functionality\n"));
/* Allocate write & read buffers */
- wbuf=malloc(sizeof(uint16)*SPACE2_DIM1*SPACE2_DIM2);
- rbuf=calloc(sizeof(uint16),SPACE3_DIM1*SPACE3_DIM2);
- rbuf2=calloc(sizeof(uint16),SPACE3_DIM1*SPACE3_DIM2);
+ wbuf=malloc(sizeof(uint16_t)*SPACE2_DIM1*SPACE2_DIM2);
+ rbuf=calloc(sizeof(uint16_t),SPACE3_DIM1*SPACE3_DIM2);
+ rbuf2=calloc(sizeof(uint16_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
- *tbuf++=(uint16)((i*SPACE2_DIM2)+j);
+ *tbuf++=(uint16_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1055,7 +1055,7 @@ test_select_point_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if(HDmemcmp(rbuf,rbuf2,sizeof(uint16)*SPACE3_DIM1*SPACE3_DIM2)) {
+ if(HDmemcmp(rbuf,rbuf2,sizeof(uint16_t)*SPACE3_DIM1*SPACE3_DIM2)) {
printf("hyperslab values don't match!\n");
} /* end if */
@@ -1110,7 +1110,7 @@ test_select_hyper_offset(void)
hsize_t count[SPACE1_RANK]; /* Element count of hyperslab */
hsize_t block[SPACE1_RANK]; /* Block size of hyperslab */
hssize_t offset[SPACE1_RANK]; /* Offset of selection */
- uint8 *wbuf, /* buffer to write to disk */
+ uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@@ -1123,13 +1123,13 @@ test_select_hyper_offset(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with Offsets\n"));
/* Allocate write & read buffers */
- wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
- rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
+ wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
+ rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
- *tbuf++=(uint8)((i*SPACE2_DIM2)+j);
+ *tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1270,7 +1270,7 @@ test_select_point_offset(void)
hssize_t coord2[POINT1_NPOINTS][SPACE2_RANK]; /* Coordinates for point selection */
hssize_t coord3[POINT1_NPOINTS][SPACE3_RANK]; /* Coordinates for point selection */
hssize_t offset[SPACE1_RANK]; /* Offset of selection */
- uint8 *wbuf, /* buffer to write to disk */
+ uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@@ -1282,13 +1282,13 @@ test_select_point_offset(void)
MESSAGE(5, ("Testing Element Selection Functions\n"));
/* Allocate write & read buffers */
- wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
- rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
+ wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
+ rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
- *tbuf++=(uint8)((i*SPACE2_DIM2)+j);
+ *tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -1448,7 +1448,7 @@ test_select_hyper_union(void)
{10,10,10,10,10,10,10,10, /* First eight rows are 10 long */
20,20, /* Next two rows are 20 long */
15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15}; /* Next eighteen rows are 15 long */
- uint8 *wbuf, /* buffer to write to disk */
+ uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@@ -1460,13 +1460,13 @@ test_select_hyper_union(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf=malloc(sizeof(uint8)*SPACE2_DIM1*SPACE2_DIM2);
- rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
+ wbuf=malloc(sizeof(uint8_t)*SPACE2_DIM1*SPACE2_DIM2);
+ rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE2_DIM1; i++)
for(j=0; j<SPACE2_DIM2; j++)
- *tbuf++=(uint8)((i*SPACE2_DIM2)+j);
+ *tbuf++=(uint8_t)((i*SPACE2_DIM2)+j);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
@@ -2011,7 +2011,7 @@ test_select_hyper_union_3d(void)
{7,4,2,8},
{7,5,2,8},
{7,6,2,8}};
- uint8 *wbuf, /* buffer to write to disk */
+ uint8_t *wbuf, /* buffer to write to disk */
*rbuf, /* buffer read from disk */
*tbuf, /* temporary buffer pointer */
*tbuf2; /* temporary buffer pointer */
@@ -2023,14 +2023,14 @@ test_select_hyper_union_3d(void)
MESSAGE(5, ("Testing Hyperslab Selection Functions with unions of 3-D hyperslabs\n"));
/* Allocate write & read buffers */
- wbuf=malloc(sizeof(uint8)*SPACE4_DIM1*SPACE4_DIM2*SPACE4_DIM3);
- rbuf=calloc(sizeof(uint8),SPACE3_DIM1*SPACE3_DIM2);
+ wbuf=malloc(sizeof(uint8_t)*SPACE4_DIM1*SPACE4_DIM2*SPACE4_DIM3);
+ rbuf=calloc(sizeof(uint8_t),SPACE3_DIM1*SPACE3_DIM2);
/* Initialize write buffer */
for(i=0, tbuf=wbuf; i<SPACE4_DIM1; i++)
for(j=0; j<SPACE4_DIM2; j++)
for(k=0; k<SPACE4_DIM3; k++)
- *tbuf++=(uint8)((((i*SPACE4_DIM2)+j)*SPACE4_DIM3)+k);
+ *tbuf++=(uint8_t)((((i*SPACE4_DIM2)+j)*SPACE4_DIM3)+k);
/* Create file */
fid1 = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
diff --git a/tools/h5debug.c b/tools/h5debug.c
index fdf21d9..54c9d38 100644
--- a/tools/h5debug.c
+++ b/tools/h5debug.c
@@ -48,13 +48,13 @@
int
main(int argc, char *argv[])
{
- hid_t fid, plist=H5P_DEFAULT;
- H5F_t *f;
- haddr_t addr;
- uint8 sig[16];
- intn i, ndims;
- herr_t status = SUCCEED;
- haddr_t extra;
+ hid_t fid, plist=H5P_DEFAULT;
+ H5F_t *f;
+ haddr_t addr;
+ uint8_t sig[16];
+ intn i, ndims;
+ herr_t status = SUCCEED;
+ haddr_t extra;
/*
* Open the file and get the file descriptor.
@@ -90,7 +90,7 @@ main(int argc, char *argv[])
printf("Reading signature at address ");
H5F_addr_print(stdout, &addr);
printf(" (rel)\n");
- if (H5F_block_read(f, &addr, (hsize_t)sizeof(sig), H5D_XFER_DFLT, sig) < 0) {
+ if (H5F_block_read(f, &addr, (hsize_t)sizeof(sig), H5D_XFER_DFLT, sig)<0) {
fprintf(stderr, "cannot read signature\n");
HDexit(3);
}
@@ -137,7 +137,8 @@ main(int argc, char *argv[])
break;
default:
- fprintf(stderr, "Unknown B-tree subtype %u\n", (unsigned) (subtype));
+ fprintf(stderr, "Unknown B-tree subtype %u\n",
+ (unsigned)(subtype));
HDexit(4);
}
diff --git a/tools/h5tools.c b/tools/h5tools.c
index ec91f34..b7a7e75 100644
--- a/tools/h5tools.c
+++ b/tools/h5tools.c
@@ -257,7 +257,7 @@ h5dump_sprint(char *s/*out*/, const h5dump_t *info, hid_t type, void *vp)
strcpy(fmt, "%");
strcat(fmt, PRINTF_LL_WIDTH);
strcat(fmt, "d");
- sprintf(temp, fmt, *((int64*)vp));
+ sprintf(temp, fmt, *((int64_t*)vp));
}
} else if (H5Tequal(type, H5T_NATIVE_HSIZE)) {
@@ -270,7 +270,7 @@ h5dump_sprint(char *s/*out*/, const h5dump_t *info, hid_t type, void *vp)
strcpy(fmt, "%");
strcat(fmt, PRINTF_LL_WIDTH);
strcat(fmt, "u");
- sprintf(temp, fmt, *((uint64*)vp));
+ sprintf(temp, fmt, *((uint64_t*)vp));
}
} else if (H5T_COMPOUND==H5Tget_class(type)) {