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 19:06:07 +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> <51CDCB80 dot 1010400 at redhat dot com>
On 06/28/2013 06:44 PM, Pedro Alves wrote:
> 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.
I take that back. I managed to get myself confused, and kind of
forget what I saw yesterday.
We have this in configure.ac:
# Check the return and argument types of ptrace. No canned test for
# this, so roll our own.
gdb_ptrace_headers='
#if HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
#if HAVE_SYS_PTRACE_H
# include <sys/ptrace.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
See my other message to Tom.
--
Pedro Alves