use the correct header for TIOCGWINSZ on Solaris (#19037)
This commit is contained in:
parent
490c4226a5
commit
6621e1a3ea
1 changed files with 5 additions and 2 deletions
|
|
@ -237,8 +237,11 @@ proc tcFlow*(fd: cint; action: cint): cint {.importc: "tcflow",
|
|||
header: "<termios.h>".}
|
||||
# Get process group ID for session leader for controlling terminal FD.
|
||||
|
||||
# Window size ioctl. Should work on on any Unix that xterm has been ported to.
|
||||
var TIOCGWINSZ*{.importc, header: "<sys/ioctl.h>".}: culong
|
||||
# Window size ioctl. Solaris based systems have an uncommen place for this.
|
||||
when defined(solaris) or defined(sunos):
|
||||
var TIOCGWINSZ*{.importc, header: "<sys/termios.h>".}: culong
|
||||
else:
|
||||
var TIOCGWINSZ*{.importc, header: "<sys/ioctl.h>".}: culong
|
||||
|
||||
when defined(nimHasStyleChecks):
|
||||
{.push styleChecks: off.}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue