Skip to content

Commit

Permalink
[3.12] pythongh-127614: Correctly check for ttyname_r() in configure (p…
Browse files Browse the repository at this point in the history
…ython#128503)

(cherry picked from commit e08b282)

PR python#14868 replaced the ttyname() call with ttyname_r(), but the old
check remained.
  • Loading branch information
erlend-aasland committed Jan 7, 2025
1 parent 82b061d commit b73b2b1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Modules/clinic/posixmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3237,7 +3237,7 @@ os_access_impl(PyObject *module, path_t *path, int mode, int dir_fd,
#endif


#ifdef HAVE_TTYNAME
#ifdef HAVE_TTYNAME_R
/*[clinic input]
os.ttyname
Expand Down
6 changes: 3 additions & 3 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -4941,7 +4941,7 @@ AC_CHECK_FUNCS([ \
sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \
sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
sysconf system tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \
tmpnam tmpnam_r truncate ttyname umask uname unlinkat utimensat utimes vfork \
tmpnam tmpnam_r truncate ttyname_r umask uname unlinkat utimensat utimes vfork \
wait wait3 wait4 waitid waitpid wcscoll wcsftime wcsxfrm wmemcmp writev \
])

Expand Down
4 changes: 2 additions & 2 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1435,8 +1435,8 @@
/* Define to 1 if you have the `truncate' function. */
#undef HAVE_TRUNCATE

/* Define to 1 if you have the `ttyname' function. */
#undef HAVE_TTYNAME
/* Define to 1 if you have the `ttyname_r' function. */
#undef HAVE_TTYNAME_R

/* Define to 1 if you don't have `tm_zone' but do have the external array
`tzname'. */
Expand Down

0 comments on commit b73b2b1

Please sign in to comment.