diff options
author | Brian Callahan <bcallah@openbsd.org> | 2021-04-29 15:51:27 -0400 |
---|---|---|
committer | Brian Callahan <bcallah@openbsd.org> | 2021-04-29 15:54:11 -0400 |
commit | bd347aab82173186c10b681d7d99399c15d9db18 (patch) | |
tree | ca358226c17387b4259def1a4342efaf9fe91919 /src/fpm_environment.f90 | |
parent | a9adf2b3ed09d0769f1095ddf7c2c06f71f10161 (diff) | |
download | fpm-bd347aab82173186c10b681d7d99399c15d9db18.tar.gz fpm-bd347aab82173186c10b681d7d99399c15d9db18.zip |
Identify OpenBSD
Diffstat (limited to 'src/fpm_environment.f90')
-rw-r--r-- | src/fpm_environment.f90 | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/fpm_environment.f90 b/src/fpm_environment.f90 index cde1780..345f6ab 100644 --- a/src/fpm_environment.f90 +++ b/src/fpm_environment.f90 @@ -18,12 +18,13 @@ module fpm_environment integer, parameter, public :: OS_CYGWIN = 4 integer, parameter, public :: OS_SOLARIS = 5 integer, parameter, public :: OS_FREEBSD = 6 + integer, parameter, public :: OS_OPENBSD = 7 contains !> Determine the OS type integer function get_os_type() result(r) !! !! Returns one of OS_UNKNOWN, OS_LINUX, OS_MACOS, OS_WINDOWS, OS_CYGWIN, - !! OS_SOLARIS, OS_FREEBSD. + !! OS_SOLARIS, OS_FREEBSD, OS_OPENBSD. !! !! At first, the environment variable `OS` is checked, which is usually !! found on Windows. Then, `OSTYPE` is read in and compared with common @@ -84,6 +85,12 @@ contains r = OS_FREEBSD return end if + + ! OpenBSD + if (index(val, 'OpenBSD') > 0 .or. index(val, 'openbsd') > 0) then + r = OS_OPENBSD + return + end if end if ! Linux |