Add a script to install the file(1) tool
[msysgit.git] / src / file / patches / 0003-On-Windows-we-do-not-have-fork.patch
blob58ac690e53480cef489833bded9d5e20f4ea524c
1 From 048a484b313ddd7054c8d3dcb9b9dc508bc1689b Mon Sep 17 00:00:00 2001
2 From: Johannes Schindelin <johannes.schindelin@gmx.de>
3 Date: Mon, 7 Dec 2009 17:21:52 +0100
4 Subject: [PATCH 3/6] On Windows, we do not have fork()
6 Unfortunately, that means that we cannot easily uncompress if it is
7 not covered by libz.
9 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
10 ---
11 src/compress.c | 5 +++++
12 1 files changed, 5 insertions(+), 0 deletions(-)
14 diff --git a/src/compress.c b/src/compress.c
15 index b220d2e..d17c18b 100644
16 --- a/src/compress.c
17 +++ b/src/compress.c
18 @@ -380,6 +380,10 @@ uncompressbuf(struct magic_set *ms, int fd, size_t method,
19 if (method == 2)
20 return uncompressgzipped(ms, old, newch, n);
21 #endif
22 +#ifdef WIN32
23 + file_printf(ms, "Cannot uncompress (fork) on Windows");
24 + return NODATA;
25 +#else
26 (void)fflush(stdout);
27 (void)fflush(stderr);
29 @@ -493,4 +497,5 @@ err:
31 return n;
33 +#endif /* WIN32 */
35 --
36 1.6.5.1.1371.g1abf3