diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2023-02-22 23:24:54 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2023-02-22 23:24:54 +0000 |
commit | cc4ac997a0da6ea60e23ffb5f8c9361a3eebef32 (patch) | |
tree | 92a3dc394d918ad555151f721b8adceb9e8722ec /sys/man/1/cpp | |
parent | acf50236c16a9777d648cfa628d0cfedb958f1bc (diff) |
libc: fix strchr() for little endian mips (thanks adventuresin9)
adventuresin9 wrote:
I finally found the time to get the kernel working for the Mediatek
mt7688. Just the uart works now, so I still need to do the ethernet
and hopefully wifi and other stuff. But it boots all the way to the
bootargs ask, and then running !rc lets you run rc in paqfs.
https://github.com/adventuresin9/9front-mt7688
I had a heck of a time getting it to work at first, till I tracked
down an issue in strlen, that comes from the strchr code. Lots of
stuff broke, and this bug also meant error messages wouldn't print
properly.
running this on the mt7688;
int n1, n2, n3, n4, n5, n6;
char *a1, *a2, *a3, *a4, *a5, *a6;
a1 = "\0";
a2 = "A";
a3 = "AA";
a4 = "AAA";
a5 = "AAAA";
a6 = "AAAAA";
n1 = strlen(a1);
n2 = strlen(a2);
n3 = strlen(a3);
n4 = strlen(a4);
n5 = strlen(a5);
n6 = strlen(a6);
iprint("STRLEN %d %d %d %d %d %d\n", n1, n2, n3, n4, n5, n6);
would get ;
STRLEN 0 1 1 2 1 6
and now it gets;
STRLEN 0 1 2 3 4 5
Diffstat (limited to 'sys/man/1/cpp')
0 files changed, 0 insertions, 0 deletions