Fix some compiler warnings.
[qemu/qemu_0_9_1_stable.git] / osdep.h
blob50686d593553f26e5bdf545db388131c05163ea4
1 #ifndef QEMU_OSDEP_H
2 #define QEMU_OSDEP_H
4 #include <stdarg.h>
6 #define qemu_printf printf
8 void *qemu_malloc(size_t size);
9 void *qemu_mallocz(size_t size);
10 void qemu_free(void *ptr);
11 char *qemu_strdup(const char *str);
13 void *qemu_vmalloc(size_t size);
14 void qemu_vfree(void *ptr);
16 void *get_mmap_addr(unsigned long size);
18 int qemu_create_pidfile(const char *filename);
20 #ifdef _WIN32
21 typedef struct {
22 long tv_sec;
23 long tv_usec;
24 } qemu_timeval;
25 int qemu_gettimeofday(qemu_timeval *tp);
26 #else
27 typedef struct timeval qemu_timeval;
28 #define qemu_gettimeofday(tp) gettimeofday(tp, NULL);
29 #endif /* !_WIN32 */
31 #endif