1 /*
2  * Copyright (c) 2018 Linaro Limited
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_POSIX_FCNTL_H_
8 #define ZEPHYR_POSIX_FCNTL_H_
9 
10 #include <zephyr/sys/fdtable.h>
11 
12 #define O_APPEND   ZVFS_O_APPEND
13 #define O_CREAT    ZVFS_O_CREAT
14 #define O_EXCL     ZVFS_O_EXCL
15 #define O_NONBLOCK ZVFS_O_NONBLOCK
16 #define O_TRUNC    ZVFS_O_TRUNC
17 
18 #define O_ACCMODE (ZVFS_O_RDONLY | ZVFS_O_RDWR | ZVFS_O_WRONLY)
19 
20 #define O_RDONLY ZVFS_O_RDONLY
21 #define O_RDWR   ZVFS_O_RDWR
22 #define O_WRONLY ZVFS_O_WRONLY
23 
24 #define F_DUPFD ZVFS_F_DUPFD
25 #define F_GETFL ZVFS_F_GETFL
26 #define F_SETFL ZVFS_F_SETFL
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 int open(const char *name, int flags, ...);
33 int fcntl(int fildes, int cmd, ...);
34 
35 #ifdef __cplusplus
36 }
37 #endif
38 
39 #endif /* ZEPHYR_POSIX_FCNTL_H_ */
40