> From: =?iso-8859-1?Q?Jerker_B=E4ck?= <[EMAIL PROTECTED]>
> Cc: <[email protected]>
> Date: Wed, 27 Apr 2005 16:04:35 +0200
> 
> ??? You mean to make an empty "dummy" unistd.h for Windows machines in
> w32/include or create a custom windows unistd.h?

Not an empty file, of course; a w32/include/unistd.h that will hold
prototypes of functions that on Posix platforms are expected to be
found in unistd.h.  Examples include chdir, getcwd, dup2, getpid.

> Your great suggestion of using "HAVE_STDLIB" instead of all these
> #if defined(...) is enough, I think, at least for the MS compiler.

I don't think HAVE_STDLIB_H will cure the problems with functions
whose prototypes are not in stdlib.h, like the ones I list above (they
all appear in your report).  What I want to do is create a unistd.h
with these prototypes, and then use HAVE_UNISTD_H during compilation.

> List of redefines causing errors
> 
> Func      Microsoft     Borland
> --------------------------------
> chdir     <direct.h>    <dir.h>
> environ   <stdlib.h>    <stdlib.h>
> getcwd    <direct.h>    <dir.h>
> getenv    <stdlib.h>    <stdlib.h>
> getpid    <process.h>   <process.h>
> mktemp    <io.h>            -
> strerror  <string.h>    <string.h>

Thanks.  But these are not the only ones who caused errors, there were
others, quite a few of them from unistd.h.

And for strerror, I suggested a different solution.

As for mktemp, perhaps we could simply remove its prototype from
main.c.  Paul, is this possible? why do we have to declare prototypes
of mktemp and mkstemp there?


_______________________________________________
Make-w32 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/make-w32

Reply via email to