FreeNOS
fcntl.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2009 Niek Linnenbank
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will 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, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef __LIBPOSIX_FCNTL_H
19#define __LIBPOSIX_FCNTL_H
20
21#include <Macros.h>
22#include <stdio.h>
23#include "sys/types.h"
24
39#define O_CREAT (1 << 0)
40
42#define O_EXCL (1 << 1)
43
45#define O_NOCTTY (1 << 2)
46
48#define O_TRUNC (1 << 3)
49
54#define O_TTY_INIT (1 << 4)
55
57#define O_APPEND (1 << 5)
58
60#define O_DSYNC (1 << 6)
61
63#define O_NONBLOCK (1 << 7)
64
66#define O_RSYNC (1 << 8)
67
69#define O_SYNC (1 << 9)
70
72#define O_ACCMODE (O_EXEC | O_RDONLY | O_RDWR | O_SEARCH | O_WRONLY)
73
78#define O_EXEC (1 << 10)
79
81#define O_RDONLY (1 << 11)
82
84#define O_RDWR (1 << 12)
85
90#define O_SEARCH (1 << 13)
91
93#define O_WRONLY (1 << 14)
94
111extern C int open(const char *path, int oflag, ...);
112
118#endif /* __LIBPOSIX_UNISTD_H */
C int open(const char *path, int oflag,...)
Open file relative to directory file descriptor.
Definition open.cpp:26
#define C
Used to define external C functions.
Definition Macros.h:134