First step in hiding target_type_s from public interface:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 31 May 2009 11:32:28 +0000 (11:32 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 31 May 2009 11:32:28 +0000 (11:32 +0000)
- 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

16 files changed:
src/target/arm11.c
src/target/arm720t.c
src/target/arm7tdmi.c
src/target/arm920t.c
src/target/arm926ejs.c
src/target/arm966e.c
src/target/arm9tdmi.c
src/target/avrt.c
src/target/cortex_a8.c
src/target/cortex_m3.c
src/target/feroceon.c
src/target/mips_m4k.c
src/target/target.c
src/target/target.h
src/target/target_request.c
src/target/xscale.c

index 15557327055962cd2d7bef4d739ca4d1f0432bb7..e9ba1f678d6645862b87fa08cc0a4d69f3d3c714 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "arm11.h"
 
 
index 37663302abac5e43a67cabfb8f062be99995d2b0..668f2f5e4585115b79d7a0a09023ce98f45941fd 100644 (file)
@@ -21,6 +21,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "arm720t.h"
 #include "time_support.h"
 
index 93d053cf89cda01ae16905a0635931b6108b621e..4c86f4a7861a675d6a14802a56abfd55cf398a97 100644 (file)
@@ -27,6 +27,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "arm7tdmi.h"
 
 
index d34f734dca5f7a28db292cc4f96350c20372e93f..21fc46af75eb425b0a263931a2f1c847ebd26e1c 100644 (file)
@@ -21,6 +21,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "arm920t.h"
 #include "time_support.h"
 
index cef7061ed13ac3e05d4c958ee96f20afaf7d21b7..b643a213df642121eb4a2714546c2471ec4d86d5 100644 (file)
@@ -21,6 +21,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "arm926ejs.h"
 #include "time_support.h"
 
index b5240760e3b996dab4e5fe3711e0c0a9ee10b8f9..7f39d3a769c69e2cea4f3e705827355604640634 100644 (file)
@@ -24,6 +24,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "arm966e.h"
 
 
index 93b2d66c2d2b7b24552c96443dc5e1264172b6b8..2edeea546c0c8c4e5635d934a2f3673511909838 100644 (file)
@@ -27,6 +27,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "arm9tdmi.h"
 
 
index d0c866b66ea03cdd35d97f6e9f2167ad9132ffc5..db6c101d68545febad28755c306b3f235b66f233 100644 (file)
@@ -21,6 +21,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "avrt.h"
 #include "target.h"
 
index e02545fb2759633ae544bf7af1baa7741797b06f..9d62b01522a4d00233bd9d30487feb0a33d6ae0e 100644 (file)
@@ -33,6 +33,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "cortex_a8.h"
 #include "target_request.h"
 
index 8a5983be00a3649bfbb7db13c37e5fe789385f1c..fe14cd9e5fe2135658d98a0ca5c58d3e882fbde5 100644 (file)
@@ -31,6 +31,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "cortex_m3.h"
 #include "target_request.h"
 
index 8637b515b29cbf4a9a1fbe47021b5dd304170e46..38cd0b06433339d94d2f969a68e2a15a1216012e 100644 (file)
@@ -49,6 +49,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "arm926ejs.h"
 
 
index 539cc56bd8ecffa532d9627ce119473476e9af83..fb4729665e8dfa3ea14a686c31a842a5984e906c 100644 (file)
@@ -23,6 +23,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "mips32.h"
 #include "mips_m4k.h"
 #include "mips32_dmaacc.h"
index 04d162b5c7fe23250d05a9da2ce94daa559f005d..d06c317e830d349fe7dc56398fe2e245b6cb4e96 100644 (file)
@@ -33,6 +33,8 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
+
 #include "target.h"
 #include "target_request.h"
 #include "time_support.h"
index 1eb1ba1b9ac11f5deabaf54b7811c3665a7de596..dc871bf20f6dfae6532d28d35b7b7f762014dcaf 100644 (file)
@@ -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;
index 5618405d5ffb35e43b1dc8c9c133f0e60ec0f0fc..30c0c7610b5bb33a466e7b8597830fdd44b3fb2c 100644 (file)
@@ -27,6 +27,7 @@
 #include "config.h"
 #endif
 
+#define DEFINE_TARGET_TYPE_S
 #include "target_request.h"
 #include "binarybuffer.h"
 #include "trace.h"
index 50c816c1d1d34ce243460068c709c5ab1285aaf0..a375608d186d755e76f7df3afaa4213ad0817e8d 100644 (file)
@@ -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"