Fixing bugs in libc

This commit is contained in:
Ali Mashtizadeh 2015-01-23 12:39:35 -08:00
parent 6f2c8be0ca
commit 92e5ae902a
3 changed files with 10 additions and 1 deletions

View File

@ -34,6 +34,9 @@ int fputs(const char *str, FILE *fh);
int fgetc(FILE *fh);
char *fgets(char *str, int size, FILE *fh);
int puts(const char *str);
#define getc(_fh) fgetc(_fh)
int printf(const char *fmt, ...);
int fprintf(FILE *stream, const char *fmt, ...);

View File

@ -53,7 +53,7 @@ telldir(DIR *d)
int
closedir(DIR *d)
{
close(d->fd);
OSClose(d->fd);
free(d);
return 0;

View File

@ -131,6 +131,12 @@ fputs(const char *str, FILE *fh)
return EOF;
}
int
puts(const char *str)
{
return fputs(str, stdout);
}
int
fgetc(FILE *fh)
{