static int _zip_changed(struct zip *, int *);
static char *_zip_create_temp_output(struct zip *, FILE **);
-\f
-
int
zip_close(struct zip *za)
{
free(temp);
return NULL;
}
+#ifdef PHP_WIN32
+ _setmode(_fileno(tfp), _O_BINARY );
+#endif
*outp = tfp;
return temp;
return NULL;
}
-
/* ZIP_CREATE gets ignored if file exists and not ZIP_EXCL,
just like open() */
if ((fp=fopen(fn, "rb")) == NULL) {
return NULL;
}
+#ifdef PHP_WIN32
+ _setmode(_fileno(fp), _O_BINARY );
+#endif
+
clearerr(fp);
fseek(fp, 0, SEEK_END);
len = ftell(fp);
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;