From patchwork Tue Sep 23 12:17:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Morales Vega X-Patchwork-Id: 392465 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 10AA6140077 for ; Tue, 23 Sep 2014 22:23:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 1704A95075; Tue, 23 Sep 2014 12:23:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kcdPpNwfx8UN; Tue, 23 Sep 2014 12:23:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 665B695054; Tue, 23 Sep 2014 12:23:01 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 613E41C2677 for ; Tue, 23 Sep 2014 12:23:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5CD8095054 for ; Tue, 23 Sep 2014 12:23:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dRW2byeT+HIA for ; Tue, 23 Sep 2014 12:22:58 +0000 (UTC) X-Greylist: delayed 00:05:21 by SQLgrey-1.7.6 Received: from mail-wg0-f49.google.com (mail-wg0-f49.google.com [74.125.82.49]) by hemlock.osuosl.org (Postfix) with ESMTPS id 6416795024 for ; Tue, 23 Sep 2014 12:22:58 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id x12so4327868wgg.32 for ; Tue, 23 Sep 2014 05:22:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wLvKNw1ylbIUeSE63FclvNmI0WBdaT6tG5qsWLa85ug=; b=iGUQliwapBKqyTrkU3cH/SXEt3KOjDL3I455u8bCbyuxO9/ZVy62KWZDcJO13fFkpz wRInR0vCxn2xZ1s0T3di522O/OfnO3SrhElvRYvl3kK/3bIGTpHOPiT6AQnSVK86T3oq c+nlDZoODK+aXx26Nn3Iqnv/udCqQBOpCJKHzSwsW2ogDtbCHFSlVhWCm5EHNqqoWaSF gE5syrtGc7aKcaZcsARxSDKZIrRllJbP86jFxpI7Wd/oS/5db7e2ANf3wXhwrUvNSzAK GqkNLv61ZywLNmg0iYD9f4MNBOb36TFXYw9yERE3Em3H8tiEk3E+YPgoXv5ZMmwmDTyL HT7Q== X-Gm-Message-State: ALoCoQlAMXAqEEEdI2T5vfEyHA82TecFDkK4GHUF7FogFiFsQAp0weFkLcqHQ53RY0vmj45PhOQK X-Received: by 10.194.21.101 with SMTP id u5mr2818225wje.113.1411474655524; Tue, 23 Sep 2014 05:17:35 -0700 (PDT) Received: from skcristian.samknows.com (5751e334.skybroadband.com. [87.81.227.52]) by mx.google.com with ESMTPSA id v9sm15727812wjy.14.2014.09.23.05.17.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Sep 2014 05:17:35 -0700 (PDT) From: Cristian Morales Vega To: uclibc@uclibc.org Subject: [PATCH] Do not define unimplemented functions Date: Tue, 23 Sep 2014 13:17:25 +0100 Message-Id: <1411474645-19490-1-git-send-email-cristian@samknows.com> X-Mailer: git-send-email 1.9.3 X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" e.g. fminf() is not implemented, only fmin(), but both are defined. Signed-off-by: Cristian Morales Vega Tested-by: Bernd Kuhls --- include/math.h | 2 ++ libc/sysdeps/linux/common/bits/mathcalls.h | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/include/math.h b/include/math.h index ecb9aa6..40dd90e 100644 --- a/include/math.h +++ b/include/math.h @@ -118,6 +118,7 @@ __BEGIN_DECLS # define _Mfloat_ float # endif # define _Mdouble_ _Mfloat_ +# define _Mdouble_is_float_ # ifdef __STDC__ # define __MATH_PRECNAME(name,r) name##f##r # else @@ -126,6 +127,7 @@ __BEGIN_DECLS # define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99 # define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99 # include +# undef _Mdouble_is_float_ # undef _Mdouble_ # undef _Mdouble_BEGIN_NAMESPACE # undef _Mdouble_END_NAMESPACE diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h index 84b793c..4270273 100644 --- a/libc/sysdeps/linux/common/bits/mathcalls.h +++ b/libc/sysdeps/linux/common/bits/mathcalls.h @@ -271,7 +271,9 @@ __END_NAMESPACE_C99 #ifdef __USE_ISOC99 __BEGIN_NAMESPACE_C99 /* True gamma function. */ +# ifndef _Mdouble_is_float_ __MATHCALLI (tgamma,, (_Mdouble_)) +# endif __END_NAMESPACE_C99 #endif @@ -299,7 +301,9 @@ __MATHCALLI (rint,, (_Mdouble_ __x)) /* Return X + epsilon if X < Y, X - epsilon if X > Y. */ __MATHCALLX (nextafter,, (_Mdouble_ __x, _Mdouble_ __y), (__const__)) # if defined __USE_ISOC99 && !defined __LDBL_COMPAT +# ifndef _Mdouble_is_float_ __MATHCALLX (nexttoward,, (_Mdouble_ __x, long double __y), (__const__)) +# endif # endif /* Return the remainder of integer divison X / Y with infinite precision. */ @@ -316,11 +320,15 @@ __MATHDECLI (int,ilogb,, (_Mdouble_ __x)) #ifdef __USE_ISOC99 /* Return X times (2 to the Nth power). */ +# ifndef _Mdouble_is_float_ __MATHCALLI (scalbln,, (_Mdouble_ __x, long int __n)) +# endif /* Round X to integral value in floating-point format using current rounding direction, but do not raise inexact exception. */ +# ifndef _Mdouble_is_float_ __MATHCALLI (nearbyint,, (_Mdouble_ __x)) +# endif /* Round X to nearest integral value, rounding halfway cases away from zero. */ @@ -333,7 +341,9 @@ __MATHCALLX (trunc,, (_Mdouble_ __x), (__const__)) /* Compute remainder of X and Y and put in *QUO a value with sign of x/y and magnitude congruent `mod 2^n' to the magnitude of the integral quotient x/y, with n >= 3. */ +# ifndef _Mdouble_is_float_ __MATHCALLI (remquo,, (_Mdouble_ __x, _Mdouble_ __y, int *__quo)) +# endif /* Conversion functions. */ @@ -350,13 +360,19 @@ __MATHDECLI (long long int,llround,, (_Mdouble_ __x)) /* Return positive difference between X and Y. */ +# ifndef _Mdouble_is_float_ __MATHCALLI (fdim,, (_Mdouble_ __x, _Mdouble_ __y)) +# endif /* Return maximum numeric value from X and Y. */ +# ifndef _Mdouble_is_float_ __MATHCALLI (fmax,, (_Mdouble_ __x, _Mdouble_ __y)) +# endif /* Return minimum numeric value from X and Y. */ +# ifndef _Mdouble_is_float_ __MATHCALLI (fmin,, (_Mdouble_ __x, _Mdouble_ __y)) +# endif /* Classify given number. */ @@ -367,7 +383,9 @@ __MATHDECL_PRIV (int, signbit,, (_Mdouble_ __value), (__const__)) /* Multiply-add function computed as a ternary operation. */ +# ifndef _Mdouble_is_float_ __MATHCALLI (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z)) +# endif #endif /* Use ISO C99. */ #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99