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 2013/02/03 22:47:01 UTC

[lucy-commits] [5/5] git commit: refs/heads/master - Fix _scprintf detection on Windows

Updated Branches:
  refs/heads/master 1715fcda6 -> 3a0c80dec


Fix _scprintf detection on Windows


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

Branch: refs/heads/master
Commit: 3a0c80dec54906bbf8e1a5bde6392e8c7ca21a1e
Parents: ac40b03
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sun Feb 3 21:43:27 2013 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Sun Feb 3 22:06:01 2013 +0100

----------------------------------------------------------------------
 charmonizer/src/Charmonizer/Probe/Strings.c |    8 ++++++--
 clownfish/compiler/common/charmonizer.c     |    8 ++++++--
 clownfish/runtime/common/charmonizer.c      |    8 ++++++--
 common/charmonizer.c                        |    8 ++++++--
 4 files changed, 24 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/3a0c80de/charmonizer/src/Charmonizer/Probe/Strings.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe/Strings.c b/charmonizer/src/Charmonizer/Probe/Strings.c
index dabe9e2..9a1a288 100644
--- a/charmonizer/src/Charmonizer/Probe/Strings.c
+++ b/charmonizer/src/Charmonizer/Probe/Strings.c
@@ -79,11 +79,15 @@ chaz_Strings_probe_c99_snprintf(void) {
 
     /* Test for _scprintf and _snprintf found in the MSVCRT.
      */
-    if (chaz_CC_test_compile(detect__scprintf_code)) {
+    output = chaz_CC_capture_output(detect__scprintf_code, &output_len);
+    if (output != NULL) {
         chaz_ConfWriter_add_def("HAS__SCPRINTF", NULL);
+        free(output);
     }
-    if (chaz_CC_test_compile(detect__snprintf_code)) {
+    output = chaz_CC_capture_output(detect__snprintf_code, &output_len);
+    if (output != NULL) {
         chaz_ConfWriter_add_def("HAS__SNPRINTF", NULL);
+        free(output);
     }
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/3a0c80de/clownfish/compiler/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/clownfish/compiler/common/charmonizer.c b/clownfish/compiler/common/charmonizer.c
index b691c4f..5767750 100644
--- a/clownfish/compiler/common/charmonizer.c
+++ b/clownfish/compiler/common/charmonizer.c
@@ -3649,11 +3649,15 @@ chaz_Strings_probe_c99_snprintf(void) {
 
     /* Test for _scprintf and _snprintf found in the MSVCRT.
      */
-    if (chaz_CC_test_compile(detect__scprintf_code)) {
+    output = chaz_CC_capture_output(detect__scprintf_code, &output_len);
+    if (output != NULL) {
         chaz_ConfWriter_add_def("HAS__SCPRINTF", NULL);
+        free(output);
     }
-    if (chaz_CC_test_compile(detect__snprintf_code)) {
+    output = chaz_CC_capture_output(detect__snprintf_code, &output_len);
+    if (output != NULL) {
         chaz_ConfWriter_add_def("HAS__SNPRINTF", NULL);
+        free(output);
     }
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/3a0c80de/clownfish/runtime/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/clownfish/runtime/common/charmonizer.c b/clownfish/runtime/common/charmonizer.c
index 7f7178d..fa9db46 100644
--- a/clownfish/runtime/common/charmonizer.c
+++ b/clownfish/runtime/common/charmonizer.c
@@ -4665,11 +4665,15 @@ chaz_Strings_probe_c99_snprintf(void) {
 
     /* Test for _scprintf and _snprintf found in the MSVCRT.
      */
-    if (chaz_CC_test_compile(detect__scprintf_code)) {
+    output = chaz_CC_capture_output(detect__scprintf_code, &output_len);
+    if (output != NULL) {
         chaz_ConfWriter_add_def("HAS__SCPRINTF", NULL);
+        free(output);
     }
-    if (chaz_CC_test_compile(detect__snprintf_code)) {
+    output = chaz_CC_capture_output(detect__snprintf_code, &output_len);
+    if (output != NULL) {
         chaz_ConfWriter_add_def("HAS__SNPRINTF", NULL);
+        free(output);
     }
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/3a0c80de/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/common/charmonizer.c b/common/charmonizer.c
index 84a5341..0e22822 100644
--- a/common/charmonizer.c
+++ b/common/charmonizer.c
@@ -4665,11 +4665,15 @@ chaz_Strings_probe_c99_snprintf(void) {
 
     /* Test for _scprintf and _snprintf found in the MSVCRT.
      */
-    if (chaz_CC_test_compile(detect__scprintf_code)) {
+    output = chaz_CC_capture_output(detect__scprintf_code, &output_len);
+    if (output != NULL) {
         chaz_ConfWriter_add_def("HAS__SCPRINTF", NULL);
+        free(output);
     }
-    if (chaz_CC_test_compile(detect__snprintf_code)) {
+    output = chaz_CC_capture_output(detect__snprintf_code, &output_len);
+    if (output != NULL) {
         chaz_ConfWriter_add_def("HAS__SNPRINTF", NULL);
+        free(output);
     }
 }