solaris & termux: fix both, using the more portable termios.h

pull/4166/head
Delyan Angelov 2020-03-31 13:46:46 +03:00 committed by GitHub
parent 21e4f2422d
commit b62035e3d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 9 deletions

4
.gitignore vendored
View File

@ -76,3 +76,7 @@ cachegrind.out.*
.gdb_history
/thirdparty/pg
exe
vlib/v/tests/inout/hello.v
vlib/v/tests/inout/hello_devs.v
vlib/v/tests/inout/os.v

View File

@ -24,10 +24,10 @@ pub fn new_test_session(_vargs string) TestSession {
mut skip_files := []string
skip_files << '_non_existing_'
$if solaris {
skip_files << "examples/gg2.v"
skip_files << "examples/gg/gg2.v"
skip_files << "examples/pico/pico.v"
skip_files << "examples/sokol_examples/fonts.v"
skip_files << "examples/sokol_examples/drawing.v"
skip_files << "examples/sokol/fonts.v"
skip_files << "examples/sokol/drawing.v"
}
vargs := _vargs.replace('-silent', '')
vexe := pref.vexe_path()

View File

@ -4,6 +4,8 @@ import os
#include <sys/ioctl.h>
#include <termios.h> // TIOCGWINSZ
pub struct C.winsize {
pub:
ws_row u16

View File

@ -1,5 +0,0 @@
module term
#include <unistd.h> // ioctl
#include <sys/termios.h> // TIOCGWINSZ

View File

@ -28,7 +28,7 @@ fn main() {
//
fn testsuite_begin(){
if os.user_os() != 'linux' && os.getenv('FORCE_LIVE_TEST').len == 0 {
if !(os.user_os() in ['linux', 'solaris']) && os.getenv('FORCE_LIVE_TEST').len == 0 {
eprintln('Testing the runtime behaviour of -live mode,')
eprintln('is reliable only on Linux for now.')
eprintln('You can still do it by setting FORCE_LIVE_TEST=1 .')