summarylogtreecommitdiffstats
path: root/mingw.patch
blob: 9d9b25ef48df95d036580ed4306a16c864c37503 (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
52
53
54
55
56
57
diff -ru pinard-Recode-2127b34/src/common.h patched/src/common.h
--- pinard-Recode-2127b34/src/common.h	2008-02-19 05:13:35.000000000 +0100
+++ patched/src/common.h	2014-01-01 01:31:11.144541519 +0100
@@ -106,7 +106,7 @@
 # endif
 #endif
 
-#include <argmatch.h>
+#include "argmatch.h"
 
 #include <errno.h>
 #ifndef errno
diff -ru pinard-Recode-2127b34/src/task.c patched/src/task.c
--- pinard-Recode-2127b34/src/task.c	2008-02-19 05:13:35.000000000 +0100
+++ patched/src/task.c	2014-01-01 01:25:00.459235302 +0100
@@ -25,7 +25,9 @@
 
 #include <sys/types.h>
 
+#ifndef __MINGW32__
 #include <sys/wait.h>
+#endif
 /* Bruno suggests the following, from GNU make 3.79.0.2 in `job.c'.  He also
    remarks that on Linux, WEXITSTATUS are bits 15..8 and WTERMSIG are bits
    7..0, while BeOS uses the contrary.  */
--- pinard-Recode-2127b34/src/argmatch.c	2008-02-19 05:13:35.000000000 +0100
+++ patched/src/argmatch.c	2014-01-01 14:53:19.232440132 +0100
@@ -159,7 +159,12 @@
 			? _("invalid argument %s for `%s'")
 			: _("ambiguous argument %s for `%s'"));
 
+#ifdef __MINGW32__
+  printf(format, quotearg_style (ARGMATCH_QUOTING_STYLE, value), context);
+  exit(0); 
+#else
   error (0, 0, format, quotearg_style (ARGMATCH_QUOTING_STYLE, value), context);
+#endif
 }
 
 /* List the valid arguments for argmatch.
--- pinard-Recode-2127b34/src/xmalloc.c	2008-02-19 05:13:35.000000000 +0100
+++ patched/src/xmalloc.c	2014-01-01 14:54:28.480302476 +0100
@@ -70,10 +70,14 @@
 {
   if (xalloc_fail_func)
     (*xalloc_fail_func) ();
+#ifdef __MINGW32__
+  printf("%s", _(xalloc_msg_memory_exhausted));
+#else
   error (xalloc_exit_failure, 0, "%s", _(xalloc_msg_memory_exhausted));
   /* The `noreturn' cannot be given to error, since it may return if
      its first argument is 0.  To help compilers understand the
      xalloc_die does terminate, call exit. */
+#endif
   exit (EXIT_FAILURE);
 }