1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 05:50:26 +02:00

* ports.c (scm_add_to_port_table): allocate in units of

struct scm_port_table *, not struct scm_port_table.
	* posix.c (scm_close_pipe): remove the port from the port table
	and mark as closed.
	Thanks to Rob Engle for both fixes.
This commit is contained in:
Gary Houston 1998-03-03 10:11:13 +00:00
parent 186d31e78c
commit 67fe060ed5
3 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,11 @@
Mon Mar 2 21:35:02 1998 Gary Houston <ghouston@actrix.gen.nz>
* ports.c (scm_add_to_port_table): allocate in units of
struct scm_port_table *, not struct scm_port_table.
* posix.c (scm_close_pipe): remove the port from the port table
and mark as closed.
Thanks to Rob Engle for both fixes.
1998-02-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
* iselect.h, iselect.c, coop.c, coop-threads.c, coop-threads.h,

View file

@ -246,8 +246,8 @@ scm_add_to_port_table (port)
{
scm_port_table = ((struct scm_port_table **)
realloc ((char *) scm_port_table,
(long) (sizeof (struct scm_port_table)
* scm_port_table_room * 2)));
(scm_sizet) (sizeof (struct scm_port_table *)
* scm_port_table_room * 2)));
/* !!! error checking */
scm_port_table_room *= 2;
}

View file

@ -988,6 +988,8 @@ scm_close_pipe (port)
&& SCM_OPENP (port), port, SCM_ARG1, s_close_pipe);
SCM_DEFER_INTS;
rv = pclose ((FILE *) SCM_STREAM (port));
scm_remove_from_port_table (port);
SCM_SETAND_CAR (port, ~SCM_OPN);
if (rv == -1)
scm_syserror (s_close_pipe);
SCM_ALLOW_INTS;