diff options
Diffstat (limited to 'include/al')
| -rw-r--r-- | include/al/lib.h | 2 | ||||
| -rw-r--r-- | include/al/log.h | 2 | ||||
| -rw-r--r-- | include/al/types.h | 11 |
3 files changed, 8 insertions, 7 deletions
diff --git a/include/al/lib.h b/include/al/lib.h index 60960cc..154474e 100644 --- a/include/al/lib.h +++ b/include/al/lib.h @@ -87,7 +87,7 @@ void al_malloc_stats(size_t *current, size_t *peak, size_t *total); #define al_snprintf snprintf #define al_vsnprintf vsnprintf #define al_fflush fflush -#ifdef _DEBUG_ +#ifdef AL_DEBUG #define al_assert assert #else #define al_assert(expr) do { (void)sizeof(expr); } while (0) // NOLINT(bugprone-sizeof-expression) diff --git a/include/al/log.h b/include/al/log.h index 91f87bb..f3c61b1 100644 --- a/include/al/log.h +++ b/include/al/log.h @@ -37,7 +37,7 @@ s32 _al_logv(u8 level, const char *section, const char *name, const s32 line, co #define log_info(fmt, ...) al_log(AL_LOG_INFO, AL_LOG_SECTION_NAME, fmt, ##__VA_ARGS__) #define log_warn(fmt, ...) al_log(AL_LOG_WARN, AL_LOG_SECTION_NAME, fmt, ##__VA_ARGS__) #define log_error(fmt, ...) al_log(AL_LOG_ERROR, AL_LOG_SECTION_NAME, fmt, ##__VA_ARGS__) -#ifdef _DEBUG_ +#ifdef AL_DEBUG #define log_debug(fmt, ...) al_log(AL_LOG_DEBUG, AL_LOG_SECTION_NAME, fmt, ##__VA_ARGS__) #else #define log_debug(fmt, ...) al_log_nop(AL_LOG_SECTION_NAME, fmt, ##__VA_ARGS__) diff --git a/include/al/types.h b/include/al/types.h index fc88077..2e2ebfe 100644 --- a/include/al/types.h +++ b/include/al/types.h @@ -19,6 +19,12 @@ #define _XOPEN_SOURCE 500 #endif +#ifdef _MSC_VER +#define _CRT_SECURE_NO_WARNINGS +#include <basetsd.h> +typedef SSIZE_T ssize_t; +#endif + #include <stddef.h> #include <stdbool.h> #include <stdint.h> @@ -43,9 +49,4 @@ typedef double f64; typedef unsigned long ulong; typedef unsigned char uchar; -#ifdef _MSC_VER -#include <BaseTsd.h> -typedef SSIZE_T ssize_t; -#endif - #endif // _AL_TYPES_H |