projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
define new library function getgrouplist
[unix-history]
/
usr
/
src
/
lib
/
libc
/
gen
/
utime.c
diff --git
a/usr/src/lib/libc/gen/utime.c
b/usr/src/lib/libc/gen/utime.c
index
c62c8ad
..
b884b83
100644
(file)
--- a/
usr/src/lib/libc/gen/utime.c
+++ b/
usr/src/lib/libc/gen/utime.c
@@
-1,16
+1,26
@@
-/* utime.c 4.1 83/05/31 */
-
-/*
- * Backwards compatible utime.
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * %sccs.include.redist.c%
*/
*/
-utime(name, otv)
- char *name;
- int otv[];
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)utime.c 5.4 (Berkeley) %G%";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/time.h>
+#include <utime.h>
+
+int
+utime(path, times)
+ const char *path;
+ const struct utimbuf *times;
{
struct timeval tv[2];
{
struct timeval tv[2];
- tv[0].tv_sec = otv[0]; tv[0].tv_usec = 0;
- tv[1].tv_sec = otv[1]; tv[1].tv_usec = 0;
- return (utimes(name, tv));
+ tv[0].tv_sec = times->actime;
+ tv[1].tv_sec = times->modtime;
+ tv[0].tv_usec = tv[1].tv_usec = 0;
+ return(utimes(path, tv));
}
}