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