Add support for shared libraries with OS/2.
[oweals/openssl.git] / crypto / comp / c_zlib.c
index a78bf97177369e63d07dc61a7d6df640696eb15a..cd2f8a491b933154f17992eb2a17f2f07fb64517 100644 (file)
@@ -14,6 +14,7 @@ static COMP_METHOD zlib_method_nozlib={
        NULL,
        NULL,
        NULL,
+       NULL,
        };
 
 #ifndef ZLIB
@@ -38,6 +39,7 @@ static COMP_METHOD zlib_method={
        zlib_compress_block,
        zlib_expand_block,
        NULL,
+       NULL,
        };
 
 /* 
@@ -46,14 +48,14 @@ static COMP_METHOD zlib_method={
  * work.  Therefore, all ZLIB routines are loaded at run time
  * and we do not link to a .LIB file.
  */
-#if defined(WINDOWS) || defined(WIN32)
+#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
 # include <windows.h>
 
-# define Z_CALLCONV _stcall
+# define Z_CALLCONV _stdcall
 # define ZLIB_SHARED
 #else
 # define Z_CALLCONV
-#endif /* !(WINDOWS || WIN32) */
+#endif /* !(OPENSSL_SYS_WINDOWS || OPENSSL_SYS_WIN32) */
 
 #ifdef ZLIB_SHARED
 #include <openssl/dso.h>
@@ -67,11 +69,11 @@ static int stub_inflateInit_(z_streamp strm, const char * version,
        int stream_size);
 
 /* Function pointers */
-typedef int Z_CALLCONV (*compress_ft)(Bytef *dest,uLongf *destLen,
+typedef int (Z_CALLCONV *compress_ft)(Bytef *dest,uLongf *destLen,
        const Bytef *source, uLong sourceLen);
-typedef int Z_CALLCONV (*inflateEnd_ft)(z_streamp strm);
-typedef int Z_CALLCONV (*inflate_ft)(z_streamp strm, int flush);
-typedef int Z_CALLCONV (*inflateInit__ft)(z_streamp strm,
+typedef int (Z_CALLCONV *inflateEnd_ft)(z_streamp strm);
+typedef int (Z_CALLCONV *inflate_ft)(z_streamp strm, int flush);
+typedef int (Z_CALLCONV *inflateInit__ft)(z_streamp strm,
        const char * version, int stream_size);
 static compress_ft     p_compress=NULL;
 static inflateEnd_ft   p_inflateEnd=NULL;
@@ -186,7 +188,7 @@ COMP_METHOD *COMP_zlib(void)
 #ifdef ZLIB_SHARED
        if (!zlib_loaded)
                {
-#if defined(WINDOWS) || defined(WIN32)
+#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
                zlib_dso = DSO_load(NULL, "ZLIB", NULL, 0);
 #else
                zlib_dso = DSO_load(NULL, "z", NULL, 0);