From 7bfcc10839d2a9190cb7ae9fae02280e643b3450 Mon Sep 17 00:00:00 2001 From: Spencer Oliver Date: Thu, 17 May 2012 12:27:30 +0100 Subject: [PATCH] build: add helper/types.h to config.h this header is used in numerous files and adding to config.h simplifies its use globally. Change-Id: Id724a9950b90504721233022c7fb5768e9bc5548 Signed-off-by: Spencer Oliver Reviewed-on: http://openocd.zylin.com/649 Tested-by: jenkins Reviewed-by: Xiaofan --- configure.ac | 1 + src/helper/binarybuffer.h | 2 -- src/helper/command.h | 2 -- src/helper/fileio.h | 2 -- src/helper/replacements.h | 4 ---- src/jtag/drivers/libusb0_common.h | 1 - src/jtag/drivers/libusb1_common.h | 1 - src/jtag/drivers/rlink.h | 2 -- src/jtag/drivers/ulink.c | 1 - src/jtag/drivers/usb_common.h | 2 -- src/pld/xilinx_bit.h | 2 -- src/rtos/rtos.h | 1 - src/target/arm_disassembler.h | 2 -- src/target/arm_simulator.h | 2 -- src/target/armv4_5_cache.h | 2 -- src/target/avr32_ap7k.h | 2 -- src/target/avr32_jtag.c | 1 - src/target/breakpoints.h | 2 -- src/target/mips_m4k.h | 2 -- src/target/register.c | 1 - src/target/smp.c | 1 - src/target/target.h | 2 -- src/target/target_type.h | 1 - src/target/trace.h | 2 -- 24 files changed, 1 insertion(+), 40 deletions(-) diff --git a/configure.ac b/configure.ac index 4d7b7d75e..642fb2d4c 100644 --- a/configure.ac +++ b/configure.ac @@ -11,6 +11,7 @@ AM_MAINTAINER_MODE AM_CONFIG_HEADER([config.h]) AH_BOTTOM([ #include +#include #include ]) diff --git a/src/helper/binarybuffer.h b/src/helper/binarybuffer.h index a289abd9b..6b142dd1c 100644 --- a/src/helper/binarybuffer.h +++ b/src/helper/binarybuffer.h @@ -24,8 +24,6 @@ #ifndef BINARYBUFFER_H #define BINARYBUFFER_H -#include - /** @file * Support functions to access arbitrary bits in a byte array */ diff --git a/src/helper/command.h b/src/helper/command.h index 7cd5cc4c7..6c0e0f6de 100644 --- a/src/helper/command.h +++ b/src/helper/command.h @@ -24,8 +24,6 @@ #ifndef COMMAND_H #define COMMAND_H -#include - #include #include diff --git a/src/helper/fileio.h b/src/helper/fileio.h index bd6442450..25b079de4 100644 --- a/src/helper/fileio.h +++ b/src/helper/fileio.h @@ -27,8 +27,6 @@ #ifndef FILEIO_H #define FILEIO_H -#include - #define FILEIO_MAX_ERROR_STRING (128) enum fileio_type { diff --git a/src/helper/replacements.h b/src/helper/replacements.h index bdd3ae7c0..7c2e44b0d 100644 --- a/src/helper/replacements.h +++ b/src/helper/replacements.h @@ -139,8 +139,6 @@ static inline unsigned usleep(unsigned int usecs) #include #include -#include - /* Windows does not declare sockaddr_un */ #define UNIX_PATH_LEN 108 struct sockaddr_un { @@ -230,8 +228,6 @@ static inline int socket_select(int max_fd, #ifndef HAVE_ELF_H -#include - typedef uint32_t Elf32_Addr; typedef uint16_t Elf32_Half; typedef uint32_t Elf32_Off; diff --git a/src/jtag/drivers/libusb0_common.h b/src/jtag/drivers/libusb0_common.h index 9ca65c5ff..2473c27d5 100644 --- a/src/jtag/drivers/libusb0_common.h +++ b/src/jtag/drivers/libusb0_common.h @@ -22,7 +22,6 @@ #ifndef JTAG_LIBUSB_COMMON_H #define JTAG_LIBUSB_COMMON_H -#include #include #define jtag_libusb_device usb_device diff --git a/src/jtag/drivers/libusb1_common.h b/src/jtag/drivers/libusb1_common.h index 2c570fa18..b38fe669c 100644 --- a/src/jtag/drivers/libusb1_common.h +++ b/src/jtag/drivers/libusb1_common.h @@ -22,7 +22,6 @@ #ifndef JTAG_LIBUSB_COMMON_H #define JTAG_LIBUSB_COMMON_H -#include #include #define jtag_libusb_device libusb_device diff --git a/src/jtag/drivers/rlink.h b/src/jtag/drivers/rlink.h index 021706061..9d1099c84 100644 --- a/src/jtag/drivers/rlink.h +++ b/src/jtag/drivers/rlink.h @@ -18,8 +18,6 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include - struct rlink_speed_table { uint8_t const *dtc; uint16_t dtc_size; diff --git a/src/jtag/drivers/ulink.c b/src/jtag/drivers/ulink.c index 4de1a7703..2638d4e45 100644 --- a/src/jtag/drivers/ulink.c +++ b/src/jtag/drivers/ulink.c @@ -26,7 +26,6 @@ #include #include #include -#include #include "usb_common.h" #include "OpenULINK/include/msgtypes.h" diff --git a/src/jtag/drivers/usb_common.h b/src/jtag/drivers/usb_common.h index 468acf956..ebf0c40fe 100644 --- a/src/jtag/drivers/usb_common.h +++ b/src/jtag/drivers/usb_common.h @@ -20,8 +20,6 @@ #ifndef JTAG_USB_COMMON_H #define JTAG_USB_COMMON_H -#include - #include int jtag_usb_open(const uint16_t vids[], const uint16_t pids[], diff --git a/src/pld/xilinx_bit.h b/src/pld/xilinx_bit.h index 37f181182..131a78347 100644 --- a/src/pld/xilinx_bit.h +++ b/src/pld/xilinx_bit.h @@ -21,8 +21,6 @@ #ifndef XILINX_BIT_H #define XILINX_BIT_H -#include - struct xilinx_bit_file { uint8_t unknown_header[13]; uint8_t *source_file; diff --git a/src/rtos/rtos.h b/src/rtos/rtos.h index a93daeef9..d8335b4a8 100644 --- a/src/rtos/rtos.h +++ b/src/rtos/rtos.h @@ -22,7 +22,6 @@ #define RTOS_H #include "server/server.h" -#include #include typedef int64_t threadid_t; diff --git a/src/target/arm_disassembler.h b/src/target/arm_disassembler.h index bdfdb038c..07564d6d8 100644 --- a/src/target/arm_disassembler.h +++ b/src/target/arm_disassembler.h @@ -21,8 +21,6 @@ #ifndef ARM_DISASSEMBLER_H #define ARM_DISASSEMBLER_H -#include - enum arm_instruction_type { ARM_UNKNOWN_INSTUCTION, diff --git a/src/target/arm_simulator.h b/src/target/arm_simulator.h index 3a7ac13ec..38ba4d46b 100644 --- a/src/target/arm_simulator.h +++ b/src/target/arm_simulator.h @@ -21,8 +21,6 @@ #ifndef ARM_SIMULATOR_H #define ARM_SIMULATOR_H -#include - struct target; struct arm_sim_interface { diff --git a/src/target/armv4_5_cache.h b/src/target/armv4_5_cache.h index fc5e2c799..95273a7d3 100644 --- a/src/target/armv4_5_cache.h +++ b/src/target/armv4_5_cache.h @@ -21,8 +21,6 @@ #ifndef ARMV4_5_CACHE_H #define ARMV4_5_CACHE_H -#include - struct command_context; struct armv4_5_cachesize { diff --git a/src/target/avr32_ap7k.h b/src/target/avr32_ap7k.h index 0b5b281e3..1e4889a5d 100644 --- a/src/target/avr32_ap7k.h +++ b/src/target/avr32_ap7k.h @@ -20,8 +20,6 @@ #ifndef AVR32_AP7K #define AVR32_AP7K -#include - struct target; #define AP7k_COMMON_MAGIC 0x4150374b diff --git a/src/target/avr32_jtag.c b/src/target/avr32_jtag.c index c88f44e80..a363c7085 100644 --- a/src/target/avr32_jtag.c +++ b/src/target/avr32_jtag.c @@ -22,7 +22,6 @@ #endif #include "target.h" -#include "helper/types.h" #include "jtag/jtag.h" #include "avr32_jtag.h" diff --git a/src/target/breakpoints.h b/src/target/breakpoints.h index 8b1631a01..a019e967b 100644 --- a/src/target/breakpoints.h +++ b/src/target/breakpoints.h @@ -21,8 +21,6 @@ #ifndef BREAKPOINTS_H #define BREAKPOINTS_H -#include - struct target; enum breakpoint_type { diff --git a/src/target/mips_m4k.h b/src/target/mips_m4k.h index 5a9ed77c4..e21d57e9c 100644 --- a/src/target/mips_m4k.h +++ b/src/target/mips_m4k.h @@ -26,8 +26,6 @@ #ifndef MIPS_M4K_H #define MIPS_M4K_H -#include - struct target; #define MIPSM4K_COMMON_MAGIC 0xB321B321 diff --git a/src/target/register.c b/src/target/register.c index 65dc24f07..ab1e40b17 100644 --- a/src/target/register.c +++ b/src/target/register.c @@ -25,7 +25,6 @@ #include "config.h" #endif -#include #include "register.h" #include diff --git a/src/target/smp.c b/src/target/smp.c index c0936ff5c..9cd4b013d 100644 --- a/src/target/smp.c +++ b/src/target/smp.c @@ -23,7 +23,6 @@ #endif #include "server/server.h" -#include #include "target/target.h" diff --git a/src/target/target.h b/src/target/target.h index 9dc928fe8..b3025dcb5 100644 --- a/src/target/target.h +++ b/src/target/target.h @@ -33,8 +33,6 @@ #ifndef TARGET_H #define TARGET_H -#include - struct reg; struct trace; struct command_context; diff --git a/src/target/target_type.h b/src/target/target_type.h index f6f0ea7bf..7eacd7f98 100644 --- a/src/target/target_type.h +++ b/src/target/target_type.h @@ -27,7 +27,6 @@ #ifndef TARGET_TYPE_H #define TARGET_TYPE_H -#include #include struct target; diff --git a/src/target/trace.h b/src/target/trace.h index 5eaf8c841..ebcf6b0fe 100644 --- a/src/target/trace.h +++ b/src/target/trace.h @@ -21,8 +21,6 @@ #ifndef TRACE_H #define TRACE_H -#include - struct target; struct command_context; -- 2.11.4.GIT