all: Clean up includes
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Feb 2016 11:58:03 +0000 (11:58 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 23 Feb 2016 12:43:05 +0000 (12:43 +0000)
Clean up includes so that osdep.h is included first and headers
which it implies are not included manually.

This commit was created with scripts/clean-includes.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
56 files changed:
audio/audio.h
bsd-user/qemu.h
contrib/ivshmem-client/ivshmem-client.h
contrib/ivshmem-server/ivshmem-server.h
fsdev/file-op-9p.h
hw/9pfs/9p-synth.h
hw/9pfs/9p.h
hw/audio/gusemu.h
hw/display/vga_int.h
hw/net/fsl_etsec/registers.h
hw/usb/desc.h
io/channel-util.c
linux-user/arm/nwfpe/fpa11.h
linux-user/qemu.h
nbd/nbd-internal.h
net/tap-linux.h
net/util.h
qemu-nbd.c
qga/vss-win32.h
qga/vss-win32/requester.h
qga/vss-win32/vss-common.h
replay/replay-internal.h
slirp/slirp.h
target-alpha/cpu.h
target-arm/cpu.h
target-arm/kvm-consts.h
target-cris/cpu.h
target-i386/cpu-qom.h
target-i386/cpu.h
target-i386/mpx_helper.c
target-lm32/cpu.h
target-m68k/cpu.h
target-microblaze/cpu.h
target-mips/cpu.h
target-moxie/cpu.h
target-openrisc/cpu.h
target-ppc/cpu.h
target-s390x/cpu.h
target-sh4/cpu.h
target-sparc/cpu.h
target-tilegx/cpu.h
target-tricore/cpu.h
target-unicore32/cpu.h
target-xtensa/cpu.h
tcg/tci/tcg-target.h
tests/libqos/ahci.h
tests/libqos/fw_cfg.h
tests/libqos/i2c.h
tests/libqos/malloc.h
tests/libqos/pci.h
tests/libqtest.h
trace/control-internal.h
trace/ftrace.h
trace/simple.h
ui/vnc-palette.h
ui/vnc.h

index e7ea397..b41a970 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef QEMU_AUDIO_H
 #define QEMU_AUDIO_H
 
-#include "config-host.h"
 #include "qemu/queue.h"
 
 typedef void (*audio_callback_fn) (void *opaque, int avail);
index 735cb40..1b5f998 100644 (file)
 #ifndef QEMU_H
 #define QEMU_H
 
-#include <signal.h>
-#include <string.h>
 
 #include "cpu.h"
 #include "exec/cpu_ldst.h"
 
 #undef DEBUG_REMAP
 #ifdef DEBUG_REMAP
-#include <stdlib.h>
 #endif /* DEBUG_REMAP */
 
 #include "exec/user/abitypes.h"
index 3a4f809..54cde17 100644 (file)
@@ -19,7 +19,6 @@
  * purposes.
  */
 
-#include <limits.h>
 #include <sys/select.h>
 
 #include "qemu/queue.h"
index c9359a0..e9de8a3 100644 (file)
  * associated to the ivshmem shared memory.
  */
 
-#include <limits.h>
 #include <sys/select.h>
-#include <stdint.h>
-#include <stdbool.h>
 
 #include "qemu/event_notifier.h"
 #include "qemu/queue.h"
index 956fda0..b8c2602 100644 (file)
  */
 #ifndef _FILEOP_H
 #define _FILEOP_H
-#include <sys/types.h>
 #include <dirent.h>
-#include <sys/time.h>
 #include <utime.h>
-#include <sys/stat.h>
 #include <sys/uio.h>
 #include <sys/vfs.h>
 
index eaf5a0c..8296251 100644 (file)
@@ -13,9 +13,6 @@
 #ifndef HW_9PFS_SYNTH_H
 #define HW_9PFS_SYNTH_H 1
 
-#include <unistd.h>
-#include <sys/types.h>
-#include <limits.h>
 
 typedef struct V9fsSynthNode V9fsSynthNode;
 typedef ssize_t (*v9fs_synth_read)(void *buf, int len, off_t offset,
index edcd51b..1a19418 100644 (file)
@@ -1,9 +1,7 @@
 #ifndef _QEMU_9P_H
 #define _QEMU_9P_H
 
-#include <sys/types.h>
 #include <dirent.h>
-#include <sys/time.h>
 #include <utime.h>
 #include <sys/resource.h>
 #include <glib.h>
index 331bb6f..b7f0751 100644 (file)
@@ -34,7 +34,6 @@
  typedef signed char GUSchar;
  typedef signed short GUSsample;
 #else
- #include <stdint.h>
  typedef int8_t GUSchar;
  typedef uint8_t GUSbyte;
  typedef uint16_t GUSword;
index 40ba6a4..bdb43a5 100644 (file)
@@ -25,7 +25,6 @@
 #define HW_VGA_INT_H 1
 
 #include <hw/hw.h>
-#include "qapi/error.h"
 #include "exec/memory.h"
 
 #define ST01_V_RETRACE      0x08
index 7ad7686..6fb9684 100644 (file)
@@ -24,7 +24,6 @@
 #ifndef _ETSEC_REGISTERS_H_
 #define _ETSEC_REGISTERS_H_
 
-#include <stdint.h>
 
 enum eTSEC_Register_Access_Type {
     ACC_RW      = 1,            /* Read/Write */
index 8e8db03..4d81c68 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef QEMU_HW_USB_DESC_H
 #define QEMU_HW_USB_DESC_H
 
-#include <inttypes.h>
 #include <wchar.h>
 
 /* binary representation */
index f96907c..0fb4bd0 100644 (file)
@@ -18,6 +18,7 @@
  *
  */
 
+#include "qemu/osdep.h"
 #include "io/channel-util.h"
 #include "io/channel-file.h"
 #include "io/channel-socket.h"
index bb9ac65..7e114ee 100644 (file)
@@ -21,9 +21,6 @@
 #ifndef __FPA11_H__
 #define __FPA11_H__
 
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
 
 #include <cpu.h>
 
index bd90cc3..ba5b433 100644 (file)
@@ -1,15 +1,12 @@
 #ifndef QEMU_H
 #define QEMU_H
 
-#include <signal.h>
-#include <string.h>
 
 #include "cpu.h"
 #include "exec/cpu_ldst.h"
 
 #undef DEBUG_REMAP
 #ifdef DEBUG_REMAP
-#include <stdlib.h>
 #endif /* DEBUG_REMAP */
 
 #include "exec/user/abitypes.h"
index db6ab65..d09b4ee 100644 (file)
 #include "qemu/coroutine.h"
 #include "qemu/iov.h"
 
-#include <errno.h>
-#include <string.h>
 #ifndef _WIN32
 #include <sys/ioctl.h>
 #endif
 #if defined(__sun__) || defined(__HAIKU__)
 #include <sys/ioccom.h>
 #endif
-#include <ctype.h>
-#include <inttypes.h>
 
 #ifdef __linux__
 #include <linux/fs.h>
index 01dc6f8..1dc3a9f 100644 (file)
@@ -16,7 +16,6 @@
 #ifndef QEMU_TAP_LINUX_H
 #define QEMU_TAP_LINUX_H
 
-#include <stdint.h>
 #ifdef __linux__
 
 #include <linux/ioctl.h>
index 10c7da9..60b73d3 100644 (file)
@@ -25,7 +25,6 @@
 #ifndef QEMU_NET_UTIL_H
 #define QEMU_NET_UTIL_H
 
-#include <stdint.h>
 
 int net_parse_macaddr(uint8_t *macaddr, const char *p);
 
index efc427c..5fe94d0 100644 (file)
@@ -31,8 +31,6 @@
 #include "io/channel-socket.h"
 
 #include <getopt.h>
-#include <sys/types.h>
-#include <signal.h>
 #include <libgen.h>
 #include <pthread.h>
 
index 298927d..4d1d150 100644 (file)
@@ -13,7 +13,6 @@
 #ifndef VSS_WIN32_H
 #define VSS_WIN32_H
 
-#include "qapi/error.h"
 
 bool vss_init(bool init_requester);
 void vss_deinit(bool deinit_requester);
index c3093cf..ad2bf3d 100644 (file)
@@ -14,7 +14,6 @@
 #define VSS_WIN32_REQUESTER_H
 
 #include <basetyps.h>           /* STDAPI */
-#include "qemu/compiler.h"
 
 #ifdef __cplusplus
 extern "C" {
index ce14e14..91dae0c 100644 (file)
@@ -14,7 +14,6 @@
 #define VSS_WIN32_H
 
 #define __MIDL_user_allocate_free_DEFINED__
-#include "config-host.h"
 #include <windows.h>
 #include <shlwapi.h>
 
index 77e0d29..5438ebd 100644 (file)
@@ -12,7 +12,6 @@
  *
  */
 
-#include <stdio.h>
 
 enum ReplayEvents {
     /* for instruction event */
index 239fe29..07c13b4 100644 (file)
@@ -1,11 +1,9 @@
 #ifndef __COMMON_H__
 #define __COMMON_H__
 
-#include "config-host.h"
 #include "slirp_config.h"
 
 #ifdef _WIN32
-# include <inttypes.h>
 
 typedef char *caddr_t;
 
@@ -23,43 +21,31 @@ typedef char *caddr_t;
 # endif
 #endif
 
-#include <sys/types.h>
 #ifdef HAVE_SYS_BITYPES_H
 # include <sys/bitypes.h>
 #endif
 
-#include <sys/time.h>
 
 #ifdef HAVE_UNISTD_H
-# include <unistd.h>
 #endif
 
 #ifdef HAVE_STDLIB_H
-# include <stdlib.h>
 #endif
 
-#include <stdio.h>
-#include <errno.h>
 
 #ifndef HAVE_MEMMOVE
 #define memmove(x, y, z) bcopy(y, x, z)
 #endif
 
 #if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
 #else
 # ifdef HAVE_SYS_TIME_H
-#  include <sys/time.h>
 # else
-#  include <time.h>
 # endif
 #endif
 
 #ifdef HAVE_STRING_H
-# include <string.h>
 #else
-# include <strings.h>
 #endif
 
 #ifndef _WIN32
@@ -82,11 +68,9 @@ void *malloc(size_t arg);
 void free(void *ptr);
 #endif
 
-#include <fcntl.h>
 #ifndef NO_UNIX_SOCKETS
 #include <sys/un.h>
 #endif
-#include <signal.h>
 #ifdef HAVE_SYS_SIGNAL_H
 # include <sys/signal.h>
 #endif
@@ -115,12 +99,10 @@ void free(void *ptr);
 #endif
 
 #ifdef __STDC__
-#include <stdarg.h>
 #else
 #include <varargs.h>
 #endif
 
-#include <sys/stat.h>
 
 /* Avoid conflicting with the libc insque() and remque(), which
    have different prototypes. */
index bcd8076..420f2a5 100644 (file)
@@ -20,7 +20,6 @@
 #if !defined (__CPU_ALPHA_H__)
 #define __CPU_ALPHA_H__
 
-#include "config.h"
 #include "qemu-common.h"
 
 #define TARGET_LONG_BITS 64
index 1623821..3cbda73 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef CPU_ARM_H
 #define CPU_ARM_H
 
-#include "config.h"
 
 #include "kvm-consts.h"
 
index 943bf89..a2c9518 100644 (file)
@@ -15,7 +15,6 @@
 #define ARM_KVM_CONSTS_H
 
 #ifdef CONFIG_KVM
-#include "qemu/compiler.h"
 #include <linux/kvm.h>
 #include <linux/psci.h>
 
index 3220460..415cf91 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef CPU_CRIS_H
 #define CPU_CRIS_H
 
-#include "config.h"
 #include "qemu-common.h"
 
 #define TARGET_LONG_BITS 32
index 5f9d960..cb75017 100644 (file)
@@ -22,7 +22,6 @@
 
 #include "qom/cpu.h"
 #include "cpu.h"
-#include "qapi/error.h"
 #include "qemu/notify.h"
 
 #ifdef TARGET_X86_64
index 94cb4db..7febc3f 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef CPU_I386_H
 #define CPU_I386_H
 
-#include "config.h"
 #include "qemu-common.h"
 #include "standard-headers/asm-x86/hyperv.h"
 
index 1bf717a..052a69c 100644 (file)
@@ -17,6 +17,7 @@
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#include "qemu/osdep.h"
 #include "cpu.h"
 #include "exec/helper-proto.h"
 #include "exec/cpu_ldst.h"
index 2b7620c..f220fc0 100644 (file)
@@ -24,7 +24,6 @@
 
 #define CPUArchState struct CPULM32State
 
-#include "config.h"
 #include "qemu-common.h"
 #include "exec/cpu-defs.h"
 struct CPULM32State;
index 224c169..48b4c87 100644 (file)
@@ -24,7 +24,6 @@
 
 #define CPUArchState struct CPUM68KState
 
-#include "config.h"
 #include "qemu-common.h"
 #include "exec/cpu-defs.h"
 
index 6b212ab..2f7335e 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef CPU_MICROBLAZE_H
 #define CPU_MICROBLAZE_H
 
-#include "config.h"
 #include "qemu-common.h"
 
 #define TARGET_LONG_BITS 32
index 86b6333..bd23c2a 100644 (file)
@@ -7,7 +7,6 @@
 
 #define CPUArchState struct CPUMIPSState
 
-#include "config.h"
 #include "qemu-common.h"
 #include "mips-defs.h"
 #include "exec/cpu-defs.h"
index a612744..4ee2077 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef _CPU_MOXIE_H
 #define _CPU_MOXIE_H
 
-#include "config.h"
 #include "qemu-common.h"
 
 #define TARGET_LONG_BITS 32
index eb71607..4b63f25 100644 (file)
@@ -27,7 +27,6 @@
 /* cpu_openrisc_map_address_* in CPUOpenRISCTLBContext need this decl.  */
 struct OpenRISCCPU;
 
-#include "config.h"
 #include "qemu-common.h"
 #include "exec/cpu-defs.h"
 #include "fpu/softfloat.h"
index 892f4dc..2b10597 100644 (file)
@@ -19,7 +19,6 @@
 #if !defined (__CPU_PPC_H__)
 #define __CPU_PPC_H__
 
-#include "config.h"
 #include "qemu-common.h"
 
 //#define PPC_EMULATE_32BITS_HYPV
index 06ca60b..6ae5699 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef CPU_S390X_H
 #define CPU_S390X_H
 
-#include "config.h"
 #include "qemu-common.h"
 
 #define TARGET_LONG_BITS 64
index 5b022c5..3b23e96 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef _CPU_SH4_H
 #define _CPU_SH4_H
 
-#include "config.h"
 #include "qemu-common.h"
 
 #define TARGET_LONG_BITS 32
index 58ff474..dc46122 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef CPU_SPARC_H
 #define CPU_SPARC_H
 
-#include "config.h"
 #include "qemu-common.h"
 #include "qemu/bswap.h"
 
index 03df107..022cad1 100644 (file)
@@ -19,7 +19,6 @@
 #ifndef CPU_TILEGX_H
 #define CPU_TILEGX_H
 
-#include "config.h"
 #include "qemu-common.h"
 
 #define TARGET_LONG_BITS 64
index 20a12f3..be6f121 100644 (file)
@@ -20,7 +20,6 @@
 #define __TRICORE_CPU_H__
 
 #include "tricore-defs.h"
-#include "config.h"
 #include "qemu-common.h"
 #include "exec/cpu-defs.h"
 #include "fpu/softfloat.h"
index 01c370c..9c1fbf9 100644 (file)
@@ -19,7 +19,6 @@
 
 #define CPUArchState                struct CPUUniCore32State
 
-#include "config.h"
 #include "qemu-common.h"
 #include "exec/cpu-defs.h"
 #include "fpu/softfloat.h"
index 15ce010..d0bd9da 100644 (file)
@@ -33,7 +33,6 @@
 
 #define CPUArchState struct CPUXtensaState
 
-#include "config.h"
 #include "qemu-common.h"
 #include "exec/cpu-defs.h"
 #include "fpu/softfloat.h"
index 77e5952..3942f9c 100644 (file)
@@ -40,7 +40,6 @@
 #if !defined(TCG_TARGET_H)
 #define TCG_TARGET_H
 
-#include "config-host.h"
 
 #define TCG_TARGET_INTERPRETER 1
 #define TCG_TARGET_INSN_UNIT_SIZE 1
index 69dc4d7..71dd7a6 100644 (file)
@@ -25,9 +25,6 @@
  * THE SOFTWARE.
  */
 
-#include <stdint.h>
-#include <stdlib.h>
-#include <stdbool.h>
 #include "libqos/libqos.h"
 #include "libqos/pci.h"
 #include "libqos/malloc-pc.h"
index 61b1548..e8371b2 100644 (file)
@@ -13,8 +13,6 @@
 #ifndef LIBQOS_FW_CFG_H
 #define LIBQOS_FW_CFG_H
 
-#include <stdint.h>
-#include <sys/types.h>
 
 typedef struct QFWCFG QFWCFG;
 
index c21f1dc..6e648f9 100644 (file)
@@ -9,7 +9,6 @@
 #ifndef LIBQOS_I2C_H
 #define LIBQOS_I2C_H
 
-#include <stdint.h>
 
 typedef struct I2CAdapter I2CAdapter;
 struct I2CAdapter {
index 0c6c9b7..ae9dac8 100644 (file)
@@ -13,8 +13,6 @@
 #ifndef LIBQOS_MALLOC_H
 #define LIBQOS_MALLOC_H
 
-#include <stdint.h>
-#include <sys/types.h>
 #include "qemu/queue.h"
 
 typedef enum {
index dfaee9e..c06add8 100644 (file)
@@ -13,7 +13,6 @@
 #ifndef LIBQOS_PCI_H
 #define LIBQOS_PCI_H
 
-#include <stdint.h>
 #include "libqtest.h"
 
 #define QPCI_DEVFN(dev, fn) (((dev) << 3) | (fn))
index ebdd5bb..37f37ad 100644 (file)
 #ifndef LIBQTEST_H
 #define LIBQTEST_H
 
-#include <stddef.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <stdarg.h>
-#include <sys/types.h>
 #include "qapi/qmp/qdict.h"
-#include "glib-compat.h"
 
 typedef struct QTestState QTestState;
 
index 07cb1c1..dcf67f5 100644 (file)
@@ -10,7 +10,6 @@
 #ifndef TRACE__CONTROL_INTERNAL_H
 #define TRACE__CONTROL_INTERNAL_H
 
-#include <string.h>
 
 
 extern TraceEvent trace_events[];
index 863e052..92372e3 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef TRACE_FTRACE_H
 #define TRACE_FTRACE_H
 
-#include <stdbool.h>
 
 
 #define MAX_TRACE_STRLEN 512
index 8d1a32e..1e7de45 100644 (file)
@@ -11,9 +11,6 @@
 #ifndef TRACE_SIMPLE_H
 #define TRACE_SIMPLE_H
 
-#include <stdint.h>
-#include <stdbool.h>
-#include <stdio.h>
 
 #include "trace/generated-events.h"
 
index d02f023..1bd4318 100644 (file)
@@ -31,8 +31,6 @@
 
 #include "qapi/qmp/qlist.h"
 #include "qemu/queue.h"
-#include <stdint.h>
-#include <stdbool.h>
 
 #define VNC_PALETTE_HASH_SIZE 256
 #define VNC_PALETTE_MAX_SIZE  256
index a95cc15..81a3261 100644 (file)
--- a/ui/vnc.h
+++ b/ui/vnc.h
@@ -38,7 +38,6 @@
 #include "io/channel-socket.h"
 #include "io/channel-tls.h"
 #include <zlib.h>
-#include <stdbool.h>
 
 #include "keymaps.h"
 #include "vnc-palette.h"