162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef _ALPHA_FCNTL_H 362306a36Sopenharmony_ci#define _ALPHA_FCNTL_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#define O_CREAT 01000 /* not fcntl */ 662306a36Sopenharmony_ci#define O_TRUNC 02000 /* not fcntl */ 762306a36Sopenharmony_ci#define O_EXCL 04000 /* not fcntl */ 862306a36Sopenharmony_ci#define O_NOCTTY 010000 /* not fcntl */ 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#define O_NONBLOCK 00004 1162306a36Sopenharmony_ci#define O_APPEND 00010 1262306a36Sopenharmony_ci#define O_DSYNC 040000 /* used to be O_SYNC, see below */ 1362306a36Sopenharmony_ci#define O_DIRECTORY 0100000 /* must be a directory */ 1462306a36Sopenharmony_ci#define O_NOFOLLOW 0200000 /* don't follow links */ 1562306a36Sopenharmony_ci#define O_LARGEFILE 0400000 /* will be set by the kernel on every open */ 1662306a36Sopenharmony_ci#define O_DIRECT 02000000 /* direct disk access - should check with OSF/1 */ 1762306a36Sopenharmony_ci#define O_NOATIME 04000000 1862306a36Sopenharmony_ci#define O_CLOEXEC 010000000 /* set close_on_exec */ 1962306a36Sopenharmony_ci/* 2062306a36Sopenharmony_ci * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using 2162306a36Sopenharmony_ci * the O_SYNC flag. We continue to use the existing numerical value 2262306a36Sopenharmony_ci * for O_DSYNC semantics now, but using the correct symbolic name for it. 2362306a36Sopenharmony_ci * This new value is used to request true Posix O_SYNC semantics. It is 2462306a36Sopenharmony_ci * defined in this strange way to make sure applications compiled against 2562306a36Sopenharmony_ci * new headers get at least O_DSYNC semantics on older kernels. 2662306a36Sopenharmony_ci * 2762306a36Sopenharmony_ci * This has the nice side-effect that we can simply test for O_DSYNC 2862306a36Sopenharmony_ci * wherever we do not care if O_DSYNC or O_SYNC is used. 2962306a36Sopenharmony_ci * 3062306a36Sopenharmony_ci * Note: __O_SYNC must never be used directly. 3162306a36Sopenharmony_ci */ 3262306a36Sopenharmony_ci#define __O_SYNC 020000000 3362306a36Sopenharmony_ci#define O_SYNC (__O_SYNC|O_DSYNC) 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci#define O_PATH 040000000 3662306a36Sopenharmony_ci#define __O_TMPFILE 0100000000 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci#define F_GETLK 7 3962306a36Sopenharmony_ci#define F_SETLK 8 4062306a36Sopenharmony_ci#define F_SETLKW 9 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci#define F_SETOWN 5 /* for sockets. */ 4362306a36Sopenharmony_ci#define F_GETOWN 6 /* for sockets. */ 4462306a36Sopenharmony_ci#define F_SETSIG 10 /* for sockets. */ 4562306a36Sopenharmony_ci#define F_GETSIG 11 /* for sockets. */ 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci/* for posix fcntl() and lockf() */ 4862306a36Sopenharmony_ci#define F_RDLCK 1 4962306a36Sopenharmony_ci#define F_WRLCK 2 5062306a36Sopenharmony_ci#define F_UNLCK 8 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci/* for old implementation of bsd flock () */ 5362306a36Sopenharmony_ci#define F_EXLCK 16 /* or 3 */ 5462306a36Sopenharmony_ci#define F_SHLCK 32 /* or 4 */ 5562306a36Sopenharmony_ci 5662306a36Sopenharmony_ci#include <asm-generic/fcntl.h> 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci#endif 59