741f144c79
- Add full VirtIO GPU driver with command submission, resource management, VirtQueue implementation, and transport layer; includes diagnostic probes for resource_create_2d ERR_INVALID_RESOURCE_ID investigation - Expand libdrm Redox support with DRM ioctl wrappers (ADDFB, RMFB, CREATE_DUMB, MAP_DUMB, DESTROY_DUMB, GET_RESOURCES, GET_CONNECTOR, GET_CRTC, SET_CRTC, MODE_OBJ_GET_PROPERTIES, etc.) and xf86drm_redox.h - Add redox-drm scheme handlers for VirtIO GPU-specific DRM ioctls (VIRTGPU_RESOURCE_CREATE, VIRTGPU_MAP, VIRTGPU_WAIT, VIRTGPU_INFO, etc.) - Add display stack recipes: freetype2, lcms2, libdisplay-info, libepoxy, libxcvt - Fix KWin build (recipe.toml expanded, kf6-ksvg added) - Fix KF6 CMakeLists for cross-compilation (attica, kcmutils, kcolorscheme, kcompletion, kconfigwidgets, kdeclarative, kiconthemes, kitemmodels, kitemviews, kjobwidgets, ktextwidgets, kwayland, kxmlgui, kpty, solid) - Add Qt6 futex support patch - Add relibc patches: P3 strtold, P3 ld-so search path, P5 DRM ioctl removal - Add base P4 pcid config scheme patch - Update driver-manager hotplug/config, PCI config in redox-driver-sys - Update greeter compositor and KDE session scripts - Update AGENTS.md with zero-tolerance stubs policy and project knowledge
36 lines
1.5 KiB
Diff
36 lines
1.5 KiB
Diff
diff --git a/src/header/stdlib/mod.rs b/src/header/stdlib/mod.rs
|
|
--- a/src/header/stdlib/mod.rs
|
|
+++ b/src/header/stdlib/mod.rs
|
|
@@ -31,8 +31,8 @@ use crate::{
|
|
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,
|
|
+ c_char, c_double, c_float, c_int, c_long, c_longdouble, c_longlong, c_uint, c_ulong,
|
|
+ c_ulonglong, c_ushort, c_void, size_t, ssize_t, uintptr_t, wchar_t,
|
|
},
|
|
},
|
|
raw_cell::RawCell,
|
|
@@ -1506,7 +1506,19 @@ pub unsafe extern "C" fn strtol(s: *const c_char, endptr: *mut *mut c_char, base
|
|
strto_impl!(c_long, true, c_long::MAX, c_long::MIN, s, endptr, base)
|
|
}
|
|
|
|
-// TODO: strtold(), when long double is available
|
|
+/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/strtod.html>.
|
|
+///
|
|
+/// Note: delegates to strtod and converts via relibc_dtold because c_longdouble
|
|
+/// is u128 (soft float) on this target. Precision is limited to double.
|
|
+#[unsafe(no_mangle)]
|
|
+pub unsafe extern "C" fn strtold(s: *const c_char, endptr: *mut *mut c_char) -> c_longdouble {
|
|
+ let mut result: c_longdouble = 0;
|
|
+ unsafe {
|
|
+ let d = strtod(s, endptr);
|
|
+ crate::header::stdio::printf::relibc_dtold(d, &mut result);
|
|
+ }
|
|
+ result
|
|
+}
|
|
|
|
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/strtol.html>.
|
|
#[unsafe(no_mangle)]
|