Bug #2760
unable to cross-compile win32.c
| Status: | Rejected | Start date: | 02/19/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | core | |||
| Target version: | - | |||
| ruby -v: | Revision: 26711 |
Description
win32/win32.c:4894: error: lvalue required as left operand of assignment
win32/win32.c:5016: error: lvalue required as left operand of assignment
This seems to help:
Index: win32/win32.c
===================================================================
--- win32/win32.c (revision 26711)
+++ win32/win32.c (working copy)
@@ -4891,7 +4891,7 @@
}
if (pol) {
- wait = rb_w32_wait_events_blocking(&ol.hEvent, 1, INFINITE);
+ wait = (DWORD) rb_w32_wait_events_blocking(&ol.hEvent, 1, INFINITE);
if (wait != WAIT_OBJECT_0) {
if (wait == WAIT_OBJECT_0 + 1)
errno = EINTR;
@@ -5013,7 +5013,7 @@
}
if (pol) {
- wait = rb_w32_wait_events_blocking(&ol.hEvent, 1, INFINITE);
+ wait = (DWORD) rb_w32_wait_events_blocking(&ol.hEvent, 1, INFINITE);
if (wait != WAIT_OBJECT_0) {
if (wait == WAIT_OBJECT_0 + 1)
errno = EINTR;
History
Updated by Yui NARUSE almost 2 years ago
- Category set to core
- Status changed from Open to Assigned
- Assignee set to Usaku NAKAMURA
Updated by Nobuyoshi Nakada almost 2 years ago
- Assignee changed from Usaku NAKAMURA to Nobuyoshi Nakada
I don't see such errors with i386-mingw32-gcc on darwin. gcc -v shows: $ i386-mingw32-gcc -v Reading specs from /opt/local/lib/gcc/i386-mingw32/3.4.5/specs Configured with: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_cross_i386-mingw32-gcc/work/gcc-3.4.5-20060117-1/configure --prefix=/opt/local --infodir=/opt/local/share/info --mandir=/opt/local/share/man --target=i386-mingw32 --without-newlib --disable-nls --with-gnu-as --with-gnu-ld --disable-multilib --with-gxx-include-dir=/opt/local/i386-mingw32/include/c++/3.4.5/ Thread model: single gcc version 3.4.5 (mingw special) It feels like wait macro is defined. What does this show? gcc -E win32/win32.c | fgrep '= rb_w32_wait_events_blocking'
Updated by Nobuyoshi Nakada almost 2 years ago
- Status changed from Assigned to Feedback
Updated by Yusuke Endoh almost 2 years ago
Hi, Roger Could you answer to nobu? -- Yusuke Endoh <mame@tsg.ne.jp>
Updated by Roger Pack almost 2 years ago
ruby_trunk$ gcc -Iinclude -E win32/win32.c 2>&1 | fgrep '= rb_w32_wait_events_blocking'
ret = rb_w32_wait_events_blocking(events, count, timeout);
wait = rb_w32_wait_events_blocking(&ol.hEvent, 1, INFINITE);
wait = rb_w32_wait_events_blocking(&ol.hEvent, 1, INFINITE);
ruby_trunk$ i586-mingw32msvc-gcc win32/win32.c 2>&1 | grep lvalue
win32/win32.c:4320: error: lvalue required as decrement operand
win32/win32.c:4321: error: lvalue required as increment operand
win32/win32.c:4340: error: lvalue required as decrement operand
win32/win32.c:4341: error: lvalue required as increment operand
Unfortunately I didn't actually try cross-compiling (just compiling), so it's possible that this is not a real problem. Hope to do a real build this weekend.
-rp
Updated by Luis Lavena almost 2 years ago
I can confirm that up to latest revision (r27432) trunk is cross compilable with GCC 3.4.5 (mingw32 from macports) -- Luis Lavena
Updated by Yusuke Endoh over 1 year ago
Hi, Roger Any update here? -- Yusuke Endoh <mame@tsg.ne.jp>
Updated by Roger Pack over 1 year ago
- Status changed from Feedback to Rejected