www.delorie.com/gnu/docs/guile/guile_435.html   search  
Buy GNU books!

Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

38.12 System Identification

This section lists the various procedures Guile provides for accessing information about the system it runs on.

Scheme Procedure: uname
C Function: scm_uname ()
Return an object with some information about the computer system the program is running on.

The following procedures accept an object as returned by uname and return a selected component.

The name of the operating system.
The network name of the computer.
The current release level of the operating system implementation.
The current version level within the release of the operating system.
A description of the hardware.

Scheme Procedure: gethostname
C Function: scm_gethostname ()
Return the host name of the current processor.

Scheme Procedure: sethostname name
C Function: scm_sethostname (name)
Set the host name of the current processor to name. May only be used by the superuser. The return value is not specified.

Scheme Procedure: software-type
Return a symbol describing the current platform's operating system. This may be one of AIX, VMS, UNIX, COHERENT, WINDOWS, MS-DOS, OS/2, THINKC, AMIGA, ATARIST, MACH, or ACORN.

Note that most varieties of Unix are considered to be simply "UNIX". That is because when a program depends on features that are not present on every operating system, it is usually better to test for the presence or absence of that specific feature. The return value of software-type should only be used for this purpose when there is no other easy or unambiguous way of detecting such features.

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003