Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 23 of 23) sorted by relevance

/stdio-common/
A Dtst-fdopen.c25 int fd; in main() local
27 fd = mkstemp (name); in main()
28 if (fd == -1) in main()
33 close (fd); in main()
40 fd = open (name, O_RDONLY); in main()
41 assert (fd != -1); in main()
42 assert (lseek (fd, 5, SEEK_SET) == 5); in main()
46 fp = fdopen (fd, "r"); in main()
A Dtmpfile.c37 int fd; in tmpfile() local
45 fd = __gen_tempfd (flags); in tmpfile()
47 if (fd < 0) in tmpfile()
54 fd = __gen_tempname (buf, 0, flags, __GT_FILE); in tmpfile()
55 if (fd < 0) in tmpfile()
63 if ((f = __fdopen (fd, "w+b")) == NULL) in tmpfile()
64 __close (fd); in tmpfile()
A Dtst-perror.c29 int fd; in do_test() local
35 fd = mkstemp (fname); in do_test()
36 if (fd == -1) in do_test()
44 if (dup2 (fd, 2) == -1) in do_test()
85 lseek (fd, 0, SEEK_SET); in do_test()
86 n = read (fd, buf, sizeof (buf)); in do_test()
96 lseek (fd, 0, SEEK_SET); in do_test()
97 ftruncate (fd, 0); in do_test()
99 if (dup2 (fd, 2) == -1) in do_test()
139 lseek (fd, 0, SEEK_SET); in do_test()
[all …]
A Dperror.c51 int fd = -1; in perror() local
59 || (fd = __fileno (stderr)) == -1 in perror()
60 || (fd = __dup (fd)) == -1 in perror()
61 || (fp = fdopen (fd, "w+")) == NULL) in perror()
63 if (__glibc_unlikely (fd != -1)) in perror()
64 __close (fd); in perror()
A Dtst-bz11319.c33 int fd; in do_test() local
37 fd = xopen (tempfile, O_RDONLY, 0660); in do_test()
41 TEST_COMPARE (dprintf (fd, "%d", 0), EOF); in do_test()
43 xclose (fd); in do_test()
A Dtst-fileno.c23 check (const char *name, FILE *stream, int fd) in check() argument
27 sfd == fd ? '=' : '!', fd); in check()
28 return sfd != fd; in check()
A Derrnobug.c27 int fd[2]; in main() local
32 if (pipe (fd)) in main()
37 f = fdopen (fd[1], "w"); in main()
A Dtst-put-error.c31 int fd = mkstemp (tmpl); in do_test() local
32 if (fd == -1) in do_test()
34 FILE *fp = fdopen (fd, "w"); in do_test()
46 close (fd); in do_test()
A Dtst-fwrite.c10 static int fd; variable
24 fd = create_temp_file ("tst-fwrite.", NULL); in prepare()
25 if (fd == -1) in prepare()
36 FILE* f = fdopen (fd, "w+"); in do_test()
A Dtest-vfprintf.c44 int fd; in do_test() local
49 fd = mkstemp (buf); in do_test()
50 if (fd == -1) in do_test()
68 fd2 = dup (fd); in do_test()
110 if (fstat (fd, &st) != 0) in do_test()
128 close (fd); in do_test()
A Dtst-rndseek.c67 int fd; in do_test() local
72 fd = mkstemp (fname); in do_test()
73 if (fd == -1) in do_test()
89 if (TEMP_FAILURE_RETRY (write (fd, tempdata, sizeof (tempdata))) in do_test()
97 fp = fdopen (dup (fd), "r"); in do_test()
133 fp = fdopen (fd, "rw"); in do_test()
A Dtst-fmemopen.c50 int ch, fd; in do_test() local
96 if ((fd = open (test_file, O_RDONLY)) == -1) in do_test()
101 if (fstat (fd, &fs) == -1) in do_test()
103 printf ("stat (%i)\n", fd); in do_test()
108 MAP_SHARED, fd, 0)) == MAP_FAILED) in do_test()
111 (size_t) fs.st_size, fd); in do_test()
A Dbug7.c14 int fd = mkstemp (filename); in main() local
15 if (fd == -1) in main()
22 close (fd); in main()
A Dtst-fseek.c34 int fd; in do_test() local
52 fd = mkstemp (fname); in do_test()
53 if (fd == -1) in do_test()
56 fp = fdopen (fd, "w+"); in do_test()
124 else if (lseek (fd, 0, SEEK_CUR) != 0) in do_test()
151 else if (lseek (fd, 0, SEEK_CUR) != 0) in do_test()
178 else if (lseek (fd, 0, SEEK_CUR) != 0) in do_test()
205 else if (lseek (fd, 0, SEEK_CUR) != 0) in do_test()
232 else if (lseek (fd, 0, SEEK_CUR) != 0) in do_test()
311 if (fstat64 (fd, &st1) < 0) in do_test()
[all …]
A Dtst-popen2.c8 int fd = dup (fileno (stdout)); in do_test() local
9 if (fd <= 1) in do_test()
15 FILE *f1 = fdopen (fd, "w"); in do_test()
A Dscanf15.c74 int fd = mkstemp (fname); in main() local
75 if (fd == -1) in main()
78 FILE *fp = fdopen (fd, "w+"); in main()
A Dtst-ungetc.c25 int fd = mkstemp (name); in main() local
26 if (fd == -1) in main()
31 close (fd); in main()
A Dtst-unlockedio.c24 int fd; variable
40 if ((fp = fdopen (fd, "w+")) == NULL) in do_test()
162 fd = create_temp_file ("tst-unlockedio.", NULL); in do_prepare()
163 if (fd == -1) in do_prepare()
A Dscanf14.c91 int fd = mkstemp (fname); in main() local
92 if (fd == -1) in main()
95 FILE *fp = fdopen (fd, "w+"); in main()
A Dscanf14a.c97 int fd = mkstemp (fname); in main() local
98 if (fd == -1) in main()
101 FILE *fp = fdopen (fd, "w+"); in main()
A Dscanf17.c105 int fd = mkstemp (fname); in main() local
106 if (fd == -1) in main()
109 FILE *fp = fdopen (fd, "w+"); in main()
A Dscanf16.c122 int fd = mkstemp (fname); in main() local
123 if (fd == -1) in main()
126 FILE *fp = fdopen (fd, "w+"); in main()
A Dscanf16a.c127 int fd = mkstemp (fname); in main() local
128 if (fd == -1) in main()
131 FILE *fp = fdopen (fd, "w+"); in main()

Completed in 13 milliseconds