cmake/Source/CursesDialog/cmCursesStandardIncludes.h

46 lines
1.1 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#ifndef cmCursesStandardIncludes_h
#define cmCursesStandardIncludes_h
2016-07-09 11:21:54 +02:00
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2018-08-09 18:06:22 +02:00
// Record whether __attribute__ is currently defined. See purpose below.
#ifndef __attribute__
# define cm_no__attribute__
#endif
#if defined(__hpux)
2018-08-09 18:06:22 +02:00
# define _BOOL_DEFINED
# include <sys/time.h>
#endif
2015-04-27 22:25:09 +02:00
#include <form.h>
// on some machines move erase and clear conflict with stl
// so remove them from the namespace
inline void curses_move(unsigned int x, unsigned int y)
{
2016-07-09 11:21:54 +02:00
move(x, y);
}
inline void curses_clear()
{
erase();
clearok(stdscr, TRUE);
}
#undef move
#undef erase
#undef clear
2018-08-09 18:06:22 +02:00
// The curses headers on some platforms (e.g. Solaris) may
// define __attribute__ as a macro. This breaks C++ headers
// in some cases, so undefine it now.
#if defined(cm_no__attribute__) && defined(__attribute__)
# undef __attribute__
#endif
#undef cm_no__attribute__
#endif // cmCursesStandardIncludes_h