2006-09-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
[mono/afaerber.git] / support / utime.c
blobdd908c7aba9349beef3025a948ae0fd6ef352f4d
1 /*
2 * <stdio.h> wrapper functions.
4 * Authors:
5 * Jonathan Pryor (jonpryor@vt.edu)
7 * Copyright (C) 2004 Jonathan Pryor
8 */
10 #include <sys/types.h>
11 #include <utime.h>
13 #include "mph.h"
15 G_BEGIN_DECLS
17 struct Mono_Posix_Utimbuf {
18 /* time_t */ mph_time_t actime; /* access time */
19 /* time_t */ mph_time_t modtime; /* modification time */
22 gint32
23 Mono_Posix_Syscall_utime (const char *filename, struct Mono_Posix_Utimbuf *buf,
24 int use_buf)
26 struct utimbuf _buf;
27 struct utimbuf *pbuf = NULL;
29 if (buf && use_buf) {
30 _buf.actime = buf->actime;
31 _buf.modtime = buf->modtime;
32 pbuf = &_buf;
35 return utime (filename, pbuf);
38 G_END_DECLS
41 * vim: noexpandtab