@@ -523,40 +523,34 @@ integer function get_runtime_os() result(os)
523
523
if (index (val, ' linux' ) > 0 ) then
524
524
os = OS_LINUX
525
525
return
526
- end if
527
526
528
527
! macOS
529
- if (index (val, ' darwin' ) > 0 ) then
528
+ elseif (index (val, ' darwin' ) > 0 ) then
530
529
os = OS_MACOS
531
530
return
532
- end if
533
531
534
532
! Windows, MSYS, MinGW, Git Bash
535
- if (index (val, ' win' ) > 0 .or. index (val, ' msys' ) > 0 ) then
533
+ elseif (index (val, ' win' ) > 0 .or. index (val, ' msys' ) > 0 ) then
536
534
os = OS_WINDOWS
537
535
return
538
- end if
539
536
540
537
! Cygwin
541
- if (index (val, ' cygwin' ) > 0 ) then
538
+ elseif (index (val, ' cygwin' ) > 0 ) then
542
539
os = OS_CYGWIN
543
540
return
544
- end if
545
541
546
542
! Solaris, OpenIndiana, ...
547
- if (index (val, ' SunOS' ) > 0 .or. index (val, ' solaris' ) > 0 ) then
543
+ elseif (index (val, ' SunOS' ) > 0 .or. index (val, ' solaris' ) > 0 ) then
548
544
os = OS_SOLARIS
549
545
return
550
- end if
551
546
552
547
! FreeBSD
553
- if (index (val, ' FreeBSD' ) > 0 .or. index (val, ' freebsd' ) > 0 ) then
548
+ elseif (index (val, ' FreeBSD' ) > 0 .or. index (val, ' freebsd' ) > 0 ) then
554
549
os = OS_FREEBSD
555
550
return
556
- end if
557
551
558
552
! OpenBSD
559
- if (index (val, ' OpenBSD' ) > 0 .or. index (val, ' openbsd' ) > 0 ) then
553
+ elseif (index (val, ' OpenBSD' ) > 0 .or. index (val, ' openbsd' ) > 0 ) then
560
554
os = OS_OPENBSD
561
555
return
562
556
end if
@@ -593,6 +587,7 @@ integer function get_runtime_os() result(os)
593
587
os = OS_FREEBSD
594
588
return
595
589
end if
590
+
596
591
end function get_runtime_os
597
592
598
593
! > Retrieves the cached OS type for minimal runtime overhead.
0 commit comments