qemu-common.h revision fa3622f8496f4a3593e9fc70b3ebbf985f1acb00
/* Common header file that is included by all of qemu. */
#ifndef QEMU_COMMON_H
#define QEMU_COMMON_H
#ifdef VBOX
# include <string.h>
# include <inttypes.h>
# define snprintf RTStrPrintf
#else /* !VBOX */
/* we put basic includes here to avoid repeating them in device drivers */
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <inttypes.h>
#include <limits.h>
#include <time.h>
#include <ctype.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#ifndef O_LARGEFILE
#define O_LARGEFILE 0
#endif
#ifndef O_BINARY
#define O_BINARY 0
#endif
#ifndef ENOMEDIUM
#endif
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#define ENOTSUP 4096
extern int qemu_ftruncate64(int, int64_t);
#define ftruncate qemu_ftruncate64
{
return resolved_path;
}
#define PRId64 "I64d"
#define PRIx64 "I64x"
#define PRIu64 "I64u"
#define PRIo64 "I64o"
#endif
/* FIXME: Remove NEED_CPU_H. */
#ifndef NEED_CPU_H
#include "config-host.h"
#include <setjmp.h>
#include "osdep.h"
#include "bswap.h"
#else
#include "cpu.h"
#endif /* !defined(NEED_CPU_H) */
/* bottom halves */
typedef void QEMUBHFunc(void *opaque);
int qemu_bh_poll(void);
/* cutils.c */
char *qemu_strdup(const char *str);
void *get_mmap_addr(unsigned long size);
/* Error handling. */
/* IO callbacks. */
typedef int IOCanRWHandler(void *opaque);
struct ParallelIOArg {
void *buffer;
int count;
};
/* A load of opaque types so that device init declarations don't have to
pull in all the real definitions. */
typedef struct AudioState AudioState;
typedef struct BlockDriverState BlockDriverState;
typedef struct DisplayState DisplayState;
typedef struct TextConsole TextConsole;
typedef TextConsole QEMUConsole;
typedef struct CharDriverState CharDriverState;
typedef struct SMBusDevice SMBusDevice;
typedef struct SerialState SerialState;
struct pcmcia_card_s;
/* Force QEMU to stop what it's doing and service IO */
void qemu_service_io(void);
#endif /* !VBOX */
#endif