sys/termios.h defines struct winsize after it is referenced in function signatures
Chet Ramey
chet.ramey@case.edu
Fri Jul 18 12:53:20 GMT 2025
On 7/18/25 12:02 AM, Zachary Santer wrote:
>> https://pubs.opengroup.org/onlinepubs/9799919799/functions/tcgetwinsize.html#tag_17_609
>>
>> says that if libc has tcgetwinsize(), you only need <termios.h> to get
>> its declaration.
>
> I've attached the /usr/include/sys/termios.h file included in my MSYS2
> installation. As you can see, struct winsize is defined after it is
> referenced in the function declarations of tcgetwinsize() and
> tcsetwinsize() in that file.
>
> I moved the definition of struct winsize to above the function
> declarations, and bash built without issue.
Thanks for tracking it down.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <https://cygwin.com/pipermail/cygwin/attachments/20250718/47176d12/attachment-0001.sig>
More information about the Cygwin
mailing list