Isn't the compiler supposed to take care of that?

Andi

At 09:33 PM 1/5/2005 +0000, Joe Orton wrote:
jorton          Wed Jan  5 16:33:57 2005 EDT

  Modified files:
    /php-src/ext/curl   interface.c
  Log:
  Fix #31413: curl POSTFIELDS usage on 64-bit platforms.


http://cvs.php.net/diff.php/php-src/ext/curl/interface.c?r1=1.53&r2=1.54&ty=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.53 php-src/ext/curl/interface.c:1.54 --- php-src/ext/curl/interface.c:1.53 Thu Nov 18 11:35:04 2004 +++ php-src/ext/curl/interface.c Wed Jan 5 16:33:56 2005 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */

-/* $Id: interface.c,v 1.53 2004/11/18 16:35:04 rrichards Exp $ */
+/* $Id: interface.c,v 1.54 2005/01/05 21:33:56 jorton Exp $ */

 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS

@@ -1096,18 +1096,22 @@

zend_hash_get_current_key_ex(postfields, &string_key, &string_key_len, &num_key, 0, NULL);

postval = Z_STRVAL_PP(current);
+
+ /* The arguments after _NAMELENGTH and _CONTENTSLENGTH
+ * must be explicitly cast to long in curl_formadd
+ * use since curl needs a long not an int. */
if (*postval == '@') {
error = curl_formadd(&first, &last,


CURLFORM_COPYNAME, string_key,
- CURLFORM_NAMELENGTH, string_key_len - 1,
+ CURLFORM_NAMELENGTH, (long)string_key_len - 1,


CURLFORM_FILE, ++postval,

CURLFORM_END);
} else {
error = curl_formadd(&first, &last,


CURLFORM_COPYNAME, string_key,
- CURLFORM_NAMELENGTH, string_key_len - 1,
+ CURLFORM_NAMELENGTH, (long)string_key_len - 1,


CURLFORM_COPYCONTENTS, postval,
- CURLFORM_CONTENTSLENGTH, Z_STRLEN_PP(current),
+ CURLFORM_CONTENTSLENGTH, (long)Z_STRLEN_PP(current),


CURLFORM_END);
                                        }
                                }



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to