1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00
sortix--sortix/sortix/fcntl.h
Jonas 'Sortie' Termansen 5b916b5f63 Added F_SETFL and F_GETFL to fcntl(2).
This is a bit of a hacky implementation.
2012-03-11 20:29:00 +01:00

57 lines
1.4 KiB
C

/*******************************************************************************
COPYRIGHT(C) JONAS 'SORTIE' TERMANSEN 2012.
This file is part of Sortix.
Sortix 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 3 of the License, or (at your option) any later
version.
Sortix 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.
You should have received a copy of the GNU General Public License along with
Sortix. If not, see <http://www.gnu.org/licenses/>.
fcntl.h
Declares various constants related to opening files.
*******************************************************************************/
#ifndef SORTIX_FCNTL_H
#define SORTIX_FCNTL_H
#include <features.h>
__BEGIN_DECLS
#define O_RDONLY 1
#define O_WRONLY 2
#define O_RDWR 3
#define O_EXEC 4
#define O_SEARCH 5
#define O_LOWERFLAGS 0x7
#define O_APPEND (1<<3)
#define O_CLOEXEC (1<<4)
#define O_CREAT (1<<5)
#define O_DIRECTORY (1<<6)
#define O_EXCL (1<<7)
#define O_TRUNC (1<<8)
#define O_CLOFORK (1<<9)
#define FD_CLOEXEC (1<<0)
#define FD_CLOFORK (1<<1)
#define F_SETFD 0
#define F_GETFD 1
#define F_SETFL 2
#define F_GETFL 3
__END_DECLS
#endif