diff --git a/contrib/gdtoa/gdtoaimp.h b/contrib/gdtoa/gdtoaimp.h
index 8db7eff..b340757 100644
--- a/contrib/gdtoa/gdtoaimp.h
+++ b/contrib/gdtoa/gdtoaimp.h
@@ -175,9 +175,6 @@ THIS SOFTWARE.
 
 #define	Long	int
 
-#define USE_LOCALE
-#define Honor_FLT_ROUNDS
-
 #include "gdtoa.h"
 #include "gd_qnan.h"
 #ifdef Honor_FLT_ROUNDS
@@ -210,6 +207,12 @@ extern Char *MALLOC ANSI((size_t));
 #define MALLOC malloc
 #endif
 
+#define INFNAN_CHECK
+#define USE_LOCALE
+#define NO_LOCALE_CACHE
+#define Honor_FLT_ROUNDS
+#define Trust_FLT_ROUNDS
+
 #undef IEEE_Arith
 #undef Avoid_Underflow
 #ifdef IEEE_MC68k
diff --git a/include/ieeefp.h b/include/ieeefp.h
index 866bec2..46a9b98 100644
--- a/include/ieeefp.h
+++ b/include/ieeefp.h
@@ -1,6 +1,5 @@
 /*	$NetBSD: ieeefp.h,v 1.4 1998/01/09 08:03:43 perry Exp $	*/
 /* $FreeBSD: src/include/ieeefp.h,v 1.3.2.1 2000/08/17 08:08:14 jhb Exp $ */
-/* $DragonFly: src/include/ieeefp.h,v 1.4 2004/02/02 05:43:13 dillon Exp $ */
 
 /* 
  * Written by J.T. Conklin, Apr 6, 1995
@@ -13,9 +12,6 @@
 #include <sys/cdefs.h>
 #include <machine/ieeefp.h>
 
-#ifdef __i386__
-#include <machine/floatingpoint.h>
-#else /* !__i386__ */
 #if !defined(_IEEEFP_INLINED_)
 __BEGIN_DECLS
 extern fp_rnd_t    fpgetround (void);
@@ -26,6 +22,5 @@ extern fp_except_t fpgetsticky (void);
 extern fp_except_t fpsetsticky (fp_except_t);
 __END_DECLS
 #endif /* !_IEEEFP_INLINED_ */
-#endif /* __i386__ */
 
 #endif /* _IEEEFP_H_ */
diff --git a/lib/libc/Makefile.inc b/lib/libc/Makefile.inc
index 772b85a..639f072 100644
--- a/lib/libc/Makefile.inc
+++ b/lib/libc/Makefile.inc
@@ -11,7 +11,7 @@ MDASM=
 MIASM=
 NOASM=
 
-#WARNS=6
+WARNS=1
 
 .include "${.CURDIR}/../libc/${MACHINE_ARCH}/Makefile.inc"
 
diff --git a/lib/libc/citrus/citrus_iconv_local.h b/lib/libc/citrus/citrus_iconv_local.h
index 9323467..4cdb4ca 100644
--- a/lib/libc/citrus/citrus_iconv_local.h
+++ b/lib/libc/citrus/citrus_iconv_local.h
@@ -32,6 +32,10 @@
 
 #include "citrus_module.h"
 
+struct _citrus_iconv;
+struct _citrus_iconv_ops;
+struct _citrus_iconv_shared;
+
 #define _CITRUS_ICONV_GETOPS_FUNC_BASE(_n_)				\
 int _n_(struct _citrus_iconv_ops *, size_t, uint32_t)
 #define _CITRUS_ICONV_GETOPS_FUNC(_n_)					\
diff --git a/lib/libc/citrus/citrus_mapper_local.h b/lib/libc/citrus/citrus_mapper_local.h
index adffd73..c0cc06e 100644
--- a/lib/libc/citrus/citrus_mapper_local.h
+++ b/lib/libc/citrus/citrus_mapper_local.h
@@ -32,6 +32,11 @@
 
 #include "citrus_module.h"
 
+struct _citrus_mapper;
+struct _citrus_mapper_area;
+struct _citrus_mapper_ops;
+struct _citrus_mapper_traits;
+
 #define _CITRUS_MAPPER_GETOPS_FUNC_BASE(_n_)				\
 int _n_(struct _citrus_mapper_ops *, size_t, u_int32_t)
 #define _CITRUS_MAPPER_GETOPS_FUNC(_n_)					\
diff --git a/lib/libc/citrus/citrus_stdenc_local.h b/lib/libc/citrus/citrus_stdenc_local.h
index 2923edb..64a4e73 100644
--- a/lib/libc/citrus/citrus_stdenc_local.h
+++ b/lib/libc/citrus/citrus_stdenc_local.h
@@ -33,6 +33,11 @@
 
 #include "citrus_module.h"
 
+struct _citrus_stdenc;
+struct _citrus_stdenc_ops;
+struct _citrus_stdenc_state_desc;
+struct _citrus_stdenc_traits;
+
 #define _CITRUS_STDENC_GETOPS_FUNC_BASE(n)			\
 int n(struct _citrus_stdenc_ops *, size_t, uint32_t)
 #define _CITRUS_STDENC_GETOPS_FUNC(_e_)					\
diff --git a/lib/libc/locale/collate.c b/lib/libc/locale/collate.c
index 3391f19..543a1fa 100644
--- a/lib/libc/locale/collate.c
+++ b/lib/libc/locale/collate.c
@@ -254,7 +254,7 @@ __collate_err(int ex, const char *f)
 	const char *progname;
 	int serrno = errno;
 
-	progname = getprogname();
+	progname = _getprogname();
 	_write(STDERR_FILENO, progname, strlen(progname));
 	_write(STDERR_FILENO, ": ", 2);
 	_write(STDERR_FILENO, f, strlen(f));
diff --git a/sys/cpu/i386/include/floatingpoint.h b/sys/cpu/i386/include/floatingpoint.h
index 944b032..0d68923 100644
--- a/sys/cpu/i386/include/floatingpoint.h
+++ b/sys/cpu/i386/include/floatingpoint.h
@@ -38,94 +38,7 @@
 #ifndef _CPU_FLOATINGPOINT_H_
 #define _CPU_FLOATINGPOINT_H_
 
-/*
- * IEEE floating point structure and function definitions
- */
-
-/*-
- * XXX the following undocumented pollution is exported:
- *	fpsetsticky().
- *	FP*FLD, FP*OFF and FP*REG from <machine/ieeefp.h>
- */
-
 #include <sys/cdefs.h>
 #include <machine/ieeefp.h>
 
-#ifdef __GNUC__
-
-#define __fldenv(addr)	__asm __volatile("fldenv %0" : : "m" (*(addr)))
-#define __fnstenv(addr)	__asm __volatile("fnstenv %0" : "=m" (*(addr)))
-#define __fnstcw(addr)	__asm __volatile("fnstcw %0" : "=m" (*(addr)))
-#define __fnstsw(addr)	__asm __volatile("fnstsw %0" : "=m" (*(addr)))
-
-/*
- * return the contents of a FP register
- */
-static __inline__ int
-__fpgetreg(int _reg)
-{
-	unsigned short _mem;
-
-	/*-
-	 * This is more efficient than it looks.  The switch gets optimized
-	 * away if _reg is constant.
-	 *
-	 * The default case only supports _reg == 0.  We could handle more
-	 * registers (e.g., tags) using fnstenv, but the interface doesn't
-	 * support more.
-	 */
-	switch(_reg) {
-	default:
-		__fnstcw(&_mem);
-		break;
-	case FP_STKY_REG:
-		__fnstsw(&_mem);
-		break;
-	}
-	return _mem;
-}
-
-/*
- * set a FP mode; return previous mode
- */
-static __inline__ int
-__fpsetreg(int _m, int _reg, int _fld, int _off)
-{
-	unsigned _env[7];
-	unsigned _p;
-
-	/*
-	 * _reg == 0 could be handled better using fnstcw/fldcw.
-	 */
-	__fnstenv(_env);
-	_p =  (_env[_reg] & _fld) >> _off;
-	_env[_reg] = (_env[_reg] & ~_fld) | (_m << _off & _fld);
-	__fldenv(_env);
-	return _p;
-}
-
-#endif /* __GNUC__ */
-
-/*
- * SysV/386 FP control interface
- */
-#define	fpgetround()	((fp_rnd_t)					\
-	((__fpgetreg(FP_RND_REG) & FP_RND_FLD) >> FP_RND_OFF))
-#define	fpsetround(m)	((fp_rnd_t)					\
-	__fpsetreg((m), FP_RND_REG, FP_RND_FLD, FP_RND_OFF))
-#define	fpgetprec()	((fp_prec_t)					\
-	((__fpgetreg(FP_PRC_REG) & FP_PRC_FLD) >> FP_PRC_OFF))
-#define	fpsetprec(m)	((fp_prec_t)					\
-	__fpsetreg((m), FP_PRC_REG, FP_PRC_FLD, FP_PRC_OFF))
-#define	fpgetmask()	((fp_except_t)					\
-	((~__fpgetreg(FP_MSKS_REG) & FP_MSKS_FLD) >> FP_MSKS_OFF))
-#define	fpsetmask(m)	((fp_except_t)					\
-	(~__fpsetreg(~(m), FP_MSKS_REG, FP_MSKS_FLD, FP_MSKS_OFF)) &	\
-	    (FP_MSKS_FLD >> FP_MSKS_OFF))
-#define	fpgetsticky()	((fp_except_t)					\
-	((__fpgetreg(FP_STKY_REG) & FP_STKY_FLD) >> FP_STKY_OFF))
-#define	fpresetsticky(m) ((fp_except_t)					\
-	__fpsetreg(0, FP_STKY_REG, (m), FP_STKY_OFF))
-#define	fpsetsticky(m)	fpresetsticky(m)
-
 #endif /* !_CPU_FLOATINGPOINT_H_ */
diff --git a/sys/cpu/i386/include/ieeefp.h b/sys/cpu/i386/include/ieeefp.h
index ca7223b..310aac9 100644
--- a/sys/cpu/i386/include/ieeefp.h
+++ b/sys/cpu/i386/include/ieeefp.h
@@ -99,4 +99,84 @@ typedef enum {
 #define FP_RND_OFF	10	/* round control offset */
 #define FP_STKY_OFF	0	/* sticky flags offset */
 
+#ifdef __GNUC__
+
+#define	__fldenv(addr)	__asm __volatile("fldenv %0" : : "m" (*(addr)))
+#define	__fnstenv(addr)	__asm __volatile("fnstenv %0" : "=m" (*(addr)))
+#define	__fnstcw(addr)	__asm __volatile("fnstcw %0" : "=m" (*(addr)))
+#define	__fnstsw(addr)	__asm __volatile("fnstsw %0" : "=m" (*(addr)))
+
+/*
+ * return the contents of a FP register
+ */
+static __inline__ int
+__fpgetreg(int _reg)
+{
+	unsigned short _mem;
+
+	/*-
+	 * This is more efficient than it looks.  The switch gets optimized
+	 * away if _reg is constant.
+	 *
+	 * The default case only supports _reg == 0.  We could handle more
+	 * registers (e.g., tags) using fnstenv, but the interface doesn't
+	 * support more.
+	 */
+	switch(_reg) {
+	default:
+		__fnstcw(&_mem);
+		break;
+	case FP_STKY_REG:
+		__fnstsw(&_mem);
+		break;
+	}
+	return _mem;
+}
+
+/*
+ * set a FP mode; return previous mode
+ */
+static __inline__ int
+__fpsetreg(int _m, int _reg, int _fld, int _off)
+{
+	unsigned _env[7];
+	unsigned _p;
+
+	/*
+	 * _reg == 0 could be handled better using fnstcw/fldcw.
+	 */
+	__fnstenv(_env);
+	_p =  (_env[_reg] & _fld) >> _off;
+	_env[_reg] = (_env[_reg] & ~_fld) | (_m << _off & _fld);
+	__fldenv(_env);
+	return _p;
+}
+
+#endif /* __GNUC__ */
+
+/*
+ * SysV/386 FP control interface
+ */
+#define	fpgetround()	((fp_rnd_t)					\
+	((__fpgetreg(FP_RND_REG) & FP_RND_FLD) >> FP_RND_OFF))
+#define	fpsetround(m)	((fp_rnd_t)					\
+	__fpsetreg((m), FP_RND_REG, FP_RND_FLD, FP_RND_OFF))
+#define	fpgetprec()	((fp_prec_t)					\
+	((__fpgetreg(FP_PRC_REG) & FP_PRC_FLD) >> FP_PRC_OFF))
+#define	fpsetprec(m)	((fp_prec_t)					\
+	__fpsetreg((m), FP_PRC_REG, FP_PRC_FLD, FP_PRC_OFF))
+#define	fpgetmask()	((fp_except_t)					\
+	((~__fpgetreg(FP_MSKS_REG) & FP_MSKS_FLD) >> FP_MSKS_OFF))
+#define	fpsetmask(m)	((fp_except_t)					\
+	(~__fpsetreg(~(m), FP_MSKS_REG, FP_MSKS_FLD, FP_MSKS_OFF)) &	\
+	    (FP_MSKS_FLD >> FP_MSKS_OFF))
+#define	fpgetsticky()	((fp_except_t)					\
+	((__fpgetreg(FP_STKY_REG) & FP_STKY_FLD) >> FP_STKY_OFF))
+#define	fpresetsticky(m) ((fp_except_t)					\
+	__fpsetreg(0, FP_STKY_REG, (m), FP_STKY_OFF))
+#define	fpsetsticky(m)	fpresetsticky(m)
+
+/* Suppress prototypes in the MI header. */
+#define	_IEEEFP_INLINED_	1
+
 #endif /* !_CPU_IEEEFP_H_ */
