]>
git.saurik.com Git - apple/xnu.git/blob - EXTERNAL_HEADERS/corecrypto/cc_debug.h
5 * Created on 01/25/2012
7 * Copyright (c) 2012,2014,2015 Apple Inc. All rights reserved.
11 //debug configuration header file
12 #ifndef _CORECRYPTO_CCN_DEBUG_H_
13 #define _CORECRYPTO_CCN_DEBUG_H_
15 #include <corecrypto/cc_config.h>
17 // DO NOT INCLUDE this HEADER file in CoreCrypto files added for XNU project or headers
18 // included by external clients.
20 // ========================
21 // Printf for corecrypto
22 // ========================
24 #include <pexpert/pexpert.h>
25 #define cc_printf(x...) kprintf(x)
26 extern int printf(const char *format
, ...) __printflike(1,2);
29 #define cc_printf(x...) printf(x)
32 #define cc_printf(x...) fprintf(stderr, x)
35 // ========================
37 // ========================
40 /* Those are not defined in libkern */
49 #if CCN_UNIT_SIZE == 8
50 #define CCPRIx_UNIT ".016" PRIx64
51 #elif CCN_UNIT_SIZE == 4
52 #define CCPRIx_UNIT ".08" PRIx32
53 #elif CCN_UNIT_SIZE == 2
54 #define CCPRIx_UNIT ".04" PRIx16
55 #elif CCN_UNIT_SIZE == 1
56 #define CCPRIx_UNIT ".02" PRIx8
58 #error invalid CCN_UNIT_SIZE
61 // ========================
62 // Print utilities for corecrypto
63 // ========================
65 #include <corecrypto/cc.h>
67 /* Print a byte array of arbitrary size */
68 void cc_print(const char *label
, size_t count
, const uint8_t *s
);
70 #endif /* _CORECRYPTO_CCN_DEBUG_H_ */