| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 return false; | 254 return false; |
| 255 } | 255 } |
| 256 | 256 |
| 257 return true; | 257 return true; |
| 258 } | 258 } |
| 259 | 259 |
| 260 string Subprocess::Win32ErrorMessage(DWORD error_code) { | 260 string Subprocess::Win32ErrorMessage(DWORD error_code) { |
| 261 char* message; | 261 char* message; |
| 262 | 262 |
| 263 // WTF? | 263 // WTF? |
| 264 FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | | 264 FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | |
| 265 FORMAT_MESSAGE_FROM_SYSTEM | | 265 FORMAT_MESSAGE_FROM_SYSTEM | |
| 266 FORMAT_MESSAGE_IGNORE_INSERTS, | 266 FORMAT_MESSAGE_IGNORE_INSERTS, |
| 267 NULL, error_code, 0, | 267 NULL, error_code, 0, |
| 268 (LPTSTR)&message, // NOT A BUG! | 268 (LPSTR)&message, // NOT A BUG! |
| 269 0, NULL); | 269 0, NULL); |
| 270 | 270 |
| 271 string result = message; | 271 string result = message; |
| 272 LocalFree(message); | 272 LocalFree(message); |
| 273 return result; | 273 return result; |
| 274 } | 274 } |
| 275 | 275 |
| 276 // =================================================================== | 276 // =================================================================== |
| 277 | 277 |
| 278 #else // _WIN32 | 278 #else // _WIN32 |
| 279 | 279 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 } | 456 } |
| 457 | 457 |
| 458 return true; | 458 return true; |
| 459 } | 459 } |
| 460 | 460 |
| 461 #endif // !_WIN32 | 461 #endif // !_WIN32 |
| 462 | 462 |
| 463 } // namespace compiler | 463 } // namespace compiler |
| 464 } // namespace protobuf | 464 } // namespace protobuf |
| 465 } // namespace google | 465 } // namespace google |
| OLD | NEW |