]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-135497: fix `MAXLOGNAME` detection in `configure.ac` (GH-135508) (#135517)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 14 Jun 2025 16:49:13 +0000 (18:49 +0200)
committerGitHub <noreply@github.com>
Sat, 14 Jun 2025 16:49:13 +0000 (16:49 +0000)
gh-135497: fix `MAXLOGNAME` detection in `configure.ac` (GH-135508)
(cherry picked from commit 2e15a50851da66eb8227ec6ea07a9cc7ed08fbf3)

Co-authored-by: Caleb Xu <calebcenter@live.com>
Misc/NEWS.d/next/Build/2025-06-14-10-32-11.gh-issue-135497.ajlV4F.rst [new file with mode: 0644]
Misc/NEWS.d/next/Library/2025-06-14-14-19-13.gh-issue-135497.1pzwdA.rst [new file with mode: 0644]
configure
configure.ac

diff --git a/Misc/NEWS.d/next/Build/2025-06-14-10-32-11.gh-issue-135497.ajlV4F.rst b/Misc/NEWS.d/next/Build/2025-06-14-10-32-11.gh-issue-135497.ajlV4F.rst
new file mode 100644 (file)
index 0000000..c84663b
--- /dev/null
@@ -0,0 +1 @@
+Fix the detection of ``MAXLOGNAME`` in the ``configure.ac`` script.
diff --git a/Misc/NEWS.d/next/Library/2025-06-14-14-19-13.gh-issue-135497.1pzwdA.rst b/Misc/NEWS.d/next/Library/2025-06-14-14-19-13.gh-issue-135497.1pzwdA.rst
new file mode 100644 (file)
index 0000000..d3e81de
--- /dev/null
@@ -0,0 +1 @@
+Fix :func:`os.getlogin` failing for longer usernames on BSD-based platforms.
index 519caa8ca741f402bf34fe8f420ae555418e8d98..a0da75f9bec61b62787b90781c12b18793ce9ebd 100755 (executable)
--- a/configure
+++ b/configure
@@ -21893,7 +21893,7 @@ fi
 
 
 
-ac_fn_check_decl "$LINENO" "MAXLOGNAME" "ac_cv_have_decl_MAXLOGNAME" "#include <sys/params.h>
+ac_fn_check_decl "$LINENO" "MAXLOGNAME" "ac_cv_have_decl_MAXLOGNAME" "#include <sys/param.h>
 " "$ac_c_undeclared_builtin_options" "CFLAGS"
 if test "x$ac_cv_have_decl_MAXLOGNAME" = xyes
 then :
index 2a037569e492b2beebe37b43c87009716153753d..9c67dab2b46e738f3af76ba6a77cb0baabcdda9e 100644 (file)
@@ -5404,7 +5404,7 @@ AC_CHECK_DECL([MAXLOGNAME],
               [AC_DEFINE([HAVE_MAXLOGNAME], [1],
                          [Define if you have the 'MAXLOGNAME' constant.])],
               [],
-              [@%:@include <sys/params.h>])
+              [@%:@include <sys/param.h>])
 
 AC_CHECK_DECLS([UT_NAMESIZE],
               [AC_DEFINE([HAVE_UT_NAMESIZE], [1],