Handle missing locale in test on more platforms (#2219)
* Add myself to AUTHORS and CONTRIBUTORS
* Improve accuracy of locale support check
It's much easier to list the two platforms libstdc++ does support
locale manipulation on than to try to exhaustively list the myriad
platforms where it does not.
diff --git a/AUTHORS b/AUTHORS
index 082422c..ab26bb3 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -10,6 +10,7 @@
Albert Pretorius <pretoalb@gmail.com>
Alex Steele <steeleal123@gmail.com>
+Alyssa Ross <hi@alyssa.is>
Andriy Berestovskyy <berestovskyy@gmail.com>
Arne Beer <arne@twobeer.de>
Benjamin King <kingbenja5@gmail.com>
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index f22a988..88c3b1b 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -25,6 +25,7 @@
Abhina Sreeskantharajan <abhina.sreeskantharajan@ibm.com>
Albert Pretorius <pretoalb@gmail.com>
Alex Steele <steelal123@gmail.com>
+Alyssa Ross <hi@alyssa.is>
Andriy Berestovskyy <berestovskyy@gmail.com>
Arne Beer <arne@twobeer.de>
Bátor Tallér <bator.taller@shapr3d.com>
diff --git a/test/locale_impermeability_test.cc b/test/locale_impermeability_test.cc
index 0776fe6..98982a6 100644
--- a/test/locale_impermeability_test.cc
+++ b/test/locale_impermeability_test.cc
@@ -10,9 +10,10 @@
namespace {
void BM_ostream(benchmark::State& state) {
-#if !defined(__MINGW64__) || defined(__clang__)
- // GCC-based versions of MINGW64 do not support locale manipulations,
- // don't run the test under them.
+#if !defined(__GLIBCXX__) || defined(__GLIBC__) || defined(__DragonFly__)
+ // libstdc++ only supports locale manipulations on GNU and
+ // DragonflyBSD platforms at the time of writing, don't run the test
+ // on other platforms when using libstdc++.
std::locale::global(std::locale("en_US.UTF-8"));
#endif
while (state.KeepRunning()) {