diff options
| author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 00:00:51 -0500 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 00:00:51 -0500 |
| commit | 36bd6c283383851664bbe598601c99385e5dcd43 (patch) | |
| tree | 841682120f19b993eb6de1e6a0c30dda6a11aabf /src/stdlib | |
| parent | f10737a4ee4a818acdc28fa2e32c85a74f47eb5c (diff) | |
make tweaks to work with 1:1 checked functions
Diffstat (limited to 'src/stdlib')
| -rw-r--r-- | src/stdlib/__stdlib.c | 4 | ||||
| -rw-r--r-- | src/stdlib/abort_handler_s.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/stdlib/__stdlib.c b/src/stdlib/__stdlib.c index a95b7ef7..d1006bec 100644 --- a/src/stdlib/__stdlib.c +++ b/src/stdlib/__stdlib.c @@ -1,5 +1,9 @@ #include "_stdlib.h" +#if ! (__STDC_VERSION__ >= 201112 && defined __STDC_WANT_LIB_EXT1__) +#define abort_handler_s __abort_handler_s +#endif + struct __stdlib __stdlib = { .constraint_handler = abort_handler_s, }; diff --git a/src/stdlib/abort_handler_s.c b/src/stdlib/abort_handler_s.c index 4b1e3f03..cff0d539 100644 --- a/src/stdlib/abort_handler_s.c +++ b/src/stdlib/abort_handler_s.c @@ -1,7 +1,7 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> -//#include <errno.h> +#include <errno.h> #include "errno/errno_t.h" #include "_stdlib.h" @@ -17,7 +17,7 @@ void abort_handler_s(const char * restrict msg, void * restrict ptr, errno_t err /* TODO: map numbers to names as well */ printf("While handling signal %d: ", ci->signal); } - printf("Function %s()", ci->func); + if (__checked_call.file) { printf(" ("); if (__checked_call.func) { |
