PATCH: a bit further with a cygwin build (fixed patch)
Francois Gouget
fgouget at free.fr
Tue Jul 30 22:47:42 CDT 2002
On Tue, 30 Jul 2002, Rafael Kitover wrote:
> Sorry, due to brain-deadness on my part the previous version of this
> patch didn't build properly. This version is much cleaner and builds
> properly on linux.
> +#ifndef HAVE__FSTAT
> int _fstat(int fd, struct _stat* buf)
> +#else
> +int MSVCRT(_fstat)(int fd, struct _stat* buf)
> +#endif /* HAVE__FSTAT */
...
> +#ifndef HAVE__STAT
> int _stat(const char* path, struct _stat * buf)
> +#else
> +int MSVCRT(_stat)(const char* path, struct _stat * buf)
> +#endif /* HAVE__STAT */
You should systematically use MSVCRT(_fstat) and MSVCRT(_stat). Your
previous patch was better :-)
Basically, we use MSVCRT(xxx) for all symbols for which we may get a
conflict with the native C library headers. On Unix systyems, the _xxx
functions are never defined (though there may be a couple of exceptions)
so we don't use MSVCRT() for readability's sake. But if you find a
system where there is a conflict, then it's best to just systematically
use MSVCRT() than to use ifdefs that make it even harder to read.
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
Any sufficiently advanced Operating System is indistinguishable from Linux
More information about the wine-devel
mailing list