]> granicus.if.org Git - python/commitdiff
Fix for #641455: curses module doesn't build on MacOSX. It turns out the
authorJack Jansen <jack.jansen@cwi.nl>
Fri, 22 Nov 2002 16:12:57 +0000 (16:12 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Fri, 22 Nov 2002 16:12:57 +0000 (16:12 +0000)
system headers have two declarations for wchar_t, with different guard macros.

Not sure whether this is a bugfix candidate, that depends on what changed in the
curses module.

Include/py_curses.h

index 621dd41720003477b070353ed4274da1e8a22bf9..9a89c50e7eb76303428c19d24caf52d7cf8f9520 100644 (file)
@@ -3,6 +3,15 @@
 #define Py_CURSES_H
 
 #ifdef HAVE_NCURSES_H
+#ifdef __APPLE__
+/*
+** On Mac OS X 10.2 [n]curses.h and stdlib.h use different guards
+** against multiple definition of wchar_t.
+*/
+#ifdef _BSD_WCHAR_T_DEFINED_
+#define _WCHAR_T
+#endif
+#endif
 #include <ncurses.h>
 #else
 #include <curses.h>