home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1999 February / MACPOWER-1999-02.ISO.7z / MACPOWER-1999-02.ISO / 9902⁄AMUG / UTILITY / mac06-0.95.sit / mac06-0.95 / usr / include / fcntl.h < prev    next >
Text File  |  1998-09-23  |  1KB  |  51 lines

  1. /* mac06ゥ1997 by HNS/DSITRI hns@computer.org
  2. ** fcntl.h
  3. */
  4.  
  5. #pragma once
  6.  
  7. #include "stdarg.h"
  8. #include "sys/types.h"
  9.  
  10. struct flock
  11.     {
  12.     short    l_type;
  13.     short    l_whence;
  14.     off_t    l_start;
  15.     off_t    l_len;
  16.     pid_t    l_pid;
  17.     };
  18.  
  19. #define F_DUPFD            0
  20. #define FD_CLOEXEC        0x0001
  21. #define F_GETFD            1
  22. #define F_SETFD            2
  23. #define F_GETFL            3
  24. #define F_SETFL            4
  25. #define F_GETLK            5
  26. #define F_SETLK            6
  27. #define F_SETLKW        7
  28. #define F_RDLCK            0x0001
  29. #define F_WRLCK            0x0002
  30. #define F_UNLCK            0x0003
  31.  
  32. #define O_APPEND        0x0020
  33. #define O_CREAT            0x0004
  34. #define O_EXCL            0x0010
  35. #define O_NOCTTY        0x0400
  36. #define O_NONBLOCK        0x0800
  37.  
  38. #define O_WRONLY        0x0001
  39. #define O_RDONLY        0x0002
  40. #define O_RDWR            (O_WRONLY|O_RDONLY)
  41. #define O_TRUNC            0x0008
  42.  
  43. int fcntl(int fd, int cmd, ...);
  44. int mkdir(const char *name, mode_t mode);
  45. #ifndef _POSIX_SOURCE
  46. int mknode(const char *name,  mode_t mode, const char *driver, int minor);
  47. #endif
  48. int open(const char *name, int mode, ...);
  49. #define creat(name, mode) open((name), O_CREAT|O_TRUNC|O_WRONLY, (mode)) 
  50.  
  51. /* EOF */