mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-21 19:20:21 +02:00
Changes from arch/CVS synchronization
This commit is contained in:
parent
3dcf33733c
commit
a1ef740636
8 changed files with 50 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-06-07 Ludovic Courtès <ludovic.courtes@laas.fr>
|
||||
|
||||
* posix.c (scm_ttyname): Check whether RESULT is NULL before
|
||||
making a string from it (reported by Dan McMahill). Don't call
|
||||
`scm_from_locale_string ()' before the mutex is released.
|
||||
|
||||
2007-05-26 Ludovic Courtès <ludo@chbouib.org>
|
||||
|
||||
* eval.c (scm_m_define): Updated comment. Changed order for value
|
||||
|
|
|
@ -842,7 +842,7 @@ SCM_DEFINE (scm_ttyname, "ttyname", 1, 0, 0,
|
|||
{
|
||||
char *result;
|
||||
int fd, err;
|
||||
SCM ret;
|
||||
SCM ret = SCM_BOOL_F;
|
||||
|
||||
port = SCM_COERCE_OUTPORT (port);
|
||||
SCM_VALIDATE_OPPORT (1, port);
|
||||
|
@ -851,9 +851,12 @@ SCM_DEFINE (scm_ttyname, "ttyname", 1, 0, 0,
|
|||
fd = SCM_FPORT_FDES (port);
|
||||
|
||||
scm_i_scm_pthread_mutex_lock (&scm_i_misc_mutex);
|
||||
|
||||
SCM_SYSCALL (result = ttyname (fd));
|
||||
err = errno;
|
||||
ret = scm_from_locale_string (result);
|
||||
if (result != NULL)
|
||||
result = strdup (result);
|
||||
|
||||
scm_i_pthread_mutex_unlock (&scm_i_misc_mutex);
|
||||
|
||||
if (!result)
|
||||
|
@ -861,6 +864,9 @@ SCM_DEFINE (scm_ttyname, "ttyname", 1, 0, 0,
|
|||
errno = err;
|
||||
SCM_SYSERROR;
|
||||
}
|
||||
else
|
||||
ret = scm_take_locale_string (result);
|
||||
|
||||
return ret;
|
||||
}
|
||||
#undef FUNC_NAME
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue