1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* win32.c (recvmsg, sendmsg, link): shouldn't raise ruby's exceptions

in the functions expected as system API.  see [ruby-dev:39579] and
  [ruby-dev:39582]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2009-10-30 04:15:54 +00:00
parent 1730092f1c
commit b16e6a93ca
2 changed files with 29 additions and 5 deletions

View file

@ -1,3 +1,9 @@
Fri Oct 30 13:13:16 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* win32.c (recvmsg, sendmsg, link): shouldn't raise ruby's exceptions
in the functions expected as system API. see [ruby-dev:39579] and
[ruby-dev:39582]
Fri Oct 30 12:59:20 2009 NAKAMURA Usaku <usa@ruby-lang.org>
* thread.c (rb_thread_blocking_region): standard C doesn't accept

View file

@ -2868,8 +2868,10 @@ recvmsg(int fd, struct msghdr *msg, int flags)
DWORD dmy;
WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, &guid, sizeof(guid),
&pWSARecvMsg, sizeof(pWSARecvMsg), &dmy, NULL, NULL);
if (!pWSARecvMsg)
rb_notimplement();
if (!pWSARecvMsg) {
errno = ENOSYS;
return -1;
}
}
msghdr_to_wsamsg(msg, &wsamsg);
@ -2959,8 +2961,10 @@ sendmsg(int fd, const struct msghdr *msg, int flags)
DWORD dmy;
WSAIoctl(s, SIO_GET_EXTENSION_FUNCTION_POINTER, &guid, sizeof(guid),
&pWSASendMsg, sizeof(pWSASendMsg), &dmy, NULL, NULL);
if (!pWSASendMsg)
rb_notimplement();
if (!pWSASendMsg) {
errno = ENOSYS;
return -1;
}
}
msghdr_to_wsamsg(msg, &wsamsg);
@ -3707,7 +3711,7 @@ link(const char *from, const char *to)
if (hKernel) {
pCreateHardLink = (BOOL (WINAPI *)(LPCTSTR, LPCTSTR, LPSECURITY_ATTRIBUTES))GetProcAddress(hKernel, "CreateHardLinkA");
if (!pCreateHardLink) {
rb_notimplement();
myerrno = ENOSYS;
}
}
else {
@ -5249,3 +5253,17 @@ rb_w32_fsopen(const char *path, const char *mode, int shflags)
return f;
}
#endif
#if defined(_MSC_VER) && RT_VER <= 60
extern long _ftol(double);
long
_ftol2(double d)
{
return _ftol(d);
}
long
_ftol2_sse(double d)
{
return _ftol(d);
}
#endif