Reimplement isinf/isnan/fpclassify.

Also move isinf and isnan into libc like everyone else.

Also move fpclassify to libc like the BSDs (but unlike glibc). We need
this to be able to upgrade our float/double/long double parsing to gdtoa.

Also add some missing aliases. We now have all of:

  isnan, __isnan, isnanf, __isnanf, isnanl, __isnanl,
  isinf, __isinf, isinff, __isinff, isinfl, __isinfl,
  __fpclassify, __fpclassifyd, __fpclassifyf, __fpclassifyl.

Bug: 13469877
Change-Id: I407ffbac06c765a6c5fffda8106c37d7db04f27d
This commit is contained in:
Elliott Hughes
2014-04-11 17:02:20 -07:00
parent 0558906866
commit 02c78a3867
13 changed files with 300 additions and 296 deletions

View File

@@ -1,10 +1,10 @@
LOCAL_PATH:= $(call my-dir)
# TODO: these come from from upstream's libc, not libm!
# TODO: this comes from from upstream's libc, not libm, but it's an
# implementation detail that should have hidden visibility, so it needs
# to be in whatever library the math code is in.
libm_common_src_files := \
digittoint.c \
fpclassify.c \
isinf.c \
# TODO: this is not in the BSDs.
libm_common_src_files += \
@@ -129,7 +129,6 @@ libm_common_src_files += \
upstream-freebsd/lib/msun/src/s_ilogb.c \
upstream-freebsd/lib/msun/src/s_ilogbf.c \
upstream-freebsd/lib/msun/src/s_isfinite.c \
upstream-freebsd/lib/msun/src/s_isnan.c \
upstream-freebsd/lib/msun/src/s_isnormal.c \
upstream-freebsd/lib/msun/src/s_llrint.c \
upstream-freebsd/lib/msun/src/s_llrintf.c \
@@ -237,6 +236,7 @@ libm_common_cflags := \
-include $(LOCAL_PATH)/freebsd-compat.h \
libm_common_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/src/
libm_ld_includes := $(LOCAL_PATH)/upstream-freebsd/lib/msun/ld128/
#