summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/div.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2016-06-01 10:14:25 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2016-06-01 10:14:25 +0000
commit69c526f46ef3de47e7864f141caef0110fbf9401 (patch)
tree350e7f50704ec071aad07cfd31935d82ff6112df /lib/libc/stdlib/div.c
parent3f58662dd929456a0949339d6d4a414f6eacc5b8 (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/div.c')
-rw-r--r--lib/libc/stdlib/div.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/stdlib/div.c b/lib/libc/stdlib/div.c
index 7dfe553f4a05..0bafbe607037 100644
--- a/lib/libc/stdlib/div.c
+++ b/lib/libc/stdlib/div.c
@@ -46,6 +46,7 @@ div(num, denom)
r.quot = num / denom;
r.rem = num % denom;
+#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
/*
* The ANSI standard says that |r.quot| <= |n/d|, where
* n/d is to be computed in infinite precision. In other
@@ -73,5 +74,6 @@ div(num, denom)
r.quot++;
r.rem -= denom;
}
+#endif
return (r);
}