Here's a patch that adds private implementations of strndup and getline. They are unconditionally compiled so that compiler errors in these functions can be detected on any platform, even those that provide strndup and getline in the standard library. I'll have a patch that handles the strndup/getline detection later today (I've already done it in SCons, just need to figure out how I want to do it in plain shell for the current configure script).