diff --git a/lib/libm/src/b_exp.c b/lib/libm/src/b_exp.c
index 87d4bff..bc74ad4 100644
--- a/lib/libm/src/b_exp.c
+++ b/lib/libm/src/b_exp.c
@@ -87,8 +87,8 @@ static const double invln2 = 0x1.71547652b82fep0;
 
 /* returns exp(r = x + c) for |c| < |x| with no overlap.  */
 
-double __exp__D(x, c)
-double x, c;
+double
+__exp__D(double x, double c)
 {
 	double  z,hi,lo;
 	int k;
diff --git a/lib/libm/src/b_log.c b/lib/libm/src/b_log.c
index 343f545..a212083 100644
--- a/lib/libm/src/b_log.c
+++ b/lib/libm/src/b_log.c
@@ -426,11 +426,7 @@ log(x) double x;
  * log(x) = a+b to 63 bits, with a rounded to 26 bits.
  */
 struct Double
-#ifdef _ANSI_SOURCE
 __log__D(double x)
-#else
-__log__D(x) double x;
-#endif
 {
 	int m, j;
 	double F, f, g, q, u, v, u2;
diff --git a/lib/libm/src/b_tgamma.c b/lib/libm/src/b_tgamma.c
index 8256b76..453286b 100644
--- a/lib/libm/src/b_tgamma.c
+++ b/lib/libm/src/b_tgamma.c
@@ -125,8 +125,7 @@ static struct Double ratfun_gam(double, double);
 static const double zero = 0., one = 1.0, tiny = 1e-300;
 
 double
-tgamma(x)
-	double x;
+tgamma(double x)
 {
 	struct Double u;
 
@@ -152,8 +151,7 @@ tgamma(x)
  * Accurate to max(ulp(1/128) absolute, 2^-66 relative) error.
  */
 static struct Double
-large_gam(x)
-	double x;
+large_gam(double x)
 {
 	double z, p;
 	struct Double t, u, v;
@@ -181,8 +179,7 @@ large_gam(x)
  * It also has correct monotonicity.
  */
 static double
-small_gam(x)
-	double x;
+small_gam(double x)
 {
 	double y, ym1, t;
 	struct Double yy, r;
@@ -215,8 +212,7 @@ small_gam(x)
  * Good on (0, 1+x0+LEFT].  Accurate to 1ulp.
  */
 static double
-smaller_gam(x)
-	double x;
+smaller_gam(double x)
 {
 	double t, d;
 	struct Double r, xx;
@@ -244,8 +240,7 @@ smaller_gam(x)
  * returns (z+c)^2 * P(z)/Q(z) + a0
  */
 static struct Double
-ratfun_gam(z, c)
-	double z, c;
+ratfun_gam(double z, double c)
 {
 	double p, q;
 	struct Double r, t;
@@ -271,8 +266,7 @@ ratfun_gam(z, c)
 }
 
 static double
-neg_gam(x)
-	double x;
+neg_gam(double x)
 {
 	int sgn = 1;
 	struct Double lg, lsine;
diff --git a/libexec/rtld-elf/malloc.c b/libexec/rtld-elf/malloc.c
index 220888a..a3cb102 100644
--- a/libexec/rtld-elf/malloc.c
+++ b/libexec/rtld-elf/malloc.c
@@ -122,8 +122,7 @@ static	u_int nmalloc[NBUCKETS];
 #define	ASSERT(p)   if (!(p)) botch("p")
 #include <stdio.h>
 static void
-botch(s)
-	char *s;
+botch(char *s)
 {
 	fprintf(stderr, "\r\nassertion botched: %s\r\n", s);
  	(void) fflush(stderr);		/* just in case user buffered it */
@@ -137,8 +136,7 @@ botch(s)
 #define TRACE()	rtld_printf("TRACE %s:%d\n", __FILE__, __LINE__)
 
 void *
-malloc(nbytes)
-	size_t nbytes;
+malloc(size_t nbytes)
 {
   	register union overhead *op;
   	register int bucket;
@@ -239,8 +237,7 @@ calloc(size_t num, size_t size)
  * Allocate more memory to the indicated bucket.
  */
 static void
-morecore(bucket)
-	int bucket;
+morecore(int bucket)
 {
   	register union overhead *op;
 	register int sz;		/* size of desired block */
@@ -283,8 +280,7 @@ morecore(bucket)
 }
 
 void
-free(cp)
-	void *cp;
+free(void *cp)
 {
   	register int size;
 	register union overhead *op;
@@ -325,9 +321,7 @@ free(cp)
 int realloc_srchlen = 4;	/* 4 should be plenty, -1 =>'s whole list */
 
 void *
-realloc(cp, nbytes)
-	void *cp;
-	size_t nbytes;
+realloc(void *cp, size_t nbytes)
 {
   	register u_int onb;
 	register int i;
@@ -396,9 +390,7 @@ realloc(cp, nbytes)
  * Return bucket number, or -1 if not found.
  */
 static int
-findbucket(freep, srchlen)
-	union overhead *freep;
-	int srchlen;
+findbucket(union overhead *freep, int srchlen)
 {
 	register union overhead *p;
 	register int i, j;
@@ -422,8 +414,8 @@ findbucket(freep, srchlen)
  * for each size category, the second showing the number of mallocs -
  * frees for each size category.
  */
-mstats(s)
-	char *s;
+void
+mstats(char *s)
 {
   	register int i, j;
   	register union overhead *p;
@@ -449,8 +441,7 @@ mstats(s)
 
 
 static int
-morepages(n)
-int	n;
+morepages(int n)
 {
 	int	fd = -1;
 	int	offset;
diff --git a/libexec/rtld-elf/rtld_lock.c b/libexec/rtld-elf/rtld_lock.c
index 7f018fc..50a7812 100644
--- a/libexec/rtld-elf/rtld_lock.c
+++ b/libexec/rtld-elf/rtld_lock.c
@@ -63,7 +63,7 @@ static sigset_t fullsigmask, oldsigmask;
 static int thread_flag;
 
 static void *
-def_lock_create()
+def_lock_create(void)
 {
     void *base;
     char *p;
@@ -265,7 +265,7 @@ lock_restart_for_upgrade(RtldLockState *lockstate)
 }
 
 void
-lockdflt_init()
+lockdflt_init(void)
 {
     int i;
 
