summaryrefslogtreecommitdiff
path: root/src/minizip/ioapi.c.diff
blob: 045d959614a5f37dac6e3f79b0f61d799f88eebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- ioapi.c.orig	2014-05-23 15:29:40.975965289 +0200
+++ ioapi.c	2014-05-23 15:29:40.975965289 +0200
@@ -6,8 +6,13 @@
    Copyright (C) 1998-2003 Gilles Vollant
 */
 
+#ifndef _WIN32_WCE
 #include <stdio.h>
 #include <stdlib.h>
+#else
+#include <stdio.h>
+//#include "celib.h"
+#endif
 #include <string.h>
 
 #include "zlib.h"
@@ -56,6 +61,10 @@
    uLong offset,
    int origin));
 
+int ZCALLBACK fflush_file_func OF((
+   voidpf opaque,
+   voidpf stream));
+
 int ZCALLBACK fclose_file_func OF((
    voidpf opaque,
    voidpf stream));
@@ -145,6 +154,15 @@
     return ret;
 }
 
+int ZCALLBACK fflush_file_func (opaque, stream)
+   voidpf opaque;
+   voidpf stream;
+{
+    int ret;
+    ret = fflush((FILE *)stream);
+    return ret;
+}
+
 int ZCALLBACK fclose_file_func (opaque, stream)
    voidpf opaque;
    voidpf stream;
@@ -171,6 +189,7 @@
     pzlib_filefunc_def->zwrite_file = fwrite_file_func;
     pzlib_filefunc_def->ztell_file = ftell_file_func;
     pzlib_filefunc_def->zseek_file = fseek_file_func;
+    pzlib_filefunc_def->zflush_file = fflush_file_func;
     pzlib_filefunc_def->zclose_file = fclose_file_func;
     pzlib_filefunc_def->zerror_file = ferror_file_func;
     pzlib_filefunc_def->opaque = NULL;