Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Wang Nan | e67d52d | 2016-11-26 07:03:37 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Support C++ source use utilities defined in util.h |
| 4 | */ |
| 5 | |
| 6 | #ifndef PERF_UTIL_UTIL_CXX_H |
| 7 | #define PERF_UTIL_UTIL_CXX_H |
| 8 | |
| 9 | #ifdef __cplusplus |
| 10 | extern "C" { |
| 11 | #endif |
| 12 | |
| 13 | /* |
| 14 | * Now 'new' is the only C++ keyword found in util.h: |
| 15 | * in tools/include/linux/rbtree.h |
| 16 | * |
| 17 | * Other keywords, like class and delete, should be |
| 18 | * redefined if necessary. |
| 19 | */ |
| 20 | #define new _new |
| 21 | #include "util.h" |
| 22 | #undef new |
| 23 | |
| 24 | #ifdef __cplusplus |
| 25 | } |
| 26 | #endif |
| 27 | #endif |