mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 23:35:45 -04:00
dep/cubeb: Update to 1d66483
This commit is contained in:
@ -16,8 +16,15 @@ extern "C" {
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
#define PRINTF_FORMAT(fmt, args) __attribute__((format(printf, fmt, args)))
|
||||
#if defined(__FILE_NAME__)
|
||||
#define __FILENAME__ __FILE_NAME__
|
||||
#else
|
||||
#define __FILENAME__ (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__)
|
||||
#endif
|
||||
#else
|
||||
#define PRINTF_FORMAT(fmt, args)
|
||||
#include <string.h>
|
||||
#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
|
||||
#endif
|
||||
|
||||
extern cubeb_log_level g_cubeb_log_level;
|
||||
@ -32,10 +39,10 @@ void cubeb_async_log_reset_threads();
|
||||
#define LOGV(msg, ...) LOG_INTERNAL(CUBEB_LOG_VERBOSE, msg, ##__VA_ARGS__)
|
||||
#define LOG(msg, ...) LOG_INTERNAL(CUBEB_LOG_NORMAL, msg, ##__VA_ARGS__)
|
||||
|
||||
#define LOG_INTERNAL(level, fmt, ...) do { \
|
||||
if (g_cubeb_log_callback && level <= g_cubeb_log_level) { \
|
||||
g_cubeb_log_callback("%s:%d: " fmt "\n", __FILE__, __LINE__, ##__VA_ARGS__); \
|
||||
} \
|
||||
#define LOG_INTERNAL(level, fmt, ...) do { \
|
||||
if (g_cubeb_log_callback && level <= g_cubeb_log_level) { \
|
||||
g_cubeb_log_callback("%s:%d: " fmt "\n", __FILENAME__, __LINE__, ##__VA_ARGS__); \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
/* Asynchronous verbose logging, to log in real-time callbacks. */
|
||||
|
Reference in New Issue
Block a user