Print this page
5262 libm needs to be carefully unifdef'd
5268 libm doesn't need to hide symbols which are already local
Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: Gordon Ross <gwr@nexenta.com>
Approved by: Gordon Ross <gwr@nexenta.com>


  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 
  30 #if defined(ELFOBJ)
  31 #pragma weak nexttoward = __nexttoward
  32 #endif
  33 
  34 /*
  35  * nexttoward(x, y) delivers the next representable number after x
  36  * in the direction of y.  If x and y are both zero, the result is
  37  * zero with the same sign as y.  If either x or y is NaN, the result
  38  * is NaN.
  39  *
  40  * If x != y and the result is infinite, overflow is raised; if
  41  * x != y and the result is subnormal or zero, underflow is raised.
  42  * (This is wrong, but it's what C99 apparently wants.)
  43  */
  44 
  45 #include "libm.h"
  46 
  47 #if defined(__sparc)
  48 
  49 static union {
  50         unsigned i[2];
  51         double d;
  52 } C[] = {




  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 /*
  26  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  27  * Use is subject to license terms.
  28  */
  29 

  30 #pragma weak nexttoward = __nexttoward

  31 
  32 /*
  33  * nexttoward(x, y) delivers the next representable number after x
  34  * in the direction of y.  If x and y are both zero, the result is
  35  * zero with the same sign as y.  If either x or y is NaN, the result
  36  * is NaN.
  37  *
  38  * If x != y and the result is infinite, overflow is raised; if
  39  * x != y and the result is subnormal or zero, underflow is raised.
  40  * (This is wrong, but it's what C99 apparently wants.)
  41  */
  42 
  43 #include "libm.h"
  44 
  45 #if defined(__sparc)
  46 
  47 static union {
  48         unsigned i[2];
  49         double d;
  50 } C[] = {