VirtualBox

source: vbox/trunk/src/recompiler/osdep.h@ 16199

Last change on this file since 16199 was 2422, checked in by vboxsync, 18 years ago

Removed the old recompiler code.

  • Property svn:eol-style set to native
File size: 1.2 KB
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
38void *qemu_malloc(size_t size);
39void *qemu_mallocz(size_t size);
40void qemu_free(void *ptr);
41char *qemu_strdup(const char *str);
42
43void *qemu_vmalloc(size_t size);
44void qemu_vfree(void *ptr);
45
46void *get_mmap_addr(unsigned long size);
47
48#endif /* !VBOX */
49
50#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette