Add support for the --disable-boehm-gc flag for systems that lack -lgc.
[fw/sdcc] / src / SDCChasht.h
index 2d8536315af684e2d3e70df1d39bb9a04cf0437c..344cab94500d58b352e7ecddec62a81f71c1056b 100644 (file)
 #ifndef SDCCHASHT_H
 #define SDCCHASHT_H
 
-#ifdef _NO_GC
-
-#include <stdlib.h>
-#define GC_malloc malloc
-#define GC_free free
-#define GC_realloc realloc
-#define GC_malloc_atomic malloc
-
-#else
-
-#include "./gc/gc.h" 
-
-#endif
-
-#ifndef ALLOC
-
-#define  ALLOC(x,sz) if (!(x = GC_malloc(sz)))                          \
-         {                                                           \
-            fprintf(stderr,"out of virtual memory %s , %d",__FILE__,__LINE__);\
-            exit (1);                                                \
-         }
-
-#define  ALLOC_ATOMIC(x,sz) if (!(x = GC_malloc_atomic(sz)))                          \
-         {                                                           \
-            fprintf(stderr,"out of virtual memory %s , %d",__FILE__,__LINE__);\
-            exit (1);                                                \
-         }
-
-
-
-#endif
+#include  "SDCCalloc.h"
 
 
 /* hashtable item */