Move includes outside of the re2 namespace
With the latest libc++, threads header no longer includes pthread.h,
which means that util/mutex.h now includes pthread.h but it does so
inside the re2 namespace which breaks compilation.
Change-Id: If8f40f3f7c6891f9584b5cac55c0e54fe2ca96cf
diff --git a/util/mutex.h b/util/mutex.h
index 3bb0602..66b11dd 100644
--- a/util/mutex.h
+++ b/util/mutex.h
@@ -15,8 +15,6 @@
#include <unistd.h> // For POSIX options
#endif
-namespace re2 {
-
#if !defined(_WIN32)
// Possible values of POSIX options:
// -1 means not supported,
@@ -71,6 +69,8 @@
# error Need to implement mutex.h for your architecture, or #define NO_THREADS
#endif
+namespace re2 {
+
class Mutex {
public:
// Create a Mutex that is not held by anybody.