1 /* 2 * Copyright (c) 2014 Cyril Hrubis <chrubis@suse.cz> 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of 7 * the License, or (at your option) any later version. 8 * 9 * This program is distributed in the hope that it would be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write the Free Software Foundation, 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19 #ifndef __LAPI_FCNTL_H__ 20 #define __LAPI_FCNTL_H__ 21 22 #ifndef O_CLOEXEC 23 # define O_CLOEXEC 02000000 24 #endif 25 26 #ifndef O_TMPFILE 27 # define O_TMPFILE (020000000 | O_DIRECTORY) 28 #endif 29 30 #ifndef F_DUPFD_CLOEXEC 31 # define F_DUPFD_CLOEXEC 1030 32 #endif 33 34 #ifndef F_SETPIPE_SZ 35 # define F_SETPIPE_SZ 1031 36 #endif 37 38 #ifndef F_GETPIPE_SZ 39 # define F_GETPIPE_SZ 1032 40 #endif 41 42 #ifndef F_OWNER_PGRP 43 # define F_OWNER_PGRP 2 44 #endif 45 46 #ifndef F_OFD_GETLK 47 # define F_OFD_GETLK 36 48 #endif 49 50 #ifndef F_OFD_SETLK 51 # define F_OFD_SETLK 37 52 #endif 53 54 #ifndef F_OFD_SETLKW 55 # define F_OFD_SETLKW 38 56 #endif 57 58 #ifndef AT_FDCWD 59 # define AT_FDCWD -100 60 #endif 61 62 #ifndef AT_SYMLINK_FOLLOW 63 # define AT_SYMLINK_FOLLOW 0x400 64 #endif 65 66 #ifndef AT_SYMLINK_NOFOLLOW 67 # define AT_SYMLINK_NOFOLLOW 0x100 68 #endif 69 70 #ifndef AT_REMOVEDIR 71 # define AT_REMOVEDIR 0x200 72 #endif 73 74 #ifndef O_NOATIME 75 # define O_NOATIME 01000000 76 #endif 77 78 #ifndef O_PATH 79 # ifdef __sparc__ 80 # define O_PATH 0x1000000 81 # else 82 # define O_PATH 010000000 83 # endif 84 #endif 85 86 #ifndef FALLOC_FL_KEEP_SIZE 87 # define FALLOC_FL_KEEP_SIZE 1 88 #endif 89 90 #ifndef RENAME_NOREPLACE 91 # define RENAME_NOREPLACE (1 << 0) 92 #endif 93 94 #ifndef RENAME_EXCHANGE 95 # define RENAME_EXCHANGE (1 << 1) 96 #endif 97 98 #ifndef RENAME_WHITEOUT 99 # define RENAME_WHITEOUT (1 << 2) 100 #endif 101 102 /* splice, vmsplice, tee */ 103 104 #ifndef SPLICE_F_NONBLOCK 105 # define SPLICE_F_NONBLOCK 2 106 #endif 107 108 #endif /* __LAPI_FCNTL_H__ */ 109