From: zwelch Date: Tue, 12 May 2009 08:35:17 +0000 (+0000) Subject: Audit and remove redundant uses of replacements.h in the tree. X-Git-Tag: v0.2.0~748 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f976af56a4352d0406b930528beec105df13cacb;p=openocd 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 --- diff --git a/src/helper/fileio.h b/src/helper/fileio.h index 36e749b2..e62f0ba8 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 d53a76db..7524d39f 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 e344ef59..261b8602 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 4f781991..1a032b26 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 cc0c242a..6b367fa8 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 34e5daa4..7ecbbb22 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 a3672b20..664aeb27 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 a664dc34..4a6dde1a 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;