mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
(fport_print): Use scm_ttyname instead of ttyname directly,
to get thread safety of scm_ttyname.
This commit is contained in:
parent
8e4d7cdf06
commit
eb37258527
1 changed files with 2 additions and 1 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "libguile/strings.h"
|
||||
#include "libguile/validate.h"
|
||||
#include "libguile/gc.h"
|
||||
#include "libguile/posix.h"
|
||||
#include "libguile/dynwind.h"
|
||||
|
||||
#include "libguile/fports.h"
|
||||
|
@ -509,7 +510,7 @@ fport_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
|
|||
|
||||
#ifdef HAVE_TTYNAME
|
||||
if (isatty (fdes))
|
||||
scm_puts (ttyname (fdes), port);
|
||||
scm_display (scm_ttyname (exp), port);
|
||||
else
|
||||
#endif /* HAVE_TTYNAME */
|
||||
scm_intprint (fdes, 10, port);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue