summaryrefslogtreecommitdiff
path: root/version.h
AgeCommit message (Collapse)Author
46 hoursmerge revision(s) d209e6f1c0a93ad3ce1cc64dd165a6b67672614d: [Backport #21715]ruby_3_3Hiroshi SHIBATA
search_nonascii(): Replace UB pointer cast with memcpy Casting a pointer to create an unaligned one is undefined behavior in C standards. Use memcpy to express the unaligned load instead to play by the rules. Practically, this yields the same binary output in many situations while fixing the crash in [Bug #21715].
2025-11-30merge revision(s) beb85e7eeee4163cd45b69645a60cdb942f72c05: [Backport #21705]nagachika
[PATCH] [Bug #21705] Fix segfaults on Windows It should check the type of the argument and coercion before converting the encoding.
2025-11-30merge revision(s) f4f728b319086eea3db6e9909fb9c849c276f813: [Backport #21680]nagachika
[PATCH] [Bug #21680] Fix (base**power_of_two).digits(base) bug (#15144) Fix wrong condition in base multiplying loop.
2025-11-29merge revision(s) c5bd4acd30320a8e180ce9fcb24acdab4e10c73a: [Backport #21666]nagachika
[PATCH] [Bug #21666] Get rid of use of unspecified values
2025-11-29merge revision(s) 9d44cb0b2b5520b2b299851003ca2a97bf1e2079, ↵nagachika
367ddd445cdf5ccc55a0481c944746ef595f72f7, 48dce7874fcb571765635b32fa6a3e3a12e228f8: [Backport #21655] [PATCH] Remove rbimpl_rstring_getmem() usage as workaround for GCC 15.2.1 optimization bug. [Bug #21655] [PATCH] include/ruby/internal/core/rstring.h: Remove rbimpl_rstring_getmem() definition. [PATCH] simplify RSRING_GETMEM() definition.
2025-11-29merge revision(s) a4dff09be79b52288a47658964d25e5aa84fc960: [Backport #21673]nagachika
[PATCH] [Bug #21673] Fix resolving refined module-defined method A method defined in a module has no `defined_class`, use the ICLASS for it as the `defined_class`.
2025-11-29merge revision(s) d17ce4bd05dc05d48f5f4bc75171fcebda1678ed: [Backport #21652]nagachika
[PATCH] [Bug #21652] [DOC] Update unmarshalable object list The `Data` mentioned here was the old `T_DATA` class, not the current extended `Struct`.
2025-11-08unicode_normalize/normalize.rb: stop using `it` special block parameter in ↵nagachika
ruby_3_3.
2025-11-08merge revision(s) 377aa2a336cc700485c699ac49330f2a58b74906: [Backport #21668]nagachika
[PATCH] Improve performance of UnicodeNormalize.canonical_ordering_one Use array_of_integer.sort! instead of buble-sort-like algorithm
2025-11-03merge revision(s) e500222de1a8d5e7a844209a7e912b03db8cdf76:nagachika
[PATCH] fix last commit `th` is gone.
2025-11-02merge revision(s) ffc69eec0a5746d48ef3cf649639c67631a6a609, ↵nagachika
0531fa4d6fea100f69f0bac9e03973fe49ecd570: [Backport #21560] [PATCH] `struct rb_thread_sched_waiting` Introduce `struct rb_thread_sched_waiting` and `timer_th.waiting` can contain other than `rb_thread_t`. [PATCH] mn timer thread: force wakeups for timeouts
2025-11-02merge revision(s) 12350eb9e0d3317da57b5a37c0c2810946b48850: [Backport #21625]nagachika
[PATCH] [Bug #21625] Allow io/wait methods with `IO#ungetc` in text mode
2025-10-25merge revision(s) 4368e6c42effc16904e35f753fc2002f0bba375a:nagachika
[PATCH] [ruby/rubygems] Removed credential assertion from stdout https://github.com/ruby/rubygems/commit/3946be008c
2025-10-23bump teenyv3_3_10nagachika
2025-10-20merge revision(s) 957c832db137e67289e93dfd9fd9e915b1f2fc87:nagachika
[PATCH] Fix memory leak in rb_const_remove when using namespace We need to free the rb_const_entry_t we remove from the RCLASS_WRITABLE_CONST_TBL otherwise it will leak memory.
2025-10-18merge revision(s) e94a2f691d67ad98be9036e76c765fcfa7d22552: [Backport #21638]nagachika
[PATCH] [Bug #21638] Mark ractor-local `$VERBOSE` and `$DEBUG` https://github.com/sampersand/blog/blob/master/the%20-s%20flag.md#the-segfault
2025-10-11merge revision(s) 07b59eee6aa120537d7d72422327cc7b855e9400:nagachika
[PATCH] Fix memory leak when load_from_binary raises ibf_load_code will leak memory allocated for the code if an exception is raised. The following script reproduces the leak: bin = RubyVM::InstructionSequence.of(1.method(:abs)).to_binary 10.times do 100_000.times do RubyVM::InstructionSequence.load_from_binary(bin) rescue ArgumentError end puts `ps -o rss= -p #{$$}` end Before: 18004 23380 28756 34260 39892 45396 50772 55892 61012 66132 After: 12536 12920 13304 13688 14072 14456 14840 15352 15608 15864
2025-10-11merge revision(s) 7ae67e8f6ad6e7fd0677b28a7a10961f79d55495: [Backport #21568]nagachika
[PATCH] load.c: Fix dest and src of MEMMOVE When multiple files with the same name are required, the features_index hash stores the indexes in `$LOADED_FEATURES` array into a darray. The dest and src arguments for `MEMMOVE` were wrongly reversed when inserting a new index in the darray. [Bug #21568]
2025-10-08merge revision(s) 43dbb9a93f4de3f1170d7d18641c30e81cc08365, ↵nagachika
2bb6fe3854e2a4854bb89bfce4eaaea9d848fd1b, 7c9dd0ecff61153b96473c6c51d5582e809da489: [Backport #21629] [PATCH] [Bug #21629] Enable `nonstring` attribute on clang 21 [PATCH] [Bug #21629] Initialize `struct RString` [PATCH] [Bug #21629] Initialize `struct RArray`
2025-10-05merge revision(s) 62430c19c9f1ab49429cebe65f30588472648c95: [Backport #21342]nagachika
Message not found for revision: 62430c19c9f1ab49429cebe65f30588472648c95
2025-10-05merge revision(s) 354d47ae5bc4edcc94db4a5391ed71a8b9844e57: [Backport #21569]nagachika
Message not found for revision: 354d47ae5bc4edcc94db4a5391ed71a8b9844e57
2025-10-05merge revision(s) ef2b26cc3eaed06c5c9d4ef2c6d8669ff357afa4: [Backport #21611]nagachika
Message not found for revision: ef2b26cc3eaed06c5c9d4ef2c6d8669ff357afa4
2025-10-05merge revision(s) 7a05dbc47831a655a1ef8a1635f88292acd325da: [Backport #21561]nagachika
Message not found for revision: 7a05dbc47831a655a1ef8a1635f88292acd325da
2025-09-14merge revision(s) 928fea3bfa86053c0bc6f7a5bf7559b115a676b5: [Backport #21567]nagachika
Fix crash when $LOADED_FEATURES is modified during require [Bug #21567] When we require an object that is not a string, it will attempt to convert it to a string by calling to_str on it. If we modify the $LOADED_FEATURES array while it calls to_str, Ruby can crash because it can end up inserting the string in the wrong index in the array. For example, the following script crashes: require "tempfile" class MyString def initialize(path) @path = path end def to_str $LOADED_FEATURES.clear @path end def to_path = @path end def create_ruby_file = Tempfile.create(["test", ".rb"]).path require MyString.new(create_ruby_file) $LOADED_FEATURES.unshift(create_ruby_file) $LOADED_FEATURES << MyString.new(create_ruby_file) require create_ruby_file Crash log: test.rb:21: [BUG] Segmentation fault at 0x0000000000000004 ruby 3.5.0dev (2025-09-09T09:29:35Z master ce94add7fb) +PRISM [arm64-darwin24] -- Crash Report log information -------------------------------------------- See Crash Report log file in one of the following locations: * ~/Library/Logs/DiagnosticReports * /Library/Logs/DiagnosticReports for more details. Don't forget to include the above Crash Report log file in bug reports. -- Control frame information ----------------------------------------------- c:0003 p:---- s:0011 e:000010 CFUNC :require c:0002 p:0076 s:0006 e:000005 EVAL test.rb:21 [FINISH] c:0001 p:0000 s:0003 E:0001b0 DUMMY [FINISH] -- Ruby level backtrace information ---------------------------------------- test.rb:21:in '<main>' test.rb:21:in 'require' -- Threading information --------------------------------------------------- Total ractor count: 1 Ruby thread count for this ractor: 1 -- Machine register context ------------------------------------------------ x0: 0x0000000000000004 x1: 0x000000000000c800 x2: 0x0000000000000000 x3: 0x0000000000000000 x4: 0x0000000000000205 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x0000000000000001 x18: 0x0000000000000000 x19: 0x0000000209dfc0b0 x20: 0x0000000209dfc018 x21: 0x000000016ee8ab58 x22: 0x0fffffff0009d71d x23: 0x0000000209dfc018 x24: 0x0000000209dfc150 x25: 0x000000016ee8acc0 x26: 0x0000000000000000 x27: 0x0000000000000000 x28: 0x0000000000000000 lr: 0x0000000101244140 fp: 0x000000016ee887f0 sp: 0x000000016ee887d0 -- C level backtrace information ------------------------------------------- miniruby(rb_print_backtrace+0x24) [0x101317b08] vm_dump.c:843 miniruby(rb_print_backtrace) (null):0 miniruby(rb_vm_bugreport+0x26c) [0x101317d94] vm_dump.c:1175 miniruby(rb_bug_for_fatal_signal+0xa4) [0x10105ddac] error.c:1130 miniruby(sig_do_nothing+0x0) [0x1012278c0] signal.c:948 miniruby(sigsegv) (null):0 /usr/lib/system/libsystem_platform.dylib(_sigtramp+0x38) [0x19c1216a4] miniruby(rb_str_new_frozen+0x1c) [0x101244140] string.c:1495 miniruby(rb_check_realpath_internal+0x68) [0x101077804] file.c:4679 miniruby(rb_check_realpath+0x2c) [0x101077aa4] file.c:4765 miniruby(get_loaded_features_index+0x37c) [0x1010f9c94] load.c:467 miniruby(rb_feature_p+0xd0) [0x1010f8174] load.c:582 miniruby(search_required+0xac) [0x1010f6ad4] load.c:1193 miniruby(require_internal+0x274) [0x1010f7518] load.c:1424 miniruby(rb_require_string_internal+0x94) [0x1010f6830] load.c:1571 miniruby(rb_require_string+0x58) [0x1010f66e8] load.c:1557 miniruby(rb_f_require+0x1c) [0x1010f6684] load.c:1150 miniruby(ractor_safe_call_cfunc_1+0x38) [0x101306c28] vm_insnhelper.c:3696 miniruby(vm_call_cfunc_with_frame_+0x250) [0x1012f857c] vm_insnhelper.c:3873 miniruby(vm_call_cfunc_with_frame+0x6c) [0x1012f8834] vm_insnhelper.c:3919 miniruby(vm_sendish+0x1a8) [0x1012c990c] vm_insnhelper.c:6087 miniruby(vm_exec_core+0x4050) [0x1012cfb48] insns.def:900 miniruby(vm_exec_loop+0x80) [0x1012e5448] vm.c:2666 miniruby(rb_vm_exec+0x134) [0x1012c9b40] vm.c:2645 miniruby(rb_iseq_eval_main+0x34) [0x1012e5628] vm.c:2919 miniruby(rb_ec_exec_node+0xe4) [0x10106d094] eval.c:282 miniruby(ruby_run_node+0x94) [0x10106cf64] eval.c:320 miniruby(rb_main+0x40) [0x100f7499c] main.c:42 miniruby(main+0x60) [0x100f74928] main.c:62
2025-09-14merge revision(s) 7c28fb2fb2544e5fed75ef216c4dd08084b38671: [Backport #21546]nagachika
[Bug #21546] Make the generated pc file relocatable
2025-09-14merge revision(s) ce849d565bf6aae8e0179fffb04eb1f665f17347, ↵nagachika
acb29f7fa1497463ed3bdd65549ef20b61beda64: [Backport #21402] ruby2_keywords warnings: Quote non-UTF8 method names fully It used to quote only part of the method name because NUL byte in the method terminates the C string: ``` (irb)> "abcdef".encode("UTF-16LE").bytes => [97, 0, 98, 0, 99, 0, 100, 0, 101, 0, 102, 0] ``` ``` expected: /abcdef/ actual: warning: Skipping set of ruby2_keywords flag for a (method not defined in Ruby)\n". ``` Do not respect ruby2_keywords on method/proc with post arguments Previously, ruby2_keywords could be used on a method or proc with post arguments, but I don't think the behavior is desired: ```ruby def a(*c, **kw) [c, kw] end def b(*a, b) a(*a, b) end ruby2_keywords(:b) b({foo: 1}, bar: 1) ``` This changes ruby2_keywords to emit a warning and not set the flag on a method/proc with post arguments. While here, fix the ruby2_keywords specs for warnings, since they weren't testing what they should be testing. They all warned because the method didn't accept a rest argument, not because it accepted a keyword or keyword rest argument.
2025-07-24bump teenyv3_3_9nagachika
2025-07-24merge revision(s) 5e5cec1b86837653b2106af377561045f4bbecef:nagachika
Fix bigand_int edgecase returning false (#13987)
2025-07-24Revert bump versions of default gems for extconf.rb changes.nagachika
This reverts commit 91263c7e523dd0345c35ac4b616676132aad09d1.
2025-07-20merge revision(s) b42afa1dbcbb91e89852b3b3bc72484d7f0a5528, ↵nagachika
67b91e780798b80038dbfb39a06831918a75259f, f1f0cc14cc7d3f9be35b203e5583f9224b1e2387, 543e3a1896ae2fe3b5b954f6497d261ab5663a15, ed2806117a0b76e4439ce1a061fae21d9e116d69, 46e4c8673747de96838d2c5dec37446d23d99d88: [Backport #21497] Suppress gcc 15 unterminated-string-initialization warnings Drop an ignored attribute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC 13.3.0 (Ubuntu 24.04) emits the following warning: ../symbol.c: In function ‘rb_id_attrset’: ../symbol.c:175:9: warning: ‘nonstring’ attribute ignored on objects of type ‘const char[][8]’ [-Wattributes] 175 | RBIMPL_ATTR_NONSTRING() static const char id_types[][8] = { | ^~~~~~~~~~~~~~~~~~~~~ Separate `__has_attribute` from `defined(__has_attribute)` Fix Visual C warnings: ``` regenc.h(121): warning C4067: unexpected tokens following preprocessor directive - expected a newline ``` Cast up `int` instruction code to `VALUE` Fix Visual C warnings: ``` iseq.c(3793): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size iseq.c(3794): warning C4312: 'type cast': conversion from 'int' to 'void *' of greater size ``` Do not let files depend on a phony target Detect `clock_gettime` and `clock_getres` for winpthreads
2025-07-20merge revision(s) d77e02bd85ab7f841df8d473bac214b9a92a3506: [Backport #21497]nagachika
[Bug #21497] [ruby/socket]: add full prototype MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit otherwise, gcc 15 will complain: > init.c:573:19: error: too many arguments to function ‘Rconnect’; expected 0, have 3 > 573 | return (VALUE)Rconnect(arg->fd, arg->sockaddr, arg->len); > | ^~~~~~~~ ~~~~~~~ > In file included from init.c:11: > rubysocket.h:294:5: note: declared here > 294 | int Rconnect(); > | ^~~~~~~~ > sockssocket.c:33:9: error: too many arguments to function ‘SOCKSinit’; expected 0, have 1 > 33 | SOCKSinit("ruby"); > | ^~~~~~~~~ ~~~~~~ > In file included from sockssocket.c:11: > rubysocket.h:293:6: note: declared here > 293 | void SOCKSinit(); > | ^~~~~~~~~ Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
2025-07-20merge revision(s) 1181a682a6c314c92686e3701defa1eb44068c4e, ↵nagachika
0cec4a14fb832aed4b498a21ec0c19765642d408, d84a811f31a65821642b165d712f380c0cc060e0: [Backport #21448] [Bug #21448] Use `getentropy(2)` only on macOS If this is not a system call, then it is using getrandom (which would have been tried already), and cannot be used as a replacement for the random devices. Restore getrandom(2) path for Linux with glibc 2.36 or later This is a follow-up to commit b120f5e38d9c (avoid fork-unsafe arc4random implementations, 2018-09-04). Avoid defining a no-op fill_random_bytes_syscall() if arc4random_buf(3) exists, but we are unsure if it is fork-safe. Check for other options instead. IOW, see if getrandom(2) is available. glibc 2.36, released in 2022, started to provide arc4random_buf(3) on Linux. This causes fill_random_bytes_syscall() to use neither of them and makes Random.urandom solely rely on getentropy(3) via fill_random_bytes_urandom(). While the glibc implementation is safe, I did not add it to the list because using getrandom(2) directly is preferable on Linux. [Bug #21448] Reorder trials in `fill_random_bytes` First try dedicated system calls, such as `getrandom` or `getentropy`, next possible libraries, then fallback to `/dev/urandom`.
2025-07-19merge revision(s) 097d742a1ed53afb91e83aef01365d68b763357b: [Backport #20009]nagachika
[Bug #20009] Support marshaling non-ASCII name class/module
2025-06-29merge revision(s) c1877d431e76f4a782d51602fa8487e98d302956: [Backport #21437]nagachika
[ruby/date] [Bug #21437] Date#hash for large years Addresses https://bugs.ruby-lang.org/issues/21437 Signed-off-by: Dmitry Dygalo <dmitry.dygalo@workato.com> https://github.com/ruby/date/commit/31f07bc576
2025-06-29merge revision(s) 2e7e78cd590d20aa9d41422e96302f3edd73f623: [Backport #21440]nagachika
[Bug #21440] Stop caching member list in frozen Data/Struct class
2025-06-15merge revision(s) fa85d23ff4a02985ebfe0716b0ff768f5b4fe13d: [Backport #21380]nagachika
[Bug #21380] Prohibit modification in String#split block Reported at https://hackerone.com/reports/3163876
2025-06-14merge revision(s) 72bda0f981c7136f50254c433bbfb97a953f634b: [Backport #21255]nagachika
[Bug #21255] Win32: Do not export `__declspec(selectany)` symbols ``` x64-vcruntime140-ruby350.def : error LNK2001: unresolved external symbol Avx2WmemEnabledWeakValue ```
2025-06-14merge revision(s) e1adb6cb15129a54df0c55a337e98b92b2a55e3f: [Backport #21283]nagachika
Win: Suppress false warnings from Visual C 17.14.1 https://developercommunity.visualstudio.com/t/warning-C5287:-operands-are-different-e/10877942? It is not able to silence "operands are different enum types" warnings, even using an explicit cast, as the message says.
2025-06-14merge revision(s) 2297afda7ff3926c51fea700dfbf0f0eb4fea1e5: [Backport #21340]nagachika
Include stdbool.h without checking with autoconf As reported in <https://bugs.ruby-lang.org/issues/21340>, older autoconf have an AC_HEADER_STDBOOL that's incompatible with C23. Autoconf 2.72 fixed the macro, but also mentions that it's obsolescent since all current compilers have this header. Since we require C99 [1] and VS 2015 [2], we might actually be able take that suggestion and include stdbool.h without a check. I want to try this on rubyci.org and will revert if this cause any issues. Not touching AC_HEADER_STDBOOL in configure.ac for now. [1]: https://bugs.ruby-lang.org/issues/15347 [2]: https://bugs.ruby-lang.org/issues/19982
2025-06-14merge revision(s) f6cbf499bc98b851034fffb49fcbb59d495f6f7b: [Backport #21354]nagachika
Fix Symbol#to_proc (rb_sym_to_proc) to be ractor safe In non-main ractors, don't use `sym_proc_cache`. It is not thread-safe to add to this array without a lock and also it leaks procs from one ractor to another. Instead, we create a new proc each time. If this results in poor performance we can come up with a solution later. Fixes [Bug #21354]
2025-05-24merge revision(s) cbf9c088f8005a49b6aa3f475c70041357774c61: [Backport #21310]nagachika
YJIT: End the block after OPTIMIZE_METHOD_TYPE_CALL (#13245)
2025-05-24merge revision(s) 056497319658cbefe22351c6ec5c9fa6e4df72bd: [Backport #21357]nagachika
[Bug #21357] Fix crash in Hash#merge with block Prior to https://github.com/ruby/ruby/commit/49b306ecb9e2e9e06e0b1590bacc5f4b38169c3c the `optional_arg` passed from `rb_hash_update_block_i` to `tbl_update` was a hash value (i.e. a VALUE). After that commit it changed to an `update_call_args`. If the block sets or changes the value, `tbl_update_modify` will set the `arg.value` back to an actual value and we won't crash. But in the case where the block returns the original value we end up calling `RB_OBJ_WRITTEN` with the `update_call_args` which is not expected and may crash. `arg.value` appears to only be used to pass to `RB_OBJ_WRITTEN` (others who need the `update_call_args` get it from `arg.arg`), so I don't think it needs to be set to anything upfront. And `tbl_update_modify` will set the `arg.value` in the cases we need the write barrier.
2025-05-24merge revision(s) 49b306ecb9e2e9e06e0b1590bacc5f4b38169c3c: [Backport #21333]nagachika
[Bug #21333] Prohibit hash modification inside Hash#update block
2025-05-18merge revision(s) 80a1a1bb8ae8435b916ae4f66a483e91ad31356a: [Backport #21257]nagachika
YJIT: Fix potential infinite loop when OOM (GH-13186) Avoid generating an infinite loop in the case where: 1. Block `first` is adjacent to block `second`, and the branch from `first` to `second` is a fallthrough, and 2. Block `second` immediately exits to the interpreter, and 3. Block `second` is invalidated and YJIT is OOM While pondering how to fix this, I think I've stumbled on another related edge case: 1. Block `incoming_one` and `incoming_two` both branch to block `second`. Block `incoming_one` has a fallthrough 2. Block `second` immediately exits to the interpreter (so it starts with its exit) 3. When Block `second` is invalidated, the incoming fallthrough branch from `incoming_one` might be rewritten first, which overwrites the start of block `second` with a jump to a new branch stub. 4. YJIT runs of out memory 5. The incoming branch from `incoming_two` is then rewritten, but because we're OOM we can't generate a new stub, so we use `second`'s exit as the branch target. However `second`'s exit was already overwritten with a jump to the branch stub for `incoming_one`, so `incoming_two` will end up jumping to `incoming_one`'s branch stub. Fixes [Bug #21257]
2025-05-18merge revision(s) b959263b58e26ef630c085f9f7ddc04373a998c7: [Backport #21344]nagachika
Fix Exception#detailed_message for GC compaction Before this commit, the test fails with RGENGC_CHECK_MODE enabled: TestException#test_detailed_message_under_gc_compact_stress [test/ruby/test_exception.rb:1466]: <"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" + "\e[1mbar\e[m\n" + "\e[1mbaz\e[m"> expected but was <"\e[1mfoo (\e[1;4mRuntimeError\e[m\e[1m)\e[m\n" + "\e[1m\x00\x00\x00\x00\x00\x00\x00\e[m">.
2025-05-18merge revision(s) b48b841378f80e16378ceb83f3b78e52df9ae023, ↵nagachika
2fe8b9cd3d308d754f3d33a948dfb1dd782a10dc: [Backport #21327] digest.so needs ruby/digest.h which is installed by build-ext Copy to path with the base name
2025-05-18merge revision(s) 3113bc8d445c4c24ed3827adfc50bb88c99b6364:nagachika
stat command is not provided on Windows
2025-05-17merge revision(s) 7793b59c8d2a13c124fe276e11723db23facce04: [Backport #21331]nagachika
[Bug #21331] Prohibit hash modification during stlike loop
2025-05-17merge revision(s) 7f5b4fb26ea8c0a736a37101327905eebebee8bf:nagachika
Remove unused retval assignments
2025-05-17merge revision(s) 3e47e7a499acd256be549935fcb559d3c82e556c, ↵nagachika
46e4c8673747de96838d2c5dec37446d23d99d88: Fix redefinition of `clock_gettime` and `clock_getres` winpthreads-git 12.0.0.r720 provides `clock_gettime` and `clock_getres` as inline functions. Detect `clock_gettime` and `clock_getres` for winpthreads