/libio/ |
A D | tst-atime.c | 20 int fd; in do_test() local 34 fd = mkstemp (buf); in do_test() 35 if (fd == -1) in do_test() 45 int e = fstatvfs (fd, &sv); in do_test() 65 if (write (fd, "some string\n", 12) != 12) in do_test() 71 if (lseek (fd, 0, SEEK_SET) == (off_t) -1) in do_test() 77 fp = fdopen (fd, "r"); in do_test() 84 if (fstat (fd, &st1) == -1) in do_test() 99 if (fstat (fd, &st2) == -1) in do_test()
|
A D | tst-eof.c | 14 int fd; variable 20 fd = create_temp_file ("tst-eof.", NULL); in do_prepare() 21 if (fd == -1) in do_prepare() 35 if (write (fd, "some string\n", 12) != 12) in do_test() 41 if (lseek (fd, 0, SEEK_SET) == (off_t) -1) in do_test() 47 fp = fdopen (fd, "r"); in do_test()
|
A D | oldtmpfile.c | 35 int fd; in __old_tmpfile() local 40 fd = __gen_tempname (buf, 0, 0, __GT_FILE); in __old_tmpfile() 41 if (fd < 0) in __old_tmpfile() 48 if ((f = _IO_old_fdopen (fd, "w+b")) == NULL) in __old_tmpfile() 49 __close (fd); in __old_tmpfile()
|
A D | freopen64.c | 50 int fd = _IO_fileno (fp); in freopen64() local 52 = filename != NULL ? filename : __fd_to_filename (fd, &fdfilename); in freopen64() 68 if (fd != -1 && _IO_fileno (result) != fd) in freopen64() 77 if (__dup3 (_IO_fileno (result), fd, in freopen64() 86 _IO_fileno (result) = fd; in freopen64() 89 else if (fd != -1) in freopen64() 90 __close (fd); in freopen64()
|
A D | bug-fopena+.c | 6 static int fd; variable 22 fd = create_temp_file ("wrewind.", &fname); in prepare() 23 if (fd == -1) in prepare() 35 fp = fdopen (fd, "w"); in do_test() 71 fd = open (fname, O_RDWR); in do_test() 72 if (fd == -1) in do_test() 78 fp = fdopen (fd, "a+"); in do_test()
|
A D | freopen.c | 51 int fd = _IO_fileno (fp); in freopen() local 53 = filename != NULL ? filename : __fd_to_filename (fd, &fdfilename); in freopen() 85 if (fd != -1 && _IO_fileno (result) != fd) in freopen() 94 if (__dup3 (_IO_fileno (result), fd, in freopen() 103 _IO_fileno (result) = fd; in freopen() 106 else if (fd != -1) in freopen() 107 __close (fd); in freopen()
|
A D | tst-ftell-active-handler.c | 49 close (fd); \ 101 int fd; in do_ftruncate_test() local 219 int fd; in do_rewind_test() local 317 int fd; in do_ftell_test() local 407 int fd; in do_write_test() local 484 int fd; in do_append_test() local 545 if (fd == -1) in do_append_test() 558 fp = fdopen (fd, "a"); in do_append_test() 562 close (fd); in do_append_test() 624 if (fd == -1) in do_test() [all …]
|
A D | tst-popen1.c | 17 int fd = fileno (fp); in do_test() local 18 if (fcntl (fd, F_GETFD) == FD_CLOEXEC) in do_test() 35 int fd = fileno (fp); in do_test() local 36 if (fcntl (fd, F_GETFD) != FD_CLOEXEC) in do_test()
|
A D | tst-fwrite-error.c | 28 int fd = mkstemp (tmpl); in do_test() local 29 if (fd == -1) in do_test() 34 FILE *fp = fdopen (fd, "w"); in do_test() 43 close (fd); in do_test()
|
A D | tst-fopenloc2.c | 32 static int fd; variable 39 fd = create_temp_file ("tst-fopenloc2", &tmpname); in prepare() 40 if (fd == -1) in prepare() 53 if (ftruncate (fd, 0) != 0) in do_test() 59 if (TEMP_FAILURE_RETRY (write (fd, tests[i].data, tests[i].datalen)) in do_test() 66 if (lseek (fd, 0, SEEK_SET) != 0) in do_test() 113 close (fd); in do_test()
|
A D | bug-wfflush.c | 17 int fd = create_temp_file ("bug-ungetc.", &temp_file); in do_prepare() local 18 if (fd == -1) in do_prepare() 23 write (fd, "1!", 2); in do_prepare() 24 close (fd); in do_prepare()
|
A D | bug-rewind2.c | 5 static int fd; variable 19 fd = create_temp_file ("wrewind2.", NULL); in prepare() 20 if (fd == -1) in prepare() 33 fp = fdopen (fd, "w+"); in do_test()
|
A D | tst-widetext.c | 43 int fd; in do_test() local 120 fd = mkstemp (name); in do_test() 121 if (fd == -1) in do_test() 129 fp = fdopen (dup (fd), "w"); in do_test() 153 lseek (fd, SEEK_SET, 0); in do_test() 195 lseek (fd, SEEK_SET, 0); in do_test() 196 fp = fdopen (fd, "r"); in do_test() 235 if (fd == -1) in do_test() 281 lseek (fd, SEEK_SET, 0); in do_test() 330 lseek (fd, SEEK_SET, 0); in do_test() [all …]
|
A D | tst_wprintf2.c | 15 int fd; in main() local 22 fd = mkstemp (name); in main() 23 if (fd == -1) in main() 30 fp = fdopen (dup (fd), "w"); in main() 42 fp = fdopen (dup (fd), "a"); in main() 55 lseek (fd, SEEK_SET, 0); in main() 56 fp = fdopen (fd, "r"); in main()
|
A D | tst-bz24051.c | 40 int fd = create_temp_file ("tst-bz24051", NULL); in do_test_narrow() local 41 stdout = fdopen (fd, "w+"); in do_test_narrow() 60 int fd = create_temp_file ("tst-bz24051w", NULL); in do_test_wide() local 61 stdout = fdopen (fd, "w+"); in do_test_wide()
|
A D | bug-ungetc3.c | 17 int fd = create_temp_file ("bug-ungetc.", &temp_file); in do_prepare() local 18 if (fd == -1) in do_prepare() 23 write (fd, pattern, sizeof (pattern)); in do_prepare() 24 close (fd); in do_prepare()
|
A D | bug-wsetpos.c | 19 int fd = create_temp_file ("bug-wsetpos.", &temp_file); in do_prepare() local 20 if (fd == -1) in do_prepare() 25 write (fd, pattern, sizeof (pattern)); in do_prepare() 26 close (fd); in do_prepare()
|
A D | bug-rewind.c | 8 static int fd; variable 22 fd = create_temp_file ("wrewind.", NULL); in prepare() 23 if (fd == -1) in prepare() 39 fptr = fdopen (fd, "w+"); in do_test()
|
A D | bug-ungetc.c | 17 int fd = create_temp_file ("bug-ungetc.", &temp_file); in do_prepare() local 18 if (fd == -1) in do_prepare() 23 write (fd, pattern, sizeof (pattern)); in do_prepare() 24 close (fd); in do_prepare()
|
A D | tst-ungetwc1.c | 17 int fd; in do_test() local 27 fd = mkstemp (fname); in do_test() 28 if (fd == -1) in do_test() 35 if ((fp = fdopen (fd, "w")) == NULL) in do_test()
|
A D | bug-ungetwc1.c | 24 int fd; in do_test() local 33 fd = mkstemp (fname); in do_test() 34 if (fd == -1) in do_test() 44 if ((fp = fdopen (fd, "w")) == NULL) in do_test()
|
A D | tst-ungetwc2.c | 17 int fd; in do_test() local 29 fd = mkstemp (fname); in do_test() 30 if (fd == -1) in do_test() 35 if ((fp = fdopen (fd, "w")) == NULL) in do_test()
|
A D | tst-ftell-partial-wide.c | 73 int fd = create_temp_file ("tst-fseek-wide-partial.out", &filename); in do_test() local 75 if (fd == -1) in do_test() 81 fp = fdopen (fd, "w+"); in do_test() 85 close (fd); in do_test()
|
A D | tst-fgetws.c | 24 int fd; in main() local 34 fd = mkstemp (name1); in main() 35 if (fd == -1) in main() 40 if ((fp = fdopen (fd, "w")) == NULL) in main() 49 fd = mkstemp (name2); in main() 50 if (fd == -1) in main() 55 if ((fp = fdopen (fd, "w")) == NULL) in main()
|
A D | bug-ungetc4.c | 33 int fd = create_temp_file ("bug-ungetc.", &temp_file); in do_prepare() local 34 if (fd == -1) in do_prepare() 39 write (fd, pattern, sizeof (pattern) - 1); in do_prepare() 40 close (fd); in do_prepare()
|