Files
mono/support/time.c
T
Jonathan Pryor 37829d3208 * dirent.c, errno.c, fcntl.c, fstab.c, grp.c, macros.c, pwd.c, signal.c,
stdio.c, stdlib.c, string.c, sys-mman.c, sys-sendfile.c, sys-stat.c, 
	  sys-statvfs.c, sys-time.c, sys-xattr.c syslog.c, time.c, unistd.c, 
	  utime.c: Remove structure definitions, and use the
	  create-native-map generated definitions within map.h.  Update function
	  prototypes to match current map.h declarations.
	* map.c, map.h: Flush (current create-native-map output).
	* mph.h: Don't include "map-icalls.h"; "icalls" are now in map.h.
	* create-native-map.exe: Added; cached version of create-native-map.exe
	  used to update map.c, map.h.  (create-native-map.exe source within
	  mono-tools/create-native-map.)
	* Makefile.am: Added update-create-native-map target to update 
	  create-native-map.exe using pkg-config & the create-native-map.pc package. 
		Use create-native-map.exe to generate map.* files instead of make-map.exe.
	* sys-statvfs.c: Add Mono_Posix_ToStatvfs, Mono_Posix_FromStatvfs exports.

svn path=/trunk/mono/; revision=66946
2006-10-24 22:28:25 +00:00

58 lines
760 B
C

/*
* <time.h> wrapper functions.
*
* Authors:
* Jonathan Pryor ([email protected])
*
* Copyright (C) 2004 Jonathan Pryor
*/
#define _SVID_SOURCE
#include <time.h>
#include <errno.h>
#include "map.h"
#include "mph.h"
#include <glib.h>
G_BEGIN_DECLS
#ifdef HAVE_STIME
gint32
Mono_Posix_Syscall_stime (mph_time_t *t)
{
time_t _t;
if (t == NULL) {
errno = EFAULT;
return -1;
}
mph_return_if_time_t_overflow (*t);
_t = (time_t) *t;
return stime (&_t);
}
#endif /* ndef HAVE_STIME */
mph_time_t
Mono_Posix_Syscall_time (mph_time_t *t)
{
time_t _t, r;
if (t == NULL) {
errno = EFAULT;
return -1;
}
mph_return_if_time_t_overflow (*t);
_t = (time_t) *t;
r = time (&_t);
*t = _t;
return r;
}
G_END_DECLS
/*
* vim: noexpandtab
*/