From ed3e9a15b06fbe32f9e9c8337f55a0df801ae4b2 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Fri, 16 Oct 2015 11:37:30 -0700 Subject: [PATCH] slirp, Visual Studio Projects: Adjust includes to allow building with Visual Studio Community --- Visual Studio Projects/MicroVAX1.vcproj | 4 +- Visual Studio Projects/MicroVAX2.vcproj | 4 +- Visual Studio Projects/PDP11.vcproj | 4 +- Visual Studio Projects/VAX.vcproj | 4 +- Visual Studio Projects/VAX730.vcproj | 4 +- Visual Studio Projects/VAX750.vcproj | 4 +- Visual Studio Projects/VAX780.vcproj | 4 +- Visual Studio Projects/VAX8600.vcproj | 4 +- Visual Studio Projects/rtVAX1000.vcproj | 4 +- slirp/simh/config-host.h | 6 + slirp/simh/qemu/block/accounting.h | 4 + slirp/simh/qemu/block/coroutine.h | 1 - slirp/simh/qemu/error-report.h | 1 - slirp/simh/qemu/int128.h | 5 + slirp/simh/qemu/option.h | 4 + slirp/simh/qemu/osdep.h | 590 +++++++++--------- slirp/simh/qemu/qapi-types.h | 7 +- slirp/simh/qemu/qapi/error.h | 1 - slirp/simh/qemu/qapi/qmp/qdict.h | 3 +- slirp/simh/qemu/qapi/qmp/qstring.h | 1 - slirp/simh/qemu/thread.h | 3 - .../simh/qemu/win32/{ => include}/sys/time.h | 0 slirp/simh/qemu/win32/inttypes.h | 2 +- slirp/simh/qemu/win32/unistd.h | 6 - slirp/slirp.h | 1 - slirp/slirp_config.h | 2 + 26 files changed, 346 insertions(+), 327 deletions(-) rename slirp/simh/qemu/win32/{ => include}/sys/time.h (100%) delete mode 100644 slirp/simh/qemu/win32/unistd.h diff --git a/Visual Studio Projects/MicroVAX1.vcproj b/Visual Studio Projects/MicroVAX1.vcproj index 160bb443..7a3340f8 100644 --- a/Visual Studio Projects/MicroVAX1.vcproj +++ b/Visual Studio Projects/MicroVAX1.vcproj @@ -41,7 +41,7 @@ #include +#include #ifdef _MSC_VER #include #else @@ -9,7 +11,11 @@ typedef int SOCKET; #endif typedef int bool; +#ifdef _MSC_VER +#include +#else #include +#endif #include #define qemu_add_child_watch(pid) int qemu_setsockopt (int s, int level, int optname, void *optval, int optlen); diff --git a/slirp/simh/qemu/block/accounting.h b/slirp/simh/qemu/block/accounting.h index 4c406cff..97fb5ffe 100644 --- a/slirp/simh/qemu/block/accounting.h +++ b/slirp/simh/qemu/block/accounting.h @@ -24,7 +24,11 @@ #ifndef BLOCK_ACCOUNTING_H #define BLOCK_ACCOUNTING_H +#ifdef _MSC_VER +#include +#else #include +#endif #include "qemu/typedefs.h" diff --git a/slirp/simh/qemu/block/coroutine.h b/slirp/simh/qemu/block/coroutine.h index 20c027a7..99b93984 100644 --- a/slirp/simh/qemu/block/coroutine.h +++ b/slirp/simh/qemu/block/coroutine.h @@ -15,7 +15,6 @@ #ifndef QEMU_COROUTINE_H #define QEMU_COROUTINE_H -#include #include "qemu/typedefs.h" #include "qemu/queue.h" #include "qemu/timer.h" diff --git a/slirp/simh/qemu/error-report.h b/slirp/simh/qemu/error-report.h index 0a63cfac..ccef99b9 100644 --- a/slirp/simh/qemu/error-report.h +++ b/slirp/simh/qemu/error-report.h @@ -14,7 +14,6 @@ #define QEMU_ERROR_H #include -#include #include "qemu/compiler.h" typedef struct Location { diff --git a/slirp/simh/qemu/int128.h b/slirp/simh/qemu/int128.h index fb782aad..f9625626 100644 --- a/slirp/simh/qemu/int128.h +++ b/slirp/simh/qemu/int128.h @@ -2,8 +2,13 @@ #define INT128_H #include +#ifdef _MSC_VER +#include +#include +#else #include #include +#endif typedef struct Int128 Int128; diff --git a/slirp/simh/qemu/option.h b/slirp/simh/qemu/option.h index 71f5f27e..55fd0aa1 100644 --- a/slirp/simh/qemu/option.h +++ b/slirp/simh/qemu/option.h @@ -26,7 +26,11 @@ #ifndef QEMU_OPTIONS_H #define QEMU_OPTIONS_H +#ifdef _MSC_VER +#include +#else #include +#endif #include "qemu/queue.h" #include "qapi/error.h" #include "qapi/qmp/qdict.h" diff --git a/slirp/simh/qemu/osdep.h b/slirp/simh/qemu/osdep.h index dd789ff2..ef6f70e5 100644 --- a/slirp/simh/qemu/osdep.h +++ b/slirp/simh/qemu/osdep.h @@ -1,291 +1,299 @@ -/* - * OS includes and handling of OS dependencies - * - * This header exists to pull in some common system headers that - * most code in QEMU will want, and to fix up some possible issues with - * it (missing defines, Windows weirdness, and so on). - * - * To avoid getting into possible circular include dependencies, this - * file should not include any other QEMU headers, with the exceptions - * of config-host.h, compiler.h, os-posix.h and os-win32.h, all of which - * are doing a similar job to this file and are under similar constraints. - * - * This header also contains prototypes for functions defined in - * os-*.c and util/oslib-*.c; those would probably be better split - * out into separate header files. - * - * In an ideal world this header would contain only: - * (1) things which everybody needs - * (2) things without which code would work on most platforms but - * fail to compile or misbehave on a minority of host OSes - * - * This work is licensed under the terms of the GNU GPL, version 2 or later. - * See the COPYING file in the top-level directory. - */ -#ifndef QEMU_OSDEP_H -#define QEMU_OSDEP_H - -#include "config-host.h" -#include "qemu/compiler.h" -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef _MSC_VER -#include -#endif -#include -#include -/* Put unistd.h before time.h as that triggers localtime_r/gmtime_r - * function availability on recentish Mingw-w64 platforms. */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef __OpenBSD__ -#include -#endif - -#ifndef _WIN32 -#include -#else -#define WIFEXITED(x) 1 -#define WEXITSTATUS(x) (x) -#endif - -#ifdef _WIN32 -#include "sysemu/os-win32.h" -#endif - -#ifdef CONFIG_POSIX -#include "sysemu/os-posix.h" -#endif - -#if defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10 -/* [u]int_fast*_t not in */ -typedef unsigned char uint_fast8_t; -typedef unsigned int uint_fast16_t; -typedef signed int int_fast16_t; -#endif - -#ifndef O_LARGEFILE -#define O_LARGEFILE 0 -#endif -#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 -#if !defined(ECANCELED) -#define ECANCELED 4097 -#endif -#if !defined(EMEDIUMTYPE) -#define EMEDIUMTYPE 4098 -#endif -#ifndef TIME_MAX -#define TIME_MAX LONG_MAX -#endif - -#ifndef MIN -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) -#endif -#ifndef MAX -#define MAX(a, b) (((a) > (b)) ? (a) : (b)) -#endif - -/* Minimum function that returns zero only iff both values are zero. - * Intended for use with unsigned values only. */ -#ifndef MIN_NON_ZERO -#define MIN_NON_ZERO(a, b) (((a) != 0 && (a) < (b)) ? (a) : (b)) -#endif - -#ifndef ROUND_UP -#define ROUND_UP(n,d) (((n) + (d) - 1) & -(d)) -#endif - -#ifndef DIV_ROUND_UP -#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) -#endif - -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#endif - -int qemu_daemon(int nochdir, int noclose); -void *qemu_try_memalign(size_t alignment, size_t size); -void *qemu_memalign(size_t alignment, size_t size); -void *qemu_anon_ram_alloc(size_t size, uint64_t *align); -void qemu_vfree(void *ptr); -void qemu_anon_ram_free(void *ptr, size_t size); - -#define QEMU_MADV_INVALID -1 - -#if defined(CONFIG_MADVISE) - -#define QEMU_MADV_WILLNEED MADV_WILLNEED -#define QEMU_MADV_DONTNEED MADV_DONTNEED -#ifdef MADV_DONTFORK -#define QEMU_MADV_DONTFORK MADV_DONTFORK -#else -#define QEMU_MADV_DONTFORK QEMU_MADV_INVALID -#endif -#ifdef MADV_MERGEABLE -#define QEMU_MADV_MERGEABLE MADV_MERGEABLE -#else -#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID -#endif -#ifdef MADV_UNMERGEABLE -#define QEMU_MADV_UNMERGEABLE MADV_UNMERGEABLE -#else -#define QEMU_MADV_UNMERGEABLE QEMU_MADV_INVALID -#endif -#ifdef MADV_DODUMP -#define QEMU_MADV_DODUMP MADV_DODUMP -#else -#define QEMU_MADV_DODUMP QEMU_MADV_INVALID -#endif -#ifdef MADV_DONTDUMP -#define QEMU_MADV_DONTDUMP MADV_DONTDUMP -#else -#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID -#endif -#ifdef MADV_HUGEPAGE -#define QEMU_MADV_HUGEPAGE MADV_HUGEPAGE -#else -#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID -#endif - -#elif defined(CONFIG_POSIX_MADVISE) - -#define QEMU_MADV_WILLNEED POSIX_MADV_WILLNEED -#define QEMU_MADV_DONTNEED POSIX_MADV_DONTNEED -#define QEMU_MADV_DONTFORK QEMU_MADV_INVALID -#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID -#define QEMU_MADV_UNMERGEABLE QEMU_MADV_INVALID -#define QEMU_MADV_DODUMP QEMU_MADV_INVALID -#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID -#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID - -#else /* no-op */ - -#define QEMU_MADV_WILLNEED QEMU_MADV_INVALID -#define QEMU_MADV_DONTNEED QEMU_MADV_INVALID -#define QEMU_MADV_DONTFORK QEMU_MADV_INVALID -#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID -#define QEMU_MADV_UNMERGEABLE QEMU_MADV_INVALID -#define QEMU_MADV_DODUMP QEMU_MADV_INVALID -#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID -#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID - -#endif - -int qemu_madvise(void *addr, size_t len, int advice); - -int qemu_open(const char *name, int flags, ...); -int qemu_close(int fd); - -#if defined(__HAIKU__) && defined(__i386__) -#define FMT_pid "%ld" -#elif defined(WIN64) -#define FMT_pid "%" PRId64 -#else -#define FMT_pid "%d" -#endif - -int qemu_create_pidfile(const char *filename); -int qemu_get_thread_id(void); - -#ifndef CONFIG_IOVEC -struct iovec { - void *iov_base; - int iov_len; -}; -/* - * Use the same value as Linux for now. - */ -#define IOV_MAX 1024 - -ssize_t readv(int fd, const struct iovec *iov, int iov_cnt); -ssize_t writev(int fd, const struct iovec *iov, int iov_cnt); -#else -#include -#endif - -#ifdef _WIN32 -static inline void qemu_timersub(const struct timeval *val1, - const struct timeval *val2, - struct timeval *res) -{ - res->tv_sec = val1->tv_sec - val2->tv_sec; - if (val1->tv_usec < val2->tv_usec) { - res->tv_sec--; - res->tv_usec = val1->tv_usec - val2->tv_usec + 1000 * 1000; - } else { - res->tv_usec = val1->tv_usec - val2->tv_usec; - } -} -#else -#define qemu_timersub timersub -#endif - -void qemu_set_cloexec(int fd); - -void qemu_set_version(const char *); -const char *qemu_get_version(void); - -void fips_set_state(bool requested); -bool fips_get_state(void); - -/* Return a dynamically allocated pathname denoting a file or directory that is - * appropriate for storing local state. - * - * @relative_pathname need not start with a directory separator; one will be - * added automatically. - * - * The caller is responsible for releasing the value returned with g_free() - * after use. - */ -char *qemu_get_local_state_pathname(const char *relative_pathname); - -/* Find program directory, and save it for later usage with - * qemu_get_exec_dir(). - * Try OS specific API first, if not working, parse from argv0. */ -void qemu_init_exec_dir(const char *argv0); - -/* Get the saved exec dir. - * Caller needs to release the returned string by g_free() */ -char *qemu_get_exec_dir(void); - -/** - * qemu_getauxval: - * @type: the auxiliary vector key to lookup - * - * Search the auxiliary vector for @type, returning the value - * or 0 if @type is not present. - */ -unsigned long qemu_getauxval(unsigned long type); - -void qemu_set_tty_echo(int fd, bool echo); - -void os_mem_prealloc(int fd, char *area, size_t sz); - -int qemu_read_password(char *buf, int buf_size); - -#endif +/* + * OS includes and handling of OS dependencies + * + * This header exists to pull in some common system headers that + * most code in QEMU will want, and to fix up some possible issues with + * it (missing defines, Windows weirdness, and so on). + * + * To avoid getting into possible circular include dependencies, this + * file should not include any other QEMU headers, with the exceptions + * of config-host.h, compiler.h, os-posix.h and os-win32.h, all of which + * are doing a similar job to this file and are under similar constraints. + * + * This header also contains prototypes for functions defined in + * os-*.c and util/oslib-*.c; those would probably be better split + * out into separate header files. + * + * In an ideal world this header would contain only: + * (1) things which everybody needs + * (2) things without which code would work on most platforms but + * fail to compile or misbehave on a minority of host OSes + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ +#ifndef QEMU_OSDEP_H +#define QEMU_OSDEP_H + +#include "config-host.h" +#include "qemu/compiler.h" +#include +#include +#ifdef _MSC_VER +#include +#include +#include +#else +#include +#include +#include +#endif +#include +#include +#include +#include +#ifndef _MSC_VER +#include +#endif +#include +/* Put unistd.h before time.h as that triggers localtime_r/gmtime_r + * function availability on recentish Mingw-w64 platforms. */ +#ifdef HAVE_UNISTD_H +# include +#endif +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __OpenBSD__ +#include +#endif + +#ifndef _WIN32 +#include +#else +#define WIFEXITED(x) 1 +#define WEXITSTATUS(x) (x) +#endif + +#ifdef _WIN32 +#include "sysemu/os-win32.h" +#endif + +#ifdef CONFIG_POSIX +#include "sysemu/os-posix.h" +#endif + +#if defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10 +/* [u]int_fast*_t not in */ +typedef unsigned char uint_fast8_t; +typedef unsigned int uint_fast16_t; +typedef signed int int_fast16_t; +#endif + +#ifndef O_LARGEFILE +#define O_LARGEFILE 0 +#endif +#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 +#if !defined(ECANCELED) +#define ECANCELED 4097 +#endif +#if !defined(EMEDIUMTYPE) +#define EMEDIUMTYPE 4098 +#endif +#ifndef TIME_MAX +#define TIME_MAX LONG_MAX +#endif + +#ifndef MIN +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif +#ifndef MAX +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#endif + +/* Minimum function that returns zero only iff both values are zero. + * Intended for use with unsigned values only. */ +#ifndef MIN_NON_ZERO +#define MIN_NON_ZERO(a, b) (((a) != 0 && (a) < (b)) ? (a) : (b)) +#endif + +#ifndef ROUND_UP +#define ROUND_UP(n,d) (((n) + (d) - 1) & -(d)) +#endif + +#ifndef DIV_ROUND_UP +#define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) +#endif + +#ifndef ARRAY_SIZE +#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#endif + +int qemu_daemon(int nochdir, int noclose); +void *qemu_try_memalign(size_t alignment, size_t size); +void *qemu_memalign(size_t alignment, size_t size); +void *qemu_anon_ram_alloc(size_t size, uint64_t *align); +void qemu_vfree(void *ptr); +void qemu_anon_ram_free(void *ptr, size_t size); + +#define QEMU_MADV_INVALID -1 + +#if defined(CONFIG_MADVISE) + +#define QEMU_MADV_WILLNEED MADV_WILLNEED +#define QEMU_MADV_DONTNEED MADV_DONTNEED +#ifdef MADV_DONTFORK +#define QEMU_MADV_DONTFORK MADV_DONTFORK +#else +#define QEMU_MADV_DONTFORK QEMU_MADV_INVALID +#endif +#ifdef MADV_MERGEABLE +#define QEMU_MADV_MERGEABLE MADV_MERGEABLE +#else +#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID +#endif +#ifdef MADV_UNMERGEABLE +#define QEMU_MADV_UNMERGEABLE MADV_UNMERGEABLE +#else +#define QEMU_MADV_UNMERGEABLE QEMU_MADV_INVALID +#endif +#ifdef MADV_DODUMP +#define QEMU_MADV_DODUMP MADV_DODUMP +#else +#define QEMU_MADV_DODUMP QEMU_MADV_INVALID +#endif +#ifdef MADV_DONTDUMP +#define QEMU_MADV_DONTDUMP MADV_DONTDUMP +#else +#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID +#endif +#ifdef MADV_HUGEPAGE +#define QEMU_MADV_HUGEPAGE MADV_HUGEPAGE +#else +#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID +#endif + +#elif defined(CONFIG_POSIX_MADVISE) + +#define QEMU_MADV_WILLNEED POSIX_MADV_WILLNEED +#define QEMU_MADV_DONTNEED POSIX_MADV_DONTNEED +#define QEMU_MADV_DONTFORK QEMU_MADV_INVALID +#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID +#define QEMU_MADV_UNMERGEABLE QEMU_MADV_INVALID +#define QEMU_MADV_DODUMP QEMU_MADV_INVALID +#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID +#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID + +#else /* no-op */ + +#define QEMU_MADV_WILLNEED QEMU_MADV_INVALID +#define QEMU_MADV_DONTNEED QEMU_MADV_INVALID +#define QEMU_MADV_DONTFORK QEMU_MADV_INVALID +#define QEMU_MADV_MERGEABLE QEMU_MADV_INVALID +#define QEMU_MADV_UNMERGEABLE QEMU_MADV_INVALID +#define QEMU_MADV_DODUMP QEMU_MADV_INVALID +#define QEMU_MADV_DONTDUMP QEMU_MADV_INVALID +#define QEMU_MADV_HUGEPAGE QEMU_MADV_INVALID + +#endif + +int qemu_madvise(void *addr, size_t len, int advice); + +int qemu_open(const char *name, int flags, ...); +int qemu_close(int fd); + +#if defined(__HAIKU__) && defined(__i386__) +#define FMT_pid "%ld" +#elif defined(WIN64) +#define FMT_pid "%" PRId64 +#else +#define FMT_pid "%d" +#endif + +int qemu_create_pidfile(const char *filename); +int qemu_get_thread_id(void); + +#ifndef CONFIG_IOVEC +struct iovec { + void *iov_base; + int iov_len; +}; +/* + * Use the same value as Linux for now. + */ +#define IOV_MAX 1024 + +ssize_t readv(int fd, const struct iovec *iov, int iov_cnt); +ssize_t writev(int fd, const struct iovec *iov, int iov_cnt); +#else +#include +#endif + +#ifdef _WIN32 +static inline void qemu_timersub(const struct timeval *val1, + const struct timeval *val2, + struct timeval *res) +{ + res->tv_sec = val1->tv_sec - val2->tv_sec; + if (val1->tv_usec < val2->tv_usec) { + res->tv_sec--; + res->tv_usec = val1->tv_usec - val2->tv_usec + 1000 * 1000; + } else { + res->tv_usec = val1->tv_usec - val2->tv_usec; + } +} +#else +#define qemu_timersub timersub +#endif + +void qemu_set_cloexec(int fd); + +void qemu_set_version(const char *); +const char *qemu_get_version(void); + +void fips_set_state(bool requested); +bool fips_get_state(void); + +/* Return a dynamically allocated pathname denoting a file or directory that is + * appropriate for storing local state. + * + * @relative_pathname need not start with a directory separator; one will be + * added automatically. + * + * The caller is responsible for releasing the value returned with g_free() + * after use. + */ +char *qemu_get_local_state_pathname(const char *relative_pathname); + +/* Find program directory, and save it for later usage with + * qemu_get_exec_dir(). + * Try OS specific API first, if not working, parse from argv0. */ +void qemu_init_exec_dir(const char *argv0); + +/* Get the saved exec dir. + * Caller needs to release the returned string by g_free() */ +char *qemu_get_exec_dir(void); + +/** + * qemu_getauxval: + * @type: the auxiliary vector key to lookup + * + * Search the auxiliary vector for @type, returning the value + * or 0 if @type is not present. + */ +unsigned long qemu_getauxval(unsigned long type); + +void qemu_set_tty_echo(int fd, bool echo); + +void os_mem_prealloc(int fd, char *area, size_t sz); + +int qemu_read_password(char *buf, int buf_size); + +#endif diff --git a/slirp/simh/qemu/qapi-types.h b/slirp/simh/qemu/qapi-types.h index 3ffc54bd..96e5bb5c 100644 --- a/slirp/simh/qemu/qapi-types.h +++ b/slirp/simh/qemu/qapi-types.h @@ -16,8 +16,13 @@ #ifndef QAPI_TYPES_H #define QAPI_TYPES_H -#include +#ifdef _MSC_VER +#include +#include +#else #include +#include +#endif #include "qapi/qmp/qobject.h" #ifndef QAPI_TYPES_BUILTIN diff --git a/slirp/simh/qemu/qapi/error.h b/slirp/simh/qemu/qapi/error.h index c69dddbb..46fb8d99 100644 --- a/slirp/simh/qemu/qapi/error.h +++ b/slirp/simh/qemu/qapi/error.h @@ -79,7 +79,6 @@ #include "qemu/compiler.h" #include "qapi-types.h" -#include /* * Opaque error object. diff --git a/slirp/simh/qemu/qapi/qmp/qdict.h b/slirp/simh/qemu/qapi/qmp/qdict.h index a37f4c15..45d8404c 100644 --- a/slirp/simh/qemu/qapi/qmp/qdict.h +++ b/slirp/simh/qemu/qapi/qmp/qdict.h @@ -16,8 +16,7 @@ #include "qapi/qmp/qobject.h" #include "qapi/qmp/qlist.h" #include "qemu/queue.h" -#include -#include +//#include #define QDICT_BUCKET_MAX 512 diff --git a/slirp/simh/qemu/qapi/qmp/qstring.h b/slirp/simh/qemu/qapi/qmp/qstring.h index 1bc36661..ae5b93cb 100644 --- a/slirp/simh/qemu/qapi/qmp/qstring.h +++ b/slirp/simh/qemu/qapi/qmp/qstring.h @@ -13,7 +13,6 @@ #ifndef QSTRING_H #define QSTRING_H -#include #include "qapi/qmp/qobject.h" typedef struct QString { diff --git a/slirp/simh/qemu/thread.h b/slirp/simh/qemu/thread.h index 826c9e31..cdfe8317 100644 --- a/slirp/simh/qemu/thread.h +++ b/slirp/simh/qemu/thread.h @@ -1,9 +1,6 @@ #ifndef __QEMU_THREAD_H #define __QEMU_THREAD_H 1 -#include -#include - typedef struct QemuMutex QemuMutex; typedef struct QemuCond QemuCond; typedef struct QemuSemaphore QemuSemaphore; diff --git a/slirp/simh/qemu/win32/sys/time.h b/slirp/simh/qemu/win32/include/sys/time.h similarity index 100% rename from slirp/simh/qemu/win32/sys/time.h rename to slirp/simh/qemu/win32/include/sys/time.h diff --git a/slirp/simh/qemu/win32/inttypes.h b/slirp/simh/qemu/win32/inttypes.h index 583f4379..5e81fb22 100644 --- a/slirp/simh/qemu/win32/inttypes.h +++ b/slirp/simh/qemu/win32/inttypes.h @@ -1,7 +1,7 @@ #ifndef INTTYPES_H #define INTTYPES_H -#include +#include #ifdef _WIN64 typedef __int64 ssize_t; diff --git a/slirp/simh/qemu/win32/unistd.h b/slirp/simh/qemu/win32/unistd.h deleted file mode 100644 index c97c9e01..00000000 --- a/slirp/simh/qemu/win32/unistd.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef UNISTD_H -#define UNISTD_H - -#include - -#endif diff --git a/slirp/slirp.h b/slirp/slirp.h index 6eaced71..33db9f58 100644 --- a/slirp/slirp.h +++ b/slirp/slirp.h @@ -5,7 +5,6 @@ #include "slirp_config.h" #ifdef _WIN32 -# include typedef char *caddr_t; diff --git a/slirp/slirp_config.h b/slirp/slirp_config.h index 1bc56e7f..9a72f8af 100644 --- a/slirp/slirp_config.h +++ b/slirp/slirp_config.h @@ -52,7 +52,9 @@ #undef DUMMY_PPP /* Define if you have unistd.h */ +#ifndef _WIN32 #define HAVE_UNISTD_H +#endif /* Define if you have stdlib.h */ #define HAVE_STDLIB_H