Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fcntl: remove pointless S_ISENFMT function #22202

Open
wants to merge 1 commit into
base: blead
Choose a base branch
from

Conversation

mauke
Copy link
Contributor

@mauke mauke commented May 9, 2024

S_ISENFMT($mode) has no equivalent C macro. It was implemented (in XS) as the equivalent of ($mode & S_IFMT) == S_ENFMT, which is always false because S_ENFMT is not a file type and thus not covered by the S_IFMT mask.

(See commits ca6e1c2, 0e6f150, 0f68039, fb59364, 87eca6e for the history of this function, which has always been broken in various ways ever since it was added in 2000.)

Fixes #22190.

S_ISENFMT($mode) has no equivalent C macro. It was implemented (in XS)
as the equivalent of `($mode & S_IFMT) == S_ENFMT`, which is always
false because S_ENFMT is not a file type and thus not covered by the
S_IFMT mask.

(See commits ca6e1c2, 0e6f150, 0f68039, fb59364, 87eca6e for the history
of this function, which has always been broken in various ways ever
since it was added in 2000.)

Fixes Perl#22190.
@mauke mauke added the defer-next-dev This PR should not be merged yet, but await the next development cycle label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defer-next-dev This PR should not be merged yet, but await the next development cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

S_ISENFMT from Fcntl makes no sense
2 participants