]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Protect definitions for math.h against double inclusion.
authorUlrich Drepper <drepper@redhat.com>
Sat, 18 Dec 1999 23:03:03 +0000 (23:03 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 18 Dec 1999 23:03:03 +0000 (23:03 +0000)
sysdeps/alpha/fpu/bits/mathdef.h
sysdeps/i386/fpu/bits/mathdef.h
sysdeps/m68k/fpu/bits/mathdef.h
sysdeps/powerpc/bits/mathdef.h
sysdeps/sparc/fpu/bits/mathdef.h

index 5ee9644469c40fd67b10c3a10b2f4dce50811d99..30f93dda1c47eaa2181133994549614b5ae5346a 100644 (file)
@@ -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
index 61d4ef361098afe26f7d0a9b106990ab83f4c1c5..9436877a77ea37c7389143e961a4eae68aa09e23 100644 (file)
@@ -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 <bits/mathdef.h> directly; include <math.h> 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 */
index 250f0f392929c20f8e03ce8b52565aa278c57707..c80dad3fe1dcc25fbbe6b47e64cce16503773328 100644 (file)
@@ -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 <bits/mathdef.h> directly; include <math.h> 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 */
index 1dcd2e77147ee4a51bb0deb08c544f7e1199b8f9..577a59684382bad86dbc92a0c6da11e96b48df48 100644 (file)
@@ -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
index c1727b66bb0bd9562b8adcf1b3c6561ce06ae817..947779065498bd690350a87771c73204ba871166 100644 (file)
@@ -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
 # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
 #endif
 
+#include <bits/wordsize.h>
+
 /* 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