From 704e666406f9401fa4d34ab536981c2f7837ddf7 Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 5 Jun 2016 18:11:52 +0000 Subject: MFC: r301115 Don't use fixup for C99 and up, the compiler result is already correct. Suggested by: bde --- lib/libc/stdlib/ldiv.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/libc/stdlib/ldiv.c') diff --git a/lib/libc/stdlib/ldiv.c b/lib/libc/stdlib/ldiv.c index 0ec98e6..745c566 100644 --- a/lib/libc/stdlib/ldiv.c +++ b/lib/libc/stdlib/ldiv.c @@ -48,9 +48,11 @@ ldiv(num, denom) r.quot = num / denom; r.rem = num % denom; +#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L) if (num >= 0 && r.rem < 0) { r.quot++; r.rem -= denom; } +#endif return (r); } -- cgit v1.1