]> git.saurik.com Git - apple/security.git/blobdiff - OSX/utilities/src/debugging.h
Security-58286.20.16.tar.gz
[apple/security.git] / OSX / utilities / src / debugging.h
index 6a716d537c01e3c23068f9c200356eca368cdd7a..8c1f411da8ea57e1f836bce8cfce2f514e360cdb 100644 (file)
@@ -76,31 +76,22 @@ __BEGIN_DECLS
 #define SECLOG_LEVEL_DEBUG  7
 
 #include <os/log_private.h>
-extern os_log_t logObjForScope(const char *scope); /* XXX don't use me, remove */
 extern os_log_t secLogObjForScope(const char *scope);
+extern os_log_t secLogObjForCFScope(CFStringRef scope);
 extern bool secLogEnabled(void);
 extern void secLogDisable(void);
 extern void secLogEnable(void);
 
 #if TARGET_OS_OSX
-#define NO_OS_LOG 1
-#ifdef NO_OS_LOG
-
-// There might be no os_log available. Weak link their internal functions.
+// Downstream projects link these, but we no longer use them internally. Keep them here for now.
+// <rdar://problem/31765903> Remove weak-linked os_log functions
 void weak_os_log_impl(void *dso, os_log_t log, os_log_type_t type, const char *format, uint8_t *buf, unsigned int size);
-#define _os_log_impl weak_os_log_impl
-
-#undef os_log_create
 os_log_t weak_os_log_create(const char *subsystem, const char *category);
-#define os_log_create weak_os_log_create
-
 bool weak_os_log_type_enabled(os_log_t oslog, os_log_type_t type);
-#define os_log_type_enabled weak_os_log_type_enabled
-
-#endif // NO_OS_LOG
 #endif // TARGET_OS_OSX
 
-CFStringRef SecLogAPICreate(bool apiIn, const char *api, CFStringRef format, ...);
+CFStringRef SecLogAPICreate(bool apiIn, const char *api, CFStringRef format, ...)
+    CF_FORMAT_FUNCTION(3, 4);
 
 extern const char *api_trace;
 
@@ -163,6 +154,7 @@ void __security_stackshotreport(CFStringRef reason, uint32_t code);
 #define __sec_exception_code_CKD_nil_pending_keys   __sec_exception_code(9)
 #define __sec_exception_code_SQLiteBusy             __sec_exception_code(10)
 #define __sec_exception_code_CorruptDb(rc)          __sec_exception_code(11|((rc)<<8))
+#define __sec_exception_code_Watchdog               __sec_exception_code(12)
 
 /* For testing only, turns off/on simulated crashes, when turning on, returns number of
    simulated crashes which were not reported since last turned off. */