Skip to content

Commit e08b282

Browse files
gh-127614: Correctly check for ttyname_r() in configure (#128503)
PR #14868 replaced the ttyname() call with ttyname_r(), but the old check remained.
1 parent 07e6aa2 commit e08b282

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

Modules/clinic/posixmodule.c.h

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/posixmodule.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -3347,7 +3347,7 @@ os_access_impl(PyObject *module, path_t *path, int mode, int dir_fd,
33473347
#endif
33483348

33493349

3350-
#ifdef HAVE_TTYNAME
3350+
#ifdef HAVE_TTYNAME_R
33513351
/*[clinic input]
33523352
os.ttyname
33533353

configure

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -5152,7 +5152,7 @@ AC_CHECK_FUNCS([ \
51525152
sigfillset siginterrupt sigpending sigrelse sigtimedwait sigwait \
51535153
sigwaitinfo snprintf splice strftime strlcpy strsignal symlinkat sync \
51545154
sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile \
5155-
tmpnam tmpnam_r truncate ttyname umask uname unlinkat unlockpt utimensat utimes vfork \
5155+
tmpnam tmpnam_r truncate ttyname_r umask uname unlinkat unlockpt utimensat utimes vfork \
51565156
wait wait3 wait4 waitid waitpid wcscoll wcsftime wcsxfrm wmemcmp writev \
51575157
])
51585158

pyconfig.h.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -1506,8 +1506,8 @@
15061506
/* Define to 1 if you have the 'truncate' function. */
15071507
#undef HAVE_TRUNCATE
15081508

1509-
/* Define to 1 if you have the 'ttyname' function. */
1510-
#undef HAVE_TTYNAME
1509+
/* Define to 1 if you have the 'ttyname_r' function. */
1510+
#undef HAVE_TTYNAME_R
15111511

15121512
/* Define to 1 if you don't have 'tm_zone' but do have the external array
15131513
'tzname'. */

0 commit comments

Comments
 (0)