Mark msysGit as obsolete
[msysgit.git] / src / file / patches / 0003-On-Windows-we-do-not-have-fork.patch
blobdbb606cab75ba102d7517f4d8f4f0fc6f32211f7
1 From 0624a5047bfe5e7bb26ee58f721f9329dc647851 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 10b2158..40b11bd 100644
16 --- a/src/compress.c
17 +++ b/src/compress.c
18 @@ -382,6 +382,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 @@ -495,4 +499,5 @@ err:
31 return n;
33 +#endif /* WIN32 */
35 --
36 1.7.3