Skip to content

Commit 2f9ec7b

Browse files
committed
MinGW: Set L_tmpnam and TMP_MAX to the UCRT value
With the update to Windows-2025, MinGW is now using the UCRT values for `L_tmpnam` and `TMP_MAX`, which match the MSVC values. Since the values are now identical, consolidate the constants. Link: mingw-w64/mingw-w64@c7c93e3 Link: mingw-w64/mingw-w64@124ee27
1 parent 408a2ed commit 2f9ec7b

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/windows/gnu/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ cfg_if! {
1818
}
1919
}
2020

21-
pub const L_tmpnam: c_uint = 14;
22-
pub const TMP_MAX: c_uint = 0x7fff;
23-
2421
// stdio file descriptor numbers
2522
pub const STDIN_FILENO: c_int = 0;
2623
pub const STDOUT_FILENO: c_int = 1;

src/windows/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@ pub const SIG_GET: crate::sighandler_t = 2;
243243
pub const SIG_SGE: crate::sighandler_t = 3;
244244
pub const SIG_ACK: crate::sighandler_t = 4;
245245

246+
pub const L_tmpnam: c_uint = 260;
247+
pub const TMP_MAX: c_uint = 0x7fff_ffff;
248+
246249
#[cfg_attr(feature = "extra_traits", derive(Debug))]
247250
pub enum FILE {}
248251
impl Copy for FILE {}

src/windows/msvc/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
use crate::prelude::*;
22

3-
pub const L_tmpnam: c_uint = 260;
4-
pub const TMP_MAX: c_uint = 0x7fff_ffff;
5-
63
// POSIX Supplement (from errno.h)
74
// This particular error code is only currently available in msvc toolchain
85
pub const EOTHER: c_int = 131;

0 commit comments

Comments
 (0)