X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=qemu-common.h;h=12e7dd0ada3fcc260d8d62f8ff7976fa24f44252;hb=dc1c21e60c91bbfcbf73c84917581ff9490e7e22;hp=ee4a672694958ae8d469312b123ab9244307d181;hpb=55616505876d6683130076b810a27c7889321560;p=qemu diff --git a/qemu-common.h b/qemu-common.h index ee4a672..12e7dd0 100644 --- a/qemu-common.h +++ b/qemu-common.h @@ -32,13 +32,18 @@ #ifndef O_BINARY #define O_BINARY 0 #endif - +#ifndef MAP_ANONYMOUS +#define MAP_ANONYMOUS MAP_ANON +#endif #ifndef ENOMEDIUM #define ENOMEDIUM ENODEV #endif +#if !defined(ENOTSUP) +#define ENOTSUP 4096 +#endif -#ifndef HAVE_IOVEC -#define HAVE_IOVEC +#ifndef CONFIG_IOVEC +#define CONFIG_IOVEC struct iovec { void *iov_base; size_t iov_len; @@ -50,11 +55,9 @@ struct iovec { #ifdef _WIN32 #define fsync _commit #define lseek _lseeki64 -#define ENOTSUP 4096 extern int qemu_ftruncate64(int, int64_t); #define ftruncate qemu_ftruncate64 - static inline char *realpath(const char *path, char *resolved_path) { _fullpath(resolved_path, path, _MAX_PATH); @@ -108,8 +111,14 @@ void pstrcpy(char *buf, int buf_size, const char *str); char *pstrcat(char *buf, int buf_size, const char *s); int strstart(const char *str, const char *val, const char **ptr); int stristart(const char *str, const char *val, const char **ptr); +int qemu_strnlen(const char *s, int max_len); time_t mktimegm(struct tm *tm); int qemu_fls(int i); +int qemu_fdatasync(int fd); + +/* path.c */ +void init_paths(const char *prefix); +const char *path(const char *pathname); #define qemu_isalnum(c) isalnum((unsigned char)(c)) #define qemu_isalpha(c) isalpha((unsigned char)(c)) @@ -182,6 +191,8 @@ typedef struct PCMCIACardState PCMCIACardState; typedef struct MouseTransformInfo MouseTransformInfo; typedef struct uWireSlave uWireSlave; typedef struct I2SCodec I2SCodec; +typedef struct DeviceState DeviceState; +typedef struct SSIBus SSIBus; /* CPU save/load. */ void cpu_save(QEMUFile *f, void *opaque); @@ -213,6 +224,7 @@ typedef struct QEMUIOVector { void qemu_iovec_init(QEMUIOVector *qiov, int alloc_hint); void qemu_iovec_init_external(QEMUIOVector *qiov, struct iovec *iov, int niov); void qemu_iovec_add(QEMUIOVector *qiov, void *base, size_t len); +void qemu_iovec_concat(QEMUIOVector *dst, QEMUIOVector *src, size_t size); void qemu_iovec_destroy(QEMUIOVector *qiov); void qemu_iovec_reset(QEMUIOVector *qiov); void qemu_iovec_to_buffer(QEMUIOVector *qiov, void *buf); @@ -221,6 +233,8 @@ void qemu_iovec_from_buffer(QEMUIOVector *qiov, const void *buf, size_t count); struct Monitor; typedef struct Monitor Monitor; +#include "module.h" + #endif /* dyngen-exec.h hack */ #endif