aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2019-11-06 09:26:08 +0100
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2019-11-06 09:26:53 +0100
commit42c242f5f2f0a3058672dd568de49f72a18f3665 (patch)
tree700e34340f82e911b1a63621117b898c0ace2dac
parentfba5504d6162ee242d196508d87204e4a4a419ef (diff)
downloadlibfo-42c242f5f2f0a3058672dd568de49f72a18f3665.tar.gz
libfo-42c242f5f2f0a3058672dd568de49f72a18f3665.tar.bz2
libfo-42c242f5f2f0a3058672dd568de49f72a18f3665.zip
fo.c.in: add 'f/fogen' when printing logs
To easy determin if crash occured in fogen files or users project Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
-rw-r--r--fo.c.in9
1 files changed, 3 insertions, 6 deletions
diff --git a/fo.c.in b/fo.c.in
index 532264a..0e71e92 100644
--- a/fo.c.in
+++ b/fo.c.in
@@ -264,8 +264,8 @@ void fo_init
void * (*real_memset)(void *, int, size_t);
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
- #define die(S, ...) do { fprintf(stderr, S, __VA_ARGS__); exit(1); } while (0)
- #define diep(S) do { perror(S); exit(1); } while (0)
+ #define die(S, ...) do { fprintf(stderr, "f/fogen: "S, __VA_ARGS__); exit(1); } while (0)
+ #define diep(S) do { perror("f/fogen: "S); exit(1); } while (0)
#define FO_INIT(F) \
fo_info[fo_ ## F].countdown = -1; \
@@ -274,10 +274,7 @@ void fo_init
fo_info[fo_ ## F].original = dlsym(RTLD_NEXT, #F); \
fo_info[fo_ ## F].str = #F; \
if (fo_info[fo_ ## F].original == NULL) \
- { \
- fprintf(stderr, "f/dlsym(RTLD_NEXT, %s): %s\n", #F, dlerror()); \
- exit(1); \
- }
+ die("dlsym(RTLD_NEXT, %s): %s\n", #F, dlerror())
${fo_init_list}