docs/how-to-build.md: use proper markup for directory names
[unleashed/tickless.git] / include / sys / utsname.h
blob827be846db1683a1e65ffd58afa85695df8c5235
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23 /* All Rights Reserved */
27 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
29 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
30 * Use is subject to license terms.
33 #ifndef _SYS_UTSNAME_H
34 #define _SYS_UTSNAME_H
36 #include <sys/feature_tests.h>
38 #ifdef _KERNEL
39 #include <sys/stdbool.h>
40 #endif
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
46 #define _SYS_NMLN 257 /* 4.0 size of utsname elements */
47 /* Must be at least 257 to */
48 /* support Internet hostnames. */
50 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
51 #ifndef SYS_NMLN
52 #define SYS_NMLN _SYS_NMLN
53 #endif
54 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
56 struct utsname {
57 char sysname[_SYS_NMLN];
58 char nodename[_SYS_NMLN];
59 char release[_SYS_NMLN];
60 char version[_SYS_NMLN];
61 char machine[_SYS_NMLN];
64 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
65 extern struct utsname utsname;
66 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
68 #if !defined(_KERNEL)
69 extern int uname(struct utsname *);
70 #else /* !(_KERNEL) */
72 * Routine to retrieve the nodename as seen in the current process's zone.
74 extern char *uts_nodename(void);
76 #endif /* !(_KERNEL) */
78 #ifdef __cplusplus
80 #endif
82 #endif /* _SYS_UTSNAME_H */