Merge pull request #5714 from alexischr/update_bockbuild
[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-2006 Jonathan Pryor
8  */
9
10 #include <sys/types.h>
11 #include <utime.h>
12
13 #include "map.h"
14 #include "mph.h"
15
16 G_BEGIN_DECLS
17
18 gint32
19 Mono_Posix_Syscall_utime (const char *filename, struct Mono_Posix_Utimbuf *buf, 
20                 int use_buf)
21 {
22         struct utimbuf _buf;
23         struct utimbuf *pbuf = NULL;
24
25         if (buf && use_buf) {
26                 _buf.actime  = buf->actime;
27                 _buf.modtime = buf->modtime;
28                 pbuf = &_buf;
29         }
30
31         return utime (filename, pbuf);
32 }
33
34 G_END_DECLS
35
36 /*
37  * vim: noexpandtab
38  */