Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB

  1. /***
  2. *fcntl.h - file control options used by open()
  3. *
  4. * Copyright (c) 1985-1992, 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. ****/
  12. #ifndef _INC_FCNTL
  13. #define _O_RDONLY 0x0000 /* open for reading only */
  14. #define _O_WRONLY 0x0001 /* open for writing only */
  15. #define _O_RDWR 0x0002 /* open for reading and writing */
  16. #define _O_APPEND 0x0008 /* writes done at eof */
  17. #define _O_CREAT 0x0100 /* create and open file */
  18. #define _O_TRUNC 0x0200 /* open and truncate */
  19. #define _O_EXCL 0x0400 /* open only if file doesn't already exist */
  20. /* _O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s,
  21. ** and <lf> sequences translated to <cr><lf> on write()'s
  22. */
  23. #define _O_TEXT 0x4000 /* file mode is text (translated) */
  24. #define _O_BINARY 0x8000 /* file mode is binary (untranslated) */
  25. /* macro to translate the C 2.0 name used to force binary mode for files */
  26. #define _O_RAW _O_BINARY
  27. /* Open handle inherit bit */
  28. #define _O_NOINHERIT 0x0080 /* child process doesn't inherit file */
  29. #ifndef __STDC__
  30. /* Non-ANSI names for compatibility */
  31. #define O_RDONLY _O_RDONLY
  32. #define O_WRONLY _O_WRONLY
  33. #define O_RDWR _O_RDWR
  34. #define O_APPEND _O_APPEND
  35. #define O_CREAT _O_CREAT
  36. #define O_TRUNC _O_TRUNC
  37. #define O_EXCL _O_EXCL
  38. #define O_TEXT _O_TEXT
  39. #define O_BINARY _O_BINARY
  40. #define O_NOINHERIT _O_NOINHERIT
  41. #endif
  42. #define _INC_FCNTL
  43. #endif