[Midnightbsd-cvs] src [10551] trunk/lib/libc/stdlib/div.c: stdc version check
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Jun 7 20:45:06 EDT 2018
Revision: 10551
http://svnweb.midnightbsd.org/src/?rev=10551
Author: laffer1
Date: 2018-06-07 20:45:05 -0400 (Thu, 07 Jun 2018)
Log Message:
-----------
stdc version check
Modified Paths:
--------------
trunk/lib/libc/stdlib/div.c
Modified: trunk/lib/libc/stdlib/div.c
===================================================================
--- trunk/lib/libc/stdlib/div.c 2018-06-08 00:44:46 UTC (rev 10550)
+++ trunk/lib/libc/stdlib/div.c 2018-06-08 00:45:05 UTC (rev 10551)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -13,7 +14,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -34,7 +35,7 @@
static char sccsid[] = "@(#)div.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: stable/10/lib/libc/stdlib/div.c 301459 2016-06-05 18:11:52Z ache $");
#include <stdlib.h> /* div_t */
@@ -46,6 +47,7 @@
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 +75,6 @@
r.quot++;
r.rem -= denom;
}
+#endif
return (r);
}
More information about the Midnightbsd-cvs
mailing list