summaryrefslogtreecommitdiff
path: root/Libraries/LibC/stdio.h
diff options
context:
space:
mode:
authorJesse Buhagiar <jesse.buhagiar@student.rmit.edu.au>2020-01-12 18:07:26 +1100
committerAndreas Kling <kling@serenityos.org>2020-02-02 10:58:45 +0100
commitcdbdd397db2dbab2a01115ab847ae658237feb3b (patch)
treef96c5ec7d5fec186af1099f7d7ffc5aeecc17a8e /Libraries/LibC/stdio.h
parent117820f6100754b391cb108b6fb2428e03ce2d87 (diff)
downloadserenity-cdbdd397db2dbab2a01115ab847ae658237feb3b.zip
LibC: Move `FILE` definition to bits/FILE.h
There are some headers in libc that require us to have definitions, such as `FILE` available to us (such as in `pwd.h`). It is bad practice to include the entirety of `stdio.h`, so it makes more sense to put `FILE` into it's own header.
Diffstat (limited to 'Libraries/LibC/stdio.h')
-rw-r--r--Libraries/LibC/stdio.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/Libraries/LibC/stdio.h b/Libraries/LibC/stdio.h
index fabbbf5f44..9c3031f097 100644
--- a/Libraries/LibC/stdio.h
+++ b/Libraries/LibC/stdio.h
@@ -30,11 +30,11 @@
#include <limits.h>
#include <stdarg.h>
+#include <bits/FILE.h>
#include <sys/cdefs.h>
#include <sys/types.h>
#define FILENAME_MAX 1024
-#define BUFSIZ 1024
__BEGIN_DECLS
#ifndef EOF
@@ -51,22 +51,6 @@ __BEGIN_DECLS
#define L_tmpnam 256
-struct __STDIO_FILE {
- int fd;
- int eof;
- int error;
- int mode;
- pid_t popen_child;
- char* buffer;
- size_t buffer_size;
- size_t buffer_index;
- int have_ungotten;
- char ungotten;
- char default_buffer[BUFSIZ];
-};
-
-typedef struct __STDIO_FILE FILE;
-
extern FILE* stdin;
extern FILE* stdout;
extern FILE* stderr;