mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-05 14:32:15 +00:00
s/vm_page_size/vm_get_page_size/ to avoid name clash on MacOS X
This commit is contained in:
parent
a8a235345c
commit
50eee913b8
@ -184,7 +184,7 @@ static int log_base_2(uint32 x)
|
||||
// Extend size to page boundary
|
||||
static uint32 page_extend(uint32 size)
|
||||
{
|
||||
const uint32 page_size = vm_page_size();
|
||||
const uint32 page_size = vm_get_page_size();
|
||||
const uint32 page_mask = page_size - 1;
|
||||
return (size + page_mask) & ~page_mask;
|
||||
}
|
||||
@ -232,7 +232,7 @@ static bool video_vosf_init(MONITOR_INIT)
|
||||
{
|
||||
VIDEO_MODE_INIT_MONITOR;
|
||||
|
||||
const uintptr page_size = vm_page_size();
|
||||
const uintptr page_size = vm_get_page_size();
|
||||
const uintptr page_mask = page_size - 1;
|
||||
|
||||
// Round up frame buffer base to page boundary
|
||||
|
@ -451,7 +451,7 @@ int vm_protect(void * addr, size_t size, int prot)
|
||||
|
||||
/* Returns the size of a page. */
|
||||
|
||||
int vm_page_size(void)
|
||||
int vm_get_page_size(void)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return 4096;
|
||||
@ -470,7 +470,7 @@ int main(void)
|
||||
vm_init();
|
||||
|
||||
#define page_align(address) ((char *)((unsigned long)(address) & -page_size))
|
||||
unsigned long page_size = vm_page_size();
|
||||
unsigned long page_size = vm_get_page_size();
|
||||
|
||||
const int area_size = 6 * page_size;
|
||||
volatile char * area = (volatile char *) vm_acquire(area_size);
|
||||
|
@ -111,6 +111,6 @@ extern int vm_protect(void * addr, size_t size, int prot);
|
||||
|
||||
/* Returns the size of a page. */
|
||||
|
||||
extern int vm_page_size(void);
|
||||
extern int vm_get_page_size(void);
|
||||
|
||||
#endif /* VM_ALLOC_H */
|
||||
|
Loading…
Reference in New Issue
Block a user