wdc-utils/samples/stdio_test.c
2017-01-16 11:26:35 -05:00

40 lines
564 B
C

#include <stdio.h>
#include <fcntl.h>
void main(void) {
FILE *fp = fopen("file.txt", "wb");
fclose(fp);
}
// these stubs are not provided in the library but could call gs/os.
int open(const char *name, int mode) {
return -1;
}
int close(int fd) {
return -1;
}
size_t read(int fd, void *buffer, size_t count) {
return -1;
}
size_t write(int fd, void *buffer, size_t count) {
return -1;
}
long lseek(int fd, long offset, int whence) {
return -1;
}
int creat(const char *name, int mode) {
return -1;
}
int unlink(const char *name) {
return -1;
}