X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=support%2Fsys-stat.c;h=075563b0cf4d87681cce80a5126290ede1b8a97f;hb=52e98abd6e5c6d10ddea91a529f7b1b2336e0696;hp=d71d555b4d1b1c6f97f121d507356c06d35808b8;hpb=21a3421f4c1a40a0b3af25e2533e3fef72e31869;p=mono.git diff --git a/support/sys-stat.c b/support/sys-stat.c index d71d555b4d1..075563b0cf4 100644 --- a/support/sys-stat.c +++ b/support/sys-stat.c @@ -13,7 +13,9 @@ #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include #include @@ -42,8 +44,10 @@ Mono_Posix_FromStat (struct Mono_Posix_Stat *from, void *_to) to->st_gid = from->st_gid; to->st_rdev = from->st_rdev; to->st_size = from->st_size; +#ifndef HOST_WIN32 to->st_blksize = from->st_blksize; to->st_blocks = from->st_blocks; +#endif to->st_atime = from->st_atime_; to->st_mtime = from->st_mtime_; to->st_ctime = from->st_ctime_; @@ -76,8 +80,10 @@ Mono_Posix_ToStat (void *_from, struct Mono_Posix_Stat *to) to->st_gid = from->st_gid; to->st_rdev = from->st_rdev; to->st_size = from->st_size; +#ifndef HOST_WIN32 to->st_blksize = from->st_blksize; to->st_blocks = from->st_blocks; +#endif to->st_atime_ = from->st_atime; to->st_mtime_ = from->st_mtime; to->st_ctime_ = from->st_ctime; @@ -126,6 +132,7 @@ Mono_Posix_Syscall_fstat (int filedes, struct Mono_Posix_Stat *buf) return r; } +#ifndef HOST_WIN32 gint32 Mono_Posix_Syscall_lstat (const char *file_name, struct Mono_Posix_Stat *buf) { @@ -141,6 +148,7 @@ Mono_Posix_Syscall_lstat (const char *file_name, struct Mono_Posix_Stat *buf) r = -1; return r; } +#endif #ifdef HAVE_FSTATAT gint32 @@ -163,6 +171,7 @@ Mono_Posix_Syscall_fstatat (gint32 dirfd, const char *file_name, struct Mono_Pos } #endif +#ifndef HOST_WIN32 gint32 Mono_Posix_Syscall_mknod (const char *pathname, guint32 mode, mph_dev_t dev) { @@ -170,6 +179,7 @@ Mono_Posix_Syscall_mknod (const char *pathname, guint32 mode, mph_dev_t dev) return -1; return mknod (pathname, mode, dev); } +#endif #ifdef HAVE_MKNODAT gint32 @@ -203,6 +213,7 @@ Mono_Posix_Syscall_get_utime_omit () #endif } +#if defined(HAVE_FUTIMENS) || defined(HAVE_UTIMENSAT) static inline struct timespec* copy_utimens (struct timespec* to, struct Mono_Posix_Timespec *from) { @@ -216,6 +227,7 @@ copy_utimens (struct timespec* to, struct Mono_Posix_Timespec *from) return NULL; } +#endif #ifdef HAVE_FUTIMENS gint32