Print this page
remove support for non-ANSI compilation


   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*


  27  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  28  * Use is subject to license terms.
  29  */
  30 
  31 #ifndef _SYS_UTSNAME_H
  32 #define _SYS_UTSNAME_H
  33 
  34 #include <sys/feature_tests.h>
  35 
  36 #ifdef  __cplusplus
  37 extern "C" {
  38 #endif
  39 
  40 #define _SYS_NMLN       257     /* 4.0 size of utsname elements */
  41                                 /* Must be at least 257 to      */
  42                                 /* support Internet hostnames.  */
  43 
  44 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  45 #ifndef SYS_NMLN
  46 #define SYS_NMLN        _SYS_NMLN
  47 #endif
  48 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  49 
  50 struct utsname {
  51         char    sysname[_SYS_NMLN];
  52         char    nodename[_SYS_NMLN];
  53         char    release[_SYS_NMLN];
  54         char    version[_SYS_NMLN];
  55         char    machine[_SYS_NMLN];
  56 };
  57 
  58 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  59 extern struct utsname utsname;
  60 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  61 
  62 #if !defined(_KERNEL)
  63 
  64 #if defined(__i386) && !defined(__amd64)
  65 
  66 #if defined(__STDC__)
  67 
  68 extern int uname(struct utsname *);
  69 extern int _uname(struct utsname *);
  70 
  71 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  72 extern int nuname(struct utsname *);
  73 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  74 extern int _nuname(struct utsname *);
  75 
  76 #else   /* defined(__STDC__) */
  77 
  78 extern int uname();
  79 extern int _uname();
  80 
  81 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  82 extern int nuname();
  83 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  84 extern int _nuname();
  85 
  86 #endif  /* defined(__STDC__) */
  87 
  88 /*
  89  * On i386 in SVID.2 uname() returns a utsname structure with 8 byte members,
  90  * and nuname() returns the real struct utsname.  In SVID.3 uname and nuname
  91  * are equivalent.  Anyone who includes this header gets the SVID.3 behaviour.
  92  * The SVID.2 behaviour exists solely for compatibility, and is what is
  93  * implemented by the libc uname/_uname entrypoints.
  94  */
  95 #ifdef __PRAGMA_REDEFINE_EXTNAME
  96 #pragma redefine_extname        uname   _nuname
  97 #pragma redefine_extname        _uname  _nuname
  98 #else
  99 #define uname   _nuname
 100 #define _uname  _nuname
 101 #endif
 102 
 103 #else   /* defined(__i386) */
 104 
 105 #if defined(__STDC__)
 106 extern int uname(struct utsname *);
 107 #else
 108 extern int uname();
 109 #endif  /* (__STDC__) */
 110 
 111 #endif  /* defined(__i386) */
 112 
 113 #else   /* !(_KERNEL) */
 114 /*
 115  * Routine to retrieve the nodename as seen in the current process's zone.
 116  */
 117 extern char *uts_nodename(void);
 118 #endif  /* !(_KERNEL) */
 119 
 120 #ifdef  __cplusplus
 121 }
 122 #endif
 123 
 124 #endif  /* _SYS_UTSNAME_H */


   7  * with the License.
   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T     */
  23 /*        All Rights Reserved   */
  24 
  25 
  26 /*
  27  * Copyright 2014 Garrett D'Amore <garrett@damore.org>
  28  *
  29  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  30  * Use is subject to license terms.
  31  */
  32 
  33 #ifndef _SYS_UTSNAME_H
  34 #define _SYS_UTSNAME_H
  35 
  36 #include <sys/feature_tests.h>
  37 
  38 #ifdef  __cplusplus
  39 extern "C" {
  40 #endif
  41 
  42 #define _SYS_NMLN       257     /* 4.0 size of utsname elements */
  43                                 /* Must be at least 257 to      */
  44                                 /* support Internet hostnames.  */
  45 
  46 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  47 #ifndef SYS_NMLN
  48 #define SYS_NMLN        _SYS_NMLN
  49 #endif
  50 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  51 
  52 struct utsname {
  53         char    sysname[_SYS_NMLN];
  54         char    nodename[_SYS_NMLN];
  55         char    release[_SYS_NMLN];
  56         char    version[_SYS_NMLN];
  57         char    machine[_SYS_NMLN];
  58 };
  59 
  60 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  61 extern struct utsname utsname;
  62 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  63 
  64 #if !defined(_KERNEL)
  65 
  66 #if defined(__i386) && !defined(__amd64)
  67 


  68 extern int uname(struct utsname *);
  69 extern int _uname(struct utsname *);
  70 
  71 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  72 extern int nuname(struct utsname *);
  73 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  74 extern int _nuname(struct utsname *);
  75 












  76 /*
  77  * On i386 in SVID.2 uname() returns a utsname structure with 8 byte members,
  78  * and nuname() returns the real struct utsname.  In SVID.3 uname and nuname
  79  * are equivalent.  Anyone who includes this header gets the SVID.3 behaviour.
  80  * The SVID.2 behaviour exists solely for compatibility, and is what is
  81  * implemented by the libc uname/_uname entrypoints.
  82  */
  83 #ifdef __PRAGMA_REDEFINE_EXTNAME
  84 #pragma redefine_extname        uname   _nuname
  85 #pragma redefine_extname        _uname  _nuname
  86 #else
  87 #define uname   _nuname
  88 #define _uname  _nuname
  89 #endif
  90 
  91 #else   /* defined(__i386) */
  92 

  93 extern int uname(struct utsname *);



  94 
  95 #endif  /* defined(__i386) */
  96 
  97 #else   /* !(_KERNEL) */
  98 /*
  99  * Routine to retrieve the nodename as seen in the current process's zone.
 100  */
 101 extern char *uts_nodename(void);
 102 #endif  /* !(_KERNEL) */
 103 
 104 #ifdef  __cplusplus
 105 }
 106 #endif
 107 
 108 #endif  /* _SYS_UTSNAME_H */