X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/80e2389990082500d76eb566d4946be3e786c3ef..d8f41ccd20de16f8ebe2ccc84d47bf1cb2b26bbb:/authd/debugging.h diff --git a/authd/debugging.h b/authd/debugging.h deleted file mode 100644 index 07a3e1c7..00000000 --- a/authd/debugging.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2012 Apple Inc. All rights reserved. */ - -#ifndef _SECURITY_AUTH_DEBUGGING_H_ -#define _SECURITY_AUTH_DEBUGGING_H_ - -#if defined(__cplusplus) -extern "C" { -#endif - -enum { - AUTH_LOG_NORMAL, - AUTH_LOG_VERBOSE, - AUTH_LOG_ERROR -}; - -#define LOG(...) security_auth_log(AUTH_LOG_NORMAL, ##__VA_ARGS__) -#define LOGV(...) security_auth_log(AUTH_LOG_VERBOSE, ##__VA_ARGS__) -#define LOGE(...) security_auth_log(AUTH_LOG_ERROR, ##__VA_ARGS__) -#if DEBUG -#define LOGD(...) security_auth_log(AUTH_LOG_VERBOSE, ##__VA_ARGS__) -#else -#define LOGD(...) -#endif - -void security_auth_log(int,const char *,...) __printflike(2, 3); - -#define CFReleaseSafe(CF) { CFTypeRef _cf = (CF); if (_cf) CFRelease(_cf); } -#define CFReleaseNull(CF) { CFTypeRef _cf = (CF); \ - if (_cf) { (CF) = NULL; CFRelease(_cf); } } -#define CFRetainSafe(CF) { CFTypeRef _cf = (CF); if (_cf) CFRetain(_cf); } - -#define xpc_release_safe(obj) if (obj) { xpc_release(obj); obj = NULL; } -#define free_safe(obj) if (obj) { free(obj); obj = NULL; } - -void _show_cf(CFTypeRef); - -#if defined(__cplusplus) -} -#endif - -#endif /* !_SECURITY_AUTH_DEBUGGING_H_ */