diff options
| author | B. Watson <urchlay@slackware.uk> | 2025-12-12 04:58:15 -0500 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2025-12-12 04:58:15 -0500 |
| commit | 1fa2b732b7b6c1539995fa40605d9bcf807ac357 (patch) | |
| tree | e579ccac1139dec4ea71c93ff44a5c006d594be4 /src/bytorder.h | |
| parent | 717d581f9751f73e9a7cf69a02dfe73050add281 (diff) | |
| download | alftools-1fa2b732b7b6c1539995fa40605d9bcf807ac357.tar.gz | |
alf: Cleanup and commentary.
Diffstat (limited to 'src/bytorder.h')
| -rw-r--r-- | src/bytorder.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bytorder.h b/src/bytorder.h index cb8231e..2551950 100644 --- a/src/bytorder.h +++ b/src/bytorder.h @@ -2,13 +2,14 @@ # error Cannot define both ALF_LSB_FIRST and ALF_MSB_FIRST #endif +/* user defined one or the other in COPT, use it. */ #if defined(ALF_LSB_FIRST) || defined(ALF_MSB_FIRST) # define ALF_ENDIAN_OK #endif /* try to get the byte order on this platform. if we succeed, either ALF_LSB_FIRST or ALF_MSB_FIRST will - defined, and so will ALF_ENDIAN_OK. */ + be defined, and so will ALF_ENDIAN_OK. */ #ifndef ALF_ENDIAN_OK # if defined(__BYTE_ORDER__) @@ -24,12 +25,13 @@ # endif #endif +/* if the __BYTE_ORDER__ macro wasn't defined... */ #ifndef ALF_ENDIAN_OK -# if defined(__LITTLE_ENDIAN__) +# if defined(__LITTLE_ENDIAN__ || defined __LITTLE_ENDIAN || defined LITTLE_ENDIAN) # define ALF_LSB_FIRST # define ALF_ENDIAN_OK # else -# if defined(__BIG_ENDIAN__) +# if defined(__BIG_ENDIAN__ || defined __BIG_ENDIAN || defined BIG_ENDIAN) # define ALF_MSB_FIRST # define ALF_ENDIAN_OK # endif |
