This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ncurses/terminfo problems

> From: "Ehud Karni" <>
> 1. No support for the ioctl call with TCGETS/TCSETS to get/set
>    termios structure onto terminals in cygwin.
> Solution:
>    It seems that with cygwin ncurses TCGETA/TCSETA does exactly what I
>    used to do with TCGETS/TCSETS. In the Linux ioctl_list man page
>    TCGETS/TCSETS works on termios structure while TCGETA/TCSETA work on
>    termio structure. In the cygwin porting termio and termios are
>    exactly the same.
> Required action: Defining TCGETS and TCSETS to be the same as TCGETA and
>    TCSETS on the cygwin porting, Adding the above facts to the FAQ,
>    README and the ioctl man page (which is missing in cygwin).

The TCGETS/termios.h and related ioctls are part of an old
non-Standard interface to tty ports; they were an expansion
of the even older TCGETA/termio.h family. Your best bet for
maximum portability would be to change the code to use the
tc*() interfaces (tcgetattr()/tcsetattr() in this case) which
were Standardized by POSIX.1 in 1988.

If anyone wanted to bother, termios.h could be implemented
to map its definitions on to termio.h if they match in this
implementation (though the type names of the members of the
structures are usually different even if they're the same
size). If implemented, I don't think it should be mentioned
in FAQs, READMEs and so on since it's a transparent
implementation detail which could be changed at any time.
I'm not convinced it's worth doing since the Standard interface
to this functionality has been widely implemented for over a
decade, though if you fancied doing it I'm sure your patches
would be considered.

Want to unsubscribe from this list?
Send a message to

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]