The values of EOPNOTSUPP and ENOTSUP must be different according to SUSv3,
whereas in glibc they are the same.
Steps to Reproduce:
0. Create a source file including a switch statement with both EOPNOTSUPP and
ENOTSUP as case values.
1. Attempt to compile said file.
2. Scream in frustration.
gcc complains about duplicate case values because the two errors are the same.
gcc doesn't complain because there is no syntax error.
Build Date and Platform:
Debian GNU/Linux i386/sid, using libc6 2.3.6-1.
Additional Builds and Platforms:
- Also Occurs On:
Debian GNU/Linux powerpc/sid, using libc6 2.3.6-1.
Tell this to the kernel people once you finish your time machine and go back to
1991. This is part of the ABI.
If this is part of the ABI, then the ABI is broken. Just because things have
always been one way does not mean that way is right, or even acceptable; an
argument from tradition is a logical fallacy.
Currently glibc claims to support SUSv3, by setting _POSIX_VERSION to 200112L.
If it is not your intention to fix this, then please don't lie to the programmer
and tell them you support a standard which you do not.
Stop reopening this bug. Not only is this fixed by the ABI, this also has
nothing to do with the libc as the kernel defines the error numbers.
Just leaving a note about the bug: this topic was discussed at opengroup, see
ENOTSUP and EOPNOTSUPP may then be equal.
Created attachment 11380 [details]
document the equality
Please consider at least documenting the issue, as done for EAGAIN and EWOULDBLOCK.
The patch is not correct as written because the values of EOPNOTSUPP and ENOTSUP are distinct on Hurd.
(And please post patches to the libc-alpha mailing list.)
Created attachment 11383 [details]
let doc say that ENOTSUP==EOPNOTSUPP on linux
Is this modified patch more correct?
Created attachment 11962 [details]
corrections from Carlos O'Donell on email@example.com