Project

General

Profile

Actions

Bug #3636

closed

win32ole, is U_UI2REF or V_UI2REF?

Added by luislavena (Luis Lavena) over 14 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32]
Backport:
[ruby-core:31564]

Description

=begin
Hello,

Looking into a cross-compilation bug, found the following define in ext/win32ole/win32ole.c, line 67:

#ifndef U_UI2REF
#define V_UI2REF(X) V_UNION(X, puiVal)
#endif

Looks like a typo, as I receive the following message using mingw-w64 targetting w32:

/Users/luis/projects/oss/ruby/ext/win32ole/win32ole.c:67:0: warning: "V_UI2REF" redefined [enabled by default]
/Users/luis/mingw/w32/bin/../lib/gcc/i686-w64-mingw32/4.6.0/../../../../i686-w64-mingw32/include/oleauto.h:685:0: note: this is the location of the previous definition

The following change resolves the warning:

diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c
index 98a9380..3f0889f 100644
--- a/ext/win32ole/win32ole.c
+++ b/ext/win32ole/win32ole.c
@@ -64,7 +64,7 @@
#define V_I1REF(X) V_UNION(X, pcVal)
#endif

-#ifndef U_UI2REF
+#ifndef V_UI2REF
#define V_UI2REF(X) V_UNION(X, puiVal)
#endif

Thank you.
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0