1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

v: support better separation of general Android vs Termux specific code (part 1)

This commit is contained in:
Delyan Angelov
2022-07-01 12:48:31 +03:00
parent ff0f75803d
commit 30401e003f
7 changed files with 57 additions and 11 deletions

View File

@ -317,6 +317,9 @@ pub fn get_raw_lines_joined() string {
// user_os returns current user operating system name.
pub fn user_os() string {
$if linux {
if getenv('TERMUX_VERSION') != '' {
return 'termux'
}
return 'linux'
}
$if macos {
@ -340,6 +343,9 @@ pub fn user_os() string {
$if android {
return 'android'
}
// $if termux {
// return 'termux'
// }
$if solaris {
return 'solaris'
}