0.3.0: converge relibc to upstream 0.6.0 + Red Bear patches
This commit is contained in:
@@ -16,4 +16,14 @@ int main(void) {
|
||||
dst[19] = 0;
|
||||
strncpy(dst, "strncpy should work here too", 10);
|
||||
puts(dst);
|
||||
|
||||
// The string should be properly terminated regardless
|
||||
char ndst[28];
|
||||
|
||||
size_t r = strlcpy(ndst, "strlcpy works!", 28);
|
||||
puts(ndst);
|
||||
printf("copied %lu\n", r);
|
||||
r = strlcat(ndst, " and strlcat!", 28);
|
||||
puts(ndst);
|
||||
printf("copied %lu\n", r);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user