[ppapi] undef MemoryBarrier on Windows to avoid atomicops clash

MemoryBarrier is a macro in some versions of the Win32 API and it's
also a name in the base/atomicops.h API. If windows.h is included
after atomicops.h, further use of the atomicops API will fail
unless MemoryBarrier is undefined. See base/atomicops.h for more info.

Bug: 898475
Change-Id: I4a4be93d534f54a5758dc09d1b1e52c1f2bee79c
Reviewed-on: https://chromium-review.googlesource.com/c/1299139
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Original-Commit-Position: refs/heads/master@{#602793}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 59d3fd6aa036223e9002b2b215a98cc9fe73bc16
diff --git a/utility/threading/lock.h b/utility/threading/lock.h
index f3bfe4a..fefe321 100644
--- a/utility/threading/lock.h
+++ b/utility/threading/lock.h
@@ -7,6 +7,9 @@
 
 #ifdef WIN32
 #include <windows.h>
+// MemoryBarrier is a Win32 macro that clashes with MemoryBarrier in
+// base/atomicops.h.
+#undef MemoryBarrier
 #else
 #include <pthread.h>
 #endif
diff --git a/utility/threading/simple_thread.h b/utility/threading/simple_thread.h
index b4d7114..d10c859 100644
--- a/utility/threading/simple_thread.h
+++ b/utility/threading/simple_thread.h
@@ -8,6 +8,9 @@
 #include <stddef.h>
 #ifdef WIN32
 #include <windows.h>
+// MemoryBarrier is a Win32 macro that clashes with MemoryBarrier in
+// base/atomicops.h.
+#undef MemoryBarrier
 #else
 #include <pthread.h>
 #endif