Commit graph

5 commits

Author SHA1 Message Date
Thomas Weißschuh
83b418c19c autotools: stop using AC_C_BIGENDIAN / WORDS_BIGENDIAN
This define is specific to autotools. Not defining the macro will lead
to silently miscompiled code as has happened with the meson build.

Instead use macros provided by the compiler itself. It does not need any
support from the buildsystem and is supported by both gcc and clang.

If a compiler does not support this feature we will get a loud error
instead of silent miscompilation.

Furthermore it probably better supports universal binaries on macOS
which compiles multiple architectures in a single build.
2022-10-14 22:00:48 +02:00
Karel Zak
4ff4b1106e lib/sha1: use proper WORDS_BIGENDIAN macro
The original code uses BYTE_ORDER, but we use WORDS_BIGENDIAN in
utl-linux.

Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-02 11:08:03 +01:00
Karel Zak
3ae2cb49d9 lib/sha1: fix indention
* indent -linux -psl -blf  lib/sha1.c
* manually fix comments

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-12 11:42:28 +01:00
Karel Zak
3bd55be742 lib/sha1: use ul_/UL_prefix for symbols
Unfortunately, the symbols are visible in statically compiled libuuid
and the names are too generic.

Addresses: https://github.com/karelzak/util-linux/issues/548
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-12 11:29:02 +01:00
Philip Prindeville
0047626887 libuuid: add support for hash-based UUIDs
Adding V3 and V5 UUIDs per RFC-4122.

[kzak@redhat.com: - fix symbols file]

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-09-05 11:26:39 +02:00