diff options
author | Alejandro Colomar <alx@kernel.org> | 2022-12-30 00:57:25 +0100 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2022-12-30 00:57:25 +0100 |
commit | dcb50bc1522adc678034aa61c29f737b1556942d (patch) | |
tree | ca511164d13c2300c3f8181ed0504c311eb56249 | |
parent | 1e2f02918698564b32663f83dc6dcb2c01e695bb (diff) |
Add dependency on libc-branch
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r-- | include/c/str/cpy/stp/_compiler.h | 29 | ||||
-rw-r--r-- | include/c/str/cpy/stp/stp/ustr2stp.h | 1 | ||||
-rw-r--r-- | include/c/str/cpy/stp/stp/zustr2stp.h | 1 | ||||
-rw-r--r-- | include/c/str/cpy/stp/stpe/stpecpy.h | 3 | ||||
-rw-r--r-- | include/c/str/cpy/stp/stpe/stpeprintf.h | 3 | ||||
-rw-r--r-- | include/c/str/cpy/stp/ustp/ustpcpy.h | 1 | ||||
-rw-r--r-- | include/c/str/cpy/stp/ustp/zustr2ustp.h | 1 | ||||
-rw-r--r-- | share/pkgconfig/libc-str-cpy-stp-uninstalled.pc | 2 | ||||
-rw-r--r-- | src/c/str/cpy/stp/_compiler.c | 5 |
9 files changed, 5 insertions, 41 deletions
diff --git a/include/c/str/cpy/stp/_compiler.h b/include/c/str/cpy/stp/_compiler.h deleted file mode 100644 index 197489b..0000000 --- a/include/c/str/cpy/stp/_compiler.h +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright 2022 Alejandro Colomar <alx@kernel.org> -// SPDX-License-Identifier: LGPL-3.0-or-later WITH LGPL-3.0-linking-exception - - -#ifndef INCLUDE_C_STR_CPY_STP__COMPILER_H_ -#define INCLUDE_C_STR_CPY_STP__COMPILER_H_ - - -#if (__STDC_VERSION__ < 202000L) -# warn "Minimum C version is C23" -#endif - - -#define c_impossible(e) do \ -{ \ - if (e) \ - c_unreachable(); \ -} while (0) - -#define c_unlikely(e) __builtin_expect(!!(e), 0) - -#if defined(unreachable) -# define c_unreachable() unreachable() -#else -# define c_unreachable() __builtin_unreachable() -#endif - - -#endif // Header guard diff --git a/include/c/str/cpy/stp/stp/ustr2stp.h b/include/c/str/cpy/stp/stp/ustr2stp.h index 9c8b21f..53cb3b4 100644 --- a/include/c/str/cpy/stp/stp/ustr2stp.h +++ b/include/c/str/cpy/stp/stp/ustr2stp.h @@ -8,7 +8,6 @@ #include <stddef.h> -#include <c/str/cpy/stp/_compiler.h> // IWYU pragma: keep #include <c/str/cpy/stp/ustp/ustpcpy.h> diff --git a/include/c/str/cpy/stp/stp/zustr2stp.h b/include/c/str/cpy/stp/stp/zustr2stp.h index f055dd6..2806e2d 100644 --- a/include/c/str/cpy/stp/stp/zustr2stp.h +++ b/include/c/str/cpy/stp/stp/zustr2stp.h @@ -8,7 +8,6 @@ #include <stddef.h> -#include <c/str/cpy/stp/_compiler.h> // IWYU pragma: keep #include <c/str/cpy/stp/ustp/zustr2ustp.h> diff --git a/include/c/str/cpy/stp/stpe/stpecpy.h b/include/c/str/cpy/stp/stpe/stpecpy.h index f557399..c09a7ab 100644 --- a/include/c/str/cpy/stp/stpe/stpecpy.h +++ b/include/c/str/cpy/stp/stpe/stpecpy.h @@ -9,9 +9,10 @@ #include <stdbool.h> #include <stddef.h> +#include <c/branch/likely.h> +#include <c/branch/unreachable.h> #include <c/mem/cpy/mempcpy.h> #include <c/qual/nullable/nullable.h> -#include <c/str/cpy/stp/_compiler.h> #include <c/str/len/strlen.h> diff --git a/include/c/str/cpy/stp/stpe/stpeprintf.h b/include/c/str/cpy/stp/stpe/stpeprintf.h index 218f205..c46119c 100644 --- a/include/c/str/cpy/stp/stpe/stpeprintf.h +++ b/include/c/str/cpy/stp/stpe/stpeprintf.h @@ -9,8 +9,9 @@ #include <stdarg.h> #include <stdio.h> +#include <c/branch/likely.h> +#include <c/branch/unreachable.h> #include <c/qual/nullable/nullable.h> -#include <c/str/cpy/stp/_compiler.h> #pragma clang assume_nonnull begin diff --git a/include/c/str/cpy/stp/ustp/ustpcpy.h b/include/c/str/cpy/stp/ustp/ustpcpy.h index 610b36e..8207a54 100644 --- a/include/c/str/cpy/stp/ustp/ustpcpy.h +++ b/include/c/str/cpy/stp/ustp/ustpcpy.h @@ -9,7 +9,6 @@ #include <stddef.h> #include <c/mem/cpy/mempcpy.h> -#include <c/str/cpy/stp/_compiler.h> // IWYU pragma: keep #pragma clang assume_nonnull begin diff --git a/include/c/str/cpy/stp/ustp/zustr2ustp.h b/include/c/str/cpy/stp/ustp/zustr2ustp.h index 1f33750..0d583d8 100644 --- a/include/c/str/cpy/stp/ustp/zustr2ustp.h +++ b/include/c/str/cpy/stp/ustp/zustr2ustp.h @@ -8,7 +8,6 @@ #include <stddef.h> -#include <c/str/cpy/stp/_compiler.h> // IWYU pragma: keep #include <c/str/cpy/stp/ustp/ustpcpy.h> #include <c/str/len/strlen.h> diff --git a/share/pkgconfig/libc-str-cpy-stp-uninstalled.pc b/share/pkgconfig/libc-str-cpy-stp-uninstalled.pc index 2e9431a..9866ee8 100644 --- a/share/pkgconfig/libc-str-cpy-stp-uninstalled.pc +++ b/share/pkgconfig/libc-str-cpy-stp-uninstalled.pc @@ -2,7 +2,7 @@ Name: libc-str-cpy-stp Description: stp string library URL: http://www.alejandro-colomar.es/src/alx/alx/libc-stp.git Version: <version> -Requires: libc-mem libc-qual libc-str-len +Requires: libc-branch libc-mem libc-qual libc-str-len Requires.private: prefix=/usr/local diff --git a/src/c/str/cpy/stp/_compiler.c b/src/c/str/cpy/stp/_compiler.c deleted file mode 100644 index 5ede2f4..0000000 --- a/src/c/str/cpy/stp/_compiler.c +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright 2022 Alejandro Colomar <alx@kernel.org> -// SPDX-License-Identifier: LGPL-3.0-or-later WITH LGPL-3.0-linking-exception - - -#include <c/str/cpy/stp/_compiler.h> |