home *** CD-ROM | disk | FTP | other *** search
/ The UNIX CD Bookshelf / OREILLY_TUCB_UNIX_CD.iso / upt / examples / SOURCES / CPMOD / I386 / CPMOD. next >
Encoding:
Text File  |  1998-07-24  |  571 b   |  31 lines

  1. *** cpmod.c.orig    Mon Oct 19 14:42:50 1992
  2. --- cpmod.c    Mon Oct 19 14:46:25 1992
  3. ***************
  4. *** 11,16 ****
  5. --- 11,35 ----
  6.   #include <sys/stat.h>
  7.   #include <sys/time.h>
  8.   
  9. + #define rindex          strrchr
  10. + #ifdef M_UNIX
  11. + /* SCO has timevals, but uses sys V utime */
  12. + #include <utime.h>
  13. + utimes (name, tvp)
  14. +      char *name;
  15. +      struct timeval tvp[];
  16. + {
  17. +   struct utimbuf utb;
  18. +   utb.actime  = tvp[0].tv_sec;
  19. +   utb.modtime = tvp[1].tv_sec;
  20. +   utime (name, &utb);
  21. + }
  22. + #endif /* M_UNIX */
  23.   main (argc, argv)
  24.       int argc;
  25.       char **argv;
  26.