Re: cvs: php4 /ext/curl config.m4 curl.c php_curl.h

From: Date: Thu, 17 May 2001 03:52:22 +0000
Subject: Re: cvs: php4 /ext/curl config.m4 curl.c php_curl.h
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5797@lists.php.net to get a copy of this message
Great. If it works I suggest merging this into 4.0.6 as this will bite most people who download 4.0.6 and use curl. Andi At 11:43 PM 5/16/2001 +0000, Sterling Hughes wrote:
sterling                Wed May 16 16:43:31 2001 EDT
Modified files:
    /php4/ext/curl      config.m4 curl.c php_curl.h
Log: Add a compile check for the cURL version and fix the compile in general. Index: php4/ext/curl/config.m4 diff -u php4/ext/curl/config.m4:1.5 php4/ext/curl/config.m4:1.6 --- php4/ext/curl/config.m4:1.5 Tue Mar 27 12:34:23 2001
+++ php4/ext/curl/config.m4     Wed May 16 16:43:30 2001
@@ -1,4 +1,4 @@ -dnl $Id: config.m4,v 1.5 2001/03/27 20:34:23 sniper Exp $ +dnl $Id: config.m4,v 1.6 2001/05/16 23:43:30 sterling Exp $ dnl config.m4 for extension CURL PHP_ARG_WITH(curl, for CURL support, @@ -21,6 +21,21 @@
     AC_MSG_RESULT(not found)
     AC_MSG_ERROR(Please reinstall the libcurl distribution -
     easy.h should be in <curl-dir>/include/curl/)
+ fi + + CURL_CONFIG="curl-config" + AC_MSG_CHECKING(for cURL greater than 7.7.3) + + if ${CURL_DIR}/bin/curl-config --libs print > /dev/null 2>&1; then
+    CURL_CONFIG=${CURL_DIR}/bin/curl-config
+ fi + + curl_version_full=$CURL_CONFIG --version + curl_version=`echo ${curl_version_full} | sed -e 's/libcurl //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` + if test "$curl_version" -ge 7007003; then
+    AC_MSG_RESULT($curl_version_full)
+ else
+    AC_MSG_ERROR(cURL version 7.7.3 or later is required to compile php with cURL support)
fi PHP_ADD_INCLUDE($CURL_DIR/include) Index: php4/ext/curl/curl.c diff -u php4/ext/curl/curl.c:1.52 php4/ext/curl/curl.c:1.53 --- php4/ext/curl/curl.c:1.52 Mon May 14 14:02:31 2001
+++ php4/ext/curl/curl.c        Wed May 16 16:43:30 2001
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
*/ -/* $Id: curl.c,v 1.52 2001/05/14 21:02:31 sterling Exp $ */ +/* $Id: curl.c,v 1.53 2001/05/16 23:43:30 sterling Exp $ */ #include "php.h" @@ -187,7 +187,7 @@
        REGISTER_CURL_CONSTANT("CURLOPT_CONNECTTIMEOUT", CURLOPT_CONNECTTIMEOUT);
        REGISTER_CURL_CONSTANT("CURLOPT_SSL_VERIFYPEER", CURLOPT_SSL_VERIFYPEER);
        REGISTER_CURL_CONSTANT("CURLOPT_CAINFO",          CURLOPT_CAINFO);
-       REGISTER_CURL_CONSTANT("CURLOPT_BINARYTRANSER",   CURLOPT_BINARY);
+       REGISTER_CURL_CONSTANT("CURLOPT_BINARYTRANSER", CURLOPT_BINARYTRANSFER);
        /* Constants effecting the way CURLOPT_CLOSEPOLICY works */
        REGISTER_CURL_CONSTANT("CURLCLOSEPOLICY_LEAST_RECENTLY_USED", CURLCLOSEPOLICY_LEAST_RECENTLY_USED);
Index: php4/ext/curl/php_curl.h diff -u php4/ext/curl/php_curl.h:1.22 php4/ext/curl/php_curl.h:1.23
--- php4/ext/curl/php_curl.h:1.22       Mon May 14 14:04:23 2001
+++ php4/ext/curl/php_curl.h    Wed May 16 16:43:30 2001
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
*/ -/* $Id: php_curl.h,v 1.22 2001/05/14 21:04:23 sterling Exp $ */ +/* $Id: php_curl.h,v 1.23 2001/05/16 23:43:30 sterling Exp $ */ #ifndef _PHP_CURL_H #define _PHP_CURL_H @@ -57,6 +57,7 @@
        FILE         *fp;
        smart_str     buf;
        int           method;
+       int           type;
} php_curl_write; typedef struct { -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-cvs-unsubscribe@lists.php.net For additional commands, e-mail: php-cvs-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net


« previous php.cvs (#5797) next »