summaryrefslogtreecommitdiff
path: root/ext/zip/lib/zip_source_file.c
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2006-11-15 19:14:02 +0000
committerPierre Joye <pajoye@php.net>2006-11-15 19:14:02 +0000
commit892c00bb9f8ab68a870de5ec7f252d88048c69a4 (patch)
treeb8a6ddc4c0c9caa4422e4fa1e056cf65acb0a6fa /ext/zip/lib/zip_source_file.c
parent82fb3e00b8259d6be0c1d2274069d4235846e6d6 (diff)
downloadphp-git-892c00bb9f8ab68a870de5ec7f252d88048c69a4.tar.gz
#9278 and #39506, force the binary mode for the zip operation only. At least I do not have to set/restore it in each function.
Diffstat (limited to 'ext/zip/lib/zip_source_file.c')
-rw-r--r--ext/zip/lib/zip_source_file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/zip/lib/zip_source_file.c b/ext/zip/lib/zip_source_file.c
index f06b32fec6..d635da3421 100644
--- a/ext/zip/lib/zip_source_file.c
+++ b/ext/zip/lib/zip_source_file.c
@@ -62,6 +62,10 @@ zip_source_file(struct zip *za, const char *fname, off_t start, off_t len)
return NULL;
}
+#ifdef PHP_WIN32
+ _setmode(_fileno(fp), _O_BINARY );
+#endif
+
if ((zs=zip_source_filep(za, fp, start, len)) == NULL) {
fclose(fp);
return NULL;