From a160b48aae7113197d8234d39a86cd18b1261d91 Mon Sep 17 00:00:00 2001 From: tobi Date: Tue, 7 Feb 2006 17:26:54 +0000 Subject: 2006-02-07 Rainer Emrich * intrinsics/c99_functions.c: Work around incompatible declarations of cabs{,f,l} on pre-C99 IRIX systems. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110700 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgfortran/intrinsics/c99_functions.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libgfortran/intrinsics') diff --git a/libgfortran/intrinsics/c99_functions.c b/libgfortran/intrinsics/c99_functions.c index feb4c08b479..e26be0ecdb9 100644 --- a/libgfortran/intrinsics/c99_functions.c +++ b/libgfortran/intrinsics/c99_functions.c @@ -35,6 +35,20 @@ Boston, MA 02110-1301, USA. */ #define C99_PROTOS_H WE_DONT_WANT_PROTOS_NOW #include "libgfortran.h" +/* IRIX's declares a non-C99 compliant implementation of cabs, + which takes two floating point arguments instead of a single complex. + If is missing this prevents building of c99_functions.c. + To work around this we redirect cabs{,f,l} calls to __gfc_cabs{,f,l}. */ + +#if defined(__sgi__) && !defined(HAVE_COMPLEX_H) +#undef HAVE_CABS +#undef HAVE_CABSF +#undef HAVE_CABSL +#define cabs __gfc_cabs +#define cabsf __gfc_cabsf +#define cabsl __gfc_cabsl +#endif + /* Tru64's declares a non-C99 compliant implementation of cabs, which takes two floating point arguments instead of a single complex. To work around this we redirect cabs{,f,l} calls to __gfc_cabs{,f,l}. */ -- cgit v1.2.1