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

246 commits

Author SHA1 Message Date
Kevin Ryde
f1c82f55b9 (scm_nice): Correction to error detection. Reported by
Matthias Koeppe.
2004-09-07 00:06:18 +00:00
Stefan Jahn
edea856ce5 2004-09-03 Stefan Jahn <stefan@lkcc.org>
* configure.in (isinf): Let configure find the isinf() function
        on MinGW32 systems.

2004-09-03  Stefan Jahn  <stefan@lkcc.org>

        * threads.c (scm_threads_mark_stacks):  Fixed local variable
        definitions.

        * strings.c (scm_i_substring_copy, s_scm_string_append): Fixed
        local variable definitions.

        * stime.c (_POSIX_C_SOURCE):  Do not define this item on
        MinGW32 because it conflicts with its pthread headers.
        (s_scm_mktime): Consider the HAVE_STRUCT_TM_TM_ZONE define.
        (s_scm_strftime): Using scm_from_locale_string() instead of
        scm_makfrom0str().

        * posix.c (s_scm_putenv): Fixed typo in the !HAVE_UNSETENV
        part.

        * numbers.c (scm_init_numbers): Removed check_sanity() call
        inside GUILE_DEBUG.  The function has been removed somewhen...

        * filesys.c (_POSIX_C_SOURCE): Do not define this item on
        MinGW32 because it conflicts with its pthread headers.

2004-09-03  Stefan Jahn  <stefan@lkcc.org>

        * srfi-1.c, srfi-1.h: Renamed any 'lst1' into 'list1' because
        lst1 is a #define on Win32 systems.
2004-09-03 19:45:37 +00:00
Marius Vollmer
c44ca4fe75 Include "srfi-13.h" instead of "strop.h". 2004-08-24 22:12:37 +00:00
Marius Vollmer
892065da6c (scm_mkstemp): Correction to the correction, mkstemp expects a
null-terminated string in the locale encoding, but
scm_i_string_writable_chars doesn't give that.  Fixed by letting
mkstemp modify a locale version of the tmpl argument and copying the
result back into tmpl.
2004-08-20 12:25:20 +00:00
Kevin Ryde
71978ac9f6 (scm_mkstemp): Correction to new locale_string stuff, need
to modify the input string.
2004-08-20 01:32:36 +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
Marius Vollmer
f015614ae0 (WITH_STRING): New helper macro. Use it where one
locale string is needed for a short piece of code.
(STRING_SYSCALL): New helper macro.  Use it instead of SCM_SYSCALL
when one locale string is needed.
(scm_mkstemp): Convert tmpl to a locale string.
(scm_putenv): Rewritten to use only C strings.
(scm_setlocale, scm_crpt): Convert argument strings to locale
strings.
2004-08-12 17:28:06 +00:00
Marius Vollmer
7f03f97036 * 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.

* posix.c (allocate_string_pointers, environ_list_to_c): Removed,
replaced all uses with scm_i_allocate_string_pointers.
2004-08-10 13:54:16 +00:00
Kevin Ryde
fcc3adc2f9 (scm_setgroups): Enhance docstring, per doc/ref/posix.texi. 2004-08-05 00:19:14 +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
Kevin Ryde
e8a590639c (scm_ttyname): Use scm_i_misc_mutex for thread safety. 2004-07-29 00:12:25 +00:00
Kevin Ryde
0a9d83b0f4 (scm_ctermid): Use an L_ctermid buf on the stack, for thread safety. 2004-07-27 23:10:35 +00:00
Kevin Ryde
33bea692e5 * threads.c, threads.h (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
* posix.c (scm_crypt): Use it to protect static data in crypt().
2004-07-23 23:52:55 +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
a55c2b6809 * 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:35:36 +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
Marius Vollmer
7888309be8 * deprecated.h, boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOL,
SCM_NEGATE_BOOL, SCM_BOOLP): Deprecated by moving into "deprecated.h".
Replaced all uses with scm_is_false, scm_is_true, scm_from_bool, and
scm_is_bool, respectively.
2004-07-06 10:59:25 +00:00
Dirk Herrmann
b28f5b3cb2 * posix.c (scm_gethostname): Make sure len is initialised before
it is used.  Restructured to (hopefully) represent possible
	configurations more clearly in the code.  Added unwind handler.
2004-03-24 00:49:07 +00:00
Kevin Ryde
0eaf105588 (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
MAXHOSTNAMELEN when available.
2004-03-22 23:41:30 +00:00
Kevin Ryde
228651245d * posix.c (scm_gethostname): Preserve errno across free() call. 2004-03-19 23:17:00 +00:00
Kevin Ryde
807f353fed (scm_execl, scm_execlp, scm_execle): Avoid memory leak under error throw. 2004-02-28 19:16:26 +00:00
Kevin Ryde
1b317eb196 (scm_cuserid): Use a private result buffer, for thread safe. 2004-02-23 22:05:37 +00:00
Kevin Ryde
d675a50f53 Add copyright year 2002, which appears in the ChangeLog. 2004-02-20 23:20:15 +00:00
Kevin Ryde
e60923476f Add a copyright year. 2004-02-20 23:19:03 +00:00
Kevin Ryde
b9a7b725a8 (scm_crypt): Use new HAVE_CRYPT.
(<crypt.h>): Remove HAVE_LIBCRYPT condition.
2004-02-20 23:18:10 +00:00
Kevin Ryde
eb7e1603ad (environ): Use _NSGetEnviron in Darwin
shared library, since environ is not directly available there.
2004-02-18 00:20:08 +00:00
Marius Vollmer
2eb78d0670 (scm_setgroups): Check that the gid list is not too long. Thanks to
Paul Jarc!
2003-09-15 12:36:57 +00:00
Marius Vollmer
f360a962d4 * posix.h (scm_setgroups): New prototype.
* posix.c (scm_setgroups): New.  Thanks to Paul Jarc!
(scm_getgroups): Handle groups ids that don't fit into a fixnum.
Don't use SCM_WRITABLE_VELTS.
2003-07-27 16:20:21 +00:00
Stefan Jahn
fcc5d734fc 2003-06-14 Stefan Jahn <stefan@lkcc.org>
* configure.in: Checking for __int64 as possible candidate for
        the SCM_I_GSC_T_INT64 define.

2003-06-14  Stefan Jahn  <stefan@lkcc.org>

        * threads.h: Redefined scm_getspecific() and scm_setspecific()
        to be functions instead of macros.

        * threads.c: Conditionalized inclusion of <sys/time.h> and
        <unistd.h>.
        (scm_getspecific, scm_setspecific): Made these two function
        real part of the API.

        * posix.c (s_scm_putenv): Added some code to make a
        (putenv "FOO="), i.e. setting an empty string, work also on
        Win32 systems.  Thanks to Kevin Ryde for the proposal.
2003-06-14 05:36:02 +00:00
Kevin Ryde
ff4b83917a (scm_putenv): Add freebsd to comment about need to use unsetenv. 2003-06-11 23:43:03 +00:00
Kevin Ryde
f158788fd1 Correction to:
(scm_putenv): Free temporary ptr in mingw unset.

Need to ensure "e" is not unused when unsetenv is available.
2003-06-11 23:24:08 +00:00
Kevin Ryde
dd65e90f3b (scm_putenv): Free temporary ptr in mingw unset. 2003-06-11 23:15:02 +00:00
Stefan Jahn
1e498fbd0f 2003-05-30 Stefan Jahn <stefan@lkcc.org>
* configure.in: Checking for unsetenv().

2003-05-30  Stefan Jahn  <stefan@lkcc.org>

        * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
        appropriately for mingw32 hosts.

        * numbers.h: Defining copysign(), isnan() and finite() to
        be prefixed by a single '_' for mingw32 hosts.
2003-05-30 09:39:34 +00:00
Stefan Jahn
2e945bccca 2003-05-29 Stefan Jahn <stefan@lkcc.org>
* configure.in: Removed -lm check and added a cached check for
        __libc_stack_end to get it building for mingw32 hosts.

2003-05-29  Stefan Jahn  <stefan@lkcc.org>

        * win32-dirent.c: Use malloc() instead of scm_malloc().

        * stime.c (s_scm_strftime): Add a type cast to avoid compiler
        warning.

        * posix.c (s_scm_putenv): Disable use of unsetenv() for the
        mingw32 build.

        * modules.c (s_scm_module_import_interface): Renamed local
        variable interface to _interface.  Seems like 'interface'
        is a special compiler directive for the mingw32 compiler.

        * mkstemp.c: Provide prototype to avoid compiler warning.

        * load.c (s_scm_search_path): Fixed absolute and relative
        path detections for native Windows platforms.

        * gc.h, threads.h: Export some more symbols using SCM_API
	(necessary to build on mingw32).

        * gc-freelist.c ("s_scm_map_free_list",
        "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.

        * fports.c (fport_fill_input): Disable use of
        fport_wait_for_input() on Win32 platforms.

        * filesys.c (s_scm_basename): Fixed __MINGW32__ code.

        * Makefile.am: Modified some rules for cross compiling.

2003-05-29  Stefan Jahn  <stefan@lkcc.org>

        * raw-ltdl.c: Some more modifications for mingw32 platforms.

2003-05-29  Stefan Jahn  <stefan@lkcc.org>

        * Makefile.am (libguile_srfi_srfi_1_la_LDFLAGS,
        libguile_srfi_srfi_4_la_LDFLAGS,
        libguile_srfi_srfi_13_14__la_LDFLAGS): Added the -no-undefined
        option for the mingw32 build.

2003-05-29  Stefan Jahn  <stefan@lkcc.org>

        * standalone/Makefile.am: Setup to build on mingw32.
2003-05-29 14:39:13 +00:00
Marius Vollmer
73be1d9e8e Changed license terms to the plain LGPL thru-out. 2003-04-05 19:15:35 +00:00
Rob Browning
2546b5c354 * posix.c: #include <config.h> if HAVE_CONFIG_H. 2003-03-25 23:58:31 +00:00
Neil Jerram
480fa28d20 Refer to provided? rather than the deprecated feature?. 2002-10-03 22:23:43 +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
Gary Houston
2ee08a2833 * posix.c (scm_convert_exec_args), dynl.c
(scm_make_argv_from_stringlist): static procs: 1) renamed both to
	allocate_string_pointers.  2) simplified: don't reallocate the
	strings, just make an array of pointers 3) avoid memory leaks on
	error 4) let the procedure report errors in its own name.
	Consequences: 1) the procedures now assume that SCM strings are
	nul-terminated, which should always be the case.  2) Since strings
	are not reallocated, it's now possible for strings passed to
	dynamic-args-call to be mutated.
2002-06-30 19:27:18 +00:00
Marius Vollmer
002409fe6f (scm_putenv): Handle removing variables explicitely by calling
unsetenv.
2002-05-06 22:33:52 +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
Marius Vollmer
4c9419ac31 * gc.h, gc.c (scm_gc_sweep): Issue deprecation warning when
non-zero is returned from a port or smob free function.
(scm_malloc, scm_realloc, scm_strndup, scm_strdup,
scm_gc_register_collectable_memory,
scm_gc_unregister_collectable_memory, scm_gc_malloc,
scm_gc_realloc, scm_gc_free, scm_gc_strndup, scm_gc_strdup): New.

* backtrace.c, continuations.c, convert.i.c, coop-threads.c,
debug-malloc.c, dynl.c, environments.c, environments.h,
extensions.c, filesys.c, fports.c, gc.c, gc.h, gh_data.c, goops.c,
guardians.c, hooks.c, init.c, keywords.c, load.c, numbers.c,
ports.c, posix.c, procs.c, rdelim.c, regex-posix.c, root.c,
smob.c, stime.c, strings.c, struct.c, struct.h, symbols.c, unif.c,
vectors.c, weaks.c: Use scm_gc_malloc/scm_malloc and
scm_gc_free/free instead of scm_must_malloc and scm_must_free, as
appropriate.  Return zero from smob and port free functions.

* debug-malloc.c (scm_malloc_reregister): Handle "old == NULL".

* fports.c (scm_setvbuf): Reset read buffer to saved values when
it is pointing to the putback buffer.
2002-02-11 18:06:50 +00:00
Neil Jerram
c96d76b88d * First batch of libguile changes for Elisp support.
* Fixed a few typos.
* Minor rationalization of macros relating to source breakpoints.
2002-01-22 23:31:39 +00:00
Neil Jerram
8f85c0c6c3 * Adding C function declarations from the SCM interface to the
reference manual documentation.
2001-11-16 15:04:17 +00:00
Neil Jerram
9401323e63 * Documentation work. 2001-11-11 15:01:52 +00:00