From 50558bf3bdb5e2fc2454f38316af1f06f82f9a5d Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 19 Sep 2002 21:28:52 +0000 Subject: 2002-09-19 Jeff Johnston * libc/posix/opendir.c (opendir): Change code to check for HAVE_FCNTL before calling fcntl. * libc/search/hash.c (hash_open): Ditto. * libc/search/hash_page.c (open_tmp): Ditto. * libc/reent/Makefile.am: Add fcntlr.c. * libc/reent/Makefile.in: Regenerated. * libc/reent/fcntlr.c: New file. * libc/stdio/fdopen.c (_fdopen_r): Change to call _fcntl_r instead of _fcntl when HAVE_FCNTL flag is set. * libc/syscalls/sysfcntl.c (fcntl): Check for HAVE_FCNTL flag to see if _fcntl or _fcntl_r should be called. If flag is not set, default to ENOSYS stub. --- newlib/libc/stdio/fdopen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'newlib/libc/stdio/fdopen.c') diff --git a/newlib/libc/stdio/fdopen.c b/newlib/libc/stdio/fdopen.c index bd4018b69..0db6062dd 100644 --- a/newlib/libc/stdio/fdopen.c +++ b/newlib/libc/stdio/fdopen.c @@ -64,7 +64,7 @@ _DEFUN (_fdopen_r, (ptr, fd, mode), /* make sure the mode the user wants is a subset of the actual mode */ #ifdef HAVE_FCNTL - if ((fdflags = _fcntl (fd, F_GETFL, 0)) < 0) + if ((fdflags = _fcntl_r (ptr, fd, F_GETFL, 0)) < 0) return 0; fdmode = fdflags & O_ACCMODE; if (fdmode != O_RDWR && (fdmode != (oflags & O_ACCMODE))) -- cgit v1.2.3