162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 262306a36Sopenharmony_ci#ifndef _SPARC_FCNTL_H 362306a36Sopenharmony_ci#define _SPARC_FCNTL_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#define O_APPEND 0x0008 662306a36Sopenharmony_ci#define FASYNC 0x0040 /* fcntl, for BSD compatibility */ 762306a36Sopenharmony_ci#define O_CREAT 0x0200 /* not fcntl */ 862306a36Sopenharmony_ci#define O_TRUNC 0x0400 /* not fcntl */ 962306a36Sopenharmony_ci#define O_EXCL 0x0800 /* not fcntl */ 1062306a36Sopenharmony_ci#define O_DSYNC 0x2000 /* used to be O_SYNC, see below */ 1162306a36Sopenharmony_ci#define O_NONBLOCK 0x4000 1262306a36Sopenharmony_ci#if defined(__sparc__) && defined(__arch64__) 1362306a36Sopenharmony_ci#define O_NDELAY 0x0004 1462306a36Sopenharmony_ci#else 1562306a36Sopenharmony_ci#define O_NDELAY (0x0004 | O_NONBLOCK) 1662306a36Sopenharmony_ci#endif 1762306a36Sopenharmony_ci#define O_NOCTTY 0x8000 /* not fcntl */ 1862306a36Sopenharmony_ci#define O_LARGEFILE 0x40000 1962306a36Sopenharmony_ci#define O_DIRECT 0x100000 /* direct disk access hint */ 2062306a36Sopenharmony_ci#define O_NOATIME 0x200000 2162306a36Sopenharmony_ci#define O_CLOEXEC 0x400000 2262306a36Sopenharmony_ci/* 2362306a36Sopenharmony_ci * Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using 2462306a36Sopenharmony_ci * the O_SYNC flag. We continue to use the existing numerical value 2562306a36Sopenharmony_ci * for O_DSYNC semantics now, but using the correct symbolic name for it. 2662306a36Sopenharmony_ci * This new value is used to request true Posix O_SYNC semantics. It is 2762306a36Sopenharmony_ci * defined in this strange way to make sure applications compiled against 2862306a36Sopenharmony_ci * new headers get at least O_DSYNC semantics on older kernels. 2962306a36Sopenharmony_ci * 3062306a36Sopenharmony_ci * This has the nice side-effect that we can simply test for O_DSYNC 3162306a36Sopenharmony_ci * wherever we do not care if O_DSYNC or O_SYNC is used. 3262306a36Sopenharmony_ci * 3362306a36Sopenharmony_ci * Note: __O_SYNC must never be used directly. 3462306a36Sopenharmony_ci */ 3562306a36Sopenharmony_ci#define __O_SYNC 0x800000 3662306a36Sopenharmony_ci#define O_SYNC (__O_SYNC|O_DSYNC) 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci#define O_PATH 0x1000000 3962306a36Sopenharmony_ci#define __O_TMPFILE 0x2000000 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ci#define F_GETOWN 5 /* for sockets. */ 4262306a36Sopenharmony_ci#define F_SETOWN 6 /* for sockets. */ 4362306a36Sopenharmony_ci#define F_GETLK 7 4462306a36Sopenharmony_ci#define F_SETLK 8 4562306a36Sopenharmony_ci#define F_SETLKW 9 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 3 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_ci#define __ARCH_FLOCK_PAD short __unused; 5362306a36Sopenharmony_ci#define __ARCH_FLOCK64_PAD short __unused; 5462306a36Sopenharmony_ci 5562306a36Sopenharmony_ci#include <asm-generic/fcntl.h> 5662306a36Sopenharmony_ci 5762306a36Sopenharmony_ci#endif 58