Use "extern inline" only with GCC. Use "static
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
0d5e3480
DH
12003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
2
3 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
4 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
5
6 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
7 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
8 deprecated.h.
9
6b412e91
DH
102003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
11
12 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
13 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
14
15 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
16 0.0==some_expression to some_expression==0.0. The latter is
17 better readable. The former is preferred by some people, since it
18 leads to a compiler error when confusing == with =. However, when
19 using gcc, a warning will be issued if in an if-statement an
20 assigment appears. Since many Guile developers are using gcc,
21 such errors will not remain unnoticed anyway. We can therefore
22 focus on better readability.
23
7e3b25bf
DH
242003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
25
26 * tags.h: Added description of Guile's type system. Removed some
27 old and misleading comments.
28
3ea39242
DH
292003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
30
31 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
32 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
33
5d7d39ff
DH
342003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
35
36 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
37
38 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
39 respective SLOPPY macro.
40
baa84a20
DH
412003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
42
43 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
44 type string, not SCM_TYP7S.
45
ba15f500
KR
462003-09-03 Kevin Ryde <user42@zip.com.au>
47
48 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
49 2s-complement.
50
53bb8782
KR
51 * stime.c (scm_strptime): Add comment about glibc strptime %s and
52 current timezone requiring SCM_DEFER_INTS.
53
defdc4b4
NJ
542003-08-30 Neil Jerram <neil@ossau.uklinux.net>
55
56 * script.c (scm_compile_shell_switches): Make -s switch optional
57 if file to be loaded does not begin with a `-'. (Thanks to Aaron
58 VanDevender for the patch!)
59
0f008a15
KR
602003-08-30 Kevin Ryde <user42@zip.com.au>
61
62 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
63 and to have non-integer types rejected as per other logical funcs.
64
438a3ba1
KR
652003-08-28 Kevin Ryde <user42@zip.com.au>
66
67 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
68
98dceb37
KR
692003-08-23 Kevin Ryde <user42@zip.com.au>
70
71 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
72 thread safe, and could take a long time too.
73
1fa79a38
KR
742003-08-22 Kevin Ryde <user42@zip.com.au>
75
76 * numbers.c (scm_difference): Correction to bignum - negative inum.
77
d97f9b42
KR
782003-08-14 Kevin Ryde <user42@zip.com.au>
79
80 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
81 [__GNUC__]: Use volatile asm macros rather than a function call.
82 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
83 macros while defining functions.
84
85 * simpos.c (getenv): Use <stdlib.h> for prototype.
86 (scm_system): In docstring, refer to status:exit-val rather than
87 "functions above".
88
b9052fcc
KR
892003-08-09 Kevin Ryde <user42@zip.com.au>
90
91 * srcprop.c (scm_source_properties): Return plist from hash if it's a
92 list set by source-properties! rather than an SRCPROPS object,
93
8e5b4b9e
KR
942003-07-29 Kevin Ryde <user42@zip.com.au>
95
96 * properties.c (scm_primitive_property_ref): In docstring, note
97 parameters to not-found-proc, use hyphens rather than underscores for
98 that parameter name.
99 (scm_primitive_property_set_x): In docstring, VAL is the value
100 parameter not CODE.
101
20703ac4
MV
1022003-07-27 Marius Vollmer <mvo@zagadka.de>
103
c6ccee34
MV
104 * print.c (scm_print_symbol_name): handle more weird characters by
105 escaping the symbol name properly. Thanks to Paul Jarc!
106
2f4931bf
MV
107 * posix.h (scm_setgroups): New prototype.
108 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
109 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
110 Don't use SCM_WRITABLE_VELTS.
111
265c456f
MV
112 * gc.h (SCM_GC_SET_CELL_BVEC): New.
113 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
114 Matthias Koeppe!
115
20703ac4
MV
116 * __scm.h (SCM_C_INLINE_KEYWORD): New.
117 * numbers.c: Use it in place of SCM_C_INLINE so that the code
118 compiles when SCM_C_INLINE is undefined.
119
59c4bb82
DH
1202003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
121
122 * __scm.h: Reformulated the architecture and compiler properties
123 in terms of properties of scm_t_bits and SCM variables rather than
124 in terms of c standard types. This is since it is not known which
125 of the standard types scm_t_bits and SCM variables will be defined
126 to.
127
d7850c8d
KR
1282003-07-24 Kevin Ryde <user42@zip.com.au>
129
130 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
131 and real.
132
8a0c514f
KR
1332003-07-18 Kevin Ryde <user42@zip.com.au>
134
135 * numbers.c (scm_product): In complex * bignum, correction to
136 REAL/IMAG fetch, x is the complex, not y.
137
0aacf84e
MD
1382003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
139
140 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
141 scm_inf_p test as Scheme values.
142 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
143 and a positive inum.
144 Use GNU indentation style.
145
192de9a4
DH
1462003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
147
148 * values.c (scm_values): Build lists of length 1 by using
149 scm_list_1 instead of using scm_cons.
150
bbb4438a
KR
1512003-07-10 Kevin Ryde <user42@zip.com.au>
152
b58c85ce
KR
153 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
154 * list.c (scm_list_n): Ditto.
155
bbb4438a
KR
156 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
157
287f8ad1
KR
1582003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
159
160 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
161 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
162 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
163 the other using intptr_t.
164
005d2366
KR
1652003-07-08 Kevin Ryde <user42@zip.com.au>
166
0aacf84e 167 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
168 (scm_magnitude): Use hypot.
169
170 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
171 @footnote since it doesn't go through to guile-procedures.txt.
172
173 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
174 outside @var to quieten makeinfo, and use @code.
175
cbfe8e62
HWN
1762003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
177
178 * gc-malloc.c (decrease_mtrigger): new function
179 (increase_mtrigger): new function, separate debug registering and
180 mtrigger administration.
181 (scm_gc_realloc): bugfix: do mtrigger administration before the
182 actual realloc, for the realloc might invalidate a GC-d segment of
183 memory. Thanks to Sam Hocevar for pointing this out.
184 (scm_gc_realloc): use scm_malloc_reregister instead of
185 unregistering and registering in sequence.
186
aeb4c2e1
HWN
1872003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
188
189 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
190
4c27f8d2
HWN
1912003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
192
193 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
194 clauses.
195
983e697d
MV
1962003-06-29 Marius Vollmer <mvo@zagadka.de>
197
198 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
199 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
200 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
201 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
202 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
203 the release_1_6 branch.
204
78b6566e
SJ
2052003-06-25 Stefan Jahn <stefan@lkcc.org>
206
207 * continuations.c: Redeclaration of getcontext() via the
208 __asm__ ("getcontext") directive.
209
210 * continuations.h: Include <ucontext.h> instead of
211 <sys/ucontext.h>.
212
1ebb8497
KR
2132003-06-21 Kevin Ryde <user42@zip.com.au>
214
215 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
216 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
217 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
218 available.
219 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
220 (isfinite): Remove, conflicts with C99 isfinite().
221
fbf85ba4
MV
2222003-06-19 Marius Vollmer <mvo@zagadka.de>
223
224 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
225 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
226 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
227 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
228 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
229 the release_1_6 branch.
230
fcc5d734
SJ
2312003-06-14 Stefan Jahn <stefan@lkcc.org>
232
233 * threads.h: Redefined scm_getspecific() and scm_setspecific()
234 to be functions instead of macros.
235
236 * threads.c: Conditionalized inclusion of <sys/time.h> and
237 <unistd.h>.
238 (scm_getspecific, scm_setspecific): Made these two function
239 real part of the API.
240
241 * posix.c (s_scm_putenv): Added some code to make a
242 (putenv "FOO="), i.e. setting an empty string, work also on
243 Win32 systems. Thanks to Kevin Ryde for the proposal.
244
c3ae8e07
KR
2452003-06-12 Kevin Ryde <user42@zip.com.au>
246
75b14838
KR
247 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
248 freebsd to comment about need to use unsetenv.
c3ae8e07 249
9d9fa092
MV
2502003-06-02 Marius Vollmer <mvo@zagadka.de>
251
252 * ports.c (scm_peek_char): Safe the column of the port around the
253 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
254
f2478375
KR
2552003-06-07 Kevin Ryde <user42@zip.com.au>
256
257 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
258 and friends required by scm_t_bits setups.
259
6375e040
DH
2602003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
261
262 * tags.h (scm_tc2_int): Added.
263
264 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
265 scm_tc2_int.
266
267 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
268 scm_tcs_closures): Hard coded values replaced by symbolic ones.
269
f5c6ec2f
DH
2702003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
271
272 * eval.c: Partially undid my patch from 2003-05-31. This patch
273 caused the segfault referenced in the previous changelog entry.
274
47dbd81e
DH
2752003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
276
277 * tags.h: Fixed comment about the immediate type code layout.
278
279 * eval.c: Fixed handling of non-special instructions. Without
280 this patch, guile will segfault on (#\0) and similar instructions.
281
3ec52c51
KR
2822003-06-05 Kevin Ryde <user42@zip.com.au>
283
284 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
285 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
286
e418bd7c
KR
287 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
288 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
289
d0624e39
DH
2902003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
291
292 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
293 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
294 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
295 generalized it to apply not only to C level functions but also to
296 scheme level functions.
297
298 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
299 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
300 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
301 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
302 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
303 respectively.
304
305 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
306 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
307 eval.h into eval.c and a copy is placed into deprecated.h.
308
309 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
310 into eval.c. This definition was not part of the API in any
311 officially released version of guile and thus does not need to go
312 through a phase of deprecation.
313
e90c3a89
DH
3142003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
315
d0624e39
DH
316 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
317 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
318 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
319 definitions are make static and renamed from scm_s_xxx to s_xxx.
320 In deprecated.c the original definitions are copied.
321
d0624e39
DH
322 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
323 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
324 eval.h into eval.c and a copy (slightly modified to work in user
325 code) is placed into deprecated.h.
326
327 * eval.c: Use the local static s_xxx definitions instead of the
328 scm_s_xxx definitions throughout.
329
14b18ed6
DH
3302003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
331
332 This set of patches separates the representation of the cxr family
333 of functions (car, cdr etc.) from the dsubr family of functions
334 (i. e. functions that take a double precision floating point
335 argument). Further, the algorithm for handling the cxr function
336 is improved.
337
338 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
339 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
340 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
341 cosh, tanh), objects.c (scm_class_of), procprop.c
342 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
343 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
344 typecode for the dsubr family of functions.
345
346 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
347 ramap_dsubr.
348
349 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
350 (scm_init_pairs): Make use of the (now usable) second cell element
351 of a scm_tc7_cxr function to implement the cxr family of functions
352 more efficiently.
353
2ca0d207
DH
3542003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
355
356 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
357 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
358 end of an if-else-if-sequence of checks.
359
9a069bdd
DH
3602003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
361
362 * eval.c (SCM_CEVAL): Improved readability of call-with-values
363 execution. Generalize apply_closure to apply_proc and use that
364 for call-with-values.
365
e910e9d2
DH
3662003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
367
368 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
369 a non closure.
370
1e498fbd
SJ
3712003-05-30 Stefan Jahn <stefan@lkcc.org>
372
373 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
374 appropriately for mingw32 hosts.
375
376 * numbers.h: Defining copysign(), isnan() and finite() to
377 be prefixed by a single '_' for mingw32 hosts.
378
c47e2599
KR
3792003-05-30 Kevin Ryde <user42@zip.com.au>
380
381 * numbers.c (z_negative_one): New variable.
382 (scm_init_numbers): Initialize it.
383 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
384
2e945bcc
SJ
3852003-05-29 Stefan Jahn <stefan@lkcc.org>
386
387 * win32-dirent.c: Use malloc() instead of scm_malloc().
388
389 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
390 warning.
391
392 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
393 mingw32 build.
394
395 * modules.c (s_scm_module_import_interface): Renamed local
396 variable interface to _interface. Seems like 'interface'
397 is a special compiler directive for the mingw32 compiler.
398
399 * mkstemp.c: Provide prototype to avoid compiler warning.
400
401 * load.c (s_scm_search_path): Fixed absolute and relative
402 path detections for native Windows platforms.
403
404 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
405 to build on mingw32).
406
407 * gc-freelist.c ("s_scm_map_free_list",
408 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
409
410 * fports.c (fport_fill_input): Disable use of
411 fport_wait_for_input() on Win32 platforms.
412
413 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
414
415 * Makefile.am: Modified some rules for cross compiling.
416
ddd8f927
DH
4172003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
418
419 * eval.c (SCM_CEVAL): In case of an application, all checks for a
420 proper function object and the correct number of arguments are now
421 performed in the application part of SCM_CEVAL.
422
423 (scm_badformalsp): Removed.
424
f8ba2197
DH
4252003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
426
427 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
428
79f55b7c
MD
4292003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
430
a502595f
MD
431 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
432 always being false by inserting preprocessor conditional. (Thanks
433 to Bruce Korb.)
434
79f55b7c
MD
435 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
436 (void *) in order to avoid an aliasing warning; thanks to Bruce
437 Korb.)
438
439 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
440
441 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
442 SCM_STACK_PTR.
443
444 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
445 thread->base --> t->base.
446
447 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
448
47dee228
MV
4492003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
450
451 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
452 scm_variable_set_name_hint, scm_builtin_variable,
453 scm_internal_with_fluids, scm_make_gsubr,
454 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
455 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
456 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
457 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
458 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
459 scm_make_subr_with_generic, scm_make_subr_opt,
460 scm_call_catching_errors, scm_make_smob_type_mfpe,
461 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
462 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
463 branch. Some have been slightly rewritten.
464 (scm_i_object_chars, scm_i_object_length): New, to support
465 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
466
e681d187
DH
4672003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
468
469 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
470 names and inits in the memoized code of do.
471
7e59d9d4
MD
4722003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
473
474 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
475 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
476 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
477 a compilation error if error-on-warning is enabled).
478
9d9fa092 479>>>>>>> 1.1883
9950a42c
MV
4802003-05-17 Marius Vollmer <mvo@zagadka.de>
481
482 * c-tokenize.lex: Gobble up complete lines after a '#'. This
483 removes preprocessor directives from the snarfage that might
484 otherwise confuse us. These directives appear when compiling with
485 "-g3", for example.
486
0068984b
HWN
4872003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
488
26e68795
HWN
489 * ChangeLog: add my surname
490
0068984b
HWN
491 * srcprop.c (scm_finish_srcprop): use
492 scm_gc_register_collectable_memory()
493 (scm_make_srcprops): idem.
494
131805f0
HWN
4952003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
496
497 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
498 wrap-around for scm_mtrigger
499 (scm_gc_register_collectable_memory): abort on overflowing
500 scm_mallocated().
501
d4611024
KR
5022003-05-13 Kevin Ryde <user42@zip.com.au>
503
504 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
505 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
506
7aaf8dc9
MD
5072003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
508
dfd03fb9
MD
509 * backtrace.c (scm_display_error_message): Introduced fancy
510 printing with max level 7 and length 10. (Purpose: avoid printing
511 gigantic objects in error messages.)
512
513 * print.c, print.h (scm_i_port_with_print_state): New function.
514
515 * print.c (scm_iprin1, scm_printer_apply,
516 scm_port_with_print_state): Use scm_i_port_with_print_state.
517 (scm_simple_format): Modified not to destroy print states.
518 (print_state_mutex): New mutex.
519 (scm_make_print_state, scm_free_print_state, scm_prin1):
520 Lock/unlock print_state_mutex.
521
7aaf8dc9
MD
522 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
523 Use current names in definitions.
524
a4d9ffa1
KR
5252003-05-10 Kevin Ryde <user42@zip.com.au>
526
527 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
528
d25e96a4
KR
529 * numbers.c (scm_integer_length): On negative bignums, adjust
530 mpz_sizeinbase to account for it looking at absolute value where we
531 want ones-complement.
532
533 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
534 since we're only using the ulong return value, and x might not fit.
535
5bf6a6f0
DH
5362003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
537
538 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
539 read. This will allow to make the definition in read.c static.
540
f58c472a
DH
5412003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
542
543 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
544 from evalext to eval. This will allow to make some of the
545 definitions in eval.c static.
546
90382aeb
KR
5472003-05-06 Kevin Ryde <user42@zip.com.au>
548
549 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
550 (scm_logcount): Use mpz_com, not mpz_neg.
551
3b88ed2a
DH
5522003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
553
554 The purpose of this patch is to make guile's internal memoizers
555 distinguishable from memoizing macros created on the scheme level
556 or from user provided primitive memoizing macros. The reason is,
557 that the internal memoizers are the only ones that are allowed to
558 transform their scheme input into memoizer byte code, while all
559 other memoizing macros may only transform scheme code into new
560 scheme code.
561
562 To achieve this, a new macro type 'builtin-macro!' is introduced.
563 Currently, 'builtin-macro!'s are handled as memoizing macros, but
564 this will change when the memoizer and executor are separated.
565
566 * macros.[ch] (scm_i_makbimacro): New.
567
568 * macros.h (SCM_BUILTIN_MACRO_P): New.
569
570 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
571
572 * eval.c, goops.c: All of guile's primitive memoizing macros are
573 primitive builtin-macros now.
574
575 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
576 builtin-macros are handled equally to memoizing macros.
577
b0780eb1
MV
5782003-05-04 Marius Vollmer <mvo@zagadka.de>
579
580 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
581 work around a bug in GCC 2.95.2 but is now a bug in itself.
582
1cbf4fe9
MV
5832003-05-02 Marius Vollmer <mvo@zagadka.de>
584
585 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
586 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
587 scm_tcs_symbols): New.
588
1a61d41b
MV
5892003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
590
096ecbaf
MV
591 * deprecated.h, deprecated.c (scm_protect_object,
592 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
593 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
594 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
595 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
596 scm_ensure_user_module, scm_load_scheme_module, scm_port,
597 scm_ptob_descriptor, scm_port_rw_active,
598 scm_close_all_ports_except): New.
599
1a61d41b
MV
600 * ports.c (scm_c_port_for_each): New function, mostly copied from
601 scm_port_for_each.
602 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
603 * ports.h (scm_c_port_for_each): New prototype.
604
c8e1d354
MD
6052003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
606
607 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
608 macro was introduced in anticipation of GOOPS method compilation
609 code.)
610
611 * goops.c: Removed binding of @dispatch.
612
a4aa2134
DH
6132003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
614
615 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
616 instructions that bind the macros on the scheme level back to
617 goops.c in order to make sure again that the bindings go into the
618 (oop goops) module and are not visible from the outside.
619
9fbee57e
DH
6202003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
621
622 * eval.c: Non functional change: Separated R5RS and non-R5RS
623 macros into different sections of the file and ordered the
624 memoizers alphabetically.
625
12841895
DH
6262003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
627
628 * eval.c (scm_ilookup): Rewritten to improve readability.
629
6a3f13f0
DH
6302003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
631
632 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
633 Partially reverted patch from 2003-04-23 in oder to find a better
634 compromise between readability and debuggability.
635
b0c5d67b
DH
6362003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
637
638 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
639 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
640 definitions of the special goops memoizers from goops.[ch] to
641 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
642 throughout guile.
643
b9ad392e
MD
6442003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
645
646 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
647
648 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
649
650 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
651
652 * ioext.c (scm_fdes_to_ports): Ditto.
653
654 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
655 lock/unlock scm_i_port_table_mutex.
656
657 * strports.c (scm_mkstrport): Ditto.
658
659 * ports.c (scm_void_port, scm_port_for_each): Ditto.
660
661 * fports.c (scm_fdes_to_port): Ditto.
662
d0b07b5d
DH
6632003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
664
665 This set of patches contains no functional changes, only debatable
666 minor stylistic ones. Still, in order to prepare a patch between
667 my local copy and the CVS version, I decided to submit the changes
668 below. Then, the patch will hopefully only contain relevant
669 modifications :-)
670
671 * eval.c (iqq): Added const specifier.
672
673 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
674 Use NULL instead of 0 to indicate that a pointer is returned.
675 Removed some misleading 'fall through' comments.
676
677 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
678 Split up long expressions into smaller ones to be more debugging
679 friendly.
680
a98e8e98
DH
6812003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
682
683 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
684 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
685 rather than casting to SCM.
686
c178c3a6
DH
6872003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
688
689 * sort.c, pairs.h: Removed unnecessary includes.
690
d339981a
DH
6912003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
692
693 * sort.c: Replaced hand-made trampline code by the new official
694 mechanism from eval.c. This fixes a segfault in the new test file
695 sort.test.
696
697 (quicksort, compare_function, scm_restricted_vector_sort_x,
698 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
699 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
700 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
701 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
702 eval.c.
703
704 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
705 cmp_fun_t): Removed.
706
707 (compare_function): Added.
708
709 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
710 arithmetics with index arithmetics. Changed quicksort to work on
711 an array of SCM values instead of an array of characters. Avoid
712 bytewise copying of SCM elements. Avoid allocating memory on the
713 stack with alloca. Fixed some comments.
714
821f18a4
DH
7152003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
716
717 * eval.c (EXTEND_ENV): Eliminated.
718
719 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
720 EXTEND_ENV.
721
94fb5a6e
DH
7222003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
723
724 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
725
726 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
727 compiling with SCM_DEBUG==1 by moving definition behind prototype.
728
729 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
730 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
731 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
732 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
733 functions such that they check if the object is a non-immediate.
734 Further, renamed identifiers to use the scm_dbg_ prefix and made
735 their inclusion into the lib dependent of the
736 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
737
fce0b22d
DH
7382003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
739
740 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
741 debug option.
742
1685446c
DH
7432003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
744
821f18a4 745 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
746 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
747 any calls to SCM_NCONSP any more.
748
749 * unif.c (l2ra): Eliminate redundant check.
750
9ff1720f
DH
7512003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
752
753 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
754 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
755 SCM_NNULLP. Now, guile itself does not include any calls to
756 SCM_NNULLP any more.
757
05b15362
DH
7582003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
759
760 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
761 scm_copy_tree): Place assignment expressions which are part of
762 other expressions into an expression of their own.
763
0c88d7df
DH
7642003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
765
766 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
767 compare SCM values with !=.
768
5cb22e96
DH
7692003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
770
771 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
772 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
773 and definition of the memoizer for the generalized set! macro from
774 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
775 define the macro object.
776
777 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
778 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
779 eval.c, it is made static and renamed to s_set_x.
780
781 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
782 over SCM_N<foo>.
783
a44a9715
DH
7842003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
785
786 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
787 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
788 to undefineds and registered the object as a permanent object.
789
790 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
791 static in eval.c, renamed it to f_apply and registered the object
792 as a permanent object.
793
1b43d24c
DH
7942003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
795
5cb22e96 796 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
797 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
798
aec16f99
DH
7992003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
800
801 * numbers.c (scm_logtest): Fixed argument bug in the call to
802 mpz_and, which showed up when compiling with SCM_DEBUG defined.
803
f96460ce
DH
8042003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
805
806 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
807 type errors that showed up when compiling with SCM_DEBUG defined.
808
d0f6ceb8
DH
8092003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
810
811 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
812 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
813 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
814 fix compile errors with --disable-deprecated.
815
19a7a089
RB
8162003-04-17 Rob Browning <rlb@defaultvalue.org>
817
818 * numbers.c (scm_integer_expt): fix case where we were declaring
819 vars in the middle of a statement block. Thanks to Thamer
820 Al-Harbash.
821
47cd67db
MD
8222003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
823
0fd7dcd3
MD
824 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
825 change.
826
47cd67db
MD
827 * eq.c (scm_eqv_p): Turned into a primitive generic.
828
3b8b889c
RB
8292003-04-16 Rob Browning <rlb@defaultvalue.org>
830
312006bb
RB
831 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
832 Thanks to Boyd Gerber.
833 Added check for __arm__ in addition to arm for LINUX and copied
834 __s390__ defines from upstream libgc. Thanks to James Treacy for
835 reporting the problems.
c7ef2ea1 836
3b8b889c
RB
837 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
838
839 * socket.c: use SCM_CHAR_BIT.
840
841 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
842
843 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
844
43261b39
MD
8452003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
846
847 * feature.c (scm_init_feature): Always add threads feature.
848
58241edc
MD
8492003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
850
851 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
852 scm_at_assert_bound_ref. (We don't want the unbound check. See
853 oop/goops/active-slot.scm.)
854
94e91275
RB
8552003-04-14 Rob Browning <rlb@defaultvalue.org>
856
857 * tags.h: scm_t_intptr should have been intptr_t.
858
3071ea27
RB
8592003-04-13 Rob Browning <rlb@defaultvalue.org>
860
861 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
862 test. Instead use
863 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
864 as gc_os_dep.c suggests is appropriate.
865
866 * goops.c (prep_hashsets): make static to match prototype.
867 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
868 Chin.
869
870 * c-tokenize.lex: remove trailing comma from enum. Thanks to
871 Albert Chin.
872
873 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
874 Klausner.
875
21ab2aeb
MD
8762003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
877
878 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
879 indicated through extra fields in getters-n-setters.
880 (scm_add_slot): Adapted to new format of getters_n_setters slot.
881 (Thanks to Andy Wingo.)
882
dff96e95
HWN
8832003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
884
885 * gc-segment.c: add comment
886
07921c76
RB
8872003-04-07 Rob Browning <rlb@defaultvalue.org>
888
b5331f10
RB
889 * debug.h: change "id" arg name to "info_id" to avoid objective-c
890 clash.
891
07921c76
RB
892 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
893 and add regression test to standalone/.
894
8952003-04-06 Rob Browning <rlb@defaultvalue.org>
896
897 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
898 Thanks to Dale P. Smith.
899
900 * random.c: #include gmp.h.
901 (scm_c_random_bignum): normalize result on return.
902
903 * init.c: #include gmp.h.
904
905 * numbers.h: remove the gmp.h #include (not needed now).
906
907 * posix.h: change occurences of "id" to something else so we don't
908 cause trouble when included via objective-c (can't hurt, might
909 help). Still have usage in debug.h, though.
910
938f6b7c
MD
9112003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
912
372691d8
MD
913 * random.c (scm_c_random_bignum): Don't generate a random number
914 equal to m (the second argument of scm_c_random_bignum); only
915 generate numbers in the range 0 <= r < m.
c5f268f8
MD
916 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
917 scm_var_random_state.
372691d8 918
938f6b7c
MD
919 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
920 clause.
921
6cdb8c3f
RB
9222003-04-05 Rob Browning <rlb@defaultvalue.org>
923
938f6b7c 924 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
925 uses before any code.
926
15635be5
MD
9272003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
928
1ecfd013
MD
929 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
930 not top_srcdir.
931
15635be5
MD
932 * hashtab.c (rehash_after_gc): Clear to_rehash list before
933 processing it in order to avoid an infinite loop.
934
935 * print.c (scm_prin1): Remember old state of pstate->writingp.
936
73be1d9e
MV
9372003-04-05 Marius Vollmer <mvo@zagadka.de>
938
939 * Changed license terms to the plain LGPL thru-out.
940
ad815c06
RB
9412003-04-04 Rob Browning <rlb@defaultvalue.org>
942
943 * socket.c (FLIPCPY_NET_HOST_128): new macro.
944 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
945 rewrite to handle GMP bignums.
946
947
948 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
949
950 * ports.c (scm_getc): minor tweak.
951
952 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
953 rewrite to handle GMP bignums.
954
955 * numbers.c: rewrite *many* functions to handle GMP bignums.
956
957 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
958 handle GMP bignums.
959
960 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
961
962 * init.c (check_config): remove SCM_BIGDIG conditionals.
963 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
964
965 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
966
967 * eval.c: remove SCM_BIGDIG conditionals.
968
969 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
970
6cdb8c3f
RB
9712003-03-31 Rob Browning <rlb@defaultvalue.org>
972
973 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
974 to Kevin Ryde.)
975
9762003-03-27 Rob Browning <rlb@defaultvalue.org>
977
978 * threads.h: fix various preprocessor usages of new public
979 symbols to expect 0 or 1 values rather than 1 or undefined.
980 i.e. change #ifdef to #if, etc.
981
982 * threads.c: fix various preprocessor usages of new public
983 symbols to expect 0 or 1 values rather than 1 or undefined.
984 i.e. change #ifdef to #if, etc.
985
986 * tags.h: fix various preprocessor usages of new public
987 symbols to expect 0 or 1 values rather than 1 or undefined.
988 i.e. change #ifdef to #if, etc.
989
990 * stacks.c: fix various preprocessor usages of new public
991 symbols to expect 0 or 1 values rather than 1 or undefined.
992 i.e. change #ifdef to #if, etc.
993
994 * stackchk.h: fix various preprocessor usages of new public
995 symbols to expect 0 or 1 values rather than 1 or undefined.
996 i.e. change #ifdef to #if, etc.
997
998 * stackchk.c: fix various preprocessor usages of new public
999 symbols to expect 0 or 1 values rather than 1 or undefined.
1000 i.e. change #ifdef to #if, etc.
1001
1002 * sort.c: fix various preprocessor usages of new public
1003 symbols to expect 0 or 1 values rather than 1 or undefined.
1004 i.e. change #ifdef to #if, etc.
1005
1006 * read.c: fix various preprocessor usages of new public
1007 symbols to expect 0 or 1 values rather than 1 or undefined.
1008 i.e. change #ifdef to #if, etc.
1009
1010 * random.c: fix various preprocessor usages of new public
1011 symbols to expect 0 or 1 values rather than 1 or undefined.
1012 i.e. change #ifdef to #if, etc.
1013
1014 * print.c: fix various preprocessor usages of new public
1015 symbols to expect 0 or 1 values rather than 1 or undefined.
1016 i.e. change #ifdef to #if, etc.
1017
1018 * objects.c: fix various preprocessor usages of new public
1019 symbols to expect 0 or 1 values rather than 1 or undefined.
1020 i.e. change #ifdef to #if, etc.
1021
1022 * numbers.h: fix various preprocessor usages of new public
1023 symbols to expect 0 or 1 values rather than 1 or undefined.
1024 i.e. change #ifdef to #if, etc.
1025
1026 * null-threads.c: fix various preprocessor usages of new public
1027 symbols to expect 0 or 1 values rather than 1 or undefined.
1028 i.e. change #ifdef to #if, etc.
1029
1030 * lang.c: fix various preprocessor usages of new public
1031 symbols to expect 0 or 1 values rather than 1 or undefined.
1032 i.e. change #ifdef to #if, etc.
1033
1034 * lang.h: fix various preprocessor usages of new public
1035 symbols to expect 0 or 1 values rather than 1 or undefined.
1036 i.e. change #ifdef to #if, etc.
1037
1038 * iselect.h: fix various preprocessor usages of new public
1039 symbols to expect 0 or 1 values rather than 1 or undefined.
1040 i.e. change #ifdef to #if, etc.
1041
1042 * init.c: fix various preprocessor usages of new public
1043 symbols to expect 0 or 1 values rather than 1 or undefined.
1044 i.e. change #ifdef to #if, etc.
1045
1046 * gh_data.c: fix various preprocessor usages of new public
1047 symbols to expect 0 or 1 values rather than 1 or undefined.
1048 i.e. change #ifdef to #if, etc.
1049
1050 * gh.h: fix various preprocessor usages of new public
1051 symbols to expect 0 or 1 values rather than 1 or undefined.
1052 i.e. change #ifdef to #if, etc.
1053
1054 * gen-scmconfig.c: change most new public symbols to be defined to
1055 0 or 1 rather than being either 1 or undefined.
1056
1057 * gc_os_dep.c: fix various preprocessor usages of new public
1058 symbols to expect 0 or 1 values rather than 1 or undefined.
1059 i.e. change #ifdef to #if, etc.
1060 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
1061
1062 * gc.h: fix various preprocessor usages of new public
1063 symbols to expect 0 or 1 values rather than 1 or undefined.
1064 i.e. change #ifdef to #if, etc.
1065
1066 * gc-card.c: fix various preprocessor usages of new public
1067 symbols to expect 0 or 1 values rather than 1 or undefined.
1068 i.e. change #ifdef to #if, etc.
1069
1070 * gc-mark.c: fix various preprocessor usages of new public
1071 symbols to expect 0 or 1 values rather than 1 or undefined.
1072 i.e. change #ifdef to #if, etc.
1073
1074 * feature.c: fix various preprocessor usages of new public
1075 symbols to expect 0 or 1 values rather than 1 or undefined.
1076 i.e. change #ifdef to #if, etc.
1077
1078 * evalext.c: fix various preprocessor usages of new public
1079 symbols to expect 0 or 1 values rather than 1 or undefined.
1080 i.e. change #ifdef to #if, etc.
1081
1082 * eval.h: fix various preprocessor usages of new public
1083 symbols to expect 0 or 1 values rather than 1 or undefined.
1084 i.e. change #ifdef to #if, etc.
1085
1086 * eval.c: fix various preprocessor usages of new public
1087 symbols to expect 0 or 1 values rather than 1 or undefined.
1088 i.e. change #ifdef to #if, etc.
1089
1090 * eq.c: fix various preprocessor usages of new public
1091 symbols to expect 0 or 1 values rather than 1 or undefined.
1092 i.e. change #ifdef to #if, etc.
1093
1094 * coop.c: fix various preprocessor usages of new public
1095 symbols to expect 0 or 1 values rather than 1 or undefined.
1096 i.e. change #ifdef to #if, etc.
1097
1098 * coop-threads.c: fix various preprocessor usages of new public
1099 symbols to expect 0 or 1 values rather than 1 or undefined.
1100 i.e. change #ifdef to #if, etc.
1101
1102 * coop-pthreads.c: fix various preprocessor usages of new public
1103 symbols to expect 0 or 1 values rather than 1 or undefined.
1104 i.e. change #ifdef to #if, etc.
1105
1106 * coop-defs.h: fix various preprocessor usages of new public
1107 symbols to expect 0 or 1 values rather than 1 or undefined.
1108 i.e. change #ifdef to #if, etc.
1109
1110 * convert.i.c: fix various preprocessor usages of new public
1111 symbols to expect 0 or 1 values rather than 1 or undefined.
1112 i.e. change #ifdef to #if, etc.
1113
1114 * continuations.c: fix various preprocessor usages of new public
1115 symbols to expect 0 or 1 values rather than 1 or undefined.
1116 i.e. change #ifdef to #if, etc.
1117
1118 * _scm.h: fix various preprocessor usages of new public symbols to
1119 expect 0 or 1 values rather than 1 or undefined. i.e. change
1120 #ifdef to #if, etc.
1121
d11d697a
MV
11222003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1123
9686f86d
MV
1124 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
1125
1126 * deprecated.c, deprecated.h: New files, to collect deprecated
1127 things in one place.
1128 * Makefile.am: Added them in all the right places.
1129
d11d697a
MV
1130 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
1131 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
1132 builds work.
9686f86d
MV
1133 (DOT_X_FILES): Removed "iselect.x".
1134 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 1135
e3c0c3b9
RB
11362003-03-25 Rob Browning <rlb@defaultvalue.org>
1137
1138 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
1139 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
1140
1141 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
1142
1143 * vports.c: #include <config.h> if HAVE_CONFIG_H.
1144
1145 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
1146 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1147
1148 * threads.h: replace usage of struct timespect with
1149 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
1150 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
1151 favor of scm_t_timespec from scmconfig.h.
1152
1153 * threads.c: move libguile/_scm.h include to the top so we pick up
1154 any critical defines like _GNU_SOURCE early. Replace usage of
1155 struct timespect with scm_t_timespec. Replace usage of
1156 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
1157 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
1158
1159 * threads-plugin.h: replace usage of struct timespect with
1160 scm_t_timespec.
1161
1162 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
1163 usage of struct timespect with scm_t_timespec.
1164
1165 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
1166 HAVE_INTTYPES_H handling to scmconfig.h. #include
1167 "libguile/__scm.h". Rework handling for scm_t_bits,
1168 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
1169 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
1170 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
1171 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
1172 SCM_HAVE_ARRAYS.
1173
1174 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
1175
1176 * struct.c: #include <config.h> if HAVE_CONFIG_H.
1177
1178 * strports.c: #include <config.h> if HAVE_CONFIG_H.
1179
1180 * strop.c: #include <config.h> if HAVE_CONFIG_H.
1181
1182 * stime.h: move handling of time related headers to scmconfig.h.
1183
1184 * stime.c: #include <config.h> if HAVE_CONFIG_H.
1185
1186 * stacks.c: replace usage of STACK_GROWS_UP with
1187 SCM_STACK_GROWS_UP.
1188
1189 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
1190 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1191
1192 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
1193 of uint32 and HAVE_UINT_32 with scm_t_int32.
1194
1195 * smob.c: #include <config.h> if HAVE_CONFIG_H.
1196
1197 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
1198
1199 * script.c: #include <config.h> if HAVE_CONFIG_H.
1200
1201 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
1202
1203 * scmconfig.h.top: new file -- preamble for scmconfig.h.
1204
1205 * rw.c: #include <config.h> if HAVE_CONFIG_H.
1206
1207 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
1208
1209 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1210
1211 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
1212
1213 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
1214 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
1215 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
1216 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1217
1218 * ramap.c: replace usage of HAVE_LONG_LONGS with
1219 "SCM_SIZEOF_LONG_LONG != 0".
1220
1221 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
1222 "libguile/scmconfig.h".
1223
1224 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
1225
1226 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1227 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1228
1229 * posix.c: #include <config.h> if HAVE_CONFIG_H.
1230
1231 * ports.c: #include <config.h> if HAVE_CONFIG_H.
1232
1233 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1234
1235 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
1236 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
1237 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
1238 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
1239 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
1240 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
1241 "SCM_SIZEOF_LONG_LONG != 0".
1242
1243 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
1244 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
1245 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
1246 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
1247
1248 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
1249
1250 * null-threads.h: replace usage of struct timespect with
1251 scm_t_timespec.
1252
1253 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
1254
1255 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
1256 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
1257 scm_t_uint64 and rename usages.
1258
1259 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
1260
1261 * load.c: #include <config.h> if HAVE_CONFIG_H.
1262
1263 * iselect.h: move handling of time related headers to scmconfig.h.
1264 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
1265 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
1266 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
1267
1268 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1269 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
1270 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
1271
1272 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
1273
1274 * inline.h: #include "libguile/__scm.h" at the top. Change code
1275 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
1276 what to do instead of creating a new public #define. Rename usage
1277 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
1278 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
1279 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
1280
1281 * inline.c: rearrange handling -- now we just #define
1282 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
1283 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
1284 appropriate, and we use that in inline.h along with the above
1285 define to determine how to respond.
1286
1287 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
1288 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1289
1290 * guile.c: #include <config.h> if HAVE_CONFIG_H.
1291
1292 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1293 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1294
1295 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1296
1297 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
1298
1299 * gen-scmconfig.c: new file -- see comments in file for details.
1300
1301 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
1302
1303 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
1304 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
1305
1306 * gc.h: replace usage of SIZEOF_LONG with
1307 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
1308 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
1309 since we handle that in scmconfig.h now.
1310
1311 * gc.c: #include <config.h> if HAVE_CONFIG_H.
1312
1313 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1314 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
1315 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1316
1317 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
1318
1319 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1320 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1321
1322 * fports.c: #include <config.h> if HAVE_CONFIG_H.
1323
1324 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
1325
1326 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1327 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
1328
1329 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
1330
1331 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1332 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1333
1334 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
1335 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
1336 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
1337 with "SCM_SIZEOF_LONG_LONG != 0".
1338
1339 * error.c: #include <config.h> if HAVE_CONFIG_H.
1340
1341 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
1342 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
1343 with "SCM_SIZEOF_LONG_LONG != 0".
1344
1345 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
1346
1347 * coop.c: replace usage of struct timespect with scm_t_timespec.
1348 #include <config.h> if HAVE_CONFIG_H.
1349
1350 * coop-threads.c: #include "libguile/_scm.h" early. Replace
1351 usage of struct timespect with scm_t_timespec. Replace usage of
1352 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
1353
1354 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
1355 usage of struct timespect with scm_t_timespec. Replace usage of
1356 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
1357
1358 * coop-defs.h: move handling of time related headers to
1359 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
1360 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
1361 timespect with scm_t_timespec.
1362
1363 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1364
1365 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1366
1367 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1368 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1369
1370 * continuations.c: move libguile/_scm.h include to the top so we
1371 pick up any critical defines like _GNU_SOURCE early.
1372
1373 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
1374
1375 * async.c: #include <config.h> if HAVE_CONFIG_H.
1376
1377 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
1378
1379 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
1380 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
1381
1382 * __scm.h: move libguile/scmconfig.h include up to the top, so
1383 we're sure to pick up any critical defines like _GNU_SOURCE early.
1384 #include <limits.h> removed in favor of scmconfig.h inclusion when
1385 appropriate. STDC_HEADERS based inclusion of stdlib.h,
1386 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
1387 scmconfig.h inclusion when appropriate. Various Win32 related
1388 definitions removed in favor of scmconfig.h inclusion when
1389 appropriate.
1390 (HAVE_UINTPTR_T): definition removed (see NEWS).
1391 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
1392 (HAVE_LONG_LONGS): definition removed (see NEWS).
1393 (HAVE_LONG_LONG): definition removed (see NEWS).
1394 (HAVE_PTRDIFF_T): definition removed (see NEWS).
1395
1396 * Makefile.am: scmconfig.h is now generated by building and
1397 running gen-scmconfig.h and capturing its output. gen-scmconfig
1398 uses config.h and the configure.in generated gen-scmconfig.h to
1399 decide what to output. See gen-scmconfig.c for details.
1400 (noinst_PROGRAMS): add gen-scmconfig.
1401 (gen_scmconfig_SOURCES): new variable.
1402 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
1403 cross-compiling right.
1404 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
1405 (BUILT_SOURCES): add scmconfig.h.
1406
25e0bf97
MV
14072003-03-19 Marius Vollmer <mvo@zagadka.de>
1408
1409 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
1410 Adrian Bunk. Thanks!
1411
74b6d6e4
MD
14122003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1413
1414 * goops.c (make_class_from_template): New fourth arg:
1415 applicablep.
1416 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
1417 cpls.
1418
1419 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
1420
1421 * goops.c, objects.c, objects.h (scm_make_extended_class): New
1422 second arg: applicablep.
1423 (scm_i_inherit_applicable): New function.
1424
1425 * goops.c, goops.h (scm_class_applicable,
1426 scm_class_extended_accessor): New classes.
1427
5c9e7dad
DH
14282003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1429
1430 * procs.c (scm_procedure_documentation): Removed redundant
1431 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
1432 predicates.
1433
f8af5c6d
MD
14342003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1435
c614a00b
MD
1436 * list.c, list.h (scm_filter, scm_filter_x): New functions.
1437
109c2c9f
MD
1438 * modules.c (scm_module_import_interface): New function.
1439
f8af5c6d
MD
1440 * goops.c, goops.h (scm_class_accessor_method): Renamed from
1441 scm_class_accessor.
1442 (scm_class_accessor): New class.
1443
a48d60b1
MD
14442003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1445
1446 * goops.c (scm_primitive_generic_generic): Enable primitive
1447 generic if not enabled.
1448 (scm_sys_goops_loaded): Setup unextended primitive generics.
1449
1450 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
1451
1452 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
1453 snarf macros.
1454
1455 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
1456 testing example. All uses of SCM_GPROC should be converted.)
1457
1458 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
1459 scm_assoc.
1460
1461 * eq.c (scm_equal_p): Turned into a primitive generic.
1462
84edc049
RB
14632003-02-27 Rob Browning <rlb@defaultvalue.org>
1464
1465 * Makefile.am (scmconfig.h): new target -- generate file from
1466 ../config.h.
1467 (modinclude_HEADERS): remove version.h.
1468 (nodist_modinclude_HEADERS): add version.h.
1469
ea5c9285
MD
14702003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1471
b4a1358c
MD
1472 This fixes a serious GC bug, introduced during the latest
1473 reorganization of the GC, which disabled freeing of structs and
1474 GOOPS objects:
1475
1476 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
1477 SCM_EOL.
53af8255
MD
1478 (scm_struct_prehistory): Move scm_free_structs to
1479 scm_before_mark_c_hook.
ea5c9285 1480
b4a1358c
MD
1481 * gc-card.c (sweep_card): Check that we haven't swept structs on
1482 this card before. That can happen if scm_i_sweep_all_segments has
1483 been called from some other place than scm_igc.
1484
c35738c1
MD
14852003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1486
231a4ea8
MD
1487 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
1488 (since hash tables now adapt their size).
1489
1490 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
1491 (current number of prehistory bindings; hashtable code will select
1492 a prime which is greater than this value).
1493
1494 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
1495 (current number of initial symbols).
1496
1497 * properties.c (scm_init_properties): Don't specify size of
1498 scm_properties_whash.
1499
1500 * objprop.c (scm_init_objprop): Don't specify size of
1501 scm_object_whash.
1502
1503 * keywords.c (scm_init_keywords): Don't specify a hash table size.
1504
c35738c1
MD
1505 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
1506
1507 The following changes introduce the use of resizable hash tables
1508 throughout Guile. It also renames the old *-hash-table* functions
1509 to *-alist-vector* and places them, together with the rest of the
1510 weak vector support, in the module (ice-9 weak-vector). We should
1511 probably introduce a new, better, API for weak references, for
1512 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
1513 look like and are used like ordinary pairs.)
1514
1515 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
1516 leaf_environment_fold, obarray_remove_all): Use hashtable
1517 accessors.
1518
1519 * gc.c (scm_init_storage): Moved hook initialization to
1520 scm_storage_prehistory.
1521 (scm_storage_prehistory): New function.
1522 (scm_igc): Added commentary about placement of
1523 scm_after_sweep_c_hook.
1524
1525 * gc-mark.c (scm_mark_all): Use hashtable accessors.
1526 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
1527 SCM_WVECT_WEAK_VALUE_P.
1528
1529 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
1530 functions.
1531 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
1532 Removed.
1533 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
1534 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
1535
1536 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
1537 calls to scm_storage_prehistory and scm_hashtab_prehistory.
1538
1539 * modules.c (module-reverse-lookup): Use hashtable accessors.
1540
1541 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
1542
1543 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
1544 scm_make_weak_value_alist_vector,
1545 scm_make_doubly_weak_alist_vector): New functions.
1546
1547 * weaks.c (scm_init_weaks_builtins): New function.
1548
1549 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
1550 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
1551 SCM_WVECT_NOSCAN_P): New macros.
1552
1553 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
1554 and SCM_WVECT_WEAK_VALUE_P.
1555
1556 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
1557 allocate_weak_vector and exported.
1558
0a4c1355
MD
15592003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1560
1561 * hashtab.c: Undid thread safety. (We decided that it's better to
1562 let the user explicitly protect the tables (or not) according what
1563 is suitable for the application.)
1564
87ca11ff
MD
15652003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1566
1567 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
1568 thread safe and handle resizing tables.
1569 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
1570 SCM_DEFER/ALLOW_INTS.
1571
f59a096e
MD
15722003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1573
1574 * hashtab.c (scm_vector_to_hash_table,
1575 scm_c_make_resizing_hash_table, scm_make_hash_table): New
1576 functions.
1577 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
1578 safe and handle resizing tables.
1579
1580 * weaks.c (scm_make_weak_key_hash_table,
1581 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
1582 Size argument made optional. Return resizable table if not
1583 specified.
1584
4b612c5b
MD
15852003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1586
1587 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
1588 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
1589
b3d7f6df
MD
15902003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1591
1592 * debug.c (scm_procedure_source): Handle all objects for which
1593 procedure? is #t. (Thanks to Bill Schottstaedt.)
1594
756414cf
MD
15952003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1596
361d631f
MD
1597 * futures.c (mark_futures): Don't need to mark data of recycled
1598 futures.
1599 (scan_futures, cleanup_undead): Be smarter about marking
1600 futures---avoid unnecessary passes through future lists.
1601
756414cf
MD
1602 * futures.h, futures.c: New files; Introduced recycling of
1603 futures. For fine-grained threading this lifts performance to
1604 another level. We can now use parallelization in inner loops of
1605 Guile programs without impossible overhead.
1606
1607 * threads.h, threads.c: Moved futures to their own file.
1608
1609 * Makefile.am (libguile_la_SOURCES): Added futures.c.
1610 (DOT_X_FILES): Added futures.x.
1611 (DOT_DOC_FILES): Added futures.doc.
1612 (modinclude_HEADERS): Added futures.h.
1613
1614 * threads.c, threads.h (scm_i_create_thread): Renamed from
1615 create_thread and made global.
1616
1617 * futures.c (scm_make_future): New procedure.
1618
1619 * eval.c: #include "libguile/futures.h".
1620
1621 * init.c: #include "futures.h"
1622 (scm_init_guile_1): Call scm_init_futures.
1623
1624 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
1625
1626 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
1627
1628 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
1629 functions.
1630
1631 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
1632
b4debead
MD
16332003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1634
1635 * threads.c (create_thread): Don't unwind dynwind chain of parent
1636 thread before creation. Just start the new thread with an empty
1637 dynwind chain.
1638
93f26b7b
MD
16392003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1640
1641 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
1642
38d8927c
MD
16432003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1644
41c96c32
MD
1645 * threads.c (scm_timed_wait_condition_variable): Support timed
1646 waiting also for simple condition variables.
1647
38d8927c
MD
1648 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
1649 of calling the procedure change-object-class.
1650
9cf5d9b7
MD
16512003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1652
1653 * ramap.c (scm_ramapc): Typo in error message.
1654
bbf8d523
MD
16552003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1656
b46fae00
MD
1657 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
1658 slots with instance allocation.
1659
bbf8d523
MD
1660 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
1661 class.
1662 (scm_compute_applicable_methods): Use scm_generic_function_methods.
1663
1664 * goops.c (scm_generic_function_methods): Support extended
1665 generic functions.
1666
ebf9b47c
MD
16672002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1668
1669 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 1670 Thanks to Neil for pointing this out!
ebf9b47c 1671
14a9ba3f
NJ
16722002-12-29 Neil Jerram <neil@ossau.uklinux.net>
1673
1674 * lang.h: Remove declarations matching definitions removed from
1675 lang.c (just below).
1676
c6a040a8
NJ
16772002-12-28 Neil Jerram <neil@ossau.uklinux.net>
1678
6054d805
NJ
1679 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
1680 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
1681 and already commented out.
1682
c6a040a8
NJ
1683 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
1684 scm_lreadparen): Support reading vectors with Elisp syntax if
1685 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
1686 is not currently defined, and there isn't even a configure switch
1687 to enable it yet.)
1688
3742c12f
MV
16892002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
1690
1691 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
1692 builds work.
1693 (EXTRA_DIST): Added version.h.in.
1694
fb50ef08
MD
16952002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1696
1697 This change makes it possible for one thread to do lazy sweeping
1698 while other threads are running. Now only the mark phase need to
1699 have all threads asleep. We should look further into this issue.
1700 Presently, I've put the locking of scm_i_sweep_mutex at
1701 "conservative" places due to my current lack of knowledge about
1702 the garbage collector. Please feel free to restrict these regions
1703 further to allow for maximal parallelism!
1704
1705 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
1706
1707 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
1708 scm_gc_register_collectable_memory): Substitute locking of
1709 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
1710 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
1711 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
1712 the single-thread section (which now only contains the mark
1713 phase).
1714 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
1715 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
1716
1717 * threads.c (gc_section_mutex): Removed.
1718
9ed24633
MD
17192002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1720
0d48aca5
MD
1721 * threads.c (create_thread): Clear parent field in root state in
1722 order not to unnecessarily remember dead threads.
1723
9ed24633
MD
1724 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
1725 (scm_trampoline_1, scm_trampoline_2): Use them.
1726
29717c89
MD
17272002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1728
1729 Partial introduction of real plugin interface.
1730
1731 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
1732 (EXTRA_DIST): Added threads-plugin.c.
1733
1734 * threads-plugin.h, threads-plugin.c: New files.
1735
1736 * threads.h: #include "libguile/threads-plugin.h".
1737
1738 * threads.c: #include "libguile/threads-plugin.c".
1739
1740 * pthread-threads.c: Temporarily remove debugging functions.
1741
1742 * threads.c, threads.h (scm_yield): Added back.
1743
e29e0b09
MD
17442002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1745
1746 * threads.c (really_launch): Detach before unlocking
1747 thread_admin_mutex in order not to risk being joined.
1748 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
1749 thread_admin_mutex locked during GC.
1750
1751 * pthread-threads.c, pthread-threads.h: Improvements to debugging
1752 functions.
1753
0b6843b1 17542002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 1755
6da2dfc4
MD
1756 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
1757 support for debugging mutex operations.
1758
1b92fb6b
MD
1759 * threads.c (scm_thread): Removed filed joining_threads.
1760 (thread_print): Print thread number as well as address of thread
1761 structure.
0b6843b1
MD
1762 (scm_join_thread): Bugfix.
1763 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
1764 scm_timed_wait_condition_variable, scm_signal_condition_variable,
1765 scm_broadcast_condition_variable): Use the low-level API.
1766 (scm_all_threads): Return copy of thread list (to prevent
1767 unintended destruction).
1768 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 1769
93cd4dcd
MD
1770 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
1771 pthread "native" recursive mutex support.
1772
2ff4f181
MD
17732002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1774
28d52ebb
MD
1775 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
1776 Simply lock a thread C API recursive mutex.
1777 (SCM_NONREC_CRITICAL_SECTION_START,
1778 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
1779 SCM_REC_CRITICAL_SECTION_END): Removed.
1780
1781 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
1782 direct calls to scm_rec_mutex_lock / unlock around the three calls
1783 to scm_m_expand_body.
1784
1785 * eval.c, eval.h (promise_free): New function.
1786 (scm_force): Rewritten; Now thread-safe; Removed
1787 SCM_DEFER/ALLOW_INTS.
1788
1789 * pthread-threads.h: Added partially implemented plugin interface
1790 for recursive mutexes. These are, for now, only intended to be
1791 used internally within the Guile implementation.
1792
1793 * pthread-threads.c: New file.
1794
1795 * threads.c: Conditionally #include "pthread-threads.c".
1796
1797 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
1798 thread-safe;
1799
1800 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
1801 SCM_GLOBAL_REC_MUTEX): New macros.
1802
1803 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
1804 macros---use mutexes instead.
1805
1806 * tags.h (SCM_IM_FUTURE): New tag.
1807
1808 * eval.c (scm_m_future): New primitive macro.
1809 (SCM_CEVAL): Support futures.
1810 (unmemocopy): Support unmemoization of futures.
1811
1812 * print.c (scm_isymnames): Name of future isym.
1813
2ff4f181
MD
1814 * version.c: Unmade some changes to my private copy that got
1815 committed by mistake.
1816
392d2833
MD
18172002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1818
e200ddee
MD
1819 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
1820 2002-12-10.
1821
392d2833
MD
1822 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
1823
1824 * gc.c (scm_gc_sweep): Call it here instead, which is a more
1825 logical place.
1826
1827 * threads.c (create_thread): Remember root object until the handle
1828 of the new thread is on all_threads list.
1829
1830 * root.c (scm_make_root): Moved copying of fluids until after
1831 creation of root handle so that the fluids are GC protected. Also
1832 removed the critical section.
1833
c4c52ebe
MD
18342002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1835
960c408c
MD
1836 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
1837
3cdde9d6 1838 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 1839 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
1840 (scm_realloc): Serialize call to realloc
1841 (scm_calloc): Same for calloc.
1842 Thanks to Wolfgang Jaehrling!
1843 (Now we have to make sure all calls to malloc/realloc are made
1844 through scm_malloc.)
1845
960c408c
MD
1846 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
1847
c4c52ebe
MD
1848 * threads.c (really_launch): Release heap (to prevent deadlock).
1849 (create_thread): Release heap before locking thread admin mutex.
1850
b0dc3d71
MD
18512002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1852
1853 * threads.c (scm_i_thread_invalidate_freelists): New
1854 function.
1855
1856 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
1857
1858 * modules.c (scm_export): Inserted a return statement.
1859
06e80f59
HWN
18602002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1861
1862 * modules.c (scm_export): new function
1863
1864 * gc-card.c: add a note about malloc()/free() overhead.
1865
a12611c3
MD
18662002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1867
1868 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
1869 in srcdir.
1870
c7fabadf
MD
18712002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1872
1873 These changes remove scm_ints_disabled (which hasn't has any
1874 effect in Guile for quite some time).
1875
1876 * async.c, error.h (scm_ints_disabled): Removed.
1877
1878 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
1879 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
1880 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
1881 (old_ints): Removed.
1882
1883 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
1884 critical section.
1885 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
1886 SCM_ALLOW_INTS.
1887
9bc4701c
MD
18882002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1889
52340b65
MD
1890 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
1891 Removed accidental #if 0 around these functions.
1892
9bc4701c
MD
1893 These changes are the start of support for preemptive
1894 multithreading. Marius and I have agreed that I commit this code
1895 into the repository although it isn't thoroughly tested and surely
1896 introduces many bugs. The bugs should only be exposed when using
1897 threads, though. Signalling and error handling for threads is
1898 very likely broken. Work on making the implementation cleaner and
1899 more efficient is needed.
1900
1901 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
1902 (SCM_NONREC_CRITICAL_SECTION_START,
1903 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
1904 SCM_REC_CRITICAL_SECTION_END): New macros.
1905 (SCM_CRITICAL_SECTION_START/END): Defined here.
1906
1907 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
1908 the three calls to scm_m_expand_body.
1909
1910 * gc.h: #include "libguile/pthread-threads.h";
1911 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
1912
1913 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
1914 scm_t_key;
1915
1916 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
1917 access.
1918
1919 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
1920
1921 * gc-freelist.c, threads.c (really_launch): Use
1922 SCM_FREELIST_CREATE.
1923
1924 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
1925
1926 * gc.c (scm_i_expensive_validation_check, scm_gc,
1927 scm_gc_for_newcell): Put threads to sleep before doing GC-related
1928 heap administration so that those pieces of code are executed
1929 single-threaded. We might consider rewriting these code sections
1930 in terms of a "call_gc_code_singly_threaded" construct instead of
1931 calling the pair of scm_i_thread_put_to_sleep () and
1932 scm_i_thread_wake_up (). Also, we would want to have as many of
1933 these sections eleminated.
1934
1935 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
1936
1937 * inline.h: #include "libguile/threads.h"
1938
1939 * pthread-threads.h: Macros now conform more closely to the
1940 pthreads interface. Some of them now take a second argument.
1941
1942 * threads.c, threads.h: Many changes.
1943
19442002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1945
1946 * Makefile.am (version.h): Changed $^ --> $< in rule for
1947 version.h.
1948
b2cbe8d8
RB
19492002-12-08 Rob Browning <rlb@defaultvalue.org>
1950
1951 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
1952 (SCM_MINOR_VERSION): use @--@ substitution now.
1953 (SCM_MICRO_VERSION): use @--@ substitution now.
1954 (scm_effective_version): new function prototype.
1955
1956 * version.c (scm_effective_version): new function, also add
1957 effective-version.
1958
1959 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
1960 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
1961 SCM_LIBRARY_DIR.
1962 (version.h): generate this here rather than configure.in. This
1963 approach tracks source edits better (i.e. more immediately).
1964 Might be worth considering for other .in files too.
1965
5441c65c
MV
19662002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
1967
1968 Reorganized thread package selection. A thread package now only
1969 implements a small set of pthread like functions and Guile
1970 implements the rest on top of that. Guile's implementation is
1971 what the "coop-pthreads" package has been previously. Support for
1972 "coop" threads has been removed until I get time to add it again.
1973
1974 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
1975 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
1976 null-threads.c, coop-pthreads.c.
1977 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
1978 pthread-threads.h.
1979
1980 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
1981
1982 * threads.h: Do not include "libguile/coop-defs.h". Include
1983 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
1984 (previously deprecated) C level thread API prototypes. They are
1985 now in the thread package specific headers, "null-threads.h" and
1986 "pthread-threads.h".
1987 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
1988 New.
1989 (scm_threads_init): Removed.
1990 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
1991 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
1992 SCM_I_THREAD_SWITCH_COUNT): Define here.
1993 (scm_single_thread_p): Removed.
1994 (scm_call_with_new_thread): Take two args directly instead of list
1995 of two args.
1996 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
1997 SCM_SET_THREAD_LOCAL_DATA): Define here.
1998
1999 * threads.c: Merged with "coop-pthreads.c".
2000
2001 * null-threads.h: Implement pthread-like API as a set of macros.
2002
2003 * pthread-threads.h: New, implement pthread-like API by deferring
2004 to pthread itself.
2005
2006 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
2007 has been lost in the reorganization.
2008
504d99c5
MD
20092002-12-01 Mikael Djurfeldt <mdj@linnaeus>
2010
2011 The following change makes it possible to move procedure
2012 application dispatch outside inner loops. The motivation was
2013 clean implementation of efficient replacements of R5RS primitives
2014 in SRFI-1.
2015
2016 The semantics is clear: scm_trampoline_N returns an optimized
2017 version of scm_call_N (or NULL if the procedure isn't applicable
2018 on N args).
2019
2020 Applying the optimization to map and for-each increases efficiency
2021 noticeably. For example, (map abs ls) is 8 times faster than
2022 before.
2023
2024 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
2025
2026 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
2027
2028 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
2029 (map, for-each): Handle also application on two args as a special
2030 case; Use trampolines.
2031
2032 Other changes:
2033
2034 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
2035 (subr2oless): Removed.
2036 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
2037 vector GC protected.
2038
2039 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
2040 scm_out_of_range.
2041
63dd3413
DH
20422002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
2043
2044 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
2045
4ba5f279
MD
20462002-11-17 Mikael Djurfeldt <mdj@linnaeus>
2047
2048 * debug.c (scm_make_iloc): Added missing "return".
2049
56ae231f
MV
20502002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
2051
2052 * strports.c (scm_eval_string_in_module): Validate second arg to
2053 be a module. Thanks to Arno Peters!
2054
80b28865
DH
20552002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2056
2057 * .cvsignore: remove goops.c
2058
c88b1456
DH
20592002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2060
2061 * modules.c (scm_env_top_level, scm_lookup_closure_module,
2062 module_variable, scm_module_lookup_closure,
2063 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
2064 scm_system_module_env_p): Don't compare SCM values with C
2065 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
2066 over SCM_NFALSEP.
2067
a8a19efc
DH
20682002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2069
2070 * eval.h (SCM_MAKE_ILOC): New macro.
2071
2072 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
2073 the iloc bitpattern here.
2074
76734914
MD
20752002-11-14 Mikael Djurfeldt <mdj@linnaeus>
2076
2077 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
2078 part of the API, otherwise it's difficult to write Guile
2079 extensions using non-blocking I/O => moved #include
2080 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
2081
2082 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
2083 s_unlock_mutex.
2084
8b5b4a75
MV
20852002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
2086
2087 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
2088 are defined in configure.in.
2089
2090 * threads.c: Removed SCM_API from function definitions. SCM_API
2091 is only for declarations.
2092
e5a83084
MD
20932002-11-07 Mikael Djurfeldt <mdj@linnaeus>
2094
9be8bb45
MD
2095 * coop-pthreads.h: Added support for thread specific data to the
2096 generic C API for the coop-pthreads case.
2097
e5a83084
MD
2098 * threads.c, threads.h (scm_cond_init): Undo unintentional API
2099 change.
6c214b62 2100 (scm_cond_broadcast): Added missing function.
e5a83084 2101
7edf178e
MV
21022002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2103
2104 * coop.c (coop_next_runnable_thread): Removed, wich should have
2105 happened when GUILE_ISELECT was hard-wired.
2106
7f5b1b77
MV
21072002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
2108
7caa1b07
MV
2109 * Makefile.am (libguile_la_SOURCES): Added threads.c
2110 (DOT_DOC_FILES): Added threads.doc.
2111 (DOT_X_FILES): Added threads.x.
2112 (EXTRA_libguile_la_SOURCES): Removed threads.c.
2113 (noinst_HEADERS): Added coop-pthreads.c.
2114 (modinclude_HEADERS): Added coop-pthreads.h.
2115
2116 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
2117 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
2118
bb11cbf4
MV
2119 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
2120 Thanks to Bill Schottstaedt!
2121
1d4cbbed
MV
2122 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
2123
7f5b1b77
MV
2124 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
2125 SCM_COPT_THREADS is defined.
2126 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
2127 is defined.
2128
2129 * coop-pthreads.c: Some harmless renamings of internal stuff.
2130 (create_thread): New, generalized version of
2131 scm_call_with_new_thread.
2132 (scm_call_with_new_thread): Use it.
2133 (scm_spawn_thread): New, use create_thread.
2134
d52f53b1
MV
21352002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
2136
2137 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
2138 start testing it now.
2139
2140 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
2141 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
2142 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
2143 is defined.
2144
30f920c3
MV
21452002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
2146
2147 * scmsigs.c (signal_cell_handlers, install_handler_data,
2148 scm_delq_spine_x, really_install_handler, install_handler): New
2149 scheme for triggering signal handlers, to simplify take_signal.
2150 (take_signal): Simplified, to avoid race conditions.
2151 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
2152 hasn't exited yet.
2153
2154 * async.c (scm_async_click): Reset pending_asyncs, handle
2155 signal_asyncs. Don't set cdr of a non-signal async to #f.
2156 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
2157 always. Set pending_asyncs.
2158 (scm_system_async_mark_for_thread): Check that thread has not
2159 exited.
2160 (scm_unmask_signals, decrease_block): Call scm_async_click after
2161 block_asyncs becomes zero.
2162
2163 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
2164 active_asyncs.
2165
2166 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
2167 fields.
2168 * root.c (root_mark): Mark them.
2169 (make_root): Initialize them.
2170
2171 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
2172 USE_COOP_THREADS.
2173 (scm_internal_select): Define one version for USE_COOP_THREADS and
2174 one for USE_NULL_THREADS.
2175 (scm_init_iselect): Likewise.
2176
2177 * inline.h (scm_cell, scm_double_cell): Also allow
2178 USE_COPT_THREADS to not protect the slot initializers.
2179
2180 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
2181 because threads need to be initialized before the stack, but
2182 gsubrs such as scm_timed_condition_variable_wait can only be
2183 created later.
2184
2185 * threads.h: Include "coop-pthreads.h" when requested.
2186 (scm_threads_make_mutex, scm_threads_lock_mutex,
2187 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
2188 not implemented anyway.
2189 (scm_init_thread_procs, scm_try_mutex,
2190 scm_timed_condition_variable_wait,
2191 scm_broadcast_condition_variable, scm_c_thread_exited_p,
2192 scm_thread_exited_p): New prototypes.
2193 (struct timespec): Define if not already defined.
2194 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
2195 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
2196 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
2197 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
2198 deprecated.
2199
2200 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
2201 requested.
2202 (scm_thread_exited_p): New.
2203 (scm_try_mutex, scm_broadcast_condition_variable): Newly
2204 registered procedures.
2205 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
2206 Use the latter as the procedure for "wait-condition-variable",
2207 thus offering a optional timeout parameter to Scheme.
2208 (scm_wait_condition_variable): Implement in terms of
2209 scm_timed_wait_condition_variable.
2210 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
2211 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
2212 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
2213 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
2214 scm_make_mutex, etc, and deprecate.
2215 (scm_init_threads): Do not create smobs, leave this to
2216 scm_threads_init. Do not include "threads.x" file.
2217 (scm_init_thread_procs): New, include "threads.x" here.
2218
2219 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
2220 scm_null_mutex_lock, scm_null_mutex_unlock,
2221 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
2222 scm_null_condvar_wait, scm_null_condvar_signal,
2223 scm_null_condvar_destroy): Removed.
2224 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
2225 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
2226 scm_cond_destory): Do not define, they are now deprecated and
2227 handled by threads.{h,c}.
2228
2229 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
2230 (scm_threads_init): Create smobs here, using the appropriate
2231 sizes.
2232 (block): Removed, now unused.
2233 (scm_c_thread_exited_p): New.
2234 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
2235 scm_null_mutex_destroy, scm_null_condvar_init,
2236 scm_null_condvar_wait, scm_null_condvar_signal,
2237 scm_null_condvar_destroy): Removed and updated users to do their
2238 task directly.
2239 (scm_try_mutex, timeval_subtract,
2240 scm_timed_wait_condition_variable,
2241 scm_broadcast_condition_variable): New.
2242 (scm_wait_condition_variable): Removed.
2243
2244 * coop-defs.h (coop_m): Added 'level' field.
2245 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
2246 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
2247 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
2248 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
2249 define.
2250 (coop_condition_variable_broadcast): New.
2251
2252 * coop-threads.c (scm_threads_init): Create smobs here, using the
2253 appropriate sizes.
2254 (scm_c_thread_exited_p, scm_try_mutex,
2255 scm_timed_wait_condition_variable,
2256 scm_broadcast_condition_variable): New.
2257 (scm_wait_condition_variable): Removed.
2258
2259 * coop.c (coop_new_mutex_init): Initialize level.
2260 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
2261 level.
2262 (coop_condition_variable_signal): Renamed to
2263 coop_condition_variable_broadcast and reimplemented in terms of
2264 that. Thus...
2265 (coop_condition_variable_broadcast): New.
2266
2267 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
2268
2269 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
2270
087ed40d
MV
22712002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
2272
65a23095
MV
2273 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
2274 of system headers.
2275
087ed40d
MV
2276 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
2277 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 2278 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 2279
5ec1d2c8
DH
22802002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2281
2282 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
2283 scm_definedp to scm_defined_p and deprecated scm_definedp.
2284
100ae50d
DH
22852002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2286
2287 * async.h, async.c (scm_system_async): Fixed deprecation to work
2288 correctly when deprecated features are excluded.
2289
2794cb50
MV
22902002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2291
2292 * async.c (scm_system_async_mark_for_thread): Validate thread
2293 argument.
2294
2295 * coop-threads.c (scm_i_thread_root): Do not validate argument.
2296
2297 * feature.c (scm_init_feature): Don't add 'threads' for
2298 USE_NULL_THREADS.
2299
2300 * inline.h (scm_cell, scm_double_cell): Also allow
2301 USE_NULL_THREADS to not protect the slot initializers.
2302
2303 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
2304 "USE_THREAD".
2305
2306 * Makefile.am (noinst_HEADERS): Added null-threads.c.
2307 (modinclude_HEADERS): Added null-threads.h.
2308
2309 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
2310 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
2311 (scm_init_threads): Use generic type names scm_t_mutex and
2312 scm_t_cond instead of coop_m and coop_c.
2313
2314 * null-threads.c, null-threads.h: New files.
2315
ff810d7a
MV
23162002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
2317
2318 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
2319 This is to support makes that know about "$<" only in pattern
2320 rules, like Sun's make.
2321
a90bdb73
MV
23222002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
2323
2324 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
2325 substitution. Thanks to David Allouche!
2326
e71a8bf2
DH
23272002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
2328
2329 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
2330 !SCM_ENABLE_DEPRECATED.
2331
41f77ff5
MV
23322002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2333
504d99c5 2334 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
2335 scm_i_thread_root when USE_THREADS is defined. Use scm_root
2336 otherwise.
2337
2338 * scmsigs.c (take_signal): Only call scm_i_thread_root when
2339 USE_THREADS is defined. Use scm_root otherwise.
2340 (scm_sigaction_for_thread): Ignore THREAD argument when
2341 USE_THREADS is not defined. Also, move THREAD argument defaulting
2342 out of HAVE_SIGACTION section, which was a bug.
2343
6d16b125
MV
23442002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2345
2346 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
2347 signal_handlers, not the closure that is used as the async.
2348 The closure is stored in signal_handler_cells, as previously.
2349
acfa1f52
MV
23502002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
2351
2352 * root.h (scm_root_state): Added 'block_async' slot.
2353 (scm_active_asyncs): Removed abbrev.
2354 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
2355
2356 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
2357 abbrev.
2358
2359 * async.h (scm_call_with_blocked_asyncs,
2360 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
2361 scm_c_call_with_unblocked_asyncs): New prototypes.
2362 (scm_mask_signals, scm_unmask_signals): Deprecated.
2363 (scm_mask_ints): Turned into a macro.
2364 * async.c (scm_mask_ints): Removed.
2365 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
2366 this should not be necessary.
2367 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
2368 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
2369 deprecation warning and check for errornous use. Set block_asyncs
2370 instead of scm_mask_ints.
2371 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
2372 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
2373 scm_c_call_with_unblocked_asyncs): New.
2374
2375 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
2376 Asyncs are enabled by default.
2377
34010f56
NJ
23782002-10-09 Neil Jerram <neil@ossau.uklinux.net>
2379
2380 * vports.c (scm_make_soft_port): Allow vector argument to carry a
2381 6th element: an input waiting thunk.
2382 (sf_input_waiting): New.
2383
9310d6f2
MV
23842002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
2385
2386 * root.c (root_mark): Mark active_asyncs slot.
2387
2388 * async.c (scm_async_click): Set the cdr of a executed handler
2389 cell to SCM_BOOL_F, not SCM_EOL.
2390 (scm_i_queue_async_cell): Queue the cell at the end of the list,
2391 and only if the handler procedure is not already present.
2392 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
2393 with SCM_BOOL_F.
2394 * scmsigs.c (scm_sigaction_for_thread): Likewise.
2395
ac48c719
RB
23962002-10-04 Rob Browning <rlb@defaultvalue.org>
2397
1360a142
RB
2398 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
2399
2400 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
2401 scm_lt_dlopenext, and scm_lt_dlerror.
2402 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
2403 and scm_lt_dlerror.
2404 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
2405 and scm_lt_dlerror.
2406 (sysdep_dynl_init): switch to scm_lt_dlinit();
2407
2408 * Makefile.am (libguile_la_LIBADD): switch to use
2409 libguile-ltdl.la.
2410
504d99c5 2411 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 2412
497092c9
MV
24132002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
2414
2415 * scmsigs.h (scm_sigaction_for_thread): New prototype.
2416 * scmsigs.c (got_signal): Removed.
2417 (signal_handler_cells, signal_handler_threads): New.
2418 (take_signal): Queue the cell of the signal for the specified
2419 thread. Reset the signal handler on systems that don't have
2420 sigaction.
2421 (sys_deliver_signals): Removed.
2422 (close_1): New.
2423 (scm_sigaction_for_thread): Renamed from scm_sigaction and
2424 extended to also set the thread of a signal and allocate a cell
2425 for it. Keep the Scheme name "sigaction". Check that signum is
2426 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
2427 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
2428 (scm_init_scmsigs): Allocate signal_handler_cells and
2429 signal_handler_threads vectors.
2430
2431 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
2432 that system asnycs and user asyncs are separated. Reimplemented
2433 system asyncs to work per-thread.
2434
2435 * gc.c (scm_init_gc): Do not use scm_system_async.
2436
2437 * async.h (scm_asyncs_pending, scm_set_tick_rate,
2438 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
2439 Removed prototypes.
2440 (scm_i_queue_async_cell): New.
2441
2442 * __scm.h (scm_asyncs_pending_p): Removed.
2443 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
2444 scm_asyncs_pending_p.
2445
2446 * async.h (scm_system_async_mark_for_thread): New prototype.
2447
2448 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
2449
2450 * root.h (scm_root_state): Added new "active_asyncs" slot.
2451 * root.c (scm_make_root): Initialize it to SCM_EOL.
2452
2453 * coop-defs.h (coop_t): Added new "handle" slot.
2454 * coop-threads.c (all_threads, scm_current_thread,
2455 scm_all_threads, scm_i_thread_root): New.
2456 (scm_threads_init): Add main thread to all_threads.
2457 (scheme_launch_thread): Remove thread from all_threads when it
2458 terminates.
2459 (scm_call_with_new_thread): Initialize handle slot of coop_t
2460 structure and add new thread to all_threads.
2461 (scm_spawn_thread): Likewise.
2462
2463 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
2464 * threads.c (scm_current_thread, scm_all_threads): Register as
2465 primitives.
2466
2467 * dynl.c: Use scm_lt_ prefix for libltdl functions.
2468
480fa28d
NJ
24692002-09-29 Neil Jerram <neil@ossau.uklinux.net>
2470
2471 * script.c (scm_compile_shell_switches): Fix bad spelling of
2472 `explicitly' in comment.
2473
24742002-09-28 Neil Jerram <neil@ossau.uklinux.net>
2475
2476 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
2477 Refer to provided? in doc string rather than deprecated feature?.
2478
3553e1d1
GH
24792002-09-24 Gary Houston <ghouston@arglist.com>
2480
2481 * inline.h (scm_double_cell): prevent reordering of statements
2482 with any following code (for GCC 3 strict-aliasing).
2483 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
2484 the earlier version of the reordering prevention.
2485
4ad0814a
HWN
24862002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2487
2488 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
2489
e88e4f2e
HWN
24902002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2491
2492 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
2493 protection.
2494
1e71eafb
HWN
24952002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2496
2497 * inline.h: include stdio.h
2498
2499 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
2500
61ef9c1f
HWN
25012002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2502
dac04e9f
HWN
2503 * gc-segment.c (scm_i_make_initial_segment): check user settings
2504 for sanity.
2505
2506 * gc-malloc.c (scm_gc_init_malloc): check user settings for
2507 sanity.
dac04e9f
HWN
2508
2509 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
2510
ffd72400
HWN
2511 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
2512
2513 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
2514 these won't ever wrap around with high memory usage. Thanks to
2515 Sven Hartrumpf for finding this.
ffd72400 2516
5bd4a949
HWN
2517 * gc-freelist.c: include <stdio.h>
2518
61ef9c1f
HWN
2519 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
2520
ffd0ef3b
MV
25212002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
2522
a27e3d14
MV
2523 * vectors.h (SCM_VECTOR_REF): New.
2524
ffd0ef3b
MV
2525 * snarf.h (SCM_DEFINE_PUBLIC): New.
2526
f8a1712b
MV
25272002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
2528
2529 * socket.c (scm_addr_vector): Added size of address to arguments.
2530 Use it to avoid accessing a non-existent path in a sockaddr_un.
2531 Changed all callers.
2532
7200a36b
HWN
25332002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2534
1383773b
HWN
2535 * gc.h: remove DOUBLECELL card flags.
2536
2537 * gc-malloc.c (scm_calloc): try to use calloc() before calling
2538 scm_realloc().
2539
2540 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
2541 init loop; handle this from scm_init_card_freelist()
2542
2543 * gc-card.c (scm_init_card_freelist): init bit vector here.
2544
7200a36b 2545 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 2546 num2float.i.c (FLOAT2NUM): idem
7200a36b 2547
9981de3a
HWN
25482002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2549
2550 * eval.h: prepend libguile/ to include path
2551
19647556
MV
25522002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
2553
2554 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
2555