# 2.11BSD#431 - /usr/include/fcntl.h

##### Macros

    FAPPEND           X
    FASYNC            X
    FCNTLFLAGS        X
    FDEFER            X
    FD_CLOEXEC        X
    FEXLOCK           X
    FFLAGS            X
    FFSYNC            X
    FMARK             X
    FMASK             X
    FNDELAY           X
    FNONBLOCK         X
    FREAD             X
    FSHLOCK           X
    FWRITE            X
    F_DUPFD           X
    F_GETFD           X
    F_GETFL           X
    F_GETOWN          X
    F_SETFD           X
    F_SETFL           X
    F_SETOWN          X
    LOCK_EX           X
    LOCK_NB           X
    LOCK_SH           X
    LOCK_UN           X
    OFLAGS            X
    O_ACCMODE         X
    O_APPEND          X
    O_ASYNC           X
    O_CREAT           X
    O_EXCL            X
    O_EXLOCK          X
    O_FSYNC           X
    O_NDELAY          X
    O_NOCTTY          X
    O_NONBLOCK        X
    O_RDONLY          X
    O_RDWR            X
    O_SHLOCK          X
    O_TRUNC           X
    O_WRONLY          X
    _FCNTL_H_         X

       1: /*-
       2:  * Copyright (c) 1983, 1990, 1993
       3:  *	The Regents of the University of California.  All rights reserved.
       4:  * (c) UNIX System Laboratories, Inc.
       5:  * All or some portions of this file are derived from material licensed
       6:  * to the University of California by American Telephone and Telegraph
       7:  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
       8:  * the permission of UNIX System Laboratories, Inc.
       9:  *
      10:  * Redistribution and use in source and binary forms, with or without
      11:  * modification, are permitted provided that the following conditions
      12:  * are met:
      13:  * 1. Redistributions of source code must retain the above copyright
      14:  *    notice, this list of conditions and the following disclaimer.
      15:  * 2. Redistributions in binary form must reproduce the above copyright
      16:  *    notice, this list of conditions and the following disclaimer in the
      17:  *    documentation and/or other materials provided with the distribution.
      18:  * 3. All advertising materials mentioning features or use of this software
      19:  *    must display the following acknowledgement:
      20:  *	This product includes software developed by the University of
      21:  *	California, Berkeley and its contributors.
      22:  * 4. Neither the name of the University nor the names of its contributors
      23:  *    may be used to endorse or promote products derived from this software
      24:  *    without specific prior written permission.
      25:  *
      26:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
      27:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
      28:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
      29:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
      30:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
      31:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
      32:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
      33:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
      34:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
      35:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
      36:  * SUCH DAMAGE.
      37:  *
      38:  *	@(#)fcntl.h	8.3.1 (2.11BSD GTE) 11/25/94
      39:  *
      40:  * Copied from 4.4-Lite and modified for 2.11BSD.  The modifications consisted
      41:  * of removing: function prototypes (I don't like them, the compiler does not
      42:  * support them, and it would mean dragging in cdefs.h to leave them in here),
      43:  * #ifndef _POSIX_SOURCE lines (silly) and record locking related definitions
      44:  * If anyone adds any of the above it will be easy enough to modify this file.
      45:  * In the meantime why bog down (or blow up) cpp any further?
      46:  */
      47:
      48: #ifndef _FCNTL_H_
      49: #define _FCNTL_H_
      50:
      51: /*
      52:  * This file includes the definitions for open and fcntl
      53:  * described by POSIX for <fcntl.h>; it also includes
      54:  * related kernel definitions.
      55:  */
      56:
      57: #ifndef KERNEL
      58: #include <sys/types.h>
      59: #endif
      60:
      61: /*
      62:  * File status flags: these are used by open(2), fcntl(2).
      63:  * They are also used (indirectly) in the kernel file structure f_flags,
      64:  * which is a superset of the open/fcntl flags.  Open flags and f_flags
      65:  * are inter-convertible using OFLAGS(fflags) and FFLAGS(oflags).
      66:  * Open/fcntl flags begin with O_; kernel-internal flags begin with F.
      67:  */
      68: /* open-only flags */
      69: #define O_RDONLY    0x0000      /* open for reading only */
      70: #define O_WRONLY    0x0001      /* open for writing only */
      71: #define O_RDWR      0x0002      /* open for reading and writing */
      72: #define O_ACCMODE   0x0003      /* mask for above modes */
      73:
      74: /*
      75:  * Kernel encoding of open mode; separate read and write bits that are
      76:  * independently testable: 1 greater than the above.
      77:  *
      78:  * XXX
      79:  * FREAD and FWRITE are excluded from the #ifdef KERNEL so that TIOCFLUSH,
      80:  * which was documented to use FREAD/FWRITE, continues to work.
      81:  */
      82: #define FREAD       0x0001
      83: #define FWRITE      0x0002
      84: #define O_NONBLOCK  0x0004      /* no delay */
      85: #define O_APPEND    0x0008      /* set append mode */
      86: #define O_SHLOCK    0x0010      /* open with shared file lock */
      87: #define O_EXLOCK    0x0020      /* open with exclusive file lock */
      88: #define O_ASYNC     0x0040      /* signal pgrp when data ready */
      89: #define O_FSYNC     0x0080      /* synchronous writes */
      90: #define O_CREAT     0x0200      /* create if nonexistant */
      91: #define O_TRUNC     0x0400      /* truncate to zero length */
      92: #define O_EXCL      0x0800      /* error if already exists */
      93: #ifdef KERNEL
      94: #define FMARK       0x1000      /* mark during gc() */
      95: #define FDEFER      0x2000      /* defer for next gc pass */
      96: #endif
      97:
      98: /* defined by POSIX 1003.1; not 2.11BSD default, so bit is required */
      99: /* Not currently implemented but it may be placed on the TODO list shortly */
     100: #define O_NOCTTY    0x4000      /* don't assign controlling terminal */
     101:
     102: #ifdef KERNEL
     103: /* convert from open() flags to/from fflags; convert O_RD/WR to FREAD/FWRITE */
     104: #define FFLAGS(oflags)  ((oflags) + 1)
     105: #define OFLAGS(fflags)  ((fflags) - 1)
     106:
     107: /* bits to save after open */
     108: #define FMASK       (FREAD|FWRITE|FAPPEND|FASYNC|FFSYNC|FNONBLOCK)
     109: /* bits settable by fcntl(F_SETFL, ...) */
     110: #define FCNTLFLAGS  (FAPPEND|FASYNC|FFSYNC|FNONBLOCK)
     111: #endif
     112:
     113: /*
     114:  * The O_* flags used to have only F* names, which were used in the kernel
     115:  * and by fcntl.  We retain the F* names for the kernel f_flags field
     116:  * and for backward compatibility for fcntl.
     117:  */
     118: #define FAPPEND     O_APPEND    /* kernel/compat */
     119: #define FASYNC      O_ASYNC     /* kernel/compat */
     120: #define FFSYNC      O_FSYNC     /* kernel */
     121: #define FEXLOCK     O_EXLOCK    /* kernel */
     122: #define FSHLOCK     O_SHLOCK    /* kernel */
     123: #define FNONBLOCK   O_NONBLOCK  /* kernel */
     124: #define FNDELAY     O_NONBLOCK  /* compat */
     125: #define O_NDELAY    O_NONBLOCK  /* compat */
     126:
     127: /*
     128:  * Constants used for fcntl(2)
     129:  */
     130:
     131: /* command values */
     132: #define F_DUPFD     0       /* duplicate file descriptor */
     133: #define F_GETFD     1       /* get file descriptor flags */
     134: #define F_SETFD     2       /* set file descriptor flags */
     135: #define F_GETFL     3       /* get file status flags */
     136: #define F_SETFL     4       /* set file status flags */
     137: #define F_GETOWN    5       /* get SIGIO/SIGURG proc/pgrp */
     138: #define F_SETOWN    6       /* set SIGIO/SIGURG proc/pgrp */
     139:
     140: /* file descriptor flags (F_GETFD, F_SETFD) */
     141: #define FD_CLOEXEC  1       /* close-on-exec flag */
     142:
     143: /* lock operations for flock(2) */
     144: #define LOCK_SH     0x01        /* shared file lock */
     145: #define LOCK_EX     0x02        /* exclusive file lock */
     146: #define LOCK_NB     0x04        /* don't block when locking */
     147: #define LOCK_UN     0x08        /* unlock file */
     148: #endif /* !_FCNTL_H_ */

#### Defined macros

FAPPEND defined in line 118; used 5 times

- in line 108-110(2)
- in /usr/src/sys/sys/sys_inode.c line 58
- in /usr/src/usr.sbin/named/named/ns_main.c line 971
- in /usr/src/usr.sbin/pstat/pstat.c line 737

FASYNC defined in line 119; used 7 times

- in line 108-110(2)
- in /usr/src/sys/sys/kern_descrip.c line 138(2)
- in /usr/src/sys/sys/sys_generic.c line 248
- in /usr/src/ucb/window/wwinit.c line 57
- in /usr/src/usr.sbin/pstat/pstat.c line 740

FCNTLFLAGS defined in line 110; used 2 times

- in /usr/src/sys/sys/kern_descrip.c line 133-134(2)

FDEFER defined in line 95; used 5 times

- in /usr/src/sys/sys/sys_kern.c line 164
- in /usr/src/sys/sys/uipc_usrreq.c line 572-573(2), 645
- in /usr/src/usr.sbin/pstat/pstat.c line 743

FD_CLOEXEC defined in line 141; never used
FEXLOCK defined in line 121; used 10 times

- in /usr/src/sys/sys/kern_descrip.c line 359-360(2), 386, 394
- in /usr/src/sys/sys/sys_inode.c line 554-555(2), 589, 621, 627
- in /usr/src/usr.sbin/pstat/pstat.c line 739

FFLAGS defined in line 104; used 2 times

- in /usr/src/sys/sys/kern_descrip.c line 134
- in /usr/src/sys/sys/ufs_syscalls.c line 135

FFSYNC defined in line 120; used 3 times

- in line 108-110(2)
- in /usr/src/sys/sys/sys_inode.c line 62

FMARK defined in line 94; used 7 times

- in /usr/src/sys/sys/sys_kern.c line 164
- in /usr/src/sys/sys/uipc_usrreq.c line 576-580(2), 598, 642-645(2)
- in /usr/src/usr.sbin/pstat/pstat.c line 742

FMASK defined in line 108; used 1 times

- in /usr/src/sys/sys/ufs_syscalls.c line 136

FNDELAY defined in line 124; used 9 times

- in /usr/src/bin/wall.c line 125
- in /usr/src/sys/sys/tty.c line 685
- in /usr/src/ucb/window/wwrint.c line 33
- in /usr/src/usr.lib/libident/id_open.c line 68
- in /usr/src/usr.sbin/named/named/ns_main.c line 549, 724
- in /usr/src/usr.sbin/named/named/ns_req.c line 1282
- in /usr/src/usr.sbin/ntp/ntp_sock.c line 127, 296

FNONBLOCK defined in line 123; used 13 times

- in line 108-110(2)
- in /usr/src/sys/sys/kern_descrip.c line 135-140(3), 165
- in /usr/src/sys/sys/sys_generic.c line 244
- in /usr/src/sys/sys/sys_inode.c line 52, 60
- in /usr/src/sys/sys/sys_pipe.c line 122, 166
- in /usr/src/sys/sys/ufs_syscalls.c line 179
- in /usr/src/usr.sbin/pstat/pstat.c line 741

FREAD defined in line 82; used 62 times

- in line 108
- in /usr/src/games/hunt/playit.c line 23
- in /usr/src/games/mille/misc.c line 218
- in /usr/src/new/kermit5.188/ckutio.c line 523, 3640, 3655
- in /usr/src/sys/net/if_sl.c line 140
- in /usr/src/sys/pdpuba/hk.c line 929, 935
- in /usr/src/sys/pdpuba/ra.c line 1417, 1423
- in /usr/src/sys/pdpuba/rl.c line 718, 724
- in /usr/src/sys/pdpuba/ts.c line 164
- in /usr/src/sys/pdpuba/xp.c line 1058, 1064
- in /usr/src/sys/sys/init_main.c line 168, 181
- in /usr/src/sys/sys/kern_descrip.c line 471
- in /usr/src/sys/sys/sys_generic.c line 139, 192, 469
- in /usr/src/sys/sys/sys_inode.c line 340, 736
- in /usr/src/sys/sys/sys_pipe.c line 81
- in /usr/src/sys/sys/tty.c line 151, 185, 205, 393-395(2), 432, 451, 544, 686, 699, 734, 820, 885, 913
- in /usr/src/sys/sys/tty_conf.c line 101
- in /usr/src/sys/sys/tty_pty.c line 84, 97, 174, 182, 313-316(2), 506, 545, 558, 565
- in /usr/src/sys/sys/ufs_mount.c line 174(2), 191, 249(2)
- in /usr/src/sys/sys/uipc_socket.c line 609
- in /usr/src/sys/sys/uipc_syscalls.c line 63, 168, 261, 267
- in /usr/src/sys/sys/vfs_vnops.c line 117
- in /usr/src/usr.sbin/pstat/pstat.c line 735

FSHLOCK defined in line 122; used 11 times

- in /usr/src/sys/sys/kern_descrip.c line 359-360(2), 386, 395
- in /usr/src/sys/sys/sys_inode.c line 573-574(2), 591-594(2), 613, 619
- in /usr/src/usr.sbin/pstat/pstat.c line 738

FWRITE defined in line 83; used 68 times

- in line 108
- in /usr/src/new/kermit5.188/ckutio.c line 527, 4771
- in /usr/src/sys/net/if_sl.c line 140
- in /usr/src/sys/pdpuba/hk.c line 929, 935
- in /usr/src/sys/pdpuba/ht.c line 99-103(2), 118(2)
- in /usr/src/sys/pdpuba/ra.c line 1417, 1423
- in /usr/src/sys/pdpuba/rl.c line 718, 724
- in /usr/src/sys/pdpuba/tm.c line 152-156(2), 189(2)
- in /usr/src/sys/pdpuba/ts.c line 164(2), 191(2)
- in /usr/src/sys/pdpuba/xp.c line 1058, 1064
- in /usr/src/sys/sys/ingreslock.c line 49
- in /usr/src/sys/sys/init_main.c line 168
- in /usr/src/sys/sys/kern_descrip.c line 471
- in /usr/src/sys/sys/kern_exec.c line 480
- in /usr/src/sys/sys/sys_generic.c line 139, 192, 472
- in /usr/src/sys/sys/sys_inode.c line 650, 682, 736
- in /usr/src/sys/sys/sys_pipe.c line 80
- in /usr/src/sys/sys/tty.c line 195, 393-395(2), 686, 699, 734, 820, 875, 913
- in /usr/src/sys/sys/tty_conf.c line 101
- in /usr/src/sys/sys/tty_pty.c line 84, 97, 137, 190, 314-315(2), 506
- in /usr/src/sys/sys/ufs_disksubr.c line 305, 313, 333
- in /usr/src/sys/sys/ufs_mount.c line 174, 249
- in /usr/src/sys/sys/ufs_syscalls.c line 749
- in /usr/src/sys/sys/uipc_socket.c line 611
- in /usr/src/sys/sys/uipc_syscalls.c line 63, 168, 261, 267
- in /usr/src/sys/sys/vfs_vnops.c line 110(2), 125
- in /usr/src/ucb/rlogin.c line 417
- in /usr/src/usr.sbin/pstat/pstat.c line 736

F_DUPFD defined in line 132; used 2 times

- in /usr/src/new/nntp/server/misc.c line 610
- in /usr/src/usr.bin/uucp/mailst.c line 67

F_GETFD defined in line 133; never used
F_GETFL defined in line 135; used 18 times

- in /usr/src/bin/tcsh/ed.inputl.c line 499
- in /usr/src/bin/tcsh/sh.lex.c line 1495
- in /usr/src/bin/wall.c line 121
- in /usr/src/local/zmodem/genie.c line 75
- in /usr/src/local/zmodem/rbsb.c line 132
- in /usr/src/new/jove/jove.c line 185
- in /usr/src/new/kermit5.188/ckutio.c line 930, 1484-1487(2), 1914, 5647, 5743
- in /usr/src/sbin/newfs/newfs.c line 253
- in /usr/src/ucb/window/wwtty.c line 27
- in /usr/src/usr.bin/uucp/logent.c line 59, 177
- in /usr/src/usr.lib/libident/id_open.c line 64
- in /usr/src/usr.sbin/named/named/ns_req.c line 1280

F_GETOWN defined in line 137; never used
F_SETFD defined in line 134; used 6 times

- in /usr/src/bin/adb/sym.c line 168
- in /usr/src/bin/make/files.c line 286
- in /usr/src/lib/libc/gen/syslog.c line 236
- in /usr/src/usr.bin/uucp/logent.c line 229
- in /usr/src/usr.sbin/cron/misc.c line 275, 477

F_SETFL defined in line 136; used 41 times

- in /usr/src/bin/login/login.c line 160
- in /usr/src/bin/tcsh/ed.inputl.c line 454, 497-498(2)
- in /usr/src/bin/tcsh/sh.lex.c line 1493-1494(2), 1500
- in /usr/src/bin/wall.c line 125-129(2)
- in /usr/src/games/warp/term.c line 134
- in /usr/src/libexec/acctd/acctd.c line 279
- in /usr/src/local/zmodem/genie.c line 74
- in /usr/src/local/zmodem/rbsb.c line 133-135(2)
- in /usr/src/new/jove/jove.c line 190
- in /usr/src/new/kermit5.188/ckutio.c line 962, 1487, 1922, 1971, 2053, 5647, 5743
- in /usr/src/new/rn/term.c line 134
- in /usr/src/ucb/window/wwrint.c line 33-35(2)
- in /usr/src/ucb/window/wwtty.c line 54
- in /usr/src/usr.bin/uucp/logent.c line 46, 58-60(2), 108, 164, 176-178(2), 208
- in /usr/src/usr.lib/libident/id_open.c line 68
- in /usr/src/usr.sbin/named/named/ns_main.c line 549, 724, 971
- in /usr/src/usr.sbin/named/named/ns_req.c line 1282
- in /usr/src/usr.sbin/ntp/ntp_sock.c line 127, 296

F_SETOWN defined in line 138; used 4 times

- in /usr/src/lib/libc/net/rcmd.c line 72
- in /usr/src/libexec/ftpd/ftpd.c line 229-230(2)
- in /usr/src/ucb/rlogin.c line 518

LOCK_EX defined in line 145; used 43 times

- in /usr/src/bin/ar/archive.c line 88
- in /usr/src/bin/chpass/chpass.c line 219
- in /usr/src/bin/mail.c line 308
- in /usr/src/bin/passwd/passwd.c line 149
- in /usr/src/games/atc/log.c line 84
- in /usr/src/games/fortune/fortune.c line 86, 92-95(2)
- in /usr/src/games/sail/misc.c line 170-171(2), 201
- in /usr/src/games/sail/sync.c line 123-124(2), 189
- in /usr/src/libexec/popper/pop_dropcopy.c line 97, 116
- in /usr/src/libexec/popper/pop_updt.c line 73
- in /usr/src/new/nntp/xmit/nntpxmit.c line 1126-1127(2)
- in /usr/src/sbin/dump/dumptape.c line 360, 436
- in /usr/src/sys/sys/kern_descrip.c line 389-394(3)
- in /usr/src/sys/sys/sys_inode.c line 535, 565, 585
- in /usr/src/sys/sys/ufs_syscalls.c line 176
- in /usr/src/ucb/Mail/quit.c line 106
- in /usr/src/usr.bin/tip/log.c line 29
- in /usr/src/usr.bin/uucp/acucntrl.c line 415
- in /usr/src/usr.bin/uucp/gename.c line 49
- in /usr/src/usr.sbin/cron/misc.c line 264
- in /usr/src/usr.sbin/lpr/cmds.c line 459
- in /usr/src/usr.sbin/lpr/lpd.c line 104
- in /usr/src/usr.sbin/lpr/lpr.c line 628
- in /usr/src/usr.sbin/lpr/printjob.c line 101, 1278
- in /usr/src/usr.sbin/sendmail.MX/src/alias.c line 337, 344
- in /usr/src/usr.sbin/sendmail/src/alias.c line 336, 343
- in /usr/src/usr.sbin/vipw/vipw.c line 138

LOCK_NB defined in line 146; used 15 times

- in /usr/src/bin/ar/archive.c line 88
- in /usr/src/games/sail/sync.c line 124
- in /usr/src/libexec/popper/pop_dropcopy.c line 97
- in /usr/src/new/nntp/xmit/nntpxmit.c line 1127
- in /usr/src/sys/sys/sys_inode.c line 558, 577
- in /usr/src/sys/sys/ufs_syscalls.c line 180
- in /usr/src/usr.bin/uucp/acucntrl.c line 415
- in /usr/src/usr.sbin/cron/misc.c line 264
- in /usr/src/usr.sbin/lpr/cmds.c line 101, 678
- in /usr/src/usr.sbin/lpr/lpd.c line 104
- in /usr/src/usr.sbin/lpr/printjob.c line 101
- in /usr/src/usr.sbin/sendmail.MX/src/alias.c line 337
- in /usr/src/usr.sbin/sendmail/src/alias.c line 336

LOCK_SH defined in line 144; used 13 times

- in /usr/src/bin/mail.c line 156
- in /usr/src/lib/libc/gen/getpwent.c line 225
- in /usr/src/sys/sys/kern_descrip.c line 389-395(3)
- in /usr/src/sys/sys/sys_inode.c line 586-591(2)
- in /usr/src/sys/sys/ufs_syscalls.c line 178
- in /usr/src/usr.sbin/lpr/cmds.c line 101, 678, 688
- in /usr/src/usr.sbin/lpr/displayq.c line 163, 208

LOCK_UN defined in line 147; used 8 times

- in /usr/src/games/atc/log.c line 193
- in /usr/src/games/fortune/fortune.c line 96
- in /usr/src/games/sail/misc.c line 202
- in /usr/src/games/sail/sync.c line 190
- in /usr/src/lib/libc/gen/getpwent.c line 235
- in /usr/src/sbin/dump/dumptape.c line 455
- in /usr/src/sys/sys/kern_descrip.c line 385
- in /usr/src/usr.bin/tip/log.c line 50

OFLAGS defined in line 105; used 1 times

- in /usr/src/sys/sys/kern_descrip.c line 129

O_ACCMODE defined in line 72; never used
O_APPEND defined in line 85; used 28 times

- in line 118
- in /usr/src/bin/csh/sh.sem.c line 364
- in /usr/src/bin/date.c line 122
- in /usr/src/bin/sh/service.c line 61
- in /usr/src/bin/tcsh/sh.sem.c line 697-698(2)
- in /usr/src/lib/libc/gen/syslog.c line 227
- in /usr/src/libexec/acctd/acctd.c line 432
- in /usr/src/libexec/ftpd/logwtmp.c line 48
- in /usr/src/libexec/popper/pop_dropcopy.c line 88
- in /usr/src/libexec/telnetd/telnetd.c line 1270
- in /usr/src/sbin/init/init.c line 196, 347, 592
- in /usr/src/sbin/reboot/reboot.c line 169
- in /usr/src/sys/sys/vfs_vnops.c line 110
- in /usr/src/usr.bin/uucp/logent.c line 60, 178
- in /usr/src/usr.bin/uucp/uucpd.c line 246, 280
- in /usr/src/usr.lib/libutil/login.c line 42
- in /usr/src/usr.lib/libutil/logwtmp.c line 38
- in /usr/src/usr.sbin/cron/misc.c line 471
- in /usr/src/usr.sbin/lpr/printjob.c line 73
- in /usr/src/usr.sbin/lpr/recvjob.c line 52
- in /usr/src/usr.sbin/syslogd/syslogd.c line 597, 1041
- in /usr/src/usr.sbin/timed/master.c line 549

O_ASYNC defined in line 88; used 1 times

- in line 119

O_CREAT defined in line 90; used 64 times

- in /usr/src/bin/adb/print.c line 130
- in /usr/src/bin/adb/runpcs.c line 150
- in /usr/src/bin/adb/setup.c line 209
- in /usr/src/bin/ar/append.c line 68
- in /usr/src/bin/ar/archive.c line 66
- in /usr/src/bin/ar/extract.c line 91
- in /usr/src/bin/ar/replace.c line 83
- in /usr/src/bin/chpass/chpass.c line 141
- in /usr/src/bin/ld/ld.c line 1945
- in /usr/src/bin/mail.c line 306, 618
- in /usr/src/bin/passwd/passwd.c line 89
- in /usr/src/bin/rcp.c line 741
- in /usr/src/bin/tar.c line 308
- in /usr/src/games/atc/log.c line 69
- in /usr/src/lib/libc/compat-43/creat.c line 44
- in /usr/src/lib/libc/gen/mktemp.c line 72
- in /usr/src/lib/libc/stdio/fopen.c line 32, 38
- in /usr/src/lib/libc/stdio/freopen.c line 29, 35
- in /usr/src/libexec/popper/pop_dropcopy.c line 88
- in /usr/src/libexec/popper/pop_updt.c line 67
- in /usr/src/local/ddd/ddd.c line 199
- in /usr/src/new/nntp/xmit/shlock.c line 249
- in /usr/src/new/pathalias/getstruct.c line 70-80(3)
- in /usr/src/sbin/dcheck/dcheck.c line 68
- in /usr/src/sbin/dmesg/dmesg.c line 54
- in /usr/src/sbin/dump/dumptape.c line 276-279(2)
- in /usr/src/sbin/mkpasswd/mkpasswd.c line 97, 108
- in /usr/src/sbin/restor/restor.c line 152
- in /usr/src/sys/pdpstand/makesimtape.c line 67
- in /usr/src/sys/sys/vfs_vnops.c line 72, 95, 115
- in /usr/src/ucb/gcore.c line 122
- in /usr/src/usr.bin/at/atrun.c line 337
- in /usr/src/usr.bin/mkerrlst/mkerrlst.c line 69
- in /usr/src/usr.bin/xinstall/xinstall.c line 206
- in /usr/src/usr.lib/libvmf/vmf.c line 305
- in /usr/src/usr.sbin/cron/crontab.c line 301
- in /usr/src/usr.sbin/cron/misc.c line 254, 471
- in /usr/src/usr.sbin/dev_mkdb/dev_mkdb.c line 94
- in /usr/src/usr.sbin/edquota/edquota.c line 206
- in /usr/src/usr.sbin/lpr/cmds.c line 81, 369, 445, 458, 757
- in /usr/src/usr.sbin/lpr/lpd.c line 99
- in /usr/src/usr.sbin/lpr/lpr.c line 624
- in /usr/src/usr.sbin/lpr/printjob.c line 96, 573, 1277
- in /usr/src/usr.sbin/lpr/recvjob.c line 200
- in /usr/src/usr.sbin/mkhosts/mkhosts.c line 55
- in /usr/src/usr.sbin/ntp/ntpd.c line 331
- in /usr/src/usr.sbin/rwhod/rwhod.c line 178
- in /usr/src/usr.sbin/vipw/vipw.c line 61

O_EXCL defined in line 92; used 13 times

- in /usr/src/bin/ar/archive.c line 67, 78
- in /usr/src/bin/chpass/chpass.c line 141
- in /usr/src/bin/passwd/passwd.c line 89
- in /usr/src/lib/libc/gen/mktemp.c line 72
- in /usr/src/new/nntp/xmit/shlock.c line 249
- in /usr/src/sbin/mkpasswd/mkpasswd.c line 97, 108
- in /usr/src/sys/sys/vfs_vnops.c line 74, 90
- in /usr/src/usr.sbin/cron/crontab.c line 301
- in /usr/src/usr.sbin/mkhosts/mkhosts.c line 55
- in /usr/src/usr.sbin/vipw/vipw.c line 61

O_EXLOCK defined in line 87; used 5 times

- in line 121
- in /usr/src/bin/mail.c line 618
- in /usr/src/sys/sys/ufs_syscalls.c line 173-175(2)
- in /usr/src/usr.sbin/dev_mkdb/dev_mkdb.c line 94

O_FSYNC defined in line 89; used 2 times

- in line 120
- in /usr/src/sys/sys/vfs_vnops.c line 140

O_NDELAY defined in line 125; used 33 times

- in /usr/src/bin/tcsh/ed.inputl.c line 454, 497-499(2)
- in /usr/src/bin/tcsh/sh.h line 193
- in /usr/src/bin/tcsh/sh.lex.c line 1493-1500(3)
- in /usr/src/bin/wall.c line 116
- in /usr/src/games/warp/term.c line 134
- in /usr/src/games/warp/warp.h line 168
- in /usr/src/local/mtools/devices.c line 61
- in /usr/src/local/zmodem/rbsb.c line 133
- in /usr/src/new/jove/jove.c line 187-188(2)
- in /usr/src/new/kermit5.188/ckutio.c line 1483-1487(3), 1577, 1589, 1595, 1920-1922(2), 1994, 2008-2009(2), 2043, 2051, 5647, 5743
- in /usr/src/new/rn/common.h line 102
- in /usr/src/new/rn/term.c line 134
- in /usr/src/sbin/slattach/slattach.c line 45
- in /usr/src/usr.bin/uucp/acucntrl.c line 318

O_NOCTTY defined in line 100; never used
O_NONBLOCK defined in line 84; used 8 times

- in line 123-125(3)
- in /usr/src/bin/stty/stty.c line 187
- in /usr/src/libexec/acctd/acctd.c line 279
- in /usr/src/sys/pdpuba/dh.c line 177
- in /usr/src/sys/pdpuba/dhu.c line 171
- in /usr/src/sys/pdpuba/dhv.c line 181

O_RDONLY defined in line 69; used 110 times

- in /usr/src/bin/ar/append.c line 75
- in /usr/src/bin/ar/archive.c line 96
- in /usr/src/bin/ar/contents.c line 68
- in /usr/src/bin/ar/extract.c line 75
- in /usr/src/bin/ar/print.c line 63
- in /usr/src/bin/ar/replace.c line 104, 154
- in /usr/src/bin/chflags/chflags.c line 76
- in /usr/src/bin/chgrp.c line 87
- in /usr/src/bin/chmod.c line 66
- in /usr/src/bin/chpass/chpass.c line 218
- in /usr/src/bin/cmp.c line 72-75(2)
- in /usr/src/bin/df.c line 239
- in /usr/src/bin/disklabel/disklabel.c line 189-193(2), 521
- in /usr/src/bin/ld/ld.c line 1755-1757(2)
- in /usr/src/bin/login/login.c line 495, 515
- in /usr/src/bin/passwd/passwd.c line 148
- in /usr/src/bin/rcp.c line 428
- in /usr/src/bin/sh/service.c line 94
- in /usr/src/bin/stty/stty.c line 187
- in /usr/src/bin/tar.c line 312
- in /usr/src/bin/tcsh/sh.c line 577, 980
- in /usr/src/bin/tcsh/sh.exec.c line 328
- in /usr/src/bin/tcsh/sh.sem.c line 652, 664
- in /usr/src/bin/tcsh/tc.func.c line 1175
- in /usr/src/bin/tcsh/tc.who.c line 220
- in /usr/src/bin/tcsh/tw.help.c line 124
- in /usr/src/bin/wall.c line 56
- in /usr/src/games/battlestar/room.c line 27
- in /usr/src/lib/libc/gen/devname.c line 59
- in /usr/src/lib/libc/gen/getpwent.c line 126, 274
- in /usr/src/lib/libc/gen/ndbm.c line 38
- in /usr/src/lib/libc/gen/syserrlst.c line 57
- in /usr/src/lib/libc/net/hosttable/gethnamadr.c line 97, 133
- in /usr/src/lib/libc/stdio/fopen.c line 35
- in /usr/src/lib/libc/stdio/freopen.c line 32
- in /usr/src/lib/mip/common.c line 122
- in /usr/src/libexec/acctd/acctd.c line 132
- in /usr/src/libexec/comsat/comsat.c line 76
- in /usr/src/libexec/identd/src/kernel/2.11bsd.c line 98-102(2)
- in /usr/src/libexec/popper/pop_xmit.c line 76
- in /usr/src/local/ddd/ddd.c line 196
- in /usr/src/new/ansi/ansitape.c line 155, 693
- in /usr/src/new/bm/bm.c line 82
- in /usr/src/new/kermit5.188/ckufio.c line 487, 2558
- in /usr/src/new/kermit5.188/ckutio.c line 531, 2206
- in /usr/src/new/nntp/server/active.c line 49
- in /usr/src/new/nntp/server/misc.c line 155
- in /usr/src/new/nntp/server/netaux.c line 71
- in /usr/src/new/nntp/server/spawn.c line 162
- in /usr/src/new/nntp/xmit/shlock.c line 202
- in /usr/src/new/vmsbackup/vmsbackup.c line 824
- in /usr/src/sbin/init/init.c line 320
- in /usr/src/sbin/newfs/newfs.c line 128
- in /usr/src/sbin/quotacheck/quotacheck.c line 215
- in /usr/src/sys/autoconfig/read_nlist.c line 86
- in /usr/src/sys/conf/checksys.c line 90
- in /usr/src/ucb/PORT/systat/main.c line 76, 82, 88
- in /usr/src/ucb/PORT/systat/vmstat.c line 36
- in /usr/src/ucb/ex/ex_tagio.c line 32
- in /usr/src/ucb/finger/util.c line 134
- in /usr/src/ucb/lastcomm.c line 61
- in /usr/src/ucb/man/man.c line 297
- in /usr/src/ucb/quota.c line 142
- in /usr/src/ucb/tcopy.c line 53
- in /usr/src/ucb/tftp/main.c line 315, 333
- in /usr/src/usr.bin/find/find.c line 98
- in /usr/src/usr.bin/fstat/fstat.c line 668-676(3)
- in /usr/src/usr.bin/tip/remcap.c line 121-126(3)
- in /usr/src/usr.bin/xinstall/xinstall.c line 209
- in /usr/src/usr.sbin/chown/chown.c line 87
- in /usr/src/usr.sbin/cron/database.c line 213
- in /usr/src/usr.sbin/edquota/edquota.c line 205
- in /usr/src/usr.sbin/lpr/cmds.c line 677, 686
- in /usr/src/usr.sbin/lpr/displayq.c line 161, 206
- in /usr/src/usr.sbin/lpr/lpd.c line 87
- in /usr/src/usr.sbin/lpr/lpr.c line 299, 525
- in /usr/src/usr.sbin/lpr/printjob.c line 425, 715
- in /usr/src/usr.sbin/lpr/recvjob.c line 69
- in /usr/src/usr.sbin/named/named/ns_main.c line 226
- in /usr/src/usr.sbin/rwhod/rwhod.c line 121-124(2)
- in /usr/src/usr.sbin/sendmail.MX/aux/mailstats.c line 54
- in /usr/src/usr.sbin/syslogd/syslogd.c line 272
- in /usr/src/usr.sbin/vipw/vipw.c line 70, 137

O_RDWR defined in line 71; used 82 times

- in /usr/src/bin/ar/append.c line 68
- in /usr/src/bin/ar/archive.c line 96
- in /usr/src/bin/ar/delete.c line 68
- in /usr/src/bin/ar/move.c line 72
- in /usr/src/bin/ar/replace.c line 83
- in /usr/src/bin/disklabel/disklabel.c line 189-193(2)
- in /usr/src/bin/ld/ld.c line 1945
- in /usr/src/bin/login/login.c line 529
- in /usr/src/bin/mail.c line 306
- in /usr/src/bin/strip.c line 45
- in /usr/src/bin/tar.c line 308-310(2)
- in /usr/src/bin/tcsh/sh.dol.c line 704
- in /usr/src/games/atc/log.c line 69
- in /usr/src/lib/libc/gen/daemon.c line 57, 65
- in /usr/src/lib/libc/gen/mktemp.c line 72
- in /usr/src/lib/libc/gen/ndbm.c line 40
- in /usr/src/lib/libc/stdio/fopen.c line 32-38(3)
- in /usr/src/lib/libc/stdio/freopen.c line 29-35(3)
- in /usr/src/libexec/getty/main.c line 143, 153
- in /usr/src/libexec/popper/pop_dropcopy.c line 88, 113
- in /usr/src/libexec/popper/pop_updt.c line 67
- in /usr/src/libexec/rlogind/rlogind.c line 250, 261, 269, 301
- in /usr/src/libexec/telnetd/telnetd.c line 256, 266-271(2), 279, 1245
- in /usr/src/new/ansi/ansitape.c line 155
- in /usr/src/new/kermit5.188/ckutio.c line 1512, 1589, 1595, 1994, 2009-2011(2)
- in /usr/src/new/nntp/server/netaux.c line 65
- in /usr/src/new/nntp/xmit/shlock.c line 249
- in /usr/src/new/pathalias/getstruct.c line 70-80(3)
- in /usr/src/sbin/clri/clri.c line 40
- in /usr/src/sbin/dcheck/dcheck.c line 68
- in /usr/src/sbin/dmesg/dmesg.c line 54
- in /usr/src/sbin/init/init.c line 296, 562, 753
- in /usr/src/sbin/restor/restor.c line 152
- in /usr/src/sbin/slattach/slattach.c line 45
- in /usr/src/ucb/gcore.c line 122
- in /usr/src/ucb/script.c line 153, 216, 246
- in /usr/src/usr.bin/ranlib/build.c line 78
- in /usr/src/usr.bin/ranlib/touch.c line 62
- in /usr/src/usr.bin/tip/hunt.c line 51
- in /usr/src/usr.bin/uucp/acucntrl.c line 318
- in /usr/src/usr.lib/libutil/logout.c line 38
- in /usr/src/usr.lib/libvmf/vmf.c line 305
- in /usr/src/usr.sbin/cron/compat.c line 48
- in /usr/src/usr.sbin/cron/crontab.c line 301
- in /usr/src/usr.sbin/cron/misc.c line 254
- in /usr/src/usr.sbin/dev_mkdb/dev_mkdb.c line 94
- in /usr/src/usr.sbin/edquota/edquota.c line 206
- in /usr/src/usr.sbin/lpr/lpd.c line 90
- in /usr/src/usr.sbin/lpr/lpr.c line 315, 624
- in /usr/src/usr.sbin/lpr/printjob.c line 1121
- in /usr/src/usr.sbin/named/named/ns_main.c line 229
- in /usr/src/usr.sbin/rxformat/rxformat.c line 39
- in /usr/src/usr.sbin/syslogd/syslogd.c line 355
- in /usr/src/usr.sbin/vipw/vipw.c line 61

O_SHLOCK defined in line 86; used 2 times

- in line 122
- in /usr/src/sys/sys/ufs_syscalls.c line 173

O_TRUNC defined in line 91; used 20 times

- in /usr/src/bin/adb/setup.c line 209
- in /usr/src/bin/ar/extract.c line 91
- in /usr/src/bin/ld/ld.c line 1945
- in /usr/src/bin/tar.c line 308
- in /usr/src/lib/libc/compat-43/creat.c line 44
- in /usr/src/lib/libc/stdio/fopen.c line 38
- in /usr/src/lib/libc/stdio/freopen.c line 35
- in /usr/src/new/pathalias/getstruct.c line 70-80(3)
- in /usr/src/sbin/restor/restor.c line 152
- in /usr/src/sys/pdpstand/makesimtape.c line 67
- in /usr/src/sys/sys/vfs_vnops.c line 86, 125, 139
- in /usr/src/ucb/gcore.c line 122
- in /usr/src/usr.bin/mkerrlst/mkerrlst.c line 69
- in /usr/src/usr.bin/xinstall/xinstall.c line 206
- in /usr/src/usr.sbin/dev_mkdb/dev_mkdb.c line 94
- in /usr/src/usr.sbin/lpr/printjob.c line 573

O_WRONLY defined in line 70; used 69 times

- in /usr/src/bin/adb/print.c line 130
- in /usr/src/bin/adb/runpcs.c line 150
- in /usr/src/bin/ar/extract.c line 91
- in /usr/src/bin/chpass/chpass.c line 141
- in /usr/src/bin/csh/sh.sem.c line 364
- in /usr/src/bin/date.c line 122
- in /usr/src/bin/mail.c line 618
- in /usr/src/bin/passwd/passwd.c line 89
- in /usr/src/bin/rcp.c line 741
- in /usr/src/bin/sh/service.c line 61
- in /usr/src/bin/tcsh/sh.sem.c line 698-700(2)
- in /usr/src/bin/wall.c line 116
- in /usr/src/lib/libc/compat-43/creat.c line 44
- in /usr/src/lib/libc/gen/ndbm.c line 39
- in /usr/src/lib/libc/gen/syslog.c line 192, 227
- in /usr/src/lib/libc/stdio/fopen.c line 32, 38
- in /usr/src/lib/libc/stdio/freopen.c line 29, 35
- in /usr/src/libexec/acctd/acctd.c line 432
- in /usr/src/libexec/ftpd/logwtmp.c line 48
- in /usr/src/libexec/telnetd/telnetd.c line 1270
- in /usr/src/local/ddd/ddd.c line 199
- in /usr/src/sbin/dump/dumptape.c line 276-279(2)
- in /usr/src/sbin/init/init.c line 196, 347, 592
- in /usr/src/sbin/mkpasswd/mkpasswd.c line 97, 108
- in /usr/src/sbin/reboot/reboot.c line 169
- in /usr/src/sys/pdpstand/makesimtape.c line 67
- in /usr/src/ucb/tcopy.c line 57
- in /usr/src/usr.bin/at/atrun.c line 337
- in /usr/src/usr.bin/mkerrlst/mkerrlst.c line 69
- in /usr/src/usr.bin/uucp/uucpd.c line 246, 280
- in /usr/src/usr.bin/xinstall/xinstall.c line 206
- in /usr/src/usr.lib/libutil/login.c line 37-42(2)
- in /usr/src/usr.lib/libutil/logwtmp.c line 38
- in /usr/src/usr.sbin/cron/misc.c line 471
- in /usr/src/usr.sbin/edquota/edquota.c line 290
- in /usr/src/usr.sbin/lpr/cmds.c line 81, 369, 445, 458, 757
- in /usr/src/usr.sbin/lpr/lpd.c line 88, 99
- in /usr/src/usr.sbin/lpr/printjob.c line 73-75(2), 96, 573, 1121, 1277
- in /usr/src/usr.sbin/lpr/recvjob.c line 52-54(2), 200
- in /usr/src/usr.sbin/mkhosts/mkhosts.c line 55
- in /usr/src/usr.sbin/ntp/ntpd.c line 331
- in /usr/src/usr.sbin/rwhod/rwhod.c line 178
- in /usr/src/usr.sbin/syslogd/syslogd.c line 529, 597, 701, 1041
- in /usr/src/usr.sbin/timed/master.c line 549

_FCNTL_H_ defined in line 49; used 1 times

- in line 48

#### Usage of this include

fcntl.h used 66 times

- in /usr/src/bin/adb/sym.c line 3
- in /usr/src/bin/ar/contents.c line 44
- in /usr/src/bin/ar/delete.c line 43
- in /usr/src/bin/ar/extract.c line 44
- in /usr/src/bin/ar/move.c line 43
- in /usr/src/bin/ar/print.c line 42
- in /usr/src/bin/ar/replace.c line 43
- in /usr/src/bin/chflags/chflags.c line 14
- in /usr/src/bin/csh/sh.sem.c line 13
- in /usr/src/bin/df.c line 53
- in /usr/src/bin/make/files.c line 3
- in /usr/src/bin/sh/service.c line 15
- in /usr/src/bin/stty/stty.c line 22
- in /usr/src/bin/tar.c line 29
- in /usr/src/bin/tcsh/sh.h line 194
- in /usr/src/bin/wall.c line 27
- in /usr/src/games/atc/include.h line 24
- in /usr/src/games/warp/warp.h line 109
- in /usr/src/lib/libc/compat-43/creat.c line 38
- in /usr/src/lib/libc/gen/daemon.c line 38
- in /usr/src/lib/libc/gen/devname.c line 40
- in /usr/src/lib/libc/gen/syserrlst.c line 23
- in /usr/src/lib/libc/gen/syslog.c line 45
- in /usr/src/libexec/acctd/acctd.c line 12
- in /usr/src/libexec/identd/src/identd.c line 40
- in /usr/src/libexec/identd/src/kernel/2.11bsd.c line 30
- in /usr/src/local/ddd/ddd.c line 41
- in /usr/src/local/mtools/devices.c line 56
- in /usr/src/local/zmodem/genie.c line 14
- in /usr/src/local/zmodem/rbsb.c line 118
- in /usr/src/new/jove/fp.c line 20
- in /usr/src/new/jove/io.c line 30
- in /usr/src/new/jove/jove.c line 38
- in /usr/src/new/jove/proc.c line 816
- in /usr/src/new/kermit5.188/ckufio.c line 327
- in /usr/src/new/kermit5.188/ckutio.c line 418
- in /usr/src/new/nntp/server/common.h line 43
- in /usr/src/new/nntp/xmit/nntpxmit.c line 75
- in /usr/src/new/nntp/xmit/shlock.c line 24
- in /usr/src/new/rn/common.h line 42
- in /usr/src/sbin/quotacheck/quotacheck.c line 55
- in /usr/src/sbin/slattach/slattach.c line 11
- in /usr/src/sys/h/file.h line 9
- in /usr/src/sys/pdpstand/makesimtape.c line 14
- in /usr/src/sys/sys/init_main.c line 21
- in /usr/src/ucb/ftp/ftp.c line 38
- in /usr/src/ucb/window/wwinit.c line 14
- in /usr/src/ucb/window/wwrint.c line 12
- in /usr/src/ucb/window/wwtty.c line 12
- in /usr/src/usr.bin/find/find.c line 6
- in /usr/src/usr.bin/mkerrlst/mkerrlst.c line 30
- in /usr/src/usr.bin/ranlib/build.c line 44
- in /usr/src/usr.bin/ranlib/touch.c line 44
- in /usr/src/usr.bin/uucp/conn.c line 12
- in /usr/src/usr.bin/uucp/logent.c line 12
- in /usr/src/usr.bin/uucp/mailst.c line 8
- in /usr/src/usr.bin/uucp/uucpd.c line 224
- in /usr/src/usr.bin/xinstall/xinstall.c line 48
- in /usr/src/usr.lib/libident/id_open.c line 14
- in /usr/src/usr.sbin/cron/compat.c line 29
- in /usr/src/usr.sbin/cron/crontab.c line 29
- in /usr/src/usr.sbin/cron/database.c line 27
- in /usr/src/usr.sbin/cron/misc.c line 33
- in /usr/src/usr.sbin/dev_mkdb/dev_mkdb.c line 45
- in /usr/src/usr.sbin/inetd/inetd.c line 103
- in /usr/src/usr.sbin/named/named/ns_main.c line 27

Last modified: 1994-11-30 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 1627 |