summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib/lldiv.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-06-06 08:05:51 -0300
committerRenato Botelho <renato@netgate.com>2016-06-06 08:05:51 -0300
commit47dfb8d658406ebf07225c0104ebe4be06ae405f (patch)
tree83174cbd9592560c48ad2cd11afe42c5c12b6c1b /lib/libc/stdlib/lldiv.c
parent131cd15b13bbd3e141e911a65cf7a1895ec6ab05 (diff)
parent13d657a35d96e65f1be391830f36e1adff33534f (diff)
downloadFreeBSD-src-47dfb8d658406ebf07225c0104ebe4be06ae405f.zip
FreeBSD-src-47dfb8d658406ebf07225c0104ebe4be06ae405f.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'lib/libc/stdlib/lldiv.c')
-rw-r--r--lib/libc/stdlib/lldiv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libc/stdlib/lldiv.c b/lib/libc/stdlib/lldiv.c
index b34b65e..197b48f 100644
--- a/lib/libc/stdlib/lldiv.c
+++ b/lib/libc/stdlib/lldiv.c
@@ -37,9 +37,11 @@ lldiv(long long numer, long long denom)
retval.quot = numer / denom;
retval.rem = numer % denom;
+#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
if (numer >= 0 && retval.rem < 0) {
retval.quot++;
retval.rem -= denom;
}
+#endif
return (retval);
}
OpenPOWER on IntegriCloud