X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=support%2Fsys-time.c;h=a1c0ba0b184ee7326e5788adb0371215b5703109;hb=dd0745f42631963648f7372689cbe4805400285f;hp=e3f3bee91beb15f5811596c9de419bad1f29b54f;hpb=538d3bb80572334c18ae117ea7703406a4a22872;p=mono.git diff --git a/support/sys-time.c b/support/sys-time.c index e3f3bee91be..a1c0ba0b184 100644 --- a/support/sys-time.c +++ b/support/sys-time.c @@ -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, @@ -79,31 +69,14 @@ Mono_Posix_Syscall_settimeofday ( return r; } -/* Remove this at some point in the future */ -gint32 -Mono_Posix_Syscall_utimes_bad (const char *filename, - struct Mono_Posix_Timeval *tv) -{ - struct timeval _tv; - struct timeval *ptv = NULL; - - if (tv) { - _tv.tv_sec = tv->tv_sec; - _tv.tv_usec = tv->tv_usec; - ptv = &_tv; - } - - return utimes (filename, ptv); -} - 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; } @@ -134,6 +107,7 @@ Mono_Posix_Syscall_lutimes(const char *filename, struct Mono_Posix_Timeval *tv) } #endif /* def HAVE_LUTIMES */ +#if HAVE_FUTIMES gint32 Mono_Posix_Syscall_futimes(int fd, struct Mono_Posix_Timeval *tv) { @@ -144,6 +118,7 @@ Mono_Posix_Syscall_futimes(int fd, struct Mono_Posix_Timeval *tv) return futimes (fd, ptv); } +#endif /* def HAVE_FUTIMES */ G_END_DECLS