qtbase: remove redundant open_memstream stub (relibc provides it)
The qtbase recipe's strtold_cpp_compat.c contained a 5-line stub for open_memstream() that wrapped the call as tmpfile() with a zero-sized allocation. This was a workaround for relibc not implementing open_memstream. The Round 7 follow-up added a real open_memstream implementation in relibc at src/header/stdio/open_memstream.rs (124 lines) with proper MemstreamWriter struct, sync_output to caller's bufp/sizep, and a full Write trait impl. Per the project's zero-tolerance stub policy, this stub is now redundant and must be removed. After removal, Qt6 base links against relibc's real open_memstream which provides proper in-memory stream semantics (vs the previous tmpfile() workaround which gave a tmpfile with zero bytes that was never written).
This commit is contained in:
@@ -97,15 +97,6 @@ long double relibc_compat_cpp_strtold(const char *nptr, char **endptr)
|
||||
long double relibc_compat_cpp_strtold(const char *nptr, char **endptr) {
|
||||
return strtold(nptr, endptr);
|
||||
}
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
FILE *open_memstream(char **ptr, size_t *sizeloc) {
|
||||
*ptr = calloc(1, 1);
|
||||
*sizeloc = 0;
|
||||
return tmpfile();
|
||||
}
|
||||
EOF
|
||||
"${GNU_TARGET}-gcc" \
|
||||
--sysroot="${COOKBOOK_SYSROOT}" \
|
||||
|
||||
Reference in New Issue
Block a user