]> gitweb.factorcode.org Git - factor.git/commitdiff
openssl: use proper DLL names for Windows
authorBenjamin Pollack <benjamin@bitquabit.com>
Mon, 3 Apr 2023 17:11:23 +0000 (13:11 -0400)
committerBenjamin Pollack <benjamin@bitquabit.com>
Mon, 3 Apr 2023 17:11:23 +0000 (13:11 -0400)
The preferred DLL name for OpenSSL appears to have pivoted to be
"libssl-3-<platform>.dll" at some point, and likewise for libcrypto.
We need to look for them with the new name; otherwise, we end up
needing two separate copies of libcrypto with slightly different names
to avoid giving ourselves DLL hell.

basis/openssl/libcrypto/libcrypto.factor
basis/openssl/libssl/libssl.factor

index 876c4d64cc3579e371bdcb630996d3f847ace93a..166e7504e8aee6dc1c243eecd514297020f48b84 100644 (file)
@@ -1,12 +1,16 @@
 ! Copyright (C) 2007 Elie CHAFTARI, 2009 Maxim Savchenko
 ! See https://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.destructors alien.libraries
-alien.syntax classes.struct combinators system ;
+alien.syntax classes.struct combinators kernel sequences
+system ;
 
 IN: openssl.libcrypto
 
 << "libcrypto" {
-    { [ os windows? ] [ "libcrypto-37.dll" ] }
+    { [ os windows? ] [
+          cpu x86.64 = "x64" "x86" ?
+          "libcrypto-3-" ".dll" surround
+    ] }
     { [ os macosx? ] [ "libcrypto.35.dylib" ] }
     { [ os unix? ] [ "libcrypto.so" ] }
 } cond cdecl add-library >>
index 9597703c616054b167ed5d5b10a8453a386fc046..bd5109deb2efbf65ae5219f4ea982425b4ac2c29 100644 (file)
@@ -3,12 +3,15 @@
 ! See https://factorcode.org/license.txt for BSD license.
 USING: alien alien.c-types alien.destructors alien.libraries
 alien.libraries.finder alien.parser alien.syntax classes.struct
-combinators kernel literals namespaces openssl.libcrypto system
-words ;
+combinators kernel literals namespaces openssl.libcrypto
+sequences system words ;
 IN: openssl.libssl
 
 << "libssl" {
-    { [ os windows? ] [ "libssl-38.dll" ] }
+    { [ os windows? ] [
+          cpu x86.64 = "x64" "x86" ?
+          "libssl-3-" ".dll" surround
+    ] }
     { [ os macosx? ] [ "libssl.35.dylib" ] }
     { [ os unix? ] [ "libssl.so" ] }
 } cond cdecl add-library >>