Make preprocessor logic more fail-safe.
[openssl.git] / crypto / stack / safestack.h
index 53c1695f2a5bed750a09009553dbf2a165a12247..5810bca1e9be77b01b87e19673937675113737a3 100644 (file)
 #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) && !defined(__inline)
+#  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
@@ -79,7 +82,7 @@ STACK_OF(type) \
 OPENSSL_INLINE STACK_OF(type) *sk_##type##_new( \
        int (*cmp)(const type * const *, const type *const *)) \
     { return (STACK_OF(type) *)sk_new((int (*)(const char * const *, const char * const *))cmp); } \
-OPENSSL_INLINE STACK_OF(type) *sk_##type##_new_null() \
+OPENSSL_INLINE STACK_OF(type) *sk_##type##_new_null(void) \
     { return (STACK_OF(type) *)sk_new_null(); } \
 OPENSSL_INLINE void sk_##type##_free(STACK_OF(type) *sk) \
     { sk_free((STACK *)sk); } \