cvs: pecl /zip php_zip.c zip_stream.c /zip/lib zip_win32.h
| From: | Rob Richards | Date: | Mon, 13 Mar 2006 22:10:24 +0000 |
| Subject: | cvs: pecl /zip php_zip.c zip_stream.c /zip/lib zip_win32.h | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-5453@lists.php.net to get a copy of this message | ||
rrichards Mon Mar 13 22:10:24 2006 UTC
Modified files:
/pecl/zip php_zip.c zip_stream.c
/pecl/zip/lib zip_win32.h
Log:
make it build on windows
fix stream ops
http://cvs.php.net/viewcvs.cgi/pecl/zip/php_zip.c?r1=1.29&r2=1.30&diff_format=u
Index: pecl/zip/php_zip.c
diff -u pecl/zip/php_zip.c:1.29 pecl/zip/php_zip.c:1.30
--- pecl/zip/php_zip.c:1.29 Mon Mar 13 01:48:21 2006
+++ pecl/zip/php_zip.c Mon Mar 13 22:10:23 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_zip.c,v 1.29 2006/03/13 01:48:21 pajoye Exp $ */
+/* $Id: php_zip.c,v 1.30 2006/03/13 22:10:23 rrichards Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -368,8 +368,7 @@
{
ze_zip_object *obj;
zip_prop_handler *hnd;
- obj = (ze_zip_object *)zend_objects_get_address(object TSRMLS_CC);
- HashTable *props = obj->zo.properties;
+ HashTable *props;
zval *val;
int ret;
char *key;
@@ -377,6 +376,9 @@
HashPosition pos;
ulong num_key;
+ obj = (ze_zip_object *)zend_objects_get_address(object TSRMLS_CC);
+ props = obj->zo.properties;
+
if (obj->prop_handler == NULL) {
return NULL;
}
@@ -1329,7 +1331,7 @@
php_info_print_table_start();
{
php_info_print_table_row(2, "Zip", "enabled");
- php_info_print_table_row(2, "$Id: php_zip.c,v 1.29 2006/03/13 01:48:21 pajoye Exp $",
"enabled");
+ php_info_print_table_row(2, "$Id: php_zip.c,v 1.30 2006/03/13 22:10:23 rrichards Exp
$", "enabled");
php_info_print_table_row(2, "Libzip version", "0.6.1");
}
php_info_print_table_end();
http://cvs.php.net/viewcvs.cgi/pecl/zip/zip_stream.c?r1=1.5&r2=1.6&diff_format=u
Index: pecl/zip/zip_stream.c
diff -u pecl/zip/zip_stream.c:1.5 pecl/zip/zip_stream.c:1.6
--- pecl/zip/zip_stream.c:1.5 Mon Mar 13 01:49:53 2006
+++ pecl/zip/zip_stream.c Mon Mar 13 22:10:23 2006
@@ -1,4 +1,4 @@
-/* $Id: zip_stream.c,v 1.5 2006/03/13 01:49:53 pajoye Exp $ */
+/* $Id: zip_stream.c,v 1.6 2006/03/13 22:10:23 rrichards Exp $ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -45,7 +45,7 @@
/* }}} */
/* {{{ php_zip_ops_write */
-static size_t php_zip_ops_write(php_stream *stream, char *buf, size_t count TSRMLS_DC)
+static size_t php_zip_ops_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC)
{
STREAM_DATA_FROM_STREAM();
@@ -58,7 +58,7 @@
/* }}} */
/* {{{ php_zip_ops_close */
-static int php_zip_ops_close(php_stream *stream, int close_handle, size_t count TSRMLS_DC)
+static int php_zip_ops_close(php_stream *stream, int close_handle TSRMLS_DC)
{
STREAM_DATA_FROM_STREAM();
if (close_handle && self->za) {
@@ -72,15 +72,16 @@
/* }}} */
/* {{{ php_zip_ops_flush */
-static int php_zip_ops_flush(php_stream *stream, char *buf, size_t count TSRMLS_DC)
+static int php_zip_ops_flush(php_stream *stream TSRMLS_DC)
{
+
STREAM_DATA_FROM_STREAM();
if (!stream) {
return 0;
}
- return count;
+ return 0;
}
/* }}} */
http://cvs.php.net/viewcvs.cgi/pecl/zip/lib/zip_win32.h?r1=1.1&r2=1.2&diff_format=u
Index: pecl/zip/lib/zip_win32.h
diff -u pecl/zip/lib/zip_win32.h:1.1 pecl/zip/lib/zip_win32.h:1.2
--- pecl/zip/lib/zip_win32.h:1.1 Wed Jan 18 00:28:50 2006
+++ pecl/zip/lib/zip_win32.h Mon Mar 13 22:10:23 2006
@@ -21,8 +21,9 @@
#ifndef mkstemp
# define mkstemp(t) _creat(_mktemp(t), _S_IREAD|_S_IWRITE)
#endif
+/*
#ifndef fseeko
# define fseeko fseek
#endif
-
+*/
#endif