If OPENSSL_BUILD_SHLIBCRYPTO (for files that end up as libcrypto
authorRichard Levitte <levitte@openssl.org>
Sun, 31 Dec 2000 00:23:17 +0000 (00:23 +0000)
committerRichard Levitte <levitte@openssl.org>
Sun, 31 Dec 2000 00:23:17 +0000 (00:23 +0000)
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.

crypto/asn1/asn1.h
crypto/asn1/asn1t.h
crypto/cast/cast_lcl.h
crypto/des/des.h
crypto/des/des_locl.h
crypto/des/des_ver.h
ssl/ssl_locl.h

index 04c707a08e2d2410ac4a78523b138576275e0732..0bc22d70645235664b072b2c7d06c7795200fe9f 100644 (file)
 
 #include <openssl/symhacks.h>
 
+#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); \
index ea880d5150dfbd4d41d33ed00921d0613d8e3658..5e6efe2cccccc6ff192aece536c0d82a40d39051 100644 (file)
 #define HEADER_ASN1T_H
 
 #include <stddef.h>
+#include <openssl/e_os2.h>
 #include <openssl/asn1.h>
 
+#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)
 
index 5fab8a43f6b48c033dd01068d4bff64fd0ab6bc3..6bd25628d98558014fd8f065cb0aa3505c7ac8dd 100644 (file)
 
 #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, \
index 10c04912bbb09481ad8af9926182723d9b0da7f0..e96b19c2547d34c7973993ba8d2754400d8df21a 100644 (file)
 #include <openssl/opensslconf.h> /* DES_LONG */
 #include <openssl/e_os2.h>     /* OPENSSL_EXTERN */
 
+#ifdef OPENSSL_BUILD_SHLIBCRYPTO
+# undef OPENSSL_EXTERN
+# define OPENSSL_EXTERN OPENSSL_EXPORT
+#endif
+
 #ifdef  __cplusplus
 extern "C" {
 #endif
index 1ace8f5930b42ee8283ae18cd34a424cf66f0193..6b4da958a80b70c6ba16e24e43b30912d0c6214d 100644 (file)
 #include <string.h>
 #endif
 
+#ifdef OPENSSL_BUILD_SHLIBCRYPTO
+# undef OPENSSL_EXTERN
+# define OPENSSL_EXTERN OPENSSL_EXPORT
+#endif
+
 #define ITERATIONS 16
 #define HALF_ITERATIONS 8
 
index de3c02f110cfaba77e27e2b3e53d1300e1d93cc0..0fa94d53682edace30906e36fcd8a349d404e7d8 100644 (file)
  */
 
 #include <openssl/e_os2.h>
+
+#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 */
index 01ff01d8184c8a2f0551acb049b45086ed922a3c..58bcd1b7ed7c7099a2ca3bfb1115524a5d124a6b 100644 (file)
 #include <openssl/err.h>
 #include <openssl/ssl.h>
 
+#ifdef OPENSSL_BUILD_SHLIBSSL
+# undef OPENSSL_EXTERN
+# define OPENSSL_EXTERN OPENSSL_EXPORT
+#endif
+
 #define PKCS1_CHECK
 
 #define c2l(c,l)       (l = ((unsigned long)(*((c)++)))     , \