Searched refs:fileno (Results 1 - 25 of 285) sorted by relevance

1234567891011>>

/freebsd-current/contrib/xz/src/xz/
H A Dprivate.h39 # define fileno _fileno macro
43 # define STDIN_FILENO (fileno(stdin))
47 # define STDOUT_FILENO (fileno(stdout))
51 # define STDERR_FILENO (fileno(stderr))
/freebsd-current/lib/libc/stdio/
H A Dfileno.c40 #undef fileno macro
44 fileno(FILE *fp) function
/freebsd-current/contrib/ncurses/ncurses/base/
H A Dlib_initscr.c84 if (NC_ISATTY(fileno(stdout))) {
86 if (fp != 0 && NC_ISATTY(fileno(fp))) {
88 dup2(fileno(fp), STDOUT_FILENO);
H A Dlib_newterm.c205 _setmode(fileno(_ifp), _O_BINARY);
206 _setmode(fileno(_ofp), _O_BINARY);
213 fileno(_ofp), &errret, FALSE) != ERR) {
293 SP_PARM->_ifd = fileno(_ifp);
294 NCURSES_SP_NAME(typeahead) (NCURSES_SP_ARGx fileno(_ifp));
/freebsd-current/contrib/llvm-project/libcxx/src/
H A Dprint.cpp37 intptr_t __handle = _get_osfhandle(fileno(__stream));
49 if (WriteConsoleW(reinterpret_cast<void*>(_get_osfhandle(fileno(__stream))), // clang-format aid
61 _LIBCPP_EXPORTED_FROM_ABI bool __is_posix_terminal(FILE* __stream) { return isatty(fileno(__stream)); }
H A Dfstream.cpp29 intptr_t __handle = _get_osfhandle(fileno(__file));
/freebsd-current/usr.sbin/fstyp/
H A Dgeli.c47 error = ioctl(fileno(fp), DIOCGMEDIASIZE, &mediasize);
50 error = ioctl(fileno(fp), DIOCGSECTORSIZE, &sectorsize);
H A Dufs.c50 switch (sbget(fileno(fp), &fs, UFS_STDSB, UFS_NOCSUM)) {
/freebsd-current/usr.bin/tip/tip/
H A Dlog.c52 if (flock(fileno(flog), LOCK_EX) < 0) {
74 (void) flock(fileno(flog), LOCK_UN);
/freebsd-current/crypto/heimdal/lib/roken/
H A Dcloexec.c56 rk_cloexec(fileno(f));
/freebsd-current/crypto/openssh/
H A Dsshtty.c61 if (tcsetattr(fileno(stdin), TCSADRAIN, &_saved_tio) == -1) {
73 if (tcgetattr(fileno(stdin), &tio) == -1) {
91 if (tcsetattr(fileno(stdin), TCSADRAIN, &tio) == -1) {
/freebsd-current/crypto/heimdal/appl/login/
H A Dread_string.c83 tcgetattr(fileno(tty), &t_old);
86 tcsetattr(fileno(tty), TCSANOW, &t_new);
109 tcsetattr(fileno(tty), TCSANOW, &t_old);
/freebsd-current/usr.bin/mail/
H A Dtty.c77 if (tcgetattr(fileno(stdin), &ttybuf) < 0) {
95 if (ioctl(fileno(stdin), TIOCEXT, &flag) < 0)
106 ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf);
114 ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf);
121 ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf);
129 ttyset++, tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf);
144 tcsetattr(fileno(stdin), TCSADRAIN, &ttybuf);
150 if (ioctl(fileno(stdin), TIOCEXT, &flag) < 0)
/freebsd-current/lib/libdiff/tests/
H A Dlibdiff_test.c44 ATF_REQUIRE(fsync(fileno(f)) == 0);
47 ATF_REQUIRE((p = mmap(NULL, size, PROT_READ, MAP_PRIVATE, fileno(f), 0)) != MAP_FAILED);
/freebsd-current/stand/userboot/userboot/
H A Dhost.c92 uint32_t fileno; local
97 rc = CALLBACK(readdir, f->f_fsdata, &fileno, &type, &namelen,
102 d->d_fileno = fileno;
/freebsd-current/contrib/tcp_wrappers/
H A Drfc931.c159 if (bind(fileno(fp), (struct sockaddr *) & our_query_sin,
161 connect(fileno(fp), (struct sockaddr *) & rmt_query_sin,
169 if (bind(fileno(fp), (struct sockaddr *) & our_query_sin,
171 connect(fileno(fp), (struct sockaddr *) & rmt_query_sin,
/freebsd-current/contrib/llvm-project/compiler-rt/lib/fuzzer/
H A DFuzzerUtilLinux.cpp39 dup2(fileno(Temp), Fd);
/freebsd-current/usr.bin/tail/
H A Dforward.c199 map.fd = fileno(fp);
278 if (fstatfs(fileno(file->fp), &sf) == 0 &&
284 if (Fflag && fileno(file->fp) != STDIN_FILENO) {
285 EV_SET(&ev[n], fileno(file->fp), EVFILT_VNODE,
290 EV_SET(&ev[n], fileno(file->fp), EVFILT_READ,
350 fstat(fileno(file->fp), &file->st)
359 if (fileno(file->fp) == STDIN_FILENO)
363 fstat(fileno(ftmp), &sb2) == -1) {
/freebsd-current/usr.bin/write/
H A Dwrite.c134 if (isatty(fileno(stdin)))
135 myttyfd = fileno(stdin);
136 else if (isatty(fileno(stdout)))
137 myttyfd = fileno(stdout);
138 else if (isatty(fileno(stderr)))
139 myttyfd = fileno(stderr);
/freebsd-current/usr.bin/diff/
H A Ddiffreg_new.c183 if (caph_rights_limit(fileno(f1), &rights_ro) < 0)
185 if (caph_rights_limit(fileno(f2), &rights_ro) < 0)
187 if (fileno(f1) == STDIN_FILENO || fileno(f2) == STDIN_FILENO) {
300 if (fstat(fileno(f), st) == -1)
304 *p = mmap(NULL, st->st_size, PROT_READ, MAP_PRIVATE, fileno(f), 0);
/freebsd-current/sys/contrib/openzfs/contrib/pyzfs/libzfs_core/test/
H A Dtest_libzfs_core.py158 yield fd.fileno()
197 lzc.lzc_send(snaps[1], None, full.fileno())
201 lzc.lzc_send(snaps[2], snaps[1], incremental.fileno())
1637 fd = output.fileno()
1658 fd = output.fileno()
1685 fd = output.fileno()
1697 fd = output.fileno()
1709 fd = output.fileno()
1721 fd = output.fileno()
1732 fd = output.fileno()
[all...]
/freebsd-current/crypto/heimdal/appl/ftp/ftp/
H A Dftp.c604 if (fstat (fileno (from), &st) == 0 && S_ISREG (st.st_mode)) {
619 chunk = mmap (0, len, PROT_READ, MAP_SHARED, fileno (from), off);
626 res = sec_write (fileno (to), chunk, len);
642 fstat (fileno (from), &st) >= 0 ? &st : NULL);
646 while ((n = read (fileno (from), buf, bufsize)) > 0) {
647 werr = sec_write (fileno (to), buf, n);
734 if (fstat (fileno (fin), &st) < 0 || !S_ISREG(st.st_mode)) {
764 rc = lseek (fileno (fin), restart_point, SEEK_SET);
806 set_buffer_size (fileno (dout), 0);
1009 set_buffer_size (fileno (di
[all...]
/freebsd-current/contrib/libarchive/libarchive/
H A Darchive_read_open_file.c86 * streams that don't support fileno()). As a result, fileno()
89 if (fstat(fileno(mine->f), &st) == 0 && S_ISREG(st.st_mode)) {
97 setmode(fileno(mine->f), O_BINARY);
154 /* fileno() isn't safe on all platforms ... see above. */
155 if (lseek(fileno(mine->f), skip, SEEK_CUR) < 0)
/freebsd-current/contrib/netbsd-tests/lib/libc/gen/posix_spawn/
H A Dt_fileactions.c110 posix_spawn_file_actions_addopen(&fa, fileno(stdin),
112 posix_spawn_file_actions_addopen(&fa, fileno(stdout),
136 posix_spawn_file_actions_addopen(&fa, fileno(stdin),
138 posix_spawn_file_actions_addopen(&fa, fileno(stdout),
162 posix_spawn_file_actions_addopen(&fa, fileno(stdout),
164 posix_spawn_file_actions_addopen(&fa, fileno(stdin),
206 posix_spawn_file_actions_addopen(&fa, fileno(stdin),
405 posix_spawn_file_actions_addopen(&fa, fileno(stdout),
/freebsd-current/sys/contrib/zstd/programs/
H A Dplatform.h129 * Detect if isatty() and fileno() are available
135 # include <stdio.h> /* fileno */
136 # define IS_CONSOLE(stdStream) isatty(fileno(stdStream))
165 # define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)

Completed in 474 milliseconds

1234567891011>>