Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/utsname.h
          +++ new/usr/src/uts/common/sys/utsname.h
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  23   23  /*        All Rights Reserved   */
  24   24  
  25   25  
  26   26  /*
       27 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       28 + *
  27   29   * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  28   30   * Use is subject to license terms.
  29   31   */
  30   32  
  31   33  #ifndef _SYS_UTSNAME_H
  32   34  #define _SYS_UTSNAME_H
  33   35  
  34   36  #include <sys/feature_tests.h>
  35   37  
  36   38  #ifdef  __cplusplus
↓ open down ↓ 19 lines elided ↑ open up ↑
  56   58  };
  57   59  
  58   60  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  59   61  extern struct utsname utsname;
  60   62  #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  61   63  
  62   64  #if !defined(_KERNEL)
  63   65  
  64   66  #if defined(__i386) && !defined(__amd64)
  65   67  
  66      -#if defined(__STDC__)
  67      -
  68   68  extern int uname(struct utsname *);
  69   69  extern int _uname(struct utsname *);
  70   70  
  71   71  #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
  72   72  extern int nuname(struct utsname *);
  73   73  #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
  74   74  extern int _nuname(struct utsname *);
  75   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   76  /*
  89   77   * On i386 in SVID.2 uname() returns a utsname structure with 8 byte members,
  90   78   * and nuname() returns the real struct utsname.  In SVID.3 uname and nuname
  91   79   * are equivalent.  Anyone who includes this header gets the SVID.3 behaviour.
  92   80   * The SVID.2 behaviour exists solely for compatibility, and is what is
  93   81   * implemented by the libc uname/_uname entrypoints.
  94   82   */
  95   83  #ifdef __PRAGMA_REDEFINE_EXTNAME
  96   84  #pragma redefine_extname        uname   _nuname
  97   85  #pragma redefine_extname        _uname  _nuname
  98   86  #else
  99   87  #define uname   _nuname
 100   88  #define _uname  _nuname
 101   89  #endif
 102   90  
 103   91  #else   /* defined(__i386) */
 104   92  
 105      -#if defined(__STDC__)
 106   93  extern int uname(struct utsname *);
 107      -#else
 108      -extern int uname();
 109      -#endif  /* (__STDC__) */
 110   94  
 111   95  #endif  /* defined(__i386) */
 112   96  
 113   97  #else   /* !(_KERNEL) */
 114   98  /*
 115   99   * Routine to retrieve the nodename as seen in the current process's zone.
 116  100   */
 117  101  extern char *uts_nodename(void);
 118  102  #endif  /* !(_KERNEL) */
 119  103  
 120  104  #ifdef  __cplusplus
 121  105  }
 122  106  #endif
 123  107  
 124  108  #endif  /* _SYS_UTSNAME_H */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX