* filesys.c (scm_input_waiting_p): use select in preference to
authorGary Houston <ghouston@arglist.com>
Sat, 21 Dec 1996 04:13:54 +0000 (04:13 +0000)
committerGary Houston <ghouston@arglist.com>
Sat, 21 Dec 1996 04:13:54 +0000 (04:13 +0000)
commit370312ae6e74756a825f3eeed0e227c568142f16
treeddb2b3a1ebc2890aa25237d7b52b7517508e4f0c
parent80df313695809d4a8fcd96ad6b2e2269b016db26
* filesys.c (scm_input_waiting_p): use select in preference to
FIONREAD, since the latter doesn't detect EOF.
Throw error if neither select nor FIONREAD available.

* socket.c (scm_connect): take a port, not a fd object.
(scm_fill_sockaddr): throw an error if fam is not recognised.
(scm_bind): use scm_fill_sockaddr.
(scm_listen): take a port, not a fd object.
(scm_accept): take and return a port.  return CDR in the car if
address can't be got
(scm_sock_fd_to_port): new procedure.
(scm_socket): use scm_sock_fd_to_port.
(scm_addr_vector): throw error if unrecognised address type.
take an extra argument with the calling procedure name.
(scm_getsockname): take a port.  return #f if address can't be got.
(scm_getpeername): take a port.  return #f if address can't be got.
(scm_recvfrom): take a port.  return #f for address component if can't
be got.
(scm_sendto, scm_socketpair, scm_getsockopt scm_shutdown,
scm_setsockopt, scm_recv, scm_send): take a port not a fd object.
* socket.h (SCM_P): update bind prototype.
* socket.c (scm_init_socket): intern PF_UNSPEC, PF_UNIX, PF_INET.
include "feature.h".
(scm_socket): return a port, not a file descriptor object.
include "fports.h" and <unistd.h>
(scm_bind): take a port, not a file descriptor object.
take an extra argument for address args.

* net_db.c (scm_init_net_db): intern INADDR_ANY, INADDR_BROADCAST,
INADDR_NONE, INADDR_LOOPBACK.
* init.c: include net_db.h and not fdsocket.h.
(scm_boot_guile_1): call scm_init_net_db and not scm_init_fdsocket.

* Makefile.am: corresponding changes.
* socket.h: renamed from fdsocket.h, fix names.
* net_db.h: renamed from socket.h, fix names.
* socket.c: renamed from fdsocket.c.
remove _sys from procedure names.
(scm_init_socket): rename from scm_init_fdsocket.  include socket.x.
add "socket" to features list.
* net_db.c: renamed from socket.c.
remove _sys from procedure names.
(scm_init_net_db): rename from scm_init_socket.  include net_db.x.
add "net-db" to features list.
include "net_db.h".  don't include <sys/socket.h> or
<sys/un.h>.
libguile/ChangeLog
libguile/Makefile.am
libguile/Makefile.in
libguile/configure
libguile/filesys.c
libguile/init.c
libguile/net_db.c [copied from libguile/socket.c with 86% similarity]
libguile/net_db.h [new file with mode: 0644]
libguile/socket.c
libguile/socket.h