X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3e170ce000f1506b7b5d2c5c7faec85ceabb573d..d26ffc64f583ab2d29df48f13518685602bc8832:/EXTERNAL_HEADERS/corecrypto/cc_debug.h diff --git a/EXTERNAL_HEADERS/corecrypto/cc_debug.h b/EXTERNAL_HEADERS/corecrypto/cc_debug.h index a04402247..80e61a7b3 100644 --- a/EXTERNAL_HEADERS/corecrypto/cc_debug.h +++ b/EXTERNAL_HEADERS/corecrypto/cc_debug.h @@ -21,14 +21,20 @@ // Printf for corecrypto // ======================== #if CC_KERNEL -#include -#define cc_printf(x...) printf(x) -extern int printf(const char *format, ...) __printflike(1,2); -#elif CC_USE_S3 -#define cc_printf(x...) printf(x) + #include + #define cc_printf(x...) kprintf(x) + #if !CONFIG_EMBEDDED + extern int printf(const char *format, ...) __printflike(1,2); + #endif +#elif CC_USE_S3 || CC_IBOOT || CC_RTKIT + #include + #define cc_printf(x...) printf(x) +#elif defined(__ANDROID_API__) + #include + #define cc_printf(x...) __android_log_print(ANDROID_LOG_DEBUG, "corecrypto", x); #else -#include -#define cc_printf(x...) fprintf(stderr, x) + #include + #define cc_printf(x...) fprintf(stderr, x) #endif // ======================== @@ -60,7 +66,10 @@ extern int printf(const char *format, ...) __printflike(1,2); // ======================== // Print utilities for corecrypto // ======================== + +#include + /* Print a byte array of arbitrary size */ -void cc_print(const char *label, unsigned long count, const uint8_t *s); +void cc_print(const char *label, size_t count, const uint8_t *s); #endif /* _CORECRYPTO_CCN_DEBUG_H_ */