summaryrefslogtreecommitdiff
path: root/ext/openssl/php_openssl.h
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-07-24 16:24:04 +0200
committerAnatol Belski <ab@php.net>2017-07-24 16:24:04 +0200
commitb7eb2c060409a8f5809d6e73f53d88844cf9ed09 (patch)
tree74366ba9e65e15411b49882405518d5d25070a6f /ext/openssl/php_openssl.h
parent0ec147d301b33b2cb0f347c6e81eb7e75e75b521 (diff)
downloadphp-git-b7eb2c060409a8f5809d6e73f53d88844cf9ed09.tar.gz
Followup on 0ec147d3 for another place
which requires also to move the macros into the header
Diffstat (limited to 'ext/openssl/php_openssl.h')
-rw-r--r--ext/openssl/php_openssl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/openssl/php_openssl.h b/ext/openssl/php_openssl.h
index a157969883..d7477966fa 100644
--- a/ext/openssl/php_openssl.h
+++ b/ext/openssl/php_openssl.h
@@ -128,6 +128,15 @@ PHP_FUNCTION(openssl_spki_export);
PHP_FUNCTION(openssl_spki_export_challenge);
PHP_FUNCTION(openssl_get_cert_locations);
+
+#ifdef PHP_WIN32
+#define PHP_OPENSSL_BIO_MODE_R(flags) (((flags) & PKCS7_BINARY) ? "rb" : "r")
+#define PHP_OPENSSL_BIO_MODE_W(flags) (((flags) & PKCS7_BINARY) ? "wb" : "w")
+#else
+#define PHP_OPENSSL_BIO_MODE_R(flags) "r"
+#define PHP_OPENSSL_BIO_MODE_W(flags) "w"
+#endif
+
#else
#define phpext_openssl_ptr NULL