util-cxx.h 460 B

123456789101112131415161718192021222324252627
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Support C++ source use utilities defined in util.h
  4. */
  5. #ifndef PERF_UTIL_UTIL_CXX_H
  6. #define PERF_UTIL_UTIL_CXX_H
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /*
  11. * Now 'new' is the only C++ keyword found in util.h:
  12. * in tools/include/linux/rbtree.h
  13. *
  14. * Other keywords, like class and delete, should be
  15. * redefined if necessary.
  16. */
  17. #define new _new
  18. #include "util.h"
  19. #undef new
  20. #ifdef __cplusplus
  21. }
  22. #endif
  23. #endif