Home | History | Annotate | Download | only in import

Lines Matching defs:fcntl

23 #include <fcntl.h>
170 /* Forward declarations, because we '#undef fcntl' in the middle of this
172 /* Our implementation of fcntl (fd, F_DUPFD, target). */
174 /* Our implementation of fcntl (fd, F_DUPFD_CLOEXEC, target). */
177 /* Adds support for fcntl on directories. */
185 native fcntl. An unrecognized ACTION returns -1 with errno set to
202 fcntl (int fd, int action, /* arg */...)
203 #undef fcntl
205 # define fcntl klibc_fcntl
328 result = fcntl (fd, action);
424 result = fcntl (fd, action, x);
432 result = fcntl (fd, action, p);
462 int flags = fcntl (fd, F_GETFD);
467 result = fcntl (fd, F_DUPFD, target);
468 if (0 <= result && fcntl (fd, F_SETFD, flags) == -1)
482 result = fcntl (fd, F_DUPFD, target);
495 /* On NetBSD 9.0, the system fcntl (fd, F_DUPFD_CLOEXEC, target)
496 has only the same effect as fcntl (fd, F_DUPFD, target). */
497 /* On Haiku, the system fcntl (fd, F_DUPFD_CLOEXEC, target) sets
499 system fcntl in this case. */
512 result = fcntl (fd, F_DUPFD_CLOEXEC, target);
533 int flags = fcntl (result, F_GETFD);
534 if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
546 #undef fcntl
560 result = fcntl (fd, action, arg);
571 while (fcntl (arg, F_GETFL) != -1 || errno != EBADF)