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

Eli Zaretskii
2013-03-25T07:52:27Z

> Date: Mon, 25 Mar 2013 15:37:58 +0800
> From: Yao Qi <yao@codesourcery.com>
> CC: Tom Tromey <tromey@redhat.com>, Eli Zaretskii <eliz@gnu.org>, <gdb-patches@sourceware.org>
>
> I checked the msdn, and it says that "_mkdir" should be in <direct.h>.
> http://msdn.microsoft.com/en-us/library/2fkk4dzw(v=vs.80).aspx
> so looks mingw-w64 doesn't do something wrong.
>
> I am not familiar with mingw and mingw-64, and I'd like people familiar
> with mingw (Eli?) suggest what is appropriate fix to this issue. Maybe,
> we either have to include <direct.h> (with autconf checking) or import
> mkdir module in gnulib.

This isn't about _mkdir, this is about mkdir.

Is mkdir declared in MinGW64 unistd.h? If so, can you please show its
declaration from unistd.h?

Also, what other headers are included in MinGW64 unistd.h?

I dislike using Windows-specific headers in general source files.
MinGW unistd.h (which is absent from MS SDK's) was created for that
very purpose. If MinGW64 is breaking that, IMO it's a MinGW64 bug
that needs to be reported to them, while we look for the cleanest way
of fixing this annoyance.