Front page | perl.perl5.changes |
Postings from April 2008
Change 33735: Integrate:
From:
Nicholas Clark
Date:
April 23, 2008 10:30
Subject:
Change 33735: Integrate:
Change 33735 by nicholas@mouse-mill on 2008/04/23 17:26:40
Integrate:
[ 33551]
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. Add a return value to the test program, and make
it return something useful (that the if statement worked).
Affected files ...
... //depot/maint-5.10/perl/Configure#3 integrate
Differences ...
==== //depot/maint-5.10/perl/Configure#3 (xtext) ====
Index: perl/Configure
--- perl/Configure#2~33730~ 2008-04-22 12:22:09.000000000 -0700
+++ perl/Configure 2008-04-23 10:26:40.000000000 -0700
@@ -10431,7 +10431,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
@@ -10451,18 +10451,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.
-
Change 33735: Integrate:
by Nicholas Clark