Remove stdio.h from utils.h. Manually include stdio.h if using the

TRACEF() macro from utils.h
This commit is contained in:
Nils O. Selåsdal
2015-01-03 01:52:53 +01:00
parent a367e84b00
commit 603d86bb61
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -2,7 +2,6 @@
#define UC_UTILS_H_ #define UC_UTILS_H_
#include <stddef.h> #include <stddef.h>
#include <stdio.h>
//Gnerate a compiler error if the compile time //Gnerate a compiler error if the compile time
//constant expression fails //constant expression fails
@@ -74,6 +73,7 @@ const typeof( ((const type *)0)->member ) *__mptr = (ptr); \
#ifdef DEBUG #ifdef DEBUG
//include <stdio.h> if using the TRACEF() macro
#define TRACEF(fmt, ...)\ #define TRACEF(fmt, ...)\
do { \ do { \
fprintf(stdout, "%s (%s)\t" fmt, UC_SRC_LOCATION, __FUNCTION__, ##__VA_ARGS__);\ fprintf(stdout, "%s (%s)\t" fmt, UC_SRC_LOCATION, __FUNCTION__, ##__VA_ARGS__);\
+1 -1
View File
@@ -1,6 +1,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <string.h> #include <stdio.h>
#include <assert.h> #include <assert.h>
#include "ucore/clock.h" #include "ucore/clock.h"
#include "ucore/backtrace.h" #include "ucore/backtrace.h"
+1
View File
@@ -1,4 +1,5 @@
#include <check.h> #include <check.h>
#include <stdio.h>
#include "ucore/utils.h" #include "ucore/utils.h"
#include "ucore/heapsort.h" #include "ucore/heapsort.h"