From 49493a2dcfb2cd1758b69b13d9006ead3be0e066 Mon Sep 17 00:00:00 2001 From: Lior Kaplan Date: Fri, 1 Jan 2016 19:19:27 +0200 Subject: Happy new year (Update copyright to 2016) --- ext/mysqlnd/mysqlnd_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mysqlnd/mysqlnd_net.c') diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c index 2231e1db2c..0fa67107e6 100644 --- a/ext/mysqlnd/mysqlnd_net.c +++ b/ext/mysqlnd/mysqlnd_net.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2015 The PHP Group | + | Copyright (c) 2006-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | -- cgit v1.2.1 From 93dc91b386b53bdd317ea6abd70640e2bbfbaf73 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 30 Jan 2016 14:56:17 +0100 Subject: Remove version checks PHP_VERSION_ID PHP_API_VERSION ZEND_MODULE_API_NO PHP_MAJOR_VERSION, PHP_MINOR_VERSION ZEND_ENGINE_2 I've left litespeed alone, as it seems to genuinely maintain support for many PHP versions. --- ext/mysqlnd/mysqlnd_net.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'ext/mysqlnd/mysqlnd_net.c') diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c index a44faf75db..bf86a17a08 100644 --- a/ext/mysqlnd/mysqlnd_net.c +++ b/ext/mysqlnd/mysqlnd_net.c @@ -133,11 +133,7 @@ MYSQLND_METHOD(mysqlnd_net, open_pipe)(MYSQLND_NET * const net, const char * con const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info) { -#if PHP_API_VERSION < 20100412 - unsigned int streams_options = ENFORCE_SAFE_MODE; -#else unsigned int streams_options = 0; -#endif dtor_func_t origin_dtor; php_stream * net_stream = NULL; @@ -173,11 +169,7 @@ MYSQLND_METHOD(mysqlnd_net, open_tcp_or_unix)(MYSQLND_NET * const net, const cha const zend_bool persistent, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info) { -#if PHP_API_VERSION < 20100412 - unsigned int streams_options = ENFORCE_SAFE_MODE; -#else unsigned int streams_options = 0; -#endif unsigned int streams_flags = STREAM_XPORT_CLIENT | STREAM_XPORT_CONNECT; char * hashed_details = NULL; int hashed_details_len = 0; @@ -983,11 +975,7 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net) php_stream_context_set_option(context, "ssl", "allow_self_signed", &verify_peer_zval); } } -#if PHP_API_VERSION >= 20131106 - php_stream_context_set(net_stream, context); -#else php_stream_context_set(net_stream, context); -#endif if (php_stream_xport_crypto_setup(net_stream, STREAM_CRYPTO_METHOD_TLS_CLIENT, NULL) < 0 || php_stream_xport_crypto_enable(net_stream, 1) < 0) { @@ -1003,11 +991,7 @@ MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net) of the context, which means usage of already freed memory, bad. Actually we don't need this context anymore after we have enabled SSL on the connection. Thus it is very simple, we remove it. */ -#if PHP_API_VERSION >= 20131106 php_stream_context_set(net_stream, NULL); -#else - php_stream_context_set(net_stream, NULL); -#endif if (net->data->options.timeout_read) { struct timeval tv; -- cgit v1.2.1