Skip to content

gh-123681: Check the strftime() behavior at runtime instead of at the compile time #128444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jan 3, 2025

It is needed to support cross-compiling.
Remove macros Py_NORMALIZE_CENTURY and Py_STRFTIME_C99_SUPPORT.

…at the compile time

It is needed to support cross-compiling.
Remove macros Py_NORMALIZE_CENTURY and Py_STRFTIME_C99_SUPPORT.
@erlend-aasland
Copy link
Contributor

This PR is not needed anymore. Please see the issue history.

@serhiy-storchaka
Copy link
Member Author

No, it is needed to support cross-compiling. You cannot check the runtime behavior at compile time when cross-compiling.

@erlend-aasland
Copy link
Contributor

No, it is needed to support cross-compiling. You cannot check the runtime behavior at compile time when cross-compiling.

There is no need; we require C99 compliant strftime.

@serhiy-storchaka
Copy link
Member Author

It is not C99 compliant (or at least not Python documentation compliant) on Linux. This is why this workaround was needed at first place.

@erlend-aasland
Copy link
Contributor

It is not C99 compliant (or at least not Python documentation compliant) on Linux. This is why this workaround was needed at first place.

If that was the case, all our Linux build bots and Linux CI would now be broken. However it is not.

@serhiy-storchaka
Copy link
Member Author

I wonder why? I guess because ac_cv_normalize_century=yes if cross-compiling.

@erlend-aasland
Copy link
Contributor

I wonder why?

Because it is C99 compliant, presumably.

I guess because ac_cv_normalize_century=yes if cross-compiling.

ac_cv_normalize_century is not used. It is also set to the empty string, not yes if cross-compiling.

@serhiy-storchaka
Copy link
Member Author

It is used:

if test "$ac_cv_normalize_century" = yes

And it is set to "yes":
[ac_cv_normalize_century=yes])])

@erlend-aasland
Copy link
Contributor

Sorry, I misread it as ac_cv_strftime_c99_support.

@picnixz
Copy link
Member

picnixz commented Apr 4, 2025

What's the status of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants