Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/va_impl.h
          +++ new/usr/src/uts/common/sys/va_impl.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_VA_IMPL_H
  32   34  #define _SYS_VA_IMPL_H
  33   35  
  34   36  /*
  35   37   * An application should not include this header directly.  Instead it
  36   38   * should be included only through the inclusion of other Sun headers,
↓ open down ↓ 74 lines elided ↑ open up ↑
 111  113  #define __va_start(list, name)  ((list) = (__va_list)&name)
 112  114  #define __va_arg(list, type)    ((type *)(list))[0]
 113  115  #define __va_copy(to, from)     __va_void(((to) = (from)))
 114  116  /*ARGSUSED*/
 115  117  static void __va_end(__va_list list) { __va_end(list); }
 116  118  
 117  119  #elif defined(__BUILTIN_VA_STRUCT)      /* ------------------------ protocol */
 118  120  
 119  121  /* ISA __va_list structures defined in <sys/va_list.h> */
 120  122  
 121      -#if defined(__STDC__)   /* source language is ISO C or C++ */
 122      -
 123  123  void __builtin_va_start(__va_list, ...);
 124  124  void *__builtin_va_arg_incr(__va_list, ...);
 125  125  
 126      -#else   /* source language is K&R C */
 127      -
 128      -int __builtin_va_start();
 129      -char *__builtin_va_arg_incr();
 130      -
 131      -#endif  /* source language */
 132      -
 133  126  #define __va_start(list, name)  __builtin_va_start(list, 0)
 134  127  #define __va_arg(list, type)    \
 135  128          ((type *)__builtin_va_arg_incr(list, (type *)0))[0]
 136  129  #define __va_copy(to, from)     __va_void(((to)[0] = (from)[0]))
 137  130  #define __va_end(list)          __va_void(0)
 138  131  
 139  132  #elif defined(__BUILTIN_VA_ARG_INCR)    /* ------------------------ protocol */
 140  133  
 141  134  #define __va_start(list, name)  \
 142  135          __va_void(((list) = (__va_list)&__builtin_va_alist))
↓ open down ↓ 36 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX