Back to index

glibc  2.9
utsname.h
Go to the documentation of this file.
00001 /* Copyright (C) 1991,92,94,96,97,99,2002 Free Software Foundation, Inc.
00002    This file is part of the GNU C Library.
00003 
00004    The GNU C Library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Lesser General Public
00006    License as published by the Free Software Foundation; either
00007    version 2.1 of the License, or (at your option) any later version.
00008 
00009    The GNU C Library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Lesser General Public License for more details.
00013 
00014    You should have received a copy of the GNU Lesser General Public
00015    License along with the GNU C Library; if not, write to the Free
00016    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00017    02111-1307 USA.  */
00018 
00019 /*
00020  *     POSIX Standard: 4.4 System Identification <sys/utsname.h>
00021  */
00022 
00023 #ifndef       _SYS_UTSNAME_H
00024 #define       _SYS_UTSNAME_H       1
00025 
00026 #include <features.h>
00027 
00028 __BEGIN_DECLS
00029 
00030 #include <bits/utsname.h>
00031 
00032 #ifndef _UTSNAME_SYSNAME_LENGTH
00033 # define _UTSNAME_SYSNAME_LENGTH _UTSNAME_LENGTH
00034 #endif
00035 #ifndef _UTSNAME_NODENAME_LENGTH
00036 # define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH
00037 #endif
00038 #ifndef _UTSNAME_RELEASE_LENGTH
00039 # define _UTSNAME_RELEASE_LENGTH _UTSNAME_LENGTH
00040 #endif
00041 #ifndef _UTSNAME_VERSION_LENGTH
00042 # define _UTSNAME_VERSION_LENGTH _UTSNAME_LENGTH
00043 #endif
00044 #ifndef _UTSNAME_MACHINE_LENGTH
00045 # define _UTSNAME_MACHINE_LENGTH _UTSNAME_LENGTH
00046 #endif
00047 
00048 /* Structure describing the system and machine.  */
00049 struct utsname
00050   {
00051     /* Name of the implementation of the operating system.  */
00052     char sysname[_UTSNAME_SYSNAME_LENGTH];
00053 
00054     /* Name of this node on the network.  */
00055     char nodename[_UTSNAME_NODENAME_LENGTH];
00056 
00057     /* Current release level of this implementation.  */
00058     char release[_UTSNAME_RELEASE_LENGTH];
00059     /* Current version level of this release.  */
00060     char version[_UTSNAME_VERSION_LENGTH];
00061 
00062     /* Name of the hardware type the system is running on.  */
00063     char machine[_UTSNAME_MACHINE_LENGTH];
00064 
00065 #if _UTSNAME_DOMAIN_LENGTH - 0
00066     /* Name of the domain of this node on the network.  */
00067 # ifdef __USE_GNU
00068     char domainname[_UTSNAME_DOMAIN_LENGTH];
00069 # else
00070     char __domainname[_UTSNAME_DOMAIN_LENGTH];
00071 # endif
00072 #endif
00073   };
00074 
00075 #ifdef __USE_SVID
00076 /* Note that SVID assumes all members have the same size.  */
00077 # define SYS_NMLN  _UTSNAME_LENGTH
00078 #endif
00079 
00080 
00081 /* Put information about the system in NAME.  */
00082 extern int uname (struct utsname *__name) __THROW;
00083 
00084 
00085 __END_DECLS
00086 
00087 #endif /* sys/utsname.h  */