[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Thu Apr 30 10:37:28 UTC 2015


The branch master has been updated
       via  a3ed492f58d1febb9e048fb6ab5b96983569bf3b (commit)
       via  fb456902758d1c9a36ebb1327e81e98e53c26df6 (commit)
      from  995101d6547c9bc88e10fc85cfa2cbc3a92ede93 (commit)


- Log -----------------------------------------------------------------
commit a3ed492f58d1febb9e048fb6ab5b96983569bf3b
Author: Matt Caswell <matt at openssl.org>
Date:   Thu Apr 30 09:43:11 2015 +0100

    Fix windows build
    
    The big apps cleanup broke the windows build. This commit
    fixes some miscellaneous issues so that it builds again.
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>

commit fb456902758d1c9a36ebb1327e81e98e53c26df6
Author: Matt Caswell <matt at openssl.org>
Date:   Thu Apr 30 09:40:55 2015 +0100

    Remove redundant includes from dtls1.h
    
    There were a set of includes in dtls1.h which are now redundant due to the
    libssl opaque work. This commit removes those includes, which also has the
    effect of resolving one issue preventing building on windows (i.e. the
    include of winsock.h)
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 apps/apps.c             |  6 +++---
 apps/opt.c              |  8 ++++----
 include/openssl/dtls1.h | 19 -------------------
 ssl/d1_lib.c            |  6 ++++++
 ssl/record/record.h     |  2 ++
 5 files changed, 15 insertions(+), 26 deletions(-)

diff --git a/apps/apps.c b/apps/apps.c
index a93151c..ff832bd 100644
--- a/apps/apps.c
+++ b/apps/apps.c
@@ -1837,7 +1837,7 @@ X509_NAME *parse_name(const char *cp, long chtype, int canmulti)
     n = X509_NAME_new();
     if (n == NULL)
         return NULL;
-    work = strdup(cp);
+    work = OPENSSL_strdup(cp);
     if (work == NULL)
         goto err;
 
@@ -1894,12 +1894,12 @@ X509_NAME *parse_name(const char *cp, long chtype, int canmulti)
             goto err;
     }
 
-    free(work);
+    OPENSSL_free(work);
     return n;
 
  err:
     X509_NAME_free(n);
-    free(work);
+    OPENSSL_free(work);
     return NULL;
 }
 
diff --git a/apps/opt.c b/apps/opt.c
index df2bea5..fbe4c4b 100644
--- a/apps/opt.c
+++ b/apps/opt.c
@@ -54,7 +54,7 @@
 #if !defined(OPENSSL_SYS_MSDOS)
 # include OPENSSL_UNISTD
 #endif
-#include <unistd.h>
+
 #include <stdlib.h>
 #include <errno.h>
 #include <ctype.h>
@@ -96,11 +96,11 @@ char *opt_progname(const char *argv0)
     /* Strip off trailing nonsense. */
     n = strlen(p);
     if (n > 4 &&
-        (strcmp(&p[n - 4], ".exe") == 0 || strcmp(&p[n - 4], ".EXE") == 0)
+        (strcmp(&p[n - 4], ".exe") == 0 || strcmp(&p[n - 4], ".EXE") == 0))
         n -= 4;
 #if defined(OPENSSL_SYS_NETWARE)
     if (n > 4 &&
-        (strcmp(&p[n - 4], ".nlm") == 0 || strcmp(&p[n - 4], ".NLM") == 0)
+        (strcmp(&p[n - 4], ".nlm") == 0 || strcmp(&p[n - 4], ".NLM") == 0))
         n -= 4;
 #endif
 
@@ -108,7 +108,7 @@ char *opt_progname(const char *argv0)
     if (n > sizeof prog - 1)
         n = sizeof prog - 1;
     for (q = prog, i = 0; i < n; i++, p++)
-        q++ = isupper(*p) ? tolower(*p) : *p;
+        *q++ = isupper(*p) ? tolower(*p) : *p;
     *q = '\0';
     return prog;
 }
diff --git a/include/openssl/dtls1.h b/include/openssl/dtls1.h
index 542ae04..f214296 100644
--- a/include/openssl/dtls1.h
+++ b/include/openssl/dtls1.h
@@ -60,25 +60,6 @@
 #ifndef HEADER_DTLS1_H
 # define HEADER_DTLS1_H
 
-# include <openssl/buffer.h>
-# include <openssl/pqueue.h>
-# ifdef OPENSSL_SYS_VMS
-#  include <resource.h>
-#  include <sys/timeb.h>
-# endif
-# ifdef OPENSSL_SYS_WIN32
-/* Needed for struct timeval */
-#  include <winsock.h>
-# elif defined(OPENSSL_SYS_NETWARE) && !defined(_WINSOCK2API_)
-#  include <sys/timeval.h>
-# else
-#  if defined(OPENSSL_SYS_VXWORKS)
-#   include <sys/times.h>
-#  else
-#   include <sys/time.h>
-#  endif
-# endif
-
 #ifdef  __cplusplus
 extern "C" {
 #endif
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index a1d2032..6946b32 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -64,6 +64,12 @@
 
 #if defined(OPENSSL_SYS_VMS)
 # include <sys/timeb.h>
+#elif defined(OPENSSL_SYS_NETWARE) && !defined(_WINSOCK2API_)
+# include <sys/timeval.h>
+#elif defined(OPENSSL_SYS_VXWORKS)
+# include <sys/times.h>
+#elif !defined(OPENSSL_SYS_WIN32)
+# include <sys/time.h>
 #endif
 
 static void get_current_time(struct timeval *t);
diff --git a/ssl/record/record.h b/ssl/record/record.h
index 29c74d7..6bccb71 100644
--- a/ssl/record/record.h
+++ b/ssl/record/record.h
@@ -109,6 +109,8 @@
  *
  */
 
+#include <openssl/pqueue.h>
+
 /*****************************************************************************
  *                                                                           *
  * These structures should be considered PRIVATE to the record layer. No     *


More information about the openssl-commits mailing list