Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist/libiberty clang does not like the c-l...



details:   https://anonhg.NetBSD.org/src/rev/ce090d749c95
branches:  trunk
changeset: 324070:ce090d749c95
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jul 14 23:42:23 2018 +0000

description:
clang does not like the c-like definition of alignof

diffstat:

 external/gpl3/gcc/dist/libiberty/sha1.c |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 7668a08552fb -r ce090d749c95 external/gpl3/gcc/dist/libiberty/sha1.c
--- a/external/gpl3/gcc/dist/libiberty/sha1.c   Sat Jul 14 23:41:43 2018 +0000
+++ b/external/gpl3/gcc/dist/libiberty/sha1.c   Sat Jul 14 23:42:23 2018 +0000
@@ -230,7 +230,11 @@
   if (len >= 64)
     {
 #if !_STRING_ARCH_unaligned
+# ifdef __clang__
+# define alignof(type) __alignof__(type)
+# else
 # define alignof(type) offsetof (struct { char c; type x; }, x)
+# endif
 # define UNALIGNED_P(p) (((size_t) p) % alignof (sha1_uint32) != 0)
       if (UNALIGNED_P (buffer))
        while (len > 64)



Home | Main Index | Thread Index | Old Index