1 /* Substitute for <sys/utsname.h>.
2 Copyright (C) 2009 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18 #ifndef _GL_SYS_UTSNAME_H
19 #define _GL_SYS_UTSNAME_H
21 /* The definition of GL_LINK_WARNING is copied here. */
29 /* Length of the entries in 'struct utsname' is 256. */
30 #define _UTSNAME_LENGTH 256
32 #ifndef _UTSNAME_NODENAME_LENGTH
33 # define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH
35 #ifndef _UTSNAME_SYSNAME_LENGTH
36 # define _UTSNAME_SYSNAME_LENGTH _UTSNAME_LENGTH
38 #ifndef _UTSNAME_RELEASE_LENGTH
39 # define _UTSNAME_RELEASE_LENGTH _UTSNAME_LENGTH
41 #ifndef _UTSNAME_VERSION_LENGTH
42 # define _UTSNAME_VERSION_LENGTH _UTSNAME_LENGTH
44 #ifndef _UTSNAME_MACHINE_LENGTH
45 # define _UTSNAME_MACHINE_LENGTH _UTSNAME_LENGTH
48 /* Structure describing the system and machine. */
51 /* Name of this node on the network. */
52 char nodename[_UTSNAME_NODENAME_LENGTH];
54 /* Name of the implementation of the operating system. */
55 char sysname[_UTSNAME_SYSNAME_LENGTH];
56 /* Current release level of this implementation. */
57 char release[_UTSNAME_RELEASE_LENGTH];
58 /* Current version level of this release. */
59 char version[_UTSNAME_VERSION_LENGTH];
61 /* Name of the hardware type the system is running on. */
62 char machine[_UTSNAME_MACHINE_LENGTH];
68 extern int uname (struct utsname *buf);
70 #elif defined GNULIB_POSIXCHECK
73 (GL_LINK_WARNING ("uname is unportable - " \
74 "use gnulib module uname for portability"), \
84 #endif /* _GL_SYS_UTSNAME_H */