home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Programmieren / Kurztests / DiceC / include / fcntl.h < prev    next >
C/C++ Source or Header  |  1994-02-01  |  1KB  |  69 lines

  1.  
  2. /*
  3.  *  FCNTL.H
  4.  *
  5.  *  (c)Copyright 1990, Matthew Dillon, All Rights Reserved
  6.  */
  7.  
  8. #ifndef FCNTL_H
  9. #define FCNTL_H
  10.  
  11. #define O_RDONLY    0
  12. #define O_WRONLY    1
  13. #define O_RDWR        2
  14. #define O_NDELAY    4
  15. #define O_APPEND    8
  16. #define O_CREAT     0x0100
  17. #define O_TRUNC     0x0200
  18. #define O_EXCL        0x0400
  19. #define O_BINARY    0x0800
  20.  
  21. /*
  22.  *  Internal, never specify
  23.  */
  24.  
  25. #define O_INTERNAL  0xF000
  26. #define O_ISOPEN    0x1000
  27. #define O_NOCLOSE   0x2000  /*    not a closable file */
  28. #define O_CEXEC     0x4000  /*    close on exec        */
  29.  
  30. /*
  31.  *  UNIX support
  32.  */
  33.  
  34. #define F_DUPFD     1
  35. #define F_GETFD     2
  36. #define F_SETFD     3
  37. #define F_GETFL     4
  38. #define F_SETFL     5
  39. #define FNDELAY     0x00010000
  40.  
  41.  
  42. extern unsigned int write(int, const void *, unsigned int);
  43. extern unsigned int read(int, void *, unsigned int);
  44. extern int close(int);
  45. extern int open(const char *, int, ...);
  46. extern int creat(const char *, ...);
  47. extern long lseek(int, long, int);
  48.  
  49. extern void *fdtofh(int);
  50.  
  51. #ifdef STDIO_H
  52. extern _IOFDS *__getfh(short);      /*  for system use only */
  53. extern _IOFDS *_MakeFD(int *);      /*  for system use only */
  54. #endif
  55.  
  56. /*
  57.  *  UNIX
  58.  */
  59.  
  60. extern int fcntl(int, int, int);
  61. extern int isatty(int);
  62. extern int access(const char *, int);
  63.  
  64. #define X_OK    1
  65. #define W_OK    2
  66. #define R_OK    4
  67.  
  68. #endif
  69.