date and time created 91/04/12 13:40:37 by bostic
[unix-history] / usr / src / lib / libc / gen / utime.c
CommitLineData
ac6492d0
KB
1/*-
2 * Copyright (c) 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
bb0cfa24
DF
6 */
7
2ce81398 8#if defined(LIBC_SCCS) && !defined(lint)
c5980113 9static char sccsid[] = "@(#)utime.c 5.4 (Berkeley) %G%";
ac6492d0 10#endif /* LIBC_SCCS and not lint */
d322f548 11
9bfbc81c 12#include <sys/time.h>
ac6492d0 13#include <utime.h>
d322f548 14
c5980113 15int
ac6492d0 16utime(path, times)
c5980113
DS
17 const char *path;
18 const struct utimbuf *times;
d322f548
SL
19{
20 struct timeval tv[2];
21
ac6492d0
KB
22 tv[0].tv_sec = times->actime;
23 tv[1].tv_sec = times->modtime;
24 tv[0].tv_usec = tv[1].tv_usec = 0;
25 return(utimes(path, tv));
d322f548 26}