Then, since these functions are pretty OS independent, you could take their glibc implementation,
And, if we can keep the source file identical between libc and gnulib, then we can keep it automatically in sync. Though we are doing less and less of that these days :(. karl