From: Richard Levitte Date: Sun, 31 Dec 2000 00:23:17 +0000 (+0000) Subject: If OPENSSL_BUILD_SHLIBCRYPTO (for files that end up as libcrypto X-Git-Tag: OpenSSL_0_9_6a-beta1~81^2~85 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=26da3e65ac3ecf05c7567b0c62ee515814babf31;p=oweals%2Fopenssl.git If OPENSSL_BUILD_SHLIBCRYPTO (for files that end up as libcrypto objects) or OPENSSL_BUILD_SHLIBSSL (for files that end up as libssl objects) is defined, redefine OPENSSL_EXTERN to be OPENSSL_EXPORT. This is actually only important on Win32, and can safely be ignored in all other cases, at least for now. --- diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h index 04c707a08e..0bc22d7064 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 ea880d5150..5e6efe2ccc 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 5fab8a43f6..6bd25628d9 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 10c04912bb..e96b19c254 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 1ace8f5930..6b4da958a8 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 de3c02f110..0fa94d5368 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 01ff01d818..58bcd1b7ed 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)++))) , \