# | Line 411 | Line 411 | gencase: if (modifier == 'h') | |
---|---|---|
411 | print_sign = FALSE; | |
412 | break; | |
413 | case 'm': | |
414 | < | if (saved_errno < 0 || saved_errno > sys_nerr || |
415 | < | *sys_errlist[saved_errno] == '\0') { |
414 | > | errno = 0; |
415 | > | s = strerror(saved_errno); |
416 | > | if (errno == EINVAL) { |
417 | sprintf(errno_buffer, | |
418 | "errno %d out of range", | |
419 | saved_errno); | |
420 | s = errno_buffer; | |
421 | < | } else |
421 | < | s = sys_errlist[saved_errno]; |
421 | > | } |
422 | print_sign = FALSE; | |
423 | break; | |
424 | #ifdef VMS |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |