Change Win32 to use EXPORT_VAR_AS_FN.
Fix OPENSSL_IMPLEMENT_GLOBAL. Allow Win32 to use EXPORT_VAR_AS_FN in mkdef.pl make update.
This commit is contained in:
parent
33ab4699ba
commit
4831e626aa
7 changed files with 41 additions and 23 deletions
12
CHANGES
12
CHANGES
|
@ -11,6 +11,18 @@
|
|||
*) applies to 0.9.6a (/0.9.6b) and 0.9.7
|
||||
+) applies to 0.9.7 only
|
||||
|
||||
|
||||
+) Windows apparently can't transparently handle global
|
||||
variables defined in DLLs. Initialisations such as:
|
||||
|
||||
const ASN1_ITEM *it = &ASN1_INTEGER_it;
|
||||
|
||||
wont compile. This is used by the any applications that need to
|
||||
delcare their own ASN1 modules. This was fixed by adding the option
|
||||
EXPORT_VAR_AS_FN to all Win32 platforms, although this isn't strictly
|
||||
needed for static libraries under Win32.
|
||||
[Steve Henson]
|
||||
|
||||
+) New functions X509_PURPOSE_set() and X509_TRUST_set() to handle
|
||||
setting of purpose and trust fields. New X509_STORE trust and
|
||||
purpose functions and tidy up setting in other SSL functions.
|
||||
|
|
|
@ -411,8 +411,8 @@ my %table=(
|
|||
|
||||
# Windows NT, Microsoft Visual C++ 4.0
|
||||
|
||||
"VC-NT","cl::::WINNT::BN_LLONG RC4_INDEX ${x86_gcc_opts}::::::::::win32",
|
||||
"VC-WIN32","cl::::WIN32::BN_LLONG RC4_INDEX ${x86_gcc_opts}::::::::::win32",
|
||||
"VC-NT","cl::::WINNT::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
|
||||
"VC-WIN32","cl::::WIN32::BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN ${x86_gcc_opts}::::::::::win32",
|
||||
"VC-WIN16","cl:::(unknown):WIN16::MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::",
|
||||
"VC-W31-16","cl:::(unknown):WIN16::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX SIXTEEN_BIT:::",
|
||||
"VC-W31-32","cl::::WIN16::BN_LLONG MD2_CHAR DES_UNROLL DES_PTR RC4_INDEX THIRTY_TWO_BIT:::",
|
||||
|
|
4
TABLE
4
TABLE
|
@ -467,7 +467,7 @@ $unistd =
|
|||
$thread_cflag =
|
||||
$sys_id = WINNT
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_INDEX RC4_INDEX MD2_INT
|
||||
$bn_ops = BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN RC4_INDEX MD2_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
|
@ -559,7 +559,7 @@ $unistd =
|
|||
$thread_cflag =
|
||||
$sys_id = WIN32
|
||||
$lflags =
|
||||
$bn_ops = BN_LLONG RC4_INDEX RC4_INDEX MD2_INT
|
||||
$bn_ops = BN_LLONG RC4_INDEX EXPORT_VAR_AS_FN RC4_INDEX MD2_INT
|
||||
$bn_obj =
|
||||
$des_obj =
|
||||
$bf_obj =
|
||||
|
|
|
@ -254,22 +254,23 @@ x509_ext.o: ../cryptlib.h x509_ext.c
|
|||
x509_lu.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x509_lu.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
x509_lu.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h
|
||||
x509_lu.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
|
||||
x509_lu.o: ../../include/openssl/des.h ../../include/openssl/dh.h
|
||||
x509_lu.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
|
||||
x509_lu.o: ../../include/openssl/err.h ../../include/openssl/evp.h
|
||||
x509_lu.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
|
||||
x509_lu.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
|
||||
x509_lu.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
|
||||
x509_lu.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
|
||||
x509_lu.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
|
||||
x509_lu.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
|
||||
x509_lu.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
|
||||
x509_lu.o: ../../include/openssl/rd_fst.h ../../include/openssl/rijndael.h
|
||||
x509_lu.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
|
||||
x509_lu.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
|
||||
x509_lu.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
|
||||
x509_lu.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
|
||||
x509_lu.o: ../../include/openssl/cast.h ../../include/openssl/conf.h
|
||||
x509_lu.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
|
||||
x509_lu.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
|
||||
x509_lu.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
|
||||
x509_lu.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
|
||||
x509_lu.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
|
||||
x509_lu.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
|
||||
x509_lu.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
|
||||
x509_lu.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
|
||||
x509_lu.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
|
||||
x509_lu.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
|
||||
x509_lu.o: ../../include/openssl/rc5.h ../../include/openssl/rd_fst.h
|
||||
x509_lu.o: ../../include/openssl/rijndael.h ../../include/openssl/ripemd.h
|
||||
x509_lu.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
|
||||
x509_lu.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
|
||||
x509_lu.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
|
||||
x509_lu.o: ../../include/openssl/x509_vfy.h ../../include/openssl/x509v3.h
|
||||
x509_lu.o: ../cryptlib.h x509_lu.c
|
||||
x509_obj.o: ../../e_os.h ../../include/openssl/asn1.h
|
||||
x509_obj.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
|
||||
|
|
4
e_os2.h
4
e_os2.h
|
@ -223,8 +223,8 @@ extern "C" {
|
|||
#define foobar OPENSSL_GLOBAL_REF(foobar)
|
||||
*/
|
||||
#ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION
|
||||
# define OPENSSL_IMPLEMENT_GLOBAL(type,name) extern static type _hide_##name; \
|
||||
type *_shadow_##name(void) { static type local_var; return &local_var; } \
|
||||
# define OPENSSL_IMPLEMENT_GLOBAL(type,name) static type _hide_##name; \
|
||||
type *_shadow_##name(void) { return &_hide_##name; } \
|
||||
static type _hide_##name
|
||||
# define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)
|
||||
# define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))
|
||||
|
|
|
@ -2516,3 +2516,8 @@ UI_add_info_string 2978 EXIST::FUNCTION:
|
|||
UI_get_result_minsize 2979 EXIST::FUNCTION:
|
||||
UI_new 2980 EXIST::FUNCTION:
|
||||
UI_method_set_reader 2981 EXIST::FUNCTION:
|
||||
X509_STORE_set_flags 2982 EXIST::FUNCTION:
|
||||
X509_PURPOSE_set 2983 EXIST::FUNCTION:
|
||||
X509_TRUST_set 2984 EXIST::FUNCTION:
|
||||
X509_STORE_set_purpose 2985 EXIST::FUNCTION:
|
||||
X509_STORE_set_trust 2986 EXIST::FUNCTION:
|
||||
|
|
|
@ -994,7 +994,7 @@ sub is_valid
|
|||
# EXPORT_VAR_AS_FUNCTION means that global variables
|
||||
# will be represented as functions. This currently
|
||||
# only happens on VMS-VAX.
|
||||
if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && $VMSVAX) {
|
||||
if ($keyword eq "EXPORT_VAR_AS_FUNCTION" && ($VMSVAX || $W32)) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue