summaryrefslogtreecommitdiff
path: root/crypto/opensslconf.h.in
diff options
context:
space:
mode:
authorlevitte <levitte>2001-03-02 10:38:03 +0000
committerlevitte <levitte>2001-03-02 10:38:03 +0000
commit6020ac0f9132e5d9f597daea4eea55db5757a62c (patch)
tree5379f73a93712be216fdb90bc54ebb3c8c204c99 /crypto/opensslconf.h.in
parentd4ba5f0baed05090a503b50700e65b7d8956d868 (diff)
downloadopenssl-6020ac0f9132e5d9f597daea4eea55db5757a62c.tar.gz
Introduce the possibility to access global variables through
functions on platform were that's the best way to handle exporting global variables in shared libraries. To enable this functionality, one must configure with "EXPORT_VAR_AS_FN" or defined the C macro "OPENSSL_EXPORT_VAR_AS_FUNCTION" in crypto/opensslconf.h (the latter is normally done by Configure or something similar). To implement a global variable, use the macro OPENSSL_IMPLEMENT_GLOBAL in the source file (foo.c) like this: OPENSSL_IMPLEMENT_GLOBAL(int,foo)=1; OPENSSL_IMPLEMENT_GLOBAL(double,bar); To declare a global variable, use the macros OPENSSL_DECLARE_GLOBAL and OPENSSL_GLOBAL_REF in the header file (foo.h) like this: OPENSSL_DECLARE_GLOBAL(int,foo); #define foo OPENSSL_GLOBAL_REF(foo) OPENSSL_DECLARE_GLOBAL(double,bar); #define bar OPENSSL_GLOBAL_REF(bar) The #defines are very important, and therefore so is including the header file everywere where the defined globals are used. The macro OPENSSL_EXPORT_VAR_AS_FUNCTION also affects the definition of ASN.1 items, but that structure is a bt different. The largest change is in util/mkdef.pl which has been enhanced with better and easier to understand logic to choose which symbols should go into the Windows .def files as well as a number of fixes and code cleanup (among others, algorithm keywords are now sorted lexicographically to avoid constant rewrites).
Diffstat (limited to 'crypto/opensslconf.h.in')
-rw-r--r--crypto/opensslconf.h.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/opensslconf.h.in b/crypto/opensslconf.h.in
index 5da591122..a06861b96 100644
--- a/crypto/opensslconf.h.in
+++ b/crypto/opensslconf.h.in
@@ -12,6 +12,8 @@
#undef OPENSSL_UNISTD
#define OPENSSL_UNISTD <unistd.h>
+#undef OPENSSL_EXPORT_VAR_AS_FUNCTIONS
+
#if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
#define IDEA_INT unsigned int
#endif