Align: Make sure 1 is treated as unsigned long instead of int
[coreboot.git] / src / include / stdlib.h
index c3052bd209007e62fb47e1aa29125fc8494f8fa6..5465c14f925be86ecd16fbcb0499d704b3674749 100644 (file)
@@ -5,20 +5,15 @@
 
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
 
-#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1)
+#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1UL)
 #define __ALIGN_MASK(x,mask)    (((x)+(mask))&~(mask))
 
 #define MIN(a,b) ((a) < (b) ? (a) : (b))
 #define MAX(a,b) ((a) > (b) ? (a) : (b))
 
-#ifndef __ROMCC__
-extern void *malloc(size_t size);
+#if !defined(__PRE_RAM__)
+void *malloc(size_t size);
 void free(void *ptr);
-
-/* Extensions to malloc... */
-typedef size_t malloc_mark_t;
-void malloc_mark(malloc_mark_t *place);
-void malloc_release(malloc_mark_t *place);
 #endif
 
 #endif /* STDLIB_H */