Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Oct 2018 00:20:41 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r339510 - head/lib/libc/quad
Message-ID:  <201810210020.w9L0KfH8024126@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Sun Oct 21 00:20:40 2018
New Revision: 339510
URL: https://svnweb.freebsd.org/changeset/base/339510

Log:
  ANSIfy libc/quad
  
  Some of these routines exist in both lib/libc/quad/ and sys/libkern/.
  r325988 ANSIfied sys/libkern.  Update libc/quad to match.
  
  PR:		223641
  Reported by:	bde
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/lib/libc/quad/adddi3.c
  head/lib/libc/quad/anddi3.c
  head/lib/libc/quad/ashldi3.c
  head/lib/libc/quad/ashrdi3.c
  head/lib/libc/quad/cmpdi2.c
  head/lib/libc/quad/divdi3.c
  head/lib/libc/quad/fixdfdi.c
  head/lib/libc/quad/fixunsdfdi.c
  head/lib/libc/quad/floatdidf.c
  head/lib/libc/quad/floatdisf.c
  head/lib/libc/quad/floatunsdidf.c
  head/lib/libc/quad/iordi3.c
  head/lib/libc/quad/lshldi3.c
  head/lib/libc/quad/lshrdi3.c
  head/lib/libc/quad/moddi3.c
  head/lib/libc/quad/muldi3.c
  head/lib/libc/quad/negdi2.c
  head/lib/libc/quad/notdi2.c
  head/lib/libc/quad/qdivrem.c
  head/lib/libc/quad/subdi3.c
  head/lib/libc/quad/ucmpdi2.c
  head/lib/libc/quad/udivdi3.c
  head/lib/libc/quad/umoddi3.c
  head/lib/libc/quad/xordi3.c

Modified: head/lib/libc/quad/adddi3.c
==============================================================================
--- head/lib/libc/quad/adddi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/adddi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -47,8 +47,7 @@ __FBSDID("$FreeBSD$");
  * either x or y (the choice to compare with x or y is arbitrary).
  */
 quad_t
-__adddi3(a, b)
-	quad_t a, b;
+__adddi3(quad_t a, quad_t b)
 {
 	union uu aa, bb, sum;
 

Modified: head/lib/libc/quad/anddi3.c
==============================================================================
--- head/lib/libc/quad/anddi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/anddi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$");
  * Return a & b, in quad.
  */
 quad_t
-__anddi3(a, b)
-	quad_t a, b;
+__anddi3(quad_t a, quad_t b)
 {
 	union uu aa, bb;
 

Modified: head/lib/libc/quad/ashldi3.c
==============================================================================
--- head/lib/libc/quad/ashldi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/ashldi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$");
  * This is the same as logical shift left!
  */
 quad_t
-__ashldi3(a, shift)
-	quad_t a;
-	qshift_t shift;
+__ashldi3(quad_t a, qshift_t shift)
 {
 	union uu aa;
 

Modified: head/lib/libc/quad/ashrdi3.c
==============================================================================
--- head/lib/libc/quad/ashrdi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/ashrdi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -45,9 +45,7 @@ __FBSDID("$FreeBSD$");
  * Shift a (signed) quad value right (arithmetic shift right).
  */
 quad_t
-__ashrdi3(a, shift)
-	quad_t a;
-	qshift_t shift;
+__ashrdi3(quad_t a, qshift_t shift)
 {
 	union uu aa;
 

Modified: head/lib/libc/quad/cmpdi2.c
==============================================================================
--- head/lib/libc/quad/cmpdi2.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/cmpdi2.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -47,8 +47,7 @@ __FBSDID("$FreeBSD$");
  * signed.
  */
 int
-__cmpdi2(a, b)
-	quad_t a, b;
+__cmpdi2(quad_t a, quad_t b)
 {
 	union uu aa, bb;
 

Modified: head/lib/libc/quad/divdi3.c
==============================================================================
--- head/lib/libc/quad/divdi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/divdi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -46,8 +46,7 @@ __FBSDID("$FreeBSD$");
  * ??? if -1/2 should produce -1 on this machine, this code is wrong
  */
 quad_t
-__divdi3(a, b)
-	quad_t a, b;
+__divdi3(quad_t a, quad_t b)
 {
 	u_quad_t ua, ub, uq;
 	int neg;

Modified: head/lib/libc/quad/fixdfdi.c
==============================================================================
--- head/lib/libc/quad/fixdfdi.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/fixdfdi.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -46,8 +46,7 @@ __FBSDID("$FreeBSD$");
  * We clamp anything that is out of range.
  */
 quad_t
-__fixdfdi(x)
-	double x;
+__fixdfdi(double x)
 {
 	if (x < 0)
 		if (x <= QUAD_MIN)

Modified: head/lib/libc/quad/fixunsdfdi.c
==============================================================================
--- head/lib/libc/quad/fixunsdfdi.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/fixunsdfdi.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -51,8 +51,7 @@ __FBSDID("$FreeBSD$");
  * of range becomes UQUAD_MAX.
  */
 u_quad_t
-__fixunsdfdi(x)
-	double x;
+__fixunsdfdi(double x)
 {
 	double toppart;
 	union uu t;

Modified: head/lib/libc/quad/floatdidf.c
==============================================================================
--- head/lib/libc/quad/floatdidf.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/floatdidf.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$");
  * Convert (signed) quad to double.
  */
 double
-__floatdidf(x)
-	quad_t x;
+__floatdidf(quad_t x)
 {
 	double d;
 	union uu u;

Modified: head/lib/libc/quad/floatdisf.c
==============================================================================
--- head/lib/libc/quad/floatdisf.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/floatdisf.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$");
  * Convert (signed) quad to float.
  */
 float
-__floatdisf(x)
-	quad_t x;
+__floatdisf(quad_t x)
 {
 	float f;
 	union uu u;

Modified: head/lib/libc/quad/floatunsdidf.c
==============================================================================
--- head/lib/libc/quad/floatunsdidf.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/floatunsdidf.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -46,8 +46,7 @@ __FBSDID("$FreeBSD$");
  * This is exactly like floatdidf.c except that negatives never occur.
  */
 double
-__floatunsdidf(x)
-	u_quad_t x;
+__floatunsdidf(u_quad_t x)
 {
 	double d;
 	union uu u;

Modified: head/lib/libc/quad/iordi3.c
==============================================================================
--- head/lib/libc/quad/iordi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/iordi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$");
  * Return a | b, in quad.
  */
 quad_t
-__iordi3(a, b)
-	quad_t a, b;
+__iordi3(quad_t a, quad_t b)
 {
 	union uu aa, bb;
 

Modified: head/lib/libc/quad/lshldi3.c
==============================================================================
--- head/lib/libc/quad/lshldi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/lshldi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$");
  * This is the same as arithmetic shift left!
  */
 quad_t
-__lshldi3(a, shift)
-	quad_t a;
-	qshift_t shift;
+__lshldi3(quad_t a, qshift_t shift)
 {
 	union uu aa;
 

Modified: head/lib/libc/quad/lshrdi3.c
==============================================================================
--- head/lib/libc/quad/lshrdi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/lshrdi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -45,9 +45,7 @@ __FBSDID("$FreeBSD$");
  * Shift an (unsigned) quad value right (logical shift right).
  */
 quad_t
-__lshrdi3(a, shift)
-	quad_t a;
-	qshift_t shift;
+__lshrdi3(quad_t a, qshift_t shift)
 {
 	union uu aa;
 

Modified: head/lib/libc/quad/moddi3.c
==============================================================================
--- head/lib/libc/quad/moddi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/moddi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -48,8 +48,7 @@ __FBSDID("$FreeBSD$");
  * If -1/2 should produce -1 on this machine, this code is wrong.
  */
 quad_t
-__moddi3(a, b)
-	quad_t a, b;
+__moddi3(quad_t a, quad_t b)
 {
 	u_quad_t ua, ub, ur;
 	int neg;

Modified: head/lib/libc/quad/muldi3.c
==============================================================================
--- head/lib/libc/quad/muldi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/muldi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -101,8 +101,7 @@ __FBSDID("$FreeBSD$");
 static quad_t __lmulq(u_long, u_long);
 
 quad_t
-__muldi3(a, b)
-	quad_t a, b;
+__muldi3(quad_t a, quad_t b)
 {
 	union uu u, v, low, prod;
 	u_long high, mid, udiff, vdiff;

Modified: head/lib/libc/quad/negdi2.c
==============================================================================
--- head/lib/libc/quad/negdi2.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/negdi2.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$");
  * Return -a (or, equivalently, 0 - a), in quad.  See subdi3.c.
  */
 quad_t
-__negdi2(a)
-	quad_t a;
+__negdi2(quad_t a)
 {
 	union uu aa, res;
 

Modified: head/lib/libc/quad/notdi2.c
==============================================================================
--- head/lib/libc/quad/notdi2.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/notdi2.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -46,8 +46,7 @@ __FBSDID("$FreeBSD$");
  * than `not'.
  */
 quad_t
-__one_cmpldi2(a)
-	quad_t a;
+__one_cmpldi2(quad_t a)
 {
 	union uu aa;
 

Modified: head/lib/libc/quad/qdivrem.c
==============================================================================
--- head/lib/libc/quad/qdivrem.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/qdivrem.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -82,8 +82,7 @@ shl(digit *p, int len, int sh)
  * leading zeros).
  */
 u_quad_t
-__qdivrem(uq, vq, arq)
-	u_quad_t uq, vq, *arq;
+__qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq)
 {
 	union uu tmp;
 	digit *u, *v, *q;

Modified: head/lib/libc/quad/subdi3.c
==============================================================================
--- head/lib/libc/quad/subdi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/subdi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -46,8 +46,7 @@ __FBSDID("$FreeBSD$");
  * from a single u_long difference x-y occurs if and only if (x-y) > x.
  */
 quad_t
-__subdi3(a, b)
-	quad_t a, b;
+__subdi3(quad_t a, quad_t b)
 {
 	union uu aa, bb, diff;
 

Modified: head/lib/libc/quad/ucmpdi2.c
==============================================================================
--- head/lib/libc/quad/ucmpdi2.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/ucmpdi2.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -46,8 +46,7 @@ __FBSDID("$FreeBSD$");
  * Neither a nor b are considered signed.
  */
 int
-__ucmpdi2(a, b)
-	u_quad_t a, b;
+__ucmpdi2(u_quad_t a, u_quad_t b)
 {
 	union uu aa, bb;
 

Modified: head/lib/libc/quad/udivdi3.c
==============================================================================
--- head/lib/libc/quad/udivdi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/udivdi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$");
  * Divide two unsigned quads.
  */
 u_quad_t
-__udivdi3(a, b)
-	u_quad_t a, b;
+__udivdi3(u_quad_t a, u_quad_t b)
 {
 
 	return (__qdivrem(a, b, (u_quad_t *)0));

Modified: head/lib/libc/quad/umoddi3.c
==============================================================================
--- head/lib/libc/quad/umoddi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/umoddi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$");
  * Return remainder after dividing two unsigned quads.
  */
 u_quad_t
-__umoddi3(a, b)
-	u_quad_t a, b;
+__umoddi3(u_quad_t a, u_quad_t b)
 {
 	u_quad_t r;
 

Modified: head/lib/libc/quad/xordi3.c
==============================================================================
--- head/lib/libc/quad/xordi3.c	Sun Oct 21 00:15:51 2018	(r339509)
+++ head/lib/libc/quad/xordi3.c	Sun Oct 21 00:20:40 2018	(r339510)
@@ -45,8 +45,7 @@ __FBSDID("$FreeBSD$");
  * Return a ^ b, in quad.
  */
 quad_t
-__xordi3(a, b)
-	quad_t a, b;
+__xordi3(quad_t a, quad_t b)
 {
 	union uu aa, bb;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810210020.w9L0KfH8024126>