summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 03:03:29 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-21 03:03:29 +0000
commite8efd91a224204d0ead82f576404d5fb4d8a4f87 (patch)
tree8bdb4255302bf981ff02b49030671e4ec87fc031 /main.c
parentcafcb04d8f7df2ec571e4d7faf337ba37ae36609 (diff)
downloadruby-e8efd91a224204d0ead82f576404d5fb4d8a4f87.tar.gz
ruby-e8efd91a224204d0ead82f576404d5fb4d8a4f87.tar.xz
ruby-e8efd91a224204d0ead82f576404d5fb4d8a4f87.zip
* 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: http://svn.ruby-lang.org/repos/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 691cfcdd5..d1f275aa9 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);
{