diff -r 19af679e3b3c lib/libc/compat/gen/compat_frexp_ieee754.c --- a/lib/libc/compat/gen/compat_frexp_ieee754.c Tue May 05 04:32:59 2020 +0000 +++ b/lib/libc/compat/gen/compat_frexp_ieee754.c Tue May 05 22:07:11 2020 +0000 @@ -44,10 +44,18 @@ static char sccsid[] = "@(#)frexp.c 8.1 #endif #endif /* LIBC_SCCS and not lint */ +#include "namespace.h" + #include + #include -double frexp(double, int *); +#include + +__weak_alias(frexp,_frexp) +__warn_references(frexp, + "warning: reference to compatibility frexp();" + " link with -lm for correct reference") /* * Split the given value into a fraction in the range [0.5, 1.0) and diff -r 19af679e3b3c lib/libc/compat/gen/compat_ldexp_ieee754.c --- a/lib/libc/compat/gen/compat_ldexp_ieee754.c Tue May 05 04:32:59 2020 +0000 +++ b/lib/libc/compat/gen/compat_ldexp_ieee754.c Tue May 05 22:07:11 2020 +0000 @@ -34,11 +34,19 @@ __RCSID("$NetBSD: compat_ldexp_ieee754.c,v 1.7 2016/08/27 09:35:13 christos Exp $"); #endif /* LIBC_SCCS and not lint */ +#include "namespace.h" + #include + #include + #include +#include -double ldexp(double, int); +__weak_alias(ldexp,_ldexp) +__warn_references(ldexp, + "warning: reference to compatibility ldexp();" + " link with -lm for correct reference") /* * Multiply the given value by 2^expon. diff -r 19af679e3b3c lib/libc/compat/gen/compat_modf_ieee754.c --- a/lib/libc/compat/gen/compat_modf_ieee754.c Tue May 05 04:32:59 2020 +0000 +++ b/lib/libc/compat/gen/compat_modf_ieee754.c Tue May 05 22:07:11 2020 +0000 @@ -27,11 +27,24 @@ * rights to redistribute these changes. */ +#include +#if defined(LIBC_SCCS) && !defined(lint) +__RCSID("$NetBSD$"); +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" + #include + #include + #include +#include -double modf(double, double *); +__weak_alias(modf,_modf) +__warn_references(modf, + "warning: reference to compatibility modf();" + " link with -lm for correct reference") /* * double modf(double val, double *iptr) diff -r 19af679e3b3c lib/libc/include/namespace.h --- a/lib/libc/include/namespace.h Tue May 05 04:32:59 2020 +0000 +++ b/lib/libc/include/namespace.h Tue May 05 22:07:11 2020 +0000 @@ -49,6 +49,7 @@ #define fileno _fileno #endif /* _REENTRANT */ #define fork _fork +#define frexp _frexp #define fseeko _fseeko #define ftello _ftello #define getcontext _getcontext @@ -57,6 +58,8 @@ #define imaxdiv _imaxdiv #define inet_aton _inet_aton #define inet_pton _inet_pton +#define ldexp _ldexp +#define modf _modf #define pipe _pipe #define sbrk _sbrk #define strerror_l _strerror_l