llvm-mos-sdk
common
include
fcntl.h
Go to the documentation of this file.
1
// Copyright 2024 LLVM-MOS Project
2
// Licensed under the Apache License, Version 2.0 with LLVM Exceptions.
3
// See https://github.com/llvm-mos/llvm-mos-sdk/blob/main/LICENSE for license
4
// information.
5
6
/*****************************************************************************/
7
/* */
8
/* fcntl.h */
9
/* */
10
/* File control operations */
11
/* */
12
/* */
13
/* */
14
/* (C) 1998-2004 Ullrich von Bassewitz */
15
/* Roemerstrasse 52 */
16
/* D-70794 Filderstadt */
17
/* EMail: uz@cc65.org */
18
/* */
19
/* */
20
/* This software is provided 'as-is', without any expressed or implied */
21
/* warranty. In no event will the authors be held liable for any damages */
22
/* arising from the use of this software. */
23
/* */
24
/* Permission is granted to anyone to use this software for any purpose, */
25
/* including commercial applications, and to alter it and redistribute it */
26
/* freely, subject to the following restrictions: */
27
/* */
28
/* 1. The origin of this software must not be misrepresented; you must not */
29
/* claim that you wrote the original software. If you use this software */
30
/* in a product, an acknowledgment in the product documentation would be */
31
/* appreciated but is not required. */
32
/* 2. Altered source versions must be plainly marked as such, and must not */
33
/* be misrepresented as being the original software. */
34
/* 3. This notice may not be removed or altered from any source */
35
/* distribution. */
36
/* */
37
/*****************************************************************************/
38
39
#ifndef _FCNTL_H
40
#define _FCNTL_H
41
42
/*****************************************************************************/
43
/* Data */
44
/*****************************************************************************/
45
46
/* Flag values for the open() call */
47
#define O_RDONLY 0x01
48
#define O_WRONLY 0x02
49
#define O_RDWR 0x03
50
#define O_CREAT 0x10
51
#define O_TRUNC 0x20
52
#define O_APPEND 0x40
53
#define O_EXCL 0x80
54
55
/*****************************************************************************/
56
/* Code */
57
/*****************************************************************************/
58
59
/* Functions */
60
int
open
(
const
char
*name,
int
flags, ...);
/* May take a mode argument */
61
int
close
(
int
fd);
62
int
creat
(
const
char
*name,
unsigned
mode
);
63
64
/* End of fcntl.h */
65
#endif
close
int close(int fd)
creat
int creat(const char *name, unsigned mode)
mode
const void uint16_t uint8_t mode
Definition:
memory.h:58
open
int open(const char *name, int flags,...)
Generated by
1.8.17