/[cmucl]/src/code/unix-glibc2.lisp
ViewVC logotype

Diff of /src/code/unix-glibc2.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by pw, Fri Aug 25 09:59:06 2000 UTC revision 1.13 by dtc, Mon Jan 22 10:49:45 2001 UTC
# Line 56  Line 56 
56            unix-rename unix-rmdir unix-fast-select fd-setsize fd-set fd-clr            unix-rename unix-rmdir unix-fast-select fd-setsize fd-set fd-clr
57            fd-isset fd-zero unix-select unix-sync unix-fsync unix-truncate            fd-isset fd-zero unix-select unix-sync unix-fsync unix-truncate
58            unix-ftruncate unix-symlink unix-unlink unix-write unix-ioctl            unix-ftruncate unix-symlink unix-unlink unix-write unix-ioctl
59              unix-uname utsname
60            tcsetpgrp tcgetpgrp tty-process-group            tcsetpgrp tcgetpgrp tty-process-group
61            terminal-speeds tty-raw tty-crmod tty-echo tty-lcase            terminal-speeds tty-raw tty-crmod tty-echo tty-lcase
62            tty-cbreak            tty-cbreak
# Line 2148  length LEN and type TYPE." Line 2149  length LEN and type TYPE."
2149          nil          nil
2150        result)))        result)))
2151    
2152    (def-alien-type nil
2153      (struct utsname
2154        (sysname (array char 65))
2155        (nodename (array char 65))
2156        (release (array char 65))
2157        (version (array char 65))
2158        (machine (array char 65))
2159        (domainname (array char 65))))
2160    
2161    (defun unix-uname ()
2162      "Unix-uname returns the name and information about the current kernel. The
2163      values returned upon success are: sysname, nodename, release, version,
2164      machine, and domainname. Upon failure, 'nil and the 'errno are returned."
2165      (with-alien ((utsname (struct utsname)))
2166        (syscall ("uname" (* (struct utsname)))
2167                 (values (cast (slot utsname 'sysname) c-string)
2168                         (cast (slot utsname 'nodename) c-string)
2169                         (cast (slot utsname 'release) c-string)
2170                         (cast (slot utsname 'version) c-string)
2171                         (cast (slot utsname 'machine) c-string)
2172                         (cast (slot utsname 'domainname) c-string))
2173                 (addr utsname))))
2174    
2175  (defun unix-gethostname ()  (defun unix-gethostname ()
2176    "Unix-gethostname returns the name of the host machine as a string."    "Unix-gethostname returns the name of the host machine as a string."
2177    (with-alien ((buf (array char 256)))    (with-alien ((buf (array char 256)))

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.5