diff sys.c @ 67:21ac9f57a6d4

Mac OS X 64bit
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 21 May 2011 16:27:41 +0900
parents 435ac1cdb64e
children
line wrap: on
line diff
--- a/sys.c	Tue Jan 18 02:20:10 2011 +0900
+++ b/sys.c	Sat May 21 16:27:41 2011 +0900
@@ -10,7 +10,7 @@
 int malloc_align16(void *free, void *aligned, int size)
 {
   char *index;
-  unsigned int *f=(unsigned int *)free,*a=(unsigned int *)aligned;
+  unsigned long *f=(unsigned long *)free,*a=(unsigned long *)aligned;
 
   if (free == NULL || aligned == NULL || size <= 0) return(-1);
 
@@ -20,11 +20,11 @@
       return(-1);
     }
 
-  *f = *a = (unsigned int)index;
-  if (((unsigned int)index % ALIGN_16BYTE) != 0)
+  *f = *a = (unsigned long)index;
+  if (((unsigned long)index % ALIGN_16BYTE) != 0)
     {
-      index += ALIGN_16BYTE - ((unsigned int)index % ALIGN_16BYTE);
-      *a = (unsigned int)index;
+      index += ALIGN_16BYTE - ((unsigned long)index % ALIGN_16BYTE);
+      *a = (unsigned long)index;
     }
   return(0);
 }