source: vendor/emx/current/include/sys/fcntl.h

Last change on this file was 18, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 1.6 KB
Line 
1/* sys/fcntl.h (emx+gcc) */
2
3#ifndef _SYS_FCNTL_H
4#define _SYS_FCNTL_H
5
6#if defined (__cplusplus)
7extern "C" {
8#endif
9
10/* Don't forget to update /emx/src/dos/termio.inc when changing this! */
11
12#if !defined (O_RDONLY)
13#define O_ACCMODE 0x03 /* mask */
14#define O_RDONLY 0x00
15#define O_WRONLY 0x01
16#define O_RDWR 0x02
17#define O_NONBLOCK 0x04
18#define O_APPEND 0x08
19#define O_TEXT 0x10
20
21#define O_BINARY 0x0100
22#define O_CREAT 0x0200
23#define O_TRUNC 0x0400
24#define O_EXCL 0x0800
25#define O_SYNC 0x2000
26#define O_NOCTTY 0x4000
27#define O_SIZE 0x8000
28
29#if !defined (_POSIX_SOURCE)
30#define O_NDELAY O_NONBLOCK
31#define O_NOINHERIT 0x1000
32#endif
33
34#endif
35
36#if !defined (F_OK)
37#define F_OK 0
38#define X_OK 1
39#define W_OK 2
40#define R_OK 4
41#endif
42
43#if !defined (F_GETFL)
44#define F_GETFL 1
45#define F_SETFL 2
46#define F_GETFD 3
47#define F_SETFD 4
48#define F_DUPFD 5
49#define F_GETOSFD 6 /* RSXNT */
50#endif
51
52#if !defined (FD_CLOEXEC)
53#define FD_CLOEXEC 0x01
54#endif
55
56int creat (__const__ char *, int);
57int fcntl (int, int, ...);
58int open (__const__ char *, int, ...);
59
60#if !defined (_POSIX_SOURCE)
61
62#if !defined (LOCK_SH)
63#define LOCK_SH 0x01
64#define LOCK_EX 0x02
65#define LOCK_NB 0x04
66#define LOCK_UN 0x08
67#endif
68
69int flock (int, int);
70
71#endif
72
73
74#if !defined (_POSIX_SOURCE) || defined (_WITH_UNDERSCORE)
75
76int _creat (__const__ char *, int);
77int _fcntl (int, int, ...);
78int _flock (int, int);
79int _open (__const__ char *, int, ...);
80
81#endif
82
83
84#if defined (__cplusplus)
85}
86#endif
87
88#endif /* not _SYS_FCNTL_H */
Note: See TracBrowser for help on using the repository browser.