Commit 49c47ef0 authored by jan.koester's avatar jan.koester
Browse files

Merge branch 'gtk-desktop': string += and weak __atomic_* fixes

parents 0ce0f336 d0ff6b4c
Loading
Loading
Loading
Loading
+3 −1
Changes for include/cxx/string: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -1516,7 +1516,9 @@ public:
    /* Same real SFINAE-guard requirement as append(const Str&) above
     * (see its comment) -- an unconstrained version here would have
     * the exact same real raw-array-binding bug. */
    template<class Str>
    /* not for types with operator string_view(): their own operator+=
     * above takes them (both matched cmake's cmValue: ambiguous) */
    template<class Str, class = enable_if_t<!__string_detail::__sv_operator<Str>::value>>
    auto operator+=(const Str& s) -> decltype(append(s)) { return append(s); }

    bool starts_with(const char* s) const noexcept {
+4 −4
Changes for src/atomic.cpp: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -60,26 +60,26 @@ extern "C" {
#pragma redefine_extname __systempp_atomic_exchange __atomic_exchange
#pragma redefine_extname __systempp_atomic_compare_exchange __atomic_compare_exchange

__attribute__((visibility("default")))
__attribute__((visibility("default"), weak))
void __systempp_atomic_load(size_t size, void* src, void* dest, int) {
    atomic_guard g(src);
    memcpy(dest, src, size);
}

__attribute__((visibility("default")))
__attribute__((visibility("default"), weak))
void __systempp_atomic_store(size_t size, void* dest, void* src, int) {
    atomic_guard g(dest);
    memcpy(dest, src, size);
}

__attribute__((visibility("default")))
__attribute__((visibility("default"), weak))
void __systempp_atomic_exchange(size_t size, void* ptr, void* val, void* old, int) {
    atomic_guard g(ptr);
    memcpy(old, ptr, size);
    memcpy(ptr, val, size);
}

__attribute__((visibility("default")))
__attribute__((visibility("default"), weak))
bool __systempp_atomic_compare_exchange(size_t size, void* ptr, void* expected, void* desired, int, int) {
    atomic_guard g(ptr);
    if (memcmp(ptr, expected, size) == 0) {