Change 33551 by [EMAIL PROTECTED] on 2008/03/24 16:30:26

        Give the test file for __builtin_expect() the correct name (try.c, not
        builtin.c). Correct the user visible text, which was clearly a cut &
        paste from __builtin_choose_expr. For both, also run the program as
        part of the checks.

Affected files ...

... //depot/perl/Configure#686 edit

Differences ...

==== //depot/perl/Configure#686 (xtext) ====
Index: perl/Configure
--- perl/Configure#685~33547~   2008-03-21 03:28:42.000000000 -0700
+++ perl/Configure      2008-03-24 09:30:26.000000000 -0700
@@ -10554,7 +10554,7 @@
 
 EOCP
     set try
-    if eval $compile; then
+    if eval $compile && $run ./try; then
        echo "Your C compiler supports __builtin_choose_expr."
        val="$define"
     else
@@ -10574,18 +10574,20 @@
 '')
     echo " "
     echo "Checking whether your compiler can handle __builtin_expect ..." >&4
-    $cat >builtin.c <<'EOCP'
+    $cat >try.c <<'EOCP'
 int main(void) {
     int n = 50;
     if ( __builtin_expect(n, 0) ) n = 1;
+    /* Remember shell exit code truth is 0, C truth is non-zero */
+    return !(n == 1);
 }
 EOCP
     set try
-    if eval $compile; then
-       echo "Your C compiler supports __builtin_choose_expr."
+    if eval $compile && $run ./try; then
+       echo "Your C compiler supports __builtin_expect."
        val="$define"
     else
-       echo "Your C compiler doesn't seem to understand __builtin_choose_expr."
+       echo "Your C compiler doesn't seem to understand __builtin_expect."
        val="$undef"
     fi
     ;;
End of Patch.

Reply via email to