source: trunk/libs/newlib/src/newlib/libc/sys/sparc64/utime2.c @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 496 bytes
Line 
1/* utime() system call for sunos4 */
2
3#ifndef __svr4__
4
5#include <time.h>
6#include <sys/time.h>
7#include <utime.h>
8
9int
10utime (char *path, struct utimbuf *times)
11{
12  if (times != NULL)
13    {
14      struct timeval timevals[2];
15
16      timevals[0].tv_sec = (long int) times->actime;
17      timevals[0].tv_usec = 0;
18      timevals[1].tv_sec = (long int) times->modtime;
19      timevals[1].tv_usec = 0;
20      return utimes (path, timevals);
21    }
22
23  return utimes (path, (struct timeval *) 0);
24}
25
26#endif
Note: See TracBrowser for help on using the repository browser.