#include <stdlib.h>
#include <string.h>
-#define USE_STD_ALLOCATOR
-
-#ifdef USE_STD_ALLOCATOR
-# include "gc_allocator.h"
+#ifndef DONT_USE_STD_ALLOCATOR
+# include "gc_allocator.h"
#else
-# include "new_gc_alloc.h"
+ /* Note: This works only for ancient STL versions. */
+# include "new_gc_alloc.h"
#endif
extern "C" {
GC_INIT();
int i, iters, n;
-# ifdef USE_STD_ALLOCATOR
+# ifndef DONT_USE_STD_ALLOCATOR
int *x = gc_allocator<int>().allocate(1);
int *xio;
xio = gc_allocator_ignore_off_page<int>().allocate(1);
int *x = (int *)gc_alloc::allocate(sizeof(int));
# endif
*x = 29;
-# ifdef USE_STD_ALLOCATOR
+# ifndef DONT_USE_STD_ALLOCATOR
*xptr = x;
x = 0;
# endif
D::Test();
F::Test();}
-# ifdef USE_STD_ALLOCATOR
+# ifndef DONT_USE_STD_ALLOCATOR
x = *xptr;
# endif
my_assert (29 == x[0]);