diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-11-05 18:07:15 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-11-05 18:07:15 +0000 |
commit | d76bd17ff96a44417e0d0f1e50591bded3263199 (patch) | |
tree | 07b65bc9e9a0717b022ed4459fc24b16d23259ce | |
parent | 9a821cf90b38590fa546dc3246d12526e4f95ba1 (diff) | |
download | glibc-d76bd17ff96a44417e0d0f1e50591bded3263199.tar.gz glibc-d76bd17ff96a44417e0d0f1e50591bded3263199.tar.xz glibc-d76bd17ff96a44417e0d0f1e50591bded3263199.zip |
Update.
* math/math.h: Unconditionally include bits/mathdef.h. Declare long double functions only if __NO_LONG_DOUBLE_MATH is not defined. * sysdeps/generic/bits/mathdef.h: Define only if __USE_ISOC9X. Define __NO_LONG_DOUBLE_MATH. * sysdeps/m68k/fpu/bits/mathdef.h: Define only if __USE_ISOC9X. * sysdeps/i386/fpu/bits/mathdef.h: Likewise.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | bits/mathdef.h | 20 | ||||
-rw-r--r-- | math/math.h | 5 | ||||
-rw-r--r-- | sysdeps/generic/bits/mathdef.h | 20 | ||||
-rw-r--r-- | sysdeps/i386/fpu/bits/mathdef.h | 16 | ||||
-rw-r--r-- | sysdeps/m68k/fpu/bits/mathdef.h | 16 |
6 files changed, 55 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog index f41a7d1686..39072c7285 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 1998-11-05 Ulrich Drepper <drepper@cygnus.com> + * math/math.h: Unconditionally include bits/mathdef.h. Declare + long double functions only if __NO_LONG_DOUBLE_MATH is not + defined. + * sysdeps/generic/bits/mathdef.h: Define only if __USE_ISOC9X. + Define __NO_LONG_DOUBLE_MATH. + * sysdeps/m68k/fpu/bits/mathdef.h: Define only if __USE_ISOC9X. + * sysdeps/i386/fpu/bits/mathdef.h: Likewise. + * elf/rtld.c: Add a few __builtin_expects where they will improve a lot. diff --git a/bits/mathdef.h b/bits/mathdef.h index 15140997c0..b034c5c99d 100644 --- a/bits/mathdef.h +++ b/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,7 +20,7 @@ # error "Never use <bits/mathdef.h> directly; include <math.h> instead" #endif - +#ifdef __USE_ISOC9X /* Normally, there is no long double type and the `float' and `double' expressions are evaluated as `double'. */ typedef double float_t; /* `float' expressions are evaluated as @@ -29,15 +29,21 @@ typedef double double_t; /* `double' expressions are evaluated as `double'. */ /* Signal that both types are `double'. */ -#define FLT_EVAL_METHOD 1 +# define FLT_EVAL_METHOD 1 /* Define `INFINITY' as value of type `float'. */ -#define INFINITY HUGE_VALF +# define INFINITY HUGE_VALF /* The values returned by `ilogb' for 0 and NaN respectively. */ -#define FP_ILOGB0 0x80000001 -#define FP_ILOGBNAN 0x7fffffff +# define FP_ILOGB0 0x80000001 +# define FP_ILOGBNAN 0x7fffffff /* Number of decimal digits for the `double' type. */ -#define DECIMAL_DIG 15 +# define DECIMAL_DIG 15 + +#endif /* ISO C 9X */ + +/* Signal that we do not really have a `long double'. The disables the + declaration of all the `long double' function variants. */ +#define __NO_LONG_DOUBLE_MATH 1 diff --git a/math/math.h b/math/math.h index 2a5f8d3821..42f32eef14 100644 --- a/math/math.h +++ b/math/math.h @@ -36,6 +36,8 @@ __BEGIN_DECLS #ifdef __USE_ISOC9X # include <bits/nan.h> #endif +/* Get general and ISO C 9X specific information. */ +#include <bits/mathdef.h> /* The file <bits/mathcalls.h> contains the prototypes for all the @@ -81,7 +83,7 @@ __BEGIN_DECLS # undef _Mdouble_ # undef __MATH_PRECNAME -# if __STDC__ - 0 || __GNUC__ - 0 +# if __STDC__ - 0 || __GNUC__ - 0 && !defined __NO_LONG_DOUBLE_MATH /* Include the file of declarations again, this time using `long double' instead of `double' and appending l to each function name. */ @@ -147,7 +149,6 @@ extern int signgam; decimal and all internal floating-point formats. */ -# include <bits/mathdef.h> /* All floating-point numbers can be put in one of these categories. */ enum diff --git a/sysdeps/generic/bits/mathdef.h b/sysdeps/generic/bits/mathdef.h index 15140997c0..b034c5c99d 100644 --- a/sysdeps/generic/bits/mathdef.h +++ b/sysdeps/generic/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,7 +20,7 @@ # error "Never use <bits/mathdef.h> directly; include <math.h> instead" #endif - +#ifdef __USE_ISOC9X /* Normally, there is no long double type and the `float' and `double' expressions are evaluated as `double'. */ typedef double float_t; /* `float' expressions are evaluated as @@ -29,15 +29,21 @@ typedef double double_t; /* `double' expressions are evaluated as `double'. */ /* Signal that both types are `double'. */ -#define FLT_EVAL_METHOD 1 +# define FLT_EVAL_METHOD 1 /* Define `INFINITY' as value of type `float'. */ -#define INFINITY HUGE_VALF +# define INFINITY HUGE_VALF /* The values returned by `ilogb' for 0 and NaN respectively. */ -#define FP_ILOGB0 0x80000001 -#define FP_ILOGBNAN 0x7fffffff +# define FP_ILOGB0 0x80000001 +# define FP_ILOGBNAN 0x7fffffff /* Number of decimal digits for the `double' type. */ -#define DECIMAL_DIG 15 +# define DECIMAL_DIG 15 + +#endif /* ISO C 9X */ + +/* Signal that we do not really have a `long double'. The disables the + declaration of all the `long double' function variants. */ +#define __NO_LONG_DOUBLE_MATH 1 diff --git a/sysdeps/i386/fpu/bits/mathdef.h b/sysdeps/i386/fpu/bits/mathdef.h index 9d0bd840a3..7dec1ab222 100644 --- a/sysdeps/i386/fpu/bits/mathdef.h +++ b/sysdeps/i386/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,7 +20,7 @@ # error "Never use <bits/mathdef.h> directly; include <math.h> instead" #endif - +#ifdef __USE_ISOC9X /* The ix87 FPUs evaluate all values in the 80 bit floating-point format which is also available for the user as `long double'. Therefore we define: */ @@ -30,14 +30,16 @@ typedef long double double_t; /* `double' expressions are evaluated as `long double'. */ /* Signal that both types are `long double'. */ -#define FLT_EVAL_METHOD 2 +# define FLT_EVAL_METHOD 2 /* Define `INFINITY' as value of type `float'. */ -#define INFINITY HUGE_VALF +# define INFINITY HUGE_VALF /* The values returned by `ilogb' for 0 and NaN respectively. */ -#define FP_ILOGB0 0x80000000 -#define FP_ILOGBNAN 0x80000000 +# define FP_ILOGB0 0x80000000 +# define FP_ILOGBNAN 0x80000000 /* Number of decimal digits for the `long double' type. */ -#define DECIMAL_DIG 18 +# define DECIMAL_DIG 18 + +#endif /* ISO C 9X */ diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index e3d33a53a2..5bad57bcc3 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,7 +20,7 @@ # error "Never use <bits/mathdef.h> directly; include <math.h> instead" #endif - +#ifdef __USE_ISOC9X /* The m68k FPUs evaluate all values in the 96 bit floating-point format which is also available for the user as `long double'. Therefore we define: */ @@ -30,14 +30,16 @@ typedef long double double_t; /* `double' expressions are evaluated as `long double'. */ /* Signal that both types are `long double'. */ -#define FLT_EVAL_METHOD 2 +# define FLT_EVAL_METHOD 2 /* Define `INFINITY' as value of type `float'. */ -#define INFINITY HUGE_VALF +# define INFINITY HUGE_VALF /* The values returned by `ilogb' for 0 and NaN respectively. */ -#define FP_ILOGB0 0x80000000 -#define FP_ILOGBNAN 0x7fffffff +# define FP_ILOGB0 0x80000000 +# define FP_ILOGBNAN 0x7fffffff /* Number of decimal digits for the `long double' type. */ -#define DECIMAL_DIG 18 +# define DECIMAL_DIG 18 + +#endif /* ISO C 9X */ |