spa: drop the pre-C99 checks from the log.h header

spa_log_logv was missing, so with this ifdef'd out we already fail to
compile:
spa/plugins/alsa/alsa-acp-device.c:1003: undefined reference to `spa_log_logv'

And it appears that the only requirement is __VA_ARGS__ support in the
compiler which we require in other places anyway.
This commit is contained in:
Peter Hutterer 2021-09-14 12:04:44 +10:00
parent 2b65fb36f2
commit 49ebcfb093

View file

@ -112,9 +112,6 @@ struct spa_log_methods {
#define spa_log_level_enabled(l,lev) ((l) && (l)->level >= (lev))
#if defined(__USE_ISOC11) || defined(__USE_ISOC99) || \
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
#define spa_log_log(l,lev,...) \
({ \
struct spa_log *_l = l; \
@ -145,35 +142,6 @@ struct spa_log_methods {
#define spa_log_trace_fp(l,...)
#endif
#else
#define SPA_LOG_FUNC(name,lev) \
static inline SPA_PRINTF_FUNC(2,3) void spa_log_##name (struct spa_log *l, const char *format, ...) \
{ \
if (SPA_UNLIKELY(spa_log_level_enabled(l, lev))) { \
va_list varargs; \
va_start (varargs, format); \
spa_interface_call(&l->iface, \
struct spa_log_methods, logv, 0, lev, \
__FILE__,__LINE__,__func__,format,varargs); \
va_end (varargs); \
} \
}
SPA_LOG_FUNC(error, SPA_LOG_LEVEL_ERROR)
SPA_LOG_FUNC(warn, SPA_LOG_LEVEL_WARN)
SPA_LOG_FUNC(info, SPA_LOG_LEVEL_INFO)
SPA_LOG_FUNC(debug, SPA_LOG_LEVEL_DEBUG)
SPA_LOG_FUNC(trace, SPA_LOG_LEVEL_TRACE)
#ifndef FASTPATH
SPA_LOG_FUNC(trace_fp, SPA_LOG_LEVEL_TRACE)
#else
static inline void spa_log_trace_fp (struct spa_log *l, const char *format, ...) { }
#endif
#endif
/** \fn spa_log_error */
/** keys can be given when initializing the logger handle */