mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 17:50:29 +02:00
Don't use local_fgets on sockets; ftell doesn't work on sockets.
(Thanks to Jorgen "forcer" Schaefer.) * ports.h (SCM_NOFTELL): New flag. * fports.c (local_fgets): If it's set, use the generic fgets. * socket.c (scm_socket): Set SCM_NOFTELL on the ports we produce.
This commit is contained in:
parent
ccd9642e20
commit
d9803e92ba
3 changed files with 12 additions and 0 deletions
|
@ -107,6 +107,7 @@ scm_socket (family, style, proto)
|
|||
SCM_DEFER_INTS;
|
||||
fd = socket (SCM_INUM (family), SCM_INUM (style), SCM_INUM (proto));
|
||||
result = scm_sock_fd_to_port (fd, s_socket);
|
||||
SCM_SETOR_CAR (result, SCM_NOFTELL);
|
||||
SCM_ALLOW_INTS;
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue