Bruno Haible extracted the code from libunistdio.