1 /*- 2 * utimes.c -- 3 * 4 * This routine maps the 4.3BSD utimes system call onto the 5 * System V utime call. 6 * 7 * Copyright (c) 1988 by the Regents of the University of California 8 * Copyright (c) 1988 by Adam de Boor 9 * 10 * Permission to use, copy, modify, and distribute this 11 * software and its documentation for any purpose and without 12 * fee is hereby granted, provided that the above copyright 13 * notice appears in all copies. Neither the University of California nor 14 * Adam de Boor makes any representations about the suitability of this 15 * software for any purpose. It is provided "as is" without 16 * express or implied warranty. 17 */ 18 19 static char *rcsid = "$Id: utimes.c,v 1.3 88/11/17 20:41:13 adam Exp $ SPRITE (Berkeley)" 20 21 #include <sys/time.h> 22 #include <time.h> 23 #include <sys/types.h> 24 #include <unistd.h> 25 26 utimes(file, tvp) 27 char *file; 28 struct timeval tvp[2]; 29 { 30 struct utimbuf t; 31 32 t.actime = tvp[0].tv_sec; 33 t.modtime = tvp[1].tv_sec; 34 return(utime(file, &t)); 35 } 36