Automatic endian detection for known architectures

git-svn-id: http://picoc.googlecode.com/svn/trunk@387 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2009-11-07 18:39:35 +00:00
parent b777be13be
commit 26c543f326
2 changed files with 10 additions and 5 deletions

2
heap.c
View file

@ -40,7 +40,7 @@ void HeapInit()
int Count;
int AlignOffset = 0;
while (((unsigned int)&HeapMemory[AlignOffset] & (sizeof(ALIGN_TYPE)-1)) != 0)
while (((unsigned long)&HeapMemory[AlignOffset] & (sizeof(ALIGN_TYPE)-1)) != 0)
AlignOffset++;
StackFrame = &HeapMemory[AlignOffset];

View file

@ -50,10 +50,15 @@
# include <stdarg.h>
# include <setjmp.h>
# ifndef NO_FP
# include <math.h>
# define PICOC_MATH_LIBRARY
# define NEED_MATH_LIBRARY
#endif
# include <math.h>
# define PICOC_MATH_LIBRARY
# define NEED_MATH_LIBRARY
# if defined(__powerpc__) || defined(__hppa__)
# define BIG_ENDIAN
# else
# undef BIG_ENDIAN
# endif
# endif
extern jmp_buf ExitBuf;