Welcome to mirror list, hosted at ThFree Co, Russian Federation.

utime2.c « sparc64 « sys « libc « newlib - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5f01e3b2b4909a2730b077f2c3742e340ec78a9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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