OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 // ---------------------------------------------------------------------------- | 107 // ---------------------------------------------------------------------------- |
108 // POSIX stdio support. | 108 // POSIX stdio support. |
109 // | 109 // |
110 | 110 |
111 FILE* OS::FOpen(const char* path, const char* mode) { | 111 FILE* OS::FOpen(const char* path, const char* mode) { |
112 return fopen(path, mode); | 112 return fopen(path, mode); |
113 } | 113 } |
114 | 114 |
115 | 115 |
| 116 const char* OS::LogFileOpenMode = "w"; |
| 117 |
| 118 |
116 void OS::Print(const char* format, ...) { | 119 void OS::Print(const char* format, ...) { |
117 va_list args; | 120 va_list args; |
118 va_start(args, format); | 121 va_start(args, format); |
119 VPrint(format, args); | 122 VPrint(format, args); |
120 va_end(args); | 123 va_end(args); |
121 } | 124 } |
122 | 125 |
123 | 126 |
124 void OS::VPrint(const char* format, va_list args) { | 127 void OS::VPrint(const char* format, va_list args) { |
125 vprintf(format, args); | 128 vprintf(format, args); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 return ntohl(value); | 341 return ntohl(value); |
339 } | 342 } |
340 | 343 |
341 | 344 |
342 Socket* OS::CreateSocket() { | 345 Socket* OS::CreateSocket() { |
343 return new POSIXSocket(); | 346 return new POSIXSocket(); |
344 } | 347 } |
345 | 348 |
346 | 349 |
347 } } // namespace v8::internal | 350 } } // namespace v8::internal |
OLD | NEW |