From af0172162f7c653cad6a11ed1c1a5459bc154465 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 14 Jan 2006 00:58:03 +0000 Subject: hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed --- libc/stdio/_fopen.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'libc/stdio/_fopen.c') diff --git a/libc/stdio/_fopen.c b/libc/stdio/_fopen.c index b4f4d46c7..02051eff9 100644 --- a/libc/stdio/_fopen.c +++ b/libc/stdio/_fopen.c @@ -5,10 +5,12 @@ * Dedicated to Toni. See uClibc/DEDICATION.mjn3 for details. */ -#define isatty __isatty - #include "_stdio.h" +libc_hidden_proto(isatty) +libc_hidden_proto(open) +libc_hidden_proto(fcntl) + /* * Cases: * fopen64 : filename != NULL, stream == NULL, filedes == -2 @@ -121,7 +123,7 @@ FILE attribute_hidden *_stdio_fopen(intptr_t fname_or_mode, /* NOTE: fopencookie needs changing if the basic check changes! */ if (((i & (((int) fname_or_mode) + 1)) != i) /* Basic agreement? */ || (((open_mode & ~((__mode_t) fname_or_mode)) & O_APPEND) - && __fcntl(filedes, F_SETFL, O_APPEND)) /* Need O_APPEND. */ + && fcntl(filedes, F_SETFL, O_APPEND)) /* Need O_APPEND. */ ) { goto DO_EINVAL; } @@ -130,7 +132,7 @@ FILE attribute_hidden *_stdio_fopen(intptr_t fname_or_mode, & O_LARGEFILE) ); } else { __STDIO_WHEN_LFS( if (filedes < -1) open_mode |= O_LARGEFILE ); - if ((stream->__filedes = __open(((const char *) fname_or_mode), + if ((stream->__filedes = open(((const char *) fname_or_mode), open_mode, 0666)) < 0) { goto FREE_STREAM; } -- cgit v1.2.3