| 2460 | : *tp <= TIME_T_MAX - j)) |
| 2461 | return true; |
| 2462 | *tp += j; |
| 2463 | return false; |
| 2464 | #endif |
| 2465 | } |
| 2466 | |
| 2467 | /* Return A - B, where both are in the range -2**31 + 1 .. 2**31 - 1. |
| 2468 | The result cannot overflow. */ |
| 2469 | static int_fast64_t |
| 2470 | utoff_diff (int_fast32_t a, int_fast32_t b) |
| 2471 | { |
| 2472 | int_fast64_t aa = a; |
| 2473 | return aa - b; |
| 2474 | } |
| 2475 | |
| 2476 | static int |
| 2477 | tmcomp(register const struct tm *const atmp, |
| 2478 | register const struct tm *const btmp) |
| 2479 | { |
| 2480 | register int result; |
| 2481 | |
| 2482 | if (atmp->tm_year != btmp->tm_year) |
| 2483 | return atmp->tm_year < btmp->tm_year ? -1 : 1; |
| 2484 | if ((result = (atmp->tm_mon - btmp->tm_mon)) == 0 && |