thread_local support in MinGW seems to be buggy.

Fixes #325.

Change-Id: I4d3a2bde514283e15ac2ab6928428ea59ab9b2f0
Reviewed-on: https://code-review.googlesource.com/c/re2/+/59230
Reviewed-by: Paul Wankadia <junyer@google.com>
diff --git a/re2/re2.h b/re2/re2.h
index 09c1fbe..7fd2245 100644
--- a/re2/re2.h
+++ b/re2/re2.h
@@ -967,8 +967,11 @@
 // thread_local, but for the sake of brevity, we lump together all versions
 // of Apple platforms that aren't macOS. If an iOS application really needs
 // the context pointee someday, we can get more specific then...
+//
+// As per https://github.com/google/re2/issues/325, thread_local support in
+// MinGW seems to be buggy. (FWIW, Abseil folks also avoid it.)
 #define RE2_HAVE_THREAD_LOCAL
-#if defined(__APPLE__) && !TARGET_OS_OSX
+#if (defined(__APPLE__) && !TARGET_OS_OSX) || defined(__MINGW32__)
 #undef RE2_HAVE_THREAD_LOCAL
 #endif