diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-25 18:39:30 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-10-25 18:39:30 +0000 |
commit | 3da9449263c587415756bcea44b9e1ec5a3643dd (patch) | |
tree | 3a29f059ce8c1c9a6acc70c0b6df25d159e4b9db /eval.c | |
parent | 057f1f3020cf73dd79a1945578bb496a9aa82018 (diff) | |
download | ruby-3da9449263c587415756bcea44b9e1ec5a3643dd.tar.gz |
* 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 'eval.c')
-rw-r--r-- | eval.c | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -35,17 +35,19 @@ # endif # endif /* atarist */ #else -# if defined(HAVE_ALLOCA_H) +# ifdef HAVE_ALLOCA_H # include <alloca.h> -# elif !defined(alloca) -char *alloca(); -# endif +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +void *alloca (); +# endif +# endif /* AIX */ +# endif /* HAVE_ALLOCA_H */ #endif /* __GNUC__ */ -#ifdef _AIX -#pragma alloca -#endif - #ifdef HAVE_STDARG_PROTOTYPES #include <stdarg.h> #define va_init_list(a,b) va_start(a,b) @@ -5601,7 +5603,7 @@ rb_f_require(obj, fname) { int volatile old_vmode = scope_vmode; NODE *const volatile old_node = ruby_current_node; - const volatile old_func = ruby_frame->last_func; + const volatile ID old_func = ruby_frame->last_func; ruby_current_node = 0; ruby_sourcefile = rb_source_filename(RSTRING(fname)->ptr); |