First try in keyboard driver
[incOS.git] / programs / include / fcntl.h
blob4a6e2bbac7247c8802b5cffcd4eb204cec46c8fa
1 /*
2 Copyright (C) 2008 Mathias Gottschlag
4 Permission is hereby granted, free of charge, to any person obtaining a copy of
5 this software and associated documentation files (the "Software"), to deal in the
6 Software without restriction, including without limitation the rights to use,
7 copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
8 Software, and to permit persons to whom the Software is furnished to do so,
9 subject to the following conditions:
11 The above copyright notice and this permission notice shall be included in all
12 copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
16 PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
17 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 #ifndef FCNTL_H_INCLUDED
23 #define FCNTL_H_INCLUDED
25 #include <unistd.h>
27 #define O_CREAT 0x1
28 #define O_EXCL 0x2
29 #define O_NOCTTY 0x4
30 #define O_TRUNC 0x8
31 #define O_APPEND 0x10
32 #define O_DSYNC 0x20
33 #define O_NONBLOCK 0x40
34 #define O_RSYNC 0x80
35 #define O_SYNC 0x100
37 #define O_ACCMODE 0xE00
38 #define O_RDONLY 0x200
39 #define O_RDWR 0x400
40 #define O_WRONLY 0x800
42 int creat(const char *path, mode_t mode);
43 int fcntl(int fd, int cmd, ...);
44 int open(const char *path, int oflag, ...);
46 #endif