From e9166baef6e4fe75d48b5025d43b7a5669c3b263 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 18 Feb 2002 09:52:48 +0000 Subject: * parse.y (expr_value, arg_value, primary_value): value_expr() check in place. * eval.c (block_pass): "&nil" should clear block given. * dir.c (push_braces): remove MAXPATHLEN dependency. * dir.c (dir_s_globd): ditto. * dln.c (init_funcname): ditto. * dln.c (load_1): ditto. * dln.c (dln_load): ditto. * configure.in: add GNU/Hurd switches. * pack.c (pack_pack): allows comment in template strings. * pack.c (pack_unpack): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- defines.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'defines.h') diff --git a/defines.h b/defines.h index bdf3e856b..c2b3dce68 100644 --- a/defines.h +++ b/defines.h @@ -12,6 +12,49 @@ #define RUBY +#if !defined(__STDC__) && !defined(_MSC_VER) +# define volatile +#endif + +#ifdef __cplusplus +# ifndef HAVE_PROTOTYPES +# define HAVE_PROTOTYPES 1 +# endif +# ifndef HAVE_STDARG_PROTOTYPES +# define HAVE_STDARG_PROTOTYPES 1 +# endif +#endif + +#undef _ +#ifdef HAVE_PROTOTYPES +# define _(args) args +#else +# define _(args) () +#endif + +#undef __ +#ifdef HAVE_STDARG_PROTOTYPES +# define __(args) args +#else +# define __(args) () +#endif + +#ifdef __cplusplus +#define ANYARGS ... +#else +#define ANYARGS +#endif + +#define xmalloc ruby_xmalloc +#define xcalloc ruby_xcalloc +#define xrealloc ruby_xrealloc +#define xfree ruby_xfree + +void *xmalloc _((long)); +void *xcalloc _((long,long)); +void *xrealloc _((void*,long)); +void xfree _((void*)); + #if SIZEOF_LONG_LONG > 0 # define HAVE_LONG_LONG # define LONG_LONG long long -- cgit