diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-05-14 04:10:39 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-05-14 04:10:39 +0000 |
commit | c25084921670dfe33a0871ee7b94c102fea0ea3a (patch) | |
tree | f0df3bfdc54529ba5c345f5536f7164acf7746d4 /ruby.h | |
parent | ae2fe781dd4aae16a2f03a4b9fb93514eb9886d4 (diff) |
prototypes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r-- | ruby.h | 53 |
1 files changed, 30 insertions, 23 deletions
@@ -31,10 +31,6 @@ extern "C" { # include <strings.h> #endif -#if defined(__MWERKS__) && defined(__cplusplus) -# define NEED_PROTO -#endif - #ifndef __STDC__ # define volatile # ifdef __GNUC__ @@ -42,15 +38,26 @@ extern "C" { # else # define const # endif -#else -# define NEED_PROTO #endif -#ifdef NEED_PROTO + +#ifdef HAVE_PROTOTYPES # define _(args) args #else # define _(args) () #endif +#ifdef HAVE_STDARG_PROTOTYPES +# define __(args) args +#else +# define __(args) () +#endif + +#ifdef HAVE_ATTR_NORETURN +# define NORETURN __attribute__ ((noreturn)) +#else +# define NORETURN +#endif + #if defined(HAVE_ALLOCA_H) && !defined(__GNUC__) #include <alloca.h> #endif @@ -435,8 +442,8 @@ char *rb_class2name _((VALUE)); void rb_p _((VALUE)); VALUE rb_eval_string _((char*)); -VALUE rb_funcall _((VALUE, ID, int, ...)); -int rb_scan_args _((int, VALUE*, char*, ...)); +VALUE rb_funcall __((VALUE, ID, int, ...)); +int rb_scan_args __((int, VALUE*, char*, ...)); VALUE rb_iv_get _((VALUE, char *)); VALUE rb_iv_set _((VALUE, char *, VALUE)); @@ -451,20 +458,20 @@ extern VALUE verbose, debug; int rb_safe_level _((void)); void rb_set_safe_level _((int)); -void Raise _((VALUE, char*, ...)); -void Fail _((char*, ...)); -void Fatal _((char*, ...)); -void Bug _((char*, ...)); -void rb_sys_fail _((char *)); -void rb_iter_break _((void)); -void rb_exit _((int)); -void rb_raise _((VALUE)); -void rb_fatal _((VALUE)); -void rb_notimplement _((void)); - -void Error _((char*, ...)); -void Warn _((char*, ...)); -void Warning _((char*, ...)); /* reports if `-w' specified */ +void Raise __((VALUE, char*, ...)) NORETURN; +void Fail __((char*, ...)) NORETURN; +void Fatal __((char*, ...)) NORETURN; +void Bug __((char*, ...)) NORETURN; +void rb_sys_fail _((char *)) NORETURN; +void rb_iter_break _((void)) NORETURN; +void rb_exit _((int)) NORETURN; +void rb_raise _((VALUE)) NORETURN; +void rb_fatal _((VALUE)) NORETURN; +void rb_notimplement _((void)) NORETURN; + +void Error __((char*, ...)); +void Warn __((char*, ...)); +void Warning __((char*, ...)); /* reports if `-w' specified */ VALUE rb_each _((VALUE)); VALUE rb_yield _((VALUE)); |