2020-04-10 01:11:40 -04:00
|
|
|
#ifndef RUBY_DEFINES_H /*-*-C++-*-vi:se ft=cpp:*/
|
|
|
|
#define RUBY_DEFINES_H 1
|
|
|
|
/**
|
2020-04-08 00:28:13 -04:00
|
|
|
* @file
|
|
|
|
* @author $Author$
|
|
|
|
* @date Wed May 18 00:21:44 JST 1994
|
|
|
|
* @copyright This file is a part of the programming language Ruby.
|
|
|
|
* Permission is hereby granted, to either redistribute and/or
|
|
|
|
* modify this file, provided that the conditions mentioned in the
|
|
|
|
* file COPYING are met. Consult the file for details.
|
|
|
|
*/
|
2007-06-09 23:06:15 -04:00
|
|
|
|
2020-05-08 05:31:09 -04:00
|
|
|
#include "ruby/internal/config.h"
|
Use RB_GNUC_EXTENSION_BLOCK instead of __extension__
* include/ruby/defines.h (RB_GNUC_EXTENSION, RB_GNUC_EXTENSION_BLOCK):
macros for skipping __extension__ on non-GCC compilers.
* eval_error.c (warn_print): use RB_GNUC_EXTENSION_BLOCK instead of
__extension__ because __extension__ is a GNU extension.
Fix compile error on Solaris 10 with Oracle Solaris Studio 12.x.
[Bug #12397] [ruby-dev:49629].
* internal.h (rb_fstring_cstr, rb_fstring_enc_cstr): ditto
* include/ruby/encoding.h (rb_enc_str_new, rb_enc_str_new_cstr): ditto
* include/ruby/intern.h (rb_str_new, rb_str_new_cstr,
rb_usascii_str_new, rb_utf8_str_new, rb_tainted_str_new_cstr,
rb_usascii_str_new_cstr, rb_utf8_str_new_cstr,
rb_external_str_new_cstr, rb_locale_str_new_cstr,
rb_str_buf_new_cstr, rb_str_cat_cstr, rb_exc_new_cstr): ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-20 08:29:06 -04:00
|
|
|
|
2013-03-27 17:56:20 -04:00
|
|
|
/* AC_INCLUDES_DEFAULT */
|
|
|
|
#include <stdio.h>
|
2020-04-08 00:28:13 -04:00
|
|
|
|
2013-03-27 17:56:20 -04:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
# include <sys/types.h>
|
|
|
|
#endif
|
2020-04-08 00:28:13 -04:00
|
|
|
|
2013-03-27 17:56:20 -04:00
|
|
|
#ifdef HAVE_SYS_STAT_H
|
|
|
|
# include <sys/stat.h>
|
|
|
|
#endif
|
2020-04-08 00:28:13 -04:00
|
|
|
|
2013-03-27 17:56:20 -04:00
|
|
|
#ifdef STDC_HEADERS
|
|
|
|
# include <stdlib.h>
|
|
|
|
# include <stddef.h>
|
|
|
|
#else
|
|
|
|
# ifdef HAVE_STDLIB_H
|
|
|
|
# include <stdlib.h>
|
|
|
|
# endif
|
|
|
|
#endif
|
2020-04-08 00:28:13 -04:00
|
|
|
|
2013-03-27 17:56:20 -04:00
|
|
|
#ifdef HAVE_STRING_H
|
|
|
|
# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
|
|
|
|
# include <memory.h>
|
|
|
|
# endif
|
|
|
|
# include <string.h>
|
|
|
|
#endif
|
2020-04-08 00:28:13 -04:00
|
|
|
|
2013-03-27 17:56:20 -04:00
|
|
|
#ifdef HAVE_STRINGS_H
|
|
|
|
# include <strings.h>
|
|
|
|
#endif
|
2020-04-08 00:28:13 -04:00
|
|
|
|
2013-03-27 17:56:20 -04:00
|
|
|
#ifdef HAVE_INTTYPES_H
|
|
|
|
# include <inttypes.h>
|
|
|
|
#endif
|
2020-04-08 00:28:13 -04:00
|
|
|
|
2013-03-27 17:56:20 -04:00
|
|
|
#ifdef HAVE_STDINT_H
|
|
|
|
# include <stdint.h>
|
|
|
|
#endif
|
2020-04-08 00:28:13 -04:00
|
|
|
|
2018-04-08 22:40:12 -04:00
|
|
|
#ifdef HAVE_STDALIGN_H
|
|
|
|
# include <stdalign.h>
|
|
|
|
#endif
|
2020-04-08 00:28:13 -04:00
|
|
|
|
2013-03-27 17:56:20 -04:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
2013-04-06 22:00:46 -04:00
|
|
|
#ifdef HAVE_SYS_SELECT_H
|
|
|
|
# include <sys/select.h>
|
|
|
|
#endif
|
|
|
|
|
2016-06-20 11:22:04 -04:00
|
|
|
#ifdef RUBY_USE_SETJMPEX
|
2020-04-08 00:28:13 -04:00
|
|
|
# include <setjmpex.h>
|
|
|
|
#endif
|
|
|
|
|
2020-05-08 05:31:09 -04:00
|
|
|
#include "ruby/internal/dllexport.h"
|
|
|
|
#include "ruby/internal/xmalloc.h"
|
2020-04-08 00:28:13 -04:00
|
|
|
#include "ruby/backward/2/assume.h"
|
|
|
|
#include "ruby/backward/2/attributes.h"
|
|
|
|
#include "ruby/backward/2/bool.h"
|
|
|
|
#include "ruby/backward/2/gcc_version_since.h"
|
|
|
|
#include "ruby/backward/2/long_long.h"
|
|
|
|
#include "ruby/backward/2/stdalign.h"
|
|
|
|
#include "ruby/backward/2/stdarg.h"
|
2020-12-19 12:20:27 -05:00
|
|
|
#include "ruby/internal/dosish.h"
|
2013-08-19 08:39:09 -04:00
|
|
|
#include "ruby/missing.h"
|
|
|
|
|
1998-01-16 07:13:05 -05:00
|
|
|
#define RUBY
|
|
|
|
|
2020-04-08 00:28:13 -04:00
|
|
|
#ifdef __GNUC__
|
|
|
|
# define RB_GNUC_EXTENSION __extension__
|
|
|
|
# define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
|
2002-02-18 04:52:48 -05:00
|
|
|
#else
|
2020-04-08 00:28:13 -04:00
|
|
|
# define RB_GNUC_EXTENSION
|
|
|
|
# define RB_GNUC_EXTENSION_BLOCK(x) (x)
|
1999-01-19 23:59:39 -05:00
|
|
|
#endif
|
|
|
|
|
2020-04-08 00:28:13 -04:00
|
|
|
/* :FIXME: Can someone tell us why is this macro defined here? @shyouhei
|
|
|
|
* thinks this is a truly internal macro but cannot move around because he
|
|
|
|
* doesn't understand the reason of this arrangement. */
|
2004-01-21 10:26:11 -05:00
|
|
|
#ifndef RUBY_MBCHAR_MAXSIZE
|
2020-04-08 00:28:13 -04:00
|
|
|
# define RUBY_MBCHAR_MAXSIZE INT_MAX
|
|
|
|
# /* MB_CUR_MAX will not work well in C locale */
|
2004-01-21 10:26:11 -05:00
|
|
|
#endif
|
|
|
|
|
2011-10-25 08:54:21 -04:00
|
|
|
#if defined(__sparc)
|
2020-05-04 02:52:56 -04:00
|
|
|
RBIMPL_SYMBOL_EXPORT_BEGIN()
|
2011-11-15 00:05:35 -05:00
|
|
|
void rb_sparc_flush_register_windows(void);
|
2020-05-04 02:52:56 -04:00
|
|
|
RBIMPL_SYMBOL_EXPORT_END()
|
2020-04-08 00:28:13 -04:00
|
|
|
# define FLUSH_REGISTER_WINDOWS rb_sparc_flush_register_windows()
|
2018-01-14 21:35:20 -05:00
|
|
|
#else
|
2020-04-08 00:28:13 -04:00
|
|
|
# define FLUSH_REGISTER_WINDOWS ((void)0)
|
1998-01-16 07:13:05 -05:00
|
|
|
#endif
|
2007-06-09 23:06:15 -04:00
|
|
|
|
|
|
|
#endif /* RUBY_DEFINES_H */
|