AndrasKovacs / flatparse

Fast parsing from bytestrings
MIT License
146 stars 12 forks source link

Fix usage of `WORDS_BIGENDIAN` CPP macros #55

Closed raehik closed 7 months ago

raehik commented 7 months ago

This is provided by MachDeps.h, which we never #include d, so these clauses would never be used. We now #include it where required, and I reformatted the CPP checks to look like GHC (which uses #if defined(WORDS_BIGENDIAN)).

Also separately adds a quick Nix build file fix.

raehik commented 7 months ago

I should note that I haven't tested this (no big-endian platform on hand). But it is more than likely correct, since it matches what GHC and various other low-level packages I've seen do.

AndrasKovacs commented 7 months ago

Thanks!