paul@181 | 1 | /* |
paul@181 | 2 | * File control definitions. |
paul@181 | 3 | * |
paul@328 | 4 | * Copyright (C) 2019, 2020, 2022 Paul Boddie <paul@boddie.org.uk> |
paul@181 | 5 | * |
paul@181 | 6 | * This program is free software; you can redistribute it and/or |
paul@181 | 7 | * modify it under the terms of the GNU General Public License as |
paul@181 | 8 | * published by the Free Software Foundation; either version 2 of |
paul@181 | 9 | * the License, or (at your option) any later version. |
paul@181 | 10 | * |
paul@181 | 11 | * This program is distributed in the hope that it will be useful, |
paul@181 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@181 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@181 | 14 | * GNU General Public License for more details. |
paul@181 | 15 | * |
paul@181 | 16 | * You should have received a copy of the GNU General Public License |
paul@181 | 17 | * along with this program; if not, write to the Free Software |
paul@181 | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
paul@181 | 19 | * Boston, MA 02110-1301, USA |
paul@181 | 20 | */ |
paul@181 | 21 | |
paul@181 | 22 | #pragma once |
paul@181 | 23 | |
paul@181 | 24 | #include <l4/sys/compiler.h> |
paul@181 | 25 | |
paul@181 | 26 | EXTERN_C_BEGIN |
paul@181 | 27 | |
paul@181 | 28 | /* Employ definitions compatible with fcntl-linux.h which can be different from |
paul@181 | 29 | fcntl.h on MIPS and from Newlib. */ |
paul@181 | 30 | |
paul@181 | 31 | #define O_RDONLY 0 |
paul@181 | 32 | #define O_WRONLY 1 |
paul@181 | 33 | #define O_RDWR 2 |
paul@181 | 34 | #define O_APPEND 0x0008 |
paul@181 | 35 | #define O_CREAT 0x0200 |
paul@181 | 36 | #define O_TRUNC 0x0400 |
paul@181 | 37 | #define O_EXCL 0x0800 |
paul@181 | 38 | #define O_NBIO 0x1000 |
paul@181 | 39 | #define O_SYNC 0x2000 |
paul@181 | 40 | #define O_NONBLOCK 0x4000 |
paul@181 | 41 | #define O_NDELAY O_NONBLOCK |
paul@181 | 42 | #define O_NOCTTY 0x8000 |
paul@181 | 43 | #define O_DIRECTORY 0x200000 |
paul@181 | 44 | |
paul@181 | 45 | /* System-level functions. */ |
paul@181 | 46 | |
paul@181 | 47 | int open(const char *pathname, int flags, ... /* mode_t mode */); |
paul@181 | 48 | |
paul@181 | 49 | EXTERN_C_END |
paul@328 | 50 | |
paul@328 | 51 | /* vim: tabstop=2 expandtab shiftwidth=2 |
paul@328 | 52 | */ |