|
|
1.1 ! root 1: /* (-lgl ! 2: * COHERENT Version 4.0 ! 3: * Copyright (c) 1982, 1993 by Mark Williams Company. ! 4: * All rights reserved. May not be copied without permission. ! 5: -lgl) */ ! 6: /* ! 7: * /usr/include/fcntl.h ! 8: * Cf. Intel iBCS2, pp. 6-35, 6-36. ! 9: */ ! 10: ! 11: #ifndef __FCNTL_H__ ! 12: #define __FCNTL_H__ ! 13: ! 14: /* ! 15: * Flag values accessible to open() and fcntl() ! 16: * The first three can only be set by open(). ! 17: */ ! 18: #define O_RDONLY 0x00 ! 19: #define O_WRONLY 0x01 ! 20: #define O_RDWR 0x02 ! 21: #define O_NDELAY 0x04 /* non-blocking i/o */ ! 22: #define O_APPEND 0x08 /* append (writes guaranteed at the end */ ! 23: ! 24: #ifdef _I386 ! 25: #define O_SYNC 0x10 /* sync on every write */ ! 26: #define O_NONBLOCK 0x80 /* non-blocking i/o */ ! 27: ! 28: /* Flag values accessible only to 3 argument open(). */ ! 29: #define O_CREAT 0x100 /* open with file create (third open arg) */ ! 30: #define O_TRUNC 0x200 /* open with truncation */ ! 31: #define O_EXCL 0x400 /* exclusive open */ ! 32: #define O_NOCTTY 0x800 /* don't assign a controlling tty */ ! 33: ! 34: #endif /* _I386 */ ! 35: ! 36: /* fcntl() requests. */ ! 37: #define F_DUPFD 0 /* duplicate file desriptor */ ! 38: #define F_GETFD 1 /* get file descriptor flags */ ! 39: #define F_SETFD 2 /* set file descriptor flags */ ! 40: #define F_GETFL 3 /* get file flags */ ! 41: #define F_SETFL 4 /* set file flags */ ! 42: #define F_GETLK 5 /* return blocking lock */ ! 43: #define F_SETLK 6 /* set or remove lock, return if blocked */ ! 44: #define F_SETLKW 7 /* set or remove lock, sleep if blocked */ ! 45: ! 46: #endif ! 47: ! 48: /* Locking command/return structure. */ ! 49: typedef struct flock { ! 50: short l_type; /* F_RDLCK, F_WRLCK, or F_UNLCK */ ! 51: short l_whence; /* SEEK_SET, SEEK_CUR, SEEK_END */ ! 52: long l_start; /* location */ ! 53: long l_len; /* 0 is through EOF */ ! 54: short l_sysid; /* system id of lock (for GETLK) ? */ ! 55: short l_pid; /* process id of owner (for GETLK) */ ! 56: } FLOCK; ! 57: ! 58: /* lock() command types. */ ! 59: #define F_RDLCK 1 /* read lock; more than 1 allowed */ ! 60: #define F_WRLCK 2 /* write lock; blocks any lock */ ! 61: #define F_UNLCK 3 /* unlock */ ! 62: ! 63: /* Close on exec bit for struct fd member f_flags2. */ ! 64: #define FD_CLOEXEC 1 /* close fd on exec */ ! 65: ! 66: /* end of fcntl.h */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.