[cmucl/cmucl][rtoy-unix-core] 2 commits: fchmod, creat, and utimes are in both unix and unix-glibc2.
Raymond Toy
rtoy at common-lisp.net
Sun May 10 16:29:00 UTC 2015
Raymond Toy pushed to branch rtoy-unix-core at cmucl / cmucl
Commits:
1bc6485e by Raymond Toy at 2015-05-10T09:23:45Z
fchmod, creat, and utimes are in both unix and unix-glibc2.
- - - - -
494e09f2 by Raymond Toy at 2015-05-10T09:28:27Z
Need unix-symlink in unix-glibc2 for tests.
- - - - -
2 changed files:
- src/code/exports.lisp
- src/code/unix-glibc2.lisp
Changes:
=====================================
src/code/exports.lisp
=====================================
--- a/src/code/exports.lisp
+++ b/src/code/exports.lisp
@@ -291,9 +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"
@@ -309,15 +317,6 @@
"PROT_READ"
"UNIX-MUNMAP"
- ;; Hemlock
- "UNIX-CFGETOSPEED"
- "UNIX-FCHMOD"
- "UNIX-CREAT"
- "UNIX-UTIMES"
-
- ;; Tests
- "UNIX-SYMLINK"
-
;; Other symbols from structures, etc.
"C-CC"
"C-CFLAG"
@@ -677,15 +676,6 @@
"PROT_READ"
"UNIX-MUNMAP"
- ;; Hemlock
- "UNIX-CFGETOSPEED"
- "UNIX-FCHMOD"
- "UNIX-CREAT"
- "UNIX-UTIMES"
-
- ;; Tests
- "UNIX-SYMLINK"
-
;; Other symbols
"BLKCNT-T"
"C-CC"
=====================================
src/code/unix-glibc2.lisp
=====================================
--- 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))))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/c5dfebd62c6ebac1d822766d4e731c4a4c45c8b8...494e09f2b9a3aea3f876f82ca550ad729f928c4a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20150510/a89e053b/attachment.html>
More information about the cmucl-cvs
mailing list