|
|
|
1 |
|
/*** |
2 |
|
*fcntl.h - file control options used by open() |
3 |
|
* |
4 |
|
* Copyright (c) Microsoft Corporation. All rights reserved. |
5 |
|
* |
6 |
|
*Purpose: |
7 |
|
* This file defines constants for the file control options used |
8 |
|
* by the _open() function. |
9 |
|
* [System V] |
10 |
|
* |
11 |
|
* [Public] |
12 |
|
* |
13 |
|
****/ |
14 |
|
|
15 |
|
#if _MSC_VER > 1000 |
16 |
|
#pragma once |
17 |
|
#endif |
18 |
|
|
19 |
|
#include <crtdefs.h> |
20 |
|
|
21 |
|
#ifndef _INC_FCNTL |
22 |
|
#define _INC_FCNTL |
23 |
|
|
24 |
|
|
25 |
|
#define _O_RDONLY 0x0000 /* open for reading only */ |
26 |
|
#define _O_WRONLY 0x0001 /* open for writing only */ |
27 |
|
#define _O_RDWR 0x0002 /* open for reading and writing */ |
28 |
|
#define _O_APPEND 0x0008 /* writes done at eof */ |
29 |
|
|
30 |
|
#define _O_CREAT 0x0100 /* create and open file */ |
31 |
|
#define _O_TRUNC 0x0200 /* open and truncate */ |
32 |
|
#define _O_EXCL 0x0400 /* open only if file doesn't already exist */ |
33 |
|
|
34 |
|
/* O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s, |
35 |
|
** and <lf> sequences translated to <cr><lf> on write()'s |
36 |
|
*/ |
37 |
|
|
38 |
|
#define _O_TEXT 0x4000 /* file mode is text (translated) */ |
49 |
|
|
50 |
|
#define _O_NOINHERIT 0x0080 /* child process doesn't inherit file */ |
51 |
|
|
52 |
|
/* Temporary file bit - file is deleted when last handle is closed */ |
53 |
|
|
54 |
|
#define _O_TEMPORARY 0x0040 /* temporary file bit */ |
55 |
|
|
56 |
|
/* temporary access hint */ |
57 |
|
|
58 |
|
#define _O_SHORT_LIVED 0x1000 /* temporary storage file, try not to flush */ |
59 |
|
|
60 |
|
/* sequential/random access hints */ |
61 |
|
|
62 |
|
#define _O_SEQUENTIAL 0x0020 /* file access is primarily sequential */ |
63 |
|
#define _O_RANDOM 0x0010 /* file access is primarily random */ |
64 |
|
|
65 |
|
#if !__STDC__ || defined(_POSIX_) |
66 |
|
/* Non-ANSI names for compatibility */ |
67 |
|
#define O_RDONLY _O_RDONLY |
68 |
|
#define O_WRONLY _O_WRONLY |
69 |
|
#define O_RDWR _O_RDWR |
70 |
|
#define O_APPEND _O_APPEND |
71 |
|
#define O_CREAT _O_CREAT |
72 |
|
#define O_TRUNC _O_TRUNC |
73 |
|
#define O_EXCL _O_EXCL |
74 |
|
#define O_TEXT _O_TEXT |
75 |
|
#define O_BINARY _O_BINARY |
76 |
|
#define O_RAW _O_BINARY |
77 |
|
#define O_TEMPORARY _O_TEMPORARY |
78 |
|
#define O_NOINHERIT _O_NOINHERIT |
79 |
|
#define O_SEQUENTIAL _O_SEQUENTIAL |
80 |
|
#define O_RANDOM _O_RANDOM |
81 |
|
#endif /* __STDC__ */ |
82 |
|
|
83 |
|
#endif /* _INC_FCNTL */ |
84 |
|
|
|
|
|