blob: cf8f313cc5b5ba42ad5feb5e019c1459ded4e2bd [file]
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
int main(int argc, char *argv[]) {
int fd;
FILE *file;
fpos_t pos;
ftello64(stdin);
_ftelli64(stdin);
fgetpos64(stdin, &pos);
fseeko64(stdin, 0, SEEK_CUR);
_fseeki64(stdin, 0, SEEK_CUR);
pos = 0;
fsetpos64(stdin, &pos);
lseek64(STDIN_FILENO, 0, SEEK_CUR);
_lseeki64(STDIN_FILENO, 0, SEEK_CUR);
_telli64(STDIN_FILENO);
file = fopen64(argc >= 2 ? argv[1] : argv[0], "r");
if (file) {
freopen64(argc >= 2 ? argv[1] : argv[0], "r", file);
fclose(file);
}
file = tmpfile64();
assert(file != NULL);
fclose(file);
fd = open64(argc >= 2 ? argv[1] : argv[0], O_RDONLY);
if (fd >= 0) close(fd);
return 0;
}