mirror of
https://github.com/espressif/openthread.git
synced 2026-10-02 13:57:38 +00:00
[debug] allow build system to provide custom file name (#2706)
This commit is contained in:
+18
-10
@@ -58,16 +58,24 @@
|
|||||||
|
|
||||||
#include "openthread/platform/misc.h"
|
#include "openthread/platform/misc.h"
|
||||||
|
|
||||||
#define assert(cond) \
|
/**
|
||||||
do \
|
* Allow the build system to provide a custom file name.
|
||||||
{ \
|
*
|
||||||
if (!(cond)) \
|
*/
|
||||||
{ \
|
#ifndef FILE_NAME
|
||||||
otPlatAssertFail(__FILE__, __LINE__); \
|
#define FILE_NAME __FILE__
|
||||||
while (1) \
|
#endif
|
||||||
{ \
|
|
||||||
} \
|
#define assert(cond) \
|
||||||
} \
|
do \
|
||||||
|
{ \
|
||||||
|
if (!(cond)) \
|
||||||
|
{ \
|
||||||
|
otPlatAssertFail(FILE_NAME, __LINE__); \
|
||||||
|
while (1) \
|
||||||
|
{ \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user