utsname.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* Copyright (C) 1991,92,94,96,97,99,2002 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, write to the Free
  13. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. 02111-1307 USA. */
  15. /*
  16. * POSIX Standard: 4.4 System Identification <sys/utsname.h>
  17. */
  18. #ifndef _SYS_UTSNAME_H
  19. #define _SYS_UTSNAME_H 1
  20. #include <features.h>
  21. __BEGIN_DECLS
  22. #include <bits/utsname.h>
  23. #ifndef _UTSNAME_SYSNAME_LENGTH
  24. # define _UTSNAME_SYSNAME_LENGTH _UTSNAME_LENGTH
  25. #endif
  26. #ifndef _UTSNAME_NODENAME_LENGTH
  27. # define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH
  28. #endif
  29. #ifndef _UTSNAME_RELEASE_LENGTH
  30. # define _UTSNAME_RELEASE_LENGTH _UTSNAME_LENGTH
  31. #endif
  32. #ifndef _UTSNAME_VERSION_LENGTH
  33. # define _UTSNAME_VERSION_LENGTH _UTSNAME_LENGTH
  34. #endif
  35. #ifndef _UTSNAME_MACHINE_LENGTH
  36. # define _UTSNAME_MACHINE_LENGTH _UTSNAME_LENGTH
  37. #endif
  38. /* Structure describing the system and machine. */
  39. struct utsname
  40. {
  41. /* Name of the implementation of the operating system. */
  42. char sysname[_UTSNAME_SYSNAME_LENGTH];
  43. /* Name of this node on the network. */
  44. char nodename[_UTSNAME_NODENAME_LENGTH];
  45. /* Current release level of this implementation. */
  46. char release[_UTSNAME_RELEASE_LENGTH];
  47. /* Current version level of this release. */
  48. char version[_UTSNAME_VERSION_LENGTH];
  49. /* Name of the hardware type the system is running on. */
  50. char machine[_UTSNAME_MACHINE_LENGTH];
  51. #if _UTSNAME_DOMAIN_LENGTH - 0
  52. /* Name of the domain of this node on the network. */
  53. # ifdef __USE_GNU
  54. char domainname[_UTSNAME_DOMAIN_LENGTH];
  55. # else
  56. char __domainname[_UTSNAME_DOMAIN_LENGTH];
  57. # endif
  58. #endif
  59. };
  60. #ifdef __USE_SVID
  61. /* Note that SVID assumes all members have the same size. */
  62. # define SYS_NMLN _UTSNAME_LENGTH
  63. #endif
  64. /* Put information about the system in NAME. */
  65. extern int uname (struct utsname *__name) __THROW;
  66. libc_hidden_proto(uname)
  67. __END_DECLS
  68. #endif /* sys/utsname.h */