summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authormax <max@tclers.tk>2011-06-30 15:13:04 (GMT)
committermax <max@tclers.tk>2011-06-30 15:13:04 (GMT)
commitab9198a4a8bfe2f03879c8fc4ae46b5f8eb64d60 (patch)
treec9a877a08f11e653a98690d0483a19d9f67a00c7 /unix
parentfe78bd7e38e4e05cd4e129f73a8bfeef232fac76 (diff)
downloadtcl-ab9198a4a8bfe2f03879c8fc4ae46b5f8eb64d60.zip
tcl-ab9198a4a8bfe2f03879c8fc4ae46b5f8eb64d60.tar.gz
tcl-ab9198a4a8bfe2f03879c8fc4ae46b5f8eb64d60.tar.bz2
Fix TCL_STACK_GROWS_UP for gcc 4.6
Diffstat (limited to 'unix')
-rwxr-xr-xunix/configure6
-rw-r--r--unix/configure.in6
2 files changed, 8 insertions, 4 deletions
diff --git a/unix/configure b/unix/configure
index ed71de0..aa792a7 100755
--- a/unix/configure
+++ b/unix/configure
@@ -18705,10 +18705,12 @@ cat >>conftest.$ac_ext <<_ACEOF
int StackGrowsUp(int *parent) {
int here;
+ volatile int result;
if (parent)
- return (&here < parent);
+ result = (&here < parent);
else
- return StackGrowsUp(&here);
+ result = StackGrowsUp(&here);
+ return result;
}
int main (int argc, char *argv[]) {
return StackGrowsUp(0);
diff --git a/unix/configure.in b/unix/configure.in
index e30c937..3394369 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -705,10 +705,12 @@ AC_CACHE_CHECK([if the C stack grows upwards in memory], tcl_cv_stack_grows_up,
AC_TRY_RUN([
int StackGrowsUp(int *parent) {
int here;
+ volatile int result;
if (parent)
- return (&here < parent);
+ result = (&here < parent);
else
- return StackGrowsUp(&here);
+ result = StackGrowsUp(&here);
+ return result;
}
int main (int argc, char *argv[]) {
return StackGrowsUp(0);