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.

61 lines
1.8 KiB

  1. /***
  2. *sys/locking.h - flags for locking() function
  3. *
  4. * Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file defines the flags for the locking() function.
  8. * [System V]
  9. *
  10. * [Public]
  11. *
  12. *Revision History:
  13. * 08-22-89 GJF Fixed copyright
  14. * 10-30-89 GJF Fixed copyright (again)
  15. * 03-21-90 GJF Added #ifndef _INC_LOCKING stuff
  16. * 01-21-91 GJF ANSI naming.
  17. * 09-16-92 SKS Fix copyright, clean up backslash
  18. * 02-23-93 SKS Update copyright to 1993
  19. * 12-28-94 JCF Merged with mac header.
  20. * 02-14-95 CFW Clean up Mac merge, add _CRTBLD.
  21. * 04-27-95 CFW Add mac/win32 test.
  22. * 12-14-95 JWM Add "#pragma once".
  23. * 05-17-99 PML Remove all Macintosh support.
  24. *
  25. ****/
  26. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  27. #pragma once
  28. #endif
  29. #ifndef _INC_LOCKING
  30. #define _INC_LOCKING
  31. #if !defined(_WIN32)
  32. #error ERROR: Only Win32 target supported!
  33. #endif
  34. #ifndef _CRTBLD
  35. /* This version of the header files is NOT for user programs.
  36. * It is intended for use when building the C runtimes ONLY.
  37. * The version intended for public use will not have this message.
  38. */
  39. #error ERROR: Use of C runtime library internal header file.
  40. #endif /* _CRTBLD */
  41. #define _LK_UNLCK 0 /* unlock the file region */
  42. #define _LK_LOCK 1 /* lock the file region */
  43. #define _LK_NBLCK 2 /* non-blocking lock */
  44. #define _LK_RLCK 3 /* lock for writing */
  45. #define _LK_NBRLCK 4 /* non-blocking lock for writing */
  46. #if !__STDC__
  47. /* Non-ANSI names for compatibility */
  48. #define LK_UNLCK _LK_UNLCK
  49. #define LK_LOCK _LK_LOCK
  50. #define LK_NBLCK _LK_NBLCK
  51. #define LK_RLCK _LK_RLCK
  52. #define LK_NBRLCK _LK_NBRLCK
  53. #endif
  54. #endif /* _INC_LOCKING */