2004-01-06 Mark Mitchell <mark@codesourcery.com>

* libc/sys/arm/syscalls.c (unistd.h): Include it.
        (remap_handle): Use STDIN_FILENO instead of __sfileno(stdin).
        Similarly for stdout and stderr.
This commit is contained in:
Jeff Johnston 2004-01-06 19:27:21 +00:00
parent 5125f91910
commit 9488c41488
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2004-01-06 Mark Mitchell <mark@codesourcery.com>
* 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 <jjohnstn@redhat.com>
* libc/libc.texinfo: Correct escape character for @ sign

View File

@ -12,6 +12,7 @@
#include <sys/times.h>
#include <errno.h>
#include <reent.h>
#include <unistd.h>
#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;