From: Gabriel Dos Reis Date: Sat, 5 Jun 1999 09:41:22 +0000 (+0200) Subject: * std/std_valarray.h: Don't #include unconditionally X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3653bb99971ea85c361a5d16f90a8b5a11fd60f9;p=gcc.git * std/std_valarray.h: Don't #include unconditionally From-SVN: r27364 --- diff --git a/libstdc++/ChangeLog b/libstdc++/ChangeLog index a5811cf0c6c..90723b9999d 100644 --- a/libstdc++/ChangeLog +++ b/libstdc++/ChangeLog @@ -1,4 +1,8 @@ -1999-06-06 Gabriel Dos Reis +1999-06-05 Gabriel Dos Reis + + * std/std_valarray.h: Don't #include unconditionally + +1999-06-05 Gabriel Dos Reis * std/std_valarray.h: New file. * std/slice.h: New file. diff --git a/libstdc++/std/std_valarray.h b/libstdc++/std/std_valarray.h index 2ac02371413..975d0a122ad 100644 --- a/libstdc++/std/std_valarray.h +++ b/libstdc++/std/std_valarray.h @@ -40,7 +40,31 @@ #include #include -#include // XXX non-standard. +#ifndef alloca +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else /* not GNU C. */ +#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) +#include +#else /* not sparc */ +#if defined (MSDOS) && !defined (__TURBOC__) +#include +#else /* not MSDOS, or __TURBOC__ */ +#if defined(_AIX) +#include + #pragma alloca +#else /* not MSDOS, __TURBOC__, or _AIX */ +#ifdef __hpux +#endif /* __hpux */ +#endif /* not _AIX */ +#endif /* not MSDOS, or __TURBOC__ */ +#endif /* not sparc. */ +#endif /* not GNU C. */ +#endif /* alloca not defined. */ + +extern "C" { + void* alloca(size_t); +} extern "C++" {