make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug report: Compile with Microsoft and Intel compiler


From: Eli Zaretskii
Subject: Re: Bug report: Compile with Microsoft and Intel compiler
Date: Wed, 27 Apr 2005 17:55:10 +0300

> From: =?iso-8859-1?Q?Jerker_B=E4ck?= <address@hidden>
> Cc: <address@hidden>
> 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?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]