NetSurf
utsname.h
Go to the documentation of this file.
1/*
2 * Copyright 2010 Vincent Sanders <vince@kyllikki.org>
3 *
4 * This file is part of NetSurf, http://www.netsurf-browser.org/
5 *
6 * NetSurf is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * NetSurf is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19/**
20 * \file utils/utsname.h
21 * \brief Interface to uts API to get name and information about current kernel.
22 */
23
24#ifndef _NETSURF_UTILS_UTSNAME_H_
25#define _NETSURF_UTILS_UTSNAME_H_
26
27#ifdef HAVE_UTSNAME
28#include <sys/utsname.h>
29#else
30/** system information filled in by uname derived from posix spec. */
31struct utsname {
32 char sysname[65]; /**< Operating system name (e.g., "Linux") */
33 char nodename[65]; /**< Name within "some implementation-defined
34 * network"
35 */
36 char release[65]; /**< OS release (e.g., "2.6.28") */
37 char version[65]; /**< OS version */
38 char machine[65]; /**< Hardware identifier */
39};
40
41/**
42 * Get the system information.
43 *
44 * @param buf the buffer to fill with the information.
45 * @return 0 on sucess or -1 and errno set on faliure.
46 */
47int uname(struct utsname *buf);
48
49#endif
50
51#endif
system information filled in by uname derived from posix spec.
Definition: utsname.h:31
char release[65]
OS release (e.g., "2.6.28")
Definition: utsname.h:36
char nodename[65]
Name within "some implementation-defined network".
Definition: utsname.h:33
char version[65]
OS version.
Definition: utsname.h:37
char machine[65]
Hardware identifier.
Definition: utsname.h:38
char sysname[65]
Operating system name (e.g., "Linux")
Definition: utsname.h:32
int uname(struct utsname *buf)
Get the system information.
Definition: utils.c:459