[Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.27,2.28

A.M. Kuchling python-dev@python.org
Tue, 27 Jun 2000 14:49:50 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv17205

Modified Files:
	_cursesmodule.c 
Log Message:
Fixes for compiling on Tru64.  
Define a STRICT_SYSV_CURSES macro on SGI, Sun, and Tru64, to mark systems
that don't support some features.


Index: _cursesmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v
retrieving revision 2.27
retrieving revision 2.28
diff -C2 -r2.27 -r2.28
*** _cursesmodule.c	2000/06/27 15:01:10	2.27
--- _cursesmodule.c	2000/06/27 21:49:47	2.28
***************
*** 42,45 ****
--- 42,50 ----
  #include "Python.h"
  
+ #ifdef __osf__
+ #define _XOPEN_SOURCE_EXTENDED  /* Define macro for OSF/1 */
+ #define STRICT_SYSV_CURSES 
+ #endif
+ 
  #ifdef HAVE_NCURSES_H
  #include <ncurses.h>
***************
*** 49,54 ****
  
  #if defined(__sgi__) || defined(__sun__)
!  /* No attr_t type is available */
! typedef chtype attr_t;
  #endif
  
--- 54,59 ----
  
  #if defined(__sgi__) || defined(__sun__)
! #define STRICT_SYSV_CURSES 
! typedef chtype attr_t;           /* No attr_t type is available */
  #endif
  
***************
*** 250,254 ****
  Window_TwoArgNoReturnFunction(mvderwin, int, "(ii);y,x")
  Window_TwoArgNoReturnFunction(wmove, int, "(ii);y,x")
! #if !defined(__sgi__) && !defined(__sun__)
  Window_TwoArgNoReturnFunction(wresize, int, "(ii);lines,columns")
  #endif
--- 255,259 ----
  Window_TwoArgNoReturnFunction(mvderwin, int, "(ii);y,x")
  Window_TwoArgNoReturnFunction(wmove, int, "(ii);y,x")
! #ifndef STRICT_SYSV_CURSES
  Window_TwoArgNoReturnFunction(wresize, int, "(ii);lines,columns")
  #endif
***************
*** 729,733 ****
      if (!PyArg_Parse(arg,"(iii);y,x,n", &y, &x, &n))
        return NULL;
! #if defined(__sgi__) || defined(__sun__)
   /* Untested */
      Py_BEGIN_ALLOW_THREADS
--- 734,738 ----
      if (!PyArg_Parse(arg,"(iii);y,x,n", &y, &x, &n))
        return NULL;
! #ifdef STRICT_SYSV_CURSES
   /* Untested */
      Py_BEGIN_ALLOW_THREADS
***************
*** 1324,1328 ****
  	{"redrawwin",       (PyCFunction)PyCursesWindow_redrawwin},
  	{"refresh",         (PyCFunction)PyCursesWindow_Refresh},
! #if !defined(__sgi__) && !defined(__sun__)
  	{"resize",          (PyCFunction)PyCursesWindow_wresize},
  #endif
--- 1329,1333 ----
  	{"redrawwin",       (PyCFunction)PyCursesWindow_redrawwin},
  	{"refresh",         (PyCFunction)PyCursesWindow_Refresh},
! #ifndef STRICT_SYSV_CURSES
  	{"resize",          (PyCFunction)PyCursesWindow_wresize},
  #endif
***************
*** 1830,1835 ****
  	SetDictInt("ACS_SBSB",          (ACS_VLINE));
  	SetDictInt("ACS_SSSS",          (ACS_PLUS));
! #if !defined(__sgi__) && !defined(__sun__)
!   /* The following are never available on IRIX 5.3 */
  	SetDictInt("ACS_S3",            (ACS_S3));
  	SetDictInt("ACS_LEQUAL",        (ACS_LEQUAL));
--- 1835,1840 ----
  	SetDictInt("ACS_SBSB",          (ACS_VLINE));
  	SetDictInt("ACS_SSSS",          (ACS_PLUS));
! #ifndef STRICT_SYSV_CURSES
!   /* The following are never available with strict SYSV curses */
  	SetDictInt("ACS_S3",            (ACS_S3));
  	SetDictInt("ACS_LEQUAL",        (ACS_LEQUAL));
***************
*** 2348,2352 ****
  	SetDictInt("A_CHARTEXT",        A_CHARTEXT);
  	SetDictInt("A_COLOR",           A_COLOR);
! #if !defined(__sgi__) && !defined(__sun__)
  	SetDictInt("A_HORIZONTAL",      A_HORIZONTAL);
  	SetDictInt("A_LEFT",            A_LEFT);
--- 2353,2357 ----
  	SetDictInt("A_CHARTEXT",        A_CHARTEXT);
  	SetDictInt("A_COLOR",           A_COLOR);
! #ifndef STRICT_SYSV_CURSES
  	SetDictInt("A_HORIZONTAL",      A_HORIZONTAL);
  	SetDictInt("A_LEFT",            A_LEFT);