diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 45e7d8ccd..93c028e9a 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2004-01-06 Mark Mitchell + + * libc/sys/arm/syscalls.c (unistd.h): Include it. + (remap_handle): Use STDIN_FILENO instead of __sfileno(stdin). + Similarly for stdout and stderr. + 2004-01-06 Jeff Johnston * libc/libc.texinfo: Correct escape character for @ sign diff --git a/newlib/libc/sys/arm/syscalls.c b/newlib/libc/sys/arm/syscalls.c index 6b08c3ec3..42e69b7b0 100644 --- a/newlib/libc/sys/arm/syscalls.c +++ b/newlib/libc/sys/arm/syscalls.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "swi.h" /* Forward prototypes. */ @@ -125,11 +126,11 @@ remap_handle (int fh) CHECK_INIT(stderr); std_files_checked = 1; } - if (fh == __sfileno (stdin)) + if (fh == STDIN_FILENO) return monitor_stdin; - if (fh == __sfileno (stdout)) + if (fh == STDOUT_FILENO) return monitor_stdout; - if (fh == __sfileno (stderr)) + if (fh == STDERR_FILENO) return monitor_stderr; return fh - FILE_HANDLE_OFFSET;