From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6972 invoked by alias); 25 Mar 2013 08:30:52 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6953 invoked by uid 89); 25 Mar 2013 08:30:45 -0000 X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_SM autolearn=ham version=3.3.1 Received: from mail-ia0-f178.google.com (HELO mail-ia0-f178.google.com) (209.85.210.178) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 25 Mar 2013 08:30:42 +0000 Received: by mail-ia0-f178.google.com with SMTP id r13so4165942iar.37 for ; Mon, 25 Mar 2013 01:30:41 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.209.4 with SMTP id mi4mr7094463igc.40.1364200241176; Mon, 25 Mar 2013 01:30:41 -0700 (PDT) Received: by 10.64.14.129 with HTTP; Mon, 25 Mar 2013 01:30:40 -0700 (PDT) In-Reply-To: <83boa73mty.fsf@gnu.org> References: <83ip4s4ixc.fsf@gnu.org> <1363407692-18959-1-git-send-email-yao@codesourcery.com> <1363407692-18959-4-git-send-email-yao@codesourcery.com> <51492077.30307@codesourcery.com> <83sj3qyogk.fsf@gnu.org> <87vc8m7z1d.fsf@fleche.redhat.com> <514FA117.9030604@gmail.com> <83hajz3oef.fsf@gnu.org> <83boa73mty.fsf@gnu.org> Date: Mon, 25 Mar 2013 10:50:00 -0000 Message-ID: Subject: Re: [MinGW-w64]Build gdb/ctf.c failed From: Kai Tietz To: Eli Zaretskii Cc: asmwarrior@gmail.com, tromey@redhat.com, yao@codesourcery.com, gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-03/txt/msg00921.txt.bz2 2013/3/25 Eli Zaretskii : >> Date: Mon, 25 Mar 2013 09:06:05 +0100 >> From: Kai Tietz >> Cc: asmwarrior , tromey@redhat.com, yao@codesourcery.com, >> gdb-patches@sourceware.org >> >> 2013/3/25 Eli Zaretskii : >> >> Date: Mon, 25 Mar 2013 08:57:59 +0800 >> >> From: asmwarrior >> >> CC: Eli Zaretskii , Yao Qi , >> >> 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.