bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: [Mingw-users] Re: More patch 2.5.9 hacking


From: Earnie Boyd
Subject: Re: [Mingw-users] Re: More patch 2.5.9 hacking
Date: Sun, 26 Oct 2003 10:15:54 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130

Manu wrote:

If MinGW developers accept the following changes to MinGW's unistd.h,
it would definitely fix that problem, in a very clean way:

<unistd.h>
/*
 * This file is part of the Mingw32 package.
 *
 * unistd.h maps (roughly) to io.h
 */

#ifndef __STRICT_ANSI__
Add an error here:
#ifdef mkdir
# error You have defined mkdir as a macro
#endif

#include <io.h>
#include <process.h>

#ifndef mkdir
Remove this conditional since we've already check for definition and presented an error.
# define mkdir(name, mode) ((mkdir) (name))
Change this to
#define mkdir(name, mode) ((_mkdir) (name))

You must use the MS defined _mkdir reference.
#endif

#endif

</unistd.h>

Since unistd.h is not a standard header under Windows,
adding a bit more of Unix inside shouldn't bring the chaos,
it would fix a very common and so boring problem, then
porters will concentrate their efforts on something more
_consistent_.


Yes I agree.

Earnie.
--
http://www.mingw.org
Powered by SourceForge <http://sourceforge.net/projects/mingw>





reply via email to

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