mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 12:20:20 +02:00
* 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>.
This commit is contained in:
parent
80df313695
commit
370312ae6e
10 changed files with 1352 additions and 362 deletions
|
@ -49,21 +49,24 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
extern SCM scm_sys_gethost SCM_P ((SCM name));
|
||||
extern SCM scm_sys_inet_aton SCM_P ((SCM address));
|
||||
extern SCM scm_inet_ntoa SCM_P ((SCM inetid));
|
||||
extern SCM scm_inet_netof SCM_P ((SCM address));
|
||||
extern SCM scm_lnaof SCM_P ((SCM address));
|
||||
extern SCM scm_inet_makeaddr SCM_P ((SCM net, SCM lna));
|
||||
extern SCM scm_sys_getnet SCM_P ((SCM name));
|
||||
extern SCM scm_sys_getproto SCM_P ((SCM name));
|
||||
extern SCM scm_sys_getserv SCM_P ((SCM name, SCM proto));
|
||||
extern SCM scm_sethost SCM_P ((SCM arg));
|
||||
extern SCM scm_setnet SCM_P ((SCM arg));
|
||||
extern SCM scm_setproto SCM_P ((SCM arg));
|
||||
extern SCM scm_setserv SCM_P ((SCM arg));
|
||||
extern SCM scm_socket SCM_P ((SCM family, SCM style, SCM proto));
|
||||
extern SCM scm_socketpair SCM_P ((SCM family, SCM style, SCM proto));
|
||||
extern SCM scm_getsockopt SCM_P ((SCM sfd, SCM level, SCM optname));
|
||||
extern SCM scm_setsockopt SCM_P ((SCM sfd, SCM level, SCM optname, SCM value));
|
||||
extern SCM scm_shutdown SCM_P ((SCM sfd, SCM how));
|
||||
extern SCM scm_connect SCM_P ((SCM sockfd, SCM fam, SCM address, SCM args));
|
||||
extern SCM scm_bind SCM_P ((SCM sockfd, SCM fam, SCM address, SCM args));
|
||||
extern SCM scm_listen SCM_P ((SCM sfd, SCM backlog));
|
||||
extern SCM scm_accept SCM_P ((SCM sockfd));
|
||||
extern SCM scm_getsockname SCM_P ((SCM sockfd));
|
||||
extern SCM scm_getpeername SCM_P ((SCM sockfd));
|
||||
extern SCM scm_recv SCM_P ((SCM sockfd, SCM buff_or_size, SCM flags));
|
||||
extern SCM scm_send SCM_P ((SCM sockfd, SCM message, SCM flags));
|
||||
extern SCM scm_recvfrom SCM_P ((SCM sockfd, SCM buff_or_size, SCM flags));
|
||||
extern SCM scm_sendto SCM_P ((SCM sockfd, SCM message, SCM fam, SCM address, SCM args_and_flags));
|
||||
extern void scm_init_socket SCM_P ((void));
|
||||
|
||||
#endif /* SOCKETH */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue