Skip to content

Commit 5a0c067

Browse files
committed
Define struct and consts for notbsds
Linux-likes have more locale categories than the BSDs (except for musl). We define the common set of categories at the src/unix/notbsd/mod.rs level, and leave the rest to the platform-specific modules.
1 parent 0dc7176 commit 5a0c067

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

src/unix/notbsd/android/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,13 @@ pub const SIG_UNBLOCK: ::c_int = 0x01;
302302

303303
pub const RUSAGE_CHILDREN: ::c_int = -1;
304304

305+
pub const LC_PAPER: ::c_int = 7;
306+
pub const LC_NAME: ::c_int = 8;
307+
pub const LC_ADDRESS: ::c_int = 9;
308+
pub const LC_TELEPHONE: ::c_int = 10;
309+
pub const LC_MEASUREMENT: ::c_int = 11;
310+
pub const LC_IDENTIFICATION: ::c_int = 12;
311+
305312
pub const MAP_ANON: ::c_int = 0x0020;
306313
pub const MAP_ANONYMOUS: ::c_int = 0x0020;
307314
pub const MAP_GROWSDOWN: ::c_int = 0x0100;

src/unix/notbsd/linux/mips.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,13 @@ pub const EOWNERDEAD: ::c_int = 165;
294294
pub const ENOTRECOVERABLE: ::c_int = 166;
295295
pub const ERFKILL: ::c_int = 167;
296296

297+
pub const LC_PAPER: ::c_int = 7;
298+
pub const LC_NAME: ::c_int = 8;
299+
pub const LC_ADDRESS: ::c_int = 9;
300+
pub const LC_TELEPHONE: ::c_int = 10;
301+
pub const LC_MEASUREMENT: ::c_int = 11;
302+
pub const LC_IDENTIFICATION: ::c_int = 12;
303+
297304
pub const MAP_NORESERVE: ::c_int = 0x400;
298305
pub const MAP_ANON: ::c_int = 0x800;
299306
pub const MAP_ANONYMOUS: ::c_int = 0x800;

src/unix/notbsd/linux/other/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@ pub const O_FSYNC: ::c_int = 0x101000;
143143

144144
pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK;
145145

146+
pub const LC_PAPER: ::c_int = 7;
147+
pub const LC_NAME: ::c_int = 8;
148+
pub const LC_ADDRESS: ::c_int = 9;
149+
pub const LC_TELEPHONE: ::c_int = 10;
150+
pub const LC_MEASUREMENT: ::c_int = 11;
151+
pub const LC_IDENTIFICATION: ::c_int = 12;
152+
146153
pub const MAP_ANON: ::c_int = 0x0020;
147154
pub const MAP_ANONYMOUS: ::c_int = 0x0020;
148155
pub const MAP_GROWSDOWN: ::c_int = 0x0100;

src/unix/notbsd/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,6 @@ pub const LC_COLLATE: ::c_int = 3;
278278
pub const LC_MONETARY: ::c_int = 4;
279279
pub const LC_MESSAGES: ::c_int = 5;
280280
pub const LC_ALL: ::c_int = 6;
281-
pub const LC_PAPER: ::c_int = 7;
282-
pub const LC_NAME: ::c_int = 8;
283-
pub const LC_ADDRESS: ::c_int = 9;
284-
pub const LC_TELEPHONE: ::c_int = 10;
285-
pub const LC_MEASUREMENT: ::c_int = 11;
286-
pub const LC_IDENTIFICATION: ::c_int = 12;
287281

288282
pub const MAP_FILE: ::c_int = 0x0000;
289283
pub const MAP_SHARED: ::c_int = 0x0001;

0 commit comments

Comments
 (0)