hrev54629 adds 2 changesets to branch 'master'
old head: fb0391c28b8b6192ef63cd751c582bc1915f23e9
new head: e43fabeb86ad6d111793ee9452b134cb591bdc30
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=e43fabeb86ad+%5Efb0391c28b8b
----------------------------------------------------------------------------
64b46b706b02: headers: Adjust GCC2 stdbool to be usable by modern GCC.
musl's allocator needs to be built with GCC 8, but we need to link
it into GCC 2 libroot, which uses GCC 2 headers.
e43fabeb86ad: libroot: Add new method to musl atomic fallbacks.
It is used by musl's malloc.
[ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]
----------------------------------------------------------------------------
2 files changed, 19 insertions(+), 1 deletion(-)
headers/build/gcc-2.95.3/stdbool.h | 5 ++++-
src/system/libroot/posix/musl/internal/atomic.h | 15 +++++++++++++++
############################################################################
Commit: 64b46b706b02d969629415c9a44c394a2a5e4993
URL: https://git.haiku-os.org/haiku/commit/?id=64b46b706b02
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Sat Oct 10 20:36:59 2020 UTC
headers: Adjust GCC2 stdbool to be usable by modern GCC.
musl's allocator needs to be built with GCC 8, but we need to link
it into GCC 2 libroot, which uses GCC 2 headers.
----------------------------------------------------------------------------
diff --git a/headers/build/gcc-2.95.3/stdbool.h
b/headers/build/gcc-2.95.3/stdbool.h
index e19bcb1faa..0dbda02c3e 100644
--- a/headers/build/gcc-2.95.3/stdbool.h
+++ b/headers/build/gcc-2.95.3/stdbool.h
@@ -3,7 +3,10 @@
#define __STDBOOL_H__ 1
#if defined(__BEOS__) || defined(__HAIKU__)
- typedef unsigned char _Bool;
+ #if __GNUC__ < 3
+ typedef unsigned char _Bool;
+ #endif
+
#define bool _Bool
#define false 0
#define true 1
############################################################################
Revision: hrev54629
Commit: e43fabeb86ad6d111793ee9452b134cb591bdc30
URL: https://git.haiku-os.org/haiku/commit/?id=e43fabeb86ad
Author: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date: Sat Oct 10 20:38:33 2020 UTC
libroot: Add new method to musl atomic fallbacks.
It is used by musl's malloc.
----------------------------------------------------------------------------
diff --git a/src/system/libroot/posix/musl/internal/atomic.h
b/src/system/libroot/posix/musl/internal/atomic.h
index 25af829a04..808f135fe4 100644
--- a/src/system/libroot/posix/musl/internal/atomic.h
+++ b/src/system/libroot/posix/musl/internal/atomic.h
@@ -69,4 +69,19 @@ static inline int a_clz_64(uint64_t x)
}
#endif
+#ifndef a_clz_32
+#define a_clz_32 a_clz_32
+static inline int a_clz_32(uint32_t x)
+{
+ x >>= 1;
+ x |= x >> 1;
+ x |= x >> 2;
+ x |= x >> 4;
+ x |= x >> 8;
+ x |= x >> 16;
+ x++;
+ return 31-a_ctz_32(x);
+}
+#endif
+
#endif