This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
[patch] math.h fixes
- From: Ken Werner <ken at linux dot vnet dot ibm dot com>
- To: newlib at sourceware dot org
- Date: Wed, 1 Apr 2009 22:36:55 +0200
- Subject: [patch] math.h fixes
Hi,
this patch removes the duplicate copysign prototype and fixes a typo. In
addition it guards the rint family because there are implemented on i386 only.
Ken
newlib/ChangeLog:
2009-03-31 Ken Werner <ken.werner@de.ibm.com>
* libc/include/math.h: Remove duplicate copysign prototype.
Fix __math_68881 define typo.
Guard functions of the rint family.
Index: src/newlib/libc/include/math.h
===================================================================
--- src.orig/newlib/libc/include/math.h
+++ src/newlib/libc/include/math.h
@@ -97,7 +97,7 @@ extern double floor _PARAMS((double));
/* Non reentrant ANSI C functions. */
#ifndef _REENT_ONLY
-#ifndef __math_6881
+#ifndef __math_68881
extern double acos _PARAMS((double));
extern double asin _PARAMS((double));
extern double atan2 _PARAMS((double, double));
@@ -226,13 +226,14 @@ extern double scalbln _PARAMS((double, l
extern double tgamma _PARAMS((double));
extern double nearbyint _PARAMS((double));
extern long int lrint _PARAMS((double));
+#if defined (__i386__) || defined(__SPU__)
extern _LONG_LONG_TYPE int llrint _PARAMS((double));
+#endif /* defined (__i386__) || defined(__SPU__) */
extern double round _PARAMS((double));
extern long int lround _PARAMS((double));
extern long long int llround _PARAMS((double));
extern double trunc _PARAMS((double));
extern double remquo _PARAMS((double, double, int *));
-extern double copysign _PARAMS((double, double));
extern double fdim _PARAMS((double, double));
extern double fmax _PARAMS((double, double));
extern double fmin _PARAMS((double, double));
@@ -337,9 +338,11 @@ extern float hypotf _PARAMS((float, floa
#endif /* ! defined (_REENT_ONLY) */
/* Other long double precision functions. */
+#ifdef __i386__
extern _LONG_DOUBLE rintl _PARAMS((_LONG_DOUBLE));
extern long int lrintl _PARAMS((_LONG_DOUBLE));
extern _LONG_LONG_TYPE llrintl _PARAMS((_LONG_DOUBLE));
+#endif /* __i386__ */
#endif /* !defined (__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L */