summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2001-03-31 21:57:04 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2001-03-31 21:57:04 (GMT)
commit6801f8f4c6d8215f017fc12f6ce3e596755eccbe (patch)
tree64bf335e2d29b683923ed6a241ece8a61eb7fdfd /src/H5private.h
parent9ccb328997fd699004390efc9644fd6bcdade9d1 (diff)
downloadhdf5-6801f8f4c6d8215f017fc12f6ce3e596755eccbe.zip
hdf5-6801f8f4c6d8215f017fc12f6ce3e596755eccbe.tar.gz
hdf5-6801f8f4c6d8215f017fc12f6ce3e596755eccbe.tar.bz2
[svn-r3741] Purpose:
Improvment Description: H5config.h and H5pubconf.h are generated by configure. It does not have the #ifndef _H5config_H ... #endif guard to prevent duplicated definitions if it is included more than once. It is messy to try make configure to put in those guards. Solution: HDF5 has set an internal rule that H5public.h includes H5pubconf.h and H5private.h includes H5config.h. Source files should NOT include H5config.h or H5pubconf.h directly but include it via H5public.h or H5private.h respectively. The #ifndef ... #endif in the H5public.h and H5private.h would prevent repeated definitions from repeated include. Adjusted H5FDstream.c and H5FDstream.h to follow this rule. Platforms tested: modi4, eirene.
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h
index da63965..f4db86b 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -13,6 +13,14 @@
#ifndef _H5private_H
#define _H5private_H
#include <H5public.h> /* Include Public Definitions */
+/*
+ * Since H5config.h is a generated header file, it is messy to try
+ * to put a #ifndef _H5config_H ... #endif guard in it.
+ * HDF5 has set an internal rule that it is being included here.
+ * Source files should NOT include H5config.h directly but include
+ * it via H5private.h. The #ifndef _H5private_H guard above would
+ * prevent repeated include.
+ */
#include <H5config.h> /* Include all configuration info */
/* include the pthread library */