1 /* Reentrant versions of open system call. */
8 /* Some targets provides their own versions of this functions. Those
9 targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */
12 #ifndef REENTRANT_SYSCALLS_PROVIDED
13 #define REENTRANT_SYSCALLS_PROVIDED
17 #ifndef REENTRANT_SYSCALLS_PROVIDED
19 /* We use the errno variable used by the system dependent layer. */
25 <<_open_r>>---Reentrant version of open
32 int _open_r(struct _reent *<[ptr]>,
33 const char *<[file]>, int <[flags]>, int <[mode]>);
36 This is a reentrant version of <<open>>. It
37 takes a pointer to the global data block, which holds
42 _open_r (struct _reent
*ptr
,
50 if ((ret
= _open (file
, flags
, mode
)) == -1 && errno
!= 0)
51 _REENT_ERRNO(ptr
) = errno
;
56 #endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */