solaris: another fix

pull/2125/head^2
Alexander Medvednikov 2019-09-27 00:30:41 +03:00
parent fcf8f7fc93
commit 74bbf592d1
2 changed files with 11 additions and 2 deletions

View File

@ -42,6 +42,8 @@ enum OS {
dragonfly
msvc
js
android
solaris
}
enum Pass {
@ -799,6 +801,9 @@ fn new_v(args[]string) &V {
$if dragonfly {
_os = .dragonfly
}
$if solaris {
_os = .solaris
}
}
else {
switch target_os {
@ -811,6 +816,7 @@ fn new_v(args[]string) &V {
case 'dragonfly': _os = .dragonfly
case 'msvc': _os = .msvc
case 'js': _os = .js
case 'solaris': _os = .solaris
}
}
//println('OS=$_os')

View File

@ -542,6 +542,9 @@ pub fn user_os() string {
$if android{
return 'android'
}
$if solaris {
return 'solaris'
}
return 'unknown'
}
@ -631,8 +634,8 @@ pub fn executable() string {
// lol
return os.args[0]
}
//$if solaris {
//}
$if solaris {
}
$if netbsd {
mut result := malloc(MAX_PATH)
count := int(C.readlink('/proc/curproc/exe', result, MAX_PATH ))