updating to the latest module.
[mono.git] / support / utime.c
1 /*
2  * <stdio.h> wrapper functions.
3  *
4  * Authors:
5  *   Jonathan Pryor (jonpryor@vt.edu)
6  *
7  * Copyright (C) 2004 Jonathan Pryor
8  */
9
10 #include <sys/types.h>
11 #include <utime.h>
12
13 #include "mph.h"
14
15 G_BEGIN_DECLS
16
17 struct Mono_Posix_Utimbuf {
18         /* time_t */ mph_time_t actime;   /* access time */
19         /* time_t */ mph_time_t modtime;  /* modification time */
20 };
21
22 gint32
23 Mono_Posix_Syscall_utime (const char *filename, struct Mono_Posix_Utimbuf *buf)
24 {
25         struct utimbuf _buf;
26         struct utimbuf *pbuf = NULL;
27
28         if (buf) {
29                 _buf.actime  = buf->actime;
30                 _buf.modtime = buf->modtime;
31                 pbuf = &_buf;
32         }
33
34         return utime (filename, pbuf);
35 }
36
37 G_END_DECLS
38
39 /*
40  * vim: noexpandtab
41  */