summaryrefslogtreecommitdiff
path: root/libc/stdio/stdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/stdio.c')
-rw-r--r--libc/stdio/stdio.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/libc/stdio/stdio.c b/libc/stdio/stdio.c
index 6b0dba0..b8e68a5 100644
--- a/libc/stdio/stdio.c
+++ b/libc/stdio/stdio.c
@@ -582,9 +582,39 @@ FILE * fp;
#endif
#ifdef L_fopen
+FILE *
+fopen(file, mode)
+char * file;
+char * mode;
+{
+ return __fopen(file, -1, (FILE*)0, mode);
+}
+#endif
+
+#ifdef L_freopen
+FILE *
+freopen(file, mode, fp)
+char * file;
+char * mode;
+FILE * fp;
+{
+ return __fopen(file, -1, fp, mode);
+}
+#endif
+
+#ifdef L_fdopen
+FILE *
+fdopen(file, mode)
+int file;
+char * mode;
+{
+ return __fopen((char*)0, file, (FILE*)0, mode);
+}
+#endif
+
+#ifdef L___fopen
/*
- * This Fopen is all three of fopen, fdopen and freopen. The macros in
- * stdio.h show the other names.
+ * This is the common code for all three of fopen, fdopen and freopen.
*/
FILE *
__fopen(fname, fd, fp, mode)