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 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


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