From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 8 Jul 2025 08:43:57 +0000 (+0200) Subject: [3.14] gh-120713: Make _Py_NORMALIZE_CENTURY private (GH-135933) (#136387) X-Git-Tag: v3.14.0b4~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=376e037eccdb7a75c28725b470bd7f916a9bb987;p=thirdparty%2FPython%2Fcpython.git [3.14] gh-120713: Make _Py_NORMALIZE_CENTURY private (GH-135933) (#136387) Co-authored-by: Petr Viktorin --- diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 9bba0e3354b2..f5a9712b64e4 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -1928,7 +1928,7 @@ wrap_strftime(PyObject *object, PyObject *format, PyObject *timetuple, } replacement = freplacement; } -#ifdef Py_NORMALIZE_CENTURY +#ifdef _Py_NORMALIZE_CENTURY else if (ch == 'Y' || ch == 'G' || ch == 'F' || ch == 'C' ) { diff --git a/configure b/configure index a9257ac0b3ac..1646efe5f061 100755 --- a/configure +++ b/configure @@ -28234,7 +28234,7 @@ printf "%s\n" "$ac_cv_normalize_century" >&6; } if test "$ac_cv_normalize_century" = yes then -printf "%s\n" "#define Py_NORMALIZE_CENTURY 1" >>confdefs.h +printf "%s\n" "#define _Py_NORMALIZE_CENTURY 1" >>confdefs.h fi diff --git a/configure.ac b/configure.ac index 225dfc79ab5b..d868f7b26bad 100644 --- a/configure.ac +++ b/configure.ac @@ -6813,7 +6813,7 @@ int main(void) [ac_cv_normalize_century=yes])]) if test "$ac_cv_normalize_century" = yes then - AC_DEFINE([Py_NORMALIZE_CENTURY], [1], + AC_DEFINE([_Py_NORMALIZE_CENTURY], [1], [Define if year with century should be normalized for strftime.]) fi diff --git a/pyconfig.h.in b/pyconfig.h.in index d7c496fccc68..1c533b2bfb7f 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1737,9 +1737,6 @@ SipHash13: 3, externally defined: 0 */ #undef Py_HASH_ALGORITHM -/* Define if year with century should be normalized for strftime. */ -#undef Py_NORMALIZE_CENTURY - /* Define if you want to enable remote debugging support. */ #undef Py_REMOTE_DEBUG @@ -2026,6 +2023,9 @@ /* HACL* library can compile SIMD256 implementations */ #undef _Py_HACL_CAN_COMPILE_VEC256 +/* Define if year with century should be normalized for strftime. */ +#undef _Py_NORMALIZE_CENTURY + /* Define to force use of thread-safe errno, h_errno, and other functions */ #undef _REENTRANT