diff options
author | Yuta Saito <[email protected]> | 2022-02-25 11:08:31 +0000 |
---|---|---|
committer | Yuta Saito <[email protected]> | 2022-03-02 12:50:53 +0900 |
commit | 0c90ca4dd0abbd28d7bb34b9241d93995ab9cfb7 (patch) | |
tree | 071321116c62318c23b41d2dd1b107c941375f6f /wasm/setjmp_core.S | |
parent | 32ad8df9d1e07e1b2435a8890d070802fcd2989f (diff) |
dir.c: use self-made IFTODT in rb_pathtype_t if available
dir.c defines IFTODT if the system doesn't have it. The macro is used
when comparing with rb_pathtype_t's cases. rb_pathtype_t's cases are
defined by DT_XXX macro if they are available, or defined using IFTODT.
Most POSIX-compatible platforms have both IFTODT and DT_XXX and most of
other platforms like MinGW have neither of them. On those platforms,
DT_XXX-oriented rb_pathtype_t is always compared with values converted
by system's IFTODT, and emulated-IFTODT-oriented rb_pathtype_t is always
compared with values converted by emulated-IFTODT.
However, when IFTODT is *not defined* and DT_XXX is *defined*, like
on wasi-libc, DT_XXX-oriented rb_pathtype_t was compared with values
converted by emulated-IFTODT, and they are not guaranteed to be
compatible.
This patch fixes such a situation by using emulated-IFTODT to define
rb_pathtype_t when either IFTODT or DT_XXX is not available.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5614
Diffstat (limited to 'wasm/setjmp_core.S')
0 files changed, 0 insertions, 0 deletions