Hi Reuben, > >> Is there no way to deal with error messages normally, i.e. via > >> gnulib's strerror? Then the error-returning copy_file_preserving could > >> replace the aborting version, and users who want to could check the > >> return code and issue errors in the usual way. > > > > This would be a regression on the quality of the messages. There is no > > errno code for "cannot open backup file for writing". > > That's why I said "gnulib's strerror": by using a gnulib function it's > possible to add new error messages.
errno describes _what_ error occurred. The error message also contains information about _when_ it occurred. That is, a situation indicator. But strerror takes only 1 argument, not 2. > > (Remember that assert() is eliminated if NDEBUG is not defined.) > > Surely you mean "if NDEBUG is defined"? Although why would one be > running the tests with NDEBUG defined? Sure, yes, I meant the negation. It is not under gnulib's control whether NDEBUG is defined or not. The user who installs a package can do ./configure CPPFLAGS="-DNDEBUG" > Thanks very much for the review. New patch attached. Thank you. I'll merge it after my additional refactorings have been reviewed. Bruno