From 83c5219287937d3dffe60ebd85a5c1f808006238 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Mon, 1 Nov 2010 12:43:59 +0000 Subject: * main.c: is needed, to introduce the getenv(3) prototype declaration. Without it a C compiler shall infer the getenv type as "int getenv(...);", but this is totally wrong, especially when your machine's sizeof(int) and sizeof(char*) differs. On such environment a return value of getenv(3), which is in fact a char*, might first casted into a int (loses data here), and then casted back to char* by automatic integral promotion fo fit to the prototype of ruby_set_debug_option(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- main.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index a782939ff3..e100cddba5 100644 --- a/main.c +++ b/main.c @@ -15,6 +15,9 @@ #ifdef HAVE_LOCALE_H #include #endif +#ifdef RUBY_DEBUG_ENV +#include +#endif RUBY_GLOBAL_SETUP -- cgit v1.2.3