1 /* @(#)utsname.h	1.3 11/08/05 Copyright 2009-2011 J. Schilling */
2 /*
3  *	Utsname abstraction
4  *
5  *	Copyright (c) 2009-2011 J. Schilling
6  */
7 /*
8  * The contents of this file are subject to the terms of the
9  * Common Development and Distribution License, Version 1.0 only
10  * (the "License").  You may not use this file except in compliance
11  * with the License.
12  *
13  * See the file CDDL.Schily.txt in this distribution for details.
14  * A copy of the CDDL is also available via the Internet at
15  * http://www.opensource.org/licenses/cddl1.txt
16  *
17  * When distributing Covered Code, include this CDDL HEADER in each
18  * file and include the License file CDDL.Schily.txt from this distribution.
19  */
20 
21 #ifndef	_SCHILY_UTSNAME_H
22 #define	_SCHILY_UTSNAME_H
23 
24 #ifndef _SCHILY_MCONFIG_H
25 #include <schily/mconfig.h>
26 #endif
27 
28 /*
29  * NeXT Step has sys/utsname but not uname()
30  */
31 #ifdef	HAVE_SYS_UTSNAME_H
32 #ifndef	_INCL_SYS_UTSNAME_H
33 #define	_INCL_SYS_UTSNAME_H
34 #include <sys/utsname.h>
35 #endif
36 #else	/* !HAVE_SYS_UTSNAME_H */
37 
38 #ifdef	__cplusplus
39 extern "C" {
40 #endif
41 
42 #ifndef	SYS_NMLN
43 #define	SYS_NMLN	257
44 #endif
45 
46 struct utsname {
47 	char	sysname[SYS_NMLN];	/* Name of this OS		*/
48 	char	nodename[SYS_NMLN];	/* Name of this network node	*/
49 	char	release[SYS_NMLN];	/* Release level		*/
50 	char	version[SYS_NMLN];	/* Version level		*/
51 	char	machine[SYS_NMLN];	/* hardware type		*/
52 };
53 
54 #ifndef	HAVE_UNAME
55 extern	int	uname	__PR((struct utsname *));
56 #endif
57 
58 #ifdef	__cplusplus
59 }
60 #endif
61 
62 #endif	/* !HAVE_SYS_UTSNAME_H */
63 
64 #endif	/* _SCHILY_UTSNAME_H */
65