This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 14/13] Move errno.h to common-defs.h
- From: Tom Tromey <tromey at redhat dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 30 Jul 2014 19:46:12 -0600
- Subject: Re: [PATCH 14/13] Move errno.h to common-defs.h
- Authentication-results: sourceware.org; auth=none
- References: <1406644635-1011-1-git-send-email-gbenson at redhat dot com> <1406724370-20612-1-git-send-email-gbenson at redhat dot com>
>>>>> "Gary" == Gary Benson <gbenson@redhat.com> writes:
Gary> This commit moves the inclusion of errno.h to common-defs.h and
Gary> removes all other inclusions. Note that prior to this commit errno.h
Gary> was included unconditionally in defs.h, whereas in common-defs.h it is
Gary> protected by "#ifdef HAVE_ERRNO_H". This does not change the status
Gary> quo, since presumably every platform on which GDB builds has errno.h.
Gary> Is this ok to commit?
Gary> * configure.ac (AC_CHECK_HEADERS): Add errno.h.
If a header in common/, nat/, or target/ requires an autoconf define,
then the check should be added to common/common.m4 and then the various
configure scripts rebuilt.
This way we ensure that gdb and gdbserver keep in sync. There were
problems with this in the past.
I think it's fine to unconditionally include errno.h. For one thing
some files in gdb did this. Also I believe it is pulled into gnulib as
a dependency of some other module; though you'd probably want to check
this.
If you go this route then I guess it would be nice to remove errno.h
checks instead.
Tom