aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.c b/main.c
index 691cfcdd5b..d1f275aa99 100644
--- a/main.c
+++ b/main.c
@@ -12,7 +12,9 @@
#undef RUBY_EXPORT
#include "ruby/ruby.h"
+#ifdef LOCALE_H
#include <locale.h>
+#endif
RUBY_GLOBAL_SETUP
@@ -23,7 +25,9 @@ main(int argc, char **argv, char **envp)
extern void ruby_set_debug_option(const char *);
ruby_set_debug_option(getenv("RUBY_DEBUG"));
#endif
+#ifdef LOCALE_H
setlocale(LC_CTYPE, "");
+#endif
ruby_sysinit(&argc, &argv);
{