delorie.com/djgpp/doc/libc/libc_836.html   search  
libc.a reference

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

uname

Syntax

 
#include <sys/utsname.h>

int uname(struct utsname *u);

Description

Fills in the structure with information about the system.

 
struct utsname {
  char machine[9];
  char nodename[32];
  char release[9];
  char sysname[9];
  char version[9];
};

machine
The CPU family type: "i386", "i486", "i586" (Pentium), "i686" (PentiumPro, Pentium II, Pentium III), or "i786" (Pentium 4).

nodename
The name of your PC (if networking is installed), else "pc".

release
The major version number of DOS. For example, DOS 1.23 would return "1" here.

sysname
The flavor of the OS.

version
The minor version number of DOS. For example, DOS 1.23 would return "23" here.

Return Value

Zero on success, else nonzero.

Portability

ANSI/ISO C No
POSIX 1003.2-1992; 1003.1-2001


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004