/************************************************
created at: Wed May 18 00:21:44 JST 1994
************************************************/
/* function attributes */
# define DEPRECATED_BY(n,x) DEPRECATED(x)
# define DEPRECATED_TYPE(mesg, decl) decl
#ifndef RUBY_CXX_DEPRECATED
# define RUBY_CXX_DEPRECATED(mesg) /* nothing */
# define ALWAYS_INLINE(x) x
# define HAVE_ATTRIBUTE_ERRORFUNC 0
# define ERRORFUNC(mesg, x) x
# define HAVE_ATTRIBUTE_ERRORFUNC 1
# define HAVE_ATTRIBUTE_WARNINGFUNC 0
# define WARNINGFUNC(mesg, x) x
# define HAVE_ATTRIBUTE_WARNINGFUNC 1
#ifndef GCC_VERSION_SINCE
# if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
# define GCC_VERSION_SINCE(major, minor, patchlevel) \
((__GNUC__ > (major)) || \
((__GNUC__ == (major) && \
((__GNUC_MINOR__ > (minor)) || \
(__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))))
# define GCC_VERSION_SINCE(major, minor, patchlevel) 0
#ifndef GCC_VERSION_BEFORE
# if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
# define GCC_VERSION_BEFORE(major, minor, patchlevel) \
((__GNUC__ < (major)) || \
((__GNUC__ == (major) && \
((__GNUC_MINOR__ < (minor)) || \
(__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ <= (patchlevel))))))
# define GCC_VERSION_BEFORE(major, minor, patchlevel) 0
#define RB_LIKELY(x) (__builtin_expect(!!(x), 1))
#define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0))
#else /* __GNUC__ >= 3 */
#define RB_UNLIKELY(x) (x)
#endif /* __GNUC__ >= 3 */
cold attribute for code layout improvements
RUBY_FUNC_ATTRIBUTE not used because MSVC does not like nested func macros
#if defined(__clang__) || GCC_VERSION_SINCE(4, 3, 0)
#define COLDFUNC __attribute__((cold))
#if defined __MINGW_PRINTF_FORMAT
#define PRINTF_ARGS(decl, string_index, first_to_check) \
decl __attribute__((format(__MINGW_PRINTF_FORMAT, string_index, first_to_check)))
#define PRINTF_ARGS(decl, string_index, first_to_check) \
decl __attribute__((format(printf, string_index, first_to_check)))
#define PRINTF_ARGS(decl, string_index, first_to_check) decl
#define RB_GNUC_EXTENSION __extension__
#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
#define RB_GNUC_EXTENSION
#define RB_GNUC_EXTENSION_BLOCK(x) (x)
/* AC_INCLUDES_DEFAULT */
# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
#include "ruby/missing.h"
# define HAVE_PROTOTYPES 1
# ifndef HAVE_STDARG_PROTOTYPES
# define HAVE_STDARG_PROTOTYPES 1
#ifdef HAVE_STDARG_PROTOTYPES
#ifndef RUBY_SYMBOL_EXPORT_BEGIN
# define RUBY_SYMBOL_EXPORT_BEGIN /* begin */
# define RUBY_SYMBOL_EXPORT_END /* end */
#define xmalloc ruby_xmalloc
#define xmalloc2 ruby_xmalloc2
#define xcalloc ruby_xcalloc
#define xrealloc ruby_xrealloc
#define xrealloc2 ruby_xrealloc2
#if GCC_VERSION_SINCE(4,3,0)
# define RUBY_ATTR_ALLOC_SIZE(params) __attribute__ ((alloc_size params))
#elif defined(__has_attribute)
# if __has_attribute(alloc_size)
# define RUBY_ATTR_ALLOC_SIZE(params) __attribute__((__alloc_size__ params))
#ifndef RUBY_ATTR_ALLOC_SIZE
# define RUBY_ATTR_ALLOC_SIZE(params)
# if __has_attribute(malloc)
# define RUBY_ATTR_MALLOC __attribute__((__malloc__))
# define RUBY_ATTR_MALLOC
# if __has_attribute(returns_nonnull)
# define RUBY_ATTR_RETURNS_NONNULL __attribute__((__returns_nonnull__))
#ifndef RUBY_ATTR_RETURNS_NONNULL
# define RUBY_ATTR_RETURNS_NONNULL
void *ruby_xmalloc(size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1));
void *ruby_xmalloc2(size_t,size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1,2));
void *ruby_xcalloc(size_t,size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1,2));
void *ruby_xrealloc(void*,size_t) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
void *ruby_xrealloc2(void*,size_t,size_t) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2,3));
#ifndef USE_GC_MALLOC_OBJ_INFO_DETAILS
#define USE_GC_MALLOC_OBJ_INFO_DETAILS 0
#if USE_GC_MALLOC_OBJ_INFO_DETAILS
void *ruby_xmalloc_body(size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1));
void *ruby_xmalloc2_body(size_t,size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1,2));
void *ruby_xcalloc_body(size_t,size_t) RUBY_ATTR_MALLOC RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((1,2));
void *ruby_xrealloc_body(void*,size_t) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2));
void *ruby_xrealloc2_body(void*,size_t,size_t) RUBY_ATTR_RETURNS_NONNULL RUBY_ATTR_ALLOC_SIZE((2,3));
#define ruby_xmalloc(s1) ruby_xmalloc_with_location(s1, __FILE__, __LINE__)
#define ruby_xmalloc2(s1, s2) ruby_xmalloc2_with_location(s1, s2, __FILE__, __LINE__)
#define ruby_xcalloc(s1, s2) ruby_xcalloc_with_location(s1, s2, __FILE__, __LINE__)
#define ruby_xrealloc(ptr, s1) ruby_xrealloc_with_location(ptr, s1, __FILE__, __LINE__)
#define ruby_xrealloc2(ptr, s1, s2) ruby_xrealloc2_with_location(ptr, s1, s2, __FILE__, __LINE__)
extern const char *ruby_malloc_info_file;
extern int ruby_malloc_info_line;
ruby_xmalloc_with_location(size_t s, const char *file, int line)
ruby_malloc_info_file = file;
ruby_malloc_info_line = line;
ptr = ruby_xmalloc_body(s);
ruby_malloc_info_file = NULL;
ruby_xmalloc2_with_location(size_t s1, size_t s2, const char *file, int line)
ruby_malloc_info_file = file;
ruby_malloc_info_line = line;
ptr = ruby_xmalloc2_body(s1, s2);
ruby_malloc_info_file = NULL;
ruby_xcalloc_with_location(size_t s1, size_t s2, const char *file, int line)
ruby_malloc_info_file = file;
ruby_malloc_info_line = line;
ptr = ruby_xcalloc_body(s1, s2);
ruby_malloc_info_file = NULL;
ruby_xrealloc_with_location(void *ptr, size_t s, const char *file, int line)
ruby_malloc_info_file = file;
ruby_malloc_info_line = line;
rptr = ruby_xrealloc_body(ptr, s);
ruby_malloc_info_file = NULL;
ruby_xrealloc2_with_location(void *ptr, size_t s1, size_t s2, const char *file, int line)
ruby_malloc_info_file = file;
ruby_malloc_info_line = line;
rptr = ruby_xrealloc2_body(ptr, s1, s2);
ruby_malloc_info_file = NULL;
#define STRINGIZE(expr) STRINGIZE0(expr)
#define STRINGIZE0(expr) #expr
# define HAVE_TRUE_LONG_LONG 1
# define LONG_LONG long long
# define HAVE_LONG_LONG 1
# define LONG_LONG __int64
# define SIZEOF_LONG_LONG SIZEOF___INT64
DOSISH mean MS-Windows style filesystem.
But you should use more precise macros like DOSISH_DRIVE_LETTER, PATH_SEP,
ENV_IGNORECASE or CASEFOLD_FILESYSTEM.
# define DOSISH_DRIVE_LETTER
#ifdef AC_APPLE_UNIVERSAL_BUILD
# error FALSE must be false
# error TRUE must be true
#ifndef RUBY_FUNC_EXPORTED
#define RUBY_FUNC_EXPORTED
/* These macros are used for functions which are exported only for MJIT
and NOT ensured to be exported in future versions. */
#define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
#define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN
#define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END
#if defined(MJIT_HEADER) && defined(_MSC_VER)
# undef MJIT_FUNC_EXPORTED
# define MJIT_FUNC_EXPORTED static
#define RUBY_EXTERN extern
# define EXTERN _Pragma("message \"EXTERN is deprecated, use RUBY_EXTERN instead\""); \
# define EXTERN __pragma(message(__FILE__"("STRINGIZE(__LINE__)"): warning: "\
"EXTERN is deprecated, use RUBY_EXTERN instead")); \
# define EXTERN <-<-"EXTERN is deprecated, use RUBY_EXTERN instead"->->
#ifndef RUBY_MBCHAR_MAXSIZE
#define RUBY_MBCHAR_MAXSIZE INT_MAX
/* MB_CUR_MAX will not work well in C locale */
void rb_sparc_flush_register_windows(void);
# define FLUSH_REGISTER_WINDOWS rb_sparc_flush_register_windows()
# define FLUSH_REGISTER_WINDOWS ((void)0)
#define PATH_SEP_CHAR PATH_SEP[0]
#ifndef CASEFOLD_FILESYSTEM
# define CASEFOLD_FILESYSTEM 1
# define CASEFOLD_FILESYSTEM 0
#define RUBY_PLATFORM "unknown-unknown"
#define FUNC_MINIMIZED(x) x
#define FUNC_UNOPTIMIZED(x) x
#ifndef RUBY_ALIAS_FUNCTION_TYPE
#define RUBY_ALIAS_FUNCTION_TYPE(type, prot, name, args) \
FUNC_MINIMIZED(type prot) {return (type)name args;}
#ifndef RUBY_ALIAS_FUNCTION_VOID
#define RUBY_ALIAS_FUNCTION_VOID(prot, name, args) \
FUNC_MINIMIZED(void prot) {name args;}
#ifndef RUBY_ALIAS_FUNCTION
#define RUBY_ALIAS_FUNCTION(prot, name, args) \
RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
#ifndef RUBY_FUNC_NONNULL
#define RUBY_FUNC_NONNULL(n, x) x
#ifndef UNALIGNED_WORD_ACCESS
# if defined(__i386) || defined(__i386__) || defined(_M_IX86) || \
defined(__x86_64) || defined(__x86_64__) || defined(_M_AMD64) || \
defined(__powerpc64__) || \
defined(__aarch64__) || \
# define UNALIGNED_WORD_ACCESS 1
# define UNALIGNED_WORD_ACCESS 0
# define PACKED_STRUCT(x) x
#ifndef PACKED_STRUCT_UNALIGNED
# if UNALIGNED_WORD_ACCESS