1 /* Reentrant versions of fcntl system call. This implementation just
2 calls the fcntl system call. */
9 /* Some targets provides their own versions of these functions. Those
10 targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */
13 #ifndef REENTRANT_SYSCALLS_PROVIDED
14 #define REENTRANT_SYSCALLS_PROVIDED
18 #ifndef REENTRANT_SYSCALLS_PROVIDED
20 /* We use the errno variable used by the system dependent layer. */
26 <<_fcntl_r>>---Reentrant version of fcntl
33 int _fcntl_r(struct _reent *<[ptr]>,
34 int <[fd]>, int <[cmd]>, <[arg]>);
37 This is a reentrant version of <<fcntl>>. It
38 takes a pointer to the global data block, which holds
43 _fcntl_r (struct _reent
*ptr
,
51 if ((ret
= _fcntl (fd
, cmd
, arg
)) == -1 && errno
!= 0)
52 _REENT_ERRNO(ptr
) = errno
;
56 #endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */