OSDN Git Service

nptl: rephrase *.sym handling
[uclinux-h8/uClibc.git] / libm / k_standard.c
index 30d83e3..29e662d 100644 (file)
@@ -1,4 +1,3 @@
-/* @(#)k_standard.c 5.1 93/09/24 */
 /*
  * ====================================================
  * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
  * ====================================================
  */
 
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: k_standard.c,v 1.6 1995/05/10 20:46:35 jtc Exp $";
-#endif
-
 #include <math.h>
 #include "math_private.h"
 #include <errno.h>
 
-libm_hidden_proto(copysign)
-libm_hidden_proto(matherr)
-libm_hidden_proto(rint)
+#ifndef _IEEE_LIBM
 
 #ifndef _USE_WRITE
 #include <stdio.h>                     /* fputs(), stderr */
@@ -31,11 +24,7 @@ libm_hidden_proto(rint)
 #undef fflush
 #endif /* !defined(_USE_WRITE) */
 
-#ifdef __STDC__
 static const double zero = 0.0;        /* used as const */
-#else
-static double zero = 0.0;      /* used as const */
-#endif
 
 /*
  * Standard conformance (non-IEEE) on exception cases.
@@ -84,13 +73,7 @@ static double zero = 0.0;    /* used as const */
  *     42-- pow(NaN,0.0)
  */
 
-
-#ifdef __STDC__
-       double __kernel_standard(double x, double y, int type)
-#else
-       double __kernel_standard(x,y,type)
-       double x,y; int type;
-#endif
+double __kernel_standard(double x, double y, int type)
 {
        struct exception exc;
 #ifndef HUGE_VAL       /* this is the only routine that uses HUGE_VAL */
@@ -615,6 +598,7 @@ static double zero = 0.0;   /* used as const */
                   errno = EDOM;
                 }
                 break;
+# ifdef __UCLIBC_SUSV3_LEGACY__
            case 32:
            case 132:
                /* scalb overflow; SVID also returns +-HUGE_VAL */
@@ -639,6 +623,7 @@ static double zero = 0.0;   /* used as const */
                        errno = ERANGE;
                }
                break;
+# endif
            case 34:
            case 134:
                /* j0(|x|>X_TLOSS) */
@@ -784,3 +769,4 @@ static double zero = 0.0;   /* used as const */
        }
        return exc.retval;
 }
+#endif /* _IEEE_LIBM */