configure.in: enum_over_int
* configure.in (enum_over_int): check if enum over int is allowed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ca48cc4ad5
commit
a995195d78
26
configure.in
26
configure.in
@ -1775,6 +1775,32 @@ if test "$rb_cv_function_name_string" != no; then
|
|||||||
AC_DEFINE_UNQUOTED(RUBY_FUNCTION_NAME_STRING, [$rb_cv_function_name_string])
|
AC_DEFINE_UNQUOTED(RUBY_FUNCTION_NAME_STRING, [$rb_cv_function_name_string])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_CACHE_CHECK(if enum over int is allowed, rb_cv_enum_over_int, [
|
||||||
|
rb_cv_enum_over_int=no
|
||||||
|
if test "x$ac_cv_type_long_long" = xyes; then
|
||||||
|
type="unsigned long long" max="ULONG_LONG_MAX"
|
||||||
|
else
|
||||||
|
type="unsigned long" max="ULONG_MAX"
|
||||||
|
fi
|
||||||
|
RUBY_WERROR_FLAG([
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_BOOL_COMPILE_TRY([
|
||||||
|
@%:@include <limits.h>
|
||||||
|
enum {conftest_max = $max};
|
||||||
|
], [
|
||||||
|
(conftest_max == $max) &&
|
||||||
|
(sizeof(conftest_max) == sizeof($type))
|
||||||
|
]
|
||||||
|
)],
|
||||||
|
[rb_cv_enum_over_int=yes],
|
||||||
|
[rb_cv_enum_over_int=no]
|
||||||
|
)
|
||||||
|
])
|
||||||
|
])
|
||||||
|
if test $rb_cv_enum_over_int = yes; then
|
||||||
|
AC_DEFINE(ENUM_OVER_INT, 1)
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Check whether we need to define sys_nerr locally
|
dnl Check whether we need to define sys_nerr locally
|
||||||
AC_CHECK_DECLS([sys_nerr], [], [], [$ac_includes_default
|
AC_CHECK_DECLS([sys_nerr], [], [], [$ac_includes_default
|
||||||
@%:@include <errno.h>])
|
@%:@include <errno.h>])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user