#ifndef __KERBEROSDEBUG
#define __KERBEROSDEBUG
#include <sys/types.h>
#include <mach/mach.h>
#ifdef __cplusplus
extern "C" {
#endif
#define ddebuglevel __KerberosDebug_ddebuglevel
#define dprintf __KerberosDebug_dprintf
#define dprintmem __KerberosDebug_dprintmem
#define dprintbootstrap __KerberosDebug_dprintbootstrap
int ddebuglevel (void);
void dprintf (const char *format, ...);
void dprintmem (const void *data, size_t length);
void dprintbootstrap (task_t inTask);
#define SetSignalAction_(inAction)
#ifdef __PowerPlant__
#define GetSignalAction_() debugAction_Nothing
#else
#define GetSignalAction_() (0)
#endif
#ifdef __PowerPlant__
# undef SignalPStr_
# undef SignalCStr_
# undef SignalIf_
# undef SignalIfNot_
#endif
#define SignalPStr_(pstr) \
do { \
dprintf ("%.*s in %s() (%s:%d)", \
(pstr) [0], (pstr) + 1, \
__FUNCTION__, __FILE__, __LINE__); \
} while (0)
#define SignalCStr_(cstr) \
do { \
dprintf ("%s in %s() (%s:%d)", \
cstr, __FUNCTION__, __FILE__, __LINE__); \
} while (0)
#define SignalIf_(test) \
do { \
if (test) SignalCStr_("Assertion " #test " failed"); \
} while (0)
#define SignalIfNot_(test) SignalIf_(!(test))
#define Assert_(test) SignalIfNot_(test)
enum { errUncaughtException = 666 };
#define SafeTry_ try
#define SafeCatch_ catch (...)
#define SafeCatchOSErr_(error) catch (...) { SignalCStr_ ("Uncaught exception"); error = errUncaughtException; }
#define DebugThrow_(e) \
do { \
dprintf ("Exception thrown from %s() (%s:%d)", \
__FUNCTION__, __FILE__, __LINE__); \
throw (e); \
} while (0)
#ifdef __cplusplus
}
#endif
#endif