From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Apr 10 11:30:20 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E4D316A4CF for ; Sat, 10 Apr 2004 11:30:20 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F0AF443D5D for ; Sat, 10 Apr 2004 11:30:19 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i3AIUJbv058484 for ; Sat, 10 Apr 2004 11:30:19 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i3AIUJtk058476; Sat, 10 Apr 2004 11:30:19 -0700 (PDT) (envelope-from gnats) Resent-Date: Sat, 10 Apr 2004 11:30:19 -0700 (PDT) Resent-Message-Id: <200404101830.i3AIUJtk058476@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Sunpoet Po-Chuan Hsieh Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A3CB116A4CE for ; Sat, 10 Apr 2004 11:20:42 -0700 (PDT) Received: from IRIS.sunpoet.net (sunpoet.net [203.204.205.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 33BEA43D41 for ; Sat, 10 Apr 2004 11:20:42 -0700 (PDT) (envelope-from sunpoet@IRIS.sunpoet.net) Received: by IRIS.sunpoet.net (Postfix, from userid 1000) id 7BC5017073; Sun, 11 Apr 2004 02:21:17 +0800 (CST) Message-Id: <20040410182117.7BC5017073@IRIS.sunpoet.net> Date: Sun, 11 Apr 2004 02:21:17 +0800 (CST) From: Sunpoet Po-Chuan Hsieh To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: ports/65403: [lang/php4] Fix php4 build with curl 7.11.1 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Sunpoet Po-Chuan Hsieh List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 18:30:20 -0000 >Number: 65403 >Category: ports >Synopsis: [lang/php4] Fix php4 build with curl 7.11.1 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Apr 10 11:30:19 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Sunpoet Po-Chuan Hsieh >Release: FreeBSD 5.2-CURRENT i386 >Organization: SUNPOET.net >Environment: System: FreeBSD IRIS.sunpoet.net 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Tue Mar 23 18:25:35 CST 2004 sunpoet@IRIS.sunpoet.net:/usr/src/sys/i386/compile/sunpoet i386 >Description: After upgrading curl from 7.10.0 to 7.11.1, building php4 failed for two changes: 1. HttpPost -> curl_httppost 2. CURLOPT_PASSWDFUNCTION is defined as 0 (same as CURLOPT_MUTE) Compilation passed after patching ext/curl/curl.c. Note: this patch works for curl 7.11.1 only. >How-To-Repeat: % pkg_info -Ix curl curl-7.11.1 Non-interactive tool to get files from FTP, GOPHER, HTTP(S) % cd /usr/ports/lang/php4 % make ===> Building for php4-4.3.5_7 /bin/sh /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/libtool --silent --preserve-dup-deps --mode=compile gcc -Iext/curl/ -I/usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/ -DPHP_ATOM_INC -I/usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/include -I/usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/main -I/usr/ports/works/usr/ports/lang/php4/work/php-4.3.5 -I/usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/Zend -I/usr/local/include -I/usr/local/include/libxml2 -I/usr/local/include/freetype2 -I/usr/local/include/c-client -I/usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/mbstring/mbregex -I/usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/mbstring/libmbfl -I/usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/mbstring/libmbfl/mbfl -I/usr/local/include/mysql -I/usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/TSRM -O2 -pipe -s -march=pentium4 -prefer-pic -c /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c -o ext /curl/curl.lo /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c: In function `curl_free_post': /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c:568: warning: passing arg 1 of `curl_formfree' from incompatible pointer type /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c: In function `alloc_curl_handle': /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c:608: error: invalid application of `sizeof' to an incomplete type /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c: In function `zif_curl_setopt': /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c:845: error: duplicate case value /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c:700: error: previously used here /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c:890: warning: passing arg 1 of `curl_formadd' from incompatible pointer type /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c:890: warning: passing arg 2 of `curl_formadd' from incompatible pointer type /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c:898: warning: passing arg 1 of `curl_formadd' from incompatible pointer type /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5/ext/curl/curl.c:898: warning: passing arg 2 of `curl_formadd' from incompatible pointer type *** Error code 1 Stop in /usr/ports/works/usr/ports/lang/php4/work/php-4.3.5. *** Error code 1 Stop in /usr/ports/lang/php4. *** Error code 1 Stop in /usr/ports/lang/php4. >Fix: % diff -u ext/curl/curl.c.orig ext/curl/curl.c --- ext/curl/curl.c.orig Sat Mar 13 01:43:17 2004 +++ ext/curl/curl.c Sun Apr 11 01:51:38 2004 @@ -565,7 +565,7 @@ */ static void curl_free_post(void **post) { - curl_formfree((struct HttpPost *) *post); + curl_formfree((struct curl_httppost *) *post); } /* }}} */ @@ -605,7 +605,7 @@ (void(*)(void *)) curl_free_string, 0); zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist), (void(*)(void *)) curl_free_slist, 0); - zend_llist_init(&(*ch)->to_free.post, sizeof(struct HttpPost), + zend_llist_init(&(*ch)->to_free.post, sizeof(struct curl_httppost), (void(*)(void *)) curl_free_post, 0); } /* }}} */ @@ -842,6 +842,7 @@ ch->handlers->write_header->func = *zvalue; ch->handlers->write_header->method = PHP_CURL_USER; break; +/* case CURLOPT_PASSWDFUNCTION: if (ch->handlers->passwd) { zval_ptr_dtor(&ch->handlers->passwd); @@ -851,12 +852,13 @@ error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDFUNCTION, curl_passwd); error = curl_easy_setopt(ch->cp, CURLOPT_PASSWDDATA, (void *) ch); break; +*/ case CURLOPT_POSTFIELDS: if (Z_TYPE_PP(zvalue) == IS_ARRAY || Z_TYPE_PP(zvalue) == IS_OBJECT) { zval **current; HashTable *postfields; - struct HttpPost *first = NULL; - struct HttpPost *last = NULL; + struct curl_httppost *first = NULL; + struct curl_httppost *last = NULL; char *postval; char *string_key = NULL; ulong num_key; >Release-Note: >Audit-Trail: >Unformatted: