Deleted Added
full compact
fcntl.h (59496) fcntl.h (77115)
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.

--- 22 unchanged lines hidden (view full) ---

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 (Berkeley) 1/21/94
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.

--- 22 unchanged lines hidden (view full) ---

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 (Berkeley) 1/21/94
39 * $FreeBSD: head/sys/sys/fcntl.h 59496 2000-04-22 15:22:31Z wollman $
39 * $FreeBSD: head/sys/sys/fcntl.h 77115 2001-05-24 07:22:27Z dillon $
40 */
41
42#ifndef _SYS_FCNTL_H_
43#define _SYS_FCNTL_H_
44
45/*
46 * This file includes the definitions for open and fcntl
47 * described by POSIX for <fcntl.h>; it also includes

--- 45 unchanged lines hidden (view full) ---

93#define FMARK 0x1000 /* mark during gc() */
94#define FDEFER 0x2000 /* defer for next gc pass */
95#define FHASLOCK 0x4000 /* descriptor holds advisory lock */
96#endif
97
98/* Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY. */
99#define O_NOCTTY 0x8000 /* don't assign controlling terminal */
100
40 */
41
42#ifndef _SYS_FCNTL_H_
43#define _SYS_FCNTL_H_
44
45/*
46 * This file includes the definitions for open and fcntl
47 * described by POSIX for <fcntl.h>; it also includes

--- 45 unchanged lines hidden (view full) ---

93#define FMARK 0x1000 /* mark during gc() */
94#define FDEFER 0x2000 /* defer for next gc pass */
95#define FHASLOCK 0x4000 /* descriptor holds advisory lock */
96#endif
97
98/* Defined by POSIX 1003.1; BSD default, but must be distinct from O_RDONLY. */
99#define O_NOCTTY 0x8000 /* don't assign controlling terminal */
100
101/* Attempt to bypass buffer cache */
102#define O_DIRECT 0x00010000
103
101#ifdef _KERNEL
102/* convert from open() flags to/from fflags; convert O_RD/WR to FREAD/FWRITE */
103#define FFLAGS(oflags) ((oflags) + 1)
104#define OFLAGS(fflags) ((fflags) - 1)
105
106/* bits to save after open */
104#ifdef _KERNEL
105/* convert from open() flags to/from fflags; convert O_RD/WR to FREAD/FWRITE */
106#define FFLAGS(oflags) ((oflags) + 1)
107#define OFLAGS(fflags) ((fflags) - 1)
108
109/* bits to save after open */
107#define FMASK (FREAD|FWRITE|FAPPEND|FASYNC|FFSYNC|FNONBLOCK)
110#define FMASK (FREAD|FWRITE|FAPPEND|FASYNC|FFSYNC|FNONBLOCK|O_DIRECT)
108/* bits settable by fcntl(F_SETFL, ...) */
111/* bits settable by fcntl(F_SETFL, ...) */
109#define FCNTLFLAGS (FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FPOSIXSHM)
112#define FCNTLFLAGS (FAPPEND|FASYNC|FFSYNC|FNONBLOCK|FPOSIXSHM|O_DIRECT)
110#endif
111
112/*
113 * The O_* flags used to have only F* names, which were used in the kernel
114 * and by fcntl. We retain the F* names for the kernel f_flag field
115 * and for backward compatibility for fcntl.
116 */
117#ifndef _POSIX_SOURCE

--- 91 unchanged lines hidden ---
113#endif
114
115/*
116 * The O_* flags used to have only F* names, which were used in the kernel
117 * and by fcntl. We retain the F* names for the kernel f_flag field
118 * and for backward compatibility for fcntl.
119 */
120#ifndef _POSIX_SOURCE

--- 91 unchanged lines hidden ---