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 14/13] Move errno.h to common-defs.h


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


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