Re: [MinGW-w64]Build gdb/ctf.c failed

Kai Tietz
2013-03-25T08:06:21Z

2013/3/25 Eli Zaretskii <eliz@gnu.org>:
>> Date: Mon, 25 Mar 2013 08:57:59 +0800
>> From: asmwarrior <asmwarrior@gmail.com>
>> CC: Eli Zaretskii <eliz@gnu.org>, Yao Qi <yao@codesourcery.com>,
>> gdb-patches@sourceware.org
>>
>> I found that _mkdir was declared in the file: direct.h in MinGW-w64 SDKs:
>> _CRTIMP int __cdecl _mkdir(const char *_Path);
>
> Isn't _mkdir also declared in io.h?

No, it isn't. It is a flaw to declare it there. The unistd.h header
is a POSIX one. _mkdir is for sure no POSIX variant, so its
declaration doesn't belong somewhere else.

The function 'mkdir' (please note it is without leading underscore),
is declared in io.h header, which is of course include within unistd.h
header.

Regards,
Kai