projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
php_url changed to zend_string*
[m6w6/ext-http]
/
scripts
/
gen_curlinfo.php
diff --git
a/scripts/gen_curlinfo.php
b/scripts/gen_curlinfo.php
index 376a7e5e460e7674f13ea08a8a833befe8d3a6b8..9fae4cb8d78c6baee7873b89a7a491e1a3c1d22e 100755
(executable)
--- a/
scripts/gen_curlinfo.php
+++ b/
scripts/gen_curlinfo.php
@@
-10,9
+10,9
@@
function failure() {
function file_re($file, $pattern, $all = true) {
static $path;
function file_re($file, $pattern, $all = true) {
static $path;
-
+
$path or $path = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1].'/include/curl/' : "/usr/local/include/curl/";
$path or $path = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1].'/include/curl/' : "/usr/local/include/curl/";
-
+
if ($content = file_get_contents($path . $file)) {
if ($all) {
if (preg_match_all($pattern, $content, $matches, PREG_SET_ORDER)) {
if ($content = file_get_contents($path . $file)) {
if ($all) {
if (preg_match_all($pattern, $content, $matches, PREG_SET_ORDER)) {
@@
-35,7
+35,10
@@
$ifdefs = array(
'PRIMARY_PORT' => 'PHP_HTTP_CURL_VERSION(7,21,0)',
'LOCAL_PORT' => 'PHP_HTTP_CURL_VERSION(7,21,0)',
'LOCAL_IP' => 'PHP_HTTP_CURL_VERSION(7,21,0)',
'PRIMARY_PORT' => 'PHP_HTTP_CURL_VERSION(7,21,0)',
'LOCAL_PORT' => 'PHP_HTTP_CURL_VERSION(7,21,0)',
'LOCAL_IP' => 'PHP_HTTP_CURL_VERSION(7,21,0)',
- 'HTTP_VERSION' => 'PHP_HTTP_CURL_VERSION(7,50,0)'
+ 'HTTP_VERSION' => 'PHP_HTTP_CURL_VERSION(7,50,0)',
+ 'PROXY_SSL_VERIFYRESULT' => 'PHP_HTTP_CURL_VERSION(7,52,0)',
+ 'PROTOCOL' => 'PHP_HTTP_CURL_VERSION(7,52,0)',
+ 'SCHEME' => 'PHP_HTTP_CURL_VERSION(7,52,0)',
);
$exclude = array(
'ACTIVESOCKET',
);
$exclude = array(
'ACTIVESOCKET',
@@
-58,19
+61,19
@@
$translate = array(
);
$templates = array(
);
$templates = array(
-'STRING' =>
+'STRING' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &c)) {
ZVAL_STRING(&tmp, STR_PTR(c));
zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
}
',
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &c)) {
ZVAL_STRING(&tmp, STR_PTR(c));
zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
}
',
-'DOUBLE' =>
+'DOUBLE' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &d)) {
ZVAL_DOUBLE(&tmp, d);
zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
}
',
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &d)) {
ZVAL_DOUBLE(&tmp, d);
zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
}
',
-'LONG' =>
+'LONG' =>
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &l)) {
ZVAL_LONG(&tmp, l);
zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
' if (CURLE_OK == curl_easy_getinfo(ch, %s, &l)) {
ZVAL_LONG(&tmp, l);
zend_hash_str_update(info, "%s", lenof("%2$s"), &tmp);
@@
-101,7
+104,7
@@
foreach ($infos as $info) {
if (isset($ifdefs[$short])) printf("#endif\n");
}
if (isset($ifdefs[$short])) printf("#endif\n");
}
-file_put_contents("src/php_http_client_curl.c",
+file_put_contents("src/php_http_client_curl.c",
preg_replace('/(\/\* BEGIN::CURLINFO \*\/\n).*(\n\s*\/\* END::CURLINFO \*\/)/s', '$1'. ob_get_contents() .'$2',
file_get_contents("src/php_http_client_curl.c")));
preg_replace('/(\/\* BEGIN::CURLINFO \*\/\n).*(\n\s*\/\* END::CURLINFO \*\/)/s', '$1'. ob_get_contents() .'$2',
file_get_contents("src/php_http_client_curl.c")));