diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-09-12 12:05:05 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-09-12 12:05:05 (GMT) |
commit | 801f6a504c1092aa7abb12983ee56a783759ae68 (patch) | |
tree | 8f981a7ba69d4bf8adcac728dcfbde285dd9a688 /src/H5private.h | |
parent | e5fa6451ca4a36b9ae87ff8c59b81d66cad6157c (diff) | |
download | hdf5-801f6a504c1092aa7abb12983ee56a783759ae68.zip hdf5-801f6a504c1092aa7abb12983ee56a783759ae68.tar.gz hdf5-801f6a504c1092aa7abb12983ee56a783759ae68.tar.bz2 |
[svn-r27763] Merges from trunk:
- tools: 27238, 27252, 27267, 27656
- inline markup: 27278
- bin/bbrelease: 27280, 27283, 27624
- h5vers: 27475
- C++ Doxygen: 27494-6
- FUNC_ENTER macro bug: 27581
- H5is_library_threadsafe: 27587, 27601
- release_docs: 27597
- Autotools freshening: 27641, 27653, 27675, 27686, 27692, 27699, 27722
27731, 27734, 27752
- MANIFEST comments: 27642
Tested on: ostrich & koala
various combinations of --enable-threadsafe
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 42 |
1 files changed, 34 insertions, 8 deletions
diff --git a/src/H5private.h b/src/H5private.h index 3f8a76a..afc7bb2 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -190,11 +190,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 @@ -1777,9 +1788,24 @@ H5_DLL double H5_trace(const double *calltime, const char *func, const char *typ *------------------------------------------------------------------------- */ -/* `S' is the name of a function which is being tested to check if its */ -/* an API function */ -#define H5_IS_API(S) ('_'!=((const char *)S)[2] && '_'!=((const char *)S)[3] && (!((const char *)S)[4] || '_'!=((const char *)S)[4])) +/* `S' is the name of a function which is being tested to check if it's + * an API function. + * + * BADNESS: + * - Underscore at positions 2 or 3 (0-indexed string). Handles + * H5_ and H5X_. + * - Underscore at position 4 if position 3 is uppercase or a digit. + * Handles H5XY_. + */ +#define H5_IS_API(S) (\ + '_'!=((const char *)S)[2] /* underscore at position 2 */ \ + && '_'!=((const char *)S)[3] /* underscore at position 3 */ \ + && !( /* NOT */ \ + ((const char *)S)[4] /* pos 4 exists */ \ + && (HDisupper(S[3]) || HDisdigit(S[3])) /* pos 3 dig | uc */ \ + && '_'==((const char *)S)[4] /* pos 4 underscore */ \ + )\ +) /* `S' is the name of a function which is being tested to check if it's */ /* a public API function */ |