summaryrefslogtreecommitdiff
path: root/ext/rbconfig
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-30 10:12:18 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-01-30 10:12:18 +0000
commit8ad74296447f628fef2110516f5c332f8c0a31fe (patch)
tree5952761bd69f8b1c17462aca1bf582b040d13df2 /ext/rbconfig
parentf7015c968c19b198ad54c31e755e87385f8b65d3 (diff)
make FIXNUM_MAX visible from Ruby
Because our tests now have several places where FIXNUM_MAX is needed, we decided to provide it along with several other constants. * template/limits.c.tmpl: new file, defining RbConfig::Limits * ext/rbconfig/sizeof/depend (limits.c): rule to generate limits.c * test/-ext-/num2int/test_num2int.rb: use RbConfig::Limits * bootstraptest/test_insns.rb: ditto. * .gitignore: ignore new generated file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/rbconfig')
-rw-r--r--ext/rbconfig/sizeof/depend4
-rw-r--r--ext/rbconfig/sizeof/extconf.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/ext/rbconfig/sizeof/depend b/ext/rbconfig/sizeof/depend
index 589837b..5dbe492 100644
--- a/ext/rbconfig/sizeof/depend
+++ b/ext/rbconfig/sizeof/depend
@@ -1,3 +1,7 @@
+limits.c: $(top_srcdir)/tool/generic_erb.rb $(top_srcdir)/template/limits.c.tmpl
+ $(Q) $(RUBY) $(top_srcdir)/tool/generic_erb.rb --output=$@ \
+ $(top_srcdir)/template/limits.c.tmpl \
+
sizes.c: $(top_srcdir)/tool/generic_erb.rb \
$(top_srcdir)/template/sizes.c.tmpl \
$(top_srcdir)/configure.in \
diff --git a/ext/rbconfig/sizeof/extconf.rb b/ext/rbconfig/sizeof/extconf.rb
index 8cb16ca..f7cd58f 100644
--- a/ext/rbconfig/sizeof/extconf.rb
+++ b/ext/rbconfig/sizeof/extconf.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: false
-$srcs = %w[sizes.c]
+$srcs = %w[sizes.c limits.c]
$distcleanfiles.concat($srcs)
have_type('int_least8_t')