Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ext/date/date_parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "ruby.h"
#include "ruby/encoding.h"
#include "ruby/re.h"
#include "ruby/util.h"

#ifndef HAVE_RB_LEN_T
typedef long rb_len_t;
Expand All @@ -17,8 +18,12 @@ typedef long rb_len_t;
#undef strncasecmp
#define strncasecmp STRNCASECMP

#ifndef HAVE_RB_INT_POSITIVE_POW
RUBY_EXTERN VALUE rb_int_positive_pow(long x, unsigned long y);
#endif
#ifndef HAVE_RUBY_SCAN_DIGITS
RUBY_EXTERN unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow);
#endif

/* #define TIGHT_PARSER */

Expand Down
4 changes: 4 additions & 0 deletions ext/date/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,8 @@
have_func("rb_gc_mark_movable", "ruby.h") # RUBY_VERSION >= 2.7
have_const("RUBY_TYPED_EMBEDDABLE", "ruby.h") # RUBY_VERSION >= 3.3

# check if the declarations are exposed
have_func(%[rb_int_positive_pow(0, 0)], "ruby/util.h") # RUBY_VERSION >= 3.1
have_func(%[ruby_scan_digits("", 0, 0, NULL, NULL)], "ruby/util.h") # RUBY_VERSION >= 3.1

create_makefile('date_core')
Loading