These procedures were removed in Guile 2.2 by commit
fc7bd367ab (May 2011).
* libguile/socket.h (scm_inet_aton, scm_inet_ntoa): Remove.
* module/system/repl/server.scm (make-tcp-server-socket): Use
'inet-pton' instead of 'inet-aton'.
* doc/ref/web.texi (HTTP): Likewise in 'declare-header!' example.
* doc/ref/posix.texi (Network Address Conversion): Remove documentation
of 'inet-ntoa' and 'inet-aton'.
As the FSF advises, 'There is no legal significance to using the
three-character sequence “(C)”, but it does no harm.' It does take up
space though! For that reason, we remove it here from our C files.
(inet_aton declaration, scm_inet_aton, scm_inet_ntoa,
scm_inet_netof, scm_lnaof, scm_inet_makeaddr, INADDR_ANY etc.):
moved to socket.c.
* net_db.h: declarations moved too.
* socket.c (scm_htonl, scm_ntohl): use uint32_t instead of unsigned
long.
(ipv6_net_to_num, ipv6_num_to_net): new static procedures.
(VALIDATE_INET6): new macro.
(scm_inet_pton, scm_inet_ntop): new procedures, implementing
inet-pton and inet-ntop.
(scm_fill_sockaddr): use VALIDATE_INET6 and ipv6_num_to_net.
(scm_addr_vector): use ipv6_net_to_num.
* socket.c (scm_htons, scm_ntohs, scm_htonl, scm_ntohl): new
functions for network data conversion.
* numbers.c (scm_num2long, scm_num2longlong):
throw out-of-range instead of wrong-type-arg if appropriate.
(scm_iint2str): handle -2^31 correctly.
(scm_num2long): handle -2^31 bignum correctly.
(scm_num2long_long): rewrite the bigdig case: basically copied
from scm_num2long.
numbers.h: (SCM_BITSPERLONGLONG): deleted.
* unif.c (rapr1): use sprintf instead of intprint for unsigned
longs: intprint can't cope with large values.
* numbers.c (scm_num2ulong): check more consistently that the
input is not negative. if it is, throw out-of-range instead of
wrong-type-arg.
* ramap.c (scm_array_fill_int): don't limit fill to INUM for
uvect, ivect or llvect.
Check that fill doesn't overflow short uniform array.
* __scm.h: add another long to the definition of long_long and
ulong_long.
* unif.c (scm_raprin1): use 'l' instead of "long_long" in the
print representation of llvect. read can't handle more than
one character.
(scm_dimensions_to_uniform_array): make "fill" an optional argument
instead of a rest argument.
* tags.h (scm_tc7_llvect): wasn't defined anywhere, so use the free
tag 29 for now.
* __scm.h: don't mention LONGLONGS.
* unif.c, numbers.c, eq.c, gc.c, print.c, eval.c, ramap.c:
replace LONGLONGS with HAVE_LONG_LONGS as set by configure.
* net_db.c (scm_inet_aton): throw errors using the misc-error key
instead of system-error. inet_aton doesn't set errno.
system-error isn't right in gethost either, since it's throwing
the value of h_errno instead of errno. so:
(scm_host_not_found_key, scm_try_again_key,
scm_no_recovery_key, scm_no_data_key): new error keys.
(scm_resolv_error): new procedure, use the new keys.
(scm_gethost): call scm_resolv_error not scm_syserror_msg.
* error.c: (various): use scm_cons instead of scm_listify
to build short lists.
* boot-9.scm (read-hash-extend to set up arrays): add 'l' for
long_long uniform vectors.
* networking.scm (sethostent, setnetent, setprotoent, setservent):
take an optional argument STAYOPEN. default is #f.
* readline.c (scm_init_readline): set rl_readline_name to Guile,
to allow conditionals in .inputrc.
* Makefile.am: remove AWK=@AWK@.
Add a rule for generating errnos.list.
(CLEANFILES): put errnos.list here instead of in DISTCLEANFILES.
* configure.in: add AC_SUBST(AWK) and AC_SUBST(ERRNO_EXTRACT).
don't extract errnos, just set a variable (avoids the
need to recompile error.c just because configure is run.)
* unif.h: update prototypes.
* unif.c (scm_uniform_array_read,write): change the offset and
length arguments to start and end, for consistency.
* __scm.h: uncomment SCM_ARG6 and SCM_ARG7, I needed SCM_ARG6.
* ioext.h: update prototypes.
* * ioext.c (scm_read_delimited_x): replaces scm_read_line and
scm_read_line_x, it's a more general procedure using an
interface from scsh. read-line and read-line! are now defined
in boot-9.scm.
* Note that the new read-line trims the terminator
by default, previously it was appended to the returned string. An
optional argument specifies how to process the terminator (scsh
compatible). For the old behaviour: (read-line port 'concat).
scm_read_line, scm_read_line_x: deleted. (read-line port 'split)
returns a pair, but is converted to multiple values if the scsh
module is loaded.
socket.h: update prototypes.
* socket.c (scm_recvfrom): for consistency with other procedures,
take start and end as separate optional arguments.
* (scm_recv, scm_recvfrom): don't allow the second argument
to be a size, only a buffer. Change the scheme names to
recv! and recvfrom!. Don't return the buffer.
* ioext.h, posix.h: move prototypes too.
* ioext.c, posix.c (scm_read_line, scm_read_line_x, scm_write_line:
moved back from posix.c to ioext.c. Also move #includes of "genio.h"
"read.h" and "unif.h".
* ioext.c: include "chars.h"
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>.
main #include path; put most of them in a subdirectory called
'libguile'. This avoids naming conflicts between Guile header
files and system header files (of which there were a few).
* Makefile.in (pkgincludedir): Deleted.
(innerincludedir): New variable; this and $(includedir) are enough.
(INCLUDE_CFLAGS): Search for headers in "-I$(srcdir)/..".
(installed_h_files): Divide this up. Now this variable lists
those header files which should go into $(includedir) (i.e. appear
directly in the #include path), and ...
(inner_h_files): ... this new variable says which files appear in
a subdirectory, and are referred to as <libguile/mumble.h>.
(h_files): List them both.
(install): Create innerincludedir, not pkgincludedir. Put
the installed_h_files and inner_h_files in their proper places.
(uninstall): Corresponding changes.
* alist.h, append.h, arbiters.h, async.h, boolean.h, chars.h,
continuations.h, debug.h, dynwind.h, error.h, eval.h, fdsocket.h,
feature.h, fports.h, gc.h, genio.h, gsubr.h, hash.h, init.h,
ioext.h, kw.h, libguile.h, list.h, markers.h, marksweep.h,
mbstrings.h, numbers.h, options.h, pairs.h, ports.h, posix.h,
print.h, procprop.h, procs.h, ramap.h, read.h, root.h,
sequences.h, smob.h, socket.h, srcprop.h, stackchk.h, stime.h,
strings.h, strop.h, strorder.h, strports.h, struct.h, symbols.h,
tag.h, throw.h, unif.h, variable.h, vectors.h, version.h,
vports.h, weaks.h: Find __scm.h in its new location.
* __scm.h: Find scmconfig.h and tags.h in their new locations
(they're both "inner" files).