summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/e_os2.h
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2014-07-11 09:36:34 +0000
committerjsing <jsing@openbsd.org>2014-07-11 09:36:34 +0000
commit62ed3f602818e64236895f9a975fae17c8a85a52 (patch)
tree9f05c8838d96c90d0c677942c8b7e54c34d1813b /lib/libssl/src/e_os2.h
parentConvert bus_dmamem_map(9) to km_alloc(9) in order to make it fail and (diff)
downloadwireguard-openbsd-62ed3f602818e64236895f9a975fae17c8a85a52.tar.xz
wireguard-openbsd-62ed3f602818e64236895f9a975fae17c8a85a52.zip
More e_os2.h clean up. Also move the includes inside the guard.
ok deraadt@ who also has a similar diff.
Diffstat (limited to 'lib/libssl/src/e_os2.h')
-rw-r--r--lib/libssl/src/e_os2.h32
1 files changed, 12 insertions, 20 deletions
diff --git a/lib/libssl/src/e_os2.h b/lib/libssl/src/e_os2.h
index 1b334430c1f..31aa17fd3b9 100644
--- a/lib/libssl/src/e_os2.h
+++ b/lib/libssl/src/e_os2.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: e_os2.h,v 1.17 2014/06/12 15:49:27 deraadt Exp $ */
+/* $OpenBSD: e_os2.h,v 1.18 2014/07/11 09:36:34 jsing Exp $ */
/* ====================================================================
* Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved.
*
@@ -53,37 +53,29 @@
*
*/
-#include <openssl/opensslconf.h>
-
#ifndef HEADER_E_OS2_H
#define HEADER_E_OS2_H
+#include <openssl/opensslconf.h>
+
#ifdef __cplusplus
extern "C" {
#endif
#define OPENSSL_SYS_UNIX
-/* Specials for I/O an exit */
-# define OPENSSL_EXPORT extern
-# define OPENSSL_IMPORT extern
-# define OPENSSL_GLOBAL
+#define OPENSSL_EXPORT extern
+#define OPENSSL_IMPORT extern
+#define OPENSSL_GLOBAL
#define OPENSSL_EXTERN OPENSSL_IMPORT
-/* Macros to allow global variables to be reached through function calls when
- required (if a shared library version requires it, for example.
- The way it's done allows definitions like this:
+#define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \
+ OPENSSL_GLOBAL type _shadow_##name=value;
+#define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name
+#define OPENSSL_GLOBAL_REF(name) _shadow_##name
+
+#define ossl_ssize_t ssize_t
- // in foobar.c
- OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
- // in foobar.h
- OPENSSL_DECLARE_GLOBAL(int,foobar);
- #define foobar OPENSSL_GLOBAL_REF(foobar)
-*/
-# define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) OPENSSL_GLOBAL type _shadow_##name=value;
-# define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name
-# define OPENSSL_GLOBAL_REF(name) _shadow_##name
-# define ossl_ssize_t ssize_t
#ifdef __cplusplus
}
#endif