Skip to content

Commit

Permalink
Merge pull request #45 from avar/aix-big-endian-detection
Browse files Browse the repository at this point in the history
Big Endian Detection: Add a whitelist of always BE OSs
  • Loading branch information
shumow committed Aug 2, 2018
2 parents c3e1304 + 3d6b0e5 commit 232357e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/sha1.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,23 @@
#define SHA1DC_BIGENDIAN

/* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> */
#elif (defined(_AIX))

/*
* Defines Big Endian on a whitelist of OSs that are known to be Big
* Endian-only. See
* https://public-inbox.org/git/93056823-2740-d072-1ebd-46b440b33d7e@felt.demon.nl/
*/
#define SHA1DC_BIGENDIAN

/* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> or <os whitelist> */
#elif defined(SHA1DC_ON_INTEL_LIKE_PROCESSOR)
/*
* As a last resort before we do anything else we're not 100% sure
* about below, we blacklist specific processors here. We could add
* more, see e.g. https://wiki.debian.org/ArchitectureSpecificsMemo
*/
#else /* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> or <processor blacklist> */
#else /* Not under GCC-alike or glibc or *BSD or newlib or <processor whitelist> or <os whitelist> or <processor blacklist> */

/* We do nothing more here for now */
/*#error "Uncomment this to see if you fall through all the detection"*/
Expand Down

0 comments on commit 232357e

Please sign in to comment.