about summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/bits/cmathcalls.h4
-rw-r--r--math/complex.h33
2 files changed, 21 insertions, 16 deletions
diff --git a/math/bits/cmathcalls.h b/math/bits/cmathcalls.h
index ca0dfe1b9c..f063042b09 100644
--- a/math/bits/cmathcalls.h
+++ b/math/bits/cmathcalls.h
@@ -1,6 +1,6 @@
 /* Prototype declarations for complex math functions;
    helper file for <complex.h>.
-   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
@@ -45,7 +45,7 @@
 #error "Never use <bits/cmathcalls.h> directly; include <complex.h> instead."
 #endif
 
-#define _Mdouble_complex_ _Mdouble_ complex
+#define _Mdouble_complex_ _Mdouble_ _Complex
 
 
 /* Trigonometric functions.  */
diff --git a/math/complex.h b/math/complex.h
index 72b1e597fc..7ed9890e12 100644
--- a/math/complex.h
+++ b/math/complex.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
@@ -25,13 +25,16 @@
 
 #include <features.h>
 
+/* Get general and ISO C 9X specific information.  */
+#include <bits/mathdef.h>
+
 __BEGIN_DECLS
 
 /* We might need to add support for more compilers here.  But once ISO
    C 9X is out hopefully all maintained compilers will provide the data
    types `float complex' and `double complex'.  */
 #if (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) || __GNUC__ > 2
-# define complex __complex__
+# define _Complex __complex__
 #endif
 
 
@@ -74,13 +77,13 @@ __BEGIN_DECLS
 
 /* Now the float versions.  */
 #ifndef _Mfloat_
-#define _Mfloat_		float
+# define _Mfloat_		float
 #endif
 #define _Mdouble_ 		_Mfloat_
 #ifdef __STDC__
-#define __MATH_PRECNAME(name)	name##f
+# define __MATH_PRECNAME(name)	name##f
 #else
-#define __MATH_PRECNAME(name)	name/**/f
+# define __MATH_PRECNAME(name)	name/**/f
 #endif
 #include <bits/cmathcalls.h>
 #undef	_Mdouble_
@@ -88,16 +91,18 @@ __BEGIN_DECLS
 
 /* And the long double versions.  It is non-critical to define them
    here unconditionally since `long double' is required in ISO C 9X.  */
-#ifndef _Mlong_double_
-#define _Mlong_double_		long double
+#if __STDC__ - 0 || __GNUC__ - 0 && !defined __NO_LONG_DOUBLE_MATH
+# ifndef _Mlong_double_
+#  define _Mlong_double_	long double
+# endif
+# define _Mdouble_ 		_Mlong_double_
+# ifdef __STDC__
+#  define __MATH_PRECNAME(name)	name##l
+# else
+#  define __MATH_PRECNAME(name)	name/**/l
+# endif
+# include <bits/cmathcalls.h>
 #endif
-#define _Mdouble_ 		_Mlong_double_
-#ifdef __STDC__
-#define __MATH_PRECNAME(name)	name##l
-#else
-#define __MATH_PRECNAME(name)	name/**/l
-#endif
-#include <bits/cmathcalls.h>
 #undef	_Mdouble_
 #undef	__MATH_PRECNAME
 #undef	__MATHDECL_1