From 96f7cdb53e1cd46a6432cda24d2aec98fabf81a9 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 18 Jan 2016 19:41:04 -0600 Subject: consolidate the windows specific header trickery we need to do --- src/_cffi_src/build_openssl.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/_cffi_src/build_openssl.py') diff --git a/src/_cffi_src/build_openssl.py b/src/_cffi_src/build_openssl.py index ebbe8865..491d1740 100644 --- a/src/_cffi_src/build_openssl.py +++ b/src/_cffi_src/build_openssl.py @@ -37,7 +37,11 @@ def _osx_libraries(build_static): return ["ssl", "crypto"] -_OSX_PRE_INCLUDE = """ +_PRE_INCLUDE = """ +#include +#if defined(OPENSSL_SYS_WINDOWS) +#include +#endif #ifdef __APPLE__ #include #define __ORIG_DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER \ @@ -47,7 +51,7 @@ _OSX_PRE_INCLUDE = """ #endif """ -_OSX_POST_INCLUDE = """ +_POST_INCLUDE = """ #ifdef __APPLE__ #undef DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER \ @@ -92,8 +96,8 @@ ffi = build_ffi_for_binding( "pkcs7", "callbacks", ], - pre_include=_OSX_PRE_INCLUDE, - post_include=_OSX_POST_INCLUDE, + pre_include=_PRE_INCLUDE, + post_include=_POST_INCLUDE, libraries=_get_openssl_libraries(sys.platform), extra_link_args=extra_link_args(compiler_type()), ) -- cgit v1.2.3