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. */
|
/* Read a character from standard input. */
|
||||||
int getchar(void);
|
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. */
|
/* Read a line from stream. */
|
||||||
char* fgets(char* buf, size_t size, FILE* 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"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
int fflush(FILE*)
|
||||||
|
{
|
||||||
|
// FIXME: Files are not buffered right now.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
FILE* fopen(const char* path, const char* mode)
|
FILE* fopen(const char* path, const char* mode)
|
||||||
{
|
{
|
||||||
int flags;
|
int flags;
|
||||||
@ -479,4 +485,9 @@ extern "C"
|
|||||||
if (!f) close(fd);
|
if (!f) close(fd);
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int ungetc(int, FILE*)
|
||||||
|
{
|
||||||
|
fail("FIXME: ungetc: not implemented");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user