Remove global-var/function macros
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/9284)
This commit is contained in:
parent
b66a481888
commit
66e2dbc01c
4 changed files with 0 additions and 39 deletions
|
@ -163,29 +163,6 @@ extern "C" {
|
|||
# define OPENSSL_EXTERN extern
|
||||
# endif
|
||||
|
||||
/*-
|
||||
* Macros to allow global variables to be reached through function calls when
|
||||
* required (if a shared library version requires it, for example.
|
||||
* The way it's done allows definitions like this:
|
||||
*
|
||||
* // in foobar.c
|
||||
* OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
|
||||
* // in foobar.h
|
||||
* OPENSSL_DECLARE_GLOBAL(int,foobar);
|
||||
* #define foobar OPENSSL_GLOBAL_REF(foobar)
|
||||
*/
|
||||
# ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION
|
||||
# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \
|
||||
type *_shadow_##name(void) \
|
||||
{ static type _hide_##name=value; return &_hide_##name; }
|
||||
# define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)
|
||||
# define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))
|
||||
# else
|
||||
# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) type _shadow_##name=value;
|
||||
# define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name
|
||||
# define OPENSSL_GLOBAL_REF(name) _shadow_##name
|
||||
# endif
|
||||
|
||||
# ifdef _WIN32
|
||||
# ifdef _WIN64
|
||||
# define ossl_ssize_t __int64
|
||||
|
|
|
@ -2052,8 +2052,6 @@ ENGINE_unregister_RSA 2033 3_0_0 EXIST::FUNCTION:ENGINE
|
|||
EC_GROUP_order_bits 2034 3_0_0 EXIST::FUNCTION:EC
|
||||
d2i_CMS_bio 2035 3_0_0 EXIST::FUNCTION:CMS
|
||||
OPENSSL_sk_num 2036 3_0_0 EXIST::FUNCTION:
|
||||
_shadow_DES_check_key 2037 3_0_0 NOEXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:DES
|
||||
_shadow_DES_check_key 2037 3_0_0 NOEXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:DES
|
||||
CMS_RecipientInfo_set0_pkey 2038 3_0_0 EXIST::FUNCTION:CMS
|
||||
X509_STORE_CTX_set_default 2039 3_0_0 EXIST::FUNCTION:
|
||||
AES_wrap_key 2040 3_0_0 EXIST::FUNCTION:
|
||||
|
|
|
@ -63,7 +63,6 @@ CRYPTO_get_dynlock_destroy_callback
|
|||
OpenSSLDie
|
||||
OPENSSL_assert
|
||||
DSA_is_prime
|
||||
OPENSSL_GLOBAL_REF
|
||||
ECParameters_dup
|
||||
ENGINE_load_openssl
|
||||
ENGINE_load_dynamic
|
||||
|
|
|
@ -255,19 +255,6 @@ my @opensslchandlers = (
|
|||
# to this parser. All of these do replacements, anything else is
|
||||
# an error.
|
||||
|
||||
#####
|
||||
# Global variable stuff
|
||||
{ regexp => qr/OPENSSL_DECLARE_GLOBAL<<<\((.*),\s*(.*)\)>>>;/,
|
||||
massager => sub { return (<<"EOF");
|
||||
#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION
|
||||
OPENSSL_EXPORT $1 _shadow_$2;
|
||||
#else
|
||||
$1 *_shadow_$2(void);
|
||||
#endif
|
||||
EOF
|
||||
},
|
||||
},
|
||||
|
||||
#####
|
||||
# Deprecated stuff, by OpenSSL release.
|
||||
|
||||
|
|
Loading…
Reference in a new issue