From a8151a52caf34c5e223ca683bbe4e0a25e5f768f Mon Sep 17 00:00:00 2001 From: thorpej Date: Sat, 26 Oct 2002 06:51:32 +0000 Subject: [PATCH] Split isnan() into its own file. --- lib/libc/arch/vax/gen/Makefile.inc | 4 +-- lib/libc/arch/vax/gen/isinf.c | 18 +++------- lib/libc/arch/vax/gen/isnan.c | 57 ++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 16 deletions(-) create mode 100644 lib/libc/arch/vax/gen/isnan.c diff --git a/lib/libc/arch/vax/gen/Makefile.inc b/lib/libc/arch/vax/gen/Makefile.inc index ba8f1b5eee25..6a15dd167e33 100644 --- a/lib/libc/arch/vax/gen/Makefile.inc +++ b/lib/libc/arch/vax/gen/Makefile.inc @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.6 2002/03/27 18:38:50 matt Exp $ +# $NetBSD: Makefile.inc,v 1.7 2002/10/26 06:51:32 thorpej Exp $ SRCS+= byte_swap_2.S byte_swap_4.S bswap64.S \ - fabs.S frexp.c infinity.c isinf.c ldexp.S modf.S \ + fabs.S frexp.c infinity.c isinf.c isnan.c ldexp.S modf.S \ udiv.S urem.S \ __setjmp14.S __sigsetjmp14.S _setjmp.S diff --git a/lib/libc/arch/vax/gen/isinf.c b/lib/libc/arch/vax/gen/isinf.c index 70209dd3497d..1bb079c972a6 100644 --- a/lib/libc/arch/vax/gen/isinf.c +++ b/lib/libc/arch/vax/gen/isinf.c @@ -1,4 +1,4 @@ -/* $NetBSD: isinf.c,v 1.5 2000/01/22 22:45:01 mycroft Exp $ */ +/* $NetBSD: isinf.c,v 1.6 2002/10/26 06:51:33 thorpej Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: isinf.c,v 1.5 2000/01/22 22:45:01 mycroft Exp $"); +__RCSID("$NetBSD: isinf.c,v 1.6 2002/10/26 06:51:33 thorpej Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -46,22 +46,12 @@ __RCSID("$NetBSD: isinf.c,v 1.5 2000/01/22 22:45:01 mycroft Exp $"); #include #ifdef __weak_alias -__weak_alias(isnan,_isnan) __weak_alias(isinf,_isinf) #endif /* ARGSUSED */ int -isnan(d) - double d; +isinf(double d) { - return(0); -} - -/* ARGSUSED */ -int -isinf(d) - double d; -{ - return(0); + return (0); } diff --git a/lib/libc/arch/vax/gen/isnan.c b/lib/libc/arch/vax/gen/isnan.c new file mode 100644 index 000000000000..ccf7efe48644 --- /dev/null +++ b/lib/libc/arch/vax/gen/isnan.c @@ -0,0 +1,57 @@ +/* $NetBSD: isnan.c,v 1.1 2002/10/26 06:51:33 thorpej Exp $ */ + +/*- + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#if defined(LIBC_SCCS) && !defined(lint) +#if 0 +static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93"; +#else +__RCSID("$NetBSD: isnan.c,v 1.1 2002/10/26 06:51:33 thorpej Exp $"); +#endif +#endif /* LIBC_SCCS and not lint */ + +#include "namespace.h" +#include + +#ifdef __weak_alias +__weak_alias(isnan,_isnan) +#endif + +/* ARGSUSED */ +int +isnan(double d) +{ + return (0); +}