[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Re: [Mingw-users] Problems Building "GROFF" with MinGW
From: |
Werner LEMBERG |
Subject: |
Re: [Groff] Re: [Mingw-users] Problems Building "GROFF" with MinGW |
Date: |
Mon, 21 Jul 2003 11:35:32 +0200 (CEST) |
> --- org/strerror.c Wed Jul 16 12:54:12 2003
> +++ new/strerror.c Fri Jul 18 16:05:18 2003
> @@ -22,13 +22,21 @@
> #endif
>
> #include <stdio.h>
> +#ifdef __MINGW32__
> +/* added 17-Jul-2003 by Keith Marshall <address@hidden> ...
> + * so we can find declaration of "sys_nerr" in MinGW */
> +#include <stdlib.h>
> +#endif
I think the simplest solution is to include stdlib.h unconditionally
in strerror.c (I've done that now in the CVS). Or is there a special
reason to include it for MINGW only?
> -#ifndef HAVE_SYS_ERRLIST
> +#if !( defined HAVE_SYS_ERRLIST || defined __MINGW32__ )
> +/* modified 18-Jul-2003 by Keith Marshall <address@hidden> ...
> + * even though we don't HAVE_SYS_ERRLIST, MinGW doesn't want this ...
> + * because it is defined as a macro in <stdlib.h> */
> extern char *sys_errlist[];
> #endif
Hmm, in groff's aclocal.m4 the test for HAVE_SYS_ERRLIST only tests
errno.h and stdio.h. It should be straightforward to test stdlib.h
also. This fixes the problem in a more elegant way, I think (I've
done that now in the CVS). Can you test it?
> I haven't really looked into this yet, but I already know how to fix
> the "mkdir" problem, and I expect to find the "fork" and "wait" will
> be coupled with an "exec...", which I can replace with the
> corresponding "spawn..." -- do I need to #include <process.h>, as I
> used to with MSC-6?
Have a look into src/roff/groff/pipeline.c, function run_pipeline. It
should be straightforward to adapt this code to grohtml.
Werner