As for inline vs. __inline. The original code implies that most compilers
authorAndy Polyakov <appro@openssl.org>
Mon, 30 Jul 2007 11:42:08 +0000 (11:42 +0000)
committerAndy Polyakov <appro@openssl.org>
Mon, 30 Jul 2007 11:42:08 +0000 (11:42 +0000)
understand inline, while WIN32 ones insist on __inline. Well, there are
other compilers that insist on __inline. At the same time it turned out
that most compilers understand both __inline and inline. I could find
only one that doesn't understand __inline, Sun C. In other words it seems
that __inline as preferred choice provides better coverage...

crypto/stack/safestack.h

index a2b028721770c4d7956f70bbb60ab37b007f5774..f24353b13137aadf360ed2780cf90dec4e3fb00a 100644 (file)
 #ifndef OPENSSL_ALLOW_FCAST
 
 #ifndef OPENSSL_INLINE
 #ifndef OPENSSL_ALLOW_FCAST
 
 #ifndef OPENSSL_INLINE
-#ifdef OPENSSL_SYSNAME_WIN32
-#define OPENSSL_INLINE __inline static
-#else
-#define OPENSSL_INLINE inline static
-#endif
+# if defined(__SUNPRO_C)
+#  if __SUNPRO_C>0x520
+#    define __inline inline
+#  else
+#    define __inline
+#  endif
+# endif
+# define OPENSSL_INLINE __inline static
 #endif
 
 #define STACK_OF(type) struct stack_st_##type
 #endif
 
 #define STACK_OF(type) struct stack_st_##type