VirtualBox

root/trunk/src/recompiler/osdep.h

Revision 2422, 1.2 kB (checked in by vboxsync, 2 years ago)

Removed the old recompiler code.

  • Property svn:eol-style set to native
Line 
1 #ifndef QEMU_OSDEP_H
2 #define QEMU_OSDEP_H
3
4 #ifdef VBOX
5
6 #include <iprt/alloc.h>
7 #include <iprt/stdarg.h>
8 #include <iprt/string.h>
9
10 #define qemu_snprintf(pszBuf, cbBuf, ...) RTStrPrintf((pszBuf), (cbBuf), __VA_ARGS__)
11 #define qemu_vsnprintf(pszBuf, cbBuf, pszFormat, args) \
12                             RTStrPrintfV((pszBuf), (cbBuf), (pszFormat), (args))
13 #define qemu_vprintf(pszFormat, args) \
14                             RTLogPrintfV((pszFormat), (args))
15 #define qemu_printf         RTLogPrintf
16 #define qemu_malloc(cb)     RTMemAlloc(cb)
17 #define qemu_mallocz(cb)    RTMemAllocZ(cb)
18 #define qemu_free(pv)       RTMemFree(pv)
19 #define qemu_strdup(psz)    RTStrDup(psz)
20
21 #define qemu_vmalloc(cb)    RTMemPageAlloc(cb)
22 #define qemu_vfree(pv)      RTMemPageFree(pv)
23
24 #ifndef NULL
25 # define NULL 0
26 #endif
27
28 #else /* !VBOX */
29
30 #include <stdarg.h>
31
32 #define qemu_snprintf snprintf   /* bird */
33 #define qemu_vsnprintf vsnprintf /* bird */
34 #define qemu_vprintf vprintf     /* bird */
35
36 #define qemu_printf printf
37
38 void *qemu_malloc(size_t size);
39 void *qemu_mallocz(size_t size);
40 void qemu_free(void *ptr);
41 char *qemu_strdup(const char *str);
42
43 void *qemu_vmalloc(size_t size);
44 void qemu_vfree(void *ptr);
45
46 void *get_mmap_addr(unsigned long size);
47
48 #endif /* !VBOX */
49
50 #endif
Note: See TracBrowser for help on using the browser.

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy