libc: minimal: stdio.h: define SEEK_SET, SEEK_CUR, SEEK_END

The `SEEK_SET`, `SEEK_CUR`, and `SEEK_END` constants are defined
in `<stdio.h>`, not in `<sys/stat.h>`.

Signed-off-by: Chris Friedt <cfriedt@meta.com>
This commit is contained in:
Chris Friedt 2022-12-02 17:44:54 -05:00 committed by Stephanos Ioannidis
parent a89d68db20
commit addbec9591
2 changed files with 4 additions and 4 deletions

View File

@ -40,10 +40,6 @@ extern "C" {
#define O_WRONLY 01
#define O_RDWR 02
#define SEEK_SET 0 /* Seek from beginning of file. */
#define SEEK_CUR 1 /* Seek from current position. */
#define SEEK_END 2 /* Seek from end of file. */
struct stat {
unsigned long st_size;
unsigned long st_blksize;

View File

@ -30,6 +30,10 @@ typedef int FILE;
#define stdout ((FILE *) 2)
#define stderr ((FILE *) 3)
#define SEEK_SET 0 /* Seek from beginning of file. */
#define SEEK_CUR 1 /* Seek from current position. */
#define SEEK_END 2 /* Seek from end of file. */
int __printf_like(1, 2) printf(const char *ZRESTRICT format, ...);
int __printf_like(3, 4) snprintf(char *ZRESTRICT str, size_t len,
const char *ZRESTRICT format, ...);