// Printf for corecrypto
// ========================
#if CC_KERNEL
-#include <pexpert/pexpert.h>
-#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 <pexpert/pexpert.h>
+ #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 <stdio.h>
+ #define cc_printf(x...) printf(x)
+#elif defined(__ANDROID_API__)
+ #include <android/log.h>
+ #define cc_printf(x...) __android_log_print(ANDROID_LOG_DEBUG, "corecrypto", x);
#else
-#include <stdio.h>
-#define cc_printf(x...) fprintf(stderr, x)
+ #include <stdio.h>
+ #define cc_printf(x...) fprintf(stderr, x)
#endif
// ========================
// ========================
// Print utilities for corecrypto
// ========================
+
+#include <corecrypto/cc.h>
+
/* 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_ */