[Python-bugs-list] [ python-Bugs-413956 ] 2.1b2 CVS termios no longer compiles

noreply@sourceforge.net noreply@sourceforge.net
Sun, 08 Apr 2001 07:45:50 -0700


Bugs item #413956, was updated on 2001-04-05 04:06
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=413956&group_id=5470

Category: Build
Group: None
Status: Open
Priority: 5
Submitted By: Mark Favas (mfavas)
Assigned to: Nobody/Anonymous (nobody)
Summary: 2.1b2 CVS termios no longer compiles

Initial Comment:
CVS version of 2.1b2 termios module now fails to
compile on Tru64 Unix. The April 5 version of termios.c
has a bunch of new constants defined, protected by
#ifdef's. Unfortunately, some of these constants are
defined in sys/ioctl.h under Tru64 Unix, but not in a
compatible way with constants defined in termios.h.
More detail: compilation fails thusly:
building 'termios' extension
cc -O -Olimit 1500 -I. -I./Include -I/usr/local/include
-IInclude/ -c Modules/termios.c -o
build/temp.osf1-V4.0-alpha-2.1/termios.o
cc: Error: Modules/termios.c, line 662: In the
initializer for termios_constants[142].value, "struct
termio" is an incomplete type, and so has no size.
(sizeincomptyp)
        {"TCGETA", TCGETA},
-------------------^
cc: Error: Modules/termios.c, line 674: In the
initializer for termios_constants[145].value, "struct
termio" is an incomplete type, and so has no size.
(sizeincomptyp)
        {"TCSETA", TCSETA},
-------------------^
cc: Error: Modules/termios.c, line 677: In the
initializer for termios_constants[146].value, "struct
termio" is an incomplete type, and so has no size.
(sizeincomptyp)
        {"TCSETAF", TCSETAF},
--------------------^
cc: Error: Modules/termios.c, line 680: In the
initializer for termios_constants[147].value, "struct
termio" is an incomplete type, and so has no size.
(sizeincomptyp)
        {"TCSETAW", TCSETAW},
--------------------^
WARNING: building of extension "termios" failed:
command 'cc' failed with exit status 1

TCGETA, TCSETA, TCSETAF, and TCSETAW are defined in
/usr/include/sys/ioctl.h as, for example,
#define TCGETA          _IOW('t', 23, struct termio) /*
set termio struct */
which is not compatible with their use in termios.c,
where the expectation is that the constants will be
defined as small integers.

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

Comment By: Michael Hudson (mwh)
Date: 2001-04-08 07:45

Message:
Logged In: YES 
user_id=6656

I can make this compile on alpha by #include-ing <termio.h>

This also works on linux.  Don't know about the many
millions of other unixen (I only have a linux box, and an
account on an elderly department alpha).

Unless the build can be tested everywhere we try to build
termios, the #include should probably be left out - but
programs that used TERMIOS in 2.0 have a good chance of
breaking.

Maybe an

#ifdef linux /* or whatever */
#inlcude <sys/ioctl.h>
#endif

could be added?  This would keep /me/ happy, at least.

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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=413956&group_id=5470