summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYuta Saito <kateinoigakukun@gmail.com>2022-02-25 11:08:31 +0000
committerYuta Saito <kateinoigakukun@gmail.com>2022-03-02 12:50:53 +0900
commit0c90ca4dd0abbd28d7bb34b9241d93995ab9cfb7 (patch)
tree071321116c62318c23b41d2dd1b107c941375f6f /lib
parent32ad8df9d1e07e1b2435a8890d070802fcd2989f (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 'lib')
0 files changed, 0 insertions, 0 deletions