From 8d75e72e6422db6721bcab27cf6a4531eecf9f20 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Fri, 11 Jul 2014 09:36:34 +0000 Subject: More e_os2.h clean up. Also move the includes inside the guard. ok deraadt@ who also has a similar diff. --- src/lib/libssl/src/e_os2.h | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libssl/src/e_os2.h b/src/lib/libssl/src/e_os2.h index 1b334430c1..31aa17fd3b 100644 --- a/src/lib/libssl/src/e_os2.h +++ b/src/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 - #ifndef HEADER_E_OS2_H #define HEADER_E_OS2_H +#include + #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 -- cgit v1.2.3-55-g6feb