summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-11-16 19:08:14 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-11-16 19:08:14 (GMT)
commit4b2dbd56519082544a101a54b43b17376d82fc5c (patch)
treeff0dc4040d69c8525f3f3e73c0e7dab30b331280
parentd78a1e0f04e18f0b9a3e352d1d386f7b17c85bc8 (diff)
downloadhdf5-4b2dbd56519082544a101a54b43b17376d82fc5c.zip
hdf5-4b2dbd56519082544a101a54b43b17376d82fc5c.tar.gz
hdf5-4b2dbd56519082544a101a54b43b17376d82fc5c.tar.bz2
[svn-r1832] * 1999-11-16
** configure.in ** configure [REGENERATED] ** src/H5private.h ** src/H5public.h ** src/Makefile.in Generates an H5pubconf.h file which is just like H5config.h except all the preprocessor symbols have `H5_' prepended. This was done so that the configuration results can be used in public header files without polluting the namespace. ** src/H5.c Added H5I_REFERENCE and H5I_VFL to the API tracing code so their names are printed instead of just numbers. ** src/H5FDstdio.c ** tools/h5import.c ** tools/h5repart.c ** tools/pdb2hdf.c Changed to use the `H5_' versions of configure results since these files include only the public API. ** test/big.c Removed a compiler warning. ** test/h5test.c Removed unused code.
-rw-r--r--configure.in13
-rw-r--r--src/H5.c6
-rw-r--r--src/H5FDstdio.c2
-rw-r--r--src/H5private.h3
-rw-r--r--src/H5public.h63
-rw-r--r--src/Makefile.in5
-rw-r--r--test/big.c2
-rw-r--r--test/h5test.c105
-rw-r--r--tools/h5import.c6
-rw-r--r--tools/h5repart.c6
-rw-r--r--tools/pdb2hdf.c2
11 files changed, 47 insertions, 166 deletions
diff --git a/configure.in b/configure.in
index 3a48062..0fe4391 100644
--- a/configure.in
+++ b/configure.in
@@ -9,6 +9,19 @@ dnl
AC_REVISION($Id$)
AC_INIT(src/H5.c)
AC_CONFIG_HEADER(src/H5config.h)
+AC_OUTPUT_COMMANDS([
+ echo "creating src/H5pubconf.h"
+ sed 's/#define /#define H5_/' <src/H5config.h |\
+ sed 's/#undef /#undef H5_/' >pubconf
+ if test ! -f src/H5pubconf.h; then
+ /bin/mv -f pubconf src/H5pubconf.h
+ elif (diff pubconf src/H5pubconf.h >/dev/null); then
+ /bin/rm -f pubconf
+ echo "src/H5pubconf.h is unchanged"
+ else
+ /bin/mv -f pubconf src/H5pubconf.h
+ fi
+])
AC_CONFIG_AUX_DIR(bin)
AC_CANONICAL_HOST
AC_SUBST(CPPFLAGS)
diff --git a/src/H5.c b/src/H5.c
index b77875c..e29bc2a 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -1709,6 +1709,12 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...)
fprintf(out, " (array)");
}
break;
+ case H5I_REFERENCE:
+ fprintf(out, "%ld (reference)", (long)obj);
+ break;
+ case H5I_VFL:
+ fprintf(out, "%ld (file driver)", (long)obj);
+ break;
default:
fprintf(out, "%ld", (long)obj);
fprintf (out, " (unknown class)");
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index fd9efa0..2122371 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
+#ifdef H5_HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef WIN32
diff --git a/src/H5private.h b/src/H5private.h
index d5985cb..0c43a91 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -12,7 +12,8 @@
*/
#ifndef _H5private_H
#define _H5private_H
-#include <H5public.h> /* Include Public Definitions */
+#include <H5public.h> /* Include Public Definitions */
+#include <H5config.h> /* Include all configuration info */
/*
* Include ANSI-C header files.
diff --git a/src/H5public.h b/src/H5public.h
index ceec110..2568cff 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -23,61 +23,26 @@ static char RcsId[] = "@(#)$Revision$";
#ifndef _H5public_H
#define _H5public_H
-/*
- * Undefine things that might get redefined in the H5config.h file if hdf5 is
- * being included by other packages that use autoconf. The problem is that
- * if the C preprocessor emits warning messages about redefinitions then
- * autoconf will become confused and think that the hdf5 header file doesn't
- * exist.
- */
-#undef SIZEOF_INT8_T
-#undef SIZEOF_INT_FAST8_T
-#undef SIZEOF_INT_LEAST8_T
-#undef SIZEOF_UINT8_T
-#undef SIZEOF_UINT_FAST8_T
-#undef SIZEOF_UINT_LEAST8_T
-
-#undef SIZEOF_INT16_T
-#undef SIZEOF_INT_FAST16_T
-#undef SIZEOF_INT_LEAST16_T
-#undef SIZEOF_UINT16_T
-#undef SIZEOF_UINT_FAST16_T
-#undef SIZEOF_UINT_LEAST16_T
-
-#undef SIZEOF_INT32_T
-#undef SIZEOF_INT_FAST32_T
-#undef SIZEOF_INT_LEAST32_T
-#undef SIZEOF_UINT32_T
-#undef SIZEOF_UINT_FAST32_T
-#undef SIZEOF_UINT_LEAST32_T
-
-#undef SIZEOF_INT64_T
-#undef SIZEOF_INT_FAST64_T
-#undef SIZEOF_INT_LEAST64_T
-#undef SIZEOF_UINT64_T
-#undef SIZEOF_UINT_FAST64_T
-#undef SIZEOF_UINT_LEAST64_T
-
/* Include files for public use... */
-#include <H5config.h> /*from configure */
+#include <H5pubconf.h> /*from configure */
#include <sys/types.h>
-#ifdef STDC_HEADERS
+#ifdef H5_STDC_HEADERS
# include <limits.h> /*for H5T_NATIVE_CHAR defn in H5Tpublic.h */
#endif
-#ifdef HAVE_STDINT_H
+#ifdef H5_HAVE_STDINT_H
# include <stdint.h> /*for C9x types */
#endif
-#ifdef HAVE_STDDEF_H
+#ifdef H5_HAVE_STDDEF_H
# include <stddef.h>
#endif
-#ifdef HAVE_PARALLEL
+#ifdef H5_HAVE_PARALLEL
# include <mpi.h>
#ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already*/
# include <mpio.h>
#endif
#endif
-#ifdef HAVE_GASS
+#ifdef H5_HAVE_GASS
#include "globus_common.h"
#include "globus_gass_file.h"
#endif
@@ -129,11 +94,11 @@ typedef int htri_t;
* sizes are enabled then use a 64-bit data type, otherwise use the size of
* memory objects.
*/
-#ifdef HAVE_LARGE_HSIZET
-# if SIZEOF_LONG_LONG>=8
+#ifdef H5_HAVE_LARGE_HSIZET
+# if H5_SIZEOF_LONG_LONG>=8
typedef unsigned long long hsize_t;
typedef signed long long hssize_t;
-# elif SIZEOF___INT64>=8
+# elif H5_SIZEOF___INT64>=8
typedef unsigned __int64 hsize_t;
typedef signed __int64 hssize_t;
# endif
@@ -145,19 +110,19 @@ typedef ssize_t hssize_t;
/*
* File addresses have there own types.
*/
-#if SIZEOF_UINT64_T>=8
+#if H5_SIZEOF_UINT64_T>=8
typedef uint64_t haddr_t;
# define HADDR_UNDEF ((haddr_t)(int64_t)(-1))
-#elif SIZEOF_INT>=8
+#elif H5_SIZEOF_INT>=8
typedef unsigned haddr_t;
# define HADDR_UNDEF ((haddr_t)(-1))
-#elif SIZEOF_LONG>=8
+#elif H5_SIZEOF_LONG>=8
typedef unsigned long haddr_t;
# define HADDR_UNDEF ((haddr_t)(long)(-1))
-#elif SIZEOF_LONG_LONG>=8
+#elif H5_SIZEOF_LONG_LONG>=8
typedef unsigned long long haddr_t;
# define HADDR_UNDEF ((haddr_t)(long long)(-1))
-#elif SIZEOF___INT64>=8
+#elif H5_SIZEOF___INT64>=8
typedef unsigned __int64 haddr_t;
# define HADDR_UNDEF ((haddr_t)(__int64)(-1))
#else
diff --git a/src/Makefile.in b/src/Makefile.in
index 82ef99d..20bd313 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -38,7 +38,7 @@ PUB_HDR=H5public.h H5Apublic.h H5ACpublic.h H5Bpublic.h H5Dpublic.h \
H5Epublic.h H5Fpublic.h H5FDpublic.h H5FDfamily.h H5FDgass.h H5FDmpio.h \
H5FDsec2.h H5FDcore.h H5FDmulti.h H5FDstdio.h H5Gpublic.h H5HGpublic.h \
H5HLpublic.h H5Ipublic.h H5MMpublic.h H5Opublic.h H5Ppublic.h H5Rpublic.h \
- H5RApublic.h H5Spublic.h H5Tpublic.h H5Zpublic.h H5config.h hdf5.h \
+ H5RApublic.h H5Spublic.h H5Tpublic.h H5Zpublic.h H5pubconf.h hdf5.h \
H5api_adpt.h
## Other header files (not to be installed)...
@@ -46,7 +46,8 @@ PRIVATE_HDR=H5private.h H5Aprivate.h H5Apkg.h H5ACprivate.h H5Bprivate.h \
H5Dprivate.h H5Eprivate.h H5Fprivate.h H5FDprivate.h H5Gprivate.h \
H5Gpkg.h H5HGprivate.h H5HLprivate.h H5Iprivate.h H5MFprivate.h \
H5MMprivate.h H5Oprivate.h H5Pprivate.h H5Rprivate.h H5RAprivate.h \
- H5Sprivate.h H5Tprivate.h H5TBprivate.h H5Tpkg.h H5Vprivate.h H5Zprivate.h
+ H5Sprivate.h H5Tprivate.h H5TBprivate.h H5Tpkg.h H5Vprivate.h \
+ H5Zprivate.h H5config.h
## Number format detection
H5Tinit.c: H5detect
diff --git a/test/big.c b/test/big.c
index 53046d9..985e1de 100644
--- a/test/big.c
+++ b/test/big.c
@@ -21,7 +21,7 @@ const char *FILENAME[] = {
#if SIZEOF_LONG_LONG >= 8
# define GB8LL ((unsigned long_long)8*1024*1024*1024)
#else
-# define GB8LL ((unsigned long_long)0) /*cannot do the test*/
+# define GB8LL 0 /*cannot do the test*/
#endif
diff --git a/test/h5test.c b/test/h5test.c
index 84dbec3..13ea124 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -353,110 +353,5 @@ h5_fileaccess(void)
void
h5_no_hwconv(void)
{
-#if 1
H5Tunregister(H5T_PERS_HARD, NULL, -1, -1, NULL);
-#else
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_uchar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_short);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_ushort);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_int);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_uint);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_long);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_ulong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_llong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_schar_ullong);
-
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_schar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_short);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_ushort);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_int);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_uint);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_long);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_ulong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_llong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uchar_ullong);
-
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_schar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_uchar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_ushort);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_int);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_uint);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_long);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_ulong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_llong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_short_ullong);
-
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_schar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_uchar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_short);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_int);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_uint);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_long);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_ulong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_llong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ushort_ullong);
-
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_schar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_uchar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_short);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_ushort);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_uint);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_long);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_ulong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_llong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_int_ullong);
-
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_schar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_uchar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_short);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_ushort);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_int);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_long);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_ulong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_llong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_uint_ullong);
-
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_schar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_uchar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_short);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_ushort);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_int);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_uint);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_ulong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_llong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_long_ullong);
-
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_schar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_uchar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_short);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_ushort);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_int);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_uint);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_long);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_llong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ulong_ullong);
-
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_schar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_uchar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_short);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_ushort);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_int);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_uint);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_long);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_ulong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_llong_ullong);
-
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_schar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_uchar);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_short);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_ushort);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_int);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_uint);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_long);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_ulong);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_ullong_llong);
-
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_float_double);
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T_conv_double_float);
-#endif
}
diff --git a/tools/h5import.c b/tools/h5import.c
index 9b485c1..53fae0b 100644
--- a/tools/h5import.c
+++ b/tools/h5import.c
@@ -10,19 +10,19 @@
/* See H5private.h for how to include system headers */
#include <hdf5.h>
-#ifdef STDC_HEADERS
+#ifdef H5_STDC_HEADERS
# include <fcntl.h>
# include <string.h>
# include <stdlib.h>
# include <stdio.h>
#endif
-#ifdef HAVE_UNISTD_H
+#ifdef H5_HAVE_UNISTD_H
# include <sys/types.h>
# include <unistd.h>
#endif
-#ifdef HAVE_SYS_STAT_H
+#ifdef H5_HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
diff --git a/tools/h5repart.c b/tools/h5repart.c
index 077ca73..6704f38 100644
--- a/tools/h5repart.c
+++ b/tools/h5repart.c
@@ -14,7 +14,7 @@
/* See H5private.h for how to include system headers */
#include <hdf5.h>
-#ifdef STDC_HEADERS
+#ifdef H5_STDC_HEADERS
# include <ctype.h>
# include <errno.h>
# include <fcntl.h>
@@ -23,12 +23,12 @@
# include <string.h>
#endif
-#ifdef HAVE_UNISTD_H
+#ifdef H5_HAVE_UNISTD_H
# include <sys/types.h>
# include <unistd.h>
#endif
-#ifdef HAVE_SYS_STAT_H
+#ifdef H5_HAVE_SYS_STAT_H
# include <sys/stat.h>
#endif
diff --git a/tools/pdb2hdf.c b/tools/pdb2hdf.c
index a28f5b7..fd16202 100644
--- a/tools/pdb2hdf.c
+++ b/tools/pdb2hdf.c
@@ -21,7 +21,7 @@
* their documented names, so we have #define's to translate them to Silo
* terminology.
*/
-#ifdef HAVE_LIBSILO
+#ifdef H5_HAVE_LIBSILO
# define PD_open lite_PD_open
# define PD_close lite_PD_close
# define PD_ls lite_PD_ls