From 0d67e11363ce91e7f3d4d196d447add7acb67289 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Thu, 30 Sep 2010 08:43:55 +0000 Subject: [PATCH] 1.0.43.13: "minor fixed for Win32" from Kalyanov Dmitry * fix run-sbcl.sh for cygwin: need to convert the path. * fix contrib building for cygwin with GCC 4.x installed: require GCC 3.x since GCC 4.x apparently doesn't do -mno-cygwin. * PeekConsoleInput's third argument is the number of array in elements, not bytes. http://msdn.microsoft.com/en-us/library/ms684344%28VS.85%29.aspx Old usage led to stack overwriting. --- NEWS | 6 ++++++ contrib/asdf-module.mk | 2 ++ run-sbcl.sh | 4 ++++ src/code/win32.lisp | 2 +- version.lisp-expr | 2 +- 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 7642148..75b3db0 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,12 @@ changes relative to sbcl-1.0.43: spuriously when reading from a pipe (lp#643686) * bug fix: more efficient timer expiry should avoid starvation on systems where number of SIGALRMs per second is restricted. (lp#375515) + * improvements to the Windows port: + ** bug fix: stackoverwriting due to incorrect usage of PeekConsoleInput + on Windows. (thanks to Kalyanov Dmitry) + ** bug fix: build now works on cygwin with GCC 4.x installed. (thanks to + Kalyanov Dmitry) + ** bug fix: run-sbcl.sh now works on Cygwin. (thanks to Kalyanov Dmitry) changes in sbcl-1.0.43 relative to sbcl-1.0.42: * incompatible change: FD-STREAMS no longer participate in the serve-event diff --git a/contrib/asdf-module.mk b/contrib/asdf-module.mk index b6edb51..6bf4a36 100644 --- a/contrib/asdf-module.mk +++ b/contrib/asdf-module.mk @@ -15,6 +15,8 @@ ifeq (SunOS,$(UNAME)) endif ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME))) EXTRA_CFLAGS=-mno-cygwin + # GCC 4.x doesn't accept -mno-cygwin. + CC:=gcc=3 # SBCL can't read cygwin symlinks, and cygwin likes to symlink # gcc. To further complicate things, SBCL can't handle cygwin # paths, either. diff --git a/run-sbcl.sh b/run-sbcl.sh index 26dc406..8f0cd00 100644 --- a/run-sbcl.sh +++ b/run-sbcl.sh @@ -22,6 +22,10 @@ else BASE=`pwd` cd "${opwd}" fi +if [ "$OSTYPE" = "cygwin" ] +then + BASE=`cygpath -w "$BASE"` +fi CORE_DEFINED=no for arg in $*; do diff --git a/src/code/win32.lisp b/src/code/win32.lisp index 3aef593..37696c3 100644 --- a/src/code/win32.lisp +++ b/src/code/win32.lisp @@ -118,7 +118,7 @@ (unless (zerop (peek-console-input handle (cast buf (* t)) - input-record-size (addr avail))) + 1 (addr avail))) (return-from handle-listen (plusp avail))) ;; FIXME-SOCKETS: Try again here with WSAEventSelect in case diff --git a/version.lisp-expr b/version.lisp-expr index e5a8f8f..7c0a3e3 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.43.12" +"1.0.43.13" -- 1.7.10.4