summaryrefslogtreecommitdiff
path: root/test/solid-pattern-cache-stress.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-01-10 14:47:16 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2008-01-10 14:47:16 +0000
commit9ae4b219e1c5b7a8c139b004a97d86a1ce1d408c (patch)
treeb7affdc7545c568db8d65b122eadb4d5e0edf793 /test/solid-pattern-cache-stress.c
parent648289c639618cc31394f889f6e329ddcaca41ee (diff)
[test/solid-pattern-cache-stress] Check for drand48().
Apply an alternative rand() function if drand48() is not available for the platform.
Diffstat (limited to 'test/solid-pattern-cache-stress.c')
-rw-r--r--test/solid-pattern-cache-stress.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/solid-pattern-cache-stress.c b/test/solid-pattern-cache-stress.c
index 93e2f697..957b2044 100644
--- a/test/solid-pattern-cache-stress.c
+++ b/test/solid-pattern-cache-stress.c
@@ -1,12 +1,12 @@
/*
- * Copyright ? 2007 Chris Wilson.
+ * Copyright © 2007 Chris Wilson.
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without
* fee, provided that the above copyright notice appear in all copies
* and that both that copyright notice and this permission notice
* appear in supporting documentation, and that the name of
- * Chris Wilson. not be used in advertising or publicity pertaining to
+ * Chris Wilson. Not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. Chris Wilson makes no representations about the
* suitability of this software for any purpose. It is provided "as
@@ -23,6 +23,10 @@
* Author: Chris Wilson <chris at chris-wilson.co.uk>
*/
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "cairo-test.h"
static cairo_test_draw_function_t draw;
@@ -39,6 +43,10 @@ cairo_test_t test = {
#define LOOPS 10
#define NRAND 100
+#ifndef HAVE_DRAND48
+#define drand48() (rand () / (double) RAND_MAX)
+#endif
+
static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
{