home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue6 / SDL.ZIP / !gcc / include / unixlib / sys / h / file < prev    next >
Encoding:
Text File  |  2006-09-17  |  1.0 KB  |  49 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/clib/sys/file.h,v $
  4.  * $Date: 2004/04/17 10:51:15 $
  5.  * $Revision: 1.4 $
  6.  * $State: Exp $
  7.  * $Author: nick $
  8.  *
  9.  ***************************************************************************/
  10.  
  11. #ifndef __SYS_FILE_H
  12. #define __SYS_FILE_H 1
  13.  
  14. #ifndef __UNIXLIB_FEATURES_H
  15. #include <features.h>
  16. #endif
  17.  
  18. #ifndef __FCNTL_H
  19. #include <fcntl.h>
  20. #endif
  21.  
  22. __BEGIN_DECLS
  23.  
  24. /* Alternate names for values for the whence argument to lseek.
  25.    These are the same as SEEK_SET, SEEK_CUR and SEEK_END respectively.  */
  26. #define L_SET 0
  27. #define L_INCR 1
  28. #define L_XTND 2
  29.  
  30. /* Operations for the flock call.  */
  31.  
  32. /* Shared lock.  */
  33. #define LOCK_SH 1
  34. /* Exclusive lock.  */
  35. #define LOCK_EX 2
  36. /* Unlock.  */
  37. #define LOCK_UN 8
  38.  
  39. /* Don't block when locking.  */
  40. #define LOCK_NB 4
  41.  
  42. /* Apply or remove an advisory lock, according to operation on the
  43.    file fd refers to.  */
  44. extern int flock (int fd, int operation) __THROW;
  45.  
  46. __END_DECLS
  47.  
  48. #endif
  49.