2022-10-10 20:45:26 +02:00
|
|
|
#ifndef _FCNTL_H
|
|
|
|
#define _FCNTL_H
|
|
|
|
|
2022-10-12 11:57:49 +02:00
|
|
|
/* Open for reading only. */
|
2022-10-10 20:45:26 +02:00
|
|
|
#define O_RDONLY 1
|
2022-10-12 11:57:49 +02:00
|
|
|
/* Open for writing only. */
|
2022-10-11 21:07:21 +02:00
|
|
|
#define O_WRONLY 2
|
2022-10-12 11:57:49 +02:00
|
|
|
/* Open for reading and writing. */
|
2022-10-11 21:07:21 +02:00
|
|
|
#define O_RDWR 3
|
2022-10-10 20:45:26 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2022-10-12 11:57:49 +02:00
|
|
|
/* Opens the file specified by pathname. Returns a file descriptor on success, or -1 on error. */
|
|
|
|
int open(const char* pathname, int flags);
|
2022-10-10 20:45:26 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|