You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/01/14 20:21:06 UTC
[lucy-commits] [20/50] git commit: Fix detection of math library under C++
Fix detection of math library under C++
math.h functions might be overloaded under C++.
Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/e815550b
Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/e815550b
Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/e815550b
Branch: refs/heads/master
Commit: e815550bba3b491917e4a5f3fee8190af54a8111
Parents: ae9f31e
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Thu May 2 14:30:31 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Thu May 2 14:55:22 2013 +0200
----------------------------------------------------------------------
src/Charmonizer/Probe/Floats.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/e815550b/src/Charmonizer/Probe/Floats.c
----------------------------------------------------------------------
diff --git a/src/Charmonizer/Probe/Floats.c b/src/Charmonizer/Probe/Floats.c
index e486741..fc31386 100644
--- a/src/Charmonizer/Probe/Floats.c
+++ b/src/Charmonizer/Probe/Floats.c
@@ -51,8 +51,9 @@ chaz_Floats_math_library(void) {
static const char sqrt_code[] =
CHAZ_QUOTE( #include <math.h> )
CHAZ_QUOTE( #include <stdio.h> )
+ CHAZ_QUOTE( typedef double (*sqrt_t)(double); )
CHAZ_QUOTE( int main(void) { )
- CHAZ_QUOTE( printf("%p\n", sqrt); )
+ CHAZ_QUOTE( printf("%p\n", (sqrt_t)sqrt); )
CHAZ_QUOTE( return 0; )
CHAZ_QUOTE( } );
chaz_CFlags *temp_cflags = chaz_CC_get_temp_cflags();