+#ifdef EXP_OOM_TESTING
+extern NCURSES_EXPORT(void *) _nc_oom_malloc(size_t size);
+extern NCURSES_EXPORT(void *) _nc_oom_calloc(size_t nmemb, size_t size);
+extern NCURSES_EXPORT(void *) _nc_oom_realloc(void *ptr, size_t size);
+extern NCURSES_EXPORT(void) _nc_oom_free(void *ptr);
+extern NCURSES_EXPORT(char *) _nc_oom_strdup(const char *ptr);
+#define malloc(size) _nc_oom_malloc(size)
+#define calloc(nmemb, size) _nc_oom_calloc(nmemb, size)
+#define realloc(ptr, size) _nc_oom_realloc(ptr, size)
+#define free(ptr) _nc_oom_free(ptr)
+#define strdup(ptr) _nc_oom_strdup(ptr)
+#endif