aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--configure.in17
2 files changed, 21 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d79cb78943..6020f8d35e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Wed Jun 13 15:12:07 2012 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * configure.in: On Windows platforms, system provided headers are
+ VC++ optimized. That is, C++ habits are often contaminated into
+ various headers. Most frequent situation is the use of //
+ comments. We bypass ANSI C mode for them. Otherwise extension
+ libs cannot include those headers.
+
Wed Jun 13 13:39:23 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/win32.h: get rid of C99 style one line comments.
diff --git a/configure.in b/configure.in
index 8c50ef511e..ab53e8a2c2 100644
--- a/configure.in
+++ b/configure.in
@@ -610,10 +610,19 @@ if test "$GCC" = yes; then
RUBY_APPEND_OPTION(LDFLAGS, -fstack-protector)
fi
- # ANSI (no XCFLAGS because this is C only)
- RUBY_TRY_CFLAGS(-ansi -std=iso9899:199409, [
- RUBY_APPEND_OPTION(warnflags, -ansi -std=iso9899:199409)
- RUBY_APPEND_OPTION(rb_cv_warnflags, -ansi -std=iso9899:199409)
+ AS_CASE(["$target_os"],[mingw*], [
+ # On Windows platforms, system provided headers are VC++
+ # optimized. That is, C++ habits are often contaminated into
+ # various headers. Most frequent situation is the use of //
+ # comments. We bypass ANSI C mode for them. Otherwise
+ # extension libs cannot include those headers.
+ ],
+ [
+ # ANSI (no XCFLAGS because this is C only)
+ RUBY_TRY_CFLAGS(-ansi -std=iso9899:199409, [
+ RUBY_APPEND_OPTION(warnflags, -ansi -std=iso9899:199409)
+ RUBY_APPEND_OPTION(rb_cv_warnflags, -ansi -std=iso9899:199409)
+ ])
])
# suppress annoying -Wstrict-overflow warnings