This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [MinGW-w64]Build gdb/ctf.c failed
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: asmwarrior at gmail dot com, tromey at redhat dot com, yao at codesourcery dot com, gdb-patches at sourceware dot org
- Date: Mon, 25 Mar 2013 09:30:40 +0100
- Subject: Re: [MinGW-w64]Build gdb/ctf.c failed
- References: <83ip4s4ixc dot fsf at gnu dot org> <1363407692-18959-1-git-send-email-yao at codesourcery dot com> <1363407692-18959-4-git-send-email-yao at codesourcery dot com> <CADPb22RwSq0iv_gQu5PSGezQoUy0ve16M2hmL51HvM19v0M5Ow at mail dot gmail dot com> <51492077 dot 30307 at codesourcery dot com> <83sj3qyogk dot fsf at gnu dot org> <87vc8m7z1d dot fsf at fleche dot redhat dot com> <514FA117 dot 9030604 at gmail dot com> <83hajz3oef dot fsf at gnu dot org> <CAEwic4Y020-LqwtNeYFXn3oQvk5fWBFm1T5ZoAmwqPSpD=PASg at mail dot gmail dot com> <83boa73mty dot fsf at gnu dot org>
2013/3/25 Eli Zaretskii <eliz@gnu.org>:
>> Date: Mon, 25 Mar 2013 09:06:05 +0100
>> From: Kai Tietz <ktietz70@googlemail.com>
>> Cc: asmwarrior <asmwarrior@gmail.com>, tromey@redhat.com, yao@codesourcery.com,
>> gdb-patches@sourceware.org
>>
>> 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.
>
> Too bad. Gratuitous differences between the different MinGW variants
> are likely to become maintenance headaches in the long run. Like in
> this case.
>
>> 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.
>
> Posix header files can very well (and do) have non-Posix stuff, if
> that stuff is guarded by suitable preprocessor conditionals that make
> it disappear when compiled with the -std= compiler switch which
> requires Posix without extensions. So I'm surprised this argument is
> being brought up here.
You are driveling ... use the right version of the API. there is no
need to use MS private variant here at all.