Fix in UnixOperatingSystem: EOPNOTSUPP and ENOTSUP may have the same value
...on some systems (Linux is one of them). See https://sourceware.org/bugzilla/show_bug.cgi?id=2363
for details.
To avoid duplicate cases in a switch, compile the latter conditionally only if
value differ.
--- a/UnixOperatingSystem.st Fri Apr 10 08:34:49 2015 +0100
+++ b/UnixOperatingSystem.st Fri Apr 10 08:38:29 2015 +0100
@@ -2203,11 +2203,14 @@
break;
#endif
#ifdef ENOTSUP
+/* See https://sourceware.org/bugzilla/show_bug.cgi?id=2363 */
+# if ENOTSUP != EOPNOTSUPP
case ENOTSUP:
sym = @symbol(ENOTSUP);
typ = @symbol(inappropriateOperationSignal);
break;
#endif
+#endif
#ifdef ESPIPE
case ESPIPE:
sym = @symbol(ESPIPE);
@@ -2635,9 +2638,12 @@
#endif
#ifdef ENOTSUP
+/* See https://sourceware.org/bugzilla/show_bug.cgi?id=2363 */
+# if ENOTSUP != EOPNOTSUPP
if (sym == @symbol(ENOTSUP)) {
RETURN ( __mkSmallInteger(ENOTSUP) );
}
+# endif
#endif
#ifdef EBADF