File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 11# fortran-unix
22
3- [ ![ Build] ( https://github.com/interkosmos/fortran-unix/actions/workflows/build.yml/badge.svg )] ( https://github.com/interkosmos/fortran-unix/actions/workflows/build.yml )
3+ ![ Language] ( https://img.shields.io/badge/-Fortran-734f96?logo=fortran&logoColor=white )
4+ ![ License] ( https://img.shields.io/github/license/dabamos/dmpack?color=blue )
5+ ![ Build] ( https://github.com/interkosmos/fortran-unix/actions/workflows/build.yml/badge.svg )
46
57A work-in-progress collection of Fortran 2008 ISO C binding interfaces to
68selected POSIX and SysV types, functions, and routines on 64-bit Unix-like
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ pure elemental function c_uint16_to_int32(u) result(s)
9595 integer (kind= c_uint16_t), intent (in ) :: u ! ! Unsigned integer.
9696 integer (kind= c_int32_t) :: s ! ! Signed integer.
9797
98- if (u > 0 ) then
98+ if (u >= 0 ) then
9999 s = int (u, kind= c_int32_t)
100100 else
101101 s = 65536_c_int32_t + int (u, kind= c_int32_t)
@@ -107,7 +107,7 @@ pure elemental function c_uint32_to_int64(u) result(s)
107107 integer (kind= c_uint32_t), intent (in ) :: u ! ! Unsigned integer.
108108 integer (kind= c_int64_t) :: s ! ! Signed integer.
109109
110- if (u > 0 ) then
110+ if (u >= 0 ) then
111111 s = int (u, kind= c_int64_t)
112112 else
113113 s = 4294967296_c_int64_t + int (u, kind= c_int64_t)
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ module unix_types
77 implicit none
88 private
99
10- #if defined (__flang__)
10+ #if defined (__flang__) || (defined (__GFORTRAN__) && __GNUC__ >= 15 && __GNUC_MINOR__ >= 1)
1111
1212 public :: c_uint16_t
1313 public :: c_uint32_t
You can’t perform that action at this time.
0 commit comments