[openssl-commits] [openssl] master update

Richard Levitte levitte at openssl.org
Wed Mar 16 17:17:15 UTC 2016


The branch master has been updated
       via  c521edc3a12042701b2dda93e6bb9855e351c929 (commit)
       via  685b6f293b4b29bf1ee5c7af19cf1348567828b4 (commit)
       via  8975fb62122250440e9bc00c6e985e3a708473bb (commit)
       via  f527b6e4652b0390b4b5de597af6f18f06c3de0e (commit)
      from  8a0333c979c5d122f7a8cef47b5292f5dca8c540 (commit)


- Log -----------------------------------------------------------------
commit c521edc3a12042701b2dda93e6bb9855e351c929
Author: Matt Caswell <matt at openssl.org>
Date:   Wed Mar 16 10:38:39 2016 +0000

    Some platforms provide getcontext() but it does not work
    
    Some platforms claim to be POSIX but their getcontext() implementation
    does not work. Therefore we update the ASYNC_is_capable() function to test
    for this.
    
    RT#4366
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>

commit 685b6f293b4b29bf1ee5c7af19cf1348567828b4
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed Mar 16 16:50:18 2016 +0100

    When building DLLs, hack the library name in the .def file
    
    util/mkdef.pl assumes it knows what the resulting library name will
    be.  Really, it shouldn't, but changing it will break classic native
    Windows builds, so we leave it for now and change the LIBRARY line
    externally when needed instead.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

commit 8975fb62122250440e9bc00c6e985e3a708473bb
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed Mar 16 15:32:44 2016 +0100

    DLL object files should not be built with /Zl"
    
    When building the DLLs, we depend on the correct default C RTL info.
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

commit f527b6e4652b0390b4b5de597af6f18f06c3de0e
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed Mar 16 14:58:17 2016 +0100

    Appveyor - make sure to actually build "shared" in the shared configuration
    
    Reviewed-by: Matt Caswell <matt at openssl.org>

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

Summary of changes:
 Configurations/10-main.conf          |  4 +++-
 Configurations/windows-makefile.tmpl |  8 ++++++-
 appveyor.yml                         |  8 ++++++-
 crypto/async/arch/async_posix.c      |  8 ++++++-
 test/asynctest.c                     | 45 +++++++++++-------------------------
 5 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
index f9c838c..e2fcf0c 100644
--- a/Configurations/10-main.conf
+++ b/Configurations/10-main.conf
@@ -1238,7 +1238,9 @@ sub vc_wince_info {
         cc               => "cl",
         cflags           => "-W3 -wd4090 -Gs0 -GF -Gy -nologo -DOPENSSL_SYS_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE",
         coutflag         => "/Fo",
-        lib_cflags       => "/Zl /Zi /Fdlib",
+        lib_cflags       => sub { join(" ",
+                                       ($disabled{shared} ? "/Zl" : ()),
+                                       "/Zi /Fdlib") },
         dso_cflags       => "/Zi",
         bin_cflags       => "/Zi /Fdapp",
         lflags           => add("/debug"),
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index cb1b4e6..7a6a58f 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -282,12 +282,18 @@ EOF
 			    rel2abs($config{builddir}));
      my $target = shlib_import($lib);
      return <<"EOF"
-$target: $deps $ordinalsfile
+$target: $deps $ordinalsfile $mkdef_pl
 	\$(PERL) $mkdef_pl "$mkdef_key" 32 > $shlib.def
+	\$(PERL) -i.tmp -pe "s|^LIBRARY\\s+${mkdef_key}32|LIBRARY $shlib|;" $shlib.def
+	DEL $shlib.def.tmp
 	\$(LD) \$(LDFLAGS) \$(LIB_LDFLAGS) \\
 		/implib:$target \$(LDOUTFLAG)$shlib$shlibext /def:$shlib.def @<<
 $objs$linklibs \$(EX_LIBS)
 <<
+	DEL /F apps\\$shlib$shlibext
+	DEL /F test\\$shlib$shlibext
+	COPY $shlib$shlibext apps
+	COPY $shlib$shlibext test
 EOF
  }
  sub obj2dso {
diff --git a/appveyor.yml b/appveyor.yml
index 6367c3d..7496a9b 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -19,9 +19,15 @@ before_build:
             $env:VCVARS_PLATFORM="amd64"
             $env:TARGET="VC-WIN64A"
         }
+    - ps: >-
+        If ($env:Configuration -Match "shared") {
+            $env:SHARED="shared"
+        } Else {
+            $env:SHARED=""
+        }
     - ps: $env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
     - call "%VSCOMNTOOLS%\..\..\VC\vcvarsall.bat" %VCVARS_PLATFORM%
-    - perl Configure %TARGET% no-asm
+    - perl Configure %TARGET% no-asm %SHARED%
 
 build_script:
     - nmake
diff --git a/crypto/async/arch/async_posix.c b/crypto/async/arch/async_posix.c
index 2d9e510..33f2a3f 100644
--- a/crypto/async/arch/async_posix.c
+++ b/crypto/async/arch/async_posix.c
@@ -62,7 +62,13 @@
 
 int ASYNC_is_capable(void)
 {
-    return 1;
+    ucontext_t ctx;
+
+    /*
+     * Some platforms provide getcontext() but it does not work (notably
+     * MacOSX PPC64). Check for a working getcontext();
+     */
+    return getcontext(&ctx) == 0;
 }
 
 void async_local_cleanup(void)
diff --git a/test/asynctest.c b/test/asynctest.c
index 31f04e9..4694fda 100644
--- a/test/asynctest.c
+++ b/test/asynctest.c
@@ -61,21 +61,6 @@
 #include <openssl/crypto.h>
 #include <../apps/apps.h>
 
-#if (defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_CYGWIN)) && defined(OPENSSL_THREADS)
-# include <unistd.h>
-# if _POSIX_VERSION >= 200112L
-#  define ASYNC_POSIX
-# endif
-#elif defined(_WIN32)
-# define ASYNC_WIN
-#endif
-
-#if !defined(ASYNC_POSIX) && !defined(ASYNC_WIN)
-# define ASYNC_NULL
-#endif
-
-#ifndef ASYNC_NULL
-
 static int ctr = 0;
 static ASYNC_JOB *currjob = NULL;
 
@@ -308,25 +293,23 @@ static int test_ASYNC_block_pause()
     return 1;
 }
 
-#endif
-
 int main(int argc, char **argv)
 {
-
-#ifdef ASYNC_NULL
-    fprintf(stderr, "NULL implementation - skipping async tests\n");
-#else
-    CRYPTO_set_mem_debug(1);
-    CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
-
-    if (       !test_ASYNC_init_thread()
-            || !test_ASYNC_start_job()
-            || !test_ASYNC_get_current_job()
-            || !test_ASYNC_WAIT_CTX_get_all_fds()
-            || !test_ASYNC_block_pause()) {
-        return 1;
+    if (!ASYNC_is_capable()) {
+        fprintf(stderr,
+                "OpenSSL build is not ASYNC capable - skipping async tests\n");
+    } else {
+        CRYPTO_set_mem_debug(1);
+        CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON);
+
+        if (       !test_ASYNC_init_thread()
+                || !test_ASYNC_start_job()
+                || !test_ASYNC_get_current_job()
+                || !test_ASYNC_WAIT_CTX_get_all_fds()
+                || !test_ASYNC_block_pause()) {
+            return 1;
+        }
     }
-#endif
     printf("PASS\n");
     return 0;
 }


More information about the openssl-commits mailing list