Repository: lucy-charmonizer
Updated Branches:
  refs/heads/master 209f9e9a8 -> 1fbb61f42


Fix alloca probe


Project: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/commit/1fbb61f4
Tree: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/tree/1fbb61f4
Diff: http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/diff/1fbb61f4

Branch: refs/heads/master
Commit: 1fbb61f420ff19f091503e744d2118ba72da8faf
Parents: 209f9e9
Author: Nick Wellnhofer <[email protected]>
Authored: Mon Jun 1 13:18:13 2015 +0200
Committer: Nick Wellnhofer <[email protected]>
Committed: Mon Jun 1 13:46:59 2015 +0200

----------------------------------------------------------------------
 src/Charmonizer/Probe/Memory.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-charmonizer/blob/1fbb61f4/src/Charmonizer/Probe/Memory.c
----------------------------------------------------------------------
diff --git a/src/Charmonizer/Probe/Memory.c b/src/Charmonizer/Probe/Memory.c
index 71d6924..fbe4378 100644
--- a/src/Charmonizer/Probe/Memory.c
+++ b/src/Charmonizer/Probe/Memory.c
@@ -64,7 +64,7 @@ chaz_Memory_probe_alloca(void) {
 
     /* Unixen. */
     sprintf(code_buf, alloca_code, "alloca.h", "alloca");
-    if (chaz_CC_test_compile(code_buf)) {
+    if (chaz_CC_test_link(code_buf)) {
         has_alloca = true;
         chaz_ConfWriter_add_def("HAS_ALLOCA_H", NULL);
         chaz_ConfWriter_add_def("alloca", "alloca");
@@ -76,7 +76,7 @@ chaz_Memory_probe_alloca(void) {
          * are subsequently repeated during the build.
          */
         sprintf(code_buf, alloca_code, "stdlib.h", "alloca");
-        if (chaz_CC_test_compile(code_buf)) {
+        if (chaz_CC_test_link(code_buf)) {
             has_alloca = true;
             chaz_ConfWriter_add_def("ALLOCA_IN_STDLIB_H", NULL);
             chaz_ConfWriter_add_def("alloca", "alloca");
@@ -85,7 +85,7 @@ chaz_Memory_probe_alloca(void) {
     if (!has_alloca) {
         sprintf(code_buf, alloca_code, "stdio.h", /* stdio.h is filler */
                 "__builtin_alloca");
-        if (chaz_CC_test_compile(code_buf)) {
+        if (chaz_CC_test_link(code_buf)) {
             has_builtin_alloca = true;
             chaz_ConfWriter_add_def("alloca", "__builtin_alloca");
         }
@@ -94,7 +94,7 @@ chaz_Memory_probe_alloca(void) {
     /* Windows. */
     if (!(has_alloca || has_builtin_alloca)) {
         sprintf(code_buf, alloca_code, "malloc.h", "alloca");
-        if (chaz_CC_test_compile(code_buf)) {
+        if (chaz_CC_test_link(code_buf)) {
             has_alloca = true;
             chaz_ConfWriter_add_def("HAS_MALLOC_H", NULL);
             chaz_ConfWriter_add_def("alloca", "alloca");
@@ -102,9 +102,9 @@ chaz_Memory_probe_alloca(void) {
     }
     if (!(has_alloca || has_builtin_alloca)) {
         sprintf(code_buf, alloca_code, "malloc.h", "_alloca");
-        if (chaz_CC_test_compile(code_buf)) {
+        if (chaz_CC_test_link(code_buf)) {
             chaz_ConfWriter_add_def("HAS_MALLOC_H", NULL);
-            chaz_ConfWriter_add_def("chy_alloca", "_alloca");
+            chaz_ConfWriter_add_def("alloca", "_alloca");
         }
     }
 }

Reply via email to