diff --git a/.gitignore b/.gitignore index f2858f82..573cff5e 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,8 @@ cov-int msvc/help.doc +msvc/*.c +msvc/*.tmp msvc/*.bat msvc/*.lsp msvc/c/*.[ch] diff --git a/src/cmp/cmpos-features.lsp b/src/cmp/cmpos-features.lsp index f6e42db4..e0c9c10c 100644 --- a/src/cmp/cmpos-features.lsp +++ b/src/cmp/cmpos-features.lsp @@ -17,7 +17,13 @@ (defun run-and-collect (command args &optional file) (handler-case - (let ((lines (collect-lines (si:run-program-inner command args :default t)))) + (let ((output-stream (si:run-program-inner command args :default t)) + lines) + #+msvc + (si::stream-external-format-set + output-stream + (list (si::windows-codepage-encoding) :crlf)) + (setf lines (collect-lines output-stream)) (cond ((null file) lines) ((probe-file file) @@ -147,12 +153,3 @@ we are currently using with ECL." (defun update-compiler-features (&rest args) (setf *compiler-features* (apply #'gather-system-features args))) - -#+ecl-min -(update-compiler-features - :executable - #+(or windows cygwin mingw32) "build:ecl_min.exe" - #-(or windows cygwin mingw32) "build:ecl_min") - -#+ecl-min -(format t ";;; System features: ~A~%" *compiler-features*) diff --git a/src/cmp/cmpos-run.lsp b/src/cmp/cmpos-run.lsp index 4008b3a6..eafcc601 100755 --- a/src/cmp/cmpos-run.lsp +++ b/src/cmp/cmpos-run.lsp @@ -55,6 +55,9 @@ #+(and ecl-min (not cygwin)) (multiple-value-bind (output-stream return-status pid) (si:run-program-inner program args :default nil) + #+msvc + (si::stream-external-format-set output-stream + (list (si::windows-codepage-encoding) :crlf)) (setf output (collect-lines output-stream)) (multiple-value-setq (return-status result) (si:waitpid pid t))) @@ -62,7 +65,9 @@ ;; quoting of arguments ... #+(and (not ecl-min) (not cygwin)) (multiple-value-bind (output-stream return-status process-obj) - (ext:run-program program args :wait nil) + (ext:run-program program args :wait nil + #+msvc :external-format + #+msvc (list (si::windows-codepage-encoding) :crlf)) (setf output (collect-lines output-stream)) (multiple-value-setq (return-status result) (ext:external-process-wait process-obj t))) diff --git a/src/compile.lsp.in b/src/compile.lsp.in index 7d0a681c..b5d9c5ed 100755 --- a/src/compile.lsp.in +++ b/src/compile.lsp.in @@ -21,6 +21,23 @@ ;;; (load "bare.lsp" :verbose nil) +;;; +;;; * External formats. These come at the very beginning since msvc needs +;;; them to compile correctly. +;;; +#+UNICODE +(load "ext:encodings;generate.lisp") + +;;; +;;; * Find out what features are supported by the C compiler we are using +;;; +(progn + (c::update-compiler-features + :executable + #+(or windows cygwin mingw32) "build:ecl_min.exe" + #-(or windows cygwin mingw32) "build:ecl_min") + (format t "~&;;; System features: ~A~%" c::*compiler-features*)) + ;;; ;;; * Complain about functions which are not in the core ;;; @@ -312,12 +329,6 @@ :prefix "EXT" :builtin #+:BUILTIN-RT t #-:BUILTIN-RT nil) -;;; -;;; * External formats -;;; -#+UNICODE -(load "ext:encodings;generate.lisp") - ;;; ;;; * Package locks ;;;