From: Ulrich Drepper Date: Sat, 18 Dec 1999 23:03:03 +0000 (+0000) Subject: Protect definitions for math.h against double inclusion. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=68011d0a58dde8d54f62f3704c6b82909c6af0f6;p=thirdparty%2Fglibc.git Protect definitions for math.h against double inclusion. --- diff --git a/sysdeps/alpha/fpu/bits/mathdef.h b/sysdeps/alpha/fpu/bits/mathdef.h index 5ee9644469c..30f93dda1c4 100644 --- a/sysdeps/alpha/fpu/bits/mathdef.h +++ b/sysdeps/alpha/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 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 @@ -23,7 +23,9 @@ /* FIXME! This file describes properties of the compiler, not the machine; it should not be part of libc! */ -#if defined __USE_ISOC9X && defined _MATH_H +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + # ifdef __GNUC__ # if __STDC__ == 1 @@ -71,7 +73,7 @@ typedef double double_t; /* Number of decimal digits for the `double' type. */ # define DECIMAL_DIG 15 -#endif /* ISO C 9X */ +#endif /* ISO C99 */ #ifndef __NO_LONG_DOUBLE_MATH /* Signal that we do not really have a `long double'. The disables the diff --git a/sysdeps/i386/fpu/bits/mathdef.h b/sysdeps/i386/fpu/bits/mathdef.h index 61d4ef36109..9436877a77e 100644 --- a/sysdeps/i386/fpu/bits/mathdef.h +++ b/sysdeps/i386/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 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,9 @@ # error "Never use directly; include instead" #endif -#if defined __USE_ISOC9X && defined _MATH_H +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + /* 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: */ @@ -42,4 +44,4 @@ typedef long double double_t; /* `double' expressions are evaluated as /* Number of decimal digits for the `long double' type. */ # define DECIMAL_DIG 18 -#endif /* ISO C 9X */ +#endif /* ISO C99 */ diff --git a/sysdeps/m68k/fpu/bits/mathdef.h b/sysdeps/m68k/fpu/bits/mathdef.h index 250f0f39292..c80dad3fe1d 100644 --- a/sysdeps/m68k/fpu/bits/mathdef.h +++ b/sysdeps/m68k/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 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,9 @@ # error "Never use directly; include instead" #endif -#if defined __USE_ISOC9X && defined _MATH_H +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + /* 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: */ @@ -42,4 +44,4 @@ typedef long double double_t; /* `double' expressions are evaluated as /* Number of decimal digits for the `long double' type. */ # define DECIMAL_DIG 18 -#endif /* ISO C 9X */ +#endif /* ISO C99 */ diff --git a/sysdeps/powerpc/bits/mathdef.h b/sysdeps/powerpc/bits/mathdef.h index 1dcd2e77147..577a5968438 100644 --- a/sysdeps/powerpc/bits/mathdef.h +++ b/sysdeps/powerpc/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 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 @@ -27,7 +27,9 @@ FIXME! This file does not deal with the -fshort-double option of gcc! */ -#if defined __USE_ISOC9X && defined _MATH_H +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + # ifdef __GNUC__ # if __STDC__ == 1 @@ -79,7 +81,7 @@ typedef double double_t; /* Number of decimal digits for the `double' type. */ # define DECIMAL_DIG 15 -#endif /* ISO C 9X */ +#endif /* ISO C99 */ #ifndef __NO_LONG_DOUBLE_MATH /* Signal that we do not really have a `long double'. The disables the diff --git a/sysdeps/sparc/fpu/bits/mathdef.h b/sysdeps/sparc/fpu/bits/mathdef.h index c1727b66bb0..94777906549 100644 --- a/sysdeps/sparc/fpu/bits/mathdef.h +++ b/sysdeps/sparc/fpu/bits/mathdef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999 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,10 +20,14 @@ # error "Never use directly; include instead" #endif +#include + /* FIXME! This file describes properties of the compiler, not the machine; it should not be part of libc! */ -#if defined __USE_ISOC9X && defined _MATH_H +#if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF +# define _MATH_H_MATHDEF 1 + # ifdef __GNUC__ # if __STDC__ == 1 @@ -71,10 +75,15 @@ typedef double double_t; /* Number of decimal digits for the `double' type. */ # define DECIMAL_DIG 15 -#endif /* ISO C 9X */ +#endif /* ISO C99 */ #ifndef __NO_LONG_DOUBLE_MATH -/* 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 + +# if __WORDSIZE == 32 +/* Signal that in 32bit ABI 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 +# endif + #endif