aboutsummaryrefslogtreecommitdiff
path: root/src/fpm_environment.f90
diff options
context:
space:
mode:
authorBrian Callahan <bcallah@openbsd.org>2021-04-29 15:51:27 -0400
committerBrian Callahan <bcallah@openbsd.org>2021-04-29 15:54:11 -0400
commitbd347aab82173186c10b681d7d99399c15d9db18 (patch)
treeca358226c17387b4259def1a4342efaf9fe91919 /src/fpm_environment.f90
parenta9adf2b3ed09d0769f1095ddf7c2c06f71f10161 (diff)
downloadfpm-bd347aab82173186c10b681d7d99399c15d9db18.tar.gz
fpm-bd347aab82173186c10b681d7d99399c15d9db18.zip
Identify OpenBSD
Diffstat (limited to 'src/fpm_environment.f90')
-rw-r--r--src/fpm_environment.f909
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