aboutsummaryrefslogtreecommitdiff
path: root/pixman/test
diff options
context:
space:
mode:
Diffstat (limited to 'pixman/test')
-rw-r--r--pixman/test/glyph-test.c4
-rw-r--r--pixman/test/utils.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/pixman/test/glyph-test.c b/pixman/test/glyph-test.c
index 9dd5b41e4..501cc2e6f 100644
--- a/pixman/test/glyph-test.c
+++ b/pixman/test/glyph-test.c
@@ -215,8 +215,8 @@ create_image (int max_size, const pixman_format_code_t *formats, uint32_t flags)
return image;
}
-#define KEY1(p) ((void *)(((unsigned long)p) ^ (0xa7e23dfaUL)))
-#define KEY2(p) ((void *)(((unsigned long)p) ^ (0xabcd9876UL)))
+#define KEY1(p) ((void *)(((uintptr_t)p) ^ (0xa7e23dfaUL)))
+#define KEY2(p) ((void *)(((uintptr_t)p) ^ (0xabcd9876UL)))
#define MAX_GLYPHS 32
diff --git a/pixman/test/utils.c b/pixman/test/utils.c
index 716bb7594..c887a6db9 100644
--- a/pixman/test/utils.c
+++ b/pixman/test/utils.c
@@ -377,7 +377,7 @@ fence_malloc (int64_t len)
return NULL;
}
- initial_page = (uint8_t *)(((unsigned long)addr + page_mask) & ~page_mask);
+ initial_page = (uint8_t *)(((uintptr_t)addr + page_mask) & ~page_mask);
leading_protected = initial_page + page_size;
payload = leading_protected + N_LEADING_PROTECTED * page_size;
trailing_protected = payload + n_payload_bytes;
@@ -694,6 +694,8 @@ get_random_seed (void)
return lcg_rand_u32 ();
}
+#ifdef HAVE_SIGACTION
+#ifdef HAVE_ALARM
static const char *global_msg;
static void
@@ -702,6 +704,8 @@ on_alarm (int signo)
printf ("%s\n", global_msg);
exit (1);
}
+#endif
+#endif
void
fail_after (int seconds, const char *msg)