1 /* Reentrant versions of fstat system call. This implementation just
2 calls the fstat 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 #ifdef REENTRANT_SYSCALLS_PROVIDED
20 int _dummy_fstat_syscalls
= 1;
24 /* We use the errno variable used by the system dependent layer. */
30 <<_fstat_r>>---Reentrant version of fstat
37 int _fstat_r(struct _reent *<[ptr]>,
38 int <[fd]>, struct stat *<[pstat]>);
41 This is a reentrant version of <<fstat>>. It
42 takes a pointer to the global data block, which holds
47 _fstat_r (ptr
, fd
, pstat
)
55 if ((ret
= _fstat (fd
, pstat
)) == -1 && errno
!= 0)
56 _REENT_ERRNO(ptr
) = errno
;
60 #endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */