summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 03:03:29 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 03:03:29 (GMT)
commitf2515d9938213ec99362c9f0e7d7fa6e6afc04dc (patch)
tree8bdb4255302bf981ff02b49030671e4ec87fc031 /main.c
parent7a34e08d847ab72508c8714bfc76687e00a750f6 (diff)
* configure.in: check langinfo.h and locale.h.
* encoding.c: use langinfo.h only if available. * main.c: use locale.h only if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 691cfcd..d1f275a 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);
{