mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Fixed fabs() for PowerPC soft-float support; previously, the function
definitions would clash. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14739 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: math_fabs.c,v 1.3 2004-09-29 14:17:44 obarthel Exp $
|
||||
* $Id: math_fabs.c,v 1.4 2004-09-29 14:30:03 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -126,8 +126,14 @@ __fabs(double x)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(__PPC__)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#if defined(PPC_FLOATING_POINT_SUPPORT)
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
INLINE static const double
|
||||
__fabs(double x)
|
||||
{
|
||||
@ -141,10 +147,35 @@ __fabs(double x)
|
||||
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#else
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
INLINE static const double
|
||||
__fabs(double x)
|
||||
{
|
||||
double res;
|
||||
|
||||
if(x < 0)
|
||||
res = (-x);
|
||||
else
|
||||
res = x;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#endif /* PPC_FLOATING_POINT_SUPPORT */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
#endif /* __PPC__ */
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
double
|
||||
fabs(double x)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user