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
|
|
|
|
|
2020-09-17 19:27:01 +02:00
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/* also defined in <stdio.h> */
|
2020-09-17 19:27:01 +02:00
|
|
|
#define SEEK_SET 0 /* Seek from beginning of file. */
|
|
|
|
#define SEEK_CUR 1 /* Seek from current position. */
|
|
|
|
#define SEEK_END 2 /* Seek from end of file. */
|
|
|
|
|
2020-10-14 11:45:08 +02:00
|
|
|
/*
|
|
|
|
** Open FILE and return a new file descriptor for it, or -1 on error.
|
|
|
|
** OFLAG determines the type of access used. If O_CREAT or O_TMPFILE is set
|
|
|
|
** in OFLAG, the third argument is taken as a `mode_t', the mode of the
|
|
|
|
** created file.
|
|
|
|
*/
|
2020-09-17 19:27:01 +02:00
|
|
|
extern int open(const char *pathname, int flags, ...);
|
|
|
|
|
2021-06-28 15:49:05 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2021-05-09 23:00:11 +02:00
|
|
|
#endif /*__FCNTL_H__*/
|