Introduce common/common-defs.h

This commit creates a new header, common/common-defs.h, to hold
definitions common to all code under gdb/.  Both gdb/defs.h and
gdb/gdbserver/server.h are modified to include common-defs.h as
their first non-comment line; all code under gdb/ includes either
defs.h or server.h as appropriate, so common-defs.h will be the
first actual code the compiler sees.

For this initial commit common-defs.h includes only the two
config.h files.  Future commits will move more code currently
duplicated across defs.h and server.h such that shared code in
gdb/{common,target,nat} can be modified to include common-defs.h
rather than defs.h or server.h.

gdb/
2014-07-30  Gary Benson  <gbenson@redhat.com>

	* common/common-defs.h: New file.
	* Makefile.in (HFILES_NO_SRCDIR): Add common/common-defs.h.
	* defs.h: Include common-defs.h.
	Do not include config.h or build-gnulib/config.h.

gdb/gdbserver/
2014-07-30  Gary Benson  <gbenson@redhat.com>

	* server.h: Include common-defs.h.
	Do not include config.h or build-gnulib-gdbserver/config.h.
This commit is contained in:
Gary Benson
2014-07-24 15:35:45 +01:00
parent 5d4848a4bd
commit 976411d6b6
6 changed files with 45 additions and 5 deletions

View File

@ -25,8 +25,7 @@
# error gdbserver should not include gdb/defs.h
#endif
#include "config.h" /* Generated by configure. */
#include "build-gnulib/config.h"
#include "common-defs.h"
#include <sys/types.h>
#include <stdio.h>