make the hypot/atan2 functions weak aliases, because they are used

internally by the historical cabs(), and the future c99 cabs/carg
This commit is contained in:
drochner 2007-08-10 21:20:35 +00:00
parent 26ba3dff65
commit b36bcf93ef
7 changed files with 30 additions and 6 deletions

View File

@ -7,9 +7,10 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
__RCSID("$NetBSD: compat_cabs.c,v 1.1 2007/02/22 22:08:19 drochner Exp $");
__RCSID("$NetBSD: compat_cabs.c,v 1.2 2007/08/10 21:20:35 drochner Exp $");
#endif
#include "../src/namespace.h"
#include <math.h>
struct complex {

View File

@ -7,9 +7,10 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
__RCSID("$NetBSD: compat_cabsf.c,v 1.1 2007/02/22 22:08:19 drochner Exp $");
__RCSID("$NetBSD: compat_cabsf.c,v 1.2 2007/08/10 21:20:35 drochner Exp $");
#endif
#include "../src/namespace.h"
#include <math.h>
struct complex {

6
lib/libm/src/namespace.h Normal file
View File

@ -0,0 +1,6 @@
/* $NetBSD: namespace.h,v 1.1 2007/08/10 21:20:36 drochner Exp $ */
#define atan2 _atan2
#define atan2f _atan2f
#define hypot _hypot
#define hypotf _hypotf

View File

@ -12,16 +12,20 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
__RCSID("$NetBSD: w_atan2.c,v 1.9 2002/05/26 22:01:59 wiz Exp $");
__RCSID("$NetBSD: w_atan2.c,v 1.10 2007/08/10 21:20:36 drochner Exp $");
#endif
/*
* wrapper atan2(y,x)
*/
#include "namespace.h"
#include "math.h"
#include "math_private.h"
#ifdef __weak_alias
__weak_alias(atan2, _atan2)
#endif
double
atan2(double y, double x) /* wrapper atan2 */

View File

@ -15,16 +15,20 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
__RCSID("$NetBSD: w_atan2f.c,v 1.6 2002/05/26 22:02:00 wiz Exp $");
__RCSID("$NetBSD: w_atan2f.c,v 1.7 2007/08/10 21:20:36 drochner Exp $");
#endif
/*
* wrapper atan2f(y,x)
*/
#include "namespace.h"
#include "math.h"
#include "math_private.h"
#ifdef __weak_alias
__weak_alias(atan2f, _atan2f)
#endif
float
atan2f(float y, float x) /* wrapper atan2f */

View File

@ -12,16 +12,20 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
__RCSID("$NetBSD: w_hypot.c,v 1.9 2002/05/26 22:02:01 wiz Exp $");
__RCSID("$NetBSD: w_hypot.c,v 1.10 2007/08/10 21:20:36 drochner Exp $");
#endif
/*
* wrapper hypot(x,y)
*/
#include "namespace.h"
#include "math.h"
#include "math_private.h"
#ifdef __weak_alias
__weak_alias(hypot, _hypot)
#endif
double
hypot(double x, double y)/* wrapper hypot */

View File

@ -15,16 +15,20 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
__RCSID("$NetBSD: w_hypotf.c,v 1.6 2002/05/26 22:02:01 wiz Exp $");
__RCSID("$NetBSD: w_hypotf.c,v 1.7 2007/08/10 21:20:36 drochner Exp $");
#endif
/*
* wrapper hypotf(x,y)
*/
#include "namespace.h"
#include "math.h"
#include "math_private.h"
#ifdef __weak_alias
__weak_alias(hypotf, _hypotf)
#endif
float
hypotf(float x, float y) /* wrapper hypotf */