mirror of
https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
synced 2024-12-28 20:43:38 +01:00
26cdf5f9d8
follow-up to 8231557ff5
42 lines
941 B
C
42 lines
941 B
C
#ifndef __FCNTL_H__
|
|
# define __FCNTL_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stdio.h>
|
|
#include <stdint.h>
|
|
#include <sys/types.h>
|
|
|
|
/* 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
|
|
|
|
/* 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 */);
|
|
|
|
#define F_DUPFD 0
|
|
#define F_GETFD 1
|
|
#define F_SETFD 2
|
|
|
|
extern int fcntl(int fd, int op, ...);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /*__FCNTL_H__*/
|