From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1720 invoked by alias); 29 Jul 2013 15:38:16 -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 1708 invoked by uid 89); 29 Jul 2013 15:38:15 -0000 X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,RDNS_NONE,SPF_SOFTFAIL autolearn=no version=3.3.1 Received: from Unknown (HELO mtaout23.012.net.il) (80.179.55.175) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 29 Jul 2013 15:38:12 +0000 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0MQP00E00F3CF300@a-mtaout23.012.net.il> for gdb-patches@sourceware.org; Mon, 29 Jul 2013 18:38:04 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MQP00EEZFFB8E90@a-mtaout23.012.net.il>; Mon, 29 Jul 2013 18:37:59 +0300 (IDT) Date: Mon, 29 Jul 2013 15:38:00 -0000 From: Eli Zaretskii Subject: Re: [PATCH 1/3] Detect GDB is in cygwin In-reply-to: <1375087546-22591-2-git-send-email-yao@codesourcery.com> To: Yao Qi Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83txjdxtpd.fsf@gnu.org> References: <1375087546-22591-1-git-send-email-yao@codesourcery.com> <1375087546-22591-2-git-send-email-yao@codesourcery.com> X-SW-Source: 2013-07/txt/msg00705.txt.bz2 > From: Yao Qi > Date: Mon, 29 Jul 2013 16:45:44 +0800 > > The C code is simple, but getting these simple c code compiled on > various mingw compilers is not simple, due to different header files > they shipped. I change configure.ac to first check winternl.h, if it > is not found, check other needed headers. Then invoke AC_TRY_COMPILE > to test whether I can use function NtQueryInformationFile. Thanks. However, I'm not sure you need to probe NtQueryInformationFile at configure time, as long as GDB probes for it at run time. That is the usual way of using APIs that might not be available on older Windows systems. Probing at compile time is worse than at run time, because it assumes that GDB will run on the same machine where it was built, which is a bad assumption, especially on Windows, where people like to install precompiled binaries. Otherwise, the patch looks good to me (although I only read it, didn't try to build with it).