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 +#include "argmatch.h" #include #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 +#ifndef __MINGW32__ #include +#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); }