Perhaps the glibc implementation could be simplified a bit, but by the sounds of things musl's version is not functionally equivalent, it only supports ASCII?
The classic glibc int nonsense with the isXXX() checks, and their unchecked array access. This comes up every 2nd week or so, and they refuse to fix it.