ソースを参照

LibC: Make EWOULDBLOCK an alias for EAGAIN

According to POSIX.1 all error codes have to be distinct - with
the exception for EAGAIN and EWOULDBLOCK. Other libcs including
eglibc and newlib define EWOULDBLOCK as an alias for EAGAIN and
some software including OpenTTD expect this behavior.
Gunnar Beutner 4 年 前
コミット
a9f488c55b

+ 2 - 2
Userland/Libraries/LibC/errno_numbers.h

@@ -133,8 +133,6 @@ enum ErrnoCode {
 #define ENOPROTOOPT ENOPROTOOPT
     ENOTCONN,
 #define ENOTCONN ENOTCONN
-    EWOULDBLOCK,
-#define EWOULDBLOCK EWOULDBLOCK
     EPROTONOSUPPORT,
 #define EPROTONOSUPPORT EPROTONOSUPPORT
     EDEADLK,
@@ -158,3 +156,5 @@ enum ErrnoCode {
     EMAXERRNO,
 #define EMAXERRNO EMAXERRNO
 };
+
+#define EWOULDBLOCK EAGAIN

+ 0 - 1
Userland/Libraries/LibC/string.cpp

@@ -338,7 +338,6 @@ const char* const sys_errlist[] = {
     "No message",
     "No protocol option",
     "Not connected",
-    "Operation would block",
     "Protocol not supported",
     "Resource deadlock would occur",
     "Timed out",