remove langversion:linq as it is the default now
[mono.git] / support / time.c
blob8d3d1a9a2262db1a8aa41e65bad59edbffe45598
1 /*
2 * <time.h> wrapper functions.
4 * Authors:
5 * Jonathan Pryor (jonpryor@vt.edu)
7 * Copyright (C) 2004 Jonathan Pryor
8 */
10 #define _SVID_SOURCE
11 #include <time.h>
12 #include <errno.h>
14 #include "map.h"
15 #include "mph.h"
16 #include <glib.h>
18 G_BEGIN_DECLS
20 #ifdef HAVE_STIME
21 gint32
22 Mono_Posix_Syscall_stime (mph_time_t *t)
24 time_t _t;
25 if (t == NULL) {
26 errno = EFAULT;
27 return -1;
29 mph_return_if_time_t_overflow (*t);
30 _t = (time_t) *t;
31 return stime (&_t);
33 #endif /* ndef HAVE_STIME */
35 mph_time_t
36 Mono_Posix_Syscall_time (mph_time_t *t)
38 time_t _t, r;
39 if (t == NULL) {
40 errno = EFAULT;
41 return -1;
44 mph_return_if_time_t_overflow (*t);
46 _t = (time_t) *t;
47 r = time (&_t);
48 *t = _t;
50 return r;
53 G_END_DECLS
56 * vim: noexpandtab