mirror of
https://github.com/ruby/ruby.git
synced 2026-01-29 21:44:28 +00:00
Check for existence of strnlen() and use alternative code if it is missing. https://github.com/ruby/json/commit/48d4bbc3a0
13 lines
425 B
Ruby
13 lines
425 B
Ruby
# frozen_string_literal: true
|
|
require 'mkmf'
|
|
|
|
have_func("rb_enc_interned_str", "ruby.h") # RUBY_VERSION >= 3.0
|
|
have_func("rb_hash_new_capa", "ruby.h") # RUBY_VERSION >= 3.2
|
|
have_func("rb_hash_bulk_insert", "ruby.h") # Missing on TruffleRuby
|
|
have_func("rb_category_warn", "ruby.h") # Missing on TruffleRuby
|
|
have_func("strnlen", "string.h") # Missing on Solaris 10
|
|
|
|
append_cflags("-std=c99")
|
|
|
|
create_makefile 'json/ext/parser'
|