Support nightly 2026-05-24

This commit is contained in:
Jeremy Soller
2026-05-25 17:03:17 -06:00
parent 7b3371848c
commit ffa097ccb3
15 changed files with 90 additions and 109 deletions
+2
View File
@@ -655,6 +655,8 @@ pub fn setup_sighandler(tcb: &RtTcb, first_thread: bool) {
#[cfg(target_arch = "x86_64")]
{
// On newer rust, cpuid is not unsafe
#[allow(unused_unsafe)]
let cpuid_eax1_ecx = unsafe { core::arch::x86_64::__cpuid(1) }.ecx;
CPUID_EAX1_ECX.store(cpuid_eax1_ecx, core::sync::atomic::Ordering::Relaxed);
SUPPORTS_AVX.store(u8::from(cpuid_eax1_ecx & 1 << 28 != 0), Ordering::Relaxed);
+1 -1
View File
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2025-11-15"
channel = "nightly-2026-05-24"
components = ["rust-src"]
+12 -12
View File
@@ -65,9 +65,9 @@ pub unsafe extern "C" fn err_set_exit(ef: ExitCallback) {
/// # Return
/// Does not return. Exits with `eval` as an error code.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn err(eval: c_int, fmt: *const c_char, mut va_list: ...) -> ! {
pub unsafe extern "C" fn err(eval: c_int, fmt: *const c_char, va_list: ...) -> ! {
let code = Some(ERRNO.get());
err_exit(eval, code, fmt, va_list.as_va_list())
err_exit(eval, code, fmt, va_list)
}
/// Print a user message then an error message for `code` before exiting with `eval` as a return.
@@ -77,8 +77,8 @@ pub unsafe extern "C" fn err(eval: c_int, fmt: *const c_char, mut va_list: ...)
/// # Return
/// Exits with `eval` as an error code.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn errc(eval: c_int, code: c_int, fmt: *const c_char, mut va_list: ...) -> ! {
err_exit(eval, Some(code), fmt, va_list.as_va_list())
pub unsafe extern "C" fn errc(eval: c_int, code: c_int, fmt: *const c_char, va_list: ...) -> ! {
err_exit(eval, Some(code), fmt, va_list)
}
/// Print a user message then exits with `eval` as a return.
@@ -88,33 +88,33 @@ pub unsafe extern "C" fn errc(eval: c_int, code: c_int, fmt: *const c_char, mut
/// # Return
/// Exits with `eval` as an error code.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn errx(eval: c_int, fmt: *const c_char, mut va_list: ...) -> ! {
err_exit(eval, None, fmt, va_list.as_va_list())
pub unsafe extern "C" fn errx(eval: c_int, fmt: *const c_char, va_list: ...) -> ! {
err_exit(eval, None, fmt, va_list)
}
/// Print a user message and then an error message for [`ERRNO`].
///
/// The message format is `progname: fmt: strerror(ERRNO)`
#[unsafe(no_mangle)]
pub unsafe extern "C" fn warn(fmt: *const c_char, mut va_list: ...) {
pub unsafe extern "C" fn warn(fmt: *const c_char, va_list: ...) {
let code = Some(ERRNO.get());
display_message(code, fmt, va_list.as_va_list());
display_message(code, fmt, va_list);
}
/// Print a user message then an error message for `code`.
///
/// The message format is `progname: fmt: strerror(code)`
#[unsafe(no_mangle)]
pub unsafe extern "C" fn warnc(code: c_int, fmt: *const c_char, mut va_list: ...) {
display_message(Some(code), fmt, va_list.as_va_list());
pub unsafe extern "C" fn warnc(code: c_int, fmt: *const c_char, va_list: ...) {
display_message(Some(code), fmt, va_list);
}
/// Print a user message as a warning.
///
/// The message format is `progname: fmt`
#[unsafe(no_mangle)]
pub unsafe extern "C" fn warnx(fmt: *const c_char, mut va_list: ...) {
display_message(None, fmt, va_list.as_va_list());
pub unsafe extern "C" fn warnx(fmt: *const c_char, va_list: ...) {
display_message(None, fmt, va_list);
}
/// See [`err`].
+3 -3
View File
@@ -87,7 +87,7 @@ pub unsafe extern "C" fn fcntl(fildes: c_int, cmd: c_int, mut __valist: ...) ->
// c_ulonglong
let arg = match cmd {
F_DUPFD | F_SETFD | F_SETFL | F_GETLK | F_SETLK | F_SETLKW | F_OFD_GETLK | F_OFD_SETLK
| F_OFD_SETLKW | F_DUPFD_CLOEXEC => unsafe { __valist.arg::<c_ulonglong>() },
| F_OFD_SETLKW | F_DUPFD_CLOEXEC => unsafe { __valist.next_arg::<c_ulonglong>() },
_ => 0,
};
@@ -100,7 +100,7 @@ pub unsafe extern "C" fn open(path: *const c_char, oflag: c_int, mut __valist: .
let mode = if oflag & O_CREAT == O_CREAT
/* || oflag & O_TMPFILE == O_TMPFILE */
{
unsafe { __valist.arg::<mode_t>() }
unsafe { __valist.next_arg::<mode_t>() }
} else {
0
};
@@ -120,7 +120,7 @@ pub unsafe extern "C" fn openat(
let mode = if oflag & O_CREAT == O_CREAT
/* || oflag & O_TMPFILE == O_TMPFILE */
{
unsafe { __valist.arg::<mode_t>() }
unsafe { __valist.next_arg::<mode_t>() }
} else {
0
};
+2 -2
View File
@@ -122,7 +122,7 @@ pub unsafe extern "C" fn strfmon(
Some('i') => {
// International formatting
flags.international = true;
let value = unsafe { args.arg::<f64>() }; // Get the argument as f64
let value = unsafe { args.next_arg::<f64>() }; // Get the argument as f64
if let Some(written) =
format_monetary(&mut buffer[pos..], value, &DEFAULT_MONETARY, &flags)
{
@@ -133,7 +133,7 @@ pub unsafe extern "C" fn strfmon(
}
Some('n') => {
// Locale-specific formatting
let value = unsafe { args.arg::<f64>() }; // Get the argument as f64
let value = unsafe { args.next_arg::<f64>() }; // Get the argument as f64
if let Some(written) =
format_monetary(&mut buffer[pos..], value, &DEFAULT_MONETARY, &flags)
{
+18 -34
View File
@@ -1406,12 +1406,8 @@ pub unsafe extern "C" fn vfprintf(file: *mut FILE, format: *const c_char, ap: va
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fprintf.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn fprintf(
file: *mut FILE,
format: *const c_char,
mut __valist: ...
) -> c_int {
unsafe { vfprintf(file, format, __valist.as_va_list()) }
pub unsafe extern "C" fn fprintf(file: *mut FILE, format: *const c_char, __valist: ...) -> c_int {
unsafe { vfprintf(file, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/vdprintf.html>.
@@ -1428,8 +1424,8 @@ pub unsafe extern "C" fn vdprintf(fd: c_int, format: *const c_char, ap: va_list)
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/dprintf.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn dprintf(fd: c_int, format: *const c_char, mut __valist: ...) -> c_int {
unsafe { vdprintf(fd, format, __valist.as_va_list()) }
pub unsafe extern "C" fn dprintf(fd: c_int, format: *const c_char, __valist: ...) -> c_int {
unsafe { vdprintf(fd, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/vfprintf.html>.
@@ -1440,8 +1436,8 @@ pub unsafe extern "C" fn vprintf(format: *const c_char, ap: va_list) -> c_int {
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fprintf.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn printf(format: *const c_char, mut __valist: ...) -> c_int {
unsafe { vfprintf(&raw mut *stdout, format, __valist.as_va_list()) }
pub unsafe extern "C" fn printf(format: *const c_char, __valist: ...) -> c_int {
unsafe { vfprintf(&raw mut *stdout, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/vfprintf.html>.
@@ -1464,9 +1460,9 @@ pub unsafe extern "C" fn vasprintf(
pub unsafe extern "C" fn asprintf(
strp: *mut *mut c_char,
format: *const c_char,
mut __valist: ...
__valist: ...
) -> c_int {
unsafe { vasprintf(strp, format, __valist.as_va_list()) }
unsafe { vasprintf(strp, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/vfprintf.html>.
@@ -1492,13 +1488,13 @@ pub unsafe extern "C" fn snprintf(
s: *mut c_char,
n: size_t,
format: *const c_char,
mut __valist: ...
__valist: ...
) -> c_int {
unsafe {
printf::printf(
&mut platform::StringWriter(s, n),
CStr::from_ptr(format),
__valist.as_va_list(),
__valist,
)
}
}
@@ -1517,16 +1513,12 @@ pub unsafe extern "C" fn vsprintf(s: *mut c_char, format: *const c_char, ap: va_
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fprintf.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn sprintf(
s: *mut c_char,
format: *const c_char,
mut __valist: ...
) -> c_int {
pub unsafe extern "C" fn sprintf(s: *mut c_char, format: *const c_char, __valist: ...) -> c_int {
unsafe {
printf::printf(
&mut platform::UnsafeStringWriter(s.cast::<u8>()),
CStr::from_ptr(format),
__valist.as_va_list(),
__valist,
)
}
}
@@ -1549,12 +1541,8 @@ pub unsafe extern "C" fn vfscanf(file: *mut FILE, format: *const c_char, ap: va_
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fscanf.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn fscanf(
file: *mut FILE,
format: *const c_char,
mut __valist: ...
) -> c_int {
unsafe { vfscanf(file, format, __valist.as_va_list()) }
pub unsafe extern "C" fn fscanf(file: *mut FILE, format: *const c_char, __valist: ...) -> c_int {
unsafe { vfscanf(file, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/vfscanf.html>.
@@ -1565,8 +1553,8 @@ pub unsafe extern "C" fn vscanf(format: *const c_char, ap: va_list) -> c_int {
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fscanf.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn scanf(format: *const c_char, mut __valist: ...) -> c_int {
unsafe { vfscanf(&raw mut *stdin, format, __valist.as_va_list()) }
pub unsafe extern "C" fn scanf(format: *const c_char, __valist: ...) -> c_int {
unsafe { vfscanf(&raw mut *stdin, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/vfscanf.html>.
@@ -1581,15 +1569,11 @@ pub unsafe extern "C" fn vsscanf(s: *const c_char, format: *const c_char, ap: va
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fscanf.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn sscanf(
s: *const c_char,
format: *const c_char,
mut __valist: ...
) -> c_int {
pub unsafe extern "C" fn sscanf(s: *const c_char, format: *const c_char, __valist: ...) -> c_int {
unsafe {
let format = CStr::from_ptr(format);
let s = CStr::from_ptr(s);
scanf::scanf(s.into(), format.into(), __valist.as_va_list())
scanf::scanf(s.into(), format.into(), __valist)
}
}
+14 -14
View File
@@ -127,36 +127,36 @@ impl VaArg {
(FmtKind::Percent, _) => panic!("Can't call arg_from on %"),
(FmtKind::Char, IntKind::Long) | (FmtKind::Char, IntKind::LongLong) => {
VaArg::wint_t(unsafe { ap.arg::<wint_t>() })
VaArg::wint_t(unsafe { ap.next_arg::<wint_t>() })
}
(FmtKind::Char, _)
| (FmtKind::Unsigned, IntKind::Byte)
| (FmtKind::Signed, IntKind::Byte) => {
// c_int is passed but truncated to c_char
VaArg::c_char(unsafe { ap.arg::<c_int>() } as c_char)
VaArg::c_char(unsafe { ap.next_arg::<c_int>() } as c_char)
}
(FmtKind::Unsigned, IntKind::Short) | (FmtKind::Signed, IntKind::Short) => {
// c_int is passed but truncated to c_short
VaArg::c_short(unsafe { ap.arg::<c_int>() } as c_short)
VaArg::c_short(unsafe { ap.next_arg::<c_int>() } as c_short)
}
(FmtKind::Unsigned, IntKind::Int) | (FmtKind::Signed, IntKind::Int) => {
VaArg::c_int(unsafe { ap.arg::<c_int>() })
VaArg::c_int(unsafe { ap.next_arg::<c_int>() })
}
(FmtKind::Unsigned, IntKind::Long) | (FmtKind::Signed, IntKind::Long) => {
VaArg::c_long(unsafe { ap.arg::<c_long>() })
VaArg::c_long(unsafe { ap.next_arg::<c_long>() })
}
(FmtKind::Unsigned, IntKind::LongLong) | (FmtKind::Signed, IntKind::LongLong) => {
VaArg::c_longlong(unsafe { ap.arg::<c_longlong>() })
VaArg::c_longlong(unsafe { ap.next_arg::<c_longlong>() })
}
(FmtKind::Unsigned, IntKind::IntMax) | (FmtKind::Signed, IntKind::IntMax) => {
VaArg::intmax_t(unsafe { ap.arg::<intmax_t>() })
VaArg::intmax_t(unsafe { ap.next_arg::<intmax_t>() })
}
(FmtKind::Unsigned, IntKind::PtrDiff) | (FmtKind::Signed, IntKind::PtrDiff) => {
VaArg::ptrdiff_t(unsafe { ap.arg::<ptrdiff_t>() })
VaArg::ptrdiff_t(unsafe { ap.next_arg::<ptrdiff_t>() })
}
(FmtKind::Unsigned, IntKind::Size) | (FmtKind::Signed, IntKind::Size) => {
VaArg::ssize_t(unsafe { ap.arg::<ssize_t>() })
VaArg::ssize_t(unsafe { ap.next_arg::<ssize_t>() })
}
(FmtKind::AnyNotation, IntKind::LongLong)
@@ -165,11 +165,11 @@ impl VaArg {
VaArg::c_longdouble(unsafe { VaArg::extract_longdouble(ap) })
}
(FmtKind::AnyNotation, _) | (FmtKind::Decimal, _) | (FmtKind::Scientific, _) => {
VaArg::c_double(unsafe { ap.arg::<c_double>() })
VaArg::c_double(unsafe { ap.next_arg::<c_double>() })
}
(FmtKind::GetWritten, _) | (FmtKind::Pointer, _) | (FmtKind::String, _) => {
VaArg::pointer(unsafe { ap.arg::<*const c_void>() })
VaArg::pointer(unsafe { ap.next_arg::<*const c_void>() })
}
}
}
@@ -348,13 +348,13 @@ impl VaListCache {
// point. Reaching here means there are unused gaps in the
// arguments. Ultimately we'll have to settle down with
// defaulting to c_int.
self.args.push(VaArg::c_int(unsafe { ap.arg::<c_int>() }))
self.args.push(VaArg::c_int(unsafe { ap.next_arg::<c_int>() }))
}
// Add the value to the cache
self.args.push(match default {
Some((fmtkind, intkind)) => unsafe { VaArg::arg_from(fmtkind, intkind, ap) },
None => VaArg::c_int(unsafe { ap.arg::<c_int>() }),
None => VaArg::c_int(unsafe { ap.next_arg::<c_int>() }),
});
// Return the value
@@ -776,7 +776,7 @@ pub(crate) unsafe fn inner_printf<T: c_str::Kind>(
match num {
Number::Next => varargs
.args
.push(VaArg::c_int(unsafe { ap.arg::<c_int>() })),
.push(VaArg::c_int(unsafe { ap.next_arg::<c_int>() })),
Number::Index(i) => {
positional.insert(i - 1, (FmtKind::Signed, IntKind::Int));
}
+6 -6
View File
@@ -248,7 +248,7 @@ pub unsafe fn inner_scanf<T: Kind>(
n.parse::<$type>().map_err(|_| 0)?
};
if !ignore {
unsafe { *ap.arg::<*mut $type>() = n };
unsafe { *ap.next_arg::<*mut $type>() = n };
matched += 1;
}
}};
@@ -268,7 +268,7 @@ pub unsafe fn inner_scanf<T: Kind>(
$type::from_str_radix(&n, radix).map_err(|_| 0)?
};
if !ignore {
unsafe { *ap.arg::<*mut $final>() = n as $final };
unsafe { *ap.next_arg::<*mut $final>() = n as $final };
matched += 1;
}
}};
@@ -350,7 +350,7 @@ pub unsafe fn inner_scanf<T: Kind>(
}
let mut ptr: Option<*mut $type> =
if ignore { None } else { Some(ap.arg()) };
if ignore { None } else { Some(ap.next_arg()) };
while width.map(|w| w > 0).unwrap_or(true) && !character.is_whitespace()
{
@@ -395,7 +395,7 @@ pub unsafe fn inner_scanf<T: Kind>(
let ptr: Option<*mut $type> = if ignore {
None
} else {
Some(unsafe { ap.arg() })
Some(unsafe { ap.next_arg() })
};
for i in 0..width.unwrap_or(1) {
@@ -460,7 +460,7 @@ pub unsafe fn inner_scanf<T: Kind>(
let mut ptr: Option<*mut c_char> = if ignore {
None
} else {
Some(unsafe { ap.arg() })
Some(unsafe { ap.next_arg() })
};
// While we haven't used up all the width, and it matches
@@ -490,7 +490,7 @@ pub unsafe fn inner_scanf<T: Kind>(
}
'n' => {
if !ignore {
unsafe { *ap.arg::<*mut c_int>() = count as c_int };
unsafe { *ap.next_arg::<*mut c_int>() = count as c_int };
}
}
_ => return Err(-1),
+1 -1
View File
@@ -112,7 +112,7 @@ pub unsafe extern "C" fn mremap(
flags: c_int,
mut __valist: ...
) -> *mut c_void {
let new_address = unsafe { __valist.arg::<*mut c_void>() };
let new_address = unsafe { __valist.next_arg::<*mut c_void>() };
match unsafe { Sys::mremap(old_address, old_size, new_size, flags, new_address) } {
Ok(ptr) => ptr,
Err(Errno(errno)) => {
+1 -1
View File
@@ -68,6 +68,6 @@ pub const PTRACE_SYSEMU_SINGLESTEP: c_int = 32;
#[unsafe(no_mangle)]
pub unsafe extern "C" fn ptrace(request: c_int, mut __valist: ...) -> c_int {
// Musl also just grabs the arguments from the varargs...
unsafe { Sys::ptrace(request, __valist.arg(), __valist.arg(), __valist.arg()) }
unsafe { Sys::ptrace(request, __valist.next_arg(), __valist.next_arg(), __valist.next_arg()) }
.or_minus_one_errno()
}
+2 -2
View File
@@ -135,8 +135,8 @@ pub unsafe extern "C" fn vsyslog(priority: c_int, message: *const c_char, ap: Va
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/closelog.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn syslog(priority: c_int, message: *const c_char, mut __valist: ...) {
unsafe { vsyslog(priority, message, __valist.as_va_list()) };
pub unsafe extern "C" fn syslog(priority: c_int, message: *const c_char, __valist: ...) {
unsafe { vsyslog(priority, message, __valist) };
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/closelog.html>.
+10 -11
View File
@@ -4,7 +4,7 @@
use core::{
convert::TryFrom,
ffi::VaListImpl,
ffi::VaList,
mem::{self, MaybeUninit},
ptr, slice,
};
@@ -314,7 +314,7 @@ pub unsafe extern "C" fn execle(
) -> c_int {
unsafe {
with_argv(__valist, arg0, |args, mut remaining_va| {
let envp = remaining_va.arg::<*const *mut c_char>();
let envp = remaining_va.next_arg::<*const *mut c_char>();
execve(path, args.as_ptr().cast(), envp)
})
}
@@ -1244,16 +1244,15 @@ pub extern "C" fn vfork() -> pid_t {
}
unsafe fn with_argv(
mut va: VaListImpl,
mut va: VaList,
arg0: *const c_char,
f: impl FnOnce(&[*const c_char], VaListImpl) -> c_int,
f: impl FnOnce(&[*const c_char], VaList) -> c_int,
) -> c_int {
let argc = 1 + unsafe {
va.with_copy(|mut copy| {
core::iter::from_fn(|| Some(copy.arg::<*const c_char>()))
.position(|p| p.is_null())
.unwrap()
})
let mut copy = va.clone();
core::iter::from_fn(|| Some(copy.next_arg::<*const c_char>()))
.position(|p| p.is_null())
.unwrap()
};
let mut stack: [MaybeUninit<*const c_char>; 32] = [MaybeUninit::uninit(); 32];
@@ -1276,11 +1275,11 @@ unsafe fn with_argv(
out[0].write(arg0);
for inner in out.iter_mut().take(argc).skip(1) {
(*inner).write(unsafe { va.arg::<*const c_char>() });
(*inner).write(unsafe { va.next_arg::<*const c_char>() });
}
out[argc].write(core::ptr::null());
// NULL
unsafe { va.arg::<*const c_char>() };
unsafe { va.next_arg::<*const c_char>() };
f(unsafe { out.assume_init_ref() }, va);
+6 -6
View File
@@ -3,12 +3,12 @@ use crate::platform::types::c_long;
/// Non-POSIX, see <https://www.man7.org/linux/man-pages/man3/getopt.3.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn syscall(sysno: c_long, mut args: ...) -> c_long {
let a1 = unsafe { args.arg::<usize>() };
let a2 = unsafe { args.arg::<usize>() };
let a3 = unsafe { args.arg::<usize>() };
let a4 = unsafe { args.arg::<usize>() };
let a5 = unsafe { args.arg::<usize>() };
let a6 = unsafe { args.arg::<usize>() };
let a1 = unsafe { args.next_arg::<usize>() };
let a2 = unsafe { args.next_arg::<usize>() };
let a3 = unsafe { args.next_arg::<usize>() };
let a4 = unsafe { args.next_arg::<usize>() };
let a5 = unsafe { args.next_arg::<usize>() };
let a6 = unsafe { args.next_arg::<usize>() };
(unsafe { sc::syscall6(sysno as usize, a1, a2, a3, a4, a5, a6) }) as c_long
}
+12 -12
View File
@@ -181,9 +181,9 @@ pub unsafe extern "C" fn fwide(stream: *mut FILE, mode: c_int) -> c_int {
pub unsafe extern "C" fn fwscanf(
stream: *mut FILE,
format: *const wchar_t,
mut __valist: ...
__valist: ...
) -> c_int {
unsafe { vfwscanf(stream, format, __valist.as_va_list()) }
unsafe { vfwscanf(stream, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/getwc.html>.
@@ -340,9 +340,9 @@ pub unsafe extern "C" fn vswscanf(
pub unsafe extern "C" fn swscanf(
s: *const wchar_t,
format: *const wchar_t,
mut __valist: ...
__valist: ...
) -> c_int {
unsafe { vswscanf(s, format, __valist.as_va_list()) }
unsafe { vswscanf(s, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/ungetwc.html>.
@@ -394,9 +394,9 @@ pub unsafe extern "C" fn vfwprintf(
pub unsafe extern "C" fn fwprintf(
stream: *mut FILE,
format: *const wchar_t,
mut __valist: ...
__valist: ...
) -> c_int {
unsafe { vfwprintf(stream, format, __valist.as_va_list()) }
unsafe { vfwprintf(stream, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/vfwprintf.html>.
@@ -407,8 +407,8 @@ pub unsafe extern "C" fn vwprintf(format: *const wchar_t, arg: va_list) -> c_int
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/fwprintf.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn wprintf(format: *const wchar_t, mut __valist: ...) -> c_int {
unsafe { vfwprintf(&raw mut *stdout, format, __valist.as_va_list()) }
pub unsafe extern "C" fn wprintf(format: *const wchar_t, __valist: ...) -> c_int {
unsafe { vfwprintf(&raw mut *stdout, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/vfwprintf.html>.
@@ -431,9 +431,9 @@ pub unsafe extern "C" fn swprintf(
s: *mut wchar_t,
n: size_t,
format: *const wchar_t,
mut __valist: ...
__valist: ...
) -> c_int {
unsafe { vswprintf(s, n, format, __valist.as_va_list()) }
unsafe { vswprintf(s, n, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/wcpcpy.html>.
@@ -1052,8 +1052,8 @@ pub unsafe extern "C" fn vwscanf(format: *const wchar_t, __valist: va_list) -> c
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/wscanf.html>.
#[unsafe(no_mangle)]
pub unsafe extern "C" fn wscanf(format: *const wchar_t, mut __valist: ...) -> c_int {
unsafe { vfwscanf(stdin, format, __valist.as_va_list()) }
pub unsafe extern "C" fn wscanf(format: *const wchar_t, __valist: ...) -> c_int {
unsafe { vfwscanf(stdin, format, __valist) }
}
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/wcscasecmp.html>.
-4
View File
@@ -8,20 +8,16 @@
#![no_std]
#![feature(alloc_error_handler)]
#![feature(allocator_api)]
#![feature(c_variadic)]
#![feature(core_intrinsics)]
#![feature(macro_derive)]
#![feature(maybe_uninit_slice)]
#![feature(lang_items)]
#![feature(linkage)]
#![feature(pointer_is_aligned_to)]
#![feature(ptr_as_uninit)]
#![feature(slice_ptr_get)]
#![feature(stmt_expr_attributes)]
#![feature(sync_unsafe_cell)]
#![feature(thread_local)]
#![feature(vec_into_raw_parts)]
#![feature(negative_impls)]
#[macro_use]