Posted to tcl by miguel at Tue Nov 27 15:39:32 GMT 2007view raw

  1. Index: generic/tclBasic.c
  2. ===================================================================
  3. RCS file: /cvsroot/tcl/tcl/generic/tclBasic.c,v
  4. retrieving revision 1.285
  5. diff -u -r1.285 tclBasic.c
  6. --- generic/tclBasic.c 26 Nov 2007 19:11:11 -0000 1.285
  7. +++ generic/tclBasic.c 27 Nov 2007 15:38:10 -0000
  8. @@ -351,7 +351,7 @@
  9. TclpGetCStackParams(&((iPtr)->stackBound))
  10. #ifdef TCL_STACK_GROWS_UP
  11. #define CheckCStack(iPtr, localIntPtr) \
  12. - (!(iPtr)->stackBound || (localIntPtr) < (iPtr)->stackBound)
  13. + ((localIntPtr) < (iPtr)->stackBound)
  14. #else /* TCL_STACK_GROWS_UP */
  15. #define CheckCStack(iPtr, localIntPtr) \
  16. ((localIntPtr) > (iPtr)->stackBound)
  17. Index: unix/tclUnixInit.c
  18. ===================================================================
  19. RCS file: /cvsroot/tcl/tcl/unix/tclUnixInit.c,v
  20. retrieving revision 1.81
  21. diff -u -r1.81 tclUnixInit.c
  22. --- unix/tclUnixInit.c 26 Nov 2007 19:11:13 -0000 1.81
  23. +++ unix/tclUnixInit.c 27 Nov 2007 15:38:10 -0000
  24. @@ -1059,10 +1059,14 @@
  25. result = GetStackSize(&stackSize);
  26. if (result != TCL_OK) {
  27. /* Can't check, assume it always succeeds */
  28. +#ifdef TCLSTACK_GROWS_UP
  29. + tsdPtr->stackBound = (int *)-1;
  30. +#else
  31. #ifdef TCL_CROSS_COMPILE
  32. stackGrowsDown = 1;
  33. #endif
  34. tsdPtr->stackBound = NULL;
  35. +#endif
  36. goto done;
  37. }
  38. }