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

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libm/common/m9x/feround.c
          +++ new/usr/src/lib/libm/common/m9x/feround.c
↓ open down ↓ 14 lines elided ↑ open up ↑
  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   23   * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24   24   */
       25 +
  25   26  /*
  26   27   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27   28   * Use is subject to license terms.
  28   29   */
  29   30  
  30   31  #pragma weak __fegetround = fegetround
  31   32  #pragma weak __fesetround = fesetround
  32   33  
  33   34  #pragma weak fegetround96 = __fegetround
  34   35  
  35   36  #include <fenv.h>
  36   37  #include <ucontext.h>
  37   38  #include <thread.h>
  38   39  #include "fex_handler.h"
  39   40  #include "fenv_inlines.h"
  40   41  
  41   42  #if defined(__i386) && !defined(__amd64)
  42   43  #include <float.h>
  43   44  #endif
  44   45  
  45      -int fegetround(void)
       46 +int
       47 +fegetround(void)
  46   48  {
  47      -        unsigned long   fsr;
       49 +        unsigned long fsr;
  48   50  
  49   51          __fenv_getfsr(&fsr);
  50      -        return (int)__fenv_get_rd(fsr);
       52 +        return ((int)__fenv_get_rd(fsr));
  51   53  }
  52   54  
  53      -int fesetround(int r)
       55 +int
       56 +fesetround(int r)
  54   57  {
  55      -        unsigned long   fsr;
       58 +        unsigned long fsr;
  56   59  
  57   60          if (r & ~3)
  58      -                return -1;
       61 +                return (-1);
       62 +
  59   63          __fenv_getfsr(&fsr);
  60   64          __fenv_set_rd(fsr, r);
  61   65          __fenv_setfsr(&fsr);
  62   66  #if defined(__i386) && !defined(__amd64)
  63   67          FLT_ROUNDS = (0x2D >> (r << 1)) & 3;    /* 0->1, 1->3, 2->2, 3->0 */
  64   68  #endif
  65      -        return 0;
       69 +        return (0);
  66   70  }
  67   71  
  68      -int fesetround96(int r)
       72 +int
       73 +fesetround96(int r)
  69   74  {
  70      -        unsigned long   fsr;
       75 +        unsigned long fsr;
  71   76  
  72   77          if (r & ~3)
  73      -                return 0;
       78 +                return (0);
       79 +
  74   80          __fenv_getfsr(&fsr);
  75   81          __fenv_set_rd(fsr, r);
  76   82          __fenv_setfsr(&fsr);
  77   83  #if defined(__i386) && !defined(__amd64)
  78   84          FLT_ROUNDS = (0x2D >> (r << 1)) & 3;    /* 0->1, 1->3, 2->2, 3->0 */
  79   85  #endif
  80      -        return 1;
       86 +        return (1);
  81   87  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX