aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2007-10-06 10:37:39 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2007-10-06 10:37:39 +0000
commit8f02d3afc9d3ce7f38ee82487f937a0e28915072 (patch)
treee078fe4dd0880db1185aea1a2cf593b3460d3363
parent05955cb5fa8731ecc49480f854d335019c607993 (diff)
Unbreak mediabench on mingw32
git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@42693 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--MultiSource/Benchmarks/mediabench/gsm/toast/config.h5
-rw-r--r--MultiSource/Benchmarks/mediabench/gsm/toast/toast.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/MultiSource/Benchmarks/mediabench/gsm/toast/config.h b/MultiSource/Benchmarks/mediabench/gsm/toast/config.h
index 1e92e4d0..e50ece71 100644
--- a/MultiSource/Benchmarks/mediabench/gsm/toast/config.h
+++ b/MultiSource/Benchmarks/mediabench/gsm/toast/config.h
@@ -18,8 +18,13 @@
/*efine HAS_ERRNO_DECL 1 /* errno.h declares errno */
#define HAS_FSTAT 1 /* fstat syscall */
+#ifndef __MINGW32__
#define HAS_FCHMOD 1 /* fchmod syscall */
#define HAS_FCHOWN 1 /* fchown syscall */
+#else
+#undef HAS_FCHMOD
+#undef HAS_FCHOWN
+#endif
#define HAS_STRING_H 1 /* /usr/include/string.h */
/*efine HAS_STRINGS_H 1 /* /usr/include/strings.h */
diff --git a/MultiSource/Benchmarks/mediabench/gsm/toast/toast.c b/MultiSource/Benchmarks/mediabench/gsm/toast/toast.c
index 898ee956..6af4fd85 100644
--- a/MultiSource/Benchmarks/mediabench/gsm/toast/toast.c
+++ b/MultiSource/Benchmarks/mediabench/gsm/toast/toast.c
@@ -338,8 +338,10 @@ static void update_own P0()
if (!instat.st_nlink) return; /* couldn't stat in */
#ifdef HAS_FCHOWN
(void)fchown(fileno(out), instat.st_uid, instat.st_gid);
-#else
+#else
+#ifndef __MINGW32__
(void)chown(outname, instat.st_uid, instat.st_gid);
+#endif
#endif /* HAS_FCHOWN */
}