summaryrefslogtreecommitdiff
path: root/libquadmath/math/lgammaq.c
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-21 13:46:34 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-21 13:46:34 +0000
commit413929725e50d50f5b4a7d98ebdfd5fcf562a820 (patch)
tree8af2198385df0e740a9f5be20efa8808ecd8d2d7 /libquadmath/math/lgammaq.c
parent0d13a5a5bf762999d502807642b4bbe73932010b (diff)
downloadgcc-413929725e50d50f5b4a7d98ebdfd5fcf562a820.tar.gz
2012-11-21 Tobias Burnus <burnus@net-b.de>
PR libquadmath/55225 * math/lgammaq.c (lgammaq): Use local variable if math.h does not provide signgam. * acinclude.m4 (LIBQUAD_CHECK_MATH_H_SIGNGAM): New check. * configure.ac: Use it. * configure: Regenerate. * config.h.in: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193695 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libquadmath/math/lgammaq.c')
-rw-r--r--libquadmath/math/lgammaq.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libquadmath/math/lgammaq.c b/libquadmath/math/lgammaq.c
index 485939af1b4..eef62dbc91f 100644
--- a/libquadmath/math/lgammaq.c
+++ b/libquadmath/math/lgammaq.c
@@ -69,7 +69,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "quadmath-imp.h"
-#include <math.h> /* For extern int signgam. */
+
+#ifdef HAVE_MATH_H_SIGNGAM
+#include <math.h> /* For POSIX's extern int signgam. */
+#endif
static const __float128 PIQ = 3.1415926535897932384626433832795028841972E0Q;
static const __float128 MAXLGM = 1.0485738685148938358098967157129705071571E4928Q;
@@ -759,6 +762,9 @@ lgammaq (__float128 x)
{
__float128 p, q, w, z, nx;
int i, nn;
+#ifndef HAVE_MATH_H_SIGNGAM
+ int signgam;
+#endif
signgam = 1;