Lines Matching defs:fd
51 int fd;
104 fd = orig_open (filename, flags, mode);
113 if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES
120 fd = open ("/dev/null", flags, mode);
121 if (0 <= fd)
122 fd = _gl_register_fd (fd, filename);
130 /* If the filename ends in a slash and fd does not refer to a directory,
142 if (fd >= 0)
150 if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
152 close (fd);
161 if (!REPLACE_OPEN_DIRECTORY && 0 <= fd)
162 fd = _gl_register_fd (fd, filename);
165 return fd;