cvs: pecl /xdiff README.API config.w32 php_xdiff.h xdiff.c
| From: | Wez Furlong | Date: | Fri, 09 Jan 2004 00:36:22 +0000 |
| Subject: | cvs: pecl /xdiff README.API config.w32 php_xdiff.h xdiff.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-697@lists.php.net to get a copy of this message | ||
wez Thu Jan 8 19:36:22 2004 EDT
Added files:
/pecl/xdiff config.w32
Modified files:
/pecl/xdiff README.API php_xdiff.h xdiff.c
Log:
Make xdiff build under win32 as either shared or static extension.
NB: when you compile libxdiff, edit the makefile and change
/ML to /MD so that it links against correct libc.
Index: pecl/xdiff/README.API diff -u pecl/xdiff/README.API:1.1 pecl/xdiff/README.API:1.2 --- pecl/xdiff/README.API:1.1 Thu Jan 8 08:56:48 2004 +++ pecl/xdiff/README.API Thu Jan 8 19:36:21 2004 @@ -4,19 +4,22 @@ * mixed xdiff_string_diff(string str1, string str2, [int context, [bool minimal]]) -Makes unified diff of strings str1 and str2. 'context' indicates how many lines of context you want -to include in diff result. Set 'minimal' to true if you want to minimalize size of diff (can take a long time). -Returns string with result or false if an internal error happened. +Makes unified diff of strings str1 and str2. 'context' indicates how many +lines of context you want to include in diff result. Set 'minimal' to true if +you want to minimalize size of diff (can take a long time). Returns string +with result or false if an internal error happened. * bool xdiff_file_diff(string file1, string file2, string dest, [int context, [bool minimal]]) -Makes unified diff of files file1 and file2 and stores result in file dest. 'context' indicates how many lines of context you want -to include in diff result. Set 'minimal' to true if you want to minimalize size of diff (can take a long time). +Makes unified diff of files file1 and file2 and stores result in file dest. +'context' indicates how many lines of context you want to include in diff +result. Set 'minimal' to true if you want to minimalize size of diff (can take +a long time). * mixed xdiff_string_diff_binary(string str1, string str2) -Makes binary diff of strings str1 and str2. -Returns string with result or false if an internal error happened. +Makes binary diff of strings str1 and str2. Returns string with result or +false if an internal error happened. * bool xdiff_file_diff_binary(string file1, string file2, string dest) @@ -39,8 +42,8 @@ XDIFF_PATCH_NORMAL - normal patch (default) XDIFF_PATCH_REVERSE - reverse patch -Returns false if an internal error happened, string with rejected chunks of patch or true if patch was applied -successfully. +Returns false if an internal error happened, string with rejected chunks of +patch or true if patch was applied successfully. * string xdiff_string_patch_binary(string str, string patch) @@ -54,11 +57,15 @@ * string xdiff_string_merge3(string str1, string str2, string str3 [, string error]) -Merges strings 'str1', 'str2' and 'str3' into one. Returns merged string or false if an internal error happened. -If 'error' is passed then error is stored inside this variable (it is passed by reference). +Merges strings 'str1', 'str2' and 'str3' into one. Returns merged string or +false if an internal error happened. If 'error' is passed then error is +stored inside this variable (it is passed by reference). * mixed xdiff_file_merge3(string file1, string file2, string file3, string dest) -Merges files 'file1', 'file2' and 'file3' into one and stores result in file 'dest'. -Returns true if merge was successful, string with rejected chunks if it was not or false if an internal error happened. +Merges files 'file1', 'file2' and 'file3' into one and stores result in file +'dest'. Returns true if merge was successful, string with rejected chunks if +it was not or false if an internal error happened. + +vim:tw=78:et: Index: pecl/xdiff/php_xdiff.h diff -u pecl/xdiff/php_xdiff.h:1.2 pecl/xdiff/php_xdiff.h:1.3 --- pecl/xdiff/php_xdiff.h:1.2 Tue Jan 6 15:33:53 2004 +++ pecl/xdiff/php_xdiff.h Thu Jan 8 19:36:21 2004 @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 4 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2003 The PHP Group | + | Copyright (c) 1997-2004 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,14 +15,14 @@ | Author: Marcin Gibula <mg@iceni.pl> | +----------------------------------------------------------------------+ - $Id: php_xdiff.h,v 1.2 2004/01/06 20:33:53 mg Exp $ + $Id: php_xdiff.h,v 1.3 2004/01/09 00:36:21 wez Exp $ */ #ifndef PHP_XDIFF_H #define PHP_XDIFF_H extern zend_module_entry xdiff_module_entry; -#define phpext_xdiff_ptr &diff_module_entry +#define phpext_xdiff_ptr &xdiff_module_entry #ifdef PHP_WIN32 #define PHP_XDIFF_API __declspec(dllexport) Index: pecl/xdiff/xdiff.c diff -u pecl/xdiff/xdiff.c:1.3 pecl/xdiff/xdiff.c:1.4 --- pecl/xdiff/xdiff.c:1.3 Thu Jan 8 08:56:48 2004 +++ pecl/xdiff/xdiff.c Thu Jan 8 19:36:21 2004 @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 4 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2003 The PHP Group | + | Copyright (c) 1997-2004 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Marcin Gibula <mg@iceni.pl> | +----------------------------------------------------------------------+ - $Id: xdiff.c,v 1.3 2004/01/08 13:56:48 mg Exp $ + $Id: xdiff.c,v 1.4 2004/01/09 00:36:21 wez Exp $ */ #ifdef HAVE_CONFIG_H @@ -34,22 +34,22 @@ unsigned long size; }; -static int load_mm_file(const char *filepath, mmfile_t *dest); +static int load_mm_file(const char *filepath, mmfile_t *dest TSRMLS_DC); static int load_into_mm_file(const char *buffer, unsigned long size, mmfile_t *dest); static int append_string(void *ptr, mmbuffer_t *buffer, int array_size); static int append_stream(void *ptr, mmbuffer_t *buffer, int array_size); static int init_string(struct string_buffer *string); static void free_string(struct string_buffer *string); -static int make_diff(char *filepath1, char *filepath2, xdemitcb_t *output, int context, int minimal); +static int make_diff(char *filepath1, char *filepath2, xdemitcb_t *output, int context, int minimal TSRMLS_DC); static int make_diff_str(char *str1, int size1, char *str2, int size2, xdemitcb_t *output, int context, int minimal); -static int make_bdiff(char *filepath1, char *filepath2, xdemitcb_t *output); +static int make_bdiff(char *filepath1, char *filepath2, xdemitcb_t *output TSRMLS_DC); static int make_bdiff_str(char *str1, int size1, char *str2, int size2, xdemitcb_t *output); -static int make_patch(char *file_path, char *patch_path, xdemitcb_t *output, xdemitcb_t *error, int flags); +static int make_patch(char *file_path, char *patch_path, xdemitcb_t *output, xdemitcb_t *error, int flags TSRMLS_DC); static int make_patch_str(char *file, int size1, char *patch, int size2, xdemitcb_t *output, xdemitcb_t *error, int flags); -static int make_bpatch(char *file_path, char *patch_path, xdemitcb_t *output); +static int make_bpatch(char *file_path, char *patch_path, xdemitcb_t *output TSRMLS_DC); static int make_bpatch_str(char *file, int size1, char *patch, int size2, xdemitcb_t *output); -static int make_merge3(char *filepath1, char *filepath2, char *filepath3, xdemitcb_t *output, xdemitcb_t *error); +static int make_merge3(char *filepath1, char *filepath2, char *filepath3, xdemitcb_t *output, xdemitcb_t *error TSRMLS_DC); static int make_merge3_str(char *content1, int size1, char *content2, int size2, char *content3, int size3, xdemitcb_t *output, xdemitcb_t *error); /* {{{ xdiff_functions[] @@ -169,9 +169,9 @@ output.priv = output_stream; output.outf = append_stream; - retval = make_diff(filepath1, filepath2, &output, context, minimal); + retval = make_diff(filepath1, filepath2, &output, context, minimal TSRMLS_CC); if (!retval) { - php_close_stream(output_stream); + php_stream_close(output_stream); RETURN_FALSE; } @@ -232,9 +232,9 @@ output.priv = output_stream; output.outf = append_stream; - retval = make_bdiff(filepath1, filepath2, &output); + retval = make_bdiff(filepath1, filepath2, &output TSRMLS_CC); if (!retval) { - php_close_stream(output_stream); + php_stream_close(output_stream); RETURN_FALSE; } @@ -273,7 +273,7 @@ error_output.priv= &error_string; error_output.outf = append_string; - retval = make_patch(src_path, patch_path, &output, &error_output, flags); + retval = make_patch(src_path, patch_path, &output, &error_output, flags TSRMLS_CC); php_stream_close(output_stream); if (retval < 0) { @@ -323,7 +323,7 @@ error_output.priv= &error_string; error_output.outf = append_string; - retval = make_patch_str(src, size1, patch, size2, &output, &error_output, flags); + retval = make_patch_str(src, size1, patch, size2, &output, &error_output, flags); if (retval < 0) { free_string(&error_string); free_string(&output_string); @@ -367,7 +367,7 @@ output.outf = append_stream; output.priv = output_stream; - retval = make_bpatch(src_path, patch_path, &output); + retval = make_bpatch(src_path, patch_path, &output TSRMLS_CC); php_stream_close(output_stream); if (retval < 0) { @@ -441,7 +441,7 @@ error_output.priv = &string; error_output.outf = append_string; - retval = make_merge3(file1, file2, file3, &output, &error_output); + retval = make_merge3(file1, file2, file3, &output, &error_output TSRMLS_CC); php_stream_close(output_stream); if (!retval) { @@ -514,7 +514,7 @@ } /* }}} */ -static int load_mm_file(const char *filepath, mmfile_t *dest) +static int load_mm_file(const char *filepath, mmfile_t *dest TSRMLS_DC) { int retval; off_t filesize; @@ -592,6 +592,7 @@ { php_stream *stream = ptr; unsigned int i; + TSRMLS_FETCH(); for (i = 0; i < array_size; i++) { php_stream_write(stream, buffer[i].ptr, buffer[i].size); @@ -615,19 +616,19 @@ efree(string->ptr); } -static int make_diff(char *filepath1, char *filepath2, xdemitcb_t *output, int context, int minimal) +static int make_diff(char *filepath1, char *filepath2, xdemitcb_t *output, int context, int minimal TSRMLS_DC) { mmfile_t file1, file2; xpparam_t params; xdemitconf_t conf; int retval; - retval = load_mm_file(filepath1, &file1); + retval = load_mm_file(filepath1, &file1 TSRMLS_CC); if (!retval) { return 0; } - retval = load_mm_file(filepath2, &file2); + retval = load_mm_file(filepath2, &file2 TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file1); return 0; @@ -679,18 +680,18 @@ return 1; } -static int make_bdiff(char *filepath1, char *filepath2, xdemitcb_t *output) +static int make_bdiff(char *filepath1, char *filepath2, xdemitcb_t *output TSRMLS_DC) { mmfile_t file1, file2; bdiffparam_t params; int retval; - retval = load_mm_file(filepath1, &file1); + retval = load_mm_file(filepath1, &file1 TSRMLS_CC); if (!retval) { return 0; } - retval = load_mm_file(filepath2, &file2); + retval = load_mm_file(filepath2, &file2 TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file1); return 0; @@ -739,17 +740,17 @@ return 1; } -static int make_patch(char *file_path, char *patch_path, xdemitcb_t *output, xdemitcb_t *error, int flags) +static int make_patch(char *file_path, char *patch_path, xdemitcb_t *output, xdemitcb_t *error, int flags TSRMLS_DC) { int retval; mmfile_t file, patch; - retval = load_mm_file(file_path, &file); + retval = load_mm_file(file_path, &file TSRMLS_CC); if (!retval) { return 0; } - retval = load_mm_file(patch_path, &patch); + retval = load_mm_file(patch_path, &patch TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file); return 0; @@ -793,17 +794,17 @@ return 1; } -static int make_bpatch(char *file_path, char *patch_path, xdemitcb_t *output) +static int make_bpatch(char *file_path, char *patch_path, xdemitcb_t *output TSRMLS_DC) { int retval; mmfile_t file_mm, patch_mm; - retval = load_mm_file(file_path, &file_mm); + retval = load_mm_file(file_path, &file_mm TSRMLS_CC); if (!retval) { return 0; } - retval = load_mm_file(patch_path, &patch_mm); + retval = load_mm_file(patch_path, &patch_mm TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file_mm); return 0; @@ -847,23 +848,23 @@ return 1; } -static int make_merge3(char *filepath1, char *filepath2, char *filepath3, xdemitcb_t *output, xdemitcb_t *error) +static int make_merge3(char *filepath1, char *filepath2, char *filepath3, xdemitcb_t *output, xdemitcb_t *error TSRMLS_DC) { int retval; mmfile_t file1, file2, file3; - retval = load_mm_file(filepath1, &file1); + retval = load_mm_file(filepath1, &file1 TSRMLS_CC); if (!retval) { return 0; } - retval = load_mm_file(filepath2, &file2); + retval = load_mm_file(filepath2, &file2 TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file1); return 0; } - retval = load_mm_file(filepath3, &file3); + retval = load_mm_file(filepath3, &file3 TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file1); xdl_free_mmfile(&file2); Index: pecl/xdiff/config.w32 +++ pecl/xdiff/config.w32 // $Id: config.w32,v 1.1 2004/01/09 00:36:21 wez Exp $ // vim:ft=javascript ARG_WITH("xdiff", "libxdiff support", "no"); if (PHP_XDIFF != "no") { if (CHECK_LIB("xdiff.lib", "xdiff", PHP_XDIFF + ";..\\libxdiff-*") && CHECK_HEADER_ADD_INCLUDE("xdiff.h", "CFLAGS_XDIFF", PHP_XDIFF + ";..\\libxdiff-*\\xdiff")) { EXTENSION("xdiff", "xdiff.c"); } else { WARNING("did not find xdiff includes/libs"); } }
Index: pecl/xdiff/README.API diff -u pecl/xdiff/README.API:1.1 pecl/xdiff/README.API:1.2 --- pecl/xdiff/README.API:1.1 Thu Jan 8 08:56:48 2004 +++ pecl/xdiff/README.API Thu Jan 8 19:36:21 2004 @@ -4,19 +4,22 @@ * mixed xdiff_string_diff(string str1, string str2, [int context, [bool minimal]]) -Makes unified diff of strings str1 and str2. 'context' indicates how many lines of context you want -to include in diff result. Set 'minimal' to true if you want to minimalize size of diff (can take a long time). -Returns string with result or false if an internal error happened. +Makes unified diff of strings str1 and str2. 'context' indicates how many +lines of context you want to include in diff result. Set 'minimal' to true if +you want to minimalize size of diff (can take a long time). Returns string +with result or false if an internal error happened. * bool xdiff_file_diff(string file1, string file2, string dest, [int context, [bool minimal]]) -Makes unified diff of files file1 and file2 and stores result in file dest. 'context' indicates how many lines of context you want -to include in diff result. Set 'minimal' to true if you want to minimalize size of diff (can take a long time). +Makes unified diff of files file1 and file2 and stores result in file dest. +'context' indicates how many lines of context you want to include in diff +result. Set 'minimal' to true if you want to minimalize size of diff (can take +a long time). * mixed xdiff_string_diff_binary(string str1, string str2) -Makes binary diff of strings str1 and str2. -Returns string with result or false if an internal error happened. +Makes binary diff of strings str1 and str2. Returns string with result or +false if an internal error happened. * bool xdiff_file_diff_binary(string file1, string file2, string dest) @@ -39,8 +42,8 @@ XDIFF_PATCH_NORMAL - normal patch (default) XDIFF_PATCH_REVERSE - reverse patch -Returns false if an internal error happened, string with rejected chunks of patch or true if patch was applied -successfully. +Returns false if an internal error happened, string with rejected chunks of +patch or true if patch was applied successfully. * string xdiff_string_patch_binary(string str, string patch) @@ -54,11 +57,15 @@ * string xdiff_string_merge3(string str1, string str2, string str3 [, string error]) -Merges strings 'str1', 'str2' and 'str3' into one. Returns merged string or false if an internal error happened. -If 'error' is passed then error is stored inside this variable (it is passed by reference). +Merges strings 'str1', 'str2' and 'str3' into one. Returns merged string or +false if an internal error happened. If 'error' is passed then error is +stored inside this variable (it is passed by reference). * mixed xdiff_file_merge3(string file1, string file2, string file3, string dest) -Merges files 'file1', 'file2' and 'file3' into one and stores result in file 'dest'. -Returns true if merge was successful, string with rejected chunks if it was not or false if an internal error happened. +Merges files 'file1', 'file2' and 'file3' into one and stores result in file +'dest'. Returns true if merge was successful, string with rejected chunks if +it was not or false if an internal error happened. + +vim:tw=78:et: Index: pecl/xdiff/php_xdiff.h diff -u pecl/xdiff/php_xdiff.h:1.2 pecl/xdiff/php_xdiff.h:1.3 --- pecl/xdiff/php_xdiff.h:1.2 Tue Jan 6 15:33:53 2004 +++ pecl/xdiff/php_xdiff.h Thu Jan 8 19:36:21 2004 @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 4 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2003 The PHP Group | + | Copyright (c) 1997-2004 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,14 +15,14 @@ | Author: Marcin Gibula <mg@iceni.pl> | +----------------------------------------------------------------------+ - $Id: php_xdiff.h,v 1.2 2004/01/06 20:33:53 mg Exp $ + $Id: php_xdiff.h,v 1.3 2004/01/09 00:36:21 wez Exp $ */ #ifndef PHP_XDIFF_H #define PHP_XDIFF_H extern zend_module_entry xdiff_module_entry; -#define phpext_xdiff_ptr &diff_module_entry +#define phpext_xdiff_ptr &xdiff_module_entry #ifdef PHP_WIN32 #define PHP_XDIFF_API __declspec(dllexport) Index: pecl/xdiff/xdiff.c diff -u pecl/xdiff/xdiff.c:1.3 pecl/xdiff/xdiff.c:1.4 --- pecl/xdiff/xdiff.c:1.3 Thu Jan 8 08:56:48 2004 +++ pecl/xdiff/xdiff.c Thu Jan 8 19:36:21 2004 @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 4 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2003 The PHP Group | + | Copyright (c) 1997-2004 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 2.02 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Marcin Gibula <mg@iceni.pl> | +----------------------------------------------------------------------+ - $Id: xdiff.c,v 1.3 2004/01/08 13:56:48 mg Exp $ + $Id: xdiff.c,v 1.4 2004/01/09 00:36:21 wez Exp $ */ #ifdef HAVE_CONFIG_H @@ -34,22 +34,22 @@ unsigned long size; }; -static int load_mm_file(const char *filepath, mmfile_t *dest); +static int load_mm_file(const char *filepath, mmfile_t *dest TSRMLS_DC); static int load_into_mm_file(const char *buffer, unsigned long size, mmfile_t *dest); static int append_string(void *ptr, mmbuffer_t *buffer, int array_size); static int append_stream(void *ptr, mmbuffer_t *buffer, int array_size); static int init_string(struct string_buffer *string); static void free_string(struct string_buffer *string); -static int make_diff(char *filepath1, char *filepath2, xdemitcb_t *output, int context, int minimal); +static int make_diff(char *filepath1, char *filepath2, xdemitcb_t *output, int context, int minimal TSRMLS_DC); static int make_diff_str(char *str1, int size1, char *str2, int size2, xdemitcb_t *output, int context, int minimal); -static int make_bdiff(char *filepath1, char *filepath2, xdemitcb_t *output); +static int make_bdiff(char *filepath1, char *filepath2, xdemitcb_t *output TSRMLS_DC); static int make_bdiff_str(char *str1, int size1, char *str2, int size2, xdemitcb_t *output); -static int make_patch(char *file_path, char *patch_path, xdemitcb_t *output, xdemitcb_t *error, int flags); +static int make_patch(char *file_path, char *patch_path, xdemitcb_t *output, xdemitcb_t *error, int flags TSRMLS_DC); static int make_patch_str(char *file, int size1, char *patch, int size2, xdemitcb_t *output, xdemitcb_t *error, int flags); -static int make_bpatch(char *file_path, char *patch_path, xdemitcb_t *output); +static int make_bpatch(char *file_path, char *patch_path, xdemitcb_t *output TSRMLS_DC); static int make_bpatch_str(char *file, int size1, char *patch, int size2, xdemitcb_t *output); -static int make_merge3(char *filepath1, char *filepath2, char *filepath3, xdemitcb_t *output, xdemitcb_t *error); +static int make_merge3(char *filepath1, char *filepath2, char *filepath3, xdemitcb_t *output, xdemitcb_t *error TSRMLS_DC); static int make_merge3_str(char *content1, int size1, char *content2, int size2, char *content3, int size3, xdemitcb_t *output, xdemitcb_t *error); /* {{{ xdiff_functions[] @@ -169,9 +169,9 @@ output.priv = output_stream; output.outf = append_stream; - retval = make_diff(filepath1, filepath2, &output, context, minimal); + retval = make_diff(filepath1, filepath2, &output, context, minimal TSRMLS_CC); if (!retval) { - php_close_stream(output_stream); + php_stream_close(output_stream); RETURN_FALSE; } @@ -232,9 +232,9 @@ output.priv = output_stream; output.outf = append_stream; - retval = make_bdiff(filepath1, filepath2, &output); + retval = make_bdiff(filepath1, filepath2, &output TSRMLS_CC); if (!retval) { - php_close_stream(output_stream); + php_stream_close(output_stream); RETURN_FALSE; } @@ -273,7 +273,7 @@ error_output.priv= &error_string; error_output.outf = append_string; - retval = make_patch(src_path, patch_path, &output, &error_output, flags); + retval = make_patch(src_path, patch_path, &output, &error_output, flags TSRMLS_CC); php_stream_close(output_stream); if (retval < 0) { @@ -323,7 +323,7 @@ error_output.priv= &error_string; error_output.outf = append_string; - retval = make_patch_str(src, size1, patch, size2, &output, &error_output, flags); + retval = make_patch_str(src, size1, patch, size2, &output, &error_output, flags); if (retval < 0) { free_string(&error_string); free_string(&output_string); @@ -367,7 +367,7 @@ output.outf = append_stream; output.priv = output_stream; - retval = make_bpatch(src_path, patch_path, &output); + retval = make_bpatch(src_path, patch_path, &output TSRMLS_CC); php_stream_close(output_stream); if (retval < 0) { @@ -441,7 +441,7 @@ error_output.priv = &string; error_output.outf = append_string; - retval = make_merge3(file1, file2, file3, &output, &error_output); + retval = make_merge3(file1, file2, file3, &output, &error_output TSRMLS_CC); php_stream_close(output_stream); if (!retval) { @@ -514,7 +514,7 @@ } /* }}} */ -static int load_mm_file(const char *filepath, mmfile_t *dest) +static int load_mm_file(const char *filepath, mmfile_t *dest TSRMLS_DC) { int retval; off_t filesize; @@ -592,6 +592,7 @@ { php_stream *stream = ptr; unsigned int i; + TSRMLS_FETCH(); for (i = 0; i < array_size; i++) { php_stream_write(stream, buffer[i].ptr, buffer[i].size); @@ -615,19 +616,19 @@ efree(string->ptr); } -static int make_diff(char *filepath1, char *filepath2, xdemitcb_t *output, int context, int minimal) +static int make_diff(char *filepath1, char *filepath2, xdemitcb_t *output, int context, int minimal TSRMLS_DC) { mmfile_t file1, file2; xpparam_t params; xdemitconf_t conf; int retval; - retval = load_mm_file(filepath1, &file1); + retval = load_mm_file(filepath1, &file1 TSRMLS_CC); if (!retval) { return 0; } - retval = load_mm_file(filepath2, &file2); + retval = load_mm_file(filepath2, &file2 TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file1); return 0; @@ -679,18 +680,18 @@ return 1; } -static int make_bdiff(char *filepath1, char *filepath2, xdemitcb_t *output) +static int make_bdiff(char *filepath1, char *filepath2, xdemitcb_t *output TSRMLS_DC) { mmfile_t file1, file2; bdiffparam_t params; int retval; - retval = load_mm_file(filepath1, &file1); + retval = load_mm_file(filepath1, &file1 TSRMLS_CC); if (!retval) { return 0; } - retval = load_mm_file(filepath2, &file2); + retval = load_mm_file(filepath2, &file2 TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file1); return 0; @@ -739,17 +740,17 @@ return 1; } -static int make_patch(char *file_path, char *patch_path, xdemitcb_t *output, xdemitcb_t *error, int flags) +static int make_patch(char *file_path, char *patch_path, xdemitcb_t *output, xdemitcb_t *error, int flags TSRMLS_DC) { int retval; mmfile_t file, patch; - retval = load_mm_file(file_path, &file); + retval = load_mm_file(file_path, &file TSRMLS_CC); if (!retval) { return 0; } - retval = load_mm_file(patch_path, &patch); + retval = load_mm_file(patch_path, &patch TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file); return 0; @@ -793,17 +794,17 @@ return 1; } -static int make_bpatch(char *file_path, char *patch_path, xdemitcb_t *output) +static int make_bpatch(char *file_path, char *patch_path, xdemitcb_t *output TSRMLS_DC) { int retval; mmfile_t file_mm, patch_mm; - retval = load_mm_file(file_path, &file_mm); + retval = load_mm_file(file_path, &file_mm TSRMLS_CC); if (!retval) { return 0; } - retval = load_mm_file(patch_path, &patch_mm); + retval = load_mm_file(patch_path, &patch_mm TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file_mm); return 0; @@ -847,23 +848,23 @@ return 1; } -static int make_merge3(char *filepath1, char *filepath2, char *filepath3, xdemitcb_t *output, xdemitcb_t *error) +static int make_merge3(char *filepath1, char *filepath2, char *filepath3, xdemitcb_t *output, xdemitcb_t *error TSRMLS_DC) { int retval; mmfile_t file1, file2, file3; - retval = load_mm_file(filepath1, &file1); + retval = load_mm_file(filepath1, &file1 TSRMLS_CC); if (!retval) { return 0; } - retval = load_mm_file(filepath2, &file2); + retval = load_mm_file(filepath2, &file2 TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file1); return 0; } - retval = load_mm_file(filepath3, &file3); + retval = load_mm_file(filepath3, &file3 TSRMLS_CC); if (!retval) { xdl_free_mmfile(&file1); xdl_free_mmfile(&file2); Index: pecl/xdiff/config.w32 +++ pecl/xdiff/config.w32 // $Id: config.w32,v 1.1 2004/01/09 00:36:21 wez Exp $ // vim:ft=javascript ARG_WITH("xdiff", "libxdiff support", "no"); if (PHP_XDIFF != "no") { if (CHECK_LIB("xdiff.lib", "xdiff", PHP_XDIFF + ";..\\libxdiff-*") && CHECK_HEADER_ADD_INCLUDE("xdiff.h", "CFLAGS_XDIFF", PHP_XDIFF + ";..\\libxdiff-*\\xdiff")) { EXTENSION("xdiff", "xdiff.c"); } else { WARNING("did not find xdiff includes/libs"); } }