From f976af56a4352d0406b930528beec105df13cacb Mon Sep 17 00:00:00 2001 From: zwelch Date: Tue, 12 May 2009 08:35:17 +0000 Subject: [PATCH] Audit and remove redundant uses of replacements.h in the tree. git-svn-id: svn://svn.berlios.de/openocd/trunk@1761 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/helper/fileio.h | 4 ++-- src/helper/jim-eventloop.c | 5 ----- src/helper/jim.c | 2 -- src/helper/log.h | 1 - src/helper/replacements.c | 16 ++++++---------- src/helper/replacements.h | 2 -- src/target/algorithm.c | 1 - src/target/target.h | 2 -- 8 files changed, 8 insertions(+), 25 deletions(-) diff --git a/src/helper/fileio.h b/src/helper/fileio.h index 36e749b26..e62f0ba8e 100644 --- a/src/helper/fileio.h +++ b/src/helper/fileio.h @@ -26,9 +26,9 @@ #ifndef FILEIO_H #define FILEIO_H -#define FILEIO_MAX_ERROR_STRING (128) +#include "types.h" -#include "replacements.h" +#define FILEIO_MAX_ERROR_STRING (128) enum fileio_type { diff --git a/src/helper/jim-eventloop.c b/src/helper/jim-eventloop.c index d53a76db4..7524d39fd 100644 --- a/src/helper/jim-eventloop.c +++ b/src/helper/jim-eventloop.c @@ -61,11 +61,6 @@ #include "jim-eventloop.h" #endif -#include "replacements.h" - - -/* --- */ - /* File event structure */ typedef struct Jim_FileEvent { void *handle; diff --git a/src/helper/jim.c b/src/helper/jim.c index e344ef590..261b86029 100644 --- a/src/helper/jim.c +++ b/src/helper/jim.c @@ -56,8 +56,6 @@ #include #include -#include "replacements.h" - /* Include the platform dependent libraries for * dynamic loading of libraries. */ #ifdef JIM_DYNLIB diff --git a/src/helper/log.h b/src/helper/log.h index 4f781991c..1a032b261 100644 --- a/src/helper/log.h +++ b/src/helper/log.h @@ -26,7 +26,6 @@ #ifndef ERROR_H #define ERROR_H -#include "replacements.h" #include "command.h" /* logging priorities diff --git a/src/helper/replacements.c b/src/helper/replacements.c index cc0c242ae..6b367fa84 100644 --- a/src/helper/replacements.c +++ b/src/helper/replacements.c @@ -23,17 +23,10 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - /* DANGER!!!! These must be defined *BEFORE* replacements.h and the malloc() macro!!!! */ #include #include -#ifdef HAVE_STRINGS_H -#include -#endif /* * clear_malloc * @@ -65,9 +58,12 @@ void *fill_malloc(size_t size) } #define IN_REPLACEMENTS_C -#include "replacements.h" - -#include +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef HAVE_STRINGS_H +#include +#endif #ifdef _WIN32 #include diff --git a/src/helper/replacements.h b/src/helper/replacements.h index 34e5daa44..7ecbbb220 100644 --- a/src/helper/replacements.h +++ b/src/helper/replacements.h @@ -26,8 +26,6 @@ #ifndef REPLACEMENTS_H #define REPLACEMENTS_H -#include "types.h" - /* MIN,MAX macros */ #ifndef MIN #define MIN(a,b) (((a)<(b))?(a):(b)) diff --git a/src/target/algorithm.c b/src/target/algorithm.c index a3672b201..664aeb276 100644 --- a/src/target/algorithm.c +++ b/src/target/algorithm.c @@ -22,7 +22,6 @@ #endif #include "algorithm.h" -#include "replacements.h" #include "binarybuffer.h" diff --git a/src/target/target.h b/src/target/target.h index a664dc34b..4a6dde1ad 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -30,8 +30,6 @@ #include "algorithm.h" #include "command.h" -#include "replacements.h" - struct reg_s; struct trace_s; struct command_context_s;