0.3.0: converge relibc to upstream 0.6.0 + Red Bear patches

This commit is contained in:
2026-07-06 19:13:08 +03:00
parent 1a0edd8eeb
commit 4ef7e57571
1466 changed files with 75236 additions and 13644 deletions
+26
View File
@@ -0,0 +1,26 @@
#include <string.h>
#include <assert.h>
void test_stpcpy(const char *src, char *dest) {
char *end = stpcpy(dest, src);
assert(strcmp(dest, src) == 0);
assert(*end == '\0');
assert(end == dest + strlen(dest));
}
int main() {
char dest[20];
test_stpcpy("Hello, World!", dest);
// Test case 2: Empty string
test_stpcpy("", dest);
// Test case 3: String with special characters
test_stpcpy("Special chars: !@#$%^&*()", dest);
// Test case 4: String with spaces
test_stpcpy("A string with spaces", dest);
return 0;
}