cmCursesStandardIncludes.h 987 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. // Record whether __attribute__ is currently defined. See purpose below.
  6. #ifndef __attribute__
  7. # define cm_no__attribute__
  8. #endif
  9. #if defined(__hpux)
  10. # define _BOOL_DEFINED
  11. # include <sys/time.h>
  12. #endif
  13. #include <form.h>
  14. // on some machines move erase and clear conflict with stl
  15. // so remove them from the namespace
  16. inline void curses_move(unsigned int x, unsigned int y)
  17. {
  18. move(x, y);
  19. }
  20. inline void curses_clear()
  21. {
  22. erase();
  23. clearok(stdscr, TRUE);
  24. }
  25. #undef move
  26. #undef erase
  27. #undef clear
  28. // The curses headers on some platforms (e.g. Solaris) may
  29. // define __attribute__ as a macro. This breaks C++ headers
  30. // in some cases, so undefine it now.
  31. #if defined(cm_no__attribute__) && defined(__attribute__)
  32. # undef __attribute__
  33. #endif
  34. #undef cm_no__attribute__