Node:Platform Type, Next:Filesystem Handling, Previous:Host Identification, Up:System Management
You can use the uname
function to find out some information about
the type of computer your program is running on. This function and the
associated data type are declared in the header file
sys/utsname.h
.
As a bonus, uname
also gives some information identifying the
particular system your program is running on. This is the same information
which you can get with functions targetted to this purpose described in
Host Identification.
struct utsname | Data Type |
The utsname structure is used to hold information returned
by the uname function. It has the following members:
|
int uname (struct utsname *info) | Function |
The uname function fills in the structure pointed to by
info with information about the operating system and host machine.
A non-negative value indicates that the data was successfully stored.
|