OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 19 matching lines...) Expand all Loading... |
30 #if V8_OS_POSIX | 30 #if V8_OS_POSIX |
31 #include <sys/types.h> | 31 #include <sys/types.h> |
32 #include <sys/socket.h> | 32 #include <sys/socket.h> |
33 | 33 |
34 #include <netinet/in.h> | 34 #include <netinet/in.h> |
35 #include <netdb.h> | 35 #include <netdb.h> |
36 | 36 |
37 #include <unistd.h> | 37 #include <unistd.h> |
38 #endif | 38 #endif |
39 | 39 |
40 #include <cerrno> | 40 #include <errno.h> |
41 | 41 |
42 #include "checks.h" | 42 #include "checks.h" |
43 #include "once.h" | 43 #include "once.h" |
44 | 44 |
45 namespace v8 { | 45 namespace v8 { |
46 namespace internal { | 46 namespace internal { |
47 | 47 |
48 #if V8_OS_WIN | 48 #if V8_OS_WIN |
49 | 49 |
50 static V8_DECLARE_ONCE(initialize_winsock) = V8_ONCE_INIT; | 50 static V8_DECLARE_ONCE(initialize_winsock) = V8_ONCE_INIT; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 #elif V8_OS_WIN | 215 #elif V8_OS_WIN |
216 // Be sure to initialize the WinSock DLL first. | 216 // Be sure to initialize the WinSock DLL first. |
217 CallOnce(&initialize_winsock, &InitializeWinsock); | 217 CallOnce(&initialize_winsock, &InitializeWinsock); |
218 | 218 |
219 // Now we can safely perform WSA calls. | 219 // Now we can safely perform WSA calls. |
220 return ::WSAGetLastError(); | 220 return ::WSAGetLastError(); |
221 #endif | 221 #endif |
222 } | 222 } |
223 | 223 |
224 } } // namespace v8::internal | 224 } } // namespace v8::internal |
OLD | NEW |