* gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
f96460ce
DH
12003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2
3 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
4 type errors that showed up when compiling with SCM_DEBUG defined.
5
d0f6ceb8
DH
62003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
7
8 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
9 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
10 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
11 fix compile errors with --disable-deprecated.
12
19a7a089
RB
132003-04-17 Rob Browning <rlb@defaultvalue.org>
14
15 * numbers.c (scm_integer_expt): fix case where we were declaring
16 vars in the middle of a statement block. Thanks to Thamer
17 Al-Harbash.
18
47cd67db
MD
192003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
20
0fd7dcd3
MD
21 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
22 change.
23
47cd67db
MD
24 * eq.c (scm_eqv_p): Turned into a primitive generic.
25
3b8b889c
RB
262003-04-16 Rob Browning <rlb@defaultvalue.org>
27
312006bb
RB
28 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
29 Thanks to Boyd Gerber.
30 Added check for __arm__ in addition to arm for LINUX and copied
31 __s390__ defines from upstream libgc. Thanks to James Treacy for
32 reporting the problems.
c7ef2ea1 33
3b8b889c
RB
34 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
35
36 * socket.c: use SCM_CHAR_BIT.
37
38 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
39
40 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
41
43261b39
MD
422003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
43
44 * feature.c (scm_init_feature): Always add threads feature.
45
58241edc
MD
462003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
47
48 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
49 scm_at_assert_bound_ref. (We don't want the unbound check. See
50 oop/goops/active-slot.scm.)
51
94e91275
RB
522003-04-14 Rob Browning <rlb@defaultvalue.org>
53
54 * tags.h: scm_t_intptr should have been intptr_t.
55
3071ea27
RB
562003-04-13 Rob Browning <rlb@defaultvalue.org>
57
58 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
59 test. Instead use
60 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
61 as gc_os_dep.c suggests is appropriate.
62
63 * goops.c (prep_hashsets): make static to match prototype.
64 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
65 Chin.
66
67 * c-tokenize.lex: remove trailing comma from enum. Thanks to
68 Albert Chin.
69
70 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
71 Klausner.
72
21ab2aeb
MD
732003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
74
75 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
76 indicated through extra fields in getters-n-setters.
77 (scm_add_slot): Adapted to new format of getters_n_setters slot.
78 (Thanks to Andy Wingo.)
79
dff96e95
HWN
802003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
81
82 * gc-segment.c: add comment
83
07921c76
RB
842003-04-07 Rob Browning <rlb@defaultvalue.org>
85
b5331f10
RB
86 * debug.h: change "id" arg name to "info_id" to avoid objective-c
87 clash.
88
07921c76
RB
89 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
90 and add regression test to standalone/.
91
922003-04-06 Rob Browning <rlb@defaultvalue.org>
93
94 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
95 Thanks to Dale P. Smith.
96
97 * random.c: #include gmp.h.
98 (scm_c_random_bignum): normalize result on return.
99
100 * init.c: #include gmp.h.
101
102 * numbers.h: remove the gmp.h #include (not needed now).
103
104 * posix.h: change occurences of "id" to something else so we don't
105 cause trouble when included via objective-c (can't hurt, might
106 help). Still have usage in debug.h, though.
107
938f6b7c
MD
1082003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
109
372691d8
MD
110 * random.c (scm_c_random_bignum): Don't generate a random number
111 equal to m (the second argument of scm_c_random_bignum); only
112 generate numbers in the range 0 <= r < m.
c5f268f8
MD
113 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
114 scm_var_random_state.
372691d8 115
938f6b7c
MD
116 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
117 clause.
118
6cdb8c3f
RB
1192003-04-05 Rob Browning <rlb@defaultvalue.org>
120
938f6b7c 121 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
122 uses before any code.
123
15635be5
MD
1242003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
125
1ecfd013
MD
126 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
127 not top_srcdir.
128
15635be5
MD
129 * hashtab.c (rehash_after_gc): Clear to_rehash list before
130 processing it in order to avoid an infinite loop.
131
132 * print.c (scm_prin1): Remember old state of pstate->writingp.
133
73be1d9e
MV
1342003-04-05 Marius Vollmer <mvo@zagadka.de>
135
136 * Changed license terms to the plain LGPL thru-out.
137
ad815c06
RB
1382003-04-04 Rob Browning <rlb@defaultvalue.org>
139
140 * socket.c (FLIPCPY_NET_HOST_128): new macro.
141 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
142 rewrite to handle GMP bignums.
143
144
145 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
146
147 * ports.c (scm_getc): minor tweak.
148
149 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
150 rewrite to handle GMP bignums.
151
152 * numbers.c: rewrite *many* functions to handle GMP bignums.
153
154 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
155 handle GMP bignums.
156
157 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
158
159 * init.c (check_config): remove SCM_BIGDIG conditionals.
160 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
161
162 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
163
164 * eval.c: remove SCM_BIGDIG conditionals.
165
166 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
167
6cdb8c3f
RB
1682003-03-31 Rob Browning <rlb@defaultvalue.org>
169
170 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
171 to Kevin Ryde.)
172
1732003-03-27 Rob Browning <rlb@defaultvalue.org>
174
175 * threads.h: fix various preprocessor usages of new public
176 symbols to expect 0 or 1 values rather than 1 or undefined.
177 i.e. change #ifdef to #if, etc.
178
179 * threads.c: fix various preprocessor usages of new public
180 symbols to expect 0 or 1 values rather than 1 or undefined.
181 i.e. change #ifdef to #if, etc.
182
183 * tags.h: fix various preprocessor usages of new public
184 symbols to expect 0 or 1 values rather than 1 or undefined.
185 i.e. change #ifdef to #if, etc.
186
187 * stacks.c: fix various preprocessor usages of new public
188 symbols to expect 0 or 1 values rather than 1 or undefined.
189 i.e. change #ifdef to #if, etc.
190
191 * stackchk.h: fix various preprocessor usages of new public
192 symbols to expect 0 or 1 values rather than 1 or undefined.
193 i.e. change #ifdef to #if, etc.
194
195 * stackchk.c: fix various preprocessor usages of new public
196 symbols to expect 0 or 1 values rather than 1 or undefined.
197 i.e. change #ifdef to #if, etc.
198
199 * sort.c: fix various preprocessor usages of new public
200 symbols to expect 0 or 1 values rather than 1 or undefined.
201 i.e. change #ifdef to #if, etc.
202
203 * read.c: fix various preprocessor usages of new public
204 symbols to expect 0 or 1 values rather than 1 or undefined.
205 i.e. change #ifdef to #if, etc.
206
207 * random.c: fix various preprocessor usages of new public
208 symbols to expect 0 or 1 values rather than 1 or undefined.
209 i.e. change #ifdef to #if, etc.
210
211 * print.c: fix various preprocessor usages of new public
212 symbols to expect 0 or 1 values rather than 1 or undefined.
213 i.e. change #ifdef to #if, etc.
214
215 * objects.c: fix various preprocessor usages of new public
216 symbols to expect 0 or 1 values rather than 1 or undefined.
217 i.e. change #ifdef to #if, etc.
218
219 * numbers.h: fix various preprocessor usages of new public
220 symbols to expect 0 or 1 values rather than 1 or undefined.
221 i.e. change #ifdef to #if, etc.
222
223 * null-threads.c: fix various preprocessor usages of new public
224 symbols to expect 0 or 1 values rather than 1 or undefined.
225 i.e. change #ifdef to #if, etc.
226
227 * lang.c: fix various preprocessor usages of new public
228 symbols to expect 0 or 1 values rather than 1 or undefined.
229 i.e. change #ifdef to #if, etc.
230
231 * lang.h: fix various preprocessor usages of new public
232 symbols to expect 0 or 1 values rather than 1 or undefined.
233 i.e. change #ifdef to #if, etc.
234
235 * iselect.h: fix various preprocessor usages of new public
236 symbols to expect 0 or 1 values rather than 1 or undefined.
237 i.e. change #ifdef to #if, etc.
238
239 * init.c: fix various preprocessor usages of new public
240 symbols to expect 0 or 1 values rather than 1 or undefined.
241 i.e. change #ifdef to #if, etc.
242
243 * gh_data.c: fix various preprocessor usages of new public
244 symbols to expect 0 or 1 values rather than 1 or undefined.
245 i.e. change #ifdef to #if, etc.
246
247 * gh.h: fix various preprocessor usages of new public
248 symbols to expect 0 or 1 values rather than 1 or undefined.
249 i.e. change #ifdef to #if, etc.
250
251 * gen-scmconfig.c: change most new public symbols to be defined to
252 0 or 1 rather than being either 1 or undefined.
253
254 * gc_os_dep.c: fix various preprocessor usages of new public
255 symbols to expect 0 or 1 values rather than 1 or undefined.
256 i.e. change #ifdef to #if, etc.
257 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
258
259 * gc.h: fix various preprocessor usages of new public
260 symbols to expect 0 or 1 values rather than 1 or undefined.
261 i.e. change #ifdef to #if, etc.
262
263 * gc-card.c: fix various preprocessor usages of new public
264 symbols to expect 0 or 1 values rather than 1 or undefined.
265 i.e. change #ifdef to #if, etc.
266
267 * gc-mark.c: fix various preprocessor usages of new public
268 symbols to expect 0 or 1 values rather than 1 or undefined.
269 i.e. change #ifdef to #if, etc.
270
271 * feature.c: fix various preprocessor usages of new public
272 symbols to expect 0 or 1 values rather than 1 or undefined.
273 i.e. change #ifdef to #if, etc.
274
275 * evalext.c: fix various preprocessor usages of new public
276 symbols to expect 0 or 1 values rather than 1 or undefined.
277 i.e. change #ifdef to #if, etc.
278
279 * eval.h: fix various preprocessor usages of new public
280 symbols to expect 0 or 1 values rather than 1 or undefined.
281 i.e. change #ifdef to #if, etc.
282
283 * eval.c: fix various preprocessor usages of new public
284 symbols to expect 0 or 1 values rather than 1 or undefined.
285 i.e. change #ifdef to #if, etc.
286
287 * eq.c: fix various preprocessor usages of new public
288 symbols to expect 0 or 1 values rather than 1 or undefined.
289 i.e. change #ifdef to #if, etc.
290
291 * coop.c: fix various preprocessor usages of new public
292 symbols to expect 0 or 1 values rather than 1 or undefined.
293 i.e. change #ifdef to #if, etc.
294
295 * coop-threads.c: fix various preprocessor usages of new public
296 symbols to expect 0 or 1 values rather than 1 or undefined.
297 i.e. change #ifdef to #if, etc.
298
299 * coop-pthreads.c: fix various preprocessor usages of new public
300 symbols to expect 0 or 1 values rather than 1 or undefined.
301 i.e. change #ifdef to #if, etc.
302
303 * coop-defs.h: fix various preprocessor usages of new public
304 symbols to expect 0 or 1 values rather than 1 or undefined.
305 i.e. change #ifdef to #if, etc.
306
307 * convert.i.c: fix various preprocessor usages of new public
308 symbols to expect 0 or 1 values rather than 1 or undefined.
309 i.e. change #ifdef to #if, etc.
310
311 * continuations.c: fix various preprocessor usages of new public
312 symbols to expect 0 or 1 values rather than 1 or undefined.
313 i.e. change #ifdef to #if, etc.
314
315 * _scm.h: fix various preprocessor usages of new public symbols to
316 expect 0 or 1 values rather than 1 or undefined. i.e. change
317 #ifdef to #if, etc.
318
d11d697a
MV
3192003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
320
9686f86d
MV
321 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
322
323 * deprecated.c, deprecated.h: New files, to collect deprecated
324 things in one place.
325 * Makefile.am: Added them in all the right places.
326
d11d697a
MV
327 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
328 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
329 builds work.
9686f86d
MV
330 (DOT_X_FILES): Removed "iselect.x".
331 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 332
e3c0c3b9
RB
3332003-03-25 Rob Browning <rlb@defaultvalue.org>
334
335 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
336 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
337
338 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
339
340 * vports.c: #include <config.h> if HAVE_CONFIG_H.
341
342 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
343 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
344
345 * threads.h: replace usage of struct timespect with
346 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
347 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
348 favor of scm_t_timespec from scmconfig.h.
349
350 * threads.c: move libguile/_scm.h include to the top so we pick up
351 any critical defines like _GNU_SOURCE early. Replace usage of
352 struct timespect with scm_t_timespec. Replace usage of
353 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
354 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
355
356 * threads-plugin.h: replace usage of struct timespect with
357 scm_t_timespec.
358
359 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
360 usage of struct timespect with scm_t_timespec.
361
362 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
363 HAVE_INTTYPES_H handling to scmconfig.h. #include
364 "libguile/__scm.h". Rework handling for scm_t_bits,
365 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
366 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
367 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
368 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
369 SCM_HAVE_ARRAYS.
370
371 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
372
373 * struct.c: #include <config.h> if HAVE_CONFIG_H.
374
375 * strports.c: #include <config.h> if HAVE_CONFIG_H.
376
377 * strop.c: #include <config.h> if HAVE_CONFIG_H.
378
379 * stime.h: move handling of time related headers to scmconfig.h.
380
381 * stime.c: #include <config.h> if HAVE_CONFIG_H.
382
383 * stacks.c: replace usage of STACK_GROWS_UP with
384 SCM_STACK_GROWS_UP.
385
386 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
387 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
388
389 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
390 of uint32 and HAVE_UINT_32 with scm_t_int32.
391
392 * smob.c: #include <config.h> if HAVE_CONFIG_H.
393
394 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
395
396 * script.c: #include <config.h> if HAVE_CONFIG_H.
397
398 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
399
400 * scmconfig.h.top: new file -- preamble for scmconfig.h.
401
402 * rw.c: #include <config.h> if HAVE_CONFIG_H.
403
404 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
405
406 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
407
408 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
409
410 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
411 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
412 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
413 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
414
415 * ramap.c: replace usage of HAVE_LONG_LONGS with
416 "SCM_SIZEOF_LONG_LONG != 0".
417
418 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
419 "libguile/scmconfig.h".
420
421 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
422
423 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
424 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
425
426 * posix.c: #include <config.h> if HAVE_CONFIG_H.
427
428 * ports.c: #include <config.h> if HAVE_CONFIG_H.
429
430 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
431
432 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
433 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
434 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
435 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
436 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
437 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
438 "SCM_SIZEOF_LONG_LONG != 0".
439
440 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
441 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
442 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
443 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
444
445 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
446
447 * null-threads.h: replace usage of struct timespect with
448 scm_t_timespec.
449
450 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
451
452 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
453 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
454 scm_t_uint64 and rename usages.
455
456 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
457
458 * load.c: #include <config.h> if HAVE_CONFIG_H.
459
460 * iselect.h: move handling of time related headers to scmconfig.h.
461 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
462 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
463 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
464
465 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
466 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
467 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
468
469 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
470
471 * inline.h: #include "libguile/__scm.h" at the top. Change code
472 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
473 what to do instead of creating a new public #define. Rename usage
474 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
475 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
476 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
477
478 * inline.c: rearrange handling -- now we just #define
479 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
480 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
481 appropriate, and we use that in inline.h along with the above
482 define to determine how to respond.
483
484 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
485 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
486
487 * guile.c: #include <config.h> if HAVE_CONFIG_H.
488
489 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
490 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
491
492 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
493
494 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
495
496 * gen-scmconfig.c: new file -- see comments in file for details.
497
498 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
499
500 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
501 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
502
503 * gc.h: replace usage of SIZEOF_LONG with
504 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
505 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
506 since we handle that in scmconfig.h now.
507
508 * gc.c: #include <config.h> if HAVE_CONFIG_H.
509
510 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
511 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
512 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
513
514 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
515
516 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
517 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
518
519 * fports.c: #include <config.h> if HAVE_CONFIG_H.
520
521 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
522
523 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
524 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
525
526 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
527
528 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
529 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
530
531 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
532 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
533 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
534 with "SCM_SIZEOF_LONG_LONG != 0".
535
536 * error.c: #include <config.h> if HAVE_CONFIG_H.
537
538 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
539 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
540 with "SCM_SIZEOF_LONG_LONG != 0".
541
542 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
543
544 * coop.c: replace usage of struct timespect with scm_t_timespec.
545 #include <config.h> if HAVE_CONFIG_H.
546
547 * coop-threads.c: #include "libguile/_scm.h" early. Replace
548 usage of struct timespect with scm_t_timespec. Replace usage of
549 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
550
551 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
552 usage of struct timespect with scm_t_timespec. Replace usage of
553 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
554
555 * coop-defs.h: move handling of time related headers to
556 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
557 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
558 timespect with scm_t_timespec.
559
560 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
561
562 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
563
564 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
565 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
566
567 * continuations.c: move libguile/_scm.h include to the top so we
568 pick up any critical defines like _GNU_SOURCE early.
569
570 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
571
572 * async.c: #include <config.h> if HAVE_CONFIG_H.
573
574 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
575
576 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
577 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
578
579 * __scm.h: move libguile/scmconfig.h include up to the top, so
580 we're sure to pick up any critical defines like _GNU_SOURCE early.
581 #include <limits.h> removed in favor of scmconfig.h inclusion when
582 appropriate. STDC_HEADERS based inclusion of stdlib.h,
583 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
584 scmconfig.h inclusion when appropriate. Various Win32 related
585 definitions removed in favor of scmconfig.h inclusion when
586 appropriate.
587 (HAVE_UINTPTR_T): definition removed (see NEWS).
588 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
589 (HAVE_LONG_LONGS): definition removed (see NEWS).
590 (HAVE_LONG_LONG): definition removed (see NEWS).
591 (HAVE_PTRDIFF_T): definition removed (see NEWS).
592
593 * Makefile.am: scmconfig.h is now generated by building and
594 running gen-scmconfig.h and capturing its output. gen-scmconfig
595 uses config.h and the configure.in generated gen-scmconfig.h to
596 decide what to output. See gen-scmconfig.c for details.
597 (noinst_PROGRAMS): add gen-scmconfig.
598 (gen_scmconfig_SOURCES): new variable.
599 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
600 cross-compiling right.
601 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
602 (BUILT_SOURCES): add scmconfig.h.
603
25e0bf97
MV
6042003-03-19 Marius Vollmer <mvo@zagadka.de>
605
606 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
607 Adrian Bunk. Thanks!
608
74b6d6e4
MD
6092003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
610
611 * goops.c (make_class_from_template): New fourth arg:
612 applicablep.
613 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
614 cpls.
615
616 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
617
618 * goops.c, objects.c, objects.h (scm_make_extended_class): New
619 second arg: applicablep.
620 (scm_i_inherit_applicable): New function.
621
622 * goops.c, goops.h (scm_class_applicable,
623 scm_class_extended_accessor): New classes.
624
5c9e7dad
DH
6252003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
626
627 * procs.c (scm_procedure_documentation): Removed redundant
628 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
629 predicates.
630
f8af5c6d
MD
6312003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
632
c614a00b
MD
633 * list.c, list.h (scm_filter, scm_filter_x): New functions.
634
109c2c9f
MD
635 * modules.c (scm_module_import_interface): New function.
636
f8af5c6d
MD
637 * goops.c, goops.h (scm_class_accessor_method): Renamed from
638 scm_class_accessor.
639 (scm_class_accessor): New class.
640
a48d60b1
MD
6412003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
642
643 * goops.c (scm_primitive_generic_generic): Enable primitive
644 generic if not enabled.
645 (scm_sys_goops_loaded): Setup unextended primitive generics.
646
647 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
648
649 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
650 snarf macros.
651
652 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
653 testing example. All uses of SCM_GPROC should be converted.)
654
655 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
656 scm_assoc.
657
658 * eq.c (scm_equal_p): Turned into a primitive generic.
659
84edc049
RB
6602003-02-27 Rob Browning <rlb@defaultvalue.org>
661
662 * Makefile.am (scmconfig.h): new target -- generate file from
663 ../config.h.
664 (modinclude_HEADERS): remove version.h.
665 (nodist_modinclude_HEADERS): add version.h.
666
ea5c9285
MD
6672003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
668
b4a1358c
MD
669 This fixes a serious GC bug, introduced during the latest
670 reorganization of the GC, which disabled freeing of structs and
671 GOOPS objects:
672
673 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
674 SCM_EOL.
53af8255
MD
675 (scm_struct_prehistory): Move scm_free_structs to
676 scm_before_mark_c_hook.
ea5c9285 677
b4a1358c
MD
678 * gc-card.c (sweep_card): Check that we haven't swept structs on
679 this card before. That can happen if scm_i_sweep_all_segments has
680 been called from some other place than scm_igc.
681
c35738c1
MD
6822003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
683
231a4ea8
MD
684 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
685 (since hash tables now adapt their size).
686
687 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
688 (current number of prehistory bindings; hashtable code will select
689 a prime which is greater than this value).
690
691 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
692 (current number of initial symbols).
693
694 * properties.c (scm_init_properties): Don't specify size of
695 scm_properties_whash.
696
697 * objprop.c (scm_init_objprop): Don't specify size of
698 scm_object_whash.
699
700 * keywords.c (scm_init_keywords): Don't specify a hash table size.
701
c35738c1
MD
702 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
703
704 The following changes introduce the use of resizable hash tables
705 throughout Guile. It also renames the old *-hash-table* functions
706 to *-alist-vector* and places them, together with the rest of the
707 weak vector support, in the module (ice-9 weak-vector). We should
708 probably introduce a new, better, API for weak references, for
709 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
710 look like and are used like ordinary pairs.)
711
712 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
713 leaf_environment_fold, obarray_remove_all): Use hashtable
714 accessors.
715
716 * gc.c (scm_init_storage): Moved hook initialization to
717 scm_storage_prehistory.
718 (scm_storage_prehistory): New function.
719 (scm_igc): Added commentary about placement of
720 scm_after_sweep_c_hook.
721
722 * gc-mark.c (scm_mark_all): Use hashtable accessors.
723 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
724 SCM_WVECT_WEAK_VALUE_P.
725
726 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
727 functions.
728 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
729 Removed.
730 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
731 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
732
733 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
734 calls to scm_storage_prehistory and scm_hashtab_prehistory.
735
736 * modules.c (module-reverse-lookup): Use hashtable accessors.
737
738 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
739
740 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
741 scm_make_weak_value_alist_vector,
742 scm_make_doubly_weak_alist_vector): New functions.
743
744 * weaks.c (scm_init_weaks_builtins): New function.
745
746 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
747 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
748 SCM_WVECT_NOSCAN_P): New macros.
749
750 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
751 and SCM_WVECT_WEAK_VALUE_P.
752
753 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
754 allocate_weak_vector and exported.
755
0a4c1355
MD
7562003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
757
758 * hashtab.c: Undid thread safety. (We decided that it's better to
759 let the user explicitly protect the tables (or not) according what
760 is suitable for the application.)
761
87ca11ff
MD
7622003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
763
764 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
765 thread safe and handle resizing tables.
766 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
767 SCM_DEFER/ALLOW_INTS.
768
f59a096e
MD
7692003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
770
771 * hashtab.c (scm_vector_to_hash_table,
772 scm_c_make_resizing_hash_table, scm_make_hash_table): New
773 functions.
774 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
775 safe and handle resizing tables.
776
777 * weaks.c (scm_make_weak_key_hash_table,
778 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
779 Size argument made optional. Return resizable table if not
780 specified.
781
4b612c5b
MD
7822003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
783
784 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
785 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
786
b3d7f6df
MD
7872003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
788
789 * debug.c (scm_procedure_source): Handle all objects for which
790 procedure? is #t. (Thanks to Bill Schottstaedt.)
791
756414cf
MD
7922003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
793
361d631f
MD
794 * futures.c (mark_futures): Don't need to mark data of recycled
795 futures.
796 (scan_futures, cleanup_undead): Be smarter about marking
797 futures---avoid unnecessary passes through future lists.
798
756414cf
MD
799 * futures.h, futures.c: New files; Introduced recycling of
800 futures. For fine-grained threading this lifts performance to
801 another level. We can now use parallelization in inner loops of
802 Guile programs without impossible overhead.
803
804 * threads.h, threads.c: Moved futures to their own file.
805
806 * Makefile.am (libguile_la_SOURCES): Added futures.c.
807 (DOT_X_FILES): Added futures.x.
808 (DOT_DOC_FILES): Added futures.doc.
809 (modinclude_HEADERS): Added futures.h.
810
811 * threads.c, threads.h (scm_i_create_thread): Renamed from
812 create_thread and made global.
813
814 * futures.c (scm_make_future): New procedure.
815
816 * eval.c: #include "libguile/futures.h".
817
818 * init.c: #include "futures.h"
819 (scm_init_guile_1): Call scm_init_futures.
820
821 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
822
823 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
824
825 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
826 functions.
827
828 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
829
b4debead
MD
8302003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
831
832 * threads.c (create_thread): Don't unwind dynwind chain of parent
833 thread before creation. Just start the new thread with an empty
834 dynwind chain.
835
93f26b7b
MD
8362003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
837
838 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
839
38d8927c
MD
8402003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
841
41c96c32
MD
842 * threads.c (scm_timed_wait_condition_variable): Support timed
843 waiting also for simple condition variables.
844
38d8927c
MD
845 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
846 of calling the procedure change-object-class.
847
9cf5d9b7
MD
8482003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
849
850 * ramap.c (scm_ramapc): Typo in error message.
851
bbf8d523
MD
8522003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
853
b46fae00
MD
854 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
855 slots with instance allocation.
856
bbf8d523
MD
857 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
858 class.
859 (scm_compute_applicable_methods): Use scm_generic_function_methods.
860
861 * goops.c (scm_generic_function_methods): Support extended
862 generic functions.
863
ebf9b47c
MD
8642002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
865
866 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 867 Thanks to Neil for pointing this out!
ebf9b47c 868
14a9ba3f
NJ
8692002-12-29 Neil Jerram <neil@ossau.uklinux.net>
870
871 * lang.h: Remove declarations matching definitions removed from
872 lang.c (just below).
873
c6a040a8
NJ
8742002-12-28 Neil Jerram <neil@ossau.uklinux.net>
875
6054d805
NJ
876 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
877 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
878 and already commented out.
879
c6a040a8
NJ
880 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
881 scm_lreadparen): Support reading vectors with Elisp syntax if
882 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
883 is not currently defined, and there isn't even a configure switch
884 to enable it yet.)
885
3742c12f
MV
8862002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
887
888 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
889 builds work.
890 (EXTRA_DIST): Added version.h.in.
891
fb50ef08
MD
8922002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
893
894 This change makes it possible for one thread to do lazy sweeping
895 while other threads are running. Now only the mark phase need to
896 have all threads asleep. We should look further into this issue.
897 Presently, I've put the locking of scm_i_sweep_mutex at
898 "conservative" places due to my current lack of knowledge about
899 the garbage collector. Please feel free to restrict these regions
900 further to allow for maximal parallelism!
901
902 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
903
904 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
905 scm_gc_register_collectable_memory): Substitute locking of
906 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
907 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
908 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
909 the single-thread section (which now only contains the mark
910 phase).
911 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
912 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
913
914 * threads.c (gc_section_mutex): Removed.
915
9ed24633
MD
9162002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
917
0d48aca5
MD
918 * threads.c (create_thread): Clear parent field in root state in
919 order not to unnecessarily remember dead threads.
920
9ed24633
MD
921 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
922 (scm_trampoline_1, scm_trampoline_2): Use them.
923
29717c89
MD
9242002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
925
926 Partial introduction of real plugin interface.
927
928 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
929 (EXTRA_DIST): Added threads-plugin.c.
930
931 * threads-plugin.h, threads-plugin.c: New files.
932
933 * threads.h: #include "libguile/threads-plugin.h".
934
935 * threads.c: #include "libguile/threads-plugin.c".
936
937 * pthread-threads.c: Temporarily remove debugging functions.
938
939 * threads.c, threads.h (scm_yield): Added back.
940
e29e0b09
MD
9412002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
942
943 * threads.c (really_launch): Detach before unlocking
944 thread_admin_mutex in order not to risk being joined.
945 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
946 thread_admin_mutex locked during GC.
947
948 * pthread-threads.c, pthread-threads.h: Improvements to debugging
949 functions.
950
0b6843b1 9512002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 952
6da2dfc4
MD
953 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
954 support for debugging mutex operations.
955
1b92fb6b
MD
956 * threads.c (scm_thread): Removed filed joining_threads.
957 (thread_print): Print thread number as well as address of thread
958 structure.
0b6843b1
MD
959 (scm_join_thread): Bugfix.
960 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
961 scm_timed_wait_condition_variable, scm_signal_condition_variable,
962 scm_broadcast_condition_variable): Use the low-level API.
963 (scm_all_threads): Return copy of thread list (to prevent
964 unintended destruction).
965 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 966
93cd4dcd
MD
967 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
968 pthread "native" recursive mutex support.
969
2ff4f181
MD
9702002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
971
28d52ebb
MD
972 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
973 Simply lock a thread C API recursive mutex.
974 (SCM_NONREC_CRITICAL_SECTION_START,
975 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
976 SCM_REC_CRITICAL_SECTION_END): Removed.
977
978 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
979 direct calls to scm_rec_mutex_lock / unlock around the three calls
980 to scm_m_expand_body.
981
982 * eval.c, eval.h (promise_free): New function.
983 (scm_force): Rewritten; Now thread-safe; Removed
984 SCM_DEFER/ALLOW_INTS.
985
986 * pthread-threads.h: Added partially implemented plugin interface
987 for recursive mutexes. These are, for now, only intended to be
988 used internally within the Guile implementation.
989
990 * pthread-threads.c: New file.
991
992 * threads.c: Conditionally #include "pthread-threads.c".
993
994 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
995 thread-safe;
996
997 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
998 SCM_GLOBAL_REC_MUTEX): New macros.
999
1000 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
1001 macros---use mutexes instead.
1002
1003 * tags.h (SCM_IM_FUTURE): New tag.
1004
1005 * eval.c (scm_m_future): New primitive macro.
1006 (SCM_CEVAL): Support futures.
1007 (unmemocopy): Support unmemoization of futures.
1008
1009 * print.c (scm_isymnames): Name of future isym.
1010
2ff4f181
MD
1011 * version.c: Unmade some changes to my private copy that got
1012 committed by mistake.
1013
392d2833
MD
10142002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1015
e200ddee
MD
1016 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
1017 2002-12-10.
1018
392d2833
MD
1019 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
1020
1021 * gc.c (scm_gc_sweep): Call it here instead, which is a more
1022 logical place.
1023
1024 * threads.c (create_thread): Remember root object until the handle
1025 of the new thread is on all_threads list.
1026
1027 * root.c (scm_make_root): Moved copying of fluids until after
1028 creation of root handle so that the fluids are GC protected. Also
1029 removed the critical section.
1030
c4c52ebe
MD
10312002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1032
960c408c
MD
1033 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
1034
3cdde9d6 1035 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 1036 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
1037 (scm_realloc): Serialize call to realloc
1038 (scm_calloc): Same for calloc.
1039 Thanks to Wolfgang Jaehrling!
1040 (Now we have to make sure all calls to malloc/realloc are made
1041 through scm_malloc.)
1042
960c408c
MD
1043 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
1044
c4c52ebe
MD
1045 * threads.c (really_launch): Release heap (to prevent deadlock).
1046 (create_thread): Release heap before locking thread admin mutex.
1047
b0dc3d71
MD
10482002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1049
1050 * threads.c (scm_i_thread_invalidate_freelists): New
1051 function.
1052
1053 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
1054
1055 * modules.c (scm_export): Inserted a return statement.
1056
06e80f59
HWN
10572002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1058
1059 * modules.c (scm_export): new function
1060
1061 * gc-card.c: add a note about malloc()/free() overhead.
1062
a12611c3
MD
10632002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1064
1065 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
1066 in srcdir.
1067
c7fabadf
MD
10682002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1069
1070 These changes remove scm_ints_disabled (which hasn't has any
1071 effect in Guile for quite some time).
1072
1073 * async.c, error.h (scm_ints_disabled): Removed.
1074
1075 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
1076 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
1077 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
1078 (old_ints): Removed.
1079
1080 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
1081 critical section.
1082 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
1083 SCM_ALLOW_INTS.
1084
9bc4701c
MD
10852002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1086
52340b65
MD
1087 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
1088 Removed accidental #if 0 around these functions.
1089
9bc4701c
MD
1090 These changes are the start of support for preemptive
1091 multithreading. Marius and I have agreed that I commit this code
1092 into the repository although it isn't thoroughly tested and surely
1093 introduces many bugs. The bugs should only be exposed when using
1094 threads, though. Signalling and error handling for threads is
1095 very likely broken. Work on making the implementation cleaner and
1096 more efficient is needed.
1097
1098 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
1099 (SCM_NONREC_CRITICAL_SECTION_START,
1100 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
1101 SCM_REC_CRITICAL_SECTION_END): New macros.
1102 (SCM_CRITICAL_SECTION_START/END): Defined here.
1103
1104 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
1105 the three calls to scm_m_expand_body.
1106
1107 * gc.h: #include "libguile/pthread-threads.h";
1108 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
1109
1110 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
1111 scm_t_key;
1112
1113 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
1114 access.
1115
1116 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
1117
1118 * gc-freelist.c, threads.c (really_launch): Use
1119 SCM_FREELIST_CREATE.
1120
1121 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
1122
1123 * gc.c (scm_i_expensive_validation_check, scm_gc,
1124 scm_gc_for_newcell): Put threads to sleep before doing GC-related
1125 heap administration so that those pieces of code are executed
1126 single-threaded. We might consider rewriting these code sections
1127 in terms of a "call_gc_code_singly_threaded" construct instead of
1128 calling the pair of scm_i_thread_put_to_sleep () and
1129 scm_i_thread_wake_up (). Also, we would want to have as many of
1130 these sections eleminated.
1131
1132 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
1133
1134 * inline.h: #include "libguile/threads.h"
1135
1136 * pthread-threads.h: Macros now conform more closely to the
1137 pthreads interface. Some of them now take a second argument.
1138
1139 * threads.c, threads.h: Many changes.
1140
11412002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1142
1143 * Makefile.am (version.h): Changed $^ --> $< in rule for
1144 version.h.
1145
b2cbe8d8
RB
11462002-12-08 Rob Browning <rlb@defaultvalue.org>
1147
1148 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
1149 (SCM_MINOR_VERSION): use @--@ substitution now.
1150 (SCM_MICRO_VERSION): use @--@ substitution now.
1151 (scm_effective_version): new function prototype.
1152
1153 * version.c (scm_effective_version): new function, also add
1154 effective-version.
1155
1156 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
1157 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
1158 SCM_LIBRARY_DIR.
1159 (version.h): generate this here rather than configure.in. This
1160 approach tracks source edits better (i.e. more immediately).
1161 Might be worth considering for other .in files too.
1162
5441c65c
MV
11632002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
1164
1165 Reorganized thread package selection. A thread package now only
1166 implements a small set of pthread like functions and Guile
1167 implements the rest on top of that. Guile's implementation is
1168 what the "coop-pthreads" package has been previously. Support for
1169 "coop" threads has been removed until I get time to add it again.
1170
1171 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
1172 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
1173 null-threads.c, coop-pthreads.c.
1174 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
1175 pthread-threads.h.
1176
1177 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
1178
1179 * threads.h: Do not include "libguile/coop-defs.h". Include
1180 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
1181 (previously deprecated) C level thread API prototypes. They are
1182 now in the thread package specific headers, "null-threads.h" and
1183 "pthread-threads.h".
1184 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
1185 New.
1186 (scm_threads_init): Removed.
1187 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
1188 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
1189 SCM_I_THREAD_SWITCH_COUNT): Define here.
1190 (scm_single_thread_p): Removed.
1191 (scm_call_with_new_thread): Take two args directly instead of list
1192 of two args.
1193 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
1194 SCM_SET_THREAD_LOCAL_DATA): Define here.
1195
1196 * threads.c: Merged with "coop-pthreads.c".
1197
1198 * null-threads.h: Implement pthread-like API as a set of macros.
1199
1200 * pthread-threads.h: New, implement pthread-like API by deferring
1201 to pthread itself.
1202
1203 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
1204 has been lost in the reorganization.
1205
504d99c5
MD
12062002-12-01 Mikael Djurfeldt <mdj@linnaeus>
1207
1208 The following change makes it possible to move procedure
1209 application dispatch outside inner loops. The motivation was
1210 clean implementation of efficient replacements of R5RS primitives
1211 in SRFI-1.
1212
1213 The semantics is clear: scm_trampoline_N returns an optimized
1214 version of scm_call_N (or NULL if the procedure isn't applicable
1215 on N args).
1216
1217 Applying the optimization to map and for-each increases efficiency
1218 noticeably. For example, (map abs ls) is 8 times faster than
1219 before.
1220
1221 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
1222
1223 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
1224
1225 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
1226 (map, for-each): Handle also application on two args as a special
1227 case; Use trampolines.
1228
1229 Other changes:
1230
1231 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
1232 (subr2oless): Removed.
1233 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
1234 vector GC protected.
1235
1236 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
1237 scm_out_of_range.
1238
63dd3413
DH
12392002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
1240
1241 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
1242
4ba5f279
MD
12432002-11-17 Mikael Djurfeldt <mdj@linnaeus>
1244
1245 * debug.c (scm_make_iloc): Added missing "return".
1246
56ae231f
MV
12472002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
1248
1249 * strports.c (scm_eval_string_in_module): Validate second arg to
1250 be a module. Thanks to Arno Peters!
1251
80b28865
DH
12522002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1253
1254 * .cvsignore: remove goops.c
1255
c88b1456
DH
12562002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1257
1258 * modules.c (scm_env_top_level, scm_lookup_closure_module,
1259 module_variable, scm_module_lookup_closure,
1260 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
1261 scm_system_module_env_p): Don't compare SCM values with C
1262 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
1263 over SCM_NFALSEP.
1264
a8a19efc
DH
12652002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1266
1267 * eval.h (SCM_MAKE_ILOC): New macro.
1268
1269 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
1270 the iloc bitpattern here.
1271
76734914
MD
12722002-11-14 Mikael Djurfeldt <mdj@linnaeus>
1273
1274 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
1275 part of the API, otherwise it's difficult to write Guile
1276 extensions using non-blocking I/O => moved #include
1277 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
1278
1279 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
1280 s_unlock_mutex.
1281
8b5b4a75
MV
12822002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
1283
1284 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
1285 are defined in configure.in.
1286
1287 * threads.c: Removed SCM_API from function definitions. SCM_API
1288 is only for declarations.
1289
e5a83084
MD
12902002-11-07 Mikael Djurfeldt <mdj@linnaeus>
1291
9be8bb45
MD
1292 * coop-pthreads.h: Added support for thread specific data to the
1293 generic C API for the coop-pthreads case.
1294
e5a83084
MD
1295 * threads.c, threads.h (scm_cond_init): Undo unintentional API
1296 change.
6c214b62 1297 (scm_cond_broadcast): Added missing function.
e5a83084 1298
7edf178e
MV
12992002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1300
1301 * coop.c (coop_next_runnable_thread): Removed, wich should have
1302 happened when GUILE_ISELECT was hard-wired.
1303
7f5b1b77
MV
13042002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
1305
7caa1b07
MV
1306 * Makefile.am (libguile_la_SOURCES): Added threads.c
1307 (DOT_DOC_FILES): Added threads.doc.
1308 (DOT_X_FILES): Added threads.x.
1309 (EXTRA_libguile_la_SOURCES): Removed threads.c.
1310 (noinst_HEADERS): Added coop-pthreads.c.
1311 (modinclude_HEADERS): Added coop-pthreads.h.
1312
1313 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
1314 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
1315
bb11cbf4
MV
1316 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
1317 Thanks to Bill Schottstaedt!
1318
1d4cbbed
MV
1319 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
1320
7f5b1b77
MV
1321 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
1322 SCM_COPT_THREADS is defined.
1323 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
1324 is defined.
1325
1326 * coop-pthreads.c: Some harmless renamings of internal stuff.
1327 (create_thread): New, generalized version of
1328 scm_call_with_new_thread.
1329 (scm_call_with_new_thread): Use it.
1330 (scm_spawn_thread): New, use create_thread.
1331
d52f53b1
MV
13322002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
1333
1334 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
1335 start testing it now.
1336
1337 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
1338 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
1339 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
1340 is defined.
1341
30f920c3
MV
13422002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
1343
1344 * scmsigs.c (signal_cell_handlers, install_handler_data,
1345 scm_delq_spine_x, really_install_handler, install_handler): New
1346 scheme for triggering signal handlers, to simplify take_signal.
1347 (take_signal): Simplified, to avoid race conditions.
1348 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
1349 hasn't exited yet.
1350
1351 * async.c (scm_async_click): Reset pending_asyncs, handle
1352 signal_asyncs. Don't set cdr of a non-signal async to #f.
1353 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
1354 always. Set pending_asyncs.
1355 (scm_system_async_mark_for_thread): Check that thread has not
1356 exited.
1357 (scm_unmask_signals, decrease_block): Call scm_async_click after
1358 block_asyncs becomes zero.
1359
1360 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
1361 active_asyncs.
1362
1363 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
1364 fields.
1365 * root.c (root_mark): Mark them.
1366 (make_root): Initialize them.
1367
1368 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
1369 USE_COOP_THREADS.
1370 (scm_internal_select): Define one version for USE_COOP_THREADS and
1371 one for USE_NULL_THREADS.
1372 (scm_init_iselect): Likewise.
1373
1374 * inline.h (scm_cell, scm_double_cell): Also allow
1375 USE_COPT_THREADS to not protect the slot initializers.
1376
1377 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
1378 because threads need to be initialized before the stack, but
1379 gsubrs such as scm_timed_condition_variable_wait can only be
1380 created later.
1381
1382 * threads.h: Include "coop-pthreads.h" when requested.
1383 (scm_threads_make_mutex, scm_threads_lock_mutex,
1384 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
1385 not implemented anyway.
1386 (scm_init_thread_procs, scm_try_mutex,
1387 scm_timed_condition_variable_wait,
1388 scm_broadcast_condition_variable, scm_c_thread_exited_p,
1389 scm_thread_exited_p): New prototypes.
1390 (struct timespec): Define if not already defined.
1391 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1392 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
1393 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1394 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
1395 deprecated.
1396
1397 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
1398 requested.
1399 (scm_thread_exited_p): New.
1400 (scm_try_mutex, scm_broadcast_condition_variable): Newly
1401 registered procedures.
1402 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
1403 Use the latter as the procedure for "wait-condition-variable",
1404 thus offering a optional timeout parameter to Scheme.
1405 (scm_wait_condition_variable): Implement in terms of
1406 scm_timed_wait_condition_variable.
1407 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1408 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
1409 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1410 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
1411 scm_make_mutex, etc, and deprecate.
1412 (scm_init_threads): Do not create smobs, leave this to
1413 scm_threads_init. Do not include "threads.x" file.
1414 (scm_init_thread_procs): New, include "threads.x" here.
1415
1416 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
1417 scm_null_mutex_lock, scm_null_mutex_unlock,
1418 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
1419 scm_null_condvar_wait, scm_null_condvar_signal,
1420 scm_null_condvar_destroy): Removed.
1421 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
1422 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
1423 scm_cond_destory): Do not define, they are now deprecated and
1424 handled by threads.{h,c}.
1425
1426 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
1427 (scm_threads_init): Create smobs here, using the appropriate
1428 sizes.
1429 (block): Removed, now unused.
1430 (scm_c_thread_exited_p): New.
1431 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
1432 scm_null_mutex_destroy, scm_null_condvar_init,
1433 scm_null_condvar_wait, scm_null_condvar_signal,
1434 scm_null_condvar_destroy): Removed and updated users to do their
1435 task directly.
1436 (scm_try_mutex, timeval_subtract,
1437 scm_timed_wait_condition_variable,
1438 scm_broadcast_condition_variable): New.
1439 (scm_wait_condition_variable): Removed.
1440
1441 * coop-defs.h (coop_m): Added 'level' field.
1442 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1443 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
1444 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1445 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
1446 define.
1447 (coop_condition_variable_broadcast): New.
1448
1449 * coop-threads.c (scm_threads_init): Create smobs here, using the
1450 appropriate sizes.
1451 (scm_c_thread_exited_p, scm_try_mutex,
1452 scm_timed_wait_condition_variable,
1453 scm_broadcast_condition_variable): New.
1454 (scm_wait_condition_variable): Removed.
1455
1456 * coop.c (coop_new_mutex_init): Initialize level.
1457 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
1458 level.
1459 (coop_condition_variable_signal): Renamed to
1460 coop_condition_variable_broadcast and reimplemented in terms of
1461 that. Thus...
1462 (coop_condition_variable_broadcast): New.
1463
1464 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
1465
1466 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
1467
087ed40d
MV
14682002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
1469
65a23095
MV
1470 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
1471 of system headers.
1472
087ed40d
MV
1473 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
1474 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 1475 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 1476
5ec1d2c8
DH
14772002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1478
1479 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
1480 scm_definedp to scm_defined_p and deprecated scm_definedp.
1481
100ae50d
DH
14822002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1483
1484 * async.h, async.c (scm_system_async): Fixed deprecation to work
1485 correctly when deprecated features are excluded.
1486
2794cb50
MV
14872002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1488
1489 * async.c (scm_system_async_mark_for_thread): Validate thread
1490 argument.
1491
1492 * coop-threads.c (scm_i_thread_root): Do not validate argument.
1493
1494 * feature.c (scm_init_feature): Don't add 'threads' for
1495 USE_NULL_THREADS.
1496
1497 * inline.h (scm_cell, scm_double_cell): Also allow
1498 USE_NULL_THREADS to not protect the slot initializers.
1499
1500 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
1501 "USE_THREAD".
1502
1503 * Makefile.am (noinst_HEADERS): Added null-threads.c.
1504 (modinclude_HEADERS): Added null-threads.h.
1505
1506 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
1507 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
1508 (scm_init_threads): Use generic type names scm_t_mutex and
1509 scm_t_cond instead of coop_m and coop_c.
1510
1511 * null-threads.c, null-threads.h: New files.
1512
ff810d7a
MV
15132002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
1514
1515 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
1516 This is to support makes that know about "$<" only in pattern
1517 rules, like Sun's make.
1518
a90bdb73
MV
15192002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
1520
1521 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
1522 substitution. Thanks to David Allouche!
1523
e71a8bf2
DH
15242002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1525
1526 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
1527 !SCM_ENABLE_DEPRECATED.
1528
41f77ff5
MV
15292002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1530
504d99c5 1531 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
1532 scm_i_thread_root when USE_THREADS is defined. Use scm_root
1533 otherwise.
1534
1535 * scmsigs.c (take_signal): Only call scm_i_thread_root when
1536 USE_THREADS is defined. Use scm_root otherwise.
1537 (scm_sigaction_for_thread): Ignore THREAD argument when
1538 USE_THREADS is not defined. Also, move THREAD argument defaulting
1539 out of HAVE_SIGACTION section, which was a bug.
1540
6d16b125
MV
15412002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1542
1543 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
1544 signal_handlers, not the closure that is used as the async.
1545 The closure is stored in signal_handler_cells, as previously.
1546
acfa1f52
MV
15472002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
1548
1549 * root.h (scm_root_state): Added 'block_async' slot.
1550 (scm_active_asyncs): Removed abbrev.
1551 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
1552
1553 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
1554 abbrev.
1555
1556 * async.h (scm_call_with_blocked_asyncs,
1557 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
1558 scm_c_call_with_unblocked_asyncs): New prototypes.
1559 (scm_mask_signals, scm_unmask_signals): Deprecated.
1560 (scm_mask_ints): Turned into a macro.
1561 * async.c (scm_mask_ints): Removed.
1562 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
1563 this should not be necessary.
1564 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
1565 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
1566 deprecation warning and check for errornous use. Set block_asyncs
1567 instead of scm_mask_ints.
1568 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
1569 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
1570 scm_c_call_with_unblocked_asyncs): New.
1571
1572 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
1573 Asyncs are enabled by default.
1574
34010f56
NJ
15752002-10-09 Neil Jerram <neil@ossau.uklinux.net>
1576
1577 * vports.c (scm_make_soft_port): Allow vector argument to carry a
1578 6th element: an input waiting thunk.
1579 (sf_input_waiting): New.
1580
9310d6f2
MV
15812002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
1582
1583 * root.c (root_mark): Mark active_asyncs slot.
1584
1585 * async.c (scm_async_click): Set the cdr of a executed handler
1586 cell to SCM_BOOL_F, not SCM_EOL.
1587 (scm_i_queue_async_cell): Queue the cell at the end of the list,
1588 and only if the handler procedure is not already present.
1589 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
1590 with SCM_BOOL_F.
1591 * scmsigs.c (scm_sigaction_for_thread): Likewise.
1592
ac48c719
RB
15932002-10-04 Rob Browning <rlb@defaultvalue.org>
1594
1360a142
RB
1595 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
1596
1597 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
1598 scm_lt_dlopenext, and scm_lt_dlerror.
1599 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
1600 and scm_lt_dlerror.
1601 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
1602 and scm_lt_dlerror.
1603 (sysdep_dynl_init): switch to scm_lt_dlinit();
1604
1605 * Makefile.am (libguile_la_LIBADD): switch to use
1606 libguile-ltdl.la.
1607
504d99c5 1608 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 1609
497092c9
MV
16102002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
1611
1612 * scmsigs.h (scm_sigaction_for_thread): New prototype.
1613 * scmsigs.c (got_signal): Removed.
1614 (signal_handler_cells, signal_handler_threads): New.
1615 (take_signal): Queue the cell of the signal for the specified
1616 thread. Reset the signal handler on systems that don't have
1617 sigaction.
1618 (sys_deliver_signals): Removed.
1619 (close_1): New.
1620 (scm_sigaction_for_thread): Renamed from scm_sigaction and
1621 extended to also set the thread of a signal and allocate a cell
1622 for it. Keep the Scheme name "sigaction". Check that signum is
1623 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
1624 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
1625 (scm_init_scmsigs): Allocate signal_handler_cells and
1626 signal_handler_threads vectors.
1627
1628 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
1629 that system asnycs and user asyncs are separated. Reimplemented
1630 system asyncs to work per-thread.
1631
1632 * gc.c (scm_init_gc): Do not use scm_system_async.
1633
1634 * async.h (scm_asyncs_pending, scm_set_tick_rate,
1635 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
1636 Removed prototypes.
1637 (scm_i_queue_async_cell): New.
1638
1639 * __scm.h (scm_asyncs_pending_p): Removed.
1640 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
1641 scm_asyncs_pending_p.
1642
1643 * async.h (scm_system_async_mark_for_thread): New prototype.
1644
1645 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
1646
1647 * root.h (scm_root_state): Added new "active_asyncs" slot.
1648 * root.c (scm_make_root): Initialize it to SCM_EOL.
1649
1650 * coop-defs.h (coop_t): Added new "handle" slot.
1651 * coop-threads.c (all_threads, scm_current_thread,
1652 scm_all_threads, scm_i_thread_root): New.
1653 (scm_threads_init): Add main thread to all_threads.
1654 (scheme_launch_thread): Remove thread from all_threads when it
1655 terminates.
1656 (scm_call_with_new_thread): Initialize handle slot of coop_t
1657 structure and add new thread to all_threads.
1658 (scm_spawn_thread): Likewise.
1659
1660 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
1661 * threads.c (scm_current_thread, scm_all_threads): Register as
1662 primitives.
1663
1664 * dynl.c: Use scm_lt_ prefix for libltdl functions.
1665
480fa28d
NJ
16662002-09-29 Neil Jerram <neil@ossau.uklinux.net>
1667
1668 * script.c (scm_compile_shell_switches): Fix bad spelling of
1669 `explicitly' in comment.
1670
16712002-09-28 Neil Jerram <neil@ossau.uklinux.net>
1672
1673 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
1674 Refer to provided? in doc string rather than deprecated feature?.
1675
3553e1d1
GH
16762002-09-24 Gary Houston <ghouston@arglist.com>
1677
1678 * inline.h (scm_double_cell): prevent reordering of statements
1679 with any following code (for GCC 3 strict-aliasing).
1680 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
1681 the earlier version of the reordering prevention.
1682
4ad0814a
HWN
16832002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1684
1685 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
1686
e88e4f2e
HWN
16872002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1688
1689 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
1690 protection.
1691
1e71eafb
HWN
16922002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1693
1694 * inline.h: include stdio.h
1695
1696 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
1697
61ef9c1f
HWN
16982002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1699
dac04e9f
HWN
1700 * gc-segment.c (scm_i_make_initial_segment): check user settings
1701 for sanity.
1702
1703 * gc-malloc.c (scm_gc_init_malloc): check user settings for
1704 sanity.
dac04e9f
HWN
1705
1706 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
1707
ffd72400
HWN
1708 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
1709
1710 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
1711 these won't ever wrap around with high memory usage. Thanks to
1712 Sven Hartrumpf for finding this.
ffd72400 1713
5bd4a949
HWN
1714 * gc-freelist.c: include <stdio.h>
1715
61ef9c1f
HWN
1716 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
1717
ffd0ef3b
MV
17182002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
1719
a27e3d14
MV
1720 * vectors.h (SCM_VECTOR_REF): New.
1721
ffd0ef3b
MV
1722 * snarf.h (SCM_DEFINE_PUBLIC): New.
1723
f8a1712b
MV
17242002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
1725
1726 * socket.c (scm_addr_vector): Added size of address to arguments.
1727 Use it to avoid accessing a non-existent path in a sockaddr_un.
1728 Changed all callers.
1729
7200a36b
HWN
17302002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1731
1383773b
HWN
1732 * gc.h: remove DOUBLECELL card flags.
1733
1734 * gc-malloc.c (scm_calloc): try to use calloc() before calling
1735 scm_realloc().
1736
1737 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
1738 init loop; handle this from scm_init_card_freelist()
1739
1740 * gc-card.c (scm_init_card_freelist): init bit vector here.
1741
7200a36b 1742 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 1743 num2float.i.c (FLOAT2NUM): idem
7200a36b 1744
9981de3a
HWN
17452002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1746
1747 * eval.h: prepend libguile/ to include path
1748
19647556
MV
17492002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
1750
1751 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
1752