Chromium Code Reviews| Index: runtime/bin/platform_win.cc |
| diff --git a/runtime/bin/platform_win.cc b/runtime/bin/platform_win.cc |
| index e1f9ced1f427cbc1c7f782303cebaf8d1bc3eede..22cc2dc28748fd2c3796350149801cf54656feca 100644 |
| --- a/runtime/bin/platform_win.cc |
| +++ b/runtime/bin/platform_win.cc |
| @@ -3,11 +3,12 @@ |
| // BSD-style license that can be found in the LICENSE file. |
| #include "bin/platform.h" |
| +#include "bin/socket.h" |
| bool Platform::Initialize() { |
| - // Nothing to do on Windows. |
| - return true; |
| + // Load Socket for LocalHostname. |
|
Søren Gjesse
2012/04/11 11:00:54
I think we should consider moving this to LocalHos
|
| + return Socket::Initialize(); |
|
Anders Johnsen
2012/04/11 10:12:12
I would like to move the Socket::Initialize setup
|
| } |
| @@ -23,6 +24,11 @@ const char* Platform::OperatingSystem() { |
| } |
| +bool Platform::LocalHostname(char *buffer, intptr_t buffer_length) { |
| + return gethostname(buffer, buffer_length) == 0; |
| +} |
| + |
| + |
| char* Platform::StrError(int error_code) { |
| static const int kBufferSize = 1024; |
| char* error = static_cast<char*>(malloc(kBufferSize)); |