From 253a32e2f9ff1cbb8edbe7c79834a678daebeb93 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sat, 9 Feb 2019 13:14:01 -0500 Subject: merge POSIX.1-1988/1990 --- src/stdio/L_ctermid.c | 5 +++++ src/stdio/L_cuserid.c | 5 +++++ src/stdio/_stdio.c | 2 -- src/stdio/fdopen.c | 10 ++++++++++ src/stdio/fileno.c | 12 ++++++++++++ 5 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 src/stdio/L_ctermid.c create mode 100644 src/stdio/L_cuserid.c delete mode 100644 src/stdio/_stdio.c create mode 100644 src/stdio/fdopen.c create mode 100644 src/stdio/fileno.c (limited to 'src/stdio') diff --git a/src/stdio/L_ctermid.c b/src/stdio/L_ctermid.c new file mode 100644 index 00000000..f280b586 --- /dev/null +++ b/src/stdio/L_ctermid.c @@ -0,0 +1,5 @@ +#include +#define L_ctermid (255) +/* +POSIX(1) +*/ diff --git a/src/stdio/L_cuserid.c b/src/stdio/L_cuserid.c new file mode 100644 index 00000000..1bcaec9a --- /dev/null +++ b/src/stdio/L_cuserid.c @@ -0,0 +1,5 @@ +#include +#define L_cuserid (255) +/* +POSIX(1) +*/ diff --git a/src/stdio/_stdio.c b/src/stdio/_stdio.c deleted file mode 100644 index 05851eeb..00000000 --- a/src/stdio/_stdio.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "stdio.h" -FILE *stdin, *stdout, *stderr; diff --git a/src/stdio/fdopen.c b/src/stdio/fdopen.c new file mode 100644 index 00000000..9f6f8d72 --- /dev/null +++ b/src/stdio/fdopen.c @@ -0,0 +1,10 @@ +#include + +FILE * fdopen(int fildes, const char * mode) +{ + (void)fildes; (void)mode; + return NULL; +} +/* +POSIX(1) +*/ diff --git a/src/stdio/fileno.c b/src/stdio/fileno.c new file mode 100644 index 00000000..a3af0ec2 --- /dev/null +++ b/src/stdio/fileno.c @@ -0,0 +1,12 @@ +#include +#include "nonstd/FILE.h" +#include "nonstd/assert.h" + +int fileno(FILE * stream) +{ + ASSERT_NONNULL(stream); + return stream->fd; +} +/* +POSIX(1) +*/ -- cgit v1.2.1