diff options
author | Ryo Nakamura <upa@haeena.net> | 2023-02-26 23:18:39 +0900 |
---|---|---|
committer | Ryo Nakamura <upa@haeena.net> | 2023-02-26 23:18:39 +0900 |
commit | 700d64b375470de42589ea66baabeee289cb66f2 (patch) | |
tree | d0f39cd366521dc8c98ee2f97d80566de8746d1e /src/util.h | |
parent | 2bad21bdc296c26d52e97359f1c1ce2e9b96f1aa (diff) |
now mscp links libmscp
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -4,6 +4,7 @@ #include <stdio.h> #include <string.h> #include <errno.h> +#include <libgen.h> #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) @@ -19,8 +20,8 @@ __func__, ##__VA_ARGS__) #define pr_err(fmt, ...) fprintf(stderr, "\x1b[1m\x1b[31m" \ - "ERR:%s():\x1b[0m " fmt, \ - __func__, ##__VA_ARGS__) + "ERR:%s:%d:%s():\x1b[0m " fmt, \ + basename(__FILE__), __LINE__, __func__, ##__VA_ARGS__) #ifdef DEBUG #define pr_debug(fmt, ...) fprintf(stderr, "\x1b[1m\x1b[33m" \ |