bjori Thu Nov 16 16:06:52 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/main/streams plain_wrapper.c
Log:
Fix ftruncate() with negative size on FreeBSD
http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.52.2.6.2.11&r2=1.52.2.6.2.12&diff_format=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.52.2.6.2.11
php-src/main/streams/plain_wrapper.c:1.52.2.6.2.12
--- php-src/main/streams/plain_wrapper.c:1.52.2.6.2.11 Fri Nov 10 13:18:35 2006
+++ php-src/main/streams/plain_wrapper.c Thu Nov 16 16:06:51 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: plain_wrapper.c,v 1.52.2.6.2.11 2006/11/10 13:18:35 dmitry Exp $ */
+/* $Id: plain_wrapper.c,v 1.52.2.6.2.12 2006/11/16 16:06:51 bjori Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -761,7 +761,7 @@
return fd == -1 ?
PHP_STREAM_OPTION_RETURN_ERR : PHP_STREAM_OPTION_RETURN_OK;
case PHP_STREAM_TRUNCATE_SET_SIZE:
- return ftruncate(fd,
*(size_t*)ptrparam) == 0 ? PHP_STREAM_OPTION_RETURN_OK :
PHP_STREAM_OPTION_RETURN_ERR;
+ return ftruncate(fd,
*(ptrdiff_t*)ptrparam) == 0 ? PHP_STREAM_OPTION_RETURN_OK :
PHP_STREAM_OPTION_RETURN_ERR;
}
default:
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php