summaryrefslogtreecommitdiff
path: root/src/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio')
-rw-r--r--src/stdio/L_ctermid.c5
-rw-r--r--src/stdio/L_cuserid.c5
-rw-r--r--src/stdio/_stdio.c2
-rw-r--r--src/stdio/fdopen.c10
-rw-r--r--src/stdio/fileno.c12
5 files changed, 32 insertions, 2 deletions
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 <stdio.h>
+#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 <stdio.h>
+#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 <stdio.h>
+
+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 <stdio.h>
+#include "nonstd/FILE.h"
+#include "nonstd/assert.h"
+
+int fileno(FILE * stream)
+{
+ ASSERT_NONNULL(stream);
+ return stream->fd;
+}
+/*
+POSIX(1)
+*/