[PATCH 1/3] Detect GDB is in cygwin

Eli Zaretskii eliz@gnu.org
Mon Jul 29 15:38:00 GMT 2013


> From: Yao Qi <yao@codesourcery.com>
> 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).



More information about the Gdb-patches mailing list