aboutsummaryrefslogtreecommitdiff
path: root/life2x
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-02-25 00:41:47 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2009-02-25 00:41:47 +0000
commit5e3413c564c4528222e09302437a44ede8f29d09 (patch)
tree0931d0d56b347c9dc7ef25c7d6553a221188b879 /life2x
parent47cbcf2430165bdfb84fb0cc97a338f2ed201116 (diff)
added workaround for missing random() and srandom() on Windows
svn path=/trunk/externals/mrpeach/; revision=10815
Diffstat (limited to 'life2x')
-rw-r--r--life2x/life2x.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/life2x/life2x.c b/life2x/life2x.c
index fda90b8..2ae164e 100644
--- a/life2x/life2x.c
+++ b/life2x/life2x.c
@@ -12,6 +12,11 @@
#include <stdlib.h> /* for random() */
#include <time.h> /* for clock() */
+#ifdef _WIN32 /* Windows doesn't have these named correctly ;) */
+# define random rand
+# define srandom srand
+#endif
+
#define MAXSIZE 1024
#define DEFAULT_DIM 16