Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[a18f0a]: src / code / misc-aliens.lisp Maximize Restore History

Download this file

misc-aliens.lisp    27 lines (21 with data), 912 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;;;; assorted alien definitions
;;;; This software is part of the SBCL system. See the README file for
;;;; more information.
;;;;
;;;; This software is derived from the CMU CL system, which was
;;;; written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provided with absolutely no warranty. See the COPYING and CREDITS
;;;; files for more information.
(in-package "SB!IMPL")
(declaim (inline memmove))
(def-alien-routine ("memmove" memmove) void
(dest (* char))
(src (* char))
(n unsigned-int))
(def-alien-routine ("os_get_errno" get-errno) integer)
(setf (fdocumentation 'get-errno 'function)
"Return the value of the C library pseudo-variable named \"errno\".")
;;; Decode errno into a string.
(defun strerror (&optional (errno (get-errno)))
(alien-funcall (extern-alien "strerror" (function c-string int)) errno))