diff --git a/include/misc.h b/include/misc.h index 922ca28..e4b413a 100644 --- a/include/misc.h +++ b/include/misc.h @@ -46,9 +46,9 @@ extern_c Object elk_import False2; /* Align heap addresses */ #ifdef ALIGN_8BYTE -# define ALIGN(ptr) ((ptr) = (void *)(((intptr_t)(ptr) + 7) & ~7)) +# define ELK_ALIGN(ptr) ((ptr) = (void *)(((intptr_t)(ptr) + 7) & ~7)) #else -# define ALIGN(ptr) ((ptr) = (void *)(((intptr_t)(ptr) + 3) & ~3)) +# define ELK_ALIGN(ptr) ((ptr) = (void *)(((intptr_t)(ptr) + 3) & ~3)) #endif /* Normalize stack addresses */ diff --git a/src/heap-sc.c b/src/heap-sc.c index a30d0cc..1f97b7f 100644 --- a/src/heap-sc.c +++ b/src/heap-sc.c @@ -72,11 +72,11 @@ Object Alloc_Object (int size, int type, int konst) { (void)P_Collect (); p = Hp; } - ALIGN(p); + ELK_ALIGN(p); if (p + size > Heap_End) { (void)P_Collect (); p = Hp; - ALIGN(p); + ELK_ALIGN(p); if (p + size > Heap_End - HEAP_MARGIN) Uncatchable_Error ("Out of heap space"); } @@ -143,7 +143,7 @@ again: SETPOINTER(*p, POINTER(*tag)); return 0; } - ALIGN(To); + ELK_ALIGN(To); switch (t) { case T_Bignum: size = sizeof (struct S_Bignum) - sizeof (gran_t) diff --git a/src/libelk.c b/src/libelk.c index 3cbf772..75e8e44 100644 --- a/src/libelk.c +++ b/src/libelk.c @@ -285,7 +285,7 @@ void Elk_Init (int ac, char **av, int init_objects, char *toplevel) { stkbase = &foo; Stack_Grows_Down = Check_Stack_Grows_Down (); - ALIGN(stkbase); + ELK_ALIGN(stkbase); Make_Heap (heap); Init_Everything (); #ifdef HAVE_ATEXIT diff --git a/src/list.c b/src/list.c index 43c552d..5c05127 100644 --- a/src/list.c +++ b/src/list.c @@ -58,7 +58,7 @@ Object P_Cons (Object car, Object cdr) { register char *p; p = Hp; - ALIGN(p); + ELK_ALIGN(p); if (p + sizeof (struct S_Pair) <= Heap_End && !GC_Debug) { Hp = p + sizeof (struct S_Pair); SET(cell, T_Pair, (struct S_Pair *)p);