mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40: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
|
Christopher Lee
|
||||||
Roland McGrath
|
Roland McGrath
|
||||||
Clark McGrew
|
Clark McGrew
|
||||||
|
Harald Meland
|
||||||
Thomas Morgan
|
Thomas Morgan
|
||||||
Jim Ravan
|
Jim Ravan
|
||||||
Daniel Risacher
|
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>
|
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
|
* ports.c (scm_close_port): Make sure the port is open before
|
||||||
|
|
|
@ -426,8 +426,6 @@ scm_stat (object)
|
||||||
int fdes;
|
int fdes;
|
||||||
struct stat stat_temp;
|
struct stat stat_temp;
|
||||||
|
|
||||||
object = SCM_COERCE_OUTPORT (object);
|
|
||||||
|
|
||||||
SCM_DEFER_INTS;
|
SCM_DEFER_INTS;
|
||||||
if (SCM_INUMP (object) || (SCM_NIMP (object) && SCM_OPFPORTP (object)))
|
if (SCM_INUMP (object) || (SCM_NIMP (object) && SCM_OPFPORTP (object)))
|
||||||
{
|
{
|
||||||
|
@ -435,7 +433,7 @@ scm_stat (object)
|
||||||
fdes = SCM_INUM (object);
|
fdes = SCM_INUM (object);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fdes = fileno ((FILE *) SCM_STREAM (object));
|
fdes = fileno ((FILE *) SCM_STREAM (SCM_COERCE_OUTPORT (object)));
|
||||||
if (fdes == -1)
|
if (fdes == -1)
|
||||||
scm_syserror (s_stat);
|
scm_syserror (s_stat);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue