This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/9] Rely on gnulib's unistd.h replacement.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]