[前][次][番号順一覧][スレッド一覧]

ruby-changes:41731

From: naruse <ko1@a...>
Date: Thu, 11 Feb 2016 06:29:39 +0900 (JST)
Subject: [ruby-changes:41731] naruse:r53805 (trunk): * configure.in (RUBY_DEFINT): use Parameter Expansion.

naruse	2016-02-11 06:29:50 +0900 (Thu, 11 Feb 2016)

  New Revision: 53805

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53805

  Log:
    * configure.in (RUBY_DEFINT): use Parameter Expansion.

  Modified files:
    trunk/ChangeLog
    trunk/configure.in
Index: configure.in
===================================================================
--- configure.in	(revision 53804)
+++ configure.in	(revision 53805)
@@ -2012,11 +2012,8 @@ if test "$rb_cv_large_fd_select" = yes; https://github.com/ruby/ruby/blob/trunk/configure.in#L2012
     AC_DEFINE(HAVE_RB_FD_INIT, 1)
 fi
 
-dnl RUBY_DEFINT TYPENAME, SIZE, [SIGNED-OR-UNSIGNED], [INCLUDES = DEFAULT-INCLUDES]
+dnl RUBY_DEFINT TYPENAME, SIZE, [UNSIGNED], [INCLUDES = DEFAULT-INCLUDES]
 AC_DEFUN([RUBY_DEFINT], [dnl
-AS_VAR_PUSHDEF([cond], [rb_defint_cond])dnl
-AS_VAR_PUSHDEF([t], [rb_defint_type])dnl
-AS_VAR_PUSHDEF([s], [rb_defint_size])dnl
 AC_CACHE_CHECK([for $1], [rb_cv_type_$1],
 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])
 typedef $1 t; int s = sizeof(t) == 42;])],
@@ -2031,25 +2028,15 @@ typedef $1 t; int s = sizeof(t) == 42;]) https://github.com/ruby/ruby/blob/trunk/configure.in#L2028
     ["$ac_cv_sizeof___int128"], [ rb_cv_type_$1="m4_if([$3], [], [], [$3 ])__int128"],
     [ rb_cv_type_$1=no])])])
 if test "${rb_cv_type_$1}" != no; then
-    AS_CASE([" ${rb_cv_type_$1}"],
-    [yes], [t=],
-    [*" "*], [
-	t=`expr " ${rb_cv_type_$1}" : ".* \(.*\)"`;
-	t=AS_TR_SH($t)
-    ])
-    cond=
     AC_DEFINE([HAVE_]AS_TR_CPP($1), 1)
     if test "${rb_cv_type_$1}" = yes; then
 	m4_bmatch([$2], [^[1-9][0-9]*$], [AC_CHECK_SIZEOF([$1], 0, [AC_INCLUDES_DEFAULT([$4])])],
 			[RUBY_CHECK_SIZEOF([$1], [$2], [], [AC_INCLUDES_DEFAULT([$4])])])
     else
 	AC_DEFINE_UNQUOTED($1, [$rb_cv_type_$1])
-	AC_DEFINE_UNQUOTED([SIZEOF_]AS_TR_CPP($1), [SIZEOF_]AS_TR_CPP([$t]))
+	AC_DEFINE_UNQUOTED([SIZEOF_]AS_TR_CPP($1), [SIZEOF_]AS_TR_CPP([${rb_cv_type_$1##unsigned }]))
     fi
 fi
-AS_VAR_POPDEF([cond])dnl
-AS_VAR_POPDEF([t])dnl
-AS_VAR_POPDEF([s])dnl
 ])
 
 RUBY_DEFINT(int8_t, 1)
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 53804)
+++ ChangeLog	(revision 53805)
@@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Feb 11 06:26:18 2016  NARUSE, Yui  <naruse@r...>
+
+	* configure.in (RUBY_DEFINT): use Parameter Expansion.
+
 Thu Feb 11 05:33:24 2016  NARUSE, Yui  <naruse@r...>
 
 	* configure.in (int128_t): don't check HAVE_XXX (for example

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]