diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-08-19 16:20:19 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-08-19 16:29:53 +0100 |
commit | bfe7e449f14313f646da621288ca2fd12223414f (patch) | |
tree | 946d36278aa329d84b7033ef44b735ef79cc0221 /include/qemu/osdep.h | |
parent | 1aad8104f3b69206da1f868639e1f69c26f6d482 (diff) | |
download | qemu-bfe7e449f14313f646da621288ca2fd12223414f.zip qemu-bfe7e449f14313f646da621288ca2fd12223414f.tar.gz qemu-bfe7e449f14313f646da621288ca2fd12223414f.tar.bz2 |
osdep.h: Move some OS header includes and fixups from qemu-common.h
qemu-common.h has some system header includes and fixups for
things that might be missing. This is really an OS dependency
and belongs in osdep.h, so move it across.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r-- | include/qemu/osdep.h | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 4ae2c64..60ac27d 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -8,6 +8,22 @@ #include <stdbool.h> #include <stdint.h> #include <sys/types.h> +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <strings.h> +#include <inttypes.h> +#include <limits.h> +#include <time.h> +#include <ctype.h> +#include <errno.h> +#include <unistd.h> +#include <fcntl.h> +#include <sys/stat.h> +#include <sys/time.h> +#include <assert.h> +#include <signal.h> + #ifdef __OpenBSD__ #include <sys/signal.h> #endif @@ -19,7 +35,13 @@ #define WEXITSTATUS(x) (x) #endif -#include <sys/time.h> +#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 <sys/int_types.h> */ @@ -28,6 +50,31 @@ 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 |