home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / programacao / cwin / c.exe / $INSTDIR / include / fcntl.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-12-15  |  2.4 KB  |  92 lines

  1. /*
  2.  * fcntl.h
  3.  *
  4.  * Access constants for _open. Note that the permissions constants are
  5.  * in sys/stat.h (ick).
  6.  *
  7.  * This code is part of the Mingw32 package.
  8.  *
  9.  * Contributors:
  10.  *  Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
  11.  *
  12.  *  THIS SOFTWARE IS NOT COPYRIGHTED
  13.  *
  14.  *  This source code is offered for use in the public domain. You may
  15.  *  use, modify or distribute it freely.
  16.  *
  17.  *  This code is distributed in the hope that it will be useful but
  18.  *  WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
  19.  *  DISCLAIMED. This includes but is not limited to warranties of
  20.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  21.  *
  22.  * $Revision: 1.6 $
  23.  * $Author: earnie $
  24.  * $Date: 2002/11/12 15:29:38 $
  25.  *
  26.  */
  27.  
  28. #ifndef __STRICT_ANSI__
  29.  
  30. #ifndef _FCNTL_H_
  31. #define _FCNTL_H_
  32.  
  33. /* All the headers include this file. */
  34. #include <_mingw.h>
  35.  
  36. /*
  37.  * It appears that fcntl.h should include io.h for compatibility...
  38.  */
  39. #include <io.h>
  40.  
  41. /* Specifiy one of these flags to define the access mode. */
  42. #define    _O_RDONLY    0
  43. #define _O_WRONLY    1
  44. #define _O_RDWR        2
  45.  
  46. /* Mask for access mode bits in the _open flags. */
  47. #define _O_ACCMODE    (_O_RDONLY|_O_WRONLY|_O_RDWR)
  48.  
  49. #define    _O_APPEND    0x0008    /* Writes will add to the end of the file. */
  50.  
  51. #define    _O_RANDOM    0x0010
  52. #define    _O_SEQUENTIAL    0x0020
  53. #define    _O_TEMPORARY    0x0040    /* Make the file dissappear after closing.
  54.                  * WARNING: Even if not created by _open! */
  55. #define    _O_NOINHERIT    0x0080
  56.  
  57. #define    _O_CREAT    0x0100    /* Create the file if it does not exist. */
  58. #define    _O_TRUNC    0x0200    /* Truncate the file if it does exist. */
  59. #define    _O_EXCL        0x0400    /* Open only if the file does not exist. */
  60.  
  61. #define _O_SHORT_LIVED  0x1000
  62.  
  63. /* NOTE: Text is the default even if the given _O_TEXT bit is not on. */
  64. #define    _O_TEXT        0x4000    /* CR-LF in file becomes LF in memory. */
  65. #define    _O_BINARY    0x8000    /* Input and output is not translated. */
  66. #define    _O_RAW        _O_BINARY
  67.  
  68. #ifndef    _NO_OLDNAMES
  69.  
  70. /* POSIX/Non-ANSI names for increased portability */
  71. #define    O_RDONLY    _O_RDONLY
  72. #define O_WRONLY    _O_WRONLY
  73. #define O_RDWR        _O_RDWR
  74. #define O_ACCMODE    _O_ACCMODE
  75. #define    O_APPEND    _O_APPEND
  76. #define    O_CREAT        _O_CREAT
  77. #define    O_TRUNC        _O_TRUNC
  78. #define    O_EXCL        _O_EXCL
  79. #define    O_TEXT        _O_TEXT
  80. #define    O_BINARY    _O_BINARY
  81. #define    O_TEMPORARY    _O_TEMPORARY
  82. #define O_NOINHERIT    _O_NOINHERIT
  83. #define O_SEQUENTIAL    _O_SEQUENTIAL
  84. #define    O_RANDOM    _O_RANDOM
  85.  
  86. #endif    /* Not _NO_OLDNAMES */
  87.  
  88. #endif    /* Not _FCNTL_H_ */
  89.  
  90. #endif    /* Not __STRICT_ANSI__ */
  91.  
  92.