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