Skip to content

Commit 66e2dbc

Browse files
committed
Remove global-var/function macros
Reviewed-by: Tim Hudson <[email protected]> Reviewed-by: Paul Dale <[email protected]> (Merged from openssl#9284)
1 parent b66a481 commit 66e2dbc

File tree

4 files changed

+0
-39
lines changed

4 files changed

+0
-39
lines changed

include/openssl/e_os2.h

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -163,29 +163,6 @@ extern "C" {
163163
# define OPENSSL_EXTERN extern
164164
# endif
165165

166-
/*-
167-
* Macros to allow global variables to be reached through function calls when
168-
* required (if a shared library version requires it, for example.
169-
* The way it's done allows definitions like this:
170-
*
171-
* // in foobar.c
172-
* OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
173-
* // in foobar.h
174-
* OPENSSL_DECLARE_GLOBAL(int,foobar);
175-
* #define foobar OPENSSL_GLOBAL_REF(foobar)
176-
*/
177-
# ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION
178-
# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \
179-
type *_shadow_##name(void) \
180-
{ static type _hide_##name=value; return &_hide_##name; }
181-
# define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)
182-
# define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))
183-
# else
184-
# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) type _shadow_##name=value;
185-
# define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name
186-
# define OPENSSL_GLOBAL_REF(name) _shadow_##name
187-
# endif
188-
189166
# ifdef _WIN32
190167
# ifdef _WIN64
191168
# define ossl_ssize_t __int64

util/libcrypto.num

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,8 +2052,6 @@ ENGINE_unregister_RSA 2033 3_0_0 EXIST::FUNCTION:ENGINE
20522052
EC_GROUP_order_bits 2034 3_0_0 EXIST::FUNCTION:EC
20532053
d2i_CMS_bio 2035 3_0_0 EXIST::FUNCTION:CMS
20542054
OPENSSL_sk_num 2036 3_0_0 EXIST::FUNCTION:
2055-
_shadow_DES_check_key 2037 3_0_0 NOEXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:DES
2056-
_shadow_DES_check_key 2037 3_0_0 NOEXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:DES
20572055
CMS_RecipientInfo_set0_pkey 2038 3_0_0 EXIST::FUNCTION:CMS
20582056
X509_STORE_CTX_set_default 2039 3_0_0 EXIST::FUNCTION:
20592057
AES_wrap_key 2040 3_0_0 EXIST::FUNCTION:

util/missingmacro.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ CRYPTO_get_dynlock_destroy_callback
6363
OpenSSLDie
6464
OPENSSL_assert
6565
DSA_is_prime
66-
OPENSSL_GLOBAL_REF
6766
ECParameters_dup
6867
ENGINE_load_openssl
6968
ENGINE_load_dynamic

util/perl/OpenSSL/ParseC.pm

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -255,19 +255,6 @@ my @opensslchandlers = (
255255
# to this parser. All of these do replacements, anything else is
256256
# an error.
257257

258-
#####
259-
# Global variable stuff
260-
{ regexp => qr/OPENSSL_DECLARE_GLOBAL<<<\((.*),\s*(.*)\)>>>;/,
261-
massager => sub { return (<<"EOF");
262-
#ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION
263-
OPENSSL_EXPORT $1 _shadow_$2;
264-
#else
265-
$1 *_shadow_$2(void);
266-
#endif
267-
EOF
268-
},
269-
},
270-
271258
#####
272259
# Deprecated stuff, by OpenSSL release.
273260

0 commit comments

Comments
 (0)