xmonad / X11

A Haskell binding to the X11 graphics library.
http://hackage.haskell.org/package/X11
Other
104 stars 48 forks source link

TimeVal's members are 64 bit, per the unix package #100

Closed geekosaur closed 6 months ago

geekosaur commented 6 months ago

Fixes #99. Eventually we should update waitForEvent's type signature to match.

geekosaur commented 6 months ago

Do we want to make a Hackage update for this?

slotThe commented 6 months ago

Do we want to make a Hackage update for this?

Sure, why not

liskin commented 6 months ago

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?)

geekosaur commented 6 months ago

xmonad doesn't use this API, and the OP said it took (iirc) several hundred calls before the upper bits went nonzero.

geekosaur commented 6 months ago

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)

Bodigrim commented 6 months ago

I'm out of context, but if you raise an issue at https://github.com/haskell/unix/issues it would be most appreciated.

liskin commented 6 months ago

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.

liskin commented 6 months ago

(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…

liskin commented 6 months ago

(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…

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