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. */
10 #ifdef __LARGE64_FILES
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 <<_lseek64_r>>---Reentrant version of lseek
33 off64_t _lseek64_r(struct _reent *<[ptr]>,
34 int <[fd]>, off64_t <[pos]>, int <[whence]>);
37 This is a reentrant version of <<lseek64>>. It
38 takes a pointer to the global data block, which holds
39 <<errno>>. This function only exists on a system
40 with large file support.
44 _lseek64_r (struct _reent
*ptr
,
52 if ((ret
= _lseek64 (fd
, pos
, whence
)) == (_off64_t
) -1 && errno
!= 0)
53 _REENT_ERRNO(ptr
) = errno
;
57 #endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
59 #endif /* __LARGE64_FILES */