libc: Stub out setvbuf, and add S_ISREG
This commit is contained in:
parent
fa35e883d7
commit
0c33fcdff2
@ -30,6 +30,10 @@ extern FILE* stdin;
|
|||||||
|
|
||||||
#define EOF -1
|
#define EOF -1
|
||||||
|
|
||||||
|
#define _IONBF 0
|
||||||
|
#define _IOLBF 1
|
||||||
|
#define _IOFBF 2
|
||||||
|
|
||||||
typedef off_t fpos_t;
|
typedef off_t fpos_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@ -106,7 +110,8 @@ extern "C"
|
|||||||
/* Clears the error and end-of-file flags from stream. */
|
/* Clears the error and end-of-file flags from stream. */
|
||||||
void clearerr(FILE* stream);
|
void clearerr(FILE* stream);
|
||||||
|
|
||||||
void setbuf(FILE*, char*); // Not implemented.
|
void setbuf(FILE*, char*); // Not implemented.
|
||||||
|
int setvbuf(FILE*, char*, int, size_t); // Not implemented.
|
||||||
|
|
||||||
/* Writes formatted output according to the string format to the file stream. */
|
/* Writes formatted output according to the string format to the file stream. */
|
||||||
int vfprintf(FILE* stream, const char* format, va_list ap);
|
int vfprintf(FILE* stream, const char* format, va_list ap);
|
||||||
|
@ -12,6 +12,7 @@ struct stat // FIXME: This struct is quite stubbed out.
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define S_ISDIR(mode) (((mode)&0xf) == __VFS_DIRECTORY)
|
#define S_ISDIR(mode) (((mode)&0xf) == __VFS_DIRECTORY)
|
||||||
|
#define S_ISREG(mode) (((mode)&0xf) == __VFS_FILE)
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C"
|
extern "C"
|
||||||
|
@ -244,4 +244,9 @@ extern "C"
|
|||||||
{
|
{
|
||||||
NOT_IMPLEMENTED("setbuf");
|
NOT_IMPLEMENTED("setbuf");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int setvbuf(FILE*, char*, int, size_t)
|
||||||
|
{
|
||||||
|
NOT_IMPLEMENTED("setvbuf");
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user