diff --git a/src/code/exports.lisp b/src/code/exports.lisp index c4b7b7c7c118cc544b0910211c04ddbdef80230b..9854535c3af3f8581edac0528ff77ac5f7542ed5 100644 --- a/src/code/exports.lisp +++ b/src/code/exports.lisp @@ -291,12 +291,17 @@ "UNIX-GETUIO" ;; Hemlock + "UNIX-CFGETOSPEED" "TERMIOS" "UNIX-TCGETATTR" "UNIX-TCSETATTR" "UNIX-FCHMOD" "UNIX-CREAT" "UNIX-UTIMES" + + ;; Tests + "UNIX-SYMLINK" + ) #-linux (:export "UNIX-RMDIR" @@ -312,12 +317,6 @@ "PROT_READ" "UNIX-MUNMAP" - ;; Hemlock - "UNIX-CFGETOSPEED" - - ;; Tests - "UNIX-SYMLINK" - ;; Other symbols from structures, etc. "C-CC" "C-CFLAG" @@ -677,12 +676,6 @@ "PROT_READ" "UNIX-MUNMAP" - ;; Hemlock - "UNIX-CFGETOSPEED" - - ;; Tests - "UNIX-SYMLINK" - ;; Other symbols "BLKCNT-T" "C-CC" diff --git a/src/code/unix-glibc2.lisp b/src/code/unix-glibc2.lisp index 5cf2c1fdd009a20b903e73400a16efd1d8e7c108..6f6a0955cf8e5a8dea362da040835bd4dfb6ec49 100644 --- a/src/code/unix-glibc2.lisp +++ b/src/code/unix-glibc2.lisp @@ -1478,6 +1478,14 @@ nfds (frob rdfds rdf) (frob wrfds wrf) (frob xpfds xpf) (if to-secs (alien-sap (addr tv)) (int-sap 0)))))) +(defun unix-symlink (name1 name2) + _N"Unix-symlink creates a symbolic link named name2 to the file + named name1. NIL and an error number is returned if the call + is unsuccessful." + (declare (type unix-pathname name1 name2)) + (void-syscall ("symlink" c-string c-string) + (%name->file name1) (%name->file name2))) + (def-alien-routine ("gethostid" unix-gethostid) unsigned-long _N"Unix-gethostid returns a 32-bit integer which provides unique identification for the host machine.") @@ -1776,3 +1784,13 @@ (void-syscall ("tcsetattr" int int (* (struct termios))) fd opt termios)) (defconstant writeown #o200 _N"Write by owner") + +;;; termios.h + +(defun unix-cfgetospeed (termios) + _N"Get terminal output speed." + (multiple-value-bind (speed errno) + (int-syscall ("cfgetospeed" (* (struct termios))) termios) + (if speed + (values (svref terminal-speeds speed) 0) + (values speed errno))))