Fix in UnixOperatingSystem: EOPNOTSUPP and ENOTSUP may have the same value jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 10 Apr 2015 08:38:29 +0100
branchjv
changeset 18204 ddd56773b824
parent 18203 0a1284c0275f
child 18209 15ddde9ccd3d
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.
UnixOperatingSystem.st
--- 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