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

Refer autoconfigured endian macro #10572

Merged
merged 1 commit into from Apr 19, 2024
Merged

Conversation

nobu
Copy link
Member

@nobu nobu commented Apr 18, 2024

Remove the case RB_IO_BUFFER_HOST_ENDIAN is not defined.

REG_DWORD on Windows is unconditionally equal to REG_DWORD_LITTLE_ENDIAN, which probably would have been added for symmetry with REG_DWORD_BIG_ENDIAN not for portability.

Remove the case `RB_IO_BUFFER_HOST_ENDIAN` is not defined.
@nobu nobu requested a review from ioquatix April 18, 2024 09:23
Copy link
Member

@ioquatix ioquatix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

Just to confirm, the compiler provides WORDS_BIGENDIAN?

@nobu
Copy link
Member Author

nobu commented Apr 19, 2024

WORDS_BIGENDIAN is defined by AC_C_BIGENDIAN, a macro of autoconf.

@ioquatix
Copy link
Member

Does every windows build use autoconf?

@nobu
Copy link
Member Author

nobu commented Apr 19, 2024

Windows builds do not use autoconf, then WORDS_BIGENDIAN is kept undefined.
I don't think big-endian Windows has ever existed.

@nobu
Copy link
Member Author

nobu commented Apr 19, 2024

I don't think big-endian Windows has ever existed.

So REG_DWORD is equal to REG_DWORD_LITTLE_ENDIAN.

@ioquatix ioquatix merged commit 7f87ad9 into ruby:master Apr 19, 2024
101 checks passed
artur-intech pushed a commit to artur-intech/ruby that referenced this pull request Apr 26, 2024
Remove the case `RB_IO_BUFFER_HOST_ENDIAN` is not defined.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants