[llvm-commits] [test-suite] r42667 - in /test-suite/trunk/MultiSource: Applications/SIBsim4/sim4.init.c Applications/lambda-0.1.3/lambda.cc Benchmarks/FreeBench/analyzer/analyzer.c Benchmarks/FreeBench/distray/distray.c Benchmarks/FreeBench/fourinarow/fourinarow.c Benchmarks/MallocBench/espresso/utility.c Benchmarks/Olden/bh/util.c Benchmarks/Olden/em3d/util.c Benchmarks/Olden/tsp/build.c Benchmarks/Olden/tsp/tsp.h Benchmarks/Olden/voronoi/newvor.c Benchmarks/sim/sim.c
Anton Korobeynikov
asl at math.spbu.ru
Fri Oct 5 17:04:11 PDT 2007
Author: asl
Date: Fri Oct 5 19:04:11 2007
New Revision: 42667
URL: http://llvm.org/viewvc/llvm-project?rev=42667&view=rev
Log:
Another bunch of mingw32 fixes here and there
Modified:
test-suite/trunk/MultiSource/Applications/SIBsim4/sim4.init.c
test-suite/trunk/MultiSource/Applications/lambda-0.1.3/lambda.cc
test-suite/trunk/MultiSource/Benchmarks/FreeBench/analyzer/analyzer.c
test-suite/trunk/MultiSource/Benchmarks/FreeBench/distray/distray.c
test-suite/trunk/MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow.c
test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/utility.c
test-suite/trunk/MultiSource/Benchmarks/Olden/bh/util.c
test-suite/trunk/MultiSource/Benchmarks/Olden/em3d/util.c
test-suite/trunk/MultiSource/Benchmarks/Olden/tsp/build.c
test-suite/trunk/MultiSource/Benchmarks/Olden/tsp/tsp.h
test-suite/trunk/MultiSource/Benchmarks/Olden/voronoi/newvor.c
test-suite/trunk/MultiSource/Benchmarks/sim/sim.c
Modified: test-suite/trunk/MultiSource/Applications/SIBsim4/sim4.init.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/SIBsim4/sim4.init.c?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Applications/SIBsim4/sim4.init.c (original)
+++ test-suite/trunk/MultiSource/Applications/SIBsim4/sim4.init.c Fri Oct 5 19:04:11 2007
@@ -119,7 +119,9 @@
if (setlocale(LC_ALL, "POSIX") == NULL)
fprintf(stderr, "%s: Warning: could not set locale to POSIX\n", argv[0]);
signal(SIGSEGV, bug_handler);
+#ifndef __MINGW32__
signal(SIGBUS, bug_handler);
+#endif
/* Default options. */
options.C = DEFAULT_C;
options.cutoff = DIST_CUTOFF;
Modified: test-suite/trunk/MultiSource/Applications/lambda-0.1.3/lambda.cc
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/lambda-0.1.3/lambda.cc?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Applications/lambda-0.1.3/lambda.cc (original)
+++ test-suite/trunk/MultiSource/Applications/lambda-0.1.3/lambda.cc Fri Oct 5 19:04:11 2007
@@ -38,11 +38,7 @@
#include <sys/param.h>
#endif
-#ifdef WIN32
-void
-#else
int
-#endif
main(int argc, char** argv)
{
printf(
@@ -233,8 +229,6 @@
}
}
tokstr.close();
-#ifndef WIN32
return 0;
-#endif
}
Modified: test-suite/trunk/MultiSource/Benchmarks/FreeBench/analyzer/analyzer.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/FreeBench/analyzer/analyzer.c?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/FreeBench/analyzer/analyzer.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/FreeBench/analyzer/analyzer.c Fri Oct 5 19:04:11 2007
@@ -2,7 +2,6 @@
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
-#include <sys/resource.h>
#include <unistd.h>
#include "version.h"
#include "types.h"
Modified: test-suite/trunk/MultiSource/Benchmarks/FreeBench/distray/distray.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/FreeBench/distray/distray.c?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/FreeBench/distray/distray.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/FreeBench/distray/distray.c Fri Oct 5 19:04:11 2007
@@ -2,7 +2,6 @@
#include <math.h>
#include <stdlib.h>
#include <sys/time.h>
-#include <sys/resource.h>
#include <unistd.h>
/* Simple raytracer
Modified: test-suite/trunk/MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow.c?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/FreeBench/fourinarow/fourinarow.c Fri Oct 5 19:04:11 2007
@@ -31,7 +31,6 @@
#include <string.h>
#include <stdlib.h>
#include <sys/time.h>
-#include <sys/resource.h>
#include <unistd.h>
/* 64 bit type needed */
Modified: test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/utility.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/utility.c?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/utility.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/MallocBench/espresso/utility.c Fri Oct 5 19:04:11 2007
@@ -36,8 +36,12 @@
#endif
#endif
+#ifdef __MINGW32__
+#define IBMPC
+#endif
+
/* default */
-#if !defined(BSD) && !defined(UNIX10) && !defined(UNIX60) && !defined(UNIX100) && !defined(UNIX50)
+#if !defined(BSD) && !defined(UNIX10) && !defined(UNIX60) && !defined(UNIX100) && !defined(UNIX50) && !defined(IBMPC)
#define BSD
#endif
Modified: test-suite/trunk/MultiSource/Benchmarks/Olden/bh/util.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/Olden/bh/util.c?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/Olden/bh/util.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/Olden/bh/util.c Fri Oct 5 19:04:11 2007
@@ -43,24 +43,6 @@
/*
- * CPUTIME: compute CPU time in min.
- */
-
-#include <sys/types.h>
-#include <sys/times.h>
-
-# define HZ 60.0
-
-double cputime()
-{
- struct tms buffer;
-
- if (times(&buffer) == -1)
- error("times() call failed\n");
- return (buffer.tms_utime / (60.0 * HZ));
-}
-
-/*
* ERROR: scream and die quickly.
*/
Modified: test-suite/trunk/MultiSource/Benchmarks/Olden/em3d/util.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/Olden/em3d/util.c?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/Olden/em3d/util.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/Olden/em3d/util.c Fri Oct 5 19:04:11 2007
@@ -7,7 +7,13 @@
#define chatting printf
#endif
+#ifdef __MINGW32__
+#define srand48(x) srand(x)
+#define lrand48() (rand() << 16 | rand())
+#define drand48() (1.0*rand() / RAND_MAX)
+#else
extern double drand48();
+#endif
static int percentcheck=0,numlocal=0;
Modified: test-suite/trunk/MultiSource/Benchmarks/Olden/tsp/build.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/Olden/tsp/build.c?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/Olden/tsp/build.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/Olden/tsp/build.c Fri Oct 5 19:04:11 2007
@@ -17,6 +17,10 @@
#ifdef TORONTO
#include <math.h>
+#ifdef __MINGW32__
+#define drand48() (1.0 * rand() / RAND_MAX)
+#define srand48(x) srand(x)
+#endif
#else
extern double drand48();
extern void srand48(long seedval);
Modified: test-suite/trunk/MultiSource/Benchmarks/Olden/tsp/tsp.h
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/Olden/tsp/tsp.h?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/Olden/tsp/tsp.h (original)
+++ test-suite/trunk/MultiSource/Benchmarks/Olden/tsp/tsp.h Fri Oct 5 19:04:11 2007
@@ -7,7 +7,6 @@
extern int flag;
-double drand48(void);
int atoi(const char *);
int dealwithargs(int argc, char *argv[]);
Modified: test-suite/trunk/MultiSource/Benchmarks/Olden/voronoi/newvor.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/Olden/voronoi/newvor.c?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/Olden/voronoi/newvor.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/Olden/voronoi/newvor.c Fri Oct 5 19:04:11 2007
@@ -165,7 +165,7 @@
void delete_all_edges() { next_edge= 0; avail_edge = NYL;}
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__MINGW32__)
#define MEMALIGN_IS_NOT_AVAILABLE
#endif
Modified: test-suite/trunk/MultiSource/Benchmarks/sim/sim.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/sim/sim.c?rev=42667&r1=42666&r2=42667&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/sim/sim.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/sim/sim.c Fri Oct 5 19:04:11 2007
@@ -88,6 +88,10 @@
#include <string.h>
#define long int
+#ifdef __MINGW32__
+#undef UNIX
+#endif
+
/* ckalloc - allocate space; check for success */
#if 1
#define ckalloc(x) malloc(x)
More information about the llvm-commits
mailing list