Back to index

plt-scheme  4.2.1
platforms.h
Go to the documentation of this file.
00001 #ifdef _WIN32
00002 # include <windows.h>
00003 # define bzero(m, s) memset(m, 0, s)
00004 # define inline _inline
00005 #endif
00006 
00007 #include "mzconfig.h"
00008 
00009 #ifdef SIZEOF_LONG
00010 # if SIZEOF_LONG == 8
00011 #  define SIXTY_FOUR_BIT_INTEGERS
00012 # endif
00013 #endif
00014 
00015 #if defined(sparc) || defined(__sparc) || defined(__sparc__)
00016 /* Required for `double' operations: */
00017 # define GC_ALIGN_EIGHT
00018 #endif
00019 
00020 /* Even when 8-byte alginment is not required by the processor, it's
00021    better for floating-point performance (PowerPC) and may be required
00022    for some libraries (VecLib in Mac OS X, including x86).
00023 
00024    Under Windows, Mac OS X, and Linux x86_64, malloc() returns 16-byte
00025    aligned data. And, actually, VecLib says that it requires
00026    16-byte-aligned data. So, in those cases, GC_ALIGN_SIXTEEN might be
00027    better --- but that's a lot more expensive, increasing DrScheme's
00028    initial footprint by almost 10%. */
00029 #ifndef GC_ALIGN_EIGHT
00030 # define GC_ALIGN_EIGHT
00031 #endif
00032 
00033 #ifdef MZ_USE_PLACES
00034 # if _MSC_VER
00035 #  define THREAD_LOCAL __declspec(thread)
00036 # else
00037 #  define THREAD_LOCAL __thread
00038 # endif
00039 #else
00040 # define THREAD_LOCAL /* empty */
00041 #endif
00042