This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/9] Rely on gnulib's unistd.h replacement.
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 28 Jun 2013 18:44:32 +0100
- Subject: Re: [PATCH 4/9] Rely on gnulib's unistd.h replacement.
- References: <20130627185200 dot 6625 dot 10526 dot stgit at brno dot lan> <20130627185229 dot 6625 dot 60141 dot stgit at brno dot lan> <51CD4DEC dot 6050104 at codesourcery dot com>
On 06/28/2013 09:48 AM, Yao Qi wrote:
> On 06/28/2013 02:52 AM, Pedro Alves wrote:
>> With gnulib's unistd module, we can assume unistd.h is always present, and that
>> STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO are always defined.
>
> So we don't have to check unistd.h by AC_CHECK_HEADERS in
> gdb/configure.ac and gdb/gdbserver/configure.ac?
>
Yeah. I had chickened out on it, thinking it might be still
necessary for the following autoconf checks, after seeing that
string.h strings.h etc. are still checked too. But if that's
the case, then the following the tests that need it should be
fixed instead, so I agree if should be removed.
Note, however, that autoconf itself through:
_AC_INCLUDES_DEFAULT_REQUIREMENTS
Always adds the check itself:
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h],
[], [], $ac_includes_default)
])# _AC_INCLUDES_DEFAULT_REQUIREMENTS
So we'll still end up checking for unistd.h and end up with
HAVE_UNISTD_H in config.h/config.h... Found that out after
wondering wth I had removed unistd.h, and config.in would still
resist changing. :-)
--
Pedro Alves