From c4d9fc29b53c0efe160ccd028623f05dbc0a7bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sun, 12 Feb 2006 23:19:12 +0000 Subject: [PATCH] fix bug #151 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16371 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../posix/glibc/arch/generic/s_signbitl.c | 32 +++++++++++++++++++ .../libroot/posix/glibc/arch/x86/Jamfile | 1 + 2 files changed, 33 insertions(+) create mode 100644 src/system/libroot/posix/glibc/arch/generic/s_signbitl.c diff --git a/src/system/libroot/posix/glibc/arch/generic/s_signbitl.c b/src/system/libroot/posix/glibc/arch/generic/s_signbitl.c new file mode 100644 index 0000000000..aa8dc8656f --- /dev/null +++ b/src/system/libroot/posix/glibc/arch/generic/s_signbitl.c @@ -0,0 +1,32 @@ +/* Return nonzero value if number is negative. + Copyright (C) 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper , 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include + +#include "math_private.h" + +int +__signbitl (long double x) +{ + int32_t e; + + GET_LDOUBLE_EXP (e, x); + return e & 0x8000; +} diff --git a/src/system/libroot/posix/glibc/arch/x86/Jamfile b/src/system/libroot/posix/glibc/arch/x86/Jamfile index 33d05fce3e..2b91cb6b43 100644 --- a/src/system/libroot/posix/glibc/arch/x86/Jamfile +++ b/src/system/libroot/posix/glibc/arch/x86/Jamfile @@ -36,6 +36,7 @@ local genericSources = s_isnan.c s_isnanf.c s_ldexp.c s_ldexpf.c #s_ldexpl.c s_modf.c s_modff.c # s_modfl.c + s_signbit.c s_signbitl.c s_round.c s_roundf.c # s_roundl.c s_signgam.c s_tanh.c s_tanhf.c