From bbbb3ff859c9e4a79885375bf7803f682a2cd358 Mon Sep 17 00:00:00 2001 From: Kevin Shanahan Date: Tue, 23 Apr 2013 14:44:14 +0930 Subject: [PATCH] common: use stdbool in threads.c, log.c so cmdlib isn't needed The only thing used by log.c was the qboolean definition, so just use stdbool internally instead. Signed-off-by: Kevin Shanahan --- common/log.c | 4 ++-- common/threads.c | 4 +++- include/common/log.h | 1 - include/common/threads.h | 2 -- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/common/log.c b/common/log.c index 495d489b..c65f428c 100644 --- a/common/log.c +++ b/common/log.c @@ -21,15 +21,15 @@ * common/log.c */ +#include #include #include #include -#include #include static FILE *logfile; -static qboolean log_ok; +static _Bool log_ok; void init_log(const char *filename) diff --git a/common/threads.c b/common/threads.c index b55f8f5f..f1f097f2 100644 --- a/common/threads.c +++ b/common/threads.c @@ -1,13 +1,15 @@ /* common/threads.c */ +#include #include +#include #include #include #include /* Make the locks no-ops if we aren't running threads */ -static qboolean threads_active = false; +static _Bool threads_active = false; static int dispatch; static int workcount; diff --git a/include/common/log.h b/include/common/log.h index d9a60f5c..bdd65ae0 100644 --- a/include/common/log.h +++ b/include/common/log.h @@ -28,7 +28,6 @@ #define __COMMON_LOG_H__ #include -#include void init_log(const char *filename); void close_log(); diff --git a/include/common/threads.h b/include/common/threads.h index e4c4ad44..3ef67375 100644 --- a/include/common/threads.h +++ b/include/common/threads.h @@ -3,8 +3,6 @@ #ifndef __COMMON_THREADS_H__ #define __COMMON_THREADS_H__ -#include - extern int numthreads; int GetDefaultThreads(void);