Re-write of GNU getline, aiming for wide cross-platform implementation.