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

ruby-changes:41727

From: nobu <ko1@a...>
Date: Wed, 10 Feb 2016 16:06:02 +0900 (JST)
Subject: [ruby-changes:41727] nobu:r53801 (trunk): configure.in: remove unnecessary qualifier

nobu	2016-02-10 16:06:12 +0900 (Wed, 10 Feb 2016)

  New Revision: 53801

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

  Log:
    configure.in: remove unnecessary qualifier
    
    * configure.in (RUBY_DEFINT): remove unnecessary unsigned
      qualifier from preprocessing symbols.

  Modified files:
    trunk/configure.in
Index: configure.in
===================================================================
--- configure.in	(revision 53800)
+++ configure.in	(revision 53801)
@@ -2014,6 +2014,9 @@ fi https://github.com/ruby/ruby/blob/trunk/configure.in#L2014
 
 dnl RUBY_DEFINT TYPENAME, SIZE, [SIGNED-OR-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;])],
@@ -2028,6 +2031,17 @@ typedef $1 t; int s = sizeof(t) == 42;]) https://github.com/ruby/ruby/blob/trunk/configure.in#L2031
     ["$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=
+    AS_CASE([$t], [__int*], [
+	cond="defined HAVE_"AS_TR_CPP($t)
+	echo "@%:@if $cond" >> confdefs.h
+    ])
     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])])],
@@ -2036,7 +2050,13 @@ if test "${rb_cv_type_$1}" != no; then https://github.com/ruby/ruby/blob/trunk/configure.in#L2050
 	AC_DEFINE_UNQUOTED($1, [$rb_cv_type_$1])
 	AC_DEFINE_UNQUOTED([SIZEOF_]AS_TR_CPP($1), [SIZEOF_]AS_TR_CPP([$rb_cv_type_$1]))
     fi
+    AS_IF([test -n "$cond"], [
+	echo "@%:@endif /* $cond */" >> confdefs.h
+    ])
 fi
+AS_VAR_POPDEF([cond])dnl
+AS_VAR_POPDEF([t])dnl
+AS_VAR_POPDEF([s])dnl
 ])
 
 RUBY_DEFINT(int8_t, 1)

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

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