added __cplusplus when determining inline availability

This commit is contained in:
hyunghwan.chung 2019-05-03 08:42:44 +00:00
parent d34f6b202a
commit b06059bf6e

View File

@ -769,8 +769,8 @@ typedef struct moo_t moo_t;
# define MOO_PRIVATE # define MOO_PRIVATE
#endif #endif
#if defined(__STDC_VERSION__) && (__STDC_VERSION__>=199901L) #if defined(__cplusplus) || (defined(__STDC_VERSION__) && (__STDC_VERSION__>=199901L))
/* C99 has inline */ /* C++/C99 has inline */
# define MOO_INLINE inline # define MOO_INLINE inline
# define MOO_HAVE_INLINE # define MOO_HAVE_INLINE
#elif defined(__GNUC__) && defined(__GNUC_GNU_INLINE__) #elif defined(__GNUC__) && defined(__GNUC_GNU_INLINE__)