cvs: pecl /phar phar_object.c
| From: | Greg Beaver | Date: | Wed, 16 Jan 2008 20:17:47 +0000 |
| Subject: | cvs: pecl /phar phar_object.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-9524@lists.php.net to get a copy of this message | ||
cellog Wed Jan 16 20:17:47 2008 UTC
Modified files:
/pecl/phar phar_object.c
Log:
fix build on windows
http://cvs.php.net/viewvc.cgi/pecl/phar/phar_object.c?r1=1.125&r2=1.126&diff_format=u
Index: pecl/phar/phar_object.c
diff -u pecl/phar/phar_object.c:1.125 pecl/phar/phar_object.c:1.126
--- pecl/phar/phar_object.c:1.125 Wed Jan 16 07:24:38 2008
+++ pecl/phar/phar_object.c Wed Jan 16 20:17:46 2008
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: phar_object.c,v 1.125 2008/01/16 07:24:38 cellog Exp $ */
+/* $Id: phar_object.c,v 1.126 2008/01/16 20:17:46 cellog Exp $ */
#include "phar_internal.h"
#include "func_interceptors.h"
@@ -1518,6 +1518,7 @@
}
} else {
zval *userz;
+ long tmp;
if (source->is_tar) {
phar_entry_info *entry;
@@ -1536,7 +1537,8 @@
/* copy the other phar's stub */
ALLOC_ZVAL(userz);
php_stream_to_zval(source->fp, userz);
- phar_flush(&phar, (char *) &userz, -(source->internal_file_start), &error
TSRMLS_CC);
+ tmp = source->internal_file_start;
+ phar_flush(&phar, (char *) &userz, -tmp, &error TSRMLS_CC);
efree(userz);
if (source->is_tar) {
source->internal_file_start = 0;
@@ -1645,16 +1647,17 @@
if (phar.is_zip) {
_zip_free(phar.zip);
_zip_free(source->zip);
- if (FAILURE == php_copy_file(opened_path, source->fname)) {
+ if (FAILURE == php_copy_file(opened_path, source->fname TSRMLS_CC)) {
/* we can't throw an exception or bad crap will happen */
zend_error(E_ERROR, "Error: could not copy newly created zip to \"%s\", phar is
in unstable state, shutting down", source->fname);
}
source->zip = zip_open(source->fname, 0, &ziperror);
if (!source->zip) {
- efree(opened_path);
/* now for the stupid hoops libzip forces... */
char *tmp;
int tmp_len;
+
+ efree(opened_path);
tmp_len = zip_error_to_str(NULL, 0, ziperror, ziperror);
if (!(tmp = emalloc((tmp_len + 1) * sizeof(char)))) {
zend_error(E_ERROR, "Error: could not re-open newly created zip \"%s\", phar is
in unstable state, shutting down", source->fname);
@@ -1710,7 +1713,8 @@
efree(error);
return;
}
- phar_convert_to_other(phar_obj->arc.archive, 1);
+ phar_convert_to_other(phar_obj->arc.archive, 1 TSRMLS_CC);
+ RETURN_TRUE;
}
/* }}} */
@@ -1787,7 +1791,8 @@
efree(error);
return;
}
- phar_convert_to_other(phar_obj->arc.archive, 2);
+ phar_convert_to_other(phar_obj->arc.archive, 2 TSRMLS_CC);
+ RETURN_TRUE;
}
/* }}} */
@@ -1836,7 +1841,7 @@
return;
}
- phar_convert_to_other(phar_obj->arc.archive, 0);
+ phar_convert_to_other(phar_obj->arc.archive, 0 TSRMLS_CC);
RETURN_TRUE;
}
/* }}} */