Retro68/gcc/newlib/libc/syscalls/sysfcntl.c

19 lines
317 B
C
Raw Normal View History

2017-04-11 21:13:36 +00:00
/* connector for fcntl */
/* only called from stdio/fdopen.c, so arg can be int. */
#include <reent.h>
#include <errno.h>
int
2018-12-28 15:30:48 +00:00
fcntl (int fd,
int flag,
2017-04-11 21:13:36 +00:00
int arg)
{
#ifdef HAVE_FCNTL
return _fcntl_r (_REENT, fd, flag, arg);
#else /* !HAVE_FCNTL */
errno = ENOSYS;
return -1;
#endif /* !HAVE_FCNTL */
}