#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
+
+#ifndef TEST_MALLOC_HOOK
+# define TEST_MALLOC_HOOK 1
+#endif
#include "cdecl-internal.h"
+#undef malloc
static union test_alloc {
union test_alloc *p;
return NULL;
n = (n + sizeof *alloc - 1) / sizeof *alloc;
- alloc = (malloc)((n + ALLOC_PAYLOAD) * sizeof *alloc);
+ alloc = malloc((n + ALLOC_PAYLOAD) * sizeof *alloc);
if (!alloc)
return NULL;
return ret;
}
+
+/*
+ * Function called from output.c but not needed for error messaging
+ * (only current user of this file)
+ */
+const char *cdecl__token_name(unsigned token)
+{
+ printf("Bail out! stub cdecl__token_name called\n");
+ exit(99);
+}