Code drop from //branches/cupcake/...@124589

This commit is contained in:
The Android Open Source Project
2008-12-17 18:03:48 -08:00
parent a27d2baa0c
commit 4e468ed2eb
287 changed files with 11498 additions and 344 deletions

View File

@@ -27,15 +27,17 @@
#define TRUE 1
#define FALSE 0
#define __PRINTVF(v,f,x...) do { \
(debug_verbosity > (v)) && (printf(x), ((f) && fflush(stdout))); \
} while (0)
/* Only use printf() during debugging. We have seen occasional memory
* corruption when the linker uses printf().
*/
#if LINKER_DEBUG
extern int debug_verbosity;
#warning "*** LINKER IS USING printf(); DO NOT CHECK THIS IN ***"
#define _PRINTVF(v,f,x...) do { \
(debug_verbosity > (v)) && (printf(x), ((f) && fflush(stdout))); \
} while (0)
#define _PRINTVF(v,f,x...) __PRINTVF(v,f,x)
#else /* !LINKER_DEBUG */
#define _PRINTVF(v,f,x...) do {} while(0)
#endif /* LINKER_DEBUG */
@@ -46,7 +48,7 @@ extern int debug_verbosity;
#define WARN(fmt,args...) \
_PRINTVF(-1, TRUE, "%s:%d| WARNING: " fmt, __FILE__, __LINE__, ## args)
#define ERROR(fmt,args...) \
_PRINTVF(-1, TRUE, "%s:%d| ERROR: " fmt, __FILE__, __LINE__, ## args)
__PRINTVF(-1, TRUE, "%s:%d| ERROR: " fmt, __FILE__, __LINE__, ## args)
#if TRACE_DEBUG
#define DEBUG(x...) _PRINTVF(2, TRUE, "DEBUG: " x)