home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / sys / locking.h next >
C/C++ Source or Header  |  1998-06-17  |  2KB  |  57 lines

  1. /***
  2. *sys/locking.h - flags for locking() function
  3. *
  4. *       Copyright (c) 1985-1997, 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. ****/
  13.  
  14. #if _MSC_VER > 1000
  15. #pragma once
  16. #endif  /* _MSC_VER > 1000 */
  17.  
  18. #ifndef _INC_LOCKING
  19. #define _INC_LOCKING
  20.  
  21. #if !defined (_WIN32) && !defined (_MAC)
  22. #error ERROR: Only Mac or Win32 targets supported!
  23. #endif  /* !defined (_WIN32) && !defined (_MAC) */
  24.  
  25. #ifndef _CRTBLD
  26. /* This version of the header files is NOT for user programs.
  27.  * It is intended for use when building the C runtimes ONLY.
  28.  * The version intended for public use will not have this message.
  29.  */
  30. #error ERROR: Use of C runtime library internal header file.
  31. #endif  /* _CRTBLD */
  32.  
  33. #define _LK_UNLCK       0       /* unlock the file region */
  34. #ifdef _WIN32
  35. #define _LK_LOCK        1       /* lock the file region */
  36. #endif  /* _WIN32 */
  37. #define _LK_NBLCK       2       /* non-blocking lock */
  38. #ifdef _WIN32
  39. #define _LK_RLCK        3       /* lock for writing */
  40. #endif  /* _WIN32 */
  41. #define _LK_NBRLCK      4       /* non-blocking lock for writing */
  42.  
  43. #if !__STDC__
  44. /* Non-ANSI names for compatibility */
  45. #define LK_UNLCK        _LK_UNLCK
  46. #ifdef _WIN32
  47. #define LK_LOCK         _LK_LOCK
  48. #endif  /* _WIN32 */
  49. #define LK_NBLCK        _LK_NBLCK
  50. #ifdef _WIN32
  51. #define LK_RLCK         _LK_RLCK
  52. #endif  /* _WIN32 */
  53. #define LK_NBRLCK       _LK_NBRLCK
  54. #endif  /* !__STDC__ */
  55.  
  56. #endif  /* _INC_LOCKING */
  57.