From f89f83deb690f9a8c99cbae4a20b324bfa507c83 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 20 Mar 2020 21:20:01 +0200 Subject: [PATCH] solaris: _solaris.v and #flag solaris (stage 1) --- vlib/compiler/cflags.v | 4 ++-- vlib/time/time_nix.v | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/vlib/compiler/cflags.v b/vlib/compiler/cflags.v index 550b16b66a..fb33e69412 100644 --- a/vlib/compiler/cflags.v +++ b/vlib/compiler/cflags.v @@ -25,7 +25,7 @@ fn (v &V) get_os_cflags() []CFlag { } for flag in v.table.cflags { - if flag.os == '' || (flag.os == 'linux' && v.pref.os == .linux) || (flag.os == 'darwin' && v.pref.os == .mac) || (flag.os == 'freebsd' && v.pref.os == .freebsd) || (flag.os == 'windows' && v.pref.os == .windows) || (flag.os == 'mingw' && v.pref.os == .windows && v.pref.ccompiler != 'msvc') { + if flag.os == '' || (flag.os == 'linux' && v.pref.os == .linux) || (flag.os == 'darwin' && v.pref.os == .mac) || (flag.os == 'freebsd' && v.pref.os == .freebsd) || (flag.os == 'windows' && v.pref.os == .windows) || (flag.os == 'mingw' && v.pref.os == .windows && v.pref.ccompiler != 'msvc') || (flag.os == 'solaris' && v.pref.os == .solaris) { flags << flag } if flag.os in ctimedefines { @@ -82,7 +82,7 @@ fn (table mut Table) parse_cflag(cflag string, mod string, ctimedefines []string return true } mut fos := '' - mut allowed_os_overrides := ['linux', 'darwin', 'freebsd', 'windows', 'mingw'] + mut allowed_os_overrides := ['linux', 'darwin', 'freebsd', 'windows', 'mingw', 'solaris'] allowed_os_overrides << ctimedefines for os_override in allowed_os_overrides { if !flag.starts_with( os_override ) { continue } diff --git a/vlib/time/time_nix.v b/vlib/time/time_nix.v index 8e409d39ea..a44651b464 100644 --- a/vlib/time/time_nix.v +++ b/vlib/time/time_nix.v @@ -10,7 +10,6 @@ struct C.tm { tm_hour int tm_min int tm_sec int - tm_gmtoff int // seconds } fn C.timegm(&tm) time_t