[Python-bugs-list] [Bug #130117] Python-2.1a1 sgi build _curses Module fix

noreply@sourceforge.net noreply@sourceforge.net
Sun, 28 Jan 2001 10:11:33 -0800


Bug #130117, was updated on 2001-Jan-25 20:51
Here is a current snapshot of the bug.

Project: Python
Category: Build
Status: Closed
Resolution: Fixed
Bug Group: Platform-specific
Priority: 5
Submitted by: pj99
Assigned to : akuchling
Summary: Python-2.1a1 sgi build _curses Module fix

Details: The build of the _curses module on sgi (IRIX) fails,
for want of an extern function declaration of tparm().

Without the following fix, the "setup.py build" fails
on the _curses module with many complaints resembling:

cc-1515 cc: ERROR File =
/usr/people/pj/etc/python/Python-2.1a1/Python-2.1a1/Modules/_cursesmodule.c,
Line = 2239
  A value of type "int" cannot be assigned to an entity of type "char *".

                result = tparm(fmt);
                       ^

With this fix, the compilation of _cursesmodule.c is clean.

The patch is:

*** _cursesmodule.c.orig        Thu Jan 25 19:37:29 2001
--- _cursesmodule.c     Thu Jan 25 20:39:10 2001
***************
*** 115,120 ****
--- 115,121 ----
  extern int setupterm(char *,int,int *);
  #ifdef sgi
  extern char *tigetstr(char *);
+ extern char *tparm(char *instring, ...);
  #endif
  
  #if defined(sgi) || defined(__sun__)



Follow-Ups:

Date: 2001-Jan-28 10:11
By: akuchling

Comment:
Checked into revision 2.48 of _cursesmodule.c; thanks!

The safe way to submit patches is through the patch manager on SourceForge,
though for a one-liner like this it doesn't much matter.
-------------------------------------------------------

Date: 2001-Jan-25 20:59
By: pj99

Comment:
No - still wrong (still loosing leading spaces
on each line).  I give up.  If someone knows
how to submit patches without munging the
spacing. I'd be interested to learn.  Sorry.
-------------------------------------------------------

Date: 2001-Jan-25 20:57
By: pj99

Comment:
Hmmm ... my original submission had some
leading spaces removed.  Lets try that patch
one more time, to see if I can get it right.

*** _cursesmodule.c.orig        Thu Jan 25 19:37:29 2001
--- _cursesmodule.c     Thu Jan 25 20:39:10 2001
***************
*** 115,120 ****
--- 115,121 ----
  extern int setupterm(char *,int,int *);
  #ifdef sgi
  extern char *tigetstr(char *);
+ extern char *tparm(char *instring, ...);
  #endif
  
  #if defined(sgi) || defined(__sun__)


===

Ok - the code lines above (in this little Netscape
web editing window) each start in column two.
Let's "Submit" and see if the end result shows
that.

-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=130117&group_id=5470