SYNOPSIS
#include <sys/utsname.h>
int uname(struct utsname *name);
DESCRIPTION
The
PARAMETERS
- name
-
Points to the structure where the
uname() function stores information that identifies the current operating system. This structure contains the following fields:- sysname
-
contains Windows_NT.
- nodename
-
contains the machine name.
- release
-
contains the minor version number.
- version
-
contains the major version number.
- machine
-
contains the machine type (for example, Pentium).
You can use the major and minor version numbers, from the version and release fields, to determine precisely which version of Windows is running on the machine:
Major Minor Windows 2003 5 02 Windows Vista 6 00 Windows Server 2008 6 00 Windows 7 6 01 Windows Server 2008 R2 6 01 Windows 8 6 02 Windows Server 2012 6 02 Windows 8.1 6 03 Windows Server 2012 R2 6 03 Windows 10 10 00 Windows Server 2016 10 00 Windows Server 2019 10 00 Windows 11 10 00 Windows Server 2022 10 00
RETURN VALUES
If successful,
CONFORMANCE
POSIX.1 (1996).
MULTITHREAD SAFETY LEVEL
Async-signal-safe.
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.5 Documentation Build 40.