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.
This commit is contained in:
Richard Levitte 2000-12-31 00:23:17 +00:00
parent 21cd437886
commit 26da3e65ac
7 changed files with 56 additions and 19 deletions

View file

@ -69,6 +69,11 @@
#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); \

View file

@ -59,8 +59,14 @@
#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)

View file

@ -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, \

View file

@ -70,6 +70,11 @@
#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

View file

@ -93,6 +93,11 @@
#include <string.h>
#endif
#ifdef OPENSSL_BUILD_SHLIBCRYPTO
# undef OPENSSL_EXTERN
# define OPENSSL_EXTERN OPENSSL_EXPORT
#endif
#define ITERATIONS 16
#define HALF_ITERATIONS 8

View file

@ -57,5 +57,11 @@
*/
#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 */

View file

@ -128,6 +128,11 @@
#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)++))) , \