Commit | Line | Data |
---|---|---|
bb0cfa24 DF |
1 | /* |
2 | * Copyright (c) 1983 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | * | |
95f51977 | 6 | * @(#)fcntl.h 5.2 (Berkeley) 1/8/86 |
bb0cfa24 | 7 | */ |
c9d055bc SL |
8 | |
9 | /* | |
f5ce8337 JL |
10 | * Flag values accessible to open(2) and fcntl(2)-- copied from |
11 | * <sys/file.h>. (The first three can only be set by open.) | |
c9d055bc | 12 | */ |
f5ce8337 JL |
13 | #define O_RDONLY 000 /* open for reading */ |
14 | #define O_WRONLY 001 /* open for writing */ | |
15 | #define O_RDWR 002 /* open for read & write */ | |
16 | #define O_NDELAY FNDELAY /* non-blocking open */ | |
17 | /* really non-blocking I/O for fcntl */ | |
18 | #define O_APPEND FAPPEND /* append on each write */ | |
19 | #define O_CREAT FCREAT /* open with file create */ | |
20 | #define O_TRUNC FTRUNC /* open with truncation */ | |
21 | #define O_EXCL FEXCL /* error on create if file exists */ | |
c9d055bc | 22 | |
ccf9310d | 23 | #ifndef F_DUPFD |
c9d055bc SL |
24 | /* fcntl(2) requests */ |
25 | #define F_DUPFD 0 /* Duplicate fildes */ | |
26 | #define F_GETFD 1 /* Get fildes flags */ | |
27 | #define F_SETFD 2 /* Set fildes flags */ | |
28 | #define F_GETFL 3 /* Get file flags */ | |
29 | #define F_SETFL 4 /* Set file flags */ | |
30 | #define F_GETOWN 5 /* Get owner */ | |
31 | #define F_SETOWN 6 /* Set owner */ | |
ccf9310d MK |
32 | |
33 | /* flags for F_GETFL, F_SETFL-- copied from <sys/file.h> */ | |
34 | #define FNDELAY 00004 /* non-blocking reads */ | |
35 | #define FAPPEND 00010 /* append on each write */ | |
36 | #define FASYNC 00100 /* signal pgrp when data ready */ | |
f3ad33f5 KM |
37 | #define FCREAT 01000 /* create if nonexistant */ |
38 | #define FTRUNC 02000 /* truncate to zero length */ | |
39 | #define FEXCL 04000 /* error if already created */ | |
ccf9310d | 40 | #endif |