On 05/20/2011 05:21 PM, Eric Blake wrote: > But both errors are allowed by POSIX, and we have the case that glibc's > __xpg_strerror_r favors EINVAL while cygwin's _xpg_strerror_r favors > ERANGE. The testsuite tests for both codes, because there is no > heirarchy in POSIX on which error code if more than one error code > simultaneously applies.
One more point - if http://austingroupbugs.net/view.php?id=398 is approved, then ERANGE will be changed to a shall fail while EINVAL remains only a may fail (right now, both errors are only a 'may fail', but we are doing users a disservice by truncating without an error). In my mind, a 'shall fail' tends to have higher priority than a 'may fail', even when both situations apply. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature