musl-wcsnrtombs.c is already part of musl 1.2.3 as wcsnrtombs.c file, so remove it

This commit is contained in:
PktSurf 2022-09-27 08:47:55 +05:30
parent c56c7ed62b
commit ff82a35164
2 changed files with 2 additions and 41 deletions

View file

@ -1,35 +0,0 @@
#include <wchar.h>
#include <limits.h>
#include <string.h>
size_t wcsnrtombs(char *restrict dst, const wchar_t **restrict wcs, size_t wn, size_t n, mbstate_t *restrict st)
{
const wchar_t *ws = *wcs;
size_t cnt = 0;
if (!dst) n=0;
while (ws && wn) {
char tmp[MB_LEN_MAX];
size_t l = wcrtomb(n<MB_LEN_MAX ? tmp : dst, *ws, 0);
if (l==-1) {
cnt = -1;
break;
}
if (dst) {
if (n<MB_LEN_MAX) {
if (l>n) break;
memcpy(dst, tmp, l);
}
dst += l;
n -= l;
}
if (!*ws) {
ws = 0;
break;
}
ws++;
wn--;
cnt += l;
}
if (dst) *wcs = ws;
return cnt;
}

View file

@ -1,6 +1,6 @@
app=musl
version=1.2.3
build=1sml
build=2sml
homepage="http://www.musl-libc.org/"
download="https://musl.libc.org/releases/musl-$version.tar.gz"
desc="Simple, fast and POSIX-compliant C library"
@ -15,9 +15,6 @@ build() {
cd $app-$version
fixbuilddirpermissions
# Thanks sabotage
cp $srcdir/musl-wcsnrtombs.c src/multibyte/wcsnrtombs.c
./configure \
--prefix=""
@ -54,10 +51,9 @@ sha512sums="
0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d getconf.c
378d70e65bcc65bb4e1415354cecfa54b0c1146dfb24474b69e418cdbf7ad730472cd09f6f103e1c99ba6c324c9560bccdf287f5889bbc3ef0bdf0e08da47413 getent.c
9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf iconv.c
fb9ee91cf8fd6330727b67fee8f4f7c4e603839c5cbd8fa9e838bf2f5f68558119d0535de54643d56ddbc2ac5dcd38878818e91da7c6dd15c10422c84270d2ef musl-wcsnrtombs.c
3af049adb95230efab7e71964e9cb4a5a4d6b4a10adec43e1540fc2a10dbc77ed96511bc862c2f13deb6d599298d3ec2610ad0107898f6105ba4705f973737db asm.hwcap.h
8c3fddd73b696a38e633953715c79c47703739be27ee085fc6c960a57b6746ca05bf6406f7e6126cc1a13204254fd5830afb566624e1f298f4d6b58216013c28 cdefs.h
19cec4d39310285eb49ad1beae86884080e0152f9477757513050211b31f95ee7283a64ae95939683df09231cfb021ace816b26981ad05f4fff0a39519f935fe queue.h
cd57bec6b2462b08b54dcfc6ba37e1d5289fcdd9463f22ea091679aa8006e24d89c9d57637c0e7a5bfbf02d06e93aa4cb3c0d066400aa1b698a8ae66a9cb7b8e stab.h
07cb70f2f0ddb31e23dd913c6f561fc9885667c5803fdf3a559676c99d08834b4104589bacb5d17b4a0b379c68c81a1cf3173832b3da33a7b936fa7b93706844 tree.h
"
"