Reuben Thomas wrote: > > errno describes _what_ error occurred. The error message also contains > > information about _when_ it occurred. > > Actually, the error codes returned by qcopy_file_preserving contain > all the information about when the error occurred, as you can see in > copy_file_preserving.
Yes, therefore a separate error-signalling function would have to take 2 arguments (ret, errno), not just one argument (errno) like strerror. > I was thinking that a gnulib strerror could add support for these error > messages without the need for extra functions like > copy_file_preserving Gnulib's <errno.h> and strerror() function are meant to be as close to the POSIX definition of these APIs. We don't want to add random error codes to them, just because 1 module out of 900 modules could make use of it. Bruno