mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 14:30:34 +02:00
* filesys.c (scm_stat): Coerce output port only if argument *is*
an output port! (Thanks to Harald Meland.)
This commit is contained in:
parent
1d16e405be
commit
380463881a
3 changed files with 7 additions and 3 deletions
1
THANKS
1
THANKS
|
@ -16,6 +16,7 @@ Bug reports and fixes from:
|
|||
Christopher Lee
|
||||
Roland McGrath
|
||||
Clark McGrew
|
||||
Harald Meland
|
||||
Thomas Morgan
|
||||
Jim Ravan
|
||||
Daniel Risacher
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
1997-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
|
||||
|
||||
* filesys.c (scm_stat): Coerce output port only if argument *is*
|
||||
an output port! (Thanks to Harald Meland.)
|
||||
|
||||
Wed Dec 3 12:23:06 1997 Jim Blandy <jimb@totoro.red-bean.com>
|
||||
|
||||
* ports.c (scm_close_port): Make sure the port is open before
|
||||
|
|
|
@ -426,8 +426,6 @@ scm_stat (object)
|
|||
int fdes;
|
||||
struct stat stat_temp;
|
||||
|
||||
object = SCM_COERCE_OUTPORT (object);
|
||||
|
||||
SCM_DEFER_INTS;
|
||||
if (SCM_INUMP (object) || (SCM_NIMP (object) && SCM_OPFPORTP (object)))
|
||||
{
|
||||
|
@ -435,7 +433,7 @@ scm_stat (object)
|
|||
fdes = SCM_INUM (object);
|
||||
else
|
||||
{
|
||||
fdes = fileno ((FILE *) SCM_STREAM (object));
|
||||
fdes = fileno ((FILE *) SCM_STREAM (SCM_COERCE_OUTPORT (object)));
|
||||
if (fdes == -1)
|
||||
scm_syserror (s_stat);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue