| Index: runtime/bin/socket_win.cc
|
| diff --git a/runtime/bin/socket_win.cc b/runtime/bin/socket_win.cc
|
| index 0a31298f8201770bc2eb14c0191c37ac84f38675..b252cfff8e06ad84f408d67c03552b4cc4624f52 100644
|
| --- a/runtime/bin/socket_win.cc
|
| +++ b/runtime/bin/socket_win.cc
|
| @@ -1,9 +1,10 @@
|
| -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| #include "bin/builtin.h"
|
| #include "bin/eventhandler.h"
|
| +#include "bin/file.h"
|
| #include "bin/log.h"
|
| #include "bin/socket.h"
|
|
|
| @@ -138,6 +139,17 @@ void Socket::GetError(intptr_t fd, OSError* os_error) {
|
| }
|
|
|
|
|
| +int Socket::GetType(intptr_t fd) {
|
| + Handle* handle = reinterpret_cast<Handle*>(fd);
|
| + switch (GetFileType(handle->handle())) {
|
| + case FILE_TYPE_CHAR: return File::kTerminal;
|
| + case FILE_TYPE_PIPE: return File::kPipe;
|
| + case FILE_TYPE_DISK: return File::kFile;
|
| + default: return GetLastError == NO_ERROR ? File::kOther : -1;
|
| + }
|
| +}
|
| +
|
| +
|
| intptr_t Socket::GetStdioHandle(int num) {
|
| HANDLE handle;
|
| switch (num) {
|
|
|