15b2ba9d3SPiotr Jasiukajtis /* 25b2ba9d3SPiotr Jasiukajtis * CDDL HEADER START 35b2ba9d3SPiotr Jasiukajtis * 45b2ba9d3SPiotr Jasiukajtis * The contents of this file are subject to the terms of the 55b2ba9d3SPiotr Jasiukajtis * Common Development and Distribution License (the "License"). 65b2ba9d3SPiotr Jasiukajtis * You may not use this file except in compliance with the License. 75b2ba9d3SPiotr Jasiukajtis * 85b2ba9d3SPiotr Jasiukajtis * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 95b2ba9d3SPiotr Jasiukajtis * or http://www.opensolaris.org/os/licensing. 105b2ba9d3SPiotr Jasiukajtis * See the License for the specific language governing permissions 115b2ba9d3SPiotr Jasiukajtis * and limitations under the License. 125b2ba9d3SPiotr Jasiukajtis * 135b2ba9d3SPiotr Jasiukajtis * When distributing Covered Code, include this CDDL HEADER in each 145b2ba9d3SPiotr Jasiukajtis * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 155b2ba9d3SPiotr Jasiukajtis * If applicable, add the following below this CDDL HEADER, with the 165b2ba9d3SPiotr Jasiukajtis * fields enclosed by brackets "[]" replaced with your own identifying 175b2ba9d3SPiotr Jasiukajtis * information: Portions Copyright [yyyy] [name of copyright owner] 185b2ba9d3SPiotr Jasiukajtis * 195b2ba9d3SPiotr Jasiukajtis * CDDL HEADER END 205b2ba9d3SPiotr Jasiukajtis */ 215b2ba9d3SPiotr Jasiukajtis 225b2ba9d3SPiotr Jasiukajtis /* 235b2ba9d3SPiotr Jasiukajtis * Copyright 2011 Nexenta Systems, Inc. All rights reserved. 245b2ba9d3SPiotr Jasiukajtis */ 255b2ba9d3SPiotr Jasiukajtis /* 265b2ba9d3SPiotr Jasiukajtis * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 275b2ba9d3SPiotr Jasiukajtis * Use is subject to license terms. 285b2ba9d3SPiotr Jasiukajtis */ 295b2ba9d3SPiotr Jasiukajtis 30*a9d3dcd5SRichard Lowe #pragma weak __gammal = gammal 315b2ba9d3SPiotr Jasiukajtis 325b2ba9d3SPiotr Jasiukajtis /* 335b2ba9d3SPiotr Jasiukajtis * long double gammal(long double x); 345b2ba9d3SPiotr Jasiukajtis */ 355b2ba9d3SPiotr Jasiukajtis 365b2ba9d3SPiotr Jasiukajtis #include "libm.h" 375b2ba9d3SPiotr Jasiukajtis #include "longdouble.h" 385b2ba9d3SPiotr Jasiukajtis 395b2ba9d3SPiotr Jasiukajtis extern int signgam; 405b2ba9d3SPiotr Jasiukajtis extern int signgaml; 415b2ba9d3SPiotr Jasiukajtis 425b2ba9d3SPiotr Jasiukajtis long double gammal(long double x)435b2ba9d3SPiotr Jasiukajtisgammal(long double x) { 445b2ba9d3SPiotr Jasiukajtis long double y = __k_lgammal(x, &signgaml); 455b2ba9d3SPiotr Jasiukajtis 465b2ba9d3SPiotr Jasiukajtis signgam = signgaml; /* SUSv3 requires the setting of signgam */ 475b2ba9d3SPiotr Jasiukajtis return y; 485b2ba9d3SPiotr Jasiukajtis } 49