[asterisk-bugs] [Asterisk 0011847]: configure does not find floor, pow, rint, sqrt in tgmath.h

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Jan 27 09:49:55 CST 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11847 
====================================================================== 
Reported By:                pbwolf
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   11847
Category:                   General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 99296 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             01-25-2008 20:55 CST
Last Modified:              01-27-2008 09:49 CST
====================================================================== 
Summary:                    configure does not find floor, pow, rint, sqrt in
tgmath.h
Description: 
configure is not finding floor, pow, rint, or sqrt.

checking for floor... no
checking for pow... no
checking for rint... no
checking for sqrt... no

But they're there:

$ egrep -w "#define (floor|pow|rint|sqrt)" /usr/include/*.h
/usr/include/tgmath.h:#define pow(Val1, Val2) __TGMATH_BINARY_REAL_IMAG
(Val1, Val2, pow, cpow)
/usr/include/tgmath.h:#define sqrt(Val) __TGMATH_UNARY_REAL_IMAG (Val,
sqrt, csqrt)
/usr/include/tgmath.h:#define floor(Val) __TGMATH_UNARY_REAL_ONLY (Val,
floor)
/usr/include/tgmath.h:#define rint(Val) __TGMATH_UNARY_REAL_ONLY (Val,
rint)

====================================================================== 

---------------------------------------------------------------------- 
 pbwolf - 01-27-08 09:49  
---------------------------------------------------------------------- 
gcc -lm seems to find libm:

$ cat m.c
#include <stdio.h>
#include <math.h>
int main(char** argv) {
  double off_the_floor = 4.5;
  printf("floor(%lf)=%lf.\n", off_the_floor, floor(off_the_floor));
  return 0;
}

$ gcc -lm m.c
$ ./a.out
floor(4.500000)=4.000000.

(Without the -lm, gcc says "undefined reference to `floor'", as expected.) 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
01-27-08 09:49  pbwolf         Note Added: 0081234                          
======================================================================




More information about the asterisk-bugs mailing list