From 563a9326598886e03cde94d92f979e68bdad9760 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Wed, 5 Aug 2020 23:20:50 +0200 Subject: Remove pointless compiler.h --- include/compiler.h | 12 ------------ include/log.h | 28 ++++++++++++++++------------ 2 files changed, 16 insertions(+), 24 deletions(-) delete mode 100644 include/compiler.h (limited to 'include') diff --git a/include/compiler.h b/include/compiler.h deleted file mode 100644 index 35cc061..0000000 --- a/include/compiler.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _COMPILER_H -#define _COMPILER_H - -#ifdef __GNUC__ -#define ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end))) -#else -#define ATTRIB_PRINTF(start, end) -#endif - -#define STRLEN(s) ((sizeof(s) / sizeof(s[0])) - 1) - -#endif diff --git a/include/log.h b/include/log.h index e916446..7b6e9a4 100644 --- a/include/log.h +++ b/include/log.h @@ -1,20 +1,13 @@ #ifndef _LOG_H #define _LOG_H -#include "compiler.h" #include -enum libseat_log_level { - LIBSEAT_SILENT = 0, - LIBSEAT_ERROR = 1, - LIBSEAT_INFO = 2, - LIBSEAT_DEBUG = 3, - LIBSEAT_LOG_LEVEL_LAST, -}; - -void libseat_log_init(enum libseat_log_level level); - -void _libseat_logf(enum libseat_log_level level, const char *fmt, ...) ATTRIB_PRINTF(2, 3); +#ifdef __GNUC__ +#define ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end))) +#else +#define ATTRIB_PRINTF(start, end) +#endif #ifdef LIBSEAT_REL_SRC_DIR #define _LIBSEAT_FILENAME ((const char *)__FILE__ + sizeof(LIBSEAT_REL_SRC_DIR) - 1) @@ -48,4 +41,15 @@ void _libseat_logf(enum libseat_log_level level, const char *fmt, ...) ATTRIB_PR #define log_debug(str) #endif +enum libseat_log_level { + LIBSEAT_SILENT = 0, + LIBSEAT_ERROR = 1, + LIBSEAT_INFO = 2, + LIBSEAT_DEBUG = 3, + LIBSEAT_LOG_LEVEL_LAST, +}; + +void libseat_log_init(enum libseat_log_level level); +void _libseat_logf(enum libseat_log_level level, const char *fmt, ...) ATTRIB_PRINTF(2, 3); + #endif -- cgit v1.2.3