home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Mail / qpopper-2.4-MIHS / flock.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-06-05  |  567 b   |  46 lines

  1. #ifndef HAVE_FLOCK
  2. #ifndef _FLOCK_EMULATE_INCLUDED
  3. #define _FLOCK_EMULATE_INCLUDED
  4.  
  5. #include <fcntl.h>
  6.  
  7. #if defined(F_SETLK) && defined(F_SETLKW)
  8. # define FCNTL_FLOCK
  9. #else
  10. # define LOCKF_FLOCK
  11. #endif /* F_SETLK && F_SETLKW */
  12.  
  13. /* These definitions are in <sys/file.h> on BSD 4.3 */
  14.  
  15. /*
  16.  * Flock call.
  17.  */
  18. #define LOCK_SH        1    /* shared lock */
  19. #define LOCK_EX        2    /* exclusive lock */
  20. #define LOCK_NB        4    /* don't block when locking */
  21. #define LOCK_UN        8    /* unlock */
  22.  
  23. extern int flock();
  24.  
  25. #endif /* _FLOCK_EMULATE_INCLUDED */
  26. #endif /* HAVE_FLOCK */
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.