mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-01 19:02:18 +00:00
use the correct header for TIOCGWINSZ on Solaris (#19037)
This commit is contained in:
@@ -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.}
|
||||
|
||||
Reference in New Issue
Block a user