Skip to content

Commit 59204ee

Browse files
authored
Merge pull request #4507 from xingxue-ibm/use-unique-errno-values
Use unique errno values for AIX
2 parents 23ec4bb + fa6a299 commit 59204ee

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

libc-test/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5571,6 +5571,11 @@ fn test_aix(target: &str) {
55715571
// Skip 'sighandler_t' assignments.
55725572
"SIG_DFL" | "SIG_ERR" | "SIG_IGN" => true,
55735573

5574+
// _ALL_SOURCE defines these errno values as aliases of other errno
5575+
// values, but POSIX requires each errno to be unique. Skip these
5576+
// values because non-unique values are being used which will
5577+
// fail the test when _ALL_SOURCE is defined.
5578+
"EWOULDBLOCK" | "ENOTEMPTY" => true,
55745579
_ => false,
55755580
});
55765581

libc-test/semver/aix.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,11 @@ ECHOKE
253253
ECHONL
254254
ECHOPRT
255255
ECHRNG
256-
ECLONEME
257256
ECONNABORTED
258257
ECONNREFUSED
259258
ECONNRESET
260259
ECORRUPT
261260
EDEADLK
262-
EDESTADDREQ
263261
EDESTADDRREQ
264262
EDIST
265263
EDOM

src/unix/aix/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,12 +1263,11 @@ pub const ENOLCK: c_int = 49;
12631263
pub const ENOCONNECT: c_int = 50;
12641264
pub const ESTALE: c_int = 52;
12651265
pub const EDIST: c_int = 53;
1266-
pub const EWOULDBLOCK: c_int = EAGAIN;
1266+
pub const EWOULDBLOCK: c_int = 54;
12671267
pub const EINPROGRESS: c_int = 55;
12681268
pub const EALREADY: c_int = 56;
12691269
pub const ENOTSOCK: c_int = 57;
12701270
pub const EDESTADDRREQ: c_int = 58;
1271-
pub const EDESTADDREQ: c_int = EDESTADDRREQ;
12721271
pub const EMSGSIZE: c_int = 59;
12731272
pub const EPROTOTYPE: c_int = 60;
12741273
pub const ENOPROTOOPT: c_int = 61;
@@ -1297,7 +1296,7 @@ pub const EPROCLIM: c_int = 83;
12971296
pub const EUSERS: c_int = 84;
12981297
pub const ELOOP: c_int = 85;
12991298
pub const ENAMETOOLONG: c_int = 86;
1300-
pub const ENOTEMPTY: c_int = EEXIST;
1299+
pub const ENOTEMPTY: c_int = 87;
13011300
pub const EDQUOT: c_int = 88;
13021301
pub const ECORRUPT: c_int = 89;
13031302
pub const ESYSERROR: c_int = 90;
@@ -1320,7 +1319,6 @@ pub const EBADMSG: c_int = 120;
13201319
pub const EPROTO: c_int = 121;
13211320
pub const ENODATA: c_int = 122;
13221321
pub const ENOSTR: c_int = 123;
1323-
pub const ECLONEME: c_int = ERESTART;
13241322
pub const ENOTSUP: c_int = 124;
13251323
pub const EMULTIHOP: c_int = 125;
13261324
pub const ENOLINK: c_int = 126;

0 commit comments

Comments
 (0)