1 /* 2 * Copyright (c) 2006-2021, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2021-09-02 Meco Man First version 9 */ 10 11 #ifndef __FCNTL_H__ 12 #define __FCNTL_H__ 13 14 #include_next <fcntl.h> 15 16 #define O_CREAT 0100 17 #define O_EXCL 0200 18 #define O_NOCTTY 0400 19 #define O_TRUNC 01000 20 #define O_APPEND 02000 21 #define O_NONBLOCK 04000 22 #define O_DSYNC 010000 23 #define O_SYNC 04010000 24 #define O_RSYNC 04010000 25 #define O_CLOEXEC 02000000 26 27 #define O_ASYNC 020000 28 #define O_NOATIME 01000000 29 #define O_PATH 010000000 30 #define O_NDELAY O_NONBLOCK 31 32 #ifndef O_LARGEFILE 33 #define O_LARGEFILE 0400000 34 #endif 35 36 #ifndef O_DIRECT 37 #define O_DIRECT 0200000 38 #endif 39 40 #ifndef O_TMPFILE 41 #define O_TMPFILE 020040000 42 #endif 43 44 #ifndef O_NOFOLLOW 45 #define O_NOFOLLOW 0100000 46 #endif 47 48 #ifndef O_DIRECTORY 49 #define O_DIRECTORY 040000 50 #endif 51 52 #ifndef O_BINARY 53 #define O_BINARY 00 54 #endif 55 56 #ifndef O_SEARCH 57 #define O_SEARCH O_PATH 58 #endif /* O_SEARCH */ 59 60 #ifndef O_EXEC 61 #define O_EXEC O_PATH 62 #endif /* O_EXEC */ 63 64 #endif 65