diff --git a/packages/test/common.h b/packages/test/common.h index b4bb4611..ff370c6f 100644 --- a/packages/test/common.h +++ b/packages/test/common.h @@ -12,9 +12,7 @@ #else #include void console_error(const char* fmt, const char* str); -void abort() { - __builtin_trap(); -} +#define abort() __builtin_trap() #define EPRINT(str) console_error("%s", (str)) #endif diff --git a/packages/test/runjs/binding.c b/packages/test/runjs/binding.c index 3cfc7b1b..ad3afdb0 100644 --- a/packages/test/runjs/binding.c +++ b/packages/test/runjs/binding.c @@ -6,9 +6,6 @@ #else void* malloc(size_t size); void free(void* p); -void abort() { - __builtin_trap(); -} #endif static void Finalize(napi_env env, void* data, void* hint) { diff --git a/packages/test/string/binding.c b/packages/test/string/binding.c index ec52b361..31425e2a 100644 --- a/packages/test/string/binding.c +++ b/packages/test/string/binding.c @@ -23,10 +23,6 @@ size_t strlen(const char *s) for (; *s; s++); return s-a; } - -void abort() { - __builtin_trap(); -} #endif #define NAPI_EXPERIMENTAL