Fix build on OpenBSD/i386.
authoryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 Sep 2012 07:56:15 +0000 (07:56 +0000)
committeryangguo@chromium.org <yangguo@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 17 Sep 2012 07:56:15 +0000 (07:56 +0000)
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
src/platform.h

index e2057ed..1f0c44a 100644 (file)
@@ -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;
index a32fbbc..f50e713 100644 (file)
@@ -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;