X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=support%2Fsys-time.c;h=1759ec0fcb8e23f2435d8cb45d0e846a53b9edcb;hb=22d723585050f005ff1aeb080dfa3b5e7c7db883;hp=d9a2e0f6e51f4737520247a1338e0ea8ecabd832;hpb=af7de2864c02e32f97d510623aa39f7c56f03f01;p=mono.git diff --git a/support/sys-time.c b/support/sys-time.c index d9a2e0f6e51..1759ec0fcb8 100644 --- a/support/sys-time.c +++ b/support/sys-time.c @@ -4,7 +4,7 @@ * Authors: * Jonathan Pryor (jonpryor@vt.edu) * - * Copyright (C) 2004 Jonathan Pryor + * Copyright (C) 2004-2006 Jonathan Pryor */ #include @@ -16,16 +16,6 @@ G_BEGIN_DECLS -struct Mono_Posix_Timeval { - /* time_t */ mph_time_t tv_sec; /* seconds */ - /* suseconds_t */ gint64 tv_usec; /* microseconds */ -}; - -struct Mono_Posix_Timezone { - int tz_minuteswest; /* minutes W of Greenwich */ - int tz_dsttime; /* ignored */ -}; - gint32 Mono_Posix_Syscall_gettimeofday ( struct Mono_Posix_Timeval *tv, @@ -100,10 +90,10 @@ static inline struct timeval* copy_utimes (struct timeval* to, struct Mono_Posix_Timeval *from) { if (from) { - to[0].tv_sec = from->tv_sec; - to[0].tv_usec = from->tv_usec; - to[1].tv_sec = from->tv_sec; - to[1].tv_usec = from->tv_usec; + to[0].tv_sec = from[0].tv_sec; + to[0].tv_usec = from[0].tv_usec; + to[1].tv_sec = from[1].tv_sec; + to[1].tv_usec = from[1].tv_usec; return to; } @@ -121,6 +111,7 @@ Mono_Posix_Syscall_utimes(const char *filename, struct Mono_Posix_Timeval *tv) return utimes (filename, ptv); } +#ifdef HAVE_LUTIMES gint32 Mono_Posix_Syscall_lutimes(const char *filename, struct Mono_Posix_Timeval *tv) { @@ -131,7 +122,9 @@ Mono_Posix_Syscall_lutimes(const char *filename, struct Mono_Posix_Timeval *tv) return lutimes (filename, ptv); } +#endif /* def HAVE_LUTIMES */ +#if HAVE_FUTIMES gint32 Mono_Posix_Syscall_futimes(int fd, struct Mono_Posix_Timeval *tv) { @@ -142,6 +135,7 @@ Mono_Posix_Syscall_futimes(int fd, struct Mono_Posix_Timeval *tv) return futimes (fd, ptv); } +#endif /* def HAVE_FUTIMES */ G_END_DECLS