Next: , Previous: , Up: srfi env-inquiry   [Index]


2.36.3 Specification

The following procedures take no arguments and return either a string, or #f if the implementation cannot provide an appropriate and relevant result. It is an error to mutate the returned string. The procedures in this proposal are in the (srfi 112) library (or (srfi :112) on R6RS).

For Vicare: the bindings documented here are exported by the libraries (srfi :112) and (srfi :112 environment-inquiry) and also by the boot image, (vicare-scheme)Environment inquiry.

Because users are expected to use the values of these procedures for reporting rather than testing, no attempt is made to standardize the string values they return.

Procedures are provided rather than strings against the possibility that a Scheme process might migrate from machine to machine. This need not happen only in a distributed environment; consider, for example, dumping a core image file containing a compiler and then shipping it to another site.

POSIX and Common Lisp equivalents or near–equivalents are provided. On Windows, some of this information is available using the GetSystemInfo() and GetComputerName() APIs.

Function: implementation-name

Return the name of the Scheme implementation. This procedure corresponds roughly to Common Lisp’s lisp-implementation-type function.

Function: implementation-version

Return the version of the Scheme implementation. This procedure corresponds roughly to Common Lisp’s lisp-implementation-version function.

Function: cpu-architecture

Return the CPU architecture, real or virtual, on which this implementation is executing. This procedure corresponds roughly to Common Lisp’s machine-type function. On POSIX systems, the result may be derived from the machine field of the utsname structure.

Function: machine-name

Return a name for the particular machine on which the implementation is running. Possible values are the DNS or WINS host name, the DNS full name, an IP address in string form associated with the system, or a MAC address in string form associated with the system. This procedure corresponds roughly to Common Lisp’s machine-instance function. On POSIX systems, the result may be derived from the nodename field of the utsname structure.

Function: os-name

Return a name for the operating system, platform, or equivalent on which the implementation is running. This procedure corresponds roughly to Common Lisp’s software-type function. On POSIX systems, the result may be derived from the sysname field of the utsname structure.

Function: os-version

Return the version of the operating system, platform, or equivalent on which the implementation is running. This procedure corresponds roughly to Common Lisp’s software-version function. On POSIX systems, the result may be derived from the release and/or version fields of the utsname structure.

NOTE Analogues to the Common Lisp machine-version, short-site-name, and long-site-name are not provided. They are inconsistently implemented and of doubtful utility.


Next: , Previous: , Up: srfi env-inquiry   [Index]