New test.
[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                 int use_buf)
25 {
26         struct utimbuf _buf;
27         struct utimbuf *pbuf = NULL;
28
29         if (buf && use_buf) {
30                 _buf.actime  = buf->actime;
31                 _buf.modtime = buf->modtime;
32                 pbuf = &_buf;
33         }
34
35         return utime (filename, pbuf);
36 }
37
38 G_END_DECLS
39
40 /*
41  * vim: noexpandtab
42  */