Skip to content

Add support for big-endian platforms (fixes #9)

Ben Beasley requested to merge musicinmybrain/EDFlib:endian into master

Also fixes undefined behavior due to pointer type-punning (a strict aliasing violation) in the unit tests.

There are many different ways to go about this, and a lot of room for personal preferences. This merge request demonstrates one implementation that I believe to be correct. The unit tests pass on both big-endian and little-endian platforms.

Merge request reports