POSIX requires that getdelim and getline set the error indicator on the stream when an error occured, in addition to setting errno.