mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6198f539bb
commit
d4fc0799b7
3 changed files with 16 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
Mon Aug 2 21:16:03 2010 Masaki Suketa <masaki.suketa@nifty.ne.jp>
|
||||
|
||||
* 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.
|
||||
|
||||
Mon Aug 2 16:34:32 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* thread_win32.c (native_thread_join): need to wait thread, of course.
|
||||
|
|
|
@ -38,7 +38,5 @@ end
|
|||
case RUBY_PLATFORM
|
||||
when /mswin/
|
||||
$CFLAGS += ' /W3'
|
||||
when /cygwin/, /mingw/
|
||||
$defs << '-DNONAMELESSUNION'
|
||||
end
|
||||
create_win32ole_makefile
|
||||
|
|
|
@ -18,7 +18,15 @@
|
|||
#include "ruby/ruby.h"
|
||||
#include "ruby/st.h"
|
||||
#include "ruby/encoding.h"
|
||||
|
||||
#if (defined(__GNUC__)) && (__GNUC__ <= 3) && (__GNUC_MINOR__ <= 4) && (__GNUC_PATCHLEVEL__ <= 4)
|
||||
#ifndef NONAMELESSUNION
|
||||
#define NONAMELESSUNION 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include <windows.h>
|
||||
#include <ocidl.h>
|
||||
#include <olectl.h>
|
||||
|
@ -43,13 +51,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__ <= 3) && (__GNUC_MINOR__ <= 4) && (__GNUC_PATCHLEVEL__ <= 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__ <= 3) && (__GNUC_MINOR__ <= 4) && (__GNUC_PATCHLEVEL__ <= 4)
|
||||
#undef V_UNION
|
||||
#define V_UNION(X,Y) ((X)->n1.n2.n3.Y)
|
||||
|
||||
|
|
Loading…
Reference in a new issue