1、inline is the keyword, in C++ and C99.
2、__inline is a vendor-specific(厂商特定) keyword (e.g. MSVC) for inline function in C, since C89 doesn't have it.
3、__inline__ is similar to __inline but is from another set of compilers.
4、__forceinline is another vendor-specific (mainly MSVC) keyword, which will apply more force to inline the function than the __inline hint (e.g. inline even if it result in worse code).
5、There's also __attribute__((always_inline)) in GCC and clang.

 
#if defined(__GNUC__) || defined(__clang__)
    #define forceinline __attribute__((always_inline))
#elif (defined(__GNUC__) && !defined(__clang__))
    #define inline inline
#elif defined(_MSC_VER)
    #define inline __inline
    #define forceinline __forceinline
#endif

note:
The difference between the two is that #ifdef can only use a single condition,

while #if defined(NAME) can do compound conditionals. 

#ifdef _MSC_VER /* MSVS.Net */
    #ifndef __cplusplus
        #define inline __inline
    #endif
#else
    /*others*/
#endif /* _MSC_VER */

#ifd defined(_MSC_VER) && !defined(__cplusplus)
    #define inline __inline
#elif defined()

#endif