aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib_pypy/_curses.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib_pypy/_curses.py b/lib_pypy/_curses.py
index c46d474c03..0275d6af49 100644
--- a/lib_pypy/_curses.py
+++ b/lib_pypy/_curses.py
@@ -286,6 +286,13 @@ void _m_getsyx(int *yx);
lib = ffi.verify("""
+#ifdef __APPLE__
+/* the following define is necessary for OS X 10.6+; without it, the
+ Apple-supplied ncurses.h sets NCURSES_OPAQUE to 1, and then Python
+ can't get at the WINDOW flags field. */
+#define NCURSES_OPAQUE 0
+#endif
+
#include <ncurses.h>
#include <panel.h>
#include <term.h>