make update
[openssl.git] / e_os2.h
diff --git a/e_os2.h b/e_os2.h
index 272faad..ea92ff5 100644 (file)
--- a/e_os2.h
+++ b/e_os2.h
@@ -136,9 +136,15 @@ extern "C" {
 # endif
 #endif
 
+/* --------------------------------- OS/2 ---------------------------------- */
+#if defined(__EMX__) || defined(__OS2__)
+# undef OPENSSL_SYS_UNIX
+# define OPENSSL_SYS_OS2
+#endif
+
 /* --------------------------------- Unix ---------------------------------- */
 #ifdef OPENSSL_SYS_UNIX
-# if defined(linux) || defined(OPENSSL_SYSNAME_LINUX)
+# if defined(linux) || defined(__linux__) || defined(OPENSSL_SYSNAME_LINUX)
 #  define OPENSSL_SYS_LINUX
 # endif
 # ifdef OPENSSL_SYSNAME_MPE
@@ -223,8 +229,8 @@ extern "C" {
        #define foobar OPENSSL_GLOBAL_REF(foobar)
 */
 #ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION
-# define OPENSSL_IMPLEMENT_GLOBAL(type,name) extern static type _hide_##name; \
-        type *_shadow_##name(void) { static type local_var; return &local_var; } \
+# define OPENSSL_IMPLEMENT_GLOBAL(type,name) static type _hide_##name; \
+        type *_shadow_##name(void) { return &_hide_##name; } \
         static type _hide_##name
 # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)
 # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))