Add an error check to ensure these are used on platforms without a

distinct long doble type only.
This commit is contained in:
kleink 2003-10-24 10:30:36 +00:00
parent 7b569bb154
commit 4ca4f9f41a
2 changed files with 14 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: isinfl_dbl_ieee754.c,v 1.1 2003/10/24 00:58:01 kleink Exp $ */ /* $NetBSD: isinfl_dbl_ieee754.c,v 1.2 2003/10/24 10:30:36 kleink Exp $ */
/* /*
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -40,13 +40,14 @@
#if 0 #if 0
static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93"; static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93";
#else #else
__RCSID("$NetBSD: isinfl_dbl_ieee754.c,v 1.1 2003/10/24 00:58:01 kleink Exp $"); __RCSID("$NetBSD: isinfl_dbl_ieee754.c,v 1.2 2003/10/24 10:30:36 kleink Exp $");
#endif #endif
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#include "namespace.h" #include "namespace.h"
#include <sys/types.h> #include <sys/types.h>
#include <machine/ieee.h> #include <machine/ieee.h>
#include <float.h>
#include <math.h> #include <math.h>
#if 0 /* XXX Currently limited to internal use. */ #if 0 /* XXX Currently limited to internal use. */
@ -55,6 +56,10 @@ __weak_alias(isinfl,_isinfl)
#endif #endif
#endif #endif
#if LDBL_MANT_DIG != DBL_MANT_DIG
#error double / long double mismatch
#endif
/* /*
* isinfl() for platforms where long double == double. * isinfl() for platforms where long double == double.
*/ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: isnanl_dbl_ieee754.c,v 1.1 2003/10/24 00:58:01 kleink Exp $ */ /* $NetBSD: isnanl_dbl_ieee754.c,v 1.2 2003/10/24 10:30:36 kleink Exp $ */
/* /*
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -40,13 +40,14 @@
#if 0 #if 0
static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93"; static char sccsid[] = "@(#)isinf.c 8.1 (Berkeley) 6/4/93";
#else #else
__RCSID("$NetBSD: isnanl_dbl_ieee754.c,v 1.1 2003/10/24 00:58:01 kleink Exp $"); __RCSID("$NetBSD: isnanl_dbl_ieee754.c,v 1.2 2003/10/24 10:30:36 kleink Exp $");
#endif #endif
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#include "namespace.h" #include "namespace.h"
#include <sys/types.h> #include <sys/types.h>
#include <machine/ieee.h> #include <machine/ieee.h>
#include <float.h>
#include <math.h> #include <math.h>
#if 0 /* XXX Currently limited to internal use. */ #if 0 /* XXX Currently limited to internal use. */
@ -55,6 +56,10 @@ __weak_alias(isnanl,_isnanl)
#endif #endif
#endif #endif
#if LDBL_MANT_DIG != DBL_MANT_DIG
#error double / long double mismatch
#endif
/* /*
* isnanl() for platforms where long double == double. * isnanl() for platforms where long double == double.
*/ */