fcntl.h 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #ifndef _FCNTL_H_
  2. #define _FCNTL_H_
  3. /*
  4. * Copyright (C) 2002-2003 by egnite Software GmbH. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the copyright holders nor the names of
  16. * contributors may be used to endorse or promote products derived
  17. * from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE
  23. * SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. * For additional information see http://www.ethernut.de/
  33. *
  34. * -
  35. * Copyright (c) 1982, 1986, 1989, 1993
  36. * The Regents of the University of California. All rights reserved.
  37. * (c) UNIX System Laboratories, Inc.
  38. * All or some portions of this file are derived from material licensed
  39. * to the University of California by American Telephone and Telegraph
  40. * Co. or Unix System Laboratories, Inc. and are reproduced herein with
  41. * the permission of UNIX System Laboratories, Inc.
  42. *
  43. * Redistribution and use in source and binary forms, with or without
  44. * modification, are permitted provided that the following conditions
  45. * are met:
  46. * 1. Redistributions of source code must retain the above copyright
  47. * notice, this list of conditions and the following disclaimer.
  48. * 2. Redistributions in binary form must reproduce the above copyright
  49. * notice, this list of conditions and the following disclaimer in the
  50. * documentation and/or other materials provided with the distribution.
  51. * 3. Neither the name of the University nor the names of its contributors
  52. * may be used to endorse or promote products derived from this software
  53. * without specific prior written permission.
  54. *
  55. * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  56. * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  57. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  58. * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  59. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  60. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  61. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  62. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  63. * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  64. * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  65. * SUCH DAMAGE.
  66. */
  67. /*!
  68. * \file fcntl.h
  69. * \brief File control flags.
  70. */
  71. /*! \addtogroup xgCrtLowio
  72. */
  73. /*@{*/
  74. #define _O_RDONLY 0x0000 /*!< Read only. */
  75. #define _O_WRONLY 0x0001 /*!< Write only. */
  76. #define _O_RDWR 0x0002 /*!< Read and write. */
  77. #define _O_APPEND 0x0008 /*!< Start writing at the end. */
  78. #define _O_CREAT 0x0100 /*!< Create file if it does not exist. */
  79. #define _O_TRUNC 0x0200 /*!< Truncate file if it exists. */
  80. #define _O_EXCL 0x0400 /*!< Open only if it does not exist. */
  81. #define _O_TEXT 0x4000 /*!< EOL translation. */
  82. #define _O_BINARY 0x8000 /*!< Raw mode. */
  83. /*@}*/
  84. #endif