summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2022-12-30 00:28:37 +0100
committerAlejandro Colomar <alx@kernel.org>2022-12-30 00:28:37 +0100
commitcadfa2723eabb8e54b5aa5fd294c95c02eea3679 (patch)
tree703865aca636f721e4baa7e5d3ff3f53f8e7d611
parentf804a1f832d544c80e8de12283d118b2d8fe940c (diff)
Add dependency on libc-str-len
Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--include/c/str/cpy/stp/stpe/stpecpy.h4
-rw-r--r--include/c/str/cpy/stp/ustp/zustr2ustp.h4
-rw-r--r--share/pkgconfig/libc-str-cpy-stp-uninstalled.pc2
3 files changed, 5 insertions, 5 deletions
diff --git a/include/c/str/cpy/stp/stpe/stpecpy.h b/include/c/str/cpy/stp/stpe/stpecpy.h
index 94750a7..d6506e3 100644
--- a/include/c/str/cpy/stp/stpe/stpecpy.h
+++ b/include/c/str/cpy/stp/stpe/stpecpy.h
@@ -8,10 +8,10 @@
#include <stdbool.h>
#include <stddef.h>
-#include <string.h>
#include <c/mem/cpy/mempcpy.h>
#include <c/str/cpy/stp/_compiler.h>
+#include <c/str/len/strlen.h>
#pragma clang assume_nonnull begin
@@ -32,7 +32,7 @@ c_stpecpy(char *c_nullable dst, char *end, const char *restrict src)
c_impossible(dst > end);
dsize = end - dst;
- slen = strnlen(src, dsize);
+ slen = c_strnlen(src, dsize);
trunc = (slen == dsize);
dlen = slen - trunc;
dst[dlen] = '\0';
diff --git a/include/c/str/cpy/stp/ustp/zustr2ustp.h b/include/c/str/cpy/stp/ustp/zustr2ustp.h
index 28aefd8..1f33750 100644
--- a/include/c/str/cpy/stp/ustp/zustr2ustp.h
+++ b/include/c/str/cpy/stp/ustp/zustr2ustp.h
@@ -7,10 +7,10 @@
#include <stddef.h>
-#include <string.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>
#pragma clang assume_nonnull begin
@@ -21,7 +21,7 @@ inline char *c_zustr2ustp(char *restrict dst, const char *restrict src,
inline char *
c_zustr2ustp(char *restrict dst, const char *restrict src, size_t sz)
{
- return c_ustpcpy(dst, src, strnlen(src, sz));
+ return c_ustpcpy(dst, src, c_strnlen(src, sz));
}
#pragma clang assume_nonnull end
diff --git a/share/pkgconfig/libc-str-cpy-stp-uninstalled.pc b/share/pkgconfig/libc-str-cpy-stp-uninstalled.pc
index 29c036c..5a2e9e1 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
+Requires: libc-mem libc-str-len
Requires.private:
prefix=/usr/local