|
1 | 1 | //-------------------------------------------------------------------------------------------------------
|
2 |
| -// Copyright (C) Microsoft. All rights reserved. |
| 2 | +// ChakraCore/Pal |
| 3 | +// Contains portions (c) copyright Microsoft, portions copyright (c) the .NET Foundation and Contributors |
| 4 | +// and edits (c) copyright the ChakraCore Contributors. |
| 5 | +// See THIRD-PARTY-NOTICES.txt in the project root for .NET Foundation license |
3 | 6 | // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
|
4 | 7 | //-------------------------------------------------------------------------------------------------------
|
5 | 8 |
|
6 | 9 | // PAL free Assert definitions
|
7 | 10 | #ifdef DEBUG
|
8 | 11 |
|
9 |
| -#define _QUOTE_(s) #s |
10 |
| -#define _STRINGIZE_(s) _QUOTE_(s) |
| 12 | +#if !defined(CHAKRACORE_STRINGIZE) |
| 13 | +#define CHAKRACORE_STRINGIZE_IMPL(x) #x |
| 14 | +#define CHAKRACORE_STRINGIZE(x) CHAKRACORE_STRINGIZE_IMPL(x) |
| 15 | +#endif |
11 | 16 |
|
12 | 17 | #ifndef __ANDROID__
|
13 | 18 | #define _ERR_OUTPUT_(condition, comment) \
|
14 | 19 | fprintf(stderr, "ASSERTION (%s, line %d) %s %s\n", __FILE__, __LINE__, \
|
15 |
| - _STRINGIZE_(condition), comment); \ |
| 20 | + CHAKRACORE_STRINGIZE(condition), comment); \ |
16 | 21 | fflush(stderr);
|
17 | 22 | #else // ANDROID
|
18 | 23 | #include <android/log.h>
|
19 | 24 | #define _ERR_OUTPUT_(condition, comment) \
|
20 | 25 | __android_log_print(ANDROID_LOG_ERROR, "chakracore-log", \
|
21 | 26 | "ASSERTION (%s, line %d) %s %s\n", __FILE__, __LINE__, \
|
22 |
| - _STRINGIZE_(condition), comment); |
| 27 | + CHAKRACORE_STRINGIZE(condition), comment); |
23 | 28 | #endif
|
24 | 29 |
|
25 | 30 | #define _Assert_(condition, comment) \
|
|
0 commit comments