mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 01:00:20 +02:00
Add replacement for missing getpagesize() on MINGW
* libguile/posix-w32.c (getpagesize_w32): new procedure * libguile/posix-w32.h: declaration of getpagesize_w32 * libguile/loader.c [__MINGW32__](scm_bootstrap_loader): use new procedure * libguile/vm.c [__MINGW32__](scm_i_vm_prepare_stack): use new procedure
This commit is contained in:
parent
0b9f58c339
commit
0e20c0c8c6
4 changed files with 21 additions and 0 deletions
|
@ -52,6 +52,9 @@
|
|||
|
||||
#include "loader.h"
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include "posix-w32.h"
|
||||
#endif
|
||||
|
||||
/* This file contains the loader for Guile's on-disk format: ELF with
|
||||
some custom tags in the dynamic segment. */
|
||||
|
@ -822,7 +825,11 @@ scm_find_slot_map_unlocked (const uint32_t *ip)
|
|||
void
|
||||
scm_bootstrap_loader (void)
|
||||
{
|
||||
#ifndef __MINGW32__
|
||||
page_size = getpagesize ();
|
||||
#else
|
||||
page_size = getpagesize_w32 ();
|
||||
#endif
|
||||
/* page_size should be a power of two. */
|
||||
if (page_size & (page_size - 1))
|
||||
abort ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue