2016-07-13 17:15:44 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*/
|
|
|
|
|
2016-08-02 15:07:09 +00:00
|
|
|
#pragma once
|
2016-07-13 17:15:44 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2016-08-04 15:20:11 +00:00
|
|
|
#define CSS_EXTERN_C_BEGIN extern "C" {
|
|
|
|
#define CSS_EXTERN_C_END }
|
2016-07-13 17:15:44 +00:00
|
|
|
#else
|
2016-08-04 15:20:11 +00:00
|
|
|
#define CSS_EXTERN_C_BEGIN
|
|
|
|
#define CSS_EXTERN_C_END
|
2016-07-13 17:15:44 +00:00
|
|
|
#endif
|
2016-08-02 15:07:11 +00:00
|
|
|
|
|
|
|
#ifndef FB_ASSERTIONS_ENABLED
|
|
|
|
#define FB_ASSERTIONS_ENABLED 1
|
|
|
|
#endif
|
|
|
|
|
2016-08-03 08:57:46 +00:00
|
|
|
#if FB_ASSERTIONS_ENABLED
|
|
|
|
#define CSS_ABORT() abort()
|
|
|
|
#else
|
|
|
|
#define CSS_ABORT()
|
2016-08-02 15:07:11 +00:00
|
|
|
#endif
|
|
|
|
|
2016-08-04 15:20:11 +00:00
|
|
|
#define CSS_ASSERT(X, message) \
|
|
|
|
if (!(X)) { \
|
|
|
|
fprintf(stderr, "%s\n", message); \
|
|
|
|
CSS_ABORT(); \
|
|
|
|
}
|