Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2004-01-06 22:27:21 +0300
committerJeff Johnston <jjohnstn@redhat.com>2004-01-06 22:27:21 +0300
commit9488c414887b7bbcf0123943d156af24b230d84f (patch)
treec2a302a71b6db957a15291f629342e0a952b9f15 /newlib/libc/sys
parent5125f91910b8b057b3f9d2c310f1b37eaa852e15 (diff)
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.
Diffstat (limited to 'newlib/libc/sys')
-rw-r--r--newlib/libc/sys/arm/syscalls.c7
1 files changed, 4 insertions, 3 deletions
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 <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;