Commit d64ea4e
committed
Make small changes to libm-test.c to improve portability.
- Don't define llabs(). This breaks if llabs() is already a macro, which
is allowed by the C standard/POSIX. llabs() was introduced in C99, so
I think we can safely assume it is present on all interesting systems.
- Cast the parameters to fabs() to the floating point type. Clang has
introduced some interesting warnings that trigger if the arguments to
fabs*() are not the right type.1 parent b6ff8bb commit d64ea4e
1 file changed
Lines changed: 3 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
716 | 715 | | |
717 | 716 | | |
718 | 717 | | |
| |||
2531 | 2530 | | |
2532 | 2531 | | |
2533 | 2532 | | |
2534 | | - | |
| 2533 | + | |
2535 | 2534 | | |
2536 | 2535 | | |
2537 | 2536 | | |
2538 | 2537 | | |
2539 | 2538 | | |
2540 | 2539 | | |
2541 | | - | |
2542 | | - | |
| 2540 | + | |
| 2541 | + | |
2543 | 2542 | | |
2544 | 2543 | | |
2545 | 2544 | | |
| |||
0 commit comments