summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-06-22 19:21:55 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-06-22 19:21:55 (GMT)
commit37b14fd3ed8aae8f3b83df03ca29f82178c25f8f (patch)
tree8bcc201f228db1b9260570822f39699063bc7e37 /src/H5private.h
parentfb27787c2abb889a2184bb39eead626a144117d0 (diff)
downloadhdf5-37b14fd3ed8aae8f3b83df03ca29f82178c25f8f.zip
hdf5-37b14fd3ed8aae8f3b83df03ca29f82178c25f8f.tar.gz
hdf5-37b14fd3ed8aae8f3b83df03ca29f82178c25f8f.tar.bz2
[svn-r27270] 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 64-bit linux VM
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