Skip to content

Commit 14ef2e5

Browse files
committed
Auto merge of #3335 - androm3da:bcain/sa_onstack, r=JohnTitor
Remove deprecation from SA_ONSTACK; fix hexagon-unknown-linux-musl In ad3f860 the RLIM_* values were removed, but leaving behind a deprecation about RLIM_NLIMITS caused it to incorrectly apply instead to SA_ONSTACK.
2 parents c7a860d + b3cf87f commit 14ef2e5

File tree

11 files changed

+33
-1
lines changed

11 files changed

+33
-1
lines changed

src/fuchsia/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2811,7 +2811,10 @@ pub const POSIX_MADV_DONTNEED: ::c_int = 4;
28112811

28122812
pub const RLIM_INFINITY: ::rlim_t = !0;
28132813
pub const RLIMIT_RTTIME: ::c_int = 15;
2814+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
28142815
pub const RLIMIT_NLIMITS: ::c_int = 16;
2816+
#[allow(deprecated)]
2817+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
28152818
pub const RLIM_NLIMITS: ::c_int = RLIMIT_NLIMITS;
28162819

28172820
pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;

src/unix/aix/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,7 @@ pub const PRIO_USER: ::c_int = 2;
17621762
pub const RUSAGE_THREAD: ::c_int = 1;
17631763
pub const RLIM_SAVED_MAX: ::c_ulong = RLIM_INFINITY - 1;
17641764
pub const RLIM_SAVED_CUR: ::c_ulong = RLIM_INFINITY - 2;
1765+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
17651766
pub const RLIM_NLIMITS: ::c_int = 10;
17661767

17671768
// sys/sched.h

src/unix/haiku/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,7 @@ pub const RLIMIT_AS: ::c_int = 6;
741741
pub const RLIM_INFINITY: ::rlim_t = 0xffffffff;
742742
// Haiku specific
743743
pub const RLIMIT_NOVMON: ::c_int = 7;
744+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
744745
pub const RLIM_NLIMITS: ::c_int = 8;
745746

746747
pub const RUSAGE_SELF: ::c_int = 0;

src/unix/linux_like/android/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,6 +1562,7 @@ pub const RLIMIT_MSGQUEUE: ::c_int = 12;
15621562
pub const RLIMIT_NICE: ::c_int = 13;
15631563
pub const RLIMIT_RTPRIO: ::c_int = 14;
15641564

1565+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
15651566
pub const RLIM_NLIMITS: ::c_int = 16;
15661567
pub const RLIM_INFINITY: ::rlim_t = !0;
15671568

src/unix/linux_like/emscripten/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,10 @@ pub const POSIX_FADV_NOREUSE: ::c_int = 5;
12301230
pub const POSIX_MADV_DONTNEED: ::c_int = 0;
12311231

12321232
pub const RLIM_INFINITY: ::rlim_t = !0;
1233+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
12331234
pub const RLIMIT_NLIMITS: ::c_int = 15;
1235+
#[allow(deprecated)]
1236+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
12341237
pub const RLIM_NLIMITS: ::c_int = RLIMIT_NLIMITS;
12351238

12361239
pub const MAP_ANONYMOUS: ::c_int = MAP_ANON;

src/unix/linux_like/linux/arch/generic/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ cfg_if! {
257257
pub const RLIMIT_NICE: ::__rlimit_resource_t = 13;
258258
pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14;
259259
pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15;
260+
#[allow(deprecated)]
261+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
260262
pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS;
261263

262264
} else if #[cfg(any(target_env = "musl", target_env = "ohos"))] {
@@ -277,16 +279,21 @@ cfg_if! {
277279
pub const RLIMIT_NICE: ::c_int = 13;
278280
pub const RLIMIT_RTPRIO: ::c_int = 14;
279281
pub const RLIMIT_RTTIME: ::c_int = 15;
282+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
280283
pub const RLIM_NLIMITS: ::c_int = 15;
284+
#[allow(deprecated)]
285+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
281286
pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS;
282287
}
283288
}
284289

285290
cfg_if! {
286291
if #[cfg(target_env = "gnu")] {
292+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
287293
pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16;
288294
}
289295
else if #[cfg(target_env = "uclibc")] {
296+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
290297
pub const RLIM_NLIMITS: ::__rlimit_resource_t = 15;
291298
}
292299
}

src/unix/linux_like/linux/arch/mips/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ cfg_if! {
237237
pub const RLIMIT_NICE: ::__rlimit_resource_t = 13;
238238
pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14;
239239
pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15;
240+
#[allow(deprecated)]
241+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
240242
pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS;
241243

242244
} else if #[cfg(target_env = "musl")] {
@@ -257,16 +259,21 @@ cfg_if! {
257259
pub const RLIMIT_NICE: ::c_int = 13;
258260
pub const RLIMIT_RTPRIO: ::c_int = 14;
259261
pub const RLIMIT_RTTIME: ::c_int = 15;
262+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
260263
pub const RLIM_NLIMITS: ::c_int = 15;
264+
#[allow(deprecated)]
265+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
261266
pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS;
262267
pub const RLIM_INFINITY: ::rlim_t = !0;
263268
}
264269
}
265270

266271
cfg_if! {
267272
if #[cfg(target_env = "gnu")] {
273+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
268274
pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16;
269275
} else if #[cfg(target_env = "uclibc")] {
276+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
270277
pub const RLIM_NLIMITS: ::__rlimit_resource_t = 15;
271278
}
272279
}

src/unix/linux_like/linux/arch/powerpc/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ cfg_if! {
215215
pub const RLIMIT_NICE: ::__rlimit_resource_t = 13;
216216
pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14;
217217
pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15;
218+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
218219
pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16;
220+
#[allow(deprecated)]
221+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
219222
pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS;
220223

221224
} else if #[cfg(target_env = "musl")] {
@@ -236,7 +239,10 @@ cfg_if! {
236239
pub const RLIMIT_NICE: ::c_int = 13;
237240
pub const RLIMIT_RTPRIO: ::c_int = 14;
238241
pub const RLIMIT_RTTIME: ::c_int = 15;
242+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
239243
pub const RLIM_NLIMITS: ::c_int = 15;
244+
#[allow(deprecated)]
245+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
240246
pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS;
241247
}
242248
}

src/unix/linux_like/linux/arch/sparc/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,10 @@ pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12;
216216
pub const RLIMIT_NICE: ::__rlimit_resource_t = 13;
217217
pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14;
218218
pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15;
219+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
219220
pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16;
221+
#[allow(deprecated)]
222+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
220223
pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS;
221224

222225
cfg_if! {

src/unix/linux_like/linux/musl/b32/hexagon.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ pub const PF_FILE: ::c_int = 1;
265265
pub const PF_KCM: ::c_int = 41;
266266
pub const PF_MAX: ::c_int = 43;
267267
pub const PF_QIPCRTR: ::c_int = 42;
268-
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
269268
pub const SA_ONSTACK: ::c_int = 0x08000000;
270269
pub const SA_SIGINFO: ::c_int = 0x00000004;
271270
pub const SA_NOCLDWAIT: ::c_int = 0x00000002;

src/unix/nto/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,6 +2557,7 @@ pub const RLIMIT_NPROC: ::c_int = 8;
25572557
pub const RLIMIT_RSS: ::c_int = 6;
25582558
pub const RLIMIT_STACK: ::c_int = 3;
25592559
pub const RLIMIT_VMEM: ::c_int = 6;
2560+
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")]
25602561
pub const RLIM_NLIMITS: ::c_int = 14;
25612562

25622563
pub const SCHED_ADJTOHEAD: ::c_int = 5;

0 commit comments

Comments
 (0)