core/shared: Add guard to avoid redefine macro (#386)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com> Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
@ -47,11 +47,21 @@ void BH_FREE(void *ptr);
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
|
||||
#ifndef true
|
||||
#define true 1
|
||||
#endif
|
||||
|
||||
#ifndef false
|
||||
#define false 0
|
||||
#endif
|
||||
|
||||
#ifndef inline
|
||||
#define inline __inline
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Return the offset of the given field in the given type */
|
||||
#ifndef offsetof
|
||||
#define offsetof(Type, field) ((size_t)(&((Type *)0)->field))
|
||||
|
||||
Reference in New Issue
Block a user