The code defines a macro blk0(i) based on the preprocessor condition BYTE_ORDER == LITTLE_ENDIAN. If true, blk0(i) is defined as a byte swap operation. Unfortunately, if the preprocessor macros used in the test are no defined, then the comparison becomes 0 == 0 and it evaluates as true. --- src/util/sha1/sha1.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/src/util/sha1/sha1.c b/src/util/sha1/sha1.c index ef59ea1dfc..2c629520c3 100644 --- a/src/util/sha1/sha1.c +++ b/src/util/sha1/sha1.c @@ -16,8 +16,17 @@ #include <stdint.h> #include <string.h> +#include "u_endian.h" #include "sha1.h" +#ifndef BYTE_ORDER +#error BYTE_ORDER not defined +#endif + +#ifndef LITTLE_ENDIAN +#error LITTLE_ENDIAN no defined +#endif + #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) /* -- 2.13.6 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
