| 490 | } |
| 491 | |
| 492 | int WinErrorFromStatus(const Status& status) { |
| 493 | #if _WIN32 |
| 494 | const auto detail = status.detail(); |
| 495 | if (detail != nullptr && detail->type_id() == kWinErrorDetailTypeId) { |
| 496 | return checked_cast<const WinErrorDetail&>(*detail).errnum(); |
| 497 | } |
| 498 | #endif |
| 499 | return 0; |
| 500 | } |
| 501 | |
| 502 | int SignalFromStatus(const Status& status) { |
| 503 | const auto detail = status.detail(); |