mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-31 03:20:28 +08:00
* heap.cc (heap_init): Fix extern declaration of getpagesize.
* syscalls.cc (getpagesize): Fix another typo.
This commit is contained in:
parent
dc3651b6cd
commit
66097f06dd
@ -1,3 +1,8 @@
|
|||||||
|
Mon Jan 15 13:50:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* heap.cc (heap_init): Fix extern declaration of getpagesize.
|
||||||
|
* syscalls.cc (getpagesize): Fix another typo.
|
||||||
|
|
||||||
Mon Jan 15 12:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
Mon Jan 15 12:48:00 2001 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* syscalls.cc (getpagesize): Save pagesize in global variable to
|
* syscalls.cc (getpagesize): Save pagesize in global variable to
|
||||||
|
@ -21,6 +21,8 @@ details. */
|
|||||||
|
|
||||||
static unsigned page_const = 0;
|
static unsigned page_const = 0;
|
||||||
|
|
||||||
|
extern "C" size_t getpagesize ();
|
||||||
|
|
||||||
/* Initialize the heap at process start up. */
|
/* Initialize the heap at process start up. */
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -29,7 +31,6 @@ heap_init ()
|
|||||||
/* If we're the forkee, we must allocate the heap at exactly the same place
|
/* If we're the forkee, we must allocate the heap at exactly the same place
|
||||||
as our parent. If not, we don't care where it ends up. */
|
as our parent. If not, we don't care where it ends up. */
|
||||||
|
|
||||||
extern size_t getpagesize ();
|
|
||||||
page_const = getpagesize ();
|
page_const = getpagesize ();
|
||||||
if (brkbase)
|
if (brkbase)
|
||||||
{
|
{
|
||||||
|
@ -1353,12 +1353,11 @@ getdtablesize ()
|
|||||||
return fdtab.size;
|
return fdtab.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD sys_page_size = 0;
|
|
||||||
|
|
||||||
extern "C" size_t
|
extern "C" size_t
|
||||||
getpagesize ()
|
getpagesize ()
|
||||||
{
|
{
|
||||||
return sysconf (_SC_PAGESIZE);
|
static DWORD sys_page_size = 0;
|
||||||
|
|
||||||
if (!sys_page_size)
|
if (!sys_page_size)
|
||||||
{
|
{
|
||||||
SYSTEM_INFO si;
|
SYSTEM_INFO si;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user