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 modf = __modf
  32 #pragma weak _modf = __modf
  33 #endif
  34 
  35 /*
  36  * modf(x, iptr) decomposes x into an integral part and a fractional
  37  * part both having the same sign as x.  It stores the integral part
  38  * in *iptr and returns the fractional part.
  39  *
  40  * If x is infinite, modf sets *iptr to x and returns copysign(0.0,x).
  41  * If x is NaN, modf sets *iptr to x and returns x.
  42  *
  43  * If x is a signaling NaN, this code does not attempt to raise the
  44  * invalid operation exception.
  45  */
  46 
  47 #include "libm.h"
  48 
  49 double
  50 __modf(double x, double *iptr) {
  51         union {
  52                 unsigned i[2];
  53                 double d;




  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 modf = __modf
  31 #pragma weak _modf = __modf

  32 
  33 /*
  34  * modf(x, iptr) decomposes x into an integral part and a fractional
  35  * part both having the same sign as x.  It stores the integral part
  36  * in *iptr and returns the fractional part.
  37  *
  38  * If x is infinite, modf sets *iptr to x and returns copysign(0.0,x).
  39  * If x is NaN, modf sets *iptr to x and returns x.
  40  *
  41  * If x is a signaling NaN, this code does not attempt to raise the
  42  * invalid operation exception.
  43  */
  44 
  45 #include "libm.h"
  46 
  47 double
  48 __modf(double x, double *iptr) {
  49         union {
  50                 unsigned i[2];
  51                 double d;