cvs: pecl /phar config.w32 phar.c phar_internal.h phar_object.c tar.c zip.c

From: Date: Mon, 28 Jan 2008 14:39:17 +0000
Subject: cvs: pecl /phar config.w32 phar.c phar_internal.h phar_object.c tar.c zip.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-9613@lists.php.net to get a copy of this message
sfox Mon Jan 28 14:39:17 2008 UTC Modified files: /pecl/phar config.w32 phar.c phar_internal.h phar_object.c tar.c zip.c Log: - Moved phar_unixify_path_separators() to a single central point - The last two VC 6 compiler warnings gone. Please test under *nix. http://cvs.php.net/viewvc.cgi/pecl/phar/config.w32?r1=1.26&r2=1.27&diff_format=u Index: pecl/phar/config.w32 diff -u pecl/phar/config.w32:1.26 pecl/phar/config.w32:1.27 --- pecl/phar/config.w32:1.26 Mon Jan 28 08:52:06 2008 +++ pecl/phar/config.w32 Mon Jan 28 14:39:16 2008 @@ -1,10 +1,10 @@ -// $Id: config.w32,v 1.26 2008/01/28 08:52:06 cellog Exp $ +// $Id: config.w32,v 1.27 2008/01/28 14:39:16 sfox Exp $ // vim:ft=javascript ARG_ENABLE("phar", "enable phar support", "no"); if (PHP_PHAR != "no") { - EXTENSION("phar", "util.c dirstream.c func_interceptors.c phar.c phar_object.c phar_path_check.c stream.c tar.c zip.c"); + EXTENSION("phar", "dirstream.c func_interceptors.c phar.c phar_object.c phar_path_check.c stream.c tar.c util.c zip.c"); if (PHP_PHAR_SHARED) { ADD_FLAG("CFLAGS_PHAR", "/D COMPILE_DL_PHAR "); } http://cvs.php.net/viewvc.cgi/pecl/phar/phar.c?r1=1.282&r2=1.283&diff_format=u Index: pecl/phar/phar.c diff -u pecl/phar/phar.c:1.282 pecl/phar/phar.c:1.283 --- pecl/phar/phar.c:1.282 Mon Jan 28 08:52:06 2008 +++ pecl/phar/phar.c Mon Jan 28 14:39:16 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar.c,v 1.282 2008/01/28 08:52:06 cellog Exp $ */ +/* $Id: phar.c,v 1.283 2008/01/28 14:39:16 sfox Exp $ */ #define PHAR_MAIN 1 #include "phar_internal.h" @@ -71,21 +71,6 @@ } /* }}}*/ -#ifdef PHP_WIN32 -static inline void phar_unixify_path_separators(char *path, int path_len) /* {{{ */ -{ - char *s; - - /* unixify win paths */ - for (s = path; s - path < path_len; s++) { - if (*s == '\\') { - *s = '/'; - } - } -} -/* }}} */ -#endif - static void phar_split_extract_list(TSRMLS_D) { char *tmp = estrdup(PHAR_GLOBALS->extract_list); @@ -868,7 +853,7 @@ buffer += entry.filename_len; PHAR_GET_32(buffer, entry.uncompressed_filesize); PHAR_GET_32(buffer, entry.timestamp); - if (offset == halt_offset + manifest_len + 4) { + if (offset == halt_offset + (int)manifest_len + 4) { mydata->min_timestamp = entry.timestamp; mydata->max_timestamp = entry.timestamp; } else { @@ -2702,7 +2687,7 @@ php_info_print_table_header(2, "Phar: PHP Archive support", "enabled"); php_info_print_table_row(2, "Phar EXT version", PHAR_EXT_VERSION_STR); php_info_print_table_row(2, "Phar API version", PHAR_API_VERSION_STR); - php_info_print_table_row(2, "CVS revision", "$Revision: 1.282 $"); + php_info_print_table_row(2, "CVS revision", "$Revision: 1.283 $"); php_info_print_table_row(2, "Phar-based phar archives", "enabled"); php_info_print_table_row(2, "Tar-based phar archives", "enabled"); php_info_print_table_row(2, "ZIP-based phar archives", "enabled"); http://cvs.php.net/viewvc.cgi/pecl/phar/phar_internal.h?r1=1.72&r2=1.73&diff_format=u Index: pecl/phar/phar_internal.h diff -u pecl/phar/phar_internal.h:1.72 pecl/phar/phar_internal.h:1.73 --- pecl/phar/phar_internal.h:1.72 Mon Jan 28 08:52:06 2008 +++ pecl/phar/phar_internal.h Mon Jan 28 14:39:16 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar_internal.h,v 1.72 2008/01/28 08:52:06 cellog Exp $ */ +/* $Id: phar_internal.h,v 1.73 2008/01/28 14:39:16 sfox Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -332,6 +332,18 @@ BEGIN_EXTERN_C() #ifdef PHP_WIN32 char *tsrm_strtok_r(char *s, const char *delim, char **last); + +static inline void phar_unixify_path_separators(char *path, int path_len) +{ + char *s; + + /* unixify win paths */ + for (s = path; s - path < path_len; s++) { + if (*s == '\\') { + *s = '/'; + } + } +} #endif void phar_request_initialize(TSRMLS_D); http://cvs.php.net/viewvc.cgi/pecl/phar/phar_object.c?r1=1.135&r2=1.136&diff_format=u Index: pecl/phar/phar_object.c diff -u pecl/phar/phar_object.c:1.135 pecl/phar/phar_object.c:1.136 --- pecl/phar/phar_object.c:1.135 Mon Jan 28 08:52:06 2008 +++ pecl/phar/phar_object.c Mon Jan 28 14:39:16 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar_object.c,v 1.135 2008/01/28 08:52:06 cellog Exp $ */ +/* $Id: phar_object.c,v 1.136 2008/01/28 14:39:16 sfox Exp $ */ #include "phar_internal.h" #include "func_interceptors.h" @@ -29,21 +29,6 @@ static zend_class_entry *phar_ce_entry; #endif -#ifdef PHP_WIN32 -static inline void phar_unixify_path_separators(char *path, int path_len) /* {{{ */ -{ - char *s; - - /* unixify win paths */ - for (s = path; s - path < path_len; s++) { - if (*s == '\\') { - *s = '/'; - } - } -} -/* }}} */ -#endif - static int phar_get_extract_list(void *pDest, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { zval *return_value = va_arg(args, zval*); http://cvs.php.net/viewvc.cgi/pecl/phar/tar.c?r1=1.15&r2=1.16&diff_format=u Index: pecl/phar/tar.c diff -u pecl/phar/tar.c:1.15 pecl/phar/tar.c:1.16 --- pecl/phar/tar.c:1.15 Mon Jan 28 08:52:06 2008 +++ pecl/phar/tar.c Mon Jan 28 14:39:16 2008 @@ -37,20 +37,6 @@ } /* }}} */ -#ifdef PHP_WIN32 -static inline void phar_unixify_path_separators(char *path, int path_len) /* {{{ */ -{ - char *s; - - /* unixify win paths */ - for (s = path; s - path < path_len; s++) { - if (*s == '\\') { - *s = '/'; - } - } -} -/* }}} */ -#endif /* adapted from format_octal() in libarchive * * Copyright (c) 2003-2007 Tim Kientzle http://cvs.php.net/viewvc.cgi/pecl/phar/zip.c?r1=1.9&r2=1.10&diff_format=u Index: pecl/phar/zip.c diff -u pecl/phar/zip.c:1.9 pecl/phar/zip.c:1.10 --- pecl/phar/zip.c:1.9 Mon Jan 28 08:52:06 2008 +++ pecl/phar/zip.c Mon Jan 28 14:39:16 2008 @@ -18,21 +18,6 @@ #include "phar_internal.h" -#ifdef PHP_WIN32 -static inline void phar_unixify_path_separators(char *path, int path_len) /* {{{ */ -{ - char *s; - - /* unixify win paths */ - for (s = path; s - path < path_len; s++) { - if (*s == '\\') { - *s = '/'; - } - } -} -/* }}} */ -#endif - static int phar_zip_process_extra(php_stream *fp, phar_entry_info *entry, php_uint16 len TSRMLS_DC) { union { @@ -656,7 +641,7 @@ /* set alias */ if (phar->is_explicit_alias) { entry.fp = php_stream_fopen_tmpfile(); - if (phar->alias_len != php_stream_write(entry.fp, phar->alias, phar->alias_len)) { + if (phar->alias_len != (int)php_stream_write(entry.fp, phar->alias, phar->alias_len)) { if (error) { spprintf(error, 0, "unable to set alias in new zip-based phar \"%s\"", phar->fname); }

« previous php.pecl.cvs (#9613) next »