lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [2/8] git commit: refs/heads/master - Fix detection of math library under C++
Date Thu, 02 May 2013 14:03:03 GMT
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/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/2c0dccdf
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/2c0dccdf
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/2c0dccdf

Branch: refs/heads/master
Commit: 2c0dccdfe3418b038c40f8de709ef6ebd7a7c098
Parents: 848adfc
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Thu May 2 14:30:31 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Thu May 2 14:55:22 2013 +0200

----------------------------------------------------------------------
 charmonizer/src/Charmonizer/Probe/Floats.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/2c0dccdf/charmonizer/src/Charmonizer/Probe/Floats.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe/Floats.c b/charmonizer/src/Charmonizer/Probe/Floats.c
index e486741..fc31386 100644
--- a/charmonizer/src/Charmonizer/Probe/Floats.c
+++ b/charmonizer/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();


Mime
View raw message