Project

General

Profile

Actions

Bug #3092

closed

IO Broken with Latest Windows

Added by cfis (Charlie Savage) over 14 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 1.9.2dev (2010-04-05) [i386-mswin32_100]
Backport:
[ruby-core:29255]

Description

=begin
Compiling with VC 2010, ruby IO is broken. The specific error is WSAEWOULDBLOCK; 10035. Resource temporarily unavailable.

io.c is dependent on EWOULDBLOCK being equal to WSAEWOULDBLOCK on windows. This is done on line 405 of include/win32.h:

#define EWOULDBLOCK WSAEWOULDBLOCK

Except this no longer works, because VC 2010 in errno.h on line 132 defines:

#define EWOULDBLOCK 140

Thus EWOULDBLOCK != WSAEWOULDBLOCK, and ruby io totally breaks.

Patch is attached.
=end


Files

win32_io.patch (792 Bytes) win32_io.patch cfis (Charlie Savage), 04/05/2010 12:20 PM
Actions #1

Updated by usa (Usaku NAKAMURA) over 14 years ago

  • Status changed from Open to Feedback
  • Assignee set to usa (Usaku NAKAMURA)
  • Priority changed from 5 to Normal

=begin
I've checked in a patch based on yours.
Would you mind testing it, Charlie?
=end

Actions #2

Updated by cfis (Charlie Savage) over 14 years ago

=begin
Hi Usaka,

Yes, this fixes the main problem - IO now works!

However, this bit though doesn't work:

ifndef EWOULDBLOCK /* VC10 has this */
#define EWOULDBLOCK WSAEWOULDBLOCK
#endif

The reason is that errno.h is loaded after ruby/win32.h. So when building ruby with VC 2010 you see lots of errors like I have pasted below. Not sure what the best way to solve it is, but there are a lot of them now. From errno.h shipped with VC 2010 beta:

/* POSIX SUPPLEMENT */
#define EADDRINUSE 100
#define EADDRNOTAVAIL 101
#define EAFNOSUPPORT 102
#define EALREADY 103
#define EBADMSG 104
#define ECANCELED 105
#define ECONNABORTED 106
#define ECONNREFUSED 107
#define ECONNRESET 108
#define EDESTADDRREQ 109
#define EHOSTUNREACH 110
#define EIDRM 111
#define EINPROGRESS 112
#define EISCONN 113
#define ELOOP 114
#define EMSGSIZE 115
#define ENETDOWN 116
#define ENETRESET 117
#define ENETUNREACH 118
#define ENOBUFS 119
#define ENODATA 120
#define ENOLINK 121
#define ENOMSG 122
#define ENOPROTOOPT 123
#define ENOSR 124
#define ENOSTR 125
#define ENOTCONN 126
#define ENOTRECOVERABLE 127
#define ENOTSOCK 128
#define ENOTSUP 129
#define EOPNOTSUPP 130
#define EOTHER 131
#define EOVERFLOW 132
#define EOWNERDEAD 133
#define EPROTO 134
#define EPROTONOSUPPORT 135
#define EPROTOTYPE 136
#define ETIME 137
#define ETIMEDOUT 138
#define ETXTBSY 139
#define EWOULDBLOCK 140

So then this results in the below list of warnings.

Minor, and can be ignored, but would be nice to eliminate the noise. Maybe include a check against VC2010 and don't define all these contants?


cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Fovm.obj -c -Tcvm.c
vm.c
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : warning C4005: 'EADDRINUSE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(419) : see previous definition of 'EADDRINUSE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(93) : warning C4005: 'EADDRNOTAVAIL' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(420) : see previous definition of 'EADDRNOTAVAIL'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(94) : warning C4005: 'EAFNOSUPPORT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(418) : see previous definition of 'EAFNOSUPPORT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(95) : warning C4005: 'EALREADY' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(408) : see previous definition of 'EALREADY'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(98) : warning C4005: 'ECONNABORTED' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(424) : see previous definition of 'ECONNABORTED'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(99) : warning C4005: 'ECONNREFUSED' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(432) : see previous definition of 'ECONNREFUSED'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(100) : warning C4005: 'ECONNRESET' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(425) : see previous definition of 'ECONNRESET'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(101) : warning C4005: 'EDESTADDRREQ' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(410) : see previous definition of 'EDESTADDRREQ'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(102) : warning C4005: 'EHOSTUNREACH' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(436) : see previous definition of 'EHOSTUNREACH'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(104) : warning C4005: 'EINPROGRESS' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(407) : see previous definition of 'EINPROGRESS'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(105) : warning C4005: 'EISCONN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(427) : see previous definition of 'EISCONN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(106) : warning C4005: 'ELOOP' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(433) : see previous definition of 'ELOOP'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(107) : warning C4005: 'EMSGSIZE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(411) : see previous definition of 'EMSGSIZE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(108) : warning C4005: 'ENETDOWN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(421) : see previous definition of 'ENETDOWN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(109) : warning C4005: 'ENETRESET' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(423) : see previous definition of 'ENETRESET'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(110) : warning C4005: 'ENETUNREACH' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(422) : see previous definition of 'ENETUNREACH'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(111) : warning C4005: 'ENOBUFS' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(426) : see previous definition of 'ENOBUFS'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(115) : warning C4005: 'ENOPROTOOPT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(413) : see previous definition of 'ENOPROTOOPT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(118) : warning C4005: 'ENOTCONN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(428) : see previous definition of 'ENOTCONN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(120) : warning C4005: 'ENOTSOCK' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(409) : see previous definition of 'ENOTSOCK'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(122) : warning C4005: 'EOPNOTSUPP' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(416) : see previous definition of 'EOPNOTSUPP'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(127) : warning C4005: 'EPROTONOSUPPORT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(414) : see previous definition of 'EPROTONOSUPPORT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(128) : warning C4005: 'EPROTOTYPE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(412) : see previous definition of 'EPROTOTYPE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(130) : warning C4005: 'ETIMEDOUT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(431) : see previous definition of 'ETIMEDOUT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(132) : warning C4005: 'EWOULDBLOCK' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(405) : see previous definition of 'EWOULDBLOCK'
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Fovm_dump.obj -c -Tcvm_dump.c
vm_dump.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Fothread.obj -c -Tcthread.c
thread.c
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : warning C4005: 'EADDRINUSE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(419) : see previous definition of 'EADDRINUSE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(93) : warning C4005: 'EADDRNOTAVAIL' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(420) : see previous definition of 'EADDRNOTAVAIL'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(94) : warning C4005: 'EAFNOSUPPORT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(418) : see previous definition of 'EAFNOSUPPORT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(95) : warning C4005: 'EALREADY' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(408) : see previous definition of 'EALREADY'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(98) : warning C4005: 'ECONNABORTED' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(424) : see previous definition of 'ECONNABORTED'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(99) : warning C4005: 'ECONNREFUSED' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(432) : see previous definition of 'ECONNREFUSED'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(100) : warning C4005: 'ECONNRESET' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(425) : see previous definition of 'ECONNRESET'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(101) : warning C4005: 'EDESTADDRREQ' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(410) : see previous definition of 'EDESTADDRREQ'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(102) : warning C4005: 'EHOSTUNREACH' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(436) : see previous definition of 'EHOSTUNREACH'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(104) : warning C4005: 'EINPROGRESS' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(407) : see previous definition of 'EINPROGRESS'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(105) : warning C4005: 'EISCONN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(427) : see previous definition of 'EISCONN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(106) : warning C4005: 'ELOOP' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(433) : see previous definition of 'ELOOP'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(107) : warning C4005: 'EMSGSIZE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(411) : see previous definition of 'EMSGSIZE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(108) : warning C4005: 'ENETDOWN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(421) : see previous definition of 'ENETDOWN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(109) : warning C4005: 'ENETRESET' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(423) : see previous definition of 'ENETRESET'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(110) : warning C4005: 'ENETUNREACH' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(422) : see previous definition of 'ENETUNREACH'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(111) : warning C4005: 'ENOBUFS' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(426) : see previous definition of 'ENOBUFS'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(115) : warning C4005: 'ENOPROTOOPT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(413) : see previous definition of 'ENOPROTOOPT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(118) : warning C4005: 'ENOTCONN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(428) : see previous definition of 'ENOTCONN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(120) : warning C4005: 'ENOTSOCK' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(409) : see previous definition of 'ENOTSOCK'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(122) : warning C4005: 'EOPNOTSUPP' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(416) : see previous definition of 'EOPNOTSUPP'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(127) : warning C4005: 'EPROTONOSUPPORT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(414) : see previous definition of 'EPROTONOSUPPORT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(128) : warning C4005: 'EPROTOTYPE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(412) : see previous definition of 'EPROTOTYPE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(130) : warning C4005: 'ETIMEDOUT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(431) : see previous definition of 'ETIMEDOUT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(132) : warning C4005: 'EWOULDBLOCK' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(405) : see previous definition of 'EWOULDBLOCK'
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Focont.obj -c -Tccont.c
cont.c
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : warning C4005: 'EADDRINUSE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(419) : see previous definition of 'EADDRINUSE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(93) : warning C4005: 'EADDRNOTAVAIL' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(420) : see previous definition of 'EADDRNOTAVAIL'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(94) : warning C4005: 'EAFNOSUPPORT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(418) : see previous definition of 'EAFNOSUPPORT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(95) : warning C4005: 'EALREADY' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(408) : see previous definition of 'EALREADY'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(98) : warning C4005: 'ECONNABORTED' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(424) : see previous definition of 'ECONNABORTED'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(99) : warning C4005: 'ECONNREFUSED' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(432) : see previous definition of 'ECONNREFUSED'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(100) : warning C4005: 'ECONNRESET' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(425) : see previous definition of 'ECONNRESET'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(101) : warning C4005: 'EDESTADDRREQ' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(410) : see previous definition of 'EDESTADDRREQ'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(102) : warning C4005: 'EHOSTUNREACH' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(436) : see previous definition of 'EHOSTUNREACH'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(104) : warning C4005: 'EINPROGRESS' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(407) : see previous definition of 'EINPROGRESS'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(105) : warning C4005: 'EISCONN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(427) : see previous definition of 'EISCONN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(106) : warning C4005: 'ELOOP' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(433) : see previous definition of 'ELOOP'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(107) : warning C4005: 'EMSGSIZE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(411) : see previous definition of 'EMSGSIZE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(108) : warning C4005: 'ENETDOWN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(421) : see previous definition of 'ENETDOWN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(109) : warning C4005: 'ENETRESET' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(423) : see previous definition of 'ENETRESET'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(110) : warning C4005: 'ENETUNREACH' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(422) : see previous definition of 'ENETUNREACH'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(111) : warning C4005: 'ENOBUFS' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(426) : see previous definition of 'ENOBUFS'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(115) : warning C4005: 'ENOPROTOOPT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(413) : see previous definition of 'ENOPROTOOPT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(118) : warning C4005: 'ENOTCONN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(428) : see previous definition of 'ENOTCONN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(120) : warning C4005: 'ENOTSOCK' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(409) : see previous definition of 'ENOTSOCK'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(122) : warning C4005: 'EOPNOTSUPP' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(416) : see previous definition of 'EOPNOTSUPP'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(127) : warning C4005: 'EPROTONOSUPPORT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(414) : see previous definition of 'EPROTONOSUPPORT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(128) : warning C4005: 'EPROTOTYPE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(412) : see previous definition of 'EPROTOTYPE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(130) : warning C4005: 'ETIMEDOUT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(431) : see previous definition of 'ETIMEDOUT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(132) : warning C4005: 'EWOULDBLOCK' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(405) : see previous definition of 'EWOULDBLOCK'
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Foascii.obj -c -Tc./enc/ascii.c
ascii.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Fous_ascii.obj -c -Tc./enc/us_ascii.c
us_ascii.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Founicode.obj -c -Tc./enc/unicode.c
unicode.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Foutf_8.obj -c -Tc./enc/utf_8.c
utf_8.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Fonewline.obj -c -Tcnewline.c
newline.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Foacosh.obj -c -Tc./missing/acosh.c
acosh.c
c:\development\src\ruby\include\ruby/win32.h(407) : warning C4005: 'EINPROGRESS' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(104) : see previous definition of 'EINPROGRESS'
c:\development\src\ruby\include\ruby/win32.h(408) : warning C4005: 'EALREADY' :
macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(95) : see previous definition of 'EALREADY'
c:\development\src\ruby\include\ruby/win32.h(409) : warning C4005: 'ENOTSOCK' :
macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(120) : see previous definition of 'ENOTSOCK'
c:\development\src\ruby\include\ruby/win32.h(410) : warning C4005: 'EDESTADDRREQ' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(101) : see previous definition of 'EDESTADDRREQ'
c:\development\src\ruby\include\ruby/win32.h(411) : warning C4005: 'EMSGSIZE' :
macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(107) : see previous definition of 'EMSGSIZE'
c:\development\src\ruby\include\ruby/win32.h(412) : warning C4005: 'EPROTOTYPE'
: macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(128) : see previous definition of 'EPROTOTYPE'
c:\development\src\ruby\include\ruby/win32.h(413) : warning C4005: 'ENOPROTOOPT' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(115) : see previous definition of 'ENOPROTOOPT'
c:\development\src\ruby\include\ruby/win32.h(414) : warning C4005: 'EPROTONOSUPPORT' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(127) : see previous definition of 'EPROTONOSUPPORT'
c:\development\src\ruby\include\ruby/win32.h(416) : warning C4005: 'EOPNOTSUPP'
: macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(122) : see previous definition of 'EOPNOTSUPP'
c:\development\src\ruby\include\ruby/win32.h(418) : warning C4005: 'EAFNOSUPPORT' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(94) : see previous definition of 'EAFNOSUPPORT'
c:\development\src\ruby\include\ruby/win32.h(419) : warning C4005: 'EADDRINUSE'
: macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : see previous definition of 'EADDRINUSE'
c:\development\src\ruby\include\ruby/win32.h(420) : warning C4005: 'EADDRNOTAVAIL' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(93) : see previous definition of 'EADDRNOTAVAIL'
c:\development\src\ruby\include\ruby/win32.h(421) : warning C4005: 'ENETDOWN' :
macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(108) : see previous definition of 'ENETDOWN'
c:\development\src\ruby\include\ruby/win32.h(422) : warning C4005: 'ENETUNREACH' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(110) : see previous definition of 'ENETUNREACH'
c:\development\src\ruby\include\ruby/win32.h(423) : warning C4005: 'ENETRESET' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(109) : see previous definition of 'ENETRESET'
c:\development\src\ruby\include\ruby/win32.h(424) : warning C4005: 'ECONNABORTED' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(98) : see previous definition of 'ECONNABORTED'
c:\development\src\ruby\include\ruby/win32.h(425) : warning C4005: 'ECONNRESET'
: macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(100) : see previous definition of 'ECONNRESET'
c:\development\src\ruby\include\ruby/win32.h(426) : warning C4005: 'ENOBUFS' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(111) : see previous definition of 'ENOBUFS'
c:\development\src\ruby\include\ruby/win32.h(427) : warning C4005: 'EISCONN' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(105) : see previous definition of 'EISCONN'
c:\development\src\ruby\include\ruby/win32.h(428) : warning C4005: 'ENOTCONN' :
macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(118) : see previous definition of 'ENOTCONN'
c:\development\src\ruby\include\ruby/win32.h(431) : warning C4005: 'ETIMEDOUT' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(130) : see previous definition of 'ETIMEDOUT'
c:\development\src\ruby\include\ruby/win32.h(432) : warning C4005: 'ECONNREFUSED' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(99) : see previous definition of 'ECONNREFUSED'
c:\development\src\ruby\include\ruby/win32.h(433) : warning C4005: 'ELOOP' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(106) : see previous definition of 'ELOOP'
c:\development\src\ruby\include\ruby/win32.h(436) : warning C4005: 'EHOSTUNREACH' : macro redefinition
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(102) : see previous definition of 'EHOSTUNREACH'
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Focbrt.obj -c -Tc./missing/cbrt.c
cbrt.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Focrypt.obj -c -Tc./missing/crypt.c
crypt.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Foerf.obj -c -Tc./missing/erf.c
erf.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Folgamma_r.obj -c -Tc./missing/lgamma_r.c
lgamma_r.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Fostrlcat.obj -c -Tc./missing/strlcat.c
strlcat.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Fostrlcpy.obj -c -Tc./missing/strlcpy.c
strlcpy.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Fotgamma.obj -c -Tc./missing/tgamma.c
tgamma.c
cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Fowin32.obj -c -Tc./win32/win32.c
win32.c
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : warning C4005: 'EADDRINUSE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(419) : see previous definition of 'EADDRINUSE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(93) : warning C4005: 'EADDRNOTAVAIL' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(420) : see previous definition of 'EADDRNOTAVAIL'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(94) : warning C4005: 'EAFNOSUPPORT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(418) : see previous definition of 'EAFNOSUPPORT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(95) : warning C4005: 'EALREADY' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(408) : see previous definition of 'EALREADY'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(98) : warning C4005: 'ECONNABORTED' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(424) : see previous definition of 'ECONNABORTED'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(99) : warning C4005: 'ECONNREFUSED' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(432) : see previous definition of 'ECONNREFUSED'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(100) : warning C4005: 'ECONNRESET' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(425) : see previous definition of 'ECONNRESET'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(101) : warning C4005: 'EDESTADDRREQ' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(410) : see previous definition of 'EDESTADDRREQ'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(102) : warning C4005: 'EHOSTUNREACH' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(436) : see previous definition of 'EHOSTUNREACH'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(104) : warning C4005: 'EINPROGRESS' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(407) : see previous definition of 'EINPROGRESS'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(105) : warning C4005: 'EISCONN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(427) : see previous definition of 'EISCONN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(106) : warning C4005: 'ELOOP' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(433) : see previous definition of 'ELOOP'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(107) : warning C4005: 'EMSGSIZE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(411) : see previous definition of 'EMSGSIZE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(108) : warning C4005: 'ENETDOWN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(421) : see previous definition of 'ENETDOWN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(109) : warning C4005: 'ENETRESET' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(423) : see previous definition of 'ENETRESET'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(110) : warning C4005: 'ENETUNREACH' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(422) : see previous definition of 'ENETUNREACH'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(111) : warning C4005: 'ENOBUFS' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(426) : see previous definition of 'ENOBUFS'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(115) : warning C4005: 'ENOPROTOOPT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(413) : see previous definition of 'ENOPROTOOPT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(118) : warning C4005: 'ENOTCONN' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(428) : see previous definition of 'ENOTCONN'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(120) : warning C4005: 'ENOTSOCK' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(409) : see previous definition of 'ENOTSOCK'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(122) : warning C4005: 'EOPNOTSUPP' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(416) : see previous definition of 'EOPNOTSUPP'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(127) : warning C4005: 'EPROTONOSUPPORT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(414) : see previous definition of 'EPROTONOSUPPORT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(128) : warning C4005: 'EPROTOTYPE' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(412) : see previous definition of 'EPROTOTYPE'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(130) : warning C4005: 'ETIMEDOUT' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(431) : see previous definition of 'ETIMEDOUT'
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(132) : warning C4005: 'EWOULDBLOCK' : macro redefinition
c:\Development\src\ruby\include\ruby/win32.h(405) : see previous definition of 'EWOULDBLOCK'

=end

Actions #3

Updated by usa (Usaku NAKAMURA) over 14 years ago

=begin
Hello,

Thank you for your report.
These redifinions are removed at r27236.
Check it again, please.

In message "[ruby-core:29278] [Bug #3092] IO Broken with Latest Windows"
on Apr.06,2010 14:22:44, wrote:

So then this results in the below list of warnings.

Minor, and can be ignored, but would be nice to eliminate the noise. Maybe include a check against VC2010 and don't define all these contants?


cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Fovm.obj -c -Tcvm.c
vm.c
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : warning C4005: 'EADDRINUSE' : macro redefinition

Regards,

U.Nakamura

=end

Actions #4

Updated by cfis (Charlie Savage) over 14 years ago

=begin
Hi Usaku,

No, the changes don't fix the warnings. For example:

cl -nologo -MDd -Zi -W2 -wd4996 -Od -Zm600 -RTC1 -DRUBY_EXPORT -I. -I.ext/include/i386-mswin32_100 -I./include -I. -I./missing -Fodir.obj -c -Tcdir.c
dir.c

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : warning C4005: 'EADDRINUSE' : macro redefinition

c:\Development\src\ruby\include\ruby/win32.h(444) : see previous definition of 'EADDRINUSE'

Line 443, win32.h:

#ifndef EADDRINUSE

define EADDRINUSE WSAEADDRINUSE

#endif

EADDRINUSE is not yet defined, so it gets set to WSAEADDRINUSE. Then after this, errno.h is included and overrides the value leading to the error message.

=end

Actions #5

Updated by usa (Usaku NAKAMURA) over 14 years ago

=begin
Hello,

In message "[ruby-core:29314] [Bug #3092] IO Broken with Latest Windows"
on Apr.08,2010 13:51:42, wrote:

EADDRINUSE is not yet defined, so it gets set to WSAEADDRINUSE. Then after this, errno.h is included and overrides the value leading to the error message.

Oops......
Sorry, try again r27258, please.

Regards,

U.Nakamura

=end

Actions #6

Updated by cfis (Charlie Savage) over 14 years ago

=begin
Yes - much better. Warnings are gone - thanks!
=end

Actions #7

Updated by wanabe (_ wanabe) over 14 years ago

  • Status changed from Feedback to Closed

=begin

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0