X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..e2d2fc5c71f7d145cba7267989251af45e3bb5ba:/osfmk/kern/assert.h diff --git a/osfmk/kern/assert.h b/osfmk/kern/assert.h index 436f3ee06..c704dca5f 100644 --- a/osfmk/kern/assert.h +++ b/osfmk/kern/assert.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2007 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -71,23 +71,28 @@ __BEGIN_DECLS /* Assert error */ extern void Assert( - const char *file, - int line, - const char *expression); + const char *file, + int line, + const char *expression); + +#if CONFIG_NO_PANIC_STRINGS +#define Assert(file, line, ex) (Assert)("", line, "") +#endif + __END_DECLS #if MACH_ASSERT #define assert(ex) \ - ((ex) ? (void)0 : Assert(__FILE__, __LINE__, # ex)) + ((ex) ? (void)0 : Assert(__FILE__, __LINE__, # ex)) #define assert_static(x) assert(x) #define __assert_only #else /* MACH_ASSERT */ -#define assert(ex) ((void)0) -#define assert_static(ex) +#define assert(ex) ((void)0) +#define assert_static(ex) do {} while (0) #define __assert_only __unused