summaryrefslogtreecommitdiffstats
path: root/newlib/libc/sys/sparc64/utime2.c
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-02-17 19:39:52 +0000
committerChristopher Faylor <me@cgf.cx>2000-02-17 19:39:52 +0000
commit8a0efa53e44919bcf5ccb1d3353618a82afdf8bc (patch)
tree68c3dbf3f2c6fd5d49777def9914d77b5cd4589d /newlib/libc/sys/sparc64/utime2.c
parent1fd5e000ace55b323124c7e556a7a864b972a5c4 (diff)
downloadcygnal-8a0efa53e44919bcf5ccb1d3353618a82afdf8bc.tar.gz
cygnal-8a0efa53e44919bcf5ccb1d3353618a82afdf8bc.tar.bz2
cygnal-8a0efa53e44919bcf5ccb1d3353618a82afdf8bc.zip
import newlib-2000-02-17 snapshot
Diffstat (limited to 'newlib/libc/sys/sparc64/utime2.c')
-rw-r--r--newlib/libc/sys/sparc64/utime2.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/newlib/libc/sys/sparc64/utime2.c b/newlib/libc/sys/sparc64/utime2.c
new file mode 100644
index 000000000..5f01e3b2b
--- /dev/null
+++ b/newlib/libc/sys/sparc64/utime2.c
@@ -0,0 +1,26 @@
+/* utime() system call for sunos4 */
+
+#ifndef __svr4__
+
+#include <time.h>
+#include <sys/time.h>
+#include <utime.h>
+
+int
+utime (char *path, struct utimbuf *times)
+{
+ if (times != NULL)
+ {
+ struct timeval timevals[2];
+
+ timevals[0].tv_sec = (long int) times->actime;
+ timevals[0].tv_usec = 0;
+ timevals[1].tv_sec = (long int) times->modtime;
+ timevals[1].tv_usec = 0;
+ return utimes (path, timevals);
+ }
+
+ return utimes (path, (struct timeval *) 0);
+}
+
+#endif