home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / SIMTEL / HITECH-C / Z8051H83.EXE / UNIXIO.H < prev    next >
C/C++ Source or Header  |  1993-05-21  |  1KB  |  47 lines

  1. /*
  2.  *    Declarations for Unix style low-level I/O functions.
  3.  */
  4.  
  5. #ifndef    _STDDEF
  6. typedef    int        ptrdiff_t;    /* result type of pointer difference */
  7. typedef    unsigned    size_t;        /* type yielded by sizeof */
  8. typedef    unsigned short    wchar_t;    /* wide char type */
  9. #define    _STDDEF
  10. #define    offsetof(ty, mem)    ((int)&(((ty *)0)->mem))
  11. #endif    _STDDEF
  12.  
  13. #ifndef    NULL
  14. #define    NULL    ((void *)0)
  15. #endif    NULL
  16.  
  17. #ifndef    _UNIXIO
  18. #define    _UNIXIO
  19. struct utimbuf
  20. {
  21.     long    actime;
  22.     long    modtime;
  23. };
  24. #endif
  25.  
  26. extern int    errno;            /* system error number */
  27.  
  28. extern int    open(char *, int, ...);
  29. extern int    close(int);
  30. extern int    creat(char *, int);
  31. extern int    dup(int);
  32. extern int    dup2(int, int);
  33. extern long    lseek(int, long, int);
  34. extern size_t    read(int, void *, size_t);
  35. extern int    unlink(char *);
  36. extern size_t    write(int, void *, size_t);
  37. extern int    isatty(int);
  38. extern int    chmod(char *, unsigned);
  39. extern int    utime(char *, struct utimbuf *);
  40. #if    unix || ATDOS
  41. extern int    umask(int);
  42. extern int    chown(char *, unsigned);
  43. extern int    ioctl(int, int, void *);
  44. extern int    pipe(int *);
  45. #endif
  46. extern int    access(char *, int);
  47.