480 | | #if defined(POLL_ERR) && defined(POLL_HUP) && (POLL_ERR - POLL_HUP) |
481 | | case POLL_HUP: |
482 | | report_error( execution_exception::system_error, |
483 | | "device disconnected; band event %d", |
484 | | (int)m_sig_info->si_band ); |
| 481 | default: |
| 482 | // the original code tried to use a #if defined to put in a case |
| 483 | // statement into this switch: |
| 484 | // #if defined(POLL_ERR) && defined(POLL_HUP) && (POLL_ERR - POLL_HUP) |
| 485 | // However, that fell foul of the prepreprocessor as POLL_HUP |
| 486 | // and POLL_ERR were defined but not as simple constants and |
| 487 | // so the preprocessor couldn't evaluate (POLL_ERR - POLL_HUP). |
| 488 | if ( m_sig_info->si_code == POLL_HUP ) { |
| 489 | report_error( execution_exception::system_error, |
| 490 | "device disconnected; band event %d", |
| 491 | (int)m_sig_info->si_band ); |
| 492 | } else { |
| 493 | report_error( execution_exception::system_error, |
| 494 | "unrecognised sigpoll event %d; band event %d", |
| 495 | (int)m_sig_info->si_code, |
| 496 | (int)m_sig_info->si_band ); |
| 497 | } |