1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* configure.in (RUBY_TRY_CFLAGS): try with werror turned on.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-07-23 06:05:43 +00:00
parent 8044ac7b43
commit b4080cf9ea
2 changed files with 21 additions and 15 deletions

View file

@ -1,3 +1,7 @@
Fri Jul 23 15:05:42 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (RUBY_TRY_CFLAGS): try with werror turned on.
Fri Jul 23 09:02:43 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* re.c (rb_reg_expr_str): fixed out-of-boundary access at invalid

View file

@ -393,15 +393,31 @@ AC_SUBST(CHDIR)
dnl }
dnl compiler section {
AC_DEFUN([RUBY_WERROR_FLAG], [dnl
if test "${ac_c_werror_flag+set}"; then
rb_c_werror_flag="$ac_c_werror_flag"
else
unset rb_c_werror_flag
fi
ac_c_werror_flag=yes
$1
if test "${rb_c_werror_flag+set}"; then
ac_c_werror_flag="$rb_c_werror_flag"
else
unset ac_c_werror_flag
fi])
AC_DEFUN(RUBY_TRY_CFLAGS, [
save_CFLAGS="$CFLAGS"
CFLAGS="[$]CFLAGS $1"
AC_MSG_CHECKING([whether ]$1[ is accepted])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
RUBY_WERROR_FLAG([
AC_TRY_COMPILE([$4], [$5],
[$2
AC_MSG_RESULT(yes)],
[$3
AC_MSG_RESULT(no)])
])
CFLAGS="$save_CFLAGS"
save_CFLAGS=
])
@ -676,20 +692,6 @@ EOH
])dnl
])dnl
AC_DEFUN([RUBY_WERROR_FLAG], [dnl
if test "${ac_c_werror_flag+set}"; then
rb_c_werror_flag="$ac_c_werror_flag"
else
unset rb_c_werror_flag
fi
ac_c_werror_flag=yes
$1
if test "${rb_c_werror_flag+set}"; then
ac_c_werror_flag="$rb_c_werror_flag"
else
unset ac_c_werror_flag
fi])
dnl RUBY_FUNC_ATTRIBUTE(attrib, macroname, cachevar, condition)
AC_DEFUN([RUBY_FUNC_ATTRIBUTE], [dnl
m4_ifval([$2], dnl