Print this page
11210 libm should be cstyle(1ONBLD) clean

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/C/isnan.c
          +++ new/usr/src/lib/libm/common/C/isnan.c
↓ open down ↓ 10 lines elided ↑ open up ↑
  11   11   * and limitations under the License.
  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  /*
  22   23   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  23   24   */
       25 +
  24   26  /*
  25   27   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  26   28   * Use is subject to license terms.
  27   29   */
  28   30  
  29   31  #pragma weak isnan = __isnan
  30   32  #pragma weak _isnan = __isnan
  31   33  #pragma weak _isnand = __isnan
  32   34  #pragma weak isnand = __isnan
  33   35  
  34   36  #include "libm.h"
  35   37  
  36   38  /*
  37   39   * The following implementation assumes fast 64-bit integer arith-
  38   40   * metic.  This is fine for sparc because we build libm in v8plus
  39   41   * mode.  It's also fine for sparcv9 and amd64.  For x86, it would
  40   42   * be better to use 32-bit code, but we have assembly for x86.
  41   43   */
  42   44  int
  43      -__isnan(double x) {
  44      -        long long       llx;
       45 +__isnan(double x)
       46 +{
       47 +        long long llx;
  45   48  
  46   49          llx = *(long long *)&x & ~0x8000000000000000ull;
  47   50          return ((unsigned long long)(0x7ff0000000000000ll - llx) >> 63);
  48   51  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX