Split out platform specific defines to common header file

svn: r12251
This commit is contained in:
Kevin Tew 2008-11-05 21:04:30 +00:00
parent 77df801ad1
commit a4b99783d7
2 changed files with 24 additions and 24 deletions

View File

@ -31,6 +31,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "platforms.h"
#include "gc2.h"
#include "gc2_dump.h"
#include "newgc_internal.h"
@ -38,30 +39,6 @@
static THREAD_LOCAL NewGC *GC;
#ifdef _WIN32
# include <windows.h>
# define bzero(m, s) memset(m, 0, s)
# define inline _inline
#endif
#if defined(sparc) || defined(__sparc) || defined(__sparc__)
/* Required for `double' operations: */
# define GC_ALIGN_EIGHT
#endif
/* Even when 8-byte alginment is not required by the processor, it's
better for floating-point performance (PowerPC) and may be required
for some libraries (VecLib in Mac OS X, including x86).
Under Windows, Mac OS X, and Linux x86_64, malloc() returns 16-byte
aligned data. And, actually, VecLib says that it requires
16-byte-aligned data. So, in those cases, GC_ALIGN_SIXTEEN might be
better --- but that's a lot more expensive, increasing DrScheme's
initial footprint by almost 10%. */
#ifndef GC_ALIGN_EIGHT
# define GC_ALIGN_EIGHT
#endif
#include "msgprint.c"
/*****************************************************************************/

View File

@ -0,0 +1,23 @@
#ifdef _WIN32
# include <windows.h>
# define bzero(m, s) memset(m, 0, s)
# define inline _inline
#endif
#if defined(sparc) || defined(__sparc) || defined(__sparc__)
/* Required for `double' operations: */
# define GC_ALIGN_EIGHT
#endif
/* Even when 8-byte alginment is not required by the processor, it's
better for floating-point performance (PowerPC) and may be required
for some libraries (VecLib in Mac OS X, including x86).
Under Windows, Mac OS X, and Linux x86_64, malloc() returns 16-byte
aligned data. And, actually, VecLib says that it requires
16-byte-aligned data. So, in those cases, GC_ALIGN_SIXTEEN might be
better --- but that's a lot more expensive, increasing DrScheme's
initial footprint by almost 10%. */
#ifndef GC_ALIGN_EIGHT
# define GC_ALIGN_EIGHT
#endif