Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Side by Side Diff: runtime/bin/socket_win.cc

Issue 317773002: Fix Win64 build of Dart VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add fix for http://dartbug.com/19213 Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_WINDOWS) 6 #if defined(TARGET_OS_WINDOWS)
7 7
8 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 #include "bin/eventhandler.h" 9 #include "bin/eventhandler.h"
10 #include "bin/file.h" 10 #include "bin/file.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 return err == 0; 64 return err == 0;
65 } 65 }
66 66
67 intptr_t Socket::Available(intptr_t fd) { 67 intptr_t Socket::Available(intptr_t fd) {
68 ClientSocket* client_socket = reinterpret_cast<ClientSocket*>(fd); 68 ClientSocket* client_socket = reinterpret_cast<ClientSocket*>(fd);
69 return client_socket->Available(); 69 return client_socket->Available();
70 } 70 }
71 71
72 72
73 intptr_t Socket::Read(intptr_t fd, void* buffer, intptr_t num_bytes) { 73 int Socket::Read(intptr_t fd, void* buffer, intptr_t num_bytes) {
srdjan 2014/06/05 17:00:46 Why is this necessary?
siva 2014/06/05 17:21:18 Not sure I understand the divergence, num_bytes is
Ivan Posva 2014/06/05 17:42:11 I see why this is necessary, but the real problem
Vyacheslav Egorov (Google) 2014/06/05 18:05:55 Thanks. I will revert my changes to this file. Ha
Ivan Posva 2014/06/05 18:13:38 Please file a bug against IO and check with Anders
74 Handle* handle = reinterpret_cast<Handle*>(fd); 74 Handle* handle = reinterpret_cast<Handle*>(fd);
75 return handle->Read(buffer, num_bytes); 75 return handle->Read(buffer, num_bytes);
76 } 76 }
77 77
78 78
79 int Socket::RecvFrom(intptr_t fd, void* buffer, intptr_t num_bytes, 79 int Socket::RecvFrom(intptr_t fd, void* buffer, intptr_t num_bytes,
80 RawAddr* addr) { 80 RawAddr* addr) {
81 Handle* handle = reinterpret_cast<Handle*>(fd); 81 Handle* handle = reinterpret_cast<Handle*>(fd);
82 socklen_t addr_len = sizeof(addr->ss); 82 socklen_t addr_len = sizeof(addr->ss);
83 return handle->RecvFrom(buffer, num_bytes, &addr->addr, addr_len); 83 return handle->RecvFrom(buffer, num_bytes, &addr->addr, addr_len);
84 } 84 }
85 85
86 86
87 intptr_t Socket::Write(intptr_t fd, const void* buffer, intptr_t num_bytes) { 87 int Socket::Write(intptr_t fd, const void* buffer, intptr_t num_bytes) {
88 Handle* handle = reinterpret_cast<Handle*>(fd); 88 Handle* handle = reinterpret_cast<Handle*>(fd);
89 return handle->Write(buffer, num_bytes); 89 return handle->Write(buffer, num_bytes);
90 } 90 }
91 91
92 92
93 int Socket::SendTo( 93 int Socket::SendTo(
94 intptr_t fd, const void* buffer, intptr_t num_bytes, RawAddr addr) { 94 intptr_t fd, const void* buffer, intptr_t num_bytes, RawAddr addr) {
95 Handle* handle = reinterpret_cast<Handle*>(fd); 95 Handle* handle = reinterpret_cast<Handle*>(fd);
96 return handle->SendTo( 96 return handle->SendTo(
97 buffer, num_bytes, &addr.addr, SocketAddress::GetAddrLength(&addr)); 97 buffer, num_bytes, &addr.addr, SocketAddress::GetAddrLength(&addr));
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 proto, 700 proto,
701 MCAST_LEAVE_GROUP, 701 MCAST_LEAVE_GROUP,
702 reinterpret_cast<char *>(&mreq), 702 reinterpret_cast<char *>(&mreq),
703 sizeof(mreq)) == 0; 703 sizeof(mreq)) == 0;
704 } 704 }
705 705
706 } // namespace bin 706 } // namespace bin
707 } // namespace dart 707 } // namespace dart
708 708
709 #endif // defined(TARGET_OS_WINDOWS) 709 #endif // defined(TARGET_OS_WINDOWS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698