mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* configurein: use alternative keyword
to avoid macros conflicts with them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b69cc4ccbd
commit
91e3c8b370
3 changed files with 26 additions and 19 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri May 13 03:10:39 2016 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* configurein: use alternative keyword
|
||||
to avoid macros conflicts with them.
|
||||
|
||||
Thu May 12 01:54:08 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/mkmf.rb (try_func): get rid of conflict of declarations of
|
||||
|
|
30
configure.in
30
configure.in
|
@ -1800,24 +1800,26 @@ AC_DEFUN([RUBY_TYPE_ATTRIBUTE], [dnl
|
|||
])
|
||||
])
|
||||
|
||||
RUBY_FUNC_ATTRIBUTE(const, CONSTFUNC)
|
||||
RUBY_FUNC_ATTRIBUTE(pure, PUREFUNC)
|
||||
RUBY_FUNC_ATTRIBUTE(noreturn, NORETURN)
|
||||
RUBY_FUNC_ATTRIBUTE(deprecated, DEPRECATED)
|
||||
RUBY_FUNC_ATTRIBUTE(deprecated("by "@%:@n), DEPRECATED_BY(n,x), rb_cv_func_deprecated_by)
|
||||
RUBY_TYPE_ATTRIBUTE(deprecated mesg, DEPRECATED_TYPE(mesg,x), rb_cv_type_deprecated)
|
||||
RUBY_FUNC_ATTRIBUTE(noinline, NOINLINE)
|
||||
RUBY_FUNC_ATTRIBUTE(weak, WEAK, rb_cv_func_weak)
|
||||
RUBY_FUNC_ATTRIBUTE(__const__, CONSTFUNC)
|
||||
RUBY_FUNC_ATTRIBUTE(__pure__, PUREFUNC)
|
||||
RUBY_FUNC_ATTRIBUTE(__noreturn__, NORETURN)
|
||||
RUBY_FUNC_ATTRIBUTE(__deprecated__, DEPRECATED)
|
||||
RUBY_FUNC_ATTRIBUTE(__deprecated__("by "@%:@n), DEPRECATED_BY(n,x), rb_cv_func_deprecated_by)
|
||||
RUBY_TYPE_ATTRIBUTE(__deprecated__ mesg, DEPRECATED_TYPE(mesg,x), rb_cv_type_deprecated)
|
||||
RUBY_FUNC_ATTRIBUTE(__noinline__, NOINLINE)
|
||||
RUBY_FUNC_ATTRIBUTE(__error__, ERRORFUNC)
|
||||
RUBY_FUNC_ATTRIBUTE(__warning__, WARNINGFUNC)
|
||||
RUBY_FUNC_ATTRIBUTE(__weak__, WEAK, rb_cv_func_weak)
|
||||
if test "$rb_cv_func_weak" != x; then
|
||||
AC_DEFINE(HAVE_FUNC_WEAK)
|
||||
fi
|
||||
|
||||
if_i386=${universal_binary+[defined __i386__]}
|
||||
RUBY_FUNC_ATTRIBUTE(stdcall, [], [], ${if_i386})
|
||||
RUBY_FUNC_ATTRIBUTE(cdecl, [], [], ${if_i386})
|
||||
RUBY_FUNC_ATTRIBUTE(fastcall, [], [], ${if_i386})
|
||||
RUBY_FUNC_ATTRIBUTE(optimize("O0"), FUNC_UNOPTIMIZED, rb_cv_func_unoptimized)
|
||||
RUBY_FUNC_ATTRIBUTE(optimize("-Os","-fomit-frame-pointer"), FUNC_MINIMIZED, rb_cv_func_minimized)
|
||||
RUBY_FUNC_ATTRIBUTE(__stdcall__, [], [], ${if_i386})
|
||||
RUBY_FUNC_ATTRIBUTE(__cdecl__, [], [], ${if_i386})
|
||||
RUBY_FUNC_ATTRIBUTE(__fastcall__, [], [], ${if_i386})
|
||||
RUBY_FUNC_ATTRIBUTE(__optimize__("O0"), FUNC_UNOPTIMIZED, rb_cv_func_unoptimized)
|
||||
RUBY_FUNC_ATTRIBUTE(__optimize__("-Os","-fomit-frame-pointer"), FUNC_MINIMIZED, rb_cv_func_minimized)
|
||||
|
||||
if test "$GCC" = yes; then
|
||||
AC_CACHE_CHECK([for function alias], [rb_cv_gcc_function_alias],
|
||||
|
@ -1882,7 +1884,7 @@ fi
|
|||
AC_CACHE_CHECK(for exported function attribute, rb_cv_func_exported, [
|
||||
rb_cv_func_exported=no
|
||||
RUBY_WERROR_FLAG([
|
||||
for mac in '__attribute__ ((visibility("default")))' '__declspec(dllexport)'; do
|
||||
for mac in '__attribute__ ((__visibility__("default")))' '__declspec(dllexport)'; do
|
||||
AC_TRY_COMPILE([@%:@define RUBY_FUNC_EXPORTED $mac extern
|
||||
RUBY_FUNC_EXPORTED void conftest_attribute_check(void);], [],
|
||||
[rb_cv_func_exported="$mac"; break])
|
||||
|
|
10
internal.h
10
internal.h
|
@ -30,18 +30,18 @@ extern "C" {
|
|||
# define __has_attribute(x) 0
|
||||
#endif
|
||||
|
||||
#if __has_attribute(unused)
|
||||
#define UNINITIALIZED_VAR(x) x __attribute__((unused))
|
||||
#if __has_attribute(__unused__)
|
||||
#define UNINITIALIZED_VAR(x) x __attribute__((__unused__))
|
||||
#elif defined(__GNUC__) && __GNUC__ >= 3
|
||||
#define UNINITIALIZED_VAR(x) x = x
|
||||
#else
|
||||
#define UNINITIALIZED_VAR(x) x
|
||||
#endif
|
||||
|
||||
#if __has_attribute(warn_unused_result)
|
||||
#define WARN_UNUSED_RESULT(x) x __attribute__((warn_unused_result))
|
||||
#if __has_attribute(__warn_unused_result__)
|
||||
#define WARN_UNUSED_RESULT(x) x __attribute__((__warn_unused_result__))
|
||||
#elif defined(__GNUC__) && (__GNUC__ * 1000 + __GNUC_MINOR__) >= 3004
|
||||
#define WARN_UNUSED_RESULT(x) x __attribute__((warn_unused_result))
|
||||
#define WARN_UNUSED_RESULT(x) x __attribute__((__warn_unused_result__))
|
||||
#else
|
||||
#define WARN_UNUSED_RESULT(x) x
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue