This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: 2.1b2 CVS termios no longer compiles
Type: Stage:
Components: Build Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: gvanrossum, mfavas, mwh
Priority: normal Keywords:

Created on 2001-04-05 11:06 by mfavas, last changed 2022-04-10 16:03 by admin. This issue is now closed.

Messages (3)
msg4177 - (view) Author: Mark Favas (mfavas) Date: 2001-04-05 11:06
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.
msg4178 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2001-04-08 14:45
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.
msg4179 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001-04-10 17:49
Logged In: YES 
user_id=6380

This now compiles fine on Tru64 with the latest CVS version,
so I'm closing this bug report.
History
Date User Action Args
2022-04-10 16:03:55adminsetgithub: 34281
2001-04-05 11:06:18mfavascreate