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