blob: ff20f6d14679d63d318813ac40cea753e4ce5b30 [file] [log] [blame] [raw]
/* A part of the Native C Library for Windows NT
Copyright 2007-2015 PC GO Ld.
Copyright 2016-2026 Rivoreo
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
*/
/* Based on MinGW fcntl.h from mingw-runtime package */
#ifndef _FCNTL_H
#define _FCNTL_H
/* All the headers include this file. */
#include <_mingw.h>
/* Specifiy one of these flags to define the access mode. */
#define O_RDONLY 0
#define O_WRONLY 1
#define O_RDWR 2
/* Mask for access mode bits in the _open flags. */
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
#define O_NONBLOCK 0x0004
#define O_APPEND 0x0008 /* Writes will add to the end of the file. */
#define O_RANDOM 0x0010
#define O_SEQUENTIAL 0x0020
#define O_TEMPORARY 0x0040 /* Make the file dissappear after closing.
* WARNING: Even if not created by _open! */
#define O_NOINHERIT 0x0080
#define O_CREAT 0x0100 /* Create the file if it does not exist. */
#define O_TRUNC 0x0200 /* Truncate the file if it does exist. */
#define O_EXCL 0x0400 /* Open only if the file does not exist. */
#define O_ASYNC 0x2000
#define O_SYNC 0x1000 /* Write through */
#define O_DIRECT 0x4000 /* No caching */
#define O_NOCTTY 0x8000 /* Ignored */
#define O_DIRECTORY 0x10000 /* Open directory only */
#define O_NOFOLLOW 0x20000 /* Don't follow symbolic link */
#define O_EXEC 0x40000 /* Open for execute only */
#define AT_FDCWD -100
#define AT_SYMLINK_NOFOLLOW 0x200
#define AT_SYMLINK_FOLLOW 0x400
#define AT_REMOVEDIR 0x800
#ifdef __cplusplus
extern "C" {
#endif
int __cdecl __MINGW_NOTHROW open(const char *, int, ...);
int __cdecl __MINGW_NOTHROW openat(int, const char *, int, ...);
#ifdef __cplusplus
}
#endif
#endif