Remove global-var/function macros
authorRich Salz <rsalz@akamai.com>
Mon, 1 Jul 2019 18:54:53 +0000 (14:54 -0400)
committerRich Salz <rsalz@akamai.com>
Mon, 1 Jul 2019 23:42:12 +0000 (19:42 -0400)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9284)

include/openssl/e_os2.h
util/libcrypto.num
util/missingmacro.txt
util/perl/OpenSSL/ParseC.pm

index 250b3e2..b1a99f3 100644 (file)
@@ -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
index 9d95dab..7d77513 100644 (file)
@@ -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:
index ef429c6..db4ce86 100644 (file)
@@ -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
index 59b08e8..8e5b8b2 100644 (file)
@@ -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.