+1998-05-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * fluids.c: Removed use of assert.h (in order to avoid
+ __eprintf).
+
+ * Makefile.am (libguile_la_LDFLAGS): Added -export-dynamic.
+
+ * dynl.c (maybe_drag_in_eprintf): Disabled through #ifdef 0.
+
+ * eval.c (SCM_CEVAL): Do more thorough argument checking. This
+ change makes the evaluator safer at the cost of evaluation speed.
+ It handles the case when the user has added a non-immediate
+ improper end of the application form, e.g., `(+ 0 . x)'.
+ (Earlier only cases like `(+ 0 . 0)' were handled.) I've tried to
+ minimize the extra cost as much as possible. The new code is
+ enclosed in #ifdef CAUTIOUS regions. NOTE: This also fixes the
+ problem with structs planted directly in the code (e.g. by a
+ macro). This no longer causes segmentation fault. (Thanks to
+ Eric Hanchrow.)
+
+ * eval.c, eval.h (scm_eval_args, scm_deval_args): Take one extra
+ arg `proc' in order to be able to throw errors; New argument
+ checking code.
+
+ * Removed extra #include "debug.h"
+
+1998-04-25 Mikael Djurfeldt <mdj@kenneth>
+
+ * scmsigs.c: Declare usleep as returning void on some systems.
+ (scm_usleep): Return SCM_INUM0 on those systems. (Thanks to Julian
+ Satchell.)
+
+ * coop.c (usleep): Return void on some systems.
+
+1998-04-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * Makefile.am (libguile_la_LDFLAGS): Removed redundant -rpath.
+
+ * coop.c: Changed return type of usleep to int.
+
+ * scmsigs.c (scm_usleep): New procedure; Declare usleep if it
+ isn't found in the OS.
+
+ * iselect.h: #define scm_internal_select select if GUILE_ISELECT
+ isn't enabled. (Thought that I had made this change ages ago...)
+
+ * iselect.c: Declare bzero if not defined by OS.
+
+1998-04-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * dynl.c (scm_must_free_argv): Fixed memory leak due to negated
+ condition. (Thanks to John Tobey.)
+
+ * continuations.c (scm_make_cont), debug.c (scm_make_memoized,
+ scm_make_debugobj), eval.c (scm_makprom): SCM_DEFER/ALLOW_INTS -->
+ A section.
+
+ * __scm.h: Start the long-term project of moving to POSIX threads.
+ Phase 1: Classification of all critical sections.
+ (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): New macros: Delimiters
+ for A sections. (See comments in __scm.h for details.)
+
+ * dynl.c: Only check that HAVE_DLOPEN is defined before loading
+ dynl-dl.c; Test on HAVE_LIBDLD instead of HAVE_DLD.
+
+1998-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * Makefile.am (BUILT_SOURCES): Added cpp_err_symbols.c,
+ cpp_sig_symbols.c, libpath.h and versiondat.h to BUILT_SOURCES
+ (libpath.h, versiondat.h): Replaced dependency on Makefile with
+ dependencies on $(srcdir)/Makefile.in
+ $(top_builddir)/config.status in order to avoid circularity.
+
+ * script.c (scm_compile_shell_switches): Bugfix: Don't discount i
+ from argc if argc was 0 initially.
+
+ * Makefile.am (Makefile.am): Replaced THREAD_LIBS --> GUILE_LIBS
+ in generation of libpath.h.
+
+1998-04-15 Mikael Djurfeldt <mdj@nada.kth.se>
+
+ * Makefile.am (libguile_la_LDFLAGS): Bumped version number of
+ libguile from 2 to 3.
+
+1998-04-14 Mikael Djurfeldt <mdj@nada.kth.se>
+
+ * Makefile.am: Added .x-dependencies to variable BUILT_SOURCES.
+
+1998-04-13 Mikael Djurfeldt <mdj@kenneth>
+
+ * ports.c (scm_port_line, scm_set_port_line_x, scm_port_column,
+ scm_set_port_column_x, scm_port_filename,
+ scm_set_port_filename_x): Removed optional arguments. Added
+ proper argument checking.
+
+ * eval.c, eval.h, coop.c (scm_eval_stack, SCM_EVAL_STACK): Measure
+ stack size in machine words.
+
+ * unif.c (scm_uniform_vector_ref, scm_cvref, scm_array_set_x,
+ rapr1): Use SCM_UCHARS instead of SCM_CHARS for strings. (Thanks
+ to Ole Myren Röhne.)
+
+1998-04-12 Mikael Djurfeldt <mdj@kenneth>
+
+ * socket.c: Check for HAVE_UNIX_DOMAIN_SOCKETS instead of
+ UNIX_DOMAIN_SOCKETS. (Thanks to Lauri Alanko.)
+
+ * gc.c (scm_gc_sweep): Count cells correctly. (Thanks to Ben
+ Caradoc-Davies.)
+
+ * eval.c (SCM_CEVAL, SCM_APPLY): In SCM_IM_APPLY and in the
+ procedure apply: Copy argument lists before pushing them unto the
+ environment so that the environment won't get mutated due to
+ manipulation of procedure arguments. This should perhaps be
+ regarded as a temporary solution until someone finds a more
+ efficient one. (Thanks to Maciej Stachowiak.)
+
+1998-04-10 Mikael Djurfeldt <mdj@kenneth>
+
+ * script.c (scm_compile_shell_switches): Use "guile" as default
+ zero arg if argc is NULL.
+
+1998-04-02 Mikael Djurfeldt <mdj@nada.kth.se>
+
+ * script.c (scm_compile_shell_switches): Allow NULL argv if argc
+ is zero. (Thanks to Dirk Herrmann.)
+
+1998-03-30 Mikael Djurfeldt <mdj@nada.kth.se>
+
+ * ports.c (scm_add_to_port_table): First line is now line 0
+ (was 1). (Interface changed according to suggestion by Per
+ Bothner.)
+
+ * backtrace.c (display_header): Add 1 to line and column numbers
+ when presenting them to the user.
+
+ * eval.h, eval.c, debug.h, debug.c (scm_evaluator_traps): Moved
+ from debug.c --> eval.c
+
+ * eval.h, eval.c (scm_eval_options_interface): New options
+ interface.
+ (SCM_EVAL_STACK): New option: Size of newly created stacks,
+ i.e. stacks for new threads.
+
+ * coop.c (COOP_STKSIZE): Use SCM_EVAL_STACK.
+
+ * eval.c (unsafe_setjmp): Removed with #if 0.
+
+ * gsubr.c (scm_gsubr_apply): Added dummy return to avoid compiler
+ warning.
+
+ * eval.c, numbers.c, unif.c, srcprop.c: Added a few curly braces
+ to avoid compiler warnings.
+
+ * dynl-dl.c (sysdep_dynl_func): Only define usymb if needed.
+
+1998-03-28 Mikael Djurfeldt <mdj@nada.kth.se>
+
+ * throw.c (handler_message): Print message on current error port
+ instead of default error port. (Thanks to Maciej Stachowiak.)
+
+Mon Mar 2 21:35:02 1998 Gary Houston <ghouston@actrix.gen.nz>
+
+ * ports.c (scm_add_to_port_table): allocate in units of
+ struct scm_port_table *, not struct scm_port_table.
+ * posix.c (scm_close_pipe): remove the port from the port table
+ and mark as closed.
+ Thanks to Rob Engle for both fixes.
+
+1998-02-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * iselect.h, iselect.c, coop.c, coop-threads.c, coop-threads.h,
+ coop-defs.h, throw.c, backtrace.c: Added new copyright year 1998.
+
+1998-02-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * throw.h: Removed jmpbuf arg in scm_catch_body_t.
+
+ * backtrace.c (display_error_body, display_backtrace_body),
+ coop-threads.c (scheme_body_bootstrip, c_body_bootstrip),
+ gh_eval.c (eval_str_wrapper, eval_file_wrapper), init.c
+ (invoke_main_func), root.c (cwdr_body), throw.c (cwss_body,
+ scm_body_thunk, hbpca_body): Removed the second jmpbuf arg on body
+ functions.
+
+ * throw.c (scm_internal_catch, scm_internal_lazy_catch): Bodies
+ don't receive the jmpbuf arg anylonger.
+ (scm_catch): Don't accept a #f tag.
+ (scm_throw): Check that key is a symbol.
+ (scm_ithrow): Don't take a jmpbuf as key. Don't check key arg.
+
+Fri Jan 30 22:28:07 1998 Mikael Djurfeldt <mdj@kenneth>
+
+ * async.c (async_pending): Removed declaration.
+
+1998-01-30 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * dynwind.c (scm_wind_chain): New debug function.
+
+ * coop-threads.c (scheme_launch_data, scheme_body_bootstrip,
+ scheme_handler_bootstrip, scheme_launch_thread, c_launch_data,
+ c_body_bootstrip, c_handler_bootstrip, c_launch_thread): Add an
+ extra layer of functions around the body and handler of a thread.
+ This extra layer makes sure that the handler is called in the
+ dynamic context of the surround (= empty dynwind list), but under
+ the *dynamic root* of the body. We can not use the dynamic root
+ of the surround since that root belongs to another thread => stack
+ is not handled correctly. It may seem ugly to use this extra
+ layer, but the extra cost in terms of execution time is really
+ negligible compared to the total amount of time required to create
+ a thread, and it would reduce maintainability to duplicate the
+ crucial and complicated steps performed by cwdr.
+
+ * __scm.h (SCM_ASYNC_TICK): Removed thread switching code.
+ (SCM_ALLOW_INTS): Added thread switching code before interrupts
+ get re-enabled. The important effect of this is that interrupts
+ are blocked during thread switching so that thread data structures
+ don't risk getting messed up by an unfortunate signal.
+ (SCM_REDEFER_INTS, SCM_REALLOW_INTS): It turned out that gcc-2.8.0
+ seems to do more aggressive optimization which actually move
+ instructions around in these macros in a fatal way. Therefore:
+ Introduce Anthony's SCM_FENCE macro! (And I who thought he was
+ just superstitious...)
+ (SCM_TICK): Maybe do a context switch and take care of asyncs.
+ This macro should be used instead of SCM_ASYNC_TICK since the
+ latter doesn't do context switches any more.
+
+ * eval.c (scm_eval, scm_deval), eq.c (scm_equal_p): Use SCM_TICK
+ instead of SCM_ASYNC_TICK.
+
+ * coop.c, iselect.c: Since thread switches are now performed with
+ interrupts masked, we can't use the old mechanism of delivering
+ signals immediately when they arrive. Signals must instead be
+ delivered when the asyncs run *after* the end of the critical
+ section in scm_internal_select. But this also means after context
+ switch so that the signal will be delivered to a different thread.
+ To avoid this, I have changed the protocol of
+ coop_wait_for_runnable_thread and friends so that they are allowed
+ to return the original thread. So, if a signal arrives during
+ scm_internal_select, we won't any longer be forced do a context
+ switch, but can remain in the same thread and deliver the signal
+ to it.
+
+ * async.c, async.h (asyncs_pending): Renamed asyncs_pending -->
+ scm_asyncs_pending and made it global.
+
+ * iselect.c: Small fixes.
+
+ * coop.c (coop_mutex_init, coop_mutex_lock, coop_mutex_unlock,
+ coop_condition_variable_init, coop_condition_variable_wait,
+ coop_condition_variable_signal): Changed return type from `void'
+ to `int'. This is to adhere closer to the pthreads interface.
+ This, in turn, is part of an attempt to provide C versions of the
+ mutex and condition variable primitives which can be part of a
+ frontend to COOP or pthreads.
+
+ * coop.c (coop_mutex_destroy, coop_condition_variable_wait_mutex,
+ coop_condition_variable_destroy): New functions.
+
+ * coop-threads.c (scm_wait_condition_variable): Use
+ coop_condition_variable_wait_mutex.
+
+ * coop-threads.h, coop-defs.h (coop_q_t, coop_m, coop_c):
+ Definitions moved to coop-defs.h.
+
+ * coop-defs.h (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock,
+ scm_mutex_destroy, scm_cond_init, scm_cond_wait, scm_cond_signal,
+ scm_cond_destroy): New C interface to mutecis and cond vars.
+
+1998-01-24 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * error.c (scm_wta): Added support for SCM_ARG6 and SCM_ARG7.
+
+ * iselect.c: Now several threads can wait on the same file
+ descriptor. The behaviour is compatible with OS select: All
+ threads waiting for the fd return with the same status.
+
+1998-01-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * coop-threads.c, threads.h (scm_spawn_thread): New function.
+ Can spawn a thread from application C code.
+
+1998-01-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * gh.h, gh_data.c (gh_doubles2scm, gh_doubles2dvect,
+ gh_doubles2scm): New functions.
+
+1998-01-15 Mark Galassi <rosalia@nis.lanl.gov>
+
+ * gh_eval.c (gh_eval_str): cleanup -- threw out the old
+ commented-out version of gh_eval_str()
+
+Sun Jan 4 02:23:36 1998 Gary Houston <ghouston@actrix.gen.nz>
+
+ * socket.c (scm_bind): free soka after use.
+
+Sat Jan 3 20:55:07 1998 Gary Houston <ghouston@actrix.gen.nz>
+
+ * stime.c (tzvar): new variable.
+ (setzone, restorezone, scm_localtime, scm_mktime, scm_strftime):
+ avoid memory leaks when allocating.
+
+1998-01-03 Jim Blandy <jimb@totoro.red-bean.com>
+
+ * iselect.h: Some systems require <sys/types.h> to get the FD_SET
+ macro definitions.
+
+ * gc.c, tags.h: Doc fixes.
+
+1998-01-02 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * eval.c (macro-eval!): Removed. This function was a design bug.
+ It allowed memoized code to leak out to the scheme level. Most
+ things that you could do with `macro-eval!' can be done with
+ `local-eval'.
+
+1997-12-20 Tim Pierce <twp@skepsis.com>
+
+ * fports.c (scm_pipob): Use scm_generic_fgets for line i/o, since
+ scm_fgets now depends on ftell(3) to know how many bytes were
+ read. Sigh.
+
+1997-12-15 Tim Pierce <twp@skepsis.com>
+
+ * gh_data.c (gh_scm2newstr, gh_get_substr): Use RO macros for
+ dealing with strings.
+
+1997-12-13 Tim Pierce <twp@skepsis.com>
+
+ Make %read-line more suitable for implementing read-line efficiently.
+ * ioext.c (scm_read_line): Strip the terminating newline from a
+ string, and return a cons of the string and its terminator.
+
+ * fports.c, fports.h (scm_fgets): Add `len' argument. The length
+ of the string that is read is stored in this memory location.
+ * ports.c, ports.h (scm_generic_fgets, fgets_void_port): Same.
+ * genio.c, genio.h (scm_do_read_line): Update caller.
+ * ports.h (scm_ptobfuns): Update typedef.
+ * fports.c (scm_fptob, scm_pipob): Update struct.
+
+1997-12-08 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * filesys.c (set_element): Return file descriptor.
+ (fill_select_type): Return the highest file descriptor.
+ (scm_select): Tell select about the highest file descriptor. On
+ some systems the SELECT_SET_SIZE can be as much as 128 bytes.
+ Therefore the extra overhead for calculating the maximum fd seems
+ to be more than compensated. Is this correct? In any case,
+ scm_internal_select will be much faster with this info.
+ (scm_select, fill_select_type, set_element): Don't accept any kind
+ of object in the file descriptor list or vector.
+
+1997-12-07 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * iselect.c (finalize_fd_sets): Bugfix.
+
+1997-12-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * filesys.c (scm_select): Don't use SCM_DEFER_INTS/SCM_ALLOW_INTS
+ when using scm_internal_select (since we might switch to another
+ thread).
+
+Sun Dec 7 01:43:56 1997 Gary Houston <ghouston@actrix.gen.nz>
+
+ * simpos.c (scm_system): always define: use sysmissing if not
+ available. Check for HAVE_SYSTEM instead of _Windows (does
+ Windows lack system or does it have an unusable one?).
+ Check for error conditions -1 and 127. Use SCM_DEFER_INTS.
+ Let the argument be optional: if not supplied, call system(NULL).
+
+ * ports.c (scm_close_port): relax the type check from OPPORTP to
+ PORTP; closing a closed port is allowed.
+
+1997-12-04 Tim Pierce <twp@ppp39.Nantucket.net>
+
+ * fports.c (scm_fgets): Return if the last char in a chunk is
+ newline. When fgets returns a string whose length is `size-1', it
+ is ambiguous whether a whole line was retrieved, so we must check
+ explicitly whether a line terminator is present.
+
+1997-12-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * print.h (SCM_COERCE_OUTPORT): Check that the object is a pair
+ before taking the CDR. (Thanks to Harald Meland.)
+
+ * filesys.c (scm_stat): Slightly optimized.
+
+Wed Dec 3 12:23:06 1997 Jim Blandy <jimb@totoro.red-bean.com>
+
+ * ports.c (scm_close_port): Make sure the port is open before
+ trying to close it.
+
+ * guile-snarf.in: Pass args through to gcc in a way that preserves
+ whitespace boundaries. (Thanks to Greg Badros.)
+
+1997-12-02 Tim Pierce <twp@skepsis.com>
+
+ * stacks.c (scm_frame_procedure): Reverse the logic in the return
+ statement. (Thanks to Doug Evans for pointing this out.)
+
+1997-12-01 Tim Pierce <twp@skepsis.com>
+
+ * scmconfig.h.in: Regenerated for USCORE change in ../acconfig.h.
+
+Sun Nov 30 11:29:18 1997 Mikael Djurfeldt <mdj@kenneth>
+
+ * coop-defs.h (struct coop_t): Renamed errno --> _errno to prevent
+ errno macro expansion of this field name. (errno is a C
+ preprocessor macro on some systems.)
+
+1997-11-29 Tim Pierce <twp@skepsis.com>
+
+ * iselect.c: Doc fix.
+
+Sat Nov 29 01:16:53 1997 Mikael Djurfeldt <mdj@kenneth>
+
+ * init.c (scm_start_stack): Removed initialization of
+ scm_the_last_stack_var.
+
+ * backtrace.h: Declare scm_the_last_stack_var.
+
+ * backtrace.c: Define scm_the_last_stack_var.
+
+ * root.c (mark_root): Don't mark the_last_stack_var.
+
+ * root.h (scm_root_state): Removed the_last_stack_var.
+
+ * throw.c: Added #include "fluids.h"
+ (ss_handler): `the-last-stack' is now a fluid.
+
+ * (backtrace.h, backtrace.c, throw.c): Renamed the_last_stack_var
+ --> the_last_stack_fluid.
+
+ * backtrace.c: Added #include "fluids.h"
+ (scm_init_backtrace): Initialize `the-last-stack' to a fluid.
+ (scm_backtrace): `the-last-stack' is now a fluid.
+
+ * init.c (scm_boot_guile_1): Moved call to scm_init_backtrace
+ after scm_init_fluids.
+
+1997-11-28 Tim Pierce <twp@skepsis.com>
+
+ * iselect.c: #ifdef USE_THREADS around thread-related includes.
+
+ * dynl-dl.c (sysdep_dynl_func): Check both USCORE and
+ DLSYM_ADDS_USCORE to decide whether to add an underscore.
+
+1997-11-28 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * iselect.c (coop_next_runnable_thread,
+ coop_wait_for_runnable_thread): Disable interrupts so that no
+ async is executed before a potential error_revive.
+ (scm_internal_select): Disable interrupts during the parts of the
+ code which manipulate the sleep queue and the file descriptors.
+
+1997-11-27 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
+
+ * Makefile.am: Added iselect.c and iselect.h.
+
+ * coop.c (coop_qinit): Initialize fields used by
+ scm_internal_select.
+ (coop_qget, coop_qget, coop_tmp_queue): Made global.
+ (coop_next_runnable_thread): If GUILE_ISELECT enabled, use
+ replacement in iselect.c.
+ (coop_mutex_lock, coop_condition_variable_wait, coop_abort,
+ coop_join): If GUILE_ISELECT enabled, use
+ coop_wait_for_runnable_thread instead of
+ coop_next_runnable_thread.
+ (usleep, sleep): New replacements for system functions if
+ GUILE_ISELECT is enabled.
+
+ * coop-threads.h: Declare coop_wait_for_runnable_thread.
+
+ * coop-defs.h (coop_t): Added fields used by scm_internal_select.
+
+ * filesys.c: Added #include "iselect.h". Moved FD-macros to
+ iselect.h. Implement Scheme level `select' using
+ scm_internal_select. (See NEWS.)
+
+ * genio.c (scm_getc): Block with scm_internal_select. (See NEWS.)
+
+ * init.c: Call scm_init_iselect.
+
+ * iselect.h, iselect.c: New files. Implements
+ scm_internal_select. (See NEWS.)
+
+1997-11-27 Tim Pierce <twp@skepsis.com>
+
+ Fix a memory leak in scm_read_line and a type cast bug in the ptob.
+ * fports.c (scm_fgets): Use malloc/free rather than scm_must_malloc
+ and scm_must_free, since ultimately the string returned will be copied
+ by scm_makfrom0str anyway. Also, read any characters that may have
+ been pushed onto the port with scm_ungetc.
+ * ports.c (scm_generic_fgets): Same as for scm_fgets.
+ * ioext.c (scm_read_line): Free string after Guilifying it.
+ * ports.h (scm_ptobfuns): fgets method returns a char *, not a char.
+
+1997-11-26 Anthony Green <green@hoser.cygnus.com>
+
+ * gh_data.c (gh_set_substr): Strings can be longer than 256 bytes.
+
+ * gh.h: Safely wrap prototypes for c++ usage.
+
+1997-11-25 Mark Galassi <rosalia@cygnus.com>
+
+ * gh_test_repl.c (main_prog): changed invocation of gh_repl() to
+ gh_repl (argc, argv).
+
1997-11-24 Mark Galassi <rosalia@nis.lanl.gov>
* gh_init.c (gh_repl): modified gh_repl() to accept argc and argv
since it is probably best to let the user control that. In fact,
gh_repl() now invokes scm_shell() which does that.
+1997-11-23 Mark Galassi <rosalia@cygnus.com>
+
+ * gh_test_repl.c (main_prog): added argc and argv to the gh_repl()
+ invocation.
+
1997-11-22 Tim Pierce <twp@twp.tezcat.com>
* dynl-dl.c (sysdep_dynl_func): Fix memory leak created by