Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Error in termios.h? - Compilation of the Python module termios fails: (1 Item)
   
Error in termios.h? - Compilation of the Python module termios fails  
The compilation of the termios.c module of Python 2.4 fails with these error messages:

$ gcc -DNDEBUG -O2 -I/usr/include -I/usr/pkg/include/db4 -I/usr/pkg/include -shared -fno-strict-aliasing -I. -I/usr/src/
HEAD/pkgsrc/lang/python24/work/Python-2.4.4/./Include -I/usr/pkg/include -I/usr/src/HEAD/pkgsrc/lang/python24/work/
Python-2.4.4/Include -I/usr/src/HEAD/pkgsrc/lang/python24/work/Python-2.4.4 -c /usr/src/HEAD/pkgsrc/lang/python24/work/
Python-2.4.4/Modules/termios.c -o build/temp.qnx-6.3.0-x86pc-2.4/termios.o
/usr/src/HEAD/pkgsrc/lang/python24/work/Python-2.4.4/Modules/termios.c:709: error: invalid application of `sizeof' to an
 incomplete type
/usr/src/HEAD/pkgsrc/lang/python24/work/Python-2.4.4/Modules/termios.c:721: error: invalid application of `sizeof' to an
 incomplete type
/usr/src/HEAD/pkgsrc/lang/python24/work/Python-2.4.4/Modules/termios.c:724: error: invalid application of `sizeof' to an
 incomplete type
/usr/src/HEAD/pkgsrc/lang/python24/work/Python-2.4.4/Modules/termios.c:727: error: invalid application of `sizeof' to an
 incomplete type

The relevant line 702 is:
 
#ifdef TCGETA
	{"TCGETA", TCGETA},  // this line produce the error message
#endif


The TCGETA is defined in termios.h as:
...
#define TCGETA          _IOR('T', 1, struct termio)
#define TCSETA          _IOW('T', 2, struct termio)
#define TCSETAW         _IOW('T', 3, struct termio)
#define TCSETAF         _IOW('T', 4, struct termio)
#define TCSBRK          _IOW('T',  5, int)
#define TCXONC          _IOW('T',  6, int)
#define TCFLSH          _IOW('T',  7, int)
...

It seems to me that the struct termio is not defined. Adding any struct definition named termio to termios.c lets the 
module compile. But obviously that can not be the final solution. What would be the right solution?

The other three error messages are related to TCSETA, TCSETAW and            TCSETAF. 

TiA
Christian