home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / sys / locking.h next >
C/C++ Source or Header  |  1998-06-16  |  1KB  |  50 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
  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
  24.  
  25.  
  26. #define _LK_UNLCK    0    /* unlock the file region */
  27. #ifdef _WIN32
  28. #define _LK_LOCK    1    /* lock the file region */
  29. #endif
  30. #define _LK_NBLCK    2    /* non-blocking lock */
  31. #ifdef _WIN32
  32. #define _LK_RLCK    3    /* lock for writing */
  33. #endif
  34. #define _LK_NBRLCK    4    /* non-blocking lock for writing */
  35.  
  36. #if !__STDC__
  37. /* Non-ANSI names for compatibility */
  38. #define LK_UNLCK    _LK_UNLCK
  39. #ifdef _WIN32
  40. #define LK_LOCK     _LK_LOCK
  41. #endif
  42. #define LK_NBLCK    _LK_NBLCK
  43. #ifdef _WIN32
  44. #define LK_RLCK     _LK_RLCK
  45. #endif
  46. #define LK_NBRLCK    _LK_NBRLCK
  47. #endif
  48.  
  49. #endif    /* _INC_LOCKING */
  50.