(root)/
coreutils-9.4/
lib/
sys_utsname.in.h
       1  /* Substitute for <sys/utsname.h>.
       2     Copyright (C) 2009-2023 Free Software Foundation, Inc.
       3  
       4     This file is free software: you can redistribute it and/or modify
       5     it under the terms of the GNU Lesser General Public License as
       6     published by the Free Software Foundation; either version 2.1 of the
       7     License, or (at your option) any later version.
       8  
       9     This file is distributed in the hope that it will be useful,
      10     but WITHOUT ANY WARRANTY; without even the implied warranty of
      11     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      12     GNU Lesser General Public License for more details.
      13  
      14     You should have received a copy of the GNU Lesser General Public License
      15     along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
      16  
      17  #ifndef _@GUARD_PREFIX@_SYS_UTSNAME_H
      18  
      19  #if __GNUC__ >= 3
      20  @PRAGMA_SYSTEM_HEADER@
      21  #endif
      22  @PRAGMA_COLUMNS@
      23  
      24  /* The include_next requires a split double-inclusion guard.  */
      25  #if @HAVE_SYS_UTSNAME_H@
      26  
      27  /* Minix 3.1.8 has a bug: <stddef.h> must be included before <sys/utsname.h>.
      28     But avoid namespace pollution on glibc systems.  */
      29  # if defined __minix && !defined __GLIBC__
      30  #  include <stddef.h>
      31  # endif
      32  
      33  # @INCLUDE_NEXT@ @NEXT_SYS_UTSNAME_H@
      34  
      35  #endif
      36  
      37  #ifndef _@GUARD_PREFIX@_SYS_UTSNAME_H
      38  #define _@GUARD_PREFIX@_SYS_UTSNAME_H
      39  
      40  /* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
      41  #if !_GL_CONFIG_H_INCLUDED
      42   #error "Please include config.h first."
      43  #endif
      44  
      45  /* The definition of _GL_ARG_NONNULL is copied here.  */
      46  
      47  /* The definition of _GL_WARN_ON_USE is copied here.  */
      48  
      49  
      50  #ifdef __cplusplus
      51  extern "C" {
      52  #endif
      53  
      54  #if !@HAVE_STRUCT_UTSNAME@
      55  /* Length of the entries in 'struct utsname' is 256.  */
      56  # define _UTSNAME_LENGTH 256
      57  
      58  # ifndef _UTSNAME_NODENAME_LENGTH
      59  #  define _UTSNAME_NODENAME_LENGTH _UTSNAME_LENGTH
      60  # endif
      61  # ifndef _UTSNAME_SYSNAME_LENGTH
      62  #  define _UTSNAME_SYSNAME_LENGTH _UTSNAME_LENGTH
      63  # endif
      64  # ifndef _UTSNAME_RELEASE_LENGTH
      65  #  define _UTSNAME_RELEASE_LENGTH _UTSNAME_LENGTH
      66  # endif
      67  # ifndef _UTSNAME_VERSION_LENGTH
      68  #  define _UTSNAME_VERSION_LENGTH _UTSNAME_LENGTH
      69  # endif
      70  # ifndef _UTSNAME_MACHINE_LENGTH
      71  #  define _UTSNAME_MACHINE_LENGTH _UTSNAME_LENGTH
      72  # endif
      73  
      74  # if !GNULIB_defined_struct_utsname
      75  /* Structure describing the system and machine.  */
      76  struct utsname
      77    {
      78      /* Name of this node on the network.  */
      79      char nodename[_UTSNAME_NODENAME_LENGTH];
      80  
      81      /* Name of the implementation of the operating system.  */
      82      char sysname[_UTSNAME_SYSNAME_LENGTH];
      83      /* Current release level of this implementation.  */
      84      char release[_UTSNAME_RELEASE_LENGTH];
      85      /* Current version level of this release.  */
      86      char version[_UTSNAME_VERSION_LENGTH];
      87  
      88      /* Name of the hardware type the system is running on.  */
      89      char machine[_UTSNAME_MACHINE_LENGTH];
      90    };
      91  #  define GNULIB_defined_struct_utsname 1
      92  # endif
      93  
      94  #endif /* !@HAVE_STRUCT_UTSNAME@ */
      95  
      96  
      97  #if @GNULIB_UNAME@
      98  # if !@HAVE_UNAME@
      99  extern int uname (struct utsname *buf) _GL_ARG_NONNULL ((1));
     100  # endif
     101  #elif defined GNULIB_POSIXCHECK
     102  # undef uname
     103  # if HAVE_RAW_DECL_UNAME
     104  _GL_WARN_ON_USE (uname, "uname is unportable - "
     105                   "use gnulib module uname for portability");
     106  # endif
     107  #endif
     108  
     109  
     110  #ifdef __cplusplus
     111  }
     112  #endif
     113  
     114  
     115  #endif /* _@GUARD_PREFIX@_SYS_UTSNAME_H */
     116  #endif /* _@GUARD_PREFIX@_SYS_UTSNAME_H */