From 70e09a7e226d74db74e608ce23a5361d7c7f9d36 Mon Sep 17 00:00:00 2001 From: "yangguo@chromium.org" Date: Mon, 17 Sep 2012 07:56:15 +0000 Subject: [PATCH] Fix build on OpenBSD/i386. BUG=v8:1445 Review URL: https://chromiumcodereview.appspot.com/10919314 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12522 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/atomicops.h | 4 ++++ src/platform.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/atomicops.h b/src/atomicops.h index e2057ed..1f0c44a 100644 --- a/src/atomicops.h +++ b/src/atomicops.h @@ -69,7 +69,11 @@ typedef intptr_t Atomic64; // Use AtomicWord for a machine-sized pointer. It will use the Atomic32 or // Atomic64 routines below, depending on your architecture. +#if defined(__OpenBSD__) && defined(__i386__) +typedef Atomic32 AtomicWord; +#else typedef intptr_t AtomicWord; +#endif // Atomically execute: // result = *ptr; diff --git a/src/platform.h b/src/platform.h index a32fbbc..f50e713 100644 --- a/src/platform.h +++ b/src/platform.h @@ -107,7 +107,11 @@ namespace internal { // Use AtomicWord for a machine-sized pointer. It is assumed that // reads and writes of naturally aligned values of this type are atomic. +#if defined(__OpenBSD__) && defined(__i386__) +typedef Atomic32 AtomicWord; +#else typedef intptr_t AtomicWord; +#endif class Semaphore; class Mutex; -- 2.7.4