diff options
author | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-31 11:32:28 +0000 |
---|---|---|
committer | zwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-05-31 11:32:28 +0000 |
commit | 818aa27a9d44e62f19cfdf757ac03ec9da2f730b (patch) | |
tree | 49528e471745d355044dd87f134f7f247f9e521f /src | |
parent | 4deb42ed004f90058856b1d72dda63c4843b3854 (diff) | |
download | openocd+libswd-818aa27a9d44e62f19cfdf757ac03ec9da2f730b.tar.gz openocd+libswd-818aa27a9d44e62f19cfdf757ac03ec9da2f730b.tar.bz2 openocd+libswd-818aa27a9d44e62f19cfdf757ac03ec9da2f730b.tar.xz openocd+libswd-818aa27a9d44e62f19cfdf757ac03ec9da2f730b.zip |
First step in hiding target_type_s from public interface:
- Add DEFINE_TARGET_TYPE_S symbol in files that need it defined.
- Forward declare 'struct target_type_s' only, unless that symbol is defined.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1969 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r-- | src/target/arm11.c | 1 | ||||
-rw-r--r-- | src/target/arm720t.c | 1 | ||||
-rw-r--r-- | src/target/arm7tdmi.c | 1 | ||||
-rw-r--r-- | src/target/arm920t.c | 1 | ||||
-rw-r--r-- | src/target/arm926ejs.c | 1 | ||||
-rw-r--r-- | src/target/arm966e.c | 1 | ||||
-rw-r--r-- | src/target/arm9tdmi.c | 1 | ||||
-rw-r--r-- | src/target/avrt.c | 1 | ||||
-rw-r--r-- | src/target/cortex_a8.c | 1 | ||||
-rw-r--r-- | src/target/cortex_m3.c | 1 | ||||
-rw-r--r-- | src/target/feroceon.c | 1 | ||||
-rw-r--r-- | src/target/mips_m4k.c | 1 | ||||
-rw-r--r-- | src/target/target.c | 2 | ||||
-rw-r--r-- | src/target/target.h | 9 | ||||
-rw-r--r-- | src/target/target_request.c | 1 | ||||
-rw-r--r-- | src/target/xscale.c | 1 |
16 files changed, 23 insertions, 2 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c index 15557327..e9ba1f67 100644 --- a/src/target/arm11.c +++ b/src/target/arm11.c @@ -26,6 +26,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "arm11.h" diff --git a/src/target/arm720t.c b/src/target/arm720t.c index 37663302..668f2f5e 100644 --- a/src/target/arm720t.c +++ b/src/target/arm720t.c @@ -21,6 +21,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "arm720t.h" #include "time_support.h" diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c index 93d053cf..4c86f4a7 100644 --- a/src/target/arm7tdmi.c +++ b/src/target/arm7tdmi.c @@ -27,6 +27,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "arm7tdmi.h" diff --git a/src/target/arm920t.c b/src/target/arm920t.c index d34f734d..21fc46af 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -21,6 +21,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "arm920t.h" #include "time_support.h" diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index cef7061e..b643a213 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -21,6 +21,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "arm926ejs.h" #include "time_support.h" diff --git a/src/target/arm966e.c b/src/target/arm966e.c index b5240760..7f39d3a7 100644 --- a/src/target/arm966e.c +++ b/src/target/arm966e.c @@ -24,6 +24,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "arm966e.h" diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index 93b2d66c..2edeea54 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -27,6 +27,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "arm9tdmi.h" diff --git a/src/target/avrt.c b/src/target/avrt.c index d0c866b6..db6c101d 100644 --- a/src/target/avrt.c +++ b/src/target/avrt.c @@ -21,6 +21,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "avrt.h" #include "target.h" diff --git a/src/target/cortex_a8.c b/src/target/cortex_a8.c index e02545fb..9d62b015 100644 --- a/src/target/cortex_a8.c +++ b/src/target/cortex_a8.c @@ -33,6 +33,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "cortex_a8.h" #include "target_request.h" diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index 8a5983be..fe14cd9e 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -31,6 +31,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "cortex_m3.h" #include "target_request.h" diff --git a/src/target/feroceon.c b/src/target/feroceon.c index 8637b515..38cd0b06 100644 --- a/src/target/feroceon.c +++ b/src/target/feroceon.c @@ -49,6 +49,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "arm926ejs.h" diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c index 539cc56b..fb472966 100644 --- a/src/target/mips_m4k.c +++ b/src/target/mips_m4k.c @@ -23,6 +23,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "mips32.h" #include "mips_m4k.h" #include "mips32_dmaacc.h" diff --git a/src/target/target.c b/src/target/target.c index 04d162b5..d06c317e 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -33,6 +33,8 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S + #include "target.h" #include "target_request.h" #include "time_support.h" diff --git a/src/target/target.h b/src/target/target.h index 1eb1ba1b..dc871bf2 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -105,7 +105,8 @@ typedef struct working_area_s struct working_area_s *next; } working_area_t; -typedef struct target_type_s +#ifdef DEFINE_TARGET_TYPE_S +struct target_type_s { /** * Name of the target. Do @b not access this field directly, use @@ -258,7 +259,11 @@ typedef struct target_type_s int (*virt2phys)(struct target_s *target, u32 address, u32 *physical); int (*mmu)(struct target_s *target, int *enabled); -} target_type_t; +}; +#else +struct target_type_s; +#endif // DEFINE_TARGET_TYPE_S +typedef struct target_type_s target_type_t; /* forward decloration */ typedef struct target_event_action_s target_event_action_t; diff --git a/src/target/target_request.c b/src/target/target_request.c index 5618405d..30c0c761 100644 --- a/src/target/target_request.c +++ b/src/target/target_request.c @@ -27,6 +27,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "target_request.h" #include "binarybuffer.h" #include "trace.h" diff --git a/src/target/xscale.c b/src/target/xscale.c index 50c816c1..a375608d 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -24,6 +24,7 @@ #include "config.h" #endif +#define DEFINE_TARGET_TYPE_S #include "xscale.h" #include "arm7_9_common.h" #include "arm_simulator.h" |