fxlibc/include/fcntl.h

37 lines
825 B
C
Raw Normal View History

2021-05-09 23:00:11 +02:00
#ifndef __FCNTL_H__
# define __FCNTL_H__
2020-09-17 19:27:01 +02:00
2021-06-28 15:49:05 +02:00
#ifdef __cplusplus
extern "C" {
#endif
#include <stdio.h>
2020-09-17 19:27:01 +02:00
#include <stdint.h>
#include <sys/types.h>
2020-09-17 19:27:01 +02:00
/* Access mode. */
#define O_RDONLY 0x0000
#define O_WRONLY 0x0001
#define O_RDWR 0x0002
/* Create file if nonexistent. */
#define O_CREAT 0x0004
/* Fail if not a directory. */
#define O_DIRECTORY 0x0008
/* Append and truncate modes. */
#define O_APPEND 0x0010
#define O_TRUNC 0x0020
/* Exclusive open requiring creation. */
#define O_EXCL 0x0040
2020-09-17 19:27:01 +02:00
/* Create, truncate and open a file. */
extern int creat(char const *__path, mode_t __mode);
/* Open file and return a file descriptor, -1 on error. */
extern int open(char const *__path, int __flags, ... /* mode_t __mode */);
2020-09-17 19:27:01 +02:00
2021-06-28 15:49:05 +02:00
#ifdef __cplusplus
}
#endif
2021-05-09 23:00:11 +02:00
#endif /*__FCNTL_H__*/