summaryrefslogtreecommitdiffstats
path: root/config/uselocale.c
diff options
context:
space:
mode:
Diffstat (limited to 'config/uselocale.c')
-rw-r--r--config/uselocale.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/config/uselocale.c b/config/uselocale.c
new file mode 100644
index 0000000..a712ff8
--- /dev/null
+++ b/config/uselocale.c
@@ -0,0 +1,9 @@
+// Copyright © Tavian Barnes <tavianator@tavianator.com>
+// SPDX-License-Identifier: 0BSD
+
+#include <locale.h>
+
+int main(void) {
+ locale_t locale = uselocale((locale_t)0);
+ return locale == LC_GLOBAL_LOCALE;
+}