Lines Matching defs:fd
56 int fd;
118 fd = orig_open (filename, flags, mode);
127 if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES
135 fd = open ("/dev/null", flags, mode);
136 if (0 <= fd)
137 fd = _gl_register_fd (fd, filename);
145 /* If the filename ends in a slash and fd does not refer to a directory,
157 if (fd >= 0)
165 if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
167 close (fd);
176 if (!REPLACE_OPEN_DIRECTORY && 0 <= fd)
177 fd = _gl_register_fd (fd, filename);
180 return fd;