From 06971ff4bf8f8877f34303a60f1338209c2f2e39 Mon Sep 17 00:00:00 2001 From: auronandace Date: Tue, 20 Jan 2026 16:43:51 +0000 Subject: [PATCH] stdlib header cleanup --- src/header/stdlib/mod.rs | 8 +++++++- src/header/stdlib/rand48.rs | 2 +- src/header/stdlib/random.rs | 2 +- src/header/stdlib/sort.rs | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/header/stdlib/mod.rs b/src/header/stdlib/mod.rs index 51657aa350..3dd1dbf3d7 100644 --- a/src/header/stdlib/mod.rs +++ b/src/header/stdlib/mod.rs @@ -31,7 +31,13 @@ use crate::{ }, ld_so, out::Out, - platform::{self, Pal, Sys, types::*}, + platform::{ + self, Pal, Sys, + types::{ + c_char, c_double, c_float, c_int, c_long, c_longlong, c_uint, c_ulong, c_ulonglong, + c_ushort, c_void, size_t, ssize_t, uintptr_t, wchar_t, + }, + }, raw_cell::RawCell, sync::Once, }; diff --git a/src/header/stdlib/rand48.rs b/src/header/stdlib/rand48.rs index b1b5841aec..6e5cf00aa1 100644 --- a/src/header/stdlib/rand48.rs +++ b/src/header/stdlib/rand48.rs @@ -1,7 +1,7 @@ //! Helper functions for pseudorandom number generation using LCG, see https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/drand48.html use crate::{ - platform::types::*, + platform::types::{c_double, c_long, c_ushort}, sync::{ Mutex, MutexGuard, rwlock::{self, RwLock}, diff --git a/src/header/stdlib/random.rs b/src/header/stdlib/random.rs index 14ec843be1..e92fdbfb29 100644 --- a/src/header/stdlib/random.rs +++ b/src/header/stdlib/random.rs @@ -5,7 +5,7 @@ #![deny(unsafe_op_in_unsafe_fn)] use crate::{ - platform::types::*, + platform::types::c_uint, sync::{Mutex, MutexGuard}, }; use core::{cell::SyncUnsafeCell, convert::TryFrom, ptr}; diff --git a/src/header/stdlib/sort.rs b/src/header/stdlib/sort.rs index 11d0d81119..c53f4b947f 100644 --- a/src/header/stdlib/sort.rs +++ b/src/header/stdlib/sort.rs @@ -1,7 +1,7 @@ // TODO: set this for entire crate when possible #![deny(unsafe_op_in_unsafe_fn)] -use crate::platform::types::*; +use crate::platform::types::{c_char, c_int, c_void, size_t}; pub unsafe fn introsort( base: *mut c_char,