summaryrefslogtreecommitdiffstats
path: root/config/cmake_ext_mod/HDFTests.c
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2015-10-22 16:23:01 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2015-10-22 16:23:01 (GMT)
commit779154925282f5240e792f9b2e5b242a91005abb (patch)
treecb0ffbc4e1fb999e65df191058df0d9bbaad5bfa /config/cmake_ext_mod/HDFTests.c
parent37ed7e8b5f3fc60a9816c84d1ed71c9ba50ade08 (diff)
downloadhdf5-779154925282f5240e792f9b2e5b242a91005abb.zip
hdf5-779154925282f5240e792f9b2e5b242a91005abb.tar.gz
hdf5-779154925282f5240e792f9b2e5b242a91005abb.tar.bz2
[svn-r28188] Fix inline/__inline__/__inline detection with CMake after autotools changes
Diffstat (limited to 'config/cmake_ext_mod/HDFTests.c')
-rw-r--r--config/cmake_ext_mod/HDFTests.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c
index 5c4d360..8478d1b 100644
--- a/config/cmake_ext_mod/HDFTests.c
+++ b/config/cmake_ext_mod/HDFTests.c
@@ -454,13 +454,19 @@ SIMPLE_TEST(struct text_info w; w.screenwidth=0);
#endif /* HAVE_TM_GMTOFF */
-
-#if defined( INLINE_TEST_inline ) || defined( INLINE_TEST___inline__ ) || defined( INLINE_TEST___inline )
+#if defined( HAVE_INLINE ) || defined( HAVE___INLINE__ ) || defined( HAVE___INLINE )
#ifndef __cplusplus
+#if defined( HAVE_INLINE )
+# define INLINE_KW inline
+#elif defined ( HAVE___INLINE__ )
+# define INLINE_KW __inline__
+#elif defined ( HAVE___INLINE )
+# define INLINE_KW __inline
+#endif /* HAVE_INLINE */
typedef int foo_t;
-static INLINE_TEST_INLINE foo_t static_foo () { return 0; }
-INLINE_TEST_INLINE foo_t foo () {return 0; }
-int main() { return 0; }
-#endif
+static INLINE_KW foo_t static_foo () { return 0; }
+INLINE_KW foo_t foo () {return 0; }
+int main(void) { return 0; }
+#endif /* __cplusplus */
+#endif /* defined( HAVE_INLINE ) || defined( HAVE___INLINE__ ) || defined( HAVE___INLINE ) */
-#endif /* INLINE_TEST */