summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5public.h3
-rw-r--r--src/H5vers.txt48
-rw-r--r--src/H5version.h44
-rwxr-xr-xsrc/Makefile.am29
-rw-r--r--src/Makefile.in9
5 files changed, 119 insertions, 14 deletions
diff --git a/src/H5public.h b/src/H5public.h
index a14a554..09b2d5c 100644
--- a/src/H5public.h
+++ b/src/H5public.h
@@ -30,6 +30,9 @@
*/
#include "H5pubconf.h" /*from configure */
+/* API Version macro wrapper definitions */
+#include "H5version.h"
+
#ifdef H5_HAVE_FEATURES_H
#include <features.h> /*for setting POSIX, BSD, etc. compatibility */
#endif
diff --git a/src/H5vers.txt b/src/H5vers.txt
new file mode 100644
index 0000000..0fd4c4c
--- /dev/null
+++ b/src/H5vers.txt
@@ -0,0 +1,48 @@
+# Copyright by The HDF Group.
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF5. The full HDF5 copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the files COPYING and Copyright.html. COPYING can be found at the root
+# of the source code distribution tree; Copyright.html can be found at the
+# root level of an installed copy of the electronic HDF5 document set and
+# is linked from the top-level documents page. It can also be found at
+# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+# access to either file, you may request a copy from help@hdfgroup.org.
+#
+
+# This file is used to generate the various headers that are needed for
+# versioning the public symbols for the library.
+#
+# The bin/make_vers script reads in this file and creates the appropriate files
+# in the src/ directory when the generated headers are out of date with respect
+# to this file.
+#
+# Blank lines and lines beginning with '#' are ignored
+#
+# The format of this file is as follows:
+# <type>, <base routine name>, <version introduced>, <list of revised versions>
+#
+# For example, the following sample input shows two functions with different
+# API versions for each. The example below shows H5Gfoo being added to the
+# library in the v1.0 branch and revised in the v1.4 and v1.8 branches (so
+# there should be three versioned names for the routine: H5Gfoo1, H5Gfoo2 and
+# H5Gfoo3). H5Gbar is shown as being added to the library in the v1.2 branch
+# (so the "base" version of the API name wouldn't appear if the library
+# was configured with the default API interface corresponding to v1.0) and
+# revised in the v1.6 branch (so there should be two versioned names for the
+# routine: H5Gbar1 and H5Gbar2).
+#
+# FUNCTION, H5Gfoo, v10, v14, v18
+# FUNCTION, H5Gbar, v12, v16
+#
+# Programmer: Quincey Koziol
+# Creation Date: 2007/07/10
+
+# API function names
+# (although not required, it's easier to compare this file with the headers
+# generated if the list below is in alphanumeric sort order - QAK)
+#FUNCTION, H5Gcreate, v10, v14, v18
+#FUNCTION, H5Gopen, v12, v18
+
diff --git a/src/H5version.h b/src/H5version.h
new file mode 100644
index 0000000..a74857b
--- /dev/null
+++ b/src/H5version.h
@@ -0,0 +1,44 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/* Generated automatically by bin/make_vers -- do not edit */
+/* Add new versioned symbols to H5vers.txt file */
+
+
+#ifndef _H5version_H
+#define _H5version_H
+
+/* Issue error if contradicting macros have been defined. */
+#if defined(H5_USE_16_API) && defined(H5_WITHOUT_DEPRECATED_APIS)
+#error "Can't choose old API versions when deprecated APIs are disabled"
+#endif /* defined(H5_USE_16_API) && defined(H5_WITHOUT_DEPRECATED_APIS) */
+
+/* If a particular "global" version of the library's interfaces is chosen,
+ * set the versions for the API routines affected.
+ *
+ * Note: If an application has already chosen a particular version for an
+ * API routine, the individual API version macro takes priority.
+ */
+#ifdef H5_USE_16_API
+#endif /* H5_USE_16_API */
+
+/* Choose the correct version of each API routine, defaulting to the latest
+ * version of each API routine. The "best" name for API parameters/data
+ * structures that have changed definitions is also set. An error is
+ * issued for specifying an invalid API version.
+ */
+
+#endif /* H5version_H */
+
diff --git a/src/Makefile.am b/src/Makefile.am
index 1e593d2..bef62b6 100755
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -89,29 +89,22 @@ libhdf5_la_SOURCES= H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
# Public headers
-include_HEADERS =H5public.h H5Apublic.h H5ACpublic.h \
- H5Cpublic.h H5Dpublic.h \
+include_HEADERS = hdf5.h H5api_adpt.h H5pubconf.h H5public.h H5version.h \
+ H5Apublic.h H5ACpublic.h \
+ H5Cpublic.h H5Dpublic.h \
H5Epubgen.h H5Epublic.h H5Fpublic.h H5FDpublic.h H5FDcore.h H5FDdirect.h \
H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h H5FDmpiposix.h \
H5FDmulti.h H5FDsec2.h H5FDstdio.h H5FDstream.h \
H5Gpublic.h H5Ipublic.h H5Lpublic.h \
H5MMpublic.h H5Opublic.h H5Ppublic.h H5Rpublic.h H5Spublic.h \
- H5Tpublic.h H5Zpublic.h H5pubconf.h hdf5.h H5api_adpt.h
+ H5Tpublic.h H5Zpublic.h
# install libhdf5.settings in lib directory
settingsdir=$(libdir)
settings_DATA=libhdf5.settings
-# Error header generation
-#
-# Actually, H5Einit.h, H5Eterm.h, H5Edefin.h and H5Epubgen.h all
-# depend on H5err.txt, but the perl script generates them all, so just
-# list one here.
-$(top_srcdir)/src/H5Edefin.h: $(top_srcdir)/src/H5err.txt
- perl $(top_srcdir)/bin/make_err $>
-
# Number format detection
-# The LD_LIBRARY_PATH setting is a klutch.
+# The LD_LIBRARY_PATH setting is a kludge.
# Things should have been all set during H5detect making.
# Remove the generated .c file if errors occur unless HDF5_Make_Ignore
# is set to ignore the error.
@@ -122,6 +115,18 @@ H5Tinit.c: H5detect$(EXEEXT)
(test $$HDF5_Make_Ignore && echo "*** Error ignored") || \
($(RM) $@ ; exit 1)
+# Error header generation
+#
+# Actually, H5Einit.h, H5Eterm.h, H5Edefin.h and H5Epubgen.h all
+# depend on H5err.txt, but the perl script generates them all, so just
+# list one here.
+$(top_srcdir)/src/H5Edefin.h: $(top_srcdir)/src/H5err.txt
+ perl $(top_srcdir)/bin/make_err $?
+
+# API version macro generation
+$(top_srcdir)/src/H5version.h: $(top_srcdir)/src/H5vers.txt
+ perl $(top_srcdir)/bin/make_vers $?
+
# Add TRACE macros to library source files. This is done via the trace script
# in the hdf5/bin directory. If the file contains HDF5 API macros, a "clean"
# version of the source file is saved with a tilde (~) after its name and
diff --git a/src/Makefile.in b/src/Makefile.in
index bf9074f..c6284b6 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -442,7 +442,7 @@ libhdf5_la_SOURCES = H5.c H5checksum.c H5dbg.c H5system.c H5timer.c H5trace.c \
# Public headers
-include_HEADERS = H5public.h H5Apublic.h H5ACpublic.h \
+include_HEADERS = H5public.h H5version.h H5Apublic.h H5ACpublic.h \
H5Cpublic.h H5Dpublic.h \
H5Epubgen.h H5Epublic.h H5Fpublic.h H5FDpublic.h H5FDcore.h H5FDdirect.h \
H5FDfamily.h H5FDlog.h H5FDmpi.h H5FDmpio.h H5FDmpiposix.h \
@@ -1062,13 +1062,18 @@ help:
# http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
# access to either file, you may request a copy from help@hdfgroup.org.
+# API version macro generation
+#
+$(top_srcdir)/src/H5version.h: $(top_srcdir)/src/H5vers.txt
+ perl $(top_srcdir)/bin/make_vers $?
+
# Error header generation
#
# Actually, H5Einit.h, H5Eterm.h, H5Edefin.h and H5Epubgen.h all
# depend on H5err.txt, but the perl script generates them all, so just
# list one here.
$(top_srcdir)/src/H5Edefin.h: $(top_srcdir)/src/H5err.txt
- perl $(top_srcdir)/bin/make_err $>
+ perl $(top_srcdir)/bin/make_err $?
# Number format detection
# The LD_LIBRARY_PATH setting is a klutch.