Displaying 3 results from an estimated 3 matches for "c7ca531f".
2020 Jul 25
0
[klibc:master] tests: Add a trivial test for sysconf()
...2:46:16 +0100
Committer:  Ben Hutchings <ben at decadent.org.uk>
CommitDate: Sat, 25 Jul 2020 22:46:16 +0100
[klibc] tests: Add a trivial test for sysconf()
---
 usr/klibc/tests/Kbuild | 1 +
 1 file changed, 1 insertion(+)
diff --git a/usr/klibc/tests/Kbuild b/usr/klibc/tests/Kbuild
index c7ca531f..00b701fc 100644
--- a/usr/klibc/tests/Kbuild
+++ b/usr/klibc/tests/Kbuild
@@ -45,6 +45,7 @@ stdio.shared-y		:= stdio.o
 strlcpycat.shared-y	:= strlcpycat.o
 strtoimax.shared-y	:= strtoimax.o
 strtotime.shared-y	:= strtotime.o
+sysconf.shared-y	:= sysconf.o
 testrand48.shared-y	:= testrand48.o
 tes...
2020 Jul 25
0
[klibc:master] tests: Add a trivial test for sysconf()
...[klibc] tests: Add a trivial test for sysconf()
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
 usr/klibc/tests/Kbuild    |  1 +
 usr/klibc/tests/sysconf.c | 14 ++++++++++++++
 2 files changed, 15 insertions(+)
diff --git a/usr/klibc/tests/Kbuild b/usr/klibc/tests/Kbuild
index c7ca531f..00b701fc 100644
--- a/usr/klibc/tests/Kbuild
+++ b/usr/klibc/tests/Kbuild
@@ -45,6 +45,7 @@ stdio.shared-y		:= stdio.o
 strlcpycat.shared-y	:= strlcpycat.o
 strtoimax.shared-y	:= strtoimax.o
 strtotime.shared-y	:= strtotime.o
+sysconf.shared-y	:= sysconf.o
 testrand48.shared-y	:= testrand48.o
 tes...
2020 Mar 28
0
[klibc:update-dash] Implement stpcpy() and stpncpy()
...t;string.h>
+
+char *stpncpy(char *dst, const char *src, size_t n)
+{
+	char *end;
+	char ch;
+
+	while (n) {
+		ch = *src++;
+		if (!ch)
+			break;
+		n--;
+		*dst++ = ch;
+	}
+
+	end = dst;
+	memset(dst, 0, n);
+	return end;
+}
diff --git a/usr/klibc/tests/Kbuild b/usr/klibc/tests/Kbuild
index c7ca531f..50e38160 100644
--- a/usr/klibc/tests/Kbuild
+++ b/usr/klibc/tests/Kbuild
@@ -42,6 +42,7 @@ sscanf.shared-y		:= sscanf.o
 stat.shared-y		:= stat.o
 statfs.shared-y		:= statfs.o
 stdio.shared-y		:= stdio.o
+stpcpy.shared-y		:= stpcpy.o
 strlcpycat.shared-y	:= strlcpycat.o
 strtoimax.shared-y	:= str...