On 12/21/2017 07:08 PM, Eric Blake wrote:

  #
+# @errno: int describing the error cause, provided for applications.
+#         (Note: while most errnos are posix compliant between OSs, it
+#         is possible some errno values can vary among different OSs.)
+#         (since 2.12)

The proof is in the pudding - if your documentation has to give this big disclaimer, then what you are adding is not portable and should not be added in that manner.

To follow up to myself, POSIX explicitly says that errno values are implementation dependent, and there is NO requirement that errno value 1 be EPERM, for example. And while qemu does not target GNU Hurd, that is a classic example of a system where errno values intentionally do not fit in 8 bits. So you can't argue that there are "POSIX-compliant errno values", because POSIX doesn't mandate specific values.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to