Skip to content

Commit eddedde

Browse files
committed
feat: move NT_XXX constants defined in elf.h to linux/mod.rs
1 parent 4b1bcc7 commit eddedde

File tree

6 files changed

+36
-47
lines changed

6 files changed

+36
-47
lines changed

libc-test/semver/linux-gnu.txt

-17
Original file line numberDiff line numberDiff line change
@@ -337,23 +337,6 @@ NFT_USERDATA_MAXLEN
337337
NF_NETDEV_INGRESS
338338
NF_NETDEV_NUMHOOKS
339339
NILFS_SUPER_MAGIC
340-
NT_PRSTATUS
341-
NT_PRFPREG
342-
NT_FPREGSET
343-
NT_PRPSINFO
344-
NT_PRXREG
345-
NT_TASKSTRUCT
346-
NT_PLATFORM
347-
NT_AUXV
348-
NT_GWINDOWS
349-
NT_ASRS
350-
NT_PSTATUS
351-
NT_PSINFO
352-
NT_PRCRED
353-
NT_UTSNAME
354-
NT_LWPSTATUS
355-
NT_LWPSINFO
356-
NT_PRFPXREG
357340
NTF_EXT_LEARNED
358341
NTF_MASTER
359342
NTF_OFFLOADED

libc-test/semver/linux-musl.txt

-5
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,3 @@ reallocarray
9393
setutxent
9494
tcp_info
9595
timex
96-
NT_PRSTATUS
97-
NT_PRFPREG
98-
NT_PRPSINFO
99-
NT_TASKSTRUCT
100-
NT_AUXV

libc-test/semver/linux.txt

+17
Original file line numberDiff line numberDiff line change
@@ -4008,3 +4008,20 @@ eventfd_write
40084008
__c_anonymous_ifru_map
40094009
__c_anonymous_ifr_ifru
40104010
__c_anonymous_ifc_ifcu
4011+
NT_PRSTATUS
4012+
NT_PRFPREG
4013+
NT_FPREGSET
4014+
NT_PRPSINFO
4015+
NT_PRXREG
4016+
NT_TASKSTRUCT
4017+
NT_PLATFORM
4018+
NT_AUXV
4019+
NT_GWINDOWS
4020+
NT_ASRS
4021+
NT_PSTATUS
4022+
NT_PSINFO
4023+
NT_PRCRED
4024+
NT_UTSNAME
4025+
NT_LWPSTATUS
4026+
NT_LWPSINFO
4027+
NT_PRFPXREG

src/unix/linux_like/linux/gnu/mod.rs

-19
Original file line numberDiff line numberDiff line change
@@ -1094,25 +1094,6 @@ pub const XSK_UNALIGNED_BUF_ADDR_MASK: ::c_ulonglong = (1 << XSK_UNALIGNED_BUF_O
10941094

10951095
pub const XDP_PKT_CONTD: ::__u32 = 1 << 0;
10961096

1097-
// elf.h
1098-
pub const NT_PRSTATUS: ::c_int = 1;
1099-
pub const NT_PRFPREG: ::c_int = 2;
1100-
pub const NT_FPREGSET: ::c_int = 2;
1101-
pub const NT_PRPSINFO: ::c_int = 3;
1102-
pub const NT_PRXREG: ::c_int = 4;
1103-
pub const NT_TASKSTRUCT: ::c_int = 4;
1104-
pub const NT_PLATFORM: ::c_int = 5;
1105-
pub const NT_AUXV: ::c_int = 6;
1106-
pub const NT_GWINDOWS: ::c_int = 7;
1107-
pub const NT_ASRS: ::c_int = 8;
1108-
pub const NT_PSTATUS: ::c_int = 10;
1109-
pub const NT_PSINFO: ::c_int = 13;
1110-
pub const NT_PRCRED: ::c_int = 14;
1111-
pub const NT_UTSNAME: ::c_int = 15;
1112-
pub const NT_LWPSTATUS: ::c_int = 16;
1113-
pub const NT_LWPSINFO: ::c_int = 17;
1114-
pub const NT_PRFPXREG: ::c_int = 20;
1115-
11161097
pub const ELFOSABI_ARM_AEABI: u8 = 64;
11171098

11181099
// linux/sched.h

src/unix/linux_like/linux/mod.rs

+19
Original file line numberDiff line numberDiff line change
@@ -5133,6 +5133,25 @@ pub const SCHED_FLAG_KEEP_PARAMS: ::c_int = 0x10;
51335133
pub const SCHED_FLAG_UTIL_CLAMP_MIN: ::c_int = 0x20;
51345134
pub const SCHED_FLAG_UTIL_CLAMP_MAX: ::c_int = 0x40;
51355135

5136+
// elf.h
5137+
pub const NT_PRSTATUS: ::c_int = 1;
5138+
pub const NT_PRFPREG: ::c_int = 2;
5139+
pub const NT_FPREGSET: ::c_int = 2;
5140+
pub const NT_PRPSINFO: ::c_int = 3;
5141+
pub const NT_PRXREG: ::c_int = 4;
5142+
pub const NT_TASKSTRUCT: ::c_int = 4;
5143+
pub const NT_PLATFORM: ::c_int = 5;
5144+
pub const NT_AUXV: ::c_int = 6;
5145+
pub const NT_GWINDOWS: ::c_int = 7;
5146+
pub const NT_ASRS: ::c_int = 8;
5147+
pub const NT_PSTATUS: ::c_int = 10;
5148+
pub const NT_PSINFO: ::c_int = 13;
5149+
pub const NT_PRCRED: ::c_int = 14;
5150+
pub const NT_UTSNAME: ::c_int = 15;
5151+
pub const NT_LWPSTATUS: ::c_int = 16;
5152+
pub const NT_LWPSINFO: ::c_int = 17;
5153+
pub const NT_PRFPXREG: ::c_int = 20;
5154+
51365155
pub const SCHED_FLAG_KEEP_ALL: ::c_int = SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS;
51375156

51385157
pub const SCHED_FLAG_UTIL_CLAMP: ::c_int = SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX;

src/unix/linux_like/linux/musl/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -883,12 +883,6 @@ pub const XSK_UNALIGNED_BUF_ADDR_MASK: ::c_ulonglong = (1 << XSK_UNALIGNED_BUF_O
883883

884884
pub const XDP_PKT_CONTD: ::__u32 = 1 << 0;
885885

886-
pub const NT_PRSTATUS: ::c_int = 1;
887-
pub const NT_PRFPREG: ::c_int = 2;
888-
pub const NT_PRPSINFO: ::c_int = 3;
889-
pub const NT_TASKSTRUCT: ::c_int = 4;
890-
pub const NT_AUXV: ::c_int = 6;
891-
892886
cfg_if! {
893887
if #[cfg(target_arch = "s390x")] {
894888
pub const POSIX_FADV_DONTNEED: ::c_int = 6;

0 commit comments

Comments
 (0)