libc: Add stubs for fflush() and ungetc()
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6bfc7483bc
commit
f22689fcf5
@ -101,6 +101,9 @@ extern "C"
|
||||
/* Read a character from standard input. */
|
||||
int getchar(void);
|
||||
|
||||
/* Push a character back to stream so that it can be read again. */
|
||||
int ungetc(int c, FILE* stream);
|
||||
|
||||
/* Read a line from stream. */
|
||||
char* fgets(char* buf, size_t size, FILE* stream);
|
||||
|
||||
|
@ -46,6 +46,12 @@ static int fdopen_check_compatible_mode(int fd, int new_flags)
|
||||
|
||||
extern "C"
|
||||
{
|
||||
int fflush(FILE*)
|
||||
{
|
||||
// FIXME: Files are not buffered right now.
|
||||
return 0;
|
||||
}
|
||||
|
||||
FILE* fopen(const char* path, const char* mode)
|
||||
{
|
||||
int flags;
|
||||
@ -479,4 +485,9 @@ extern "C"
|
||||
if (!f) close(fd);
|
||||
return f;
|
||||
}
|
||||
|
||||
int ungetc(int, FILE*)
|
||||
{
|
||||
fail("FIXME: ungetc: not implemented");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user