blob: 13bb98741bf2a740862e30949aa63833af935244 [file] [log] [blame]
--- pdcurses-4.1.0.orig/curses.h 2019-05-09 07:27:41.000000000 +0800
+++ pdcurses-4.1.0/curses.h 2019-06-13 21:48:34.230201400 +0800
@@ -56,6 +56,10 @@
# include <wchar.h>
#endif
+#if defined(__cplusplus) && __cplusplus >= 199711L
+# define PDC_PP98 1
+#endif
+
#if defined(__STDC_VERSION__) && __STDC_VERSION >= 199901L && \
!defined(__bool_true_false_are_defined)
# include <stdbool.h>
@@ -64,7 +68,9 @@
#ifdef __cplusplus
extern "C"
{
-# define bool _bool
+# ifndef PDC_PP98
+# define bool _bool
+# endif
#endif
/*----------------------------------------------------------------------
@@ -83,13 +89,15 @@
#else
-typedef unsigned char bool;
-
# define FALSE 0
# define TRUE 1
#endif
+#if !defined(PDC_PP98) && !defined(__bool_true_false_are_defined)
+typedef unsigned char bool;
+#endif
+
#undef ERR
#define ERR (-1)
@@ -1840,7 +1848,9 @@
#define PDC_KEY_MODIFIER_REPEAT 16
#ifdef __cplusplus
-# undef bool
+# ifndef PDC_PP98
+# undef bool
+# endif
}
#endif