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

Detect byte order at compile time #91

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Conversation

thbeu
Copy link
Contributor

@thbeu thbeu commented Jan 28, 2024

This is a mix of both static (shapefil.h) and dynamic (CMake and autoconf) configuration to detect BIG endian architectures at compile time or configure time, respectively.

The static variable bBigEndian is removed,

Refactoring was not straight-forward since in some code locations Swap is called for big endian, in other locations for little endian. This looks kind of dangerous and error-prone to me. Edit: OK, it is mixed endianness by design.

Resolves #36

@thbeu thbeu mentioned this pull request Jan 28, 2024
@rouault rouault merged commit 317f58e into OSGeo:master Jan 29, 2024
4 checks passed
@thbeu thbeu deleted the fix-endianness branch January 29, 2024 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup endian checks
2 participants