Closed geekosaur closed 6 months ago
Do we want to make a Hackage update for this?
Do we want to make a Hackage update for this?
Sure, why not
I wonder why this ever worked… did we just get extremely lucky that the bytes happened to be zeroed somehow?
(Anyway, the new code will break again somewhat soon because Debian is transitioning to 64-bit time_t on 32-bit platforms but CLong is 32-bit. Wouldn't be surprised if nobody complains though because who runs xmonad on a 32-bit Debian these days?)
xmonad doesn't use this API, and the OP said it took (iirc) several hundred calls before the upper bits went nonzero.
Oh, also, the code just replicates unix
's CTimeVal
, so there will be bigger breakage afoot in the Haskell community when that happens. (cc @Bodigrim)
I'm out of context, but if you raise an issue at https://github.com/haskell/unix/issues it would be most appreciated.
I'm out of context, but if you raise an issue at https://github.com/haskell/unix/issues it would be most appreciated.
https://github.com/haskell/unix/pull/252#issuecomment-2081042452
It also looks like the Debian people are submitting patches upstream (and backporting them in Debian) throughout the t64 migration so it's quite possible they'd take care of it eventually anyway.
(Anyway, the new code will break again somewhat soon because Debian is transitioning to 64-bit time_t on 32-bit platforms but CLong is 32-bit. Wouldn't be surprised if nobody complains though because who runs xmonad on a 32-bit Debian these days?)
We'll also need to use CApiFFI
for select
if we want to be Y2038-safe on i386. Which we maybe don't care about because by then maybe the whole Wayland thing will be concluded, and there won't be any 32-bit xmonad users anyway…
(Anyway, the new code will break again somewhat soon because Debian is transitioning to 64-bit time_t on 32-bit platforms but CLong is 32-bit. Wouldn't be surprised if nobody complains though because who runs xmonad on a 32-bit Debian these days?)
We'll also need to use
CApiFFI
forselect
if we want to be Y2038-safe on i386. Which we maybe don't care about because by then maybe the whole Wayland thing will be concluded, and there won't be any 32-bit xmonad users anyway…
Actually, the impact is even more limited. Debian's i386 port is staying with 32-bit time_t because its main usecase is compatibility with old i386 binaries, and breaking ABI would defeat that purporse. So it's only the armel, armhf, and a few non-release architectures (whatever that means in Debian terminology) that are actually affected by the ABI change.
So… it essentially only affects people with the Nokia N900 and similar old hardware… :-D
Fixes #99. Eventually we should update
waitForEvent
's type signature to match.