Skip to content

gdatetime: Ignore %E modifier on 64-bit big-endian for the moment

Simon McVittie requested to merge wip/smcv/issue3225 into main

This doesn't appear to work reliably on s390x and ppc64, returning the results that were expected without %E or intermittently crashing. It seems that on little-endian 64-bit, the intptr_t returned by the undocumented _NL_TIME_ERA_NUM_ENTRIES correctly has the number of entries in its low-order half (at the time of writing, 0x0000'0000'0000'000b for Japan), but on big-endian 64-bit, it has the number of entries in its high-order half instead (for example 0x0000'000b'xxxx'xxxx for Japan), with the low-order half being all-zero or possibly uninitialized.

Making this reliable will require some sort of defined API from glibc.

Helps: #3225 (closed)

Closes #3225 (closed)

Edited by Philip Withnall

Merge request reports