1 /* Reentrant versions of lseek system call. */
7 /* Some targets provides their own versions of this functions. Those
8 targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */
11 #ifndef REENTRANT_SYSCALLS_PROVIDED
12 #define REENTRANT_SYSCALLS_PROVIDED
16 #ifndef REENTRANT_SYSCALLS_PROVIDED
18 /* We use the errno variable used by the system dependent layer. */
24 <<_lseek_r>>---Reentrant version of lseek
31 off_t _lseek_r(struct _reent *<[ptr]>,
32 int <[fd]>, off_t <[pos]>, int <[whence]>);
35 This is a reentrant version of <<lseek>>. It
36 takes a pointer to the global data block, which holds
41 _lseek_r (struct _reent
*ptr
,
49 if ((ret
= _lseek (fd
, pos
, whence
)) == (_off_t
) -1 && errno
!= 0)
50 _REENT_ERRNO(ptr
) = errno
;
54 #endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */