Dont redefine abort() as it may leak into other files
Summary: Anyone importing this header would have abort() redefined to nothing. That's not good. Fix mistake by defining a CSS_ABORT() macro instead. Differential Revision: D3661871 fbshipit-source-id: 14a9d076299b4f21d17a2bed68aa30b796c438a5
This commit is contained in:
committed by
Facebook Github Bot 7
parent
9689062f6c
commit
7af5e3d68d
@@ -21,12 +21,14 @@
|
||||
#define FB_ASSERTIONS_ENABLED 1
|
||||
#endif
|
||||
|
||||
#if !(FB_ASSERTIONS_ENABLED)
|
||||
#define abort()
|
||||
#if FB_ASSERTIONS_ENABLED
|
||||
#define CSS_ABORT() abort()
|
||||
#else
|
||||
#define CSS_ABORT()
|
||||
#endif
|
||||
|
||||
#define CSS_ASSERT(X, message) \
|
||||
if (!(X)) { \
|
||||
fprintf(stderr, "%s\n", message); \
|
||||
abort(); \
|
||||
CSS_ABORT(); \
|
||||
}
|
||||
|
Reference in New Issue
Block a user