diff options
author | 2014-05-24 15:03:39 +0000 | |
---|---|---|
committer | 2014-05-24 15:03:39 +0000 | |
commit | 65af98848fc7a42e34d470d10fc1db8e23f9db93 (patch) | |
tree | eefece416318354295e68bf69084d7d5e2e736e8 /lib/libssl/src/crypto | |
parent | Move ssltest.c to a regress test. (diff) | |
download | wireguard-openbsd-65af98848fc7a42e34d470d10fc1db8e23f9db93.tar.xz wireguard-openbsd-65af98848fc7a42e34d470d10fc1db8e23f9db93.zip |
We have shared global variables - unifdef OPENSSL_EXPORT_VAR_AS_FUNCTION.
ok miod@ beck@
Diffstat (limited to 'lib/libssl/src/crypto')
-rw-r--r-- | lib/libssl/src/crypto/asn1/asn1.h | 22 | ||||
-rw-r--r-- | lib/libssl/src/crypto/asn1/asn1t.h | 47 |
2 files changed, 0 insertions, 69 deletions
diff --git a/lib/libssl/src/crypto/asn1/asn1.h b/lib/libssl/src/crypto/asn1/asn1.h index 5d2a7b44186..6543e5aafe3 100644 --- a/lib/libssl/src/crypto/asn1/asn1.h +++ b/lib/libssl/src/crypto/asn1/asn1.h @@ -386,7 +386,6 @@ TYPEDEF_D2I2D_OF(void); * */ -#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION /* ASN1_ITEM pointer exported type */ typedef const ASN1_ITEM ASN1_ITEM_EXP; @@ -402,27 +401,6 @@ typedef const ASN1_ITEM ASN1_ITEM_EXP; #define DECLARE_ASN1_ITEM(name) \ extern const ASN1_ITEM name##_it; -#else - -/* Platforms that can't easily handle shared global variables are declared - * as functions returning ASN1_ITEM pointers. - */ - -/* ASN1_ITEM pointer exported type */ -typedef const ASN1_ITEM * ASN1_ITEM_EXP(void); - -/* Macro to obtain ASN1_ITEM pointer from exported type */ -#define ASN1_ITEM_ptr(iptr) (iptr()) - -/* Macro to include ASN1_ITEM pointer from base type */ -#define ASN1_ITEM_ref(iptr) (iptr##_it) - -#define ASN1_ITEM_rptr(ref) (ref##_it()) - -#define DECLARE_ASN1_ITEM(name) \ - const ASN1_ITEM * name##_it(void); - -#endif /* Parameters used by ASN1_STRING_print_ex() */ diff --git a/lib/libssl/src/crypto/asn1/asn1t.h b/lib/libssl/src/crypto/asn1/asn1t.h index 1b9d4eb40c3..4acba08ee45 100644 --- a/lib/libssl/src/crypto/asn1/asn1t.h +++ b/lib/libssl/src/crypto/asn1/asn1t.h @@ -71,7 +71,6 @@ extern "C" { #endif -#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION /* Macro to obtain ASN1_ADB pointer from a type (only used internally) */ #define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr)) @@ -85,25 +84,6 @@ extern "C" { #define ASN1_ITEM_end(itname) \ }; -#else - -/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */ -#define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr())) - - -/* Macros for start and end of ASN1_ITEM definition */ - -#define ASN1_ITEM_start(itname) \ - const ASN1_ITEM * itname##_it(void) \ - { \ - static const ASN1_ITEM local_it = { - -#define ASN1_ITEM_end(itname) \ - }; \ - return &local_it; \ - } - -#endif /* Macros to aid ASN1 template writing */ @@ -314,13 +294,8 @@ extern "C" { /* Any defined by macros: the field used is in the table itself */ -#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION #define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) } #define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, (const ASN1_ITEM *)&(tblname##_adb) } -#else -#define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb } -#define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb } -#endif /* Plain simple type */ #define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type) @@ -393,7 +368,6 @@ extern "C" { #define ASN1_ADB(name) \ static const ASN1_ADB_TABLE name##_adbtbl[] -#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION #define ASN1_ADB_END(name, flags, field, app_table, def, none) \ ;\ @@ -407,27 +381,6 @@ extern "C" { none\ } -#else - -#define ASN1_ADB_END(name, flags, field, app_table, def, none) \ - ;\ - static const ASN1_ITEM *name##_adb(void) \ - { \ - static const ASN1_ADB internal_adb = \ - {\ - flags,\ - offsetof(name, field),\ - app_table,\ - name##_adbtbl,\ - sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\ - def,\ - none\ - }; \ - return (const ASN1_ITEM *) &internal_adb; \ - } \ - void dummy_function(void) - -#endif #define ADB_ENTRY(val, template) {val, template} |