Re: [PATCH 09/15] Mostly remove GDBSERVER from linux-waitpid.c

Doug Evans
2014-07-14T18:59:54Z

Gary Benson writes:
> This commit mostly removes the use of GDBSERVER from
> nat/linux-waitpid.c. A use remains for some debugging
> code that I will remove when the Linux thread_db code
> is refactored.
>
> gdb/
> 2014-07-09 Gary Benson <gbenson@redhat.com>
>
> * configure.ac [AC_CHECK_HEADERS] <errno.h>: New check.
> * configure: Regenerate.
> * config.in: Likewise.
> * nat/linux-waitpid.c: Don't include server.h or defs.h.
> (linux_debug) [debug_threads]: New declaration.

gdb includes errno.h unconditionally,
so the test is for some gdbserver configs (right?).

It's going to be confusing to keep all the unconditional
inclusions of errno.h and yet seeing it tested for in configure.ac.
It would be good to document why things are the way they are.
E.g., add a comment to configure.ac or some such saying the test
is needed by common code used by gdb and gdbserver.

OTOH, I see there is gnulib/import/errno.in.h.
Can we solve this with gnulib and thus make errno.h
unconditionally includable everywhere?