1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
Commit graph

177 commits

Author SHA1 Message Date
Ludovic Courtès
f43f362018 Changes from arch/CVS synchronization 2007-09-02 22:56:56 +00:00
Ludovic Courtès
1ac5fb45bc Changes from arch/CVS synchronization 2007-09-02 10:55:58 +00:00
Ludovic Courtès
7a5fb79613 Changes from arch/CVS synchronization 2007-06-12 21:55:11 +00:00
Kevin Ryde
8ab3d8a068 merge from 1.8 branch 2006-10-09 23:40:48 +00:00
Kevin Ryde
2b829bbb3d merge from 1.8 branch 2006-04-17 00:05:42 +00:00
Neil Jerram
d7c6575f3f (scm_c_make_socket_address): Pass address_size pointer
on to scm_fill_sockaddr call.
2006-02-09 14:27:05 +00:00
Marius Vollmer
661ae7ab6b Renamed the "frames" that are related to dynamic-wind to "dynamic
contexts.  Renamed all functions from scm_frame_ to scm_dynwind_.
Updated documentation.
2006-01-29 00:23:28 +00:00
Kevin Ryde
bc73234284 (scm_fill_sockaddr): Remove SCM_C_INLINE_KEYWORD, this is
much too big to want to inline.
2005-11-26 00:52:52 +00:00
Kevin Ryde
f1b7209b2d (scm_setsockopt): Missing @defvar in docstring. Reported
by Ludovic Courtès.
2005-11-12 00:59:28 +00:00
Kevin Ryde
9c0129aca2 2005-10-27 Ludovic Courtès <ludovic.courtes@laas.fr>
* socket.c (scm_fill_sockaddr): No need to check NULL from scm_malloc.
	(scm_connect, scm_bind, scm_sendto): Accept sockaddr object.
	(scm_addr_vector): Renamed to _scm_from_sockaddr, update usages.
	(scm_from_sockaddr, scm_to_sockaddr, scm_make_socket_address,
	scm_c_make_socket_address): New functions.
2005-10-27 00:22:54 +00:00
Kevin Ryde
72e3dae1e3 (scm_getsockopt, scm_setsockopt): Update docstrings from posix.texi. 2005-10-23 21:56:09 +00:00
Kevin Ryde
8fae2bf483 (scm_init_socket): Add IPPROTO_IP, IPPROTO_TCP,
IPPROTO_UDP.  Remove SOL_IP, SOL_TCP, SOL_UDP.  The former are in
POSIX spec examples, the latter are not available on for instance
NetBSD.
2005-10-23 21:35:01 +00:00
Kevin Ryde
5ee417fc83 (scm_inet_pton, scm_inet_ntop): Pointer cast to scm_t_uint8
for scm ipv6 funcs, gcc 4 is picky about char* vs uchar*.
(scm_getsockopt, scm_accept, scm_getsockname, scm_getpeername,
scm_recvfrom) Use socklen_t, gcc 4 is picky about int* vs socklen_t*.
2005-07-10 01:56:07 +00:00
Marius Vollmer
ecc9f40fe5 * hashtab.h: Bugfix: use SCM_API (WAS: extern).
* socket.c: Remove obsolete comment about socklen_t.
(s_scm_setsockopt)[!HAVE_IP_MREQ]: Do not use ip_mreq code.

* numbers.h (isnan)[__MINGW32__]: Remove.

* Makefile.am (gen_scmconfig_SOURCES): Bugfix: Add
DEFAULT_INCLUDES when cross compiling.

* threads.c (ETIMEDOUT, pipe)[__MINGW32__]: Add defines.

* stime.c (s_scm_strftime)[!HAVE_TM_ZONE]: Use
SCM_SIMPLE_VECTOR_REF instead of SCM_VELTS.  (Changed slightly
from Jan's patch.)
2005-06-05 18:27:53 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Marius Vollmer
1c80707c55 (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP
options.  Also, reorganized the code a bit for cleanliness.  Thanks to
Greg Troxel!
2005-02-27 23:50:30 +00:00
Marius Vollmer
4057a3e05a Use new vector elements API or simple vector API, as appropriate.
Removed SCM_HAVE_ARRAYS ifdefery.  Replaced all uses of
SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
2005-01-02 20:49:04 +00:00
Kevin Ryde
2b4d15471c (scm_from_ipv6): Just use mpz_import. Don't bother trying
to fit scm_from_ulong_long, since that uses mpz_import anyway.  Don't
bother trying to fit scm_from_ulong, not really worth the trouble if
addresses are more than 4 bytes usually.
2004-12-10 00:41:33 +00:00
Marius Vollmer
d2e53ed6f8 *** empty log message *** 2004-09-22 17:41:37 +00:00
Kevin Ryde
93b047f413 (scm_fill_sockaddr): Use HAVE_STRUCT_SOCKADDR_SIN_LEN and
HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN for sockaddr fields, SIN_LEN and
SIN_LEN6 are not defined on all systems.  Reported by Michael Tuexen.
2004-08-27 01:06:50 +00:00
Marius Vollmer
cc95e00ac6 * strings.h, strings.c: (scm_i_string_chars, scm_i_string_length,
scm_i_string_writable_chars, scm_i_string_stop_writing): New, to
replace SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH.  Updated all
uses.
(scm_i_make_string, scm_c_make_string): New, to replace
scm_allocate_string.  Updated all uses.
(SCM_STRINGP, SCM_STRING_CHARS, SCM_STRING_UCHARS,
SCM_STRING_LENGTH): Deprecated.
(scm_allocate_string, scm_take_str, scm_take0str, scm_mem2string,
scm_str2string, scm_makfrom0str, scm_makfrom0str_opt):
Discouraged.  Replaced all uses with scm_from_locale_string or
similar, as appropriate.
(scm_c_string_length, scm_c_string_ref, scm_c_string_set_x,
scm_c_substring, scm_c_substring_shared, scm_c_substring_copy,
scm_substring_shared, scm_substring_copy): New.

* symbols.c, symbols.h (SCM_SYMBOLP, SCM_SYMBOL_FUNC,
SCM_SET_SYMBOL_FUNC, SCM_SYMBOL_PROPS, SCM_SET_SYMBOL_PROPS,
SCM_SYMBOL_HASH, SCM_SYMBOL_INTERNED_P, scm_mem2symbol,
scm_str2symbol, scm_mem2uninterned_symbol): Discouraged.
(SCM_SYMBOL_LENGTH, SCM_SYMBOL_CHARS, scm_c_symbol2str):
Deprecated.
(SCM_MAKE_SYMBOL_TAG, SCM_SET_SYMBOL_LENGTH, SCM_SET_SYMBOL_CHARS,
SCM_PROP_SLOTS, SCM_SET_PROP_SLOTS): Removed.
(scm_is_symbol, scm_from_locale_symbol, scm_from_locale_symboln):
New, to replace scm_str2symbol and scm_mem2symbol, respectively.
Updated all uses.
(scm_gensym): Generate only the number suffix in the buffer, just
string-append the prefix.
2004-08-19 17:19:44 +00:00
Kevin Ryde
6f637a1bc0 (scm_init_socket): Add SOCK_SEQPACKET and SOCK_RDM. 2004-08-17 23:44:25 +00:00
Marius Vollmer
396e5506d6 * socket.c (scm_inet_aton, scm_inet_pton): Convert SCM strings to
locale strings instead of accessing their internals.
(scm_recv, scm_send, scm_recvfrom, scm_sendto): Use
SCM_I_STRING_CHARS and SCM_I_STRING_LENGTH instead of
SCM_STRING_CHARS and SCM_STRING_LENGTH.

* socket.c, rw.c, deprecated.h, validate.h
(SCM_VALIDATE_STRING_COPY): Deprecated.  Replaced all uses with
SCM_VALIDATE_STRING plus SCM_I_STRING_CHARS or
scm_to_locale_string, etc.
(SCM_VALIDATE_SUBSTRING_SPEC_COPY): Deprecated.  Replaced as
above, plus scm_i_get_substring_spec.
2004-08-12 17:43:17 +00:00
Marius Vollmer
7f9994d904 * stime.c, socket.c, simpos.c, procs.c, posix.c, ports.c,
net_db.c, fports.c, filesys.c, eval.c, deprecation.c, dynl.c:
Replaced uses of SCM_STRING_CHARS with proper uses of
scm_to_locale_string.  Replaced SCM_STRINGP with scm_is_string.
Replaced scm_mem2string with scm_from_locale_string.

* simpos.c, posix.c (allocate_string_pointers, environ_list_to_c):
Removed, replaced all uses with scm_i_allocate_string_pointers.
2004-08-10 14:08:02 +00:00
Marius Vollmer
b9bd8526f0 * numbers.h, numbers.c, discouraged.h, discouraged.c (scm_short2num,
scm_ushort2num, scm_int2num, scm_uint2num, scm_long2num,
scm_ulong2num, scm_size2num, scm_ptrdiff2num, scm_num2short,
scm_num2ushort, scm_num2int, scm_num2uint, scm_num2long,
scm_num2ulong, scm_num2size, scm_num2ptrdiff, scm_long_long2num,
scm_ulong_long2num, scm_num2long_long, scm_num2ulong_long):
Discouraged by moving to discouraged.h and discouraged.c and
reimplementing in terms of scm_from_* and scm_to_*.  Changed all uses
to the new scm_from_* and scm_to_* functions.
2004-08-02 16:14:04 +00:00
Marius Vollmer
e11e83f3d9 * deprecated.h, deprecated.c, numbers.h (SCM_INUMP, SCM_NINUMP,
SCM_INUM): Deprecated by reenaming them to SCM_I_INUMP, SCM_I_NINUMP
and SCM_I_INUM, respectively and adding deprecated versions to
deprecated.h and deprecated.c.  Changed all uses to either use the
SCM_I_ variants or scm_is_*, scm_to_*, or scm_from_*, as appropriate.
2004-07-23 15:43:02 +00:00
Marius Vollmer
7cee5b315a (ipv6_net_to_num, scm_from_ipv6): Renamed
ipv6_net_to_num to scm_from_ipv6, for converting from an IPv&
byte-wise address to a SCM integer.  Changed all uses.
(ipv6_num_to_net, scm_to_ipv6): Renamed ipv6_num_to_net to
scm_to_ipv6 and added type and range checking, for converting from
an IPv& byte-wise address to a SCM integer.  Changed all uses.
(bignum_in_ipv6_range_p, VALIDATE_INET6): Removed, their function
is now done by scm_to_ipv6.

* validate.h, deprecated.h (SCM_VALIDATE_INUM, SCM_VALIDATE_INUM_COPY,
SCM_VALIDATE_BIGINT, SCM_VALIDATE_INUM_MIN,
SCM_VALIDATE_INUM_MIN_COPY,
SCM_VALIDATE_INUM_MIN_DEF_COPY,SCM_VALIDATE_INUM_DEF,
SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_INUM_RANGE,
SCM_VALIDATE_INUM_RANGE_COPY): Deprecated because they make the
fixnum/bignum distinction visible.  Changed all uses to scm_to_size_t
or similar.
2004-07-10 14:34:59 +00:00
Marius Vollmer
93ccaef0c6 * numbers.h (SCM_MAKINUM, SCM_I_MAKINUM): Renamed SCM_MAKINUM to
SCM_I_MAKINUM and changed all uses.
2004-07-08 15:58:11 +00:00
Kevin Ryde
09270afdeb Add a copyright year, based on the changelog. 2004-04-24 21:30:35 +00:00
Kevin Ryde
e8dde70d1f (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
call.  Reported by Hyperdivision.
2004-04-24 21:04:58 +00:00
Rob Browning
7310ad0ccf * socket.c: use SCM_CHAR_BIT. 2003-04-16 19:45:01 +00:00
Rob Browning
69d49ac86f *** empty log message *** 2003-04-07 01:52:00 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Rob Browning
2de4f939ab * socket.c (FLIPCPY_NET_HOST_128): new macro.
(ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
rewrite to handle GMP bignums.
2003-04-04 21:51:35 +00:00
Rob Browning
eccde741c3 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
* socket.c: #include <config.h> if HAVE_CONFIG_H.  Replace usage
of uint32 and HAVE_UINT_32 with scm_t_int32.
2003-03-25 23:59:59 +00:00
Marius Vollmer
aca23b65b4 (scm_addr_vector): Added size of address to arguments. Use it to
avoid accessing a non-existent path in a sockaddr_un.  Changed all
callers.
2002-08-30 21:57:10 +00:00
Han-Wen Nienhuys
67329a9eef * mallocs.c (scm_malloc_obj): use scm_gc_malloc in stead of
malloc.

* gc-segment.c (scm_i_get_new_heap_segment): remove cluster cruft:
only use SCM_MIN_HEAP_SEG_SIZE.

* ports.c (scm_add_to_port_table): add backwards compatibility
function

* ports.h: use scm_i_ prefix for port table and port table size.
2002-08-16 22:01:10 +00:00
Han-Wen Nienhuys
1d1559ce6d * macros.c: include deprecation.h
* vectors.c (s_scm_vector_move_right_x): remove side effect in
macro arg.
(s_scm_vector_move_left_x): idem.

* net_db.c, posix.c, socket.c: variable naming: change ans to
result.

* sort.c (scm_merge_vector_x): accept vector as argument
iso. SCM*. This is needed for full GC correctness.

* gc.h: undo previous undocumented changes related to #ifdef
GENGC.
2002-07-21 17:46:23 +00:00
Han-Wen Nienhuys
34d19ef643 2002-07-20 Han-Wen <hanwen@cs.uu.nl>
* *.c: add space after commas everywhere.

* *.c: use SCM_VECTOR_SET everywhere, where a vector is written.
Document cases where SCM_WRITABLE_VELTS() is used.

* vectors.h (SCM_VELTS): prepare for write barrier, and let
SCM_VELTS() return a const pointer
(SCM_VECTOR_SET): add macro.

* autogen.sh (mscripts): find and check version number of
autoconf. Complain if 2.53 is not found.
2002-07-20 14:08:34 +00:00
Marius Vollmer
f87c105ae3 No need to check for Cygwin when including <winsock2.h>, this is
already check for by configure.  Thus, revert change from 2002-07-07.
2002-07-10 19:40:43 +00:00
Marius Vollmer
7c9e56d664 Do not include <winsock2.h> on Cygwin even when we have it. 2002-07-07 19:58:15 +00:00
Neil Jerram
bb2c02f237 Small docstring fixes. 2002-03-15 10:37:40 +00:00
Thien-Thi Nguyen
a6b844c224 Retire inclusion guard macro SCM_MAGIC_SNARFER. 2002-03-14 03:47:43 +00:00
Stefan Jahn
af68e5e5a6 2002-01-28 Stefan Jahn <stefan@lkcc.org>
* configure.in (guile_cv_have_uint32_t): Look also in
        `stdint.h' for uint32_t.

2002-01-28  Stefan Jahn  <stefan@lkcc.org>

        * symbols.c (scm_c_symbol2str): New function, replacement for
        `gh_scm2newsymbol()'.

        * strings.c (scm_c_substring2str): New function.  Proper
        replacement for `gh_get_substr()'.

        * socket.c: Include `stdint.h' if available for the `uint32_t'
        declaration.

        * scmsigs.c (s_scm_sigaction): Initialize `chandler' (inhibits
        compiler warning).

        * backtrace.c: Include `lang.h' for GUILE_DEBUG conditional.
2002-01-28 21:15:55 +00:00
Stefan Jahn
b4e15479e9 2001-11-07 Stefan Jahn <stefan@lkcc.org>
* configure.in: Include `win32-socket.o' in the list of object
        files if networking is enabled on Win32.

2001-11-07  Stefan Jahn  <stefan@lkcc.org>

        * win32-socket.[ch]: New files.  Defines Winsock-API error codes
        and makes them available through Guile.  That is because the
        Winsock-API does not store its errors in `errno' and thus cannot
        return error messages via `strerror (errno)'.

        * socket.c (scm_init_socket): Initialize `win32-socket' part
        here under M$-Windows.

        * numbers.h: Added missing declaration of
        `scm_sys_check_number_conversions()'.

        * error.c: Local definition of SCM_I_STRERROR and SCM_I_ERRNO
        and use in `(strerror)' and `(system-error)'.

        * Makefile.am (EXTRA_libguile_la_SOURCES): Added
        `win32-socket.[ch]' to extra source and header files.
2001-11-07 15:08:45 +00:00
Dirk Herrmann
8c494e9973 * Removed lots of deprecated stuff. 2001-08-31 14:42:31 +00:00
Thien-Thi Nguyen
a06e3a75b2 Remove "face-lift" comment. 2001-07-09 07:36:48 +00:00
Keisuke Nishida
1afff62054 * list.h (scm_list_1, scm_list_2, scm_list_3, scm_list_4, scm_list_5,
scm_list_n): New functions.
	(SCM_LIST0, SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5,
	SCM_LIST6, SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify): Deprecated.
	(lots of files): Use the new functions.

	* goops.c (CALL_GF1, CALL_GF2, CALL_GF3, CALL_GF4): Use scm_call_N.

	* strings.c: #include "libguile/deprecation.h".
2001-06-28 01:11:59 +00:00
Martin Grabmüller
82893676f4 Make compilation under Windows easier. 2001-06-26 17:53:09 +00:00
Dirk Herrmann
3628462791 * Deprecated scm_makfromstr and added scm_mem2string as a replacement.
* Eliminated some potential gc problems.
* Eliminated some signedness problems.
* Minor changes.
2001-06-26 10:59:34 +00:00