utsname.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* Copyright (C) 1991, 92, 94, 96, 97, 99 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_NODENAME_LENGTH
  24. # define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH
  25. #endif
  26. /* Structure describing the system and machine. */
  27. struct utsname
  28. {
  29. /* Name of the implementation of the operating system. */
  30. char sysname[_UTSNAME_LENGTH];
  31. /* Name of this node on the network. */
  32. char nodename[_UTSNAME_NODENAME_LENGTH];
  33. /* Current release level of this implementation. */
  34. char release[_UTSNAME_LENGTH];
  35. /* Current version level of this release. */
  36. char version[_UTSNAME_LENGTH];
  37. /* Name of the hardware type the system is running on. */
  38. char machine[_UTSNAME_LENGTH];
  39. #if _UTSNAME_DOMAIN_LENGTH - 0
  40. /* Name of the domain of this node on the network. */
  41. # ifdef __USE_GNU
  42. char domainname[_UTSNAME_DOMAIN_LENGTH];
  43. # else
  44. char __domainname[_UTSNAME_DOMAIN_LENGTH];
  45. # endif
  46. #endif
  47. };
  48. #ifdef __USE_SVID
  49. # define SYS_NMLN _UTSNAME_LENGTH
  50. #endif
  51. /* Put information about the system in NAME. */
  52. extern int uname (struct utsname *__name) __THROW;
  53. libc_hidden_proto(uname)
  54. __END_DECLS
  55. #endif /* sys/utsname.h */