Skip to content

Commit

Permalink
all: Clean up includes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pm215 committed Feb 23, 2016
1 parent b1e34d1 commit 30456d5
Show file tree
Hide file tree
Showing 56 changed files with 2 additions and 100 deletions.
1 change: 0 additions & 1 deletion audio/audio.h
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions bsd-user/qemu.h
Expand Up @@ -17,15 +17,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"
Expand Down
1 change: 0 additions & 1 deletion contrib/ivshmem-client/ivshmem-client.h
Expand Up @@ -19,7 +19,6 @@
* purposes.
*/

#include <limits.h>
#include <sys/select.h>

#include "qemu/queue.h"
Expand Down
3 changes: 0 additions & 3 deletions contrib/ivshmem-server/ivshmem-server.h
Expand Up @@ -26,10 +26,7 @@
* 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"
Expand Down
3 changes: 0 additions & 3 deletions fsdev/file-op-9p.h
Expand Up @@ -12,11 +12,8 @@
*/
#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>

Expand Down
3 changes: 0 additions & 3 deletions hw/9pfs/9p-synth.h
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions hw/9pfs/9p.h
@@ -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>
Expand Down
1 change: 0 additions & 1 deletion hw/audio/gusemu.h
Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion hw/display/vga_int.h
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion hw/net/fsl_etsec/registers.h
Expand Up @@ -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 */
Expand Down
1 change: 0 additions & 1 deletion hw/usb/desc.h
@@ -1,7 +1,6 @@
#ifndef QEMU_HW_USB_DESC_H
#define QEMU_HW_USB_DESC_H

#include <inttypes.h>
#include <wchar.h>

/* binary representation */
Expand Down
1 change: 1 addition & 0 deletions io/channel-util.c
Expand Up @@ -18,6 +18,7 @@
*
*/

#include "qemu/osdep.h"
#include "io/channel-util.h"
#include "io/channel-file.h"
#include "io/channel-socket.h"
Expand Down
3 changes: 0 additions & 3 deletions linux-user/arm/nwfpe/fpa11.h
Expand Up @@ -21,9 +21,6 @@
#ifndef __FPA11_H__
#define __FPA11_H__

#include <stdlib.h>
#include <stdio.h>
#include <errno.h>

#include <cpu.h>

Expand Down
3 changes: 0 additions & 3 deletions linux-user/qemu.h
@@ -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"
Expand Down
4 changes: 0 additions & 4 deletions nbd/nbd-internal.h
Expand Up @@ -16,16 +16,12 @@
#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>
Expand Down
1 change: 0 additions & 1 deletion net/tap-linux.h
Expand Up @@ -16,7 +16,6 @@
#ifndef QEMU_TAP_LINUX_H
#define QEMU_TAP_LINUX_H

#include <stdint.h>
#ifdef __linux__

#include <linux/ioctl.h>
Expand Down
1 change: 0 additions & 1 deletion net/util.h
Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions qemu-nbd.c
Expand Up @@ -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>

Expand Down
1 change: 0 additions & 1 deletion qga/vss-win32.h
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion qga/vss-win32/requester.h
Expand Up @@ -14,7 +14,6 @@
#define VSS_WIN32_REQUESTER_H

#include <basetyps.h> /* STDAPI */
#include "qemu/compiler.h"

#ifdef __cplusplus
extern "C" {
Expand Down
1 change: 0 additions & 1 deletion qga/vss-win32/vss-common.h
Expand Up @@ -14,7 +14,6 @@
#define VSS_WIN32_H

#define __MIDL_user_allocate_free_DEFINED__
#include "config-host.h"
#include <windows.h>
#include <shlwapi.h>

Expand Down
1 change: 0 additions & 1 deletion replay/replay-internal.h
Expand Up @@ -12,7 +12,6 @@
*
*/

#include <stdio.h>

enum ReplayEvents {
/* for instruction event */
Expand Down
18 changes: 0 additions & 18 deletions slirp/slirp.h
@@ -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;

Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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. */
Expand Down
1 change: 0 additions & 1 deletion target-alpha/cpu.h
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion target-arm/cpu.h
Expand Up @@ -19,7 +19,6 @@
#ifndef CPU_ARM_H
#define CPU_ARM_H

#include "config.h"

#include "kvm-consts.h"

Expand Down
1 change: 0 additions & 1 deletion target-arm/kvm-consts.h
Expand Up @@ -15,7 +15,6 @@
#define ARM_KVM_CONSTS_H

#ifdef CONFIG_KVM
#include "qemu/compiler.h"
#include <linux/kvm.h>
#include <linux/psci.h>

Expand Down
1 change: 0 additions & 1 deletion target-cris/cpu.h
Expand Up @@ -20,7 +20,6 @@
#ifndef CPU_CRIS_H
#define CPU_CRIS_H

#include "config.h"
#include "qemu-common.h"

#define TARGET_LONG_BITS 32
Expand Down
1 change: 0 additions & 1 deletion target-i386/cpu-qom.h
Expand Up @@ -22,7 +22,6 @@

#include "qom/cpu.h"
#include "cpu.h"
#include "qapi/error.h"
#include "qemu/notify.h"

#ifdef TARGET_X86_64
Expand Down
1 change: 0 additions & 1 deletion target-i386/cpu.h
Expand Up @@ -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"

Expand Down
1 change: 1 addition & 0 deletions target-i386/mpx_helper.c
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion target-lm32/cpu.h
Expand Up @@ -24,7 +24,6 @@

#define CPUArchState struct CPULM32State

#include "config.h"
#include "qemu-common.h"
#include "exec/cpu-defs.h"
struct CPULM32State;
Expand Down
1 change: 0 additions & 1 deletion target-m68k/cpu.h
Expand Up @@ -24,7 +24,6 @@

#define CPUArchState struct CPUM68KState

#include "config.h"
#include "qemu-common.h"
#include "exec/cpu-defs.h"

Expand Down
1 change: 0 additions & 1 deletion target-microblaze/cpu.h
Expand Up @@ -19,7 +19,6 @@
#ifndef CPU_MICROBLAZE_H
#define CPU_MICROBLAZE_H

#include "config.h"
#include "qemu-common.h"

#define TARGET_LONG_BITS 32
Expand Down
1 change: 0 additions & 1 deletion target-mips/cpu.h
Expand Up @@ -7,7 +7,6 @@

#define CPUArchState struct CPUMIPSState

#include "config.h"
#include "qemu-common.h"
#include "mips-defs.h"
#include "exec/cpu-defs.h"
Expand Down
1 change: 0 additions & 1 deletion target-moxie/cpu.h
Expand Up @@ -19,7 +19,6 @@
#ifndef _CPU_MOXIE_H
#define _CPU_MOXIE_H

#include "config.h"
#include "qemu-common.h"

#define TARGET_LONG_BITS 32
Expand Down
1 change: 0 additions & 1 deletion target-openrisc/cpu.h
Expand Up @@ -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"
Expand Down

0 comments on commit 30456d5

Please sign in to comment.