Skip to content

Commit 16b0bf8

Browse files
committed
Bind standard file pointers.
1 parent 90a05e4 commit 16b0bf8

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/unix_stdio.F90

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ module unix_stdio
99

1010
integer(kind=c_int), parameter, public :: EOF = -1
1111

12+
#if defined (__linux__)
13+
14+
type(c_ptr), bind(c, name='stderr'), public :: c_stderr
15+
type(c_ptr), bind(c, name='stdin'), public :: c_stdin
16+
type(c_ptr), bind(c, name='stdout'), public :: c_stdout
17+
18+
#elif defined (__FreeBSD__)
19+
20+
type(c_ptr), bind(c, name='__stderrp'), public :: c_stderr
21+
type(c_ptr), bind(c, name='__stdinp'), public :: c_stdin
22+
type(c_ptr), bind(c, name='__stdoutp'), public :: c_stdout
23+
24+
#endif
25+
1226
public :: c_getchar
1327
public :: c_fclose
1428
public :: c_fdopen

0 commit comments

Comments
 (0)