Define INLINE based on the compiler.
MSVC doesn't recognize `__attribute__`.
This commit is contained in:
@@ -5,7 +5,13 @@
|
|||||||
#undef inline
|
#undef inline
|
||||||
|
|
||||||
/* How to obtain function inlining. */
|
/* How to obtain function inlining. */
|
||||||
#define INLINE __inline__ __attribute__((always_inline))
|
#if defined(__has_attribute)
|
||||||
|
#define INLINE __inline__ __attribute__((always_inline))
|
||||||
|
#elif defined(_MSC_VER)
|
||||||
|
#define INLINE __forceinline
|
||||||
|
#else
|
||||||
|
#define INLINE
|
||||||
|
#endif
|
||||||
|
|
||||||
/* How to obtain thread-local storage */
|
/* How to obtain thread-local storage */
|
||||||
#define THREAD_LOCAL __thread
|
#define THREAD_LOCAL __thread
|
||||||
|
|||||||
Reference in New Issue
Block a user