summaryrefslogtreecommitdiff
path: root/gc.c
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-25 18:39:30 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-25 18:39:30 +0000
commit3da9449263c587415756bcea44b9e1ec5a3643dd (patch)
tree3a29f059ce8c1c9a6acc70c0b6df25d159e4b9db /gc.c
parent057f1f3020cf73dd79a1945578bb496a9aa82018 (diff)
* eval.c, gc.c: adopt a common set of alloca() #ifdef's. This
fixes the build with Intel C Compiler for Linux. * eval.c (rb_f_require): declare old_func with a real type, not just type modifiers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gc.c b/gc.c
index 0ef797077e..87807d50c5 100644
--- a/gc.c
+++ b/gc.c
@@ -38,19 +38,25 @@ void rb_io_fptr_finalize _((struct OpenFile*));
#endif
/* Make alloca work the best possible way. */
-#ifndef __GNUC__
-# if HAVE_ALLOCA_H
+#ifdef __GNUC__
+# ifndef atarist
+# ifndef alloca
+# define alloca __builtin_alloca
+# endif
+# endif /* atarist */
+#else
+# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
-# pragma alloca
+ #pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
void *alloca ();
# endif
-# endif
-# endif
-#endif
+# endif /* AIX */
+# endif /* HAVE_ALLOCA_H */
+#endif /* __GNUC__ */
#ifndef GC_MALLOC_LIMIT
#if defined(MSDOS) || defined(__human68k__)