Bug #2760
closedunable to cross-compile win32.c
Description
=begin
:~/ruby_trunk$ gcc win32/win32.c 2>&1 | grep lvalue
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;
=end
Updated by naruse (Yui NARUSE) about 14 years ago
- Category set to core
- Status changed from Open to Assigned
- Assignee set to usa (Usaku NAKAMURA)
=begin
=end
Updated by nobu (Nobuyoshi Nakada) about 14 years ago
- Assignee changed from usa (Usaku NAKAMURA) to nobu (Nobuyoshi Nakada)
=begin
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'
=end
Updated by nobu (Nobuyoshi Nakada) about 14 years ago
- Status changed from Assigned to Feedback
=begin
=end
Updated by mame (Yusuke Endoh) about 14 years ago
Updated by rogerdpack (Roger Pack) about 14 years ago
=begin
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
=end
Updated by luislavena (Luis Lavena) about 14 years ago
=begin
I can confirm that up to latest revision (r27432) trunk is cross compilable with GCC 3.4.5 (mingw32 from macports)
--
Luis Lavena
=end
Updated by mame (Yusuke Endoh) almost 14 years ago
Updated by rogerdpack (Roger Pack) almost 14 years ago
- Status changed from Feedback to Rejected
=begin
=end