Fix mingw warnings.
authorAndy Polyakov <appro@openssl.org>
Mon, 23 Oct 2006 07:41:05 +0000 (07:41 +0000)
committerAndy Polyakov <appro@openssl.org>
Mon, 23 Oct 2006 07:41:05 +0000 (07:41 +0000)
crypto/LPdir_win.c
crypto/dso/dso_win32.c
crypto/engine/eng_padlock.c
e_os.h

index 09b475beed17b121c2ffc11dfc87f57e943bf9e1..702dbc730f62ffcdcaf85c02c6e7b235b3913f69 100644 (file)
@@ -54,8 +54,6 @@ struct LP_dir_context_st
 
 const char *LP_find_file(LP_DIR_CTX **ctx, const char *directory)
 {
-  struct dirent *direntry = NULL;
-
   if (ctx == NULL || directory == NULL)
     {
       errno = EINVAL;
index d98a3e85f3921a51ce8c3086a1b0c96c2ab5b906..eea0b07c3c6bb23b8e84ab3e69caf3ded94a0584 100644 (file)
@@ -826,7 +826,7 @@ static void *win32_globallookup(const char *name)
                }
 
        do      {
-               if (ret = GetProcAddress(me32.hModule,name))
+               if ((ret = GetProcAddress(me32.hModule,name)))
                        {
                        (*close_snap)(hModuleSnap);
                        FreeLibrary(dll);
index e1d66eac58adcba26a55637eca8d343f89acc02d..3fbb51b585ee6f8720ba784cbb0a1a0340f173f1 100644 (file)
@@ -123,9 +123,11 @@ void ENGINE_load_padlock (void)
 #ifdef COMPILE_HW_PADLOCK
 /* We do these includes here to avoid header problems on platforms that
    do not have the VIA padlock anyway... */
-#ifdef _MSC_VER
+#ifdef _WIN32
 # include <malloc.h>
-# define alloca _alloca
+# ifndef alloca
+#  define alloca _alloca
+# endif
 #else
 # include <stdlib.h>
 #endif
diff --git a/e_os.h b/e_os.h
index b8a7e35d7e0e0182e21945ff7fc4b2e28aa1dce4..a969479ae99511d36c7283596846d3c8dcfba64d 100644 (file)
--- a/e_os.h
+++ b/e_os.h
@@ -452,7 +452,10 @@ static unsigned int _strlen31(const char *str)
 #      if defined(_WIN32_WCE) && _WIN32_WCE<410
 #        define getservbyname _masked_declaration_getservbyname
 #      endif
-#      include <winsock.h>
+#      if !defined(IPPROTO_IP)
+         /* winsock[2].h was included already? */
+#        include <winsock.h>
+#      endif
 #      ifdef getservbyname
 #        undef getservbyname
          /* this is used to be wcecompat/include/winsock_extras.h */