diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h index 04c707a08e2d2410ac4a78523b138576275e0732..0bc22d70645235664b072b2c7d06c7795200fe9f 100644 --- a/crypto/asn1/asn1.h +++ b/crypto/asn1/asn1.h @@ -69,6 +69,11 @@ #include +#ifdef OPENSSL_BUILD_SHLIBCRYPTO +# undef OPENSSL_EXTERN +# define OPENSSL_EXTERN OPENSSL_EXPORT +#endif + #ifdef __cplusplus extern "C" { #endif @@ -302,12 +307,12 @@ typedef struct ASN1_VALUE_st ASN1_VALUE; #define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \ type *d2i_##name(type **a, unsigned char **in, long len); \ int i2d_##name(type *a, unsigned char **out); \ - extern const ASN1_ITEM itname##_it; + OPENSSL_EXTERN const ASN1_ITEM itname##_it; #define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \ type *d2i_##name(type **a, const unsigned char **in, long len); \ int i2d_##name(const type *a, unsigned char **out); \ - extern const ASN1_ITEM name##_it; + OPENSSL_EXTERN const ASN1_ITEM name##_it; #define DECLARE_ASN1_FUNCTIONS_const(name) \ name *name##_new(void); \ diff --git a/crypto/asn1/asn1t.h b/crypto/asn1/asn1t.h index ea880d5150dfbd4d41d33ed00921d0613d8e3658..5e6efe2cccccc6ff192aece536c0d82a40d39051 100644 --- a/crypto/asn1/asn1t.h +++ b/crypto/asn1/asn1t.h @@ -59,8 +59,14 @@ #define HEADER_ASN1T_H #include +#include #include +#ifdef OPENSSL_BUILD_SHLIBCRYPTO +# undef OPENSSL_EXTERN +# define OPENSSL_EXTERN OPENSSL_EXPORT +#endif + /* ASN1 template defines, structures and functions */ #ifdef __cplusplus @@ -74,7 +80,7 @@ extern "C" { #define ASN1_ITEM_TEMPLATE_END(tname) \ ;\ - const ASN1_ITEM tname##_it = { \ + OPENSSL_GLOBAL const ASN1_ITEM tname##_it = { \ ASN1_ITYPE_PRIMITIVE,\ -1,\ &tname##_item_tt,\ @@ -114,7 +120,7 @@ extern "C" { #define ASN1_SEQUENCE_END_name(stname, tname) \ ;\ - const ASN1_ITEM tname##_it = { \ + OPENSSL_GLOBAL const ASN1_ITEM tname##_it = { \ ASN1_ITYPE_SEQUENCE,\ V_ASN1_SEQUENCE,\ tname##_seq_tt,\ @@ -148,7 +154,7 @@ extern "C" { #define ASN1_SEQUENCE_END_ref(stname, tname) \ ;\ - const ASN1_ITEM tname##_it = { \ + OPENSSL_GLOBAL const ASN1_ITEM tname##_it = { \ ASN1_ITYPE_SEQUENCE,\ V_ASN1_SEQUENCE,\ tname##_seq_tt,\ @@ -194,7 +200,7 @@ extern "C" { #define ASN1_CHOICE_END_selector(stname, tname, selname) \ ;\ - const ASN1_ITEM tname##_it = { \ + OPENSSL_GLOBAL const ASN1_ITEM tname##_it = { \ ASN1_ITYPE_CHOICE,\ offsetof(stname,selname) ,\ tname##_ch_tt,\ @@ -206,7 +212,7 @@ extern "C" { #define ASN1_CHOICE_END_cb(stname, tname, selname) \ ;\ - const ASN1_ITEM tname##_it = { \ + OPENSSL_GLOBAL const ASN1_ITEM tname##_it = { \ ASN1_ITYPE_CHOICE,\ offsetof(stname,selname) ,\ tname##_ch_tt,\ @@ -635,7 +641,7 @@ typedef struct ASN1_AUX_st { (ASN1_d2i_func *)d2i_##sname, \ (ASN1_i2d_func *)i2d_##sname, \ }; \ - ASN1_ITEM const sname##_it = { \ + OPENSSL_GLOBAL ASN1_ITEM const sname##_it = { \ ASN1_ITYPE_COMPAT, \ tag, \ NULL, \ @@ -646,7 +652,7 @@ typedef struct ASN1_AUX_st { } #define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \ - const ASN1_ITEM sname##_it = { \ + OPENSSL_GLOBAL const ASN1_ITEM sname##_it = { \ ASN1_ITYPE_EXTERN, \ tag, \ NULL, \ @@ -711,16 +717,16 @@ typedef struct ASN1_AUX_st { /* external definitions for primitive types */ -extern const ASN1_ITEM ASN1_BOOLEAN_it; -extern const ASN1_ITEM ASN1_TBOOLEAN_it; -extern const ASN1_ITEM ASN1_FBOOLEAN_it; -extern const ASN1_ITEM ASN1_OBJECT_it; -extern const ASN1_ITEM ASN1_ANY_it; -extern const ASN1_ITEM ASN1_SEQUENCE_it; -extern const ASN1_ITEM CBIGNUM_it; -extern const ASN1_ITEM BIGNUM_it; -extern const ASN1_ITEM LONG_it; -extern const ASN1_ITEM ZLONG_it; +OPENSSL_EXTERN const ASN1_ITEM ASN1_BOOLEAN_it; +OPENSSL_EXTERN const ASN1_ITEM ASN1_TBOOLEAN_it; +OPENSSL_EXTERN const ASN1_ITEM ASN1_FBOOLEAN_it; +OPENSSL_EXTERN const ASN1_ITEM ASN1_OBJECT_it; +OPENSSL_EXTERN const ASN1_ITEM ASN1_ANY_it; +OPENSSL_EXTERN const ASN1_ITEM ASN1_SEQUENCE_it; +OPENSSL_EXTERN const ASN1_ITEM CBIGNUM_it; +OPENSSL_EXTERN const ASN1_ITEM BIGNUM_it; +OPENSSL_EXTERN const ASN1_ITEM LONG_it; +OPENSSL_EXTERN const ASN1_ITEM ZLONG_it; DECLARE_STACK_OF(ASN1_VALUE) diff --git a/crypto/cast/cast_lcl.h b/crypto/cast/cast_lcl.h index 5fab8a43f6b48c033dd01068d4bff64fd0ab6bc3..6bd25628d98558014fd8f065cb0aa3505c7ac8dd 100644 --- a/crypto/cast/cast_lcl.h +++ b/crypto/cast/cast_lcl.h @@ -63,6 +63,11 @@ #include "openssl/e_os.h" /* OPENSSL_EXTERN */ +#ifdef OPENSSL_BUILD_SHLIBCRYPTO +# undef OPENSSL_EXTERN +# define OPENSSL_EXTERN OPENSSL_EXPORT +#endif + #undef c2l #define c2l(c,l) (l =((unsigned long)(*((c)++))) , \ l|=((unsigned long)(*((c)++)))<< 8L, \ diff --git a/crypto/des/des.h b/crypto/des/des.h index 10c04912bbb09481ad8af9926182723d9b0da7f0..e96b19c2547d34c7973993ba8d2754400d8df21a 100644 --- a/crypto/des/des.h +++ b/crypto/des/des.h @@ -70,6 +70,11 @@ #include /* DES_LONG */ #include /* OPENSSL_EXTERN */ +#ifdef OPENSSL_BUILD_SHLIBCRYPTO +# undef OPENSSL_EXTERN +# define OPENSSL_EXTERN OPENSSL_EXPORT +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/crypto/des/des_locl.h b/crypto/des/des_locl.h index 1ace8f5930b42ee8283ae18cd34a424cf66f0193..6b4da958a80b70c6ba16e24e43b30912d0c6214d 100644 --- a/crypto/des/des_locl.h +++ b/crypto/des/des_locl.h @@ -93,6 +93,11 @@ #include #endif +#ifdef OPENSSL_BUILD_SHLIBCRYPTO +# undef OPENSSL_EXTERN +# define OPENSSL_EXTERN OPENSSL_EXPORT +#endif + #define ITERATIONS 16 #define HALF_ITERATIONS 8 diff --git a/crypto/des/des_ver.h b/crypto/des/des_ver.h index de3c02f110cfaba77e27e2b3e53d1300e1d93cc0..0fa94d53682edace30906e36fcd8a349d404e7d8 100644 --- a/crypto/des/des_ver.h +++ b/crypto/des/des_ver.h @@ -57,5 +57,11 @@ */ #include + +#ifdef OPENSSL_BUILD_SHLIBCRYPTO +# undef OPENSSL_EXTERN +# define OPENSSL_EXTERN OPENSSL_EXPORT +#endif + OPENSSL_EXTERN char *DES_version; /* SSLeay version string */ OPENSSL_EXTERN char *libdes_version; /* old libdes version string */ diff --git a/ssl/ssl_locl.h b/ssl/ssl_locl.h index 01ff01d8184c8a2f0551acb049b45086ed922a3c..58bcd1b7ed7c7099a2ca3bfb1115524a5d124a6b 100644 --- a/ssl/ssl_locl.h +++ b/ssl/ssl_locl.h @@ -128,6 +128,11 @@ #include #include +#ifdef OPENSSL_BUILD_SHLIBSSL +# undef OPENSSL_EXTERN +# define OPENSSL_EXTERN OPENSSL_EXPORT +#endif + #define PKCS1_CHECK #define c2l(c,l) (l = ((unsigned long)(*((c)++))) , \