File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1
1
# fortran-unix
2
2
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 )
4
6
5
7
A work-in-progress collection of Fortran 2008 ISO C binding interfaces to
6
8
selected 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)
95
95
integer (kind= c_uint16_t), intent (in ) :: u ! ! Unsigned integer.
96
96
integer (kind= c_int32_t) :: s ! ! Signed integer.
97
97
98
- if (u > 0 ) then
98
+ if (u >= 0 ) then
99
99
s = int (u, kind= c_int32_t)
100
100
else
101
101
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)
107
107
integer (kind= c_uint32_t), intent (in ) :: u ! ! Unsigned integer.
108
108
integer (kind= c_int64_t) :: s ! ! Signed integer.
109
109
110
- if (u > 0 ) then
110
+ if (u >= 0 ) then
111
111
s = int (u, kind= c_int64_t)
112
112
else
113
113
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
7
7
implicit none
8
8
private
9
9
10
- #if defined (__flang__)
10
+ #if defined (__flang__) || (defined (__GFORTRAN__) && __GNUC__ >= 15 && __GNUC_MINOR__ >= 1)
11
11
12
12
public :: c_uint16_t
13
13
public :: c_uint32_t
You can’t perform that action at this time.
0 commit comments