source:
trunk/sys/dietlibc/fdopen.c
@
397
Last change on this file since 397 was 1, checked in by , 8 years ago | |
---|---|
File size: 401 bytes |
Line | |
---|---|
1 | #include <errno.h> |
2 | #include "dietfeatures.h" |
3 | #include "dietstdio.h" |
4 | #include <unistd.h> |
5 | |
6 | FILE *fdopen_unlocked(int filedes, const char *mode) { |
7 | int f=0; /* O_RDONLY, O_WRONLY or O_RDWR */ |
8 | |
9 | f=__stdio_parse_mode(mode); |
10 | if (filedes<0) { errno=EBADF; return 0; } |
11 | return __stdio_init_file(filedes,0,f); |
12 | } |
13 | |
14 | FILE *fdopen(int filedes, const char *mode) __attribute__((weak,alias("fdopen_unlocked"))); |
Note: See TracBrowser
for help on using the repository browser.