[前][次][番号順一覧][スレッド一覧]

ruby-changes:17855

From: shyouhei <ko1@a...>
Date: Mon, 22 Nov 2010 16:32:35 +0900 (JST)
Subject: [ruby-changes:17855] Ruby:r29867 (ruby_1_8_7): Mon, 22 Nov 2010 05:15:39 +0000 shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>

shyouhei	2010-11-22 16:22:26 +0900 (Mon, 22 Nov 2010)

  New Revision: 29867

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29867

  Log:
    Mon, 22 Nov 2010 05:15:39 +0000  shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
     merge revision(s) 29849:
     
     merge revision(s) 28835,28894:
     	* ext/win32ole/win32ole.c: NONAMELESSUNION defined only if gcc
     	  version is older than 3.4.4. [ruby-core:31567] [Bug #3637]
     	* ext/win32ole/extconf.rb: ditto.
     	* ext/win32ole/win32ole.c: fix checking version of GCC.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@29849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
    Signed-off-by: URABE, Shyouhei <shyouhei@r...>

  Modified files:
    branches/ruby_1_8_7/ChangeLog
    branches/ruby_1_8_7/ext/win32ole/extconf.rb
    branches/ruby_1_8_7/ext/win32ole/win32ole.c
    branches/ruby_1_8_7/version.h

Index: ruby_1_8_7/ext/win32ole/win32ole.c
===================================================================
--- ruby_1_8_7/ext/win32ole/win32ole.c	(revision 29866)
+++ ruby_1_8_7/ext/win32ole/win32ole.c	(revision 29867)
@@ -17,6 +17,20 @@
 
 #include "ruby.h"
 #include "st.h"
+
+#define GNUC_OLDER_3_4_4 \
+    ((__GNUC__ < 3) || \
+     ((__GNUC__ <= 3) && (__GNUC_MINOR__ < 4)) || \
+     ((__GNUC__ <= 3) && (__GNUC_MINOR__ <= 4) && (__GNUC_PATCHLEVEL__ <= 4)))
+
+#if (defined(__GNUC__)) && (GNUC_OLDER_3_4_4) 
+#ifndef NONAMELESSUNION
+#define NONAMELESSUNION 1
+#endif
+#endif
+
+#include <ctype.h>
+
 #include <windows.h>
 #include <ocidl.h>
 #include <olectl.h>
@@ -36,13 +50,13 @@
 #define DOUTI(x) fprintf(stderr, "[%ld]:" #x "=%d\n",__LINE__,x)
 #define DOUTD(x) fprintf(stderr, "[%d]:" #x "=%f\n",__LINE__,x)
 
-#if defined NONAMELESSUNION && __GNUC__
+#if (defined(__GNUC__)) && (GNUC_OLDER_3_4_4) 
 #define V_UNION1(X, Y) ((X)->u.Y)
 #else
 #define V_UNION1(X, Y) ((X)->Y)
 #endif
 
-#if defined NONAMELESSUNION && __GNUC__
+#if (defined(__GNUC__)) && (GNUC_OLDER_3_4_4) 
 #undef V_UNION
 #define V_UNION(X,Y) ((X)->n1.n2.n3.Y)
 
Index: ruby_1_8_7/ext/win32ole/extconf.rb
===================================================================
--- ruby_1_8_7/ext/win32ole/extconf.rb	(revision 29866)
+++ ruby_1_8_7/ext/win32ole/extconf.rb	(revision 29867)
@@ -35,7 +35,5 @@
 case RUBY_PLATFORM
 when /mswin32/
   $CFLAGS += ' /W3'
-when /cygwin/, /mingw/
-  $defs << '-DNONAMELESSUNION'
 end
 create_win32ole_makefile
Index: ruby_1_8_7/ChangeLog
===================================================================
--- ruby_1_8_7/ChangeLog	(revision 29866)
+++ ruby_1_8_7/ChangeLog	(revision 29867)
@@ -1,3 +1,13 @@
+Mon Nov 22 14:13:45 2010  Masaki Suketa <masaki.suketa@n...>
+
+	* ext/win32ole/win32ole.c: fix checking version of GCC.
+
+Mon Nov 22 14:13:45 2010  Masaki Suketa <masaki.suketa@n...>
+
+	* ext/win32ole/win32ole.c: NONAMELESSUNION defined only if gcc
+	  version is older than 3.4.4. [ruby-core:31567] [Bug #3637]
+	* ext/win32ole/extconf.rb: ditto.
+
 Fri Nov 19 19:28:00 2010  URABE Shyouhei  <shyouhei@r...>
 
 	* Makefile.in (fake.rb): hook needed to fake mkmf.rb.
Index: ruby_1_8_7/version.h
===================================================================
--- ruby_1_8_7/version.h	(revision 29866)
+++ ruby_1_8_7/version.h	(revision 29867)
@@ -2,7 +2,7 @@
 #define RUBY_RELEASE_DATE "2010-11-22"
 #define RUBY_VERSION_CODE 187
 #define RUBY_RELEASE_CODE 20101122
-#define RUBY_PATCHLEVEL 316
+#define RUBY_PATCHLEVEL 317
 
 #define RUBY_VERSION_MAJOR 1
 #define RUBY_VERSION_MINOR 8

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]