summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-06-24 18:53:43 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-06-24 18:53:43 (GMT)
commite030fe2751803461fedc8fe223da57986fa2c36a (patch)
tree1a1fb11ed6ff093244e34c1bd37701bfd959d097 /src/H5private.h
parenta07297e90dc701d64b19b05a368aba765995d772 (diff)
downloadhdf5-e030fe2751803461fedc8fe223da57986fa2c36a.zip
hdf5-e030fe2751803461fedc8fe223da57986fa2c36a.tar.gz
hdf5-e030fe2751803461fedc8fe223da57986fa2c36a.tar.bz2
[svn-r27278] Merge of 27270 from trunk. Fixes HDFFV-9119 and HDFFV-9421.
Changes that allow the autotools to correctly deal with inline functions. - Inline markup schemes are now checked with AC_COMPILE_IFELSE tests instead of AC_C_INLINE. - The inline designator is now H5_INLINE instead of H5_inline. This is now set in H5private.h instead of H5pubconf.h. Tested on: h5committest
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/H5private.h b/src/H5private.h
index f7a4171..9efd145 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -183,11 +183,22 @@
#endif /*H5_HAVE_WIN32_API*/
-/* H5_inline */
-#ifndef H5_inline
-#define H5_inline
-#endif /* H5_inline */
-
+/* Various ways that inline functions can be declared */
+#if defined(H5_HAVE___INLINE__)
+ /* GNU (alternative form) */
+ #define H5_INLINE __inline__
+#elif defined(H5_HAVE___INLINE)
+ /* Visual Studio */
+ #define H5_INLINE __inline
+#elif defined(H5_HAVE_INLINE)
+ /* GNU, C++
+ * Use "inline" as a last resort on the off-chance that there will
+ * be C++ problems.
+ */
+ #define H5_INLINE inline
+#else
+ #define H5_INLINE
+#endif /* inline choices */
#ifndef F_OK
# define F_OK 00