OSGeo / shapelib

Official repository of shapelib
Other
141 stars 66 forks source link

Detect byte order at compile time #91

Closed thbeu closed 10 months ago

thbeu commented 10 months ago

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