Navit SVN

/work/compile/navit/src/navit/support/libc/fcntl.h

00001 /*
00002  * fcntl.h
00003  * This file has no copyright assigned and is placed in the Public Domain.
00004  * This file is a part of the mingw-runtime package.
00005  * No warranty is given; refer to the file DISCLAIMER within the package.
00006  *
00007  * Access constants for _open. Note that the permissions constants are
00008  * in sys/stat.h (ick).
00009  *
00010  */
00011 #ifndef _FCNTL_H_
00012 #define _FCNTL_H_
00013 
00014 /* All the headers include this file. */
00015 #include <_mingw.h>
00016 
00017 /*
00018  * It appears that fcntl.h should include io.h for compatibility...
00019  */
00020 #include <io.h>
00021 
00022 /* Specifiy one of these flags to define the access mode. */
00023 #define _O_RDONLY       0
00024 #define _O_WRONLY       1
00025 #define _O_RDWR         2
00026 
00027 /* Mask for access mode bits in the _open flags. */
00028 #define _O_ACCMODE      (_O_RDONLY|_O_WRONLY|_O_RDWR)
00029 
00030 #define _O_APPEND       0x0008  /* Writes will add to the end of the file. */
00031 
00032 #define _O_RANDOM       0x0010
00033 #define _O_SEQUENTIAL   0x0020
00034 #define _O_TEMPORARY    0x0040  /* Make the file dissappear after closing.
00035                                  * WARNING: Even if not created by _open! */
00036 #define _O_NOINHERIT    0x0080
00037 
00038 #define _O_CREAT        0x0100  /* Create the file if it does not exist. */
00039 #define _O_TRUNC        0x0200  /* Truncate the file if it does exist. */
00040 #define _O_EXCL         0x0400  /* Open only if the file does not exist. */
00041 
00042 #define _O_SHORT_LIVED  0x1000
00043 
00044 /* NOTE: Text is the default even if the given _O_TEXT bit is not on. */
00045 #define _O_TEXT         0x4000  /* CR-LF in file becomes LF in memory. */
00046 #define _O_BINARY       0x8000  /* Input and output is not translated. */
00047 #define _O_RAW          _O_BINARY
00048 
00049 #if (__MSVCRT_VERSION__ >= 0x0800)
00050 #define _O_WTEXT        0x10000
00051 #define _O_U16TEXT      0x20000
00052 #define _O_U8TEXT       0x40000
00053 #endif
00054 
00055 #ifndef _NO_OLDNAMES
00056 
00057 /* POSIX/Non-ANSI names for increased portability */
00058 #define O_RDONLY        _O_RDONLY
00059 #define O_WRONLY        _O_WRONLY
00060 #define O_RDWR          _O_RDWR
00061 #define O_ACCMODE       _O_ACCMODE
00062 #define O_APPEND        _O_APPEND
00063 #define O_CREAT         _O_CREAT
00064 #define O_TRUNC         _O_TRUNC
00065 #define O_EXCL          _O_EXCL
00066 #define O_TEXT          _O_TEXT
00067 #define O_BINARY        _O_BINARY
00068 #define O_TEMPORARY     _O_TEMPORARY
00069 #define O_NOINHERIT     _O_NOINHERIT
00070 #define O_SEQUENTIAL    _O_SEQUENTIAL
00071 #define O_RANDOM        _O_RANDOM
00072 
00073 #endif  /* Not _NO_OLDNAMES */
00074 
00075 #endif  /* Not _FCNTL_H_ */