summaryrefslogtreecommitdiff
path: root/libc/misc/time/utimes.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-10-23 23:23:54 +0000
committerEric Andersen <andersen@codepoet.org>2000-10-23 23:23:54 +0000
commit5606e4d6f92c10af214b54a01db79cf561067e58 (patch)
treef50c5adf765ad7492736b3fb0e9ae669573e4e5e /libc/misc/time/utimes.c
parent56c9a8402ff4c9004331efc77e5a5fe62aa65014 (diff)
More reorg. A place for everything and everything in its place...
Diffstat (limited to 'libc/misc/time/utimes.c')
-rw-r--r--libc/misc/time/utimes.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libc/misc/time/utimes.c b/libc/misc/time/utimes.c
new file mode 100644
index 000000000..364bf83e7
--- /dev/null
+++ b/libc/misc/time/utimes.c
@@ -0,0 +1,16 @@
+#include <utime.h>
+#include <sys/time.h>
+
+int utimes(const char *path, struct timeval tvp[2])
+{
+ struct utimbuf buf, *times;
+
+ if (tvp) {
+ times = &buf;
+ times->actime = tvp[0].tv_sec;
+ times->modtime = tvp[1].tv_sec;
+ }
+ else
+ times = NULL;
+ return utime(path, times);
+}