GC and header fixes from Andrew Reilly

svn: r8385
This commit is contained in:
Matthew Flatt 2008-01-23 01:59:22 +00:00
parent b2dbe63ed1
commit 3443acd61a
6 changed files with 8 additions and 4 deletions

View File

@ -16,3 +16,5 @@ ways:
* Added case in "configure" sparc64-*-freebsd* to existing sparc64 line
* Added case in "configure" x86_64-*-openbsd* to the existing x86_64 line
* Changed ffi_common.h to always include <string.h>

View File

@ -33,7 +33,7 @@ char *alloca ();
#endif
/* Check for the existence of memcpy. */
#if STDC_HEADERS
#if 1 || STDC_HEADERS
# include <string.h>
#else
# ifndef HAVE_MEMCPY

View File

@ -291,13 +291,13 @@ inline static struct mpage **create_page_map(void *p) {
pos = (unsigned long)p >> 48;
page_maps = page_mapss[pos];
if (!page_maps) {
page_maps = (struct mpage ***)malloc(sizeof(struct mpage **) * (1 << 16));
page_maps = (struct mpage ***)calloc(1 << 16, sizeof(struct mpage **));
page_mapss[pos] = page_maps;
}
pos = ((unsigned long)p >> 32) & ((1 << 16) - 1);
page_map = page_maps[pos];
if (!page_map) {
page_map = (struct mpage **)malloc(sizeof(struct mpage *) * (1 << USEFUL_ADDR_BITS));
page_map = (struct mpage **)calloc(1 << USEFUL_ADDR_BITS, sizeof(struct mpage *));
page_maps[pos] = page_map;
}
return page_map;

View File

@ -53,7 +53,7 @@
extern FILE *popen();
#endif
#if defined(SYSV) || defined(SVR4) || defined(VMS)
#if defined(__FreeBSD__) || defined(SYSV) || defined(SVR4) || defined(VMS)
#include <string.h>
#ifndef index

View File

@ -8,6 +8,7 @@
#include <assert.h>
#include <wxtimeout.h>
#include "xwTools3d.h"
#include "xwTabString.h"
#include <./xwArrowP.h>
static void activate_and_start_timer(
#if NeedFunctionPrototypes

View File

@ -416,3 +416,4 @@ resource. It is the same routine as for the shadows in the XfwfFrame widget.
@incl <assert.h>
@incl <wxtimeout.h>
@incl "xwTools3d.h"
@incl "xwTabString.h"