Next: , Previous: , Up: iklib   [Index]


6.7 Environment inquiry

Function: host-info

Return a string being the value GNU Autoconf assigned to the target variable. Examples: i686-pc-linux-gnu, x86_64-unknown-linux-gnu.

The POSIX function uname() fills a data structure of type struct utsname with strings representing a description of the underlying platform. Vicare defines objects of type <utsname> to provide at the Scheme level such informations; <utsname> objects are disjoint from all the other types.

Function: uname

Interface to the C function uname(), (*manpages*)Get name and information about current kernel. Build and return a new object of type <utsname>. If successful return the object, otherwise raise an exception.

Function: utsname? obj

Return #t if obj is an object of type <utsname>, otherwise return #f.

Function: utsname=? utsname0 utsname1

All the arguments must be <utsname> objects. Return #t if all the arguments are equal. When applied to a single argument: return #t.

Function: utsname!=? utsname0 utsname1

The arguments must be <utsname> objects. Return #t if the arguments are all different: no two arguments are equal; otherwise return #f. When applied to a single argument: return #f.

Function: utsname-sysname utsname
Function: utsname-nodename utsname
Function: utsname-release utsname
Function: utsname-version utsname
Function: utsname-machine utsname

Accessors for the fields of the utsname object. All the returned values are strings.

The following bindings are specified by SRFI-112, exported by (vicare) and reexported by the SRFI’s libraries, (vicare-libs)Specification.

Function: implementation-name

Return the string "vicare-scheme".

Function: implementation-version

Return the Vicare version string. Example:

(import (vicare))
(implementation-version)        ⇒ "0.3d4"
Function: cpu-architecture

Return a Scheme string representing the contents of the field machine of the struct utsname filled by uname(). Example:

(import (vicare))
(cpu-architecture)      ⇒ "x86_64"
Function: machine-name

Return a Scheme string representing the contents of the field nodename of the struct utsname filled by uname(). Example:

(import (vicare))
(machine-name)          ⇒ "governatore"
Function: os-name

Return a Scheme string representing the contents of the field sysname of the struct utsname filled by uname(). Example:

(import (vicare))
(os-name)               ⇒ "Linux"
Function: os-version

Return a Scheme string representing the contents of the field version of the struct utsname filled by uname(). Example:

(import (vicare))
(os-version)
⇒ "#2 SMP Mon Sep 17 14:19:22 CDT 2012"

Next: , Previous: , Up: iklib   [Index]