Print this page
remove support for non-ANSI compilation

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/sys/debug.h
          +++ new/usr/src/uts/common/sys/debug.h
↓ open down ↓ 11 lines elided ↑ open up ↑
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
       22 + * Copyright 2014 Garrett D'Amore <garrett@damore.org>
       23 + *
  22   24   * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
  23   25   * Use is subject to license terms.
  24   26   */
  25   27  
  26   28  /*
  27   29   * Copyright (c) 2012 by Delphix. All rights reserved.
  28   30   */
  29   31  
  30   32  /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
  31   33  /*        All Rights Reserved   */
↓ open down ↓ 9 lines elided ↑ open up ↑
  41   43  extern "C" {
  42   44  #endif
  43   45  
  44   46  /*
  45   47   * ASSERT(ex) causes a panic or debugger entry if expression ex is not
  46   48   * true.  ASSERT() is included only for debugging, and is a no-op in
  47   49   * production kernels.  VERIFY(ex), on the other hand, behaves like
  48   50   * ASSERT and is evaluated on both debug and non-debug kernels.
  49   51   */
  50   52  
  51      -#if defined(__STDC__)
  52   53  extern int assfail(const char *, const char *, int);
  53   54  #define VERIFY(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
  54   55  #if DEBUG
  55   56  #define ASSERT(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
  56   57  #else
  57   58  #define ASSERT(x)  ((void)0)
  58   59  #endif
  59      -#else   /* defined(__STDC__) */
  60      -extern int assfail();
  61      -#define VERIFY(EX) ((void)((EX) || assfail("EX", __FILE__, __LINE__)))
  62      -#if DEBUG
  63      -#define ASSERT(EX) ((void)((EX) || assfail("EX", __FILE__, __LINE__)))
  64      -#else
  65      -#define ASSERT(x)  ((void)0)
  66      -#endif
  67      -#endif  /* defined(__STDC__) */
  68   60  
  69   61  /*
  70   62   * Assertion variants sensitive to the compilation data model
  71   63   */
  72   64  #if defined(_LP64)
  73   65  #define ASSERT64(x)     ASSERT(x)
  74   66  #define ASSERT32(x)
  75   67  #else
  76   68  #define ASSERT64(x)
  77   69  #define ASSERT32(x)     ASSERT(x)
↓ open down ↓ 77 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX