projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix system error message decoding on Windows.
[sbcl.git]
/
src
/
code
/
misc-aliens.lisp
diff --git
a/src/code/misc-aliens.lisp
b/src/code/misc-aliens.lisp
index
bf11807
..
f3a55c3
100644
(file)
--- a/
src/code/misc-aliens.lisp
+++ b/
src/code/misc-aliens.lisp
@@
-22,5
+22,10
@@
"Return the value of the C library pseudo-variable named \"errno\".")
;;; Decode errno into a string.
"Return the value of the C library pseudo-variable named \"errno\".")
;;; Decode errno into a string.
+#!-win32
(defun strerror (&optional (errno (get-errno)))
(alien-funcall (extern-alien "strerror" (function c-string int)) errno))
(defun strerror (&optional (errno (get-errno)))
(alien-funcall (extern-alien "strerror" (function c-string int)) errno))
+
+#!+win32
+(defun strerror (&optional (errno (sb!win32:get-last-error)))
+ (sb!win32:format-system-message errno))