10 #ifndef RUBY_DEFINES_H 11 #define RUBY_DEFINES_H 1 13 #if defined(__cplusplus) 20 #include "ruby/config.h" 22 #include RUBY_EXTCONF_H 27 #ifdef HAVE_SYS_TYPES_H 28 # include <sys/types.h> 30 #ifdef HAVE_SYS_STAT_H 31 # include <sys/stat.h> 42 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H 50 #ifdef HAVE_INTTYPES_H 51 # include <inttypes.h> 60 #ifdef HAVE_SYS_SELECT_H 61 # include <sys/select.h> 64 #if defined HAVE_SETJMPEX_H && defined HAVE__SETJMPEX 73 # ifndef HAVE_PROTOTYPES 74 # define HAVE_PROTOTYPES 1 76 # ifndef HAVE_STDARG_PROTOTYPES 77 # define HAVE_STDARG_PROTOTYPES 1 82 #ifdef HAVE_PROTOTYPES 89 #ifdef HAVE_STDARG_PROTOTYPES 90 # define __(args) args 101 #ifndef RUBY_SYMBOL_EXPORT_BEGIN 102 # define RUBY_SYMBOL_EXPORT_BEGIN 103 # define RUBY_SYMBOL_EXPORT_END 108 #define xmalloc ruby_xmalloc 109 #define xmalloc2 ruby_xmalloc2 110 #define xcalloc ruby_xcalloc 111 #define xrealloc ruby_xrealloc 112 #define xrealloc2 ruby_xrealloc2 113 #define xfree ruby_xfree 115 #if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 3 116 # define RUBY_ATTR_ALLOC_SIZE(params) __attribute__ ((__alloc_size__ params)) 118 # define RUBY_ATTR_ALLOC_SIZE(params) 128 #define STRINGIZE(expr) STRINGIZE0(expr) 130 #define STRINGIZE0(expr) #expr 133 #ifdef HAVE_LONG_LONG 134 # define HAVE_TRUE_LONG_LONG 1 137 #if SIZEOF_LONG_LONG > 0 138 # define LONG_LONG long long 139 #elif SIZEOF___INT64 > 0 140 # define HAVE_LONG_LONG 1 141 # define LONG_LONG __int64 142 # undef SIZEOF_LONG_LONG 143 # define SIZEOF_LONG_LONG SIZEOF___INT64 147 # if SIZEOF_INT*2 <= SIZEOF_LONG_LONG 148 # define BDIGIT unsigned int 149 # define SIZEOF_BDIGITS SIZEOF_INT 150 # define BDIGIT_DBL unsigned LONG_LONG 151 # define BDIGIT_DBL_SIGNED LONG_LONG 152 # define PRI_BDIGIT_PREFIX "" 153 # define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX 154 # elif SIZEOF_INT*2 <= SIZEOF_LONG 155 # define BDIGIT unsigned int 156 # define SIZEOF_BDIGITS SIZEOF_INT 157 # define BDIGIT_DBL unsigned long 158 # define BDIGIT_DBL_SIGNED long 159 # define PRI_BDIGIT_PREFIX "" 160 # define PRI_BDIGIT_DBL_PREFIX "l" 161 # elif SIZEOF_SHORT*2 <= SIZEOF_LONG 162 # define BDIGIT unsigned short 163 # define SIZEOF_BDIGITS SIZEOF_SHORT 164 # define BDIGIT_DBL unsigned long 165 # define BDIGIT_DBL_SIGNED long 166 # define PRI_BDIGIT_PREFIX "h" 167 # define PRI_BDIGIT_DBL_PREFIX "l" 169 # define BDIGIT unsigned short 170 # define SIZEOF_BDIGITS (SIZEOF_LONG/2) 171 # define SIZEOF_ACTUAL_BDIGIT SIZEOF_LONG 172 # define BDIGIT_DBL unsigned long 173 # define BDIGIT_DBL_SIGNED long 174 # define PRI_BDIGIT_PREFIX "h" 175 # define PRI_BDIGIT_DBL_PREFIX "l" 178 #ifndef SIZEOF_ACTUAL_BDIGIT 179 # define SIZEOF_ACTUAL_BDIGIT SIZEOF_BDIGITS 182 #ifdef PRI_BDIGIT_PREFIX 183 # define PRIdBDIGIT PRI_BDIGIT_PREFIX"d" 184 # define PRIiBDIGIT PRI_BDIGIT_PREFIX"i" 185 # define PRIoBDIGIT PRI_BDIGIT_PREFIX"o" 186 # define PRIuBDIGIT PRI_BDIGIT_PREFIX"u" 187 # define PRIxBDIGIT PRI_BDIGIT_PREFIX"x" 188 # define PRIXBDIGIT PRI_BDIGIT_PREFIX"X" 191 #ifdef PRI_BDIGIT_DBL_PREFIX 192 # define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d" 193 # define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i" 194 # define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o" 195 # define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u" 196 # define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x" 197 # define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X" 204 #if defined(_WIN32) || defined(__EMX__) 206 # define DOSISH_DRIVE_LETTER 209 #ifdef AC_APPLE_UNIVERSAL_BUILD 210 #undef WORDS_BIGENDIAN 211 #ifdef __BIG_ENDIAN__ 212 #define WORDS_BIGENDIAN 220 #if defined(__BEOS__) && !defined(__HAIKU__) && !defined(BONE) 221 #include <net/socket.h> 235 # error FALSE must be false 240 # error TRUE must be true 245 #ifndef RUBY_FUNC_EXPORTED 246 #define RUBY_FUNC_EXPORTED 250 #define RUBY_EXTERN extern 254 #define EXTERN RUBY_EXTERN 257 #ifndef RUBY_MBCHAR_MAXSIZE 258 #define RUBY_MBCHAR_MAXSIZE INT_MAX 264 # define FLUSH_REGISTER_WINDOWS rb_sparc_flush_register_windows() 265 #elif defined(__ia64) 266 void *rb_ia64_bsp(
void);
267 void rb_ia64_flushrs(
void);
268 # define FLUSH_REGISTER_WINDOWS rb_ia64_flushrs() 270 # define FLUSH_REGISTER_WINDOWS ((void)0) 278 #define PATH_SEP_CHAR PATH_SEP[0] 280 #define PATH_ENV "PATH" 282 #if defined(DOSISH) && !defined(__EMX__) 283 #define ENV_IGNORECASE 286 #ifndef CASEFOLD_FILESYSTEM 288 # define CASEFOLD_FILESYSTEM 1 290 # define CASEFOLD_FILESYSTEM 0 295 #define DLEXT_MAXLEN 4 298 #ifndef RUBY_PLATFORM 299 #define RUBY_PLATFORM "unknown-unknown" 302 #ifndef RUBY_ALIAS_FUNCTION_TYPE 303 #define RUBY_ALIAS_FUNCTION_TYPE(type, prot, name, args) \ 304 type prot {return name args;} 306 #ifndef RUBY_ALIAS_FUNCTION_VOID 307 #define RUBY_ALIAS_FUNCTION_VOID(prot, name, args) \ 308 void prot {name args;} 310 #ifndef RUBY_ALIAS_FUNCTION 311 #define RUBY_ALIAS_FUNCTION(prot, name, args) \ 312 RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args) 317 #if defined(__cplusplus)
#define RUBY_ATTR_ALLOC_SIZE(params)
#define RUBY_SYMBOL_EXPORT_END
#define RUBY_SYMBOL_EXPORT_BEGIN
void rb_sparc_flush_register_windows(void)