home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / pdksh-4.9-src.tgz / tar.out / contrib / pdksh / std / h / io.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  2KB  |  60 lines

  1. /* POSIX IO functions */
  2. /* $Id: io.h,v 1.3 93/05/05 21:17:48 sjg Exp $ */
  3.  
  4. /*
  5.  * the incomplete type "struct stat"
  6.  * will get warnings from GCC,
  7.  * errors from Turbo C. Too bad.
  8.  */
  9.  
  10. /* include <unistd.h> to get this */
  11.  
  12. #if ! _IO_H
  13. #define    _IO_H    1
  14.  
  15. #include <unistd.h>
  16.  
  17. #if _ST                /* dLibs hack */
  18. #define    unlink    remove
  19. #endif
  20.  
  21. struct stat;            /* create global incompletely-typed structure */
  22.  
  23. int chdir ARGS ((const char *path));
  24. #ifndef sparc
  25. int umask ARGS ((int mode));
  26. #endif
  27.  
  28. int open ARGS ((const char *path, int flags, ... /*mode*/));
  29. int creat ARGS ((const char *path, int mode));
  30. int pipe ARGS ((int pv[2]));
  31. int close ARGS ((int fd));
  32.  
  33. int fcntl ARGS ((int fd, int cmd, int arg));
  34. int dup ARGS ((int fd));
  35. int dup2 ARGS ((int ofd, int nfd));
  36.  
  37. int link ARGS ((const char *opath, const char *npath));
  38. int unlink ARGS ((const char *path));
  39. int rename ARGS ((const char *opath, const char *npath));
  40. int mkdir ARGS ((const char *path, int mode));
  41.  
  42. long lseek ARGS ((int fd, long off, int how));
  43. int read ARGS ((int fd, char *buf, unsigned len));
  44. int write ARGS ((int fd, char *buf, unsigned len));
  45.  
  46. int access ARGS ((const char *path, int mode));
  47. int stat ARGS ((const char *path, struct stat *sp));
  48. int fstat ARGS ((int fd, struct stat *sp));
  49.  
  50. int chmod ARGS ((const char *path, int mode));
  51. int chown ARGS ((const char *path, int uid));
  52. int chgrp ARGS ((const char *path, int gid));
  53. int utime ARGS ((const char *path, long tv[2]));
  54.  
  55. #if _BSD || _V7
  56. int ioctl ARGS ((int fd, int cmd, void *argp)); /* BSD is "uns long cmd" */
  57. #endif
  58.  
  59. #endif
  60.