[Patches] [ python-Patches-787189 ] termios module on IRIX
SourceForge.net
noreply at sourceforge.net
Mon Nov 3 08:30:59 EST 2003
Patches item #787189, was opened at 2003-08-12 06:45
Message generated for change (Comment added) made by poinot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=787189&group_id=5470
Category: Modules
Group: None
Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Marc Poinot (poinot)
Assigned to: Nobody/Anonymous (nobody)
Summary: termios module on IRIX
Initial Comment:
The termios.c module includes sys/termios.h
in which a CTRL macro is present, but not defined
because of the pre-processing switches:
#if (_NO_POSIX && _NO_XOPEN4) || _ABIAPI
#define CTRL(c) ((c)&037)
Then, the sys/ioctl.h is included (at least by
termios.c module) and this uses CTRL() macro !
This looks like a problem on the IRIX side, they
should be consistent with their own headers.
The simplest way I found was to add into termios.c
the definition of CTRL:
#if defined(__sgi)
#define CTRL(c) ((c)&037)
#endif
Has to be put *before* the #include <termios.h>
in Modules/termios.c
----------------------------------------------------------------------
>Comment By: Marc Poinot (poinot)
Date: 2003-11-03 13:30
Message:
Logged In: YES
user_id=28416
I've had a look at /usr/include/standards.h on my SGI, the
definition of ABIAPI
is located here. I cannot really understand what it is used
for (_ABIAPI), but
I guess it's something to allow binary compatibility
(o32/n32/64) for old libs.
The final point is the _ABIAPI *SHOULD NOT* been defined,
because it
forces the *old* termio structure. Python v2.3 uses the new
termio structure,
containing c_ospeed and c_ispeed.
About termios, the termio(7) man page says:
Old termio and termios
For compatibility with existing binaries, MIPS ABI
programs, and programs
that cannot be ported to use the new termio or termios
structures, the
old interfaces are retained. Existing binaries
automatically use the old
interfaces. By defining _OLD_TERMIOS at compile time
(before including
<termios.h>, <termio.h>, or <sys/ttydev.h>), the old
interfaces are in
effect.
As a matter of fact, recompiling Python v2.3 with
_ABI_SOURCE (i.e. _ABIAPI)
fails with the same error on Python termio module
(un-patched).
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-10-31 13:01
Message:
Logged In: YES
user_id=21627
Committed as termios.c 2.37.8.1 and 2.38.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2003-10-18 22:09
Message:
Logged In: YES
user_id=21627
In what cases would _ABIAPI be defined?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=787189&group_id=5470
More information about the Patches
mailing list