Re: [Mingw-users] how can I remove the declaration of mkdir ?
On Sunday 03 February 2008 10:29, Vincent Torri wrote:
> I would like to remove the declaration of mkdir, which is in io.h.
> The reason is that I am writing a lib that is porting several
> functions from the unix world, and I want to keep the same name. The
> problem here is that the mingw version of mkdir has only one
> parameter, unlike the unix one.
>
> So, for mkdir, there are 2 macros that guard it : _NO_OLDNAMES and
> _UWIN
>
> what would be the recommended way to remove mkdir declaration ? undef
> _NO_OLDNAMES or _UWIN ?
_UWIN is in there to support AT&T's UWIN platform; you definitely do not
want to be fiddling with it, when you are using MinGW.
I faced this same issue, when I ported GNU Troff (groff). I didn't need
to do any more than add this #define, (which may be found in groff's
nonposix.h header):--
#if defined(__MSDOS__) || defined(__EMX__) \
|| (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__))
:
:
# if defined(_MSC_VER) || defined(__MINGW32__)
:
:
# define mkdir(p,m) _mkdir(p)
:
:
# endif
:
#endif
See:--
http://cvs.savannah.gnu.org/viewvc/groff/src/include/nonposix.h?annotate=1.21&root=groff
for full details of this, and other similar #defines.
Regards,
Keith.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users