24 lines
464 B
C
24 lines
464 B
C
#ifndef INCLUDED_UTIL_H
|
|||
|
|
#define INCLUDED_UTIL_H
|
||
|
|
|
||
|
|
#if __has_attribute(format)
|
||
|
|
# define PRINTF_LIKE(i, j) __attribute__((format(printf, i, j)))
|
||
|
|
#else
|
||
|
|
# define PRINTF_LIKE(i, j)
|
||
|
|
#endif
|
||
|
|
|
||
|
|
#if __has_attribute(no_sanitize_address)
|
||
|
|
# define NO_SANITIZE __attribute__((no_sanitize_address))
|
||
|
|
#else
|
||
|
|
# define NO_SANITIZE
|
||
|
|
#endif
|
||
|
|
|
||
|
|
extern const char *EXEC_NAME;
|
||
|
|
|
||
|
|
void set_exec_name(const char *argv0);
|
||
|
|
|
||
|
|
PRINTF_LIKE(1, 2)
|
||
|
|
void log_error(const char *fmt, ...);
|
||
|
|
|
||
|
|
#endif
|