*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
c47e2599
KR
12003-05-30 Kevin Ryde <user42@zip.com.au>
2
3 * numbers.c (z_negative_one): New variable.
4 (scm_init_numbers): Initialize it.
5 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
6
2e945bcc
SJ
72003-05-29 Stefan Jahn <stefan@lkcc.org>
8
9 * win32-dirent.c: Use malloc() instead of scm_malloc().
10
11 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
12 warning.
13
14 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
15 mingw32 build.
16
17 * modules.c (s_scm_module_import_interface): Renamed local
18 variable interface to _interface. Seems like 'interface'
19 is a special compiler directive for the mingw32 compiler.
20
21 * mkstemp.c: Provide prototype to avoid compiler warning.
22
23 * load.c (s_scm_search_path): Fixed absolute and relative
24 path detections for native Windows platforms.
25
26 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
27 to build on mingw32).
28
29 * gc-freelist.c ("s_scm_map_free_list",
30 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
31
32 * fports.c (fport_fill_input): Disable use of
33 fport_wait_for_input() on Win32 platforms.
34
35 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
36
37 * Makefile.am: Modified some rules for cross compiling.
38
ddd8f927
DH
392003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
40
41 * eval.c (SCM_CEVAL): In case of an application, all checks for a
42 proper function object and the correct number of arguments are now
43 performed in the application part of SCM_CEVAL.
44
45 (scm_badformalsp): Removed.
46
f8ba2197
DH
472003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
48
49 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
50
79f55b7c
MD
512003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
52
a502595f
MD
53 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
54 always being false by inserting preprocessor conditional. (Thanks
55 to Bruce Korb.)
56
79f55b7c
MD
57 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
58 (void *) in order to avoid an aliasing warning; thanks to Bruce
59 Korb.)
60
61 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
62
63 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
64 SCM_STACK_PTR.
65
66 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
67 thread->base --> t->base.
68
69 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
70
47dee228
MV
712003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
72
73 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
74 scm_variable_set_name_hint, scm_builtin_variable,
75 scm_internal_with_fluids, scm_make_gsubr,
76 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
77 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
78 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
79 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
80 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
81 scm_make_subr_with_generic, scm_make_subr_opt,
82 scm_call_catching_errors, scm_make_smob_type_mfpe,
83 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
84 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
85 branch. Some have been slightly rewritten.
86 (scm_i_object_chars, scm_i_object_length): New, to support
87 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
88
e681d187
DH
892003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
90
91 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
92 names and inits in the memoized code of do.
93
7e59d9d4
MD
942003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
95
96 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
97 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
98 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
99 a compilation error if error-on-warning is enabled).
100
9950a42c
MV
1012003-05-17 Marius Vollmer <mvo@zagadka.de>
102
103 * c-tokenize.lex: Gobble up complete lines after a '#'. This
104 removes preprocessor directives from the snarfage that might
105 otherwise confuse us. These directives appear when compiling with
106 "-g3", for example.
107
0068984b
HWN
1082003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
109
26e68795
HWN
110 * ChangeLog: add my surname
111
0068984b
HWN
112 * srcprop.c (scm_finish_srcprop): use
113 scm_gc_register_collectable_memory()
114 (scm_make_srcprops): idem.
115
131805f0
HWN
1162003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
117
118 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
119 wrap-around for scm_mtrigger
120 (scm_gc_register_collectable_memory): abort on overflowing
121 scm_mallocated().
122
d4611024
KR
1232003-05-13 Kevin Ryde <user42@zip.com.au>
124
125 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
126 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
127
7aaf8dc9
MD
1282003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
129
dfd03fb9
MD
130 * backtrace.c (scm_display_error_message): Introduced fancy
131 printing with max level 7 and length 10. (Purpose: avoid printing
132 gigantic objects in error messages.)
133
134 * print.c, print.h (scm_i_port_with_print_state): New function.
135
136 * print.c (scm_iprin1, scm_printer_apply,
137 scm_port_with_print_state): Use scm_i_port_with_print_state.
138 (scm_simple_format): Modified not to destroy print states.
139 (print_state_mutex): New mutex.
140 (scm_make_print_state, scm_free_print_state, scm_prin1):
141 Lock/unlock print_state_mutex.
142
7aaf8dc9
MD
143 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
144 Use current names in definitions.
145
a4d9ffa1
KR
1462003-05-10 Kevin Ryde <user42@zip.com.au>
147
148 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
149
d25e96a4
KR
150 * numbers.c (scm_integer_length): On negative bignums, adjust
151 mpz_sizeinbase to account for it looking at absolute value where we
152 want ones-complement.
153
154 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
155 since we're only using the ulong return value, and x might not fit.
156
5bf6a6f0
DH
1572003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
158
159 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
160 read. This will allow to make the definition in read.c static.
161
f58c472a
DH
1622003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
163
164 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
165 from evalext to eval. This will allow to make some of the
166 definitions in eval.c static.
167
90382aeb
KR
1682003-05-06 Kevin Ryde <user42@zip.com.au>
169
170 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
171 (scm_logcount): Use mpz_com, not mpz_neg.
172
3b88ed2a
DH
1732003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
174
175 The purpose of this patch is to make guile's internal memoizers
176 distinguishable from memoizing macros created on the scheme level
177 or from user provided primitive memoizing macros. The reason is,
178 that the internal memoizers are the only ones that are allowed to
179 transform their scheme input into memoizer byte code, while all
180 other memoizing macros may only transform scheme code into new
181 scheme code.
182
183 To achieve this, a new macro type 'builtin-macro!' is introduced.
184 Currently, 'builtin-macro!'s are handled as memoizing macros, but
185 this will change when the memoizer and executor are separated.
186
187 * macros.[ch] (scm_i_makbimacro): New.
188
189 * macros.h (SCM_BUILTIN_MACRO_P): New.
190
191 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
192
193 * eval.c, goops.c: All of guile's primitive memoizing macros are
194 primitive builtin-macros now.
195
196 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
197 builtin-macros are handled equally to memoizing macros.
198
b0780eb1
MV
1992003-05-04 Marius Vollmer <mvo@zagadka.de>
200
201 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
202 work around a bug in GCC 2.95.2 but is now a bug in itself.
203
1cbf4fe9
MV
2042003-05-02 Marius Vollmer <mvo@zagadka.de>
205
206 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
207 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
208 scm_tcs_symbols): New.
209
1a61d41b
MV
2102003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
211
096ecbaf
MV
212 * deprecated.h, deprecated.c (scm_protect_object,
213 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
214 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
215 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
216 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
217 scm_ensure_user_module, scm_load_scheme_module, scm_port,
218 scm_ptob_descriptor, scm_port_rw_active,
219 scm_close_all_ports_except): New.
220
1a61d41b
MV
221 * ports.c (scm_c_port_for_each): New function, mostly copied from
222 scm_port_for_each.
223 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
224 * ports.h (scm_c_port_for_each): New prototype.
225
c8e1d354
MD
2262003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
227
228 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
229 macro was introduced in anticipation of GOOPS method compilation
230 code.)
231
232 * goops.c: Removed binding of @dispatch.
233
a4aa2134
DH
2342003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
235
236 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
237 instructions that bind the macros on the scheme level back to
238 goops.c in order to make sure again that the bindings go into the
239 (oop goops) module and are not visible from the outside.
240
9fbee57e
DH
2412003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
242
243 * eval.c: Non functional change: Separated R5RS and non-R5RS
244 macros into different sections of the file and ordered the
245 memoizers alphabetically.
246
12841895
DH
2472003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
248
249 * eval.c (scm_ilookup): Rewritten to improve readability.
250
6a3f13f0
DH
2512003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
252
253 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
254 Partially reverted patch from 2003-04-23 in oder to find a better
255 compromise between readability and debuggability.
256
b0c5d67b
DH
2572003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
258
259 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
260 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
261 definitions of the special goops memoizers from goops.[ch] to
262 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
263 throughout guile.
264
b9ad392e
MD
2652003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
266
267 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
268
269 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
270
271 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
272
273 * ioext.c (scm_fdes_to_ports): Ditto.
274
275 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
276 lock/unlock scm_i_port_table_mutex.
277
278 * strports.c (scm_mkstrport): Ditto.
279
280 * ports.c (scm_void_port, scm_port_for_each): Ditto.
281
282 * fports.c (scm_fdes_to_port): Ditto.
283
d0b07b5d
DH
2842003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
285
286 This set of patches contains no functional changes, only debatable
287 minor stylistic ones. Still, in order to prepare a patch between
288 my local copy and the CVS version, I decided to submit the changes
289 below. Then, the patch will hopefully only contain relevant
290 modifications :-)
291
292 * eval.c (iqq): Added const specifier.
293
294 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
295 Use NULL instead of 0 to indicate that a pointer is returned.
296 Removed some misleading 'fall through' comments.
297
298 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
299 Split up long expressions into smaller ones to be more debugging
300 friendly.
301
a98e8e98
DH
3022003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
303
304 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
305 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
306 rather than casting to SCM.
307
c178c3a6
DH
3082003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
309
310 * sort.c, pairs.h: Removed unnecessary includes.
311
d339981a
DH
3122003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
313
314 * sort.c: Replaced hand-made trampline code by the new official
315 mechanism from eval.c. This fixes a segfault in the new test file
316 sort.test.
317
318 (quicksort, compare_function, scm_restricted_vector_sort_x,
319 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
320 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
321 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
322 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
323 eval.c.
324
325 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
326 cmp_fun_t): Removed.
327
328 (compare_function): Added.
329
330 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
331 arithmetics with index arithmetics. Changed quicksort to work on
332 an array of SCM values instead of an array of characters. Avoid
333 bytewise copying of SCM elements. Avoid allocating memory on the
334 stack with alloca. Fixed some comments.
335
821f18a4
DH
3362003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
337
338 * eval.c (EXTEND_ENV): Eliminated.
339
340 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
341 EXTEND_ENV.
342
94fb5a6e
DH
3432003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
344
345 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
346
347 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
348 compiling with SCM_DEBUG==1 by moving definition behind prototype.
349
350 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
351 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
352 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
353 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
354 functions such that they check if the object is a non-immediate.
355 Further, renamed identifiers to use the scm_dbg_ prefix and made
356 their inclusion into the lib dependent of the
357 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
358
fce0b22d
DH
3592003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
360
361 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
362 debug option.
363
1685446c
DH
3642003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
365
821f18a4 366 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
367 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
368 any calls to SCM_NCONSP any more.
369
370 * unif.c (l2ra): Eliminate redundant check.
371
9ff1720f
DH
3722003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
373
374 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
375 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
376 SCM_NNULLP. Now, guile itself does not include any calls to
377 SCM_NNULLP any more.
378
05b15362
DH
3792003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
380
381 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
382 scm_copy_tree): Place assignment expressions which are part of
383 other expressions into an expression of their own.
384
0c88d7df
DH
3852003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
386
387 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
388 compare SCM values with !=.
389
5cb22e96
DH
3902003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
391
392 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
393 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
394 and definition of the memoizer for the generalized set! macro from
395 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
396 define the macro object.
397
398 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
399 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
400 eval.c, it is made static and renamed to s_set_x.
401
402 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
403 over SCM_N<foo>.
404
a44a9715
DH
4052003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
406
407 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
408 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
409 to undefineds and registered the object as a permanent object.
410
411 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
412 static in eval.c, renamed it to f_apply and registered the object
413 as a permanent object.
414
1b43d24c
DH
4152003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
416
5cb22e96 417 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
418 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
419
aec16f99
DH
4202003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
421
422 * numbers.c (scm_logtest): Fixed argument bug in the call to
423 mpz_and, which showed up when compiling with SCM_DEBUG defined.
424
f96460ce
DH
4252003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
426
427 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
428 type errors that showed up when compiling with SCM_DEBUG defined.
429
d0f6ceb8
DH
4302003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
431
432 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
433 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
434 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
435 fix compile errors with --disable-deprecated.
436
19a7a089
RB
4372003-04-17 Rob Browning <rlb@defaultvalue.org>
438
439 * numbers.c (scm_integer_expt): fix case where we were declaring
440 vars in the middle of a statement block. Thanks to Thamer
441 Al-Harbash.
442
47cd67db
MD
4432003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
444
0fd7dcd3
MD
445 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
446 change.
447
47cd67db
MD
448 * eq.c (scm_eqv_p): Turned into a primitive generic.
449
3b8b889c
RB
4502003-04-16 Rob Browning <rlb@defaultvalue.org>
451
312006bb
RB
452 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
453 Thanks to Boyd Gerber.
454 Added check for __arm__ in addition to arm for LINUX and copied
455 __s390__ defines from upstream libgc. Thanks to James Treacy for
456 reporting the problems.
c7ef2ea1 457
3b8b889c
RB
458 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
459
460 * socket.c: use SCM_CHAR_BIT.
461
462 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
463
464 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
465
43261b39
MD
4662003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
467
468 * feature.c (scm_init_feature): Always add threads feature.
469
58241edc
MD
4702003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
471
472 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
473 scm_at_assert_bound_ref. (We don't want the unbound check. See
474 oop/goops/active-slot.scm.)
475
94e91275
RB
4762003-04-14 Rob Browning <rlb@defaultvalue.org>
477
478 * tags.h: scm_t_intptr should have been intptr_t.
479
3071ea27
RB
4802003-04-13 Rob Browning <rlb@defaultvalue.org>
481
482 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
483 test. Instead use
484 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
485 as gc_os_dep.c suggests is appropriate.
486
487 * goops.c (prep_hashsets): make static to match prototype.
488 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
489 Chin.
490
491 * c-tokenize.lex: remove trailing comma from enum. Thanks to
492 Albert Chin.
493
494 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
495 Klausner.
496
21ab2aeb
MD
4972003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
498
499 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
500 indicated through extra fields in getters-n-setters.
501 (scm_add_slot): Adapted to new format of getters_n_setters slot.
502 (Thanks to Andy Wingo.)
503
dff96e95
HWN
5042003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
505
506 * gc-segment.c: add comment
507
07921c76
RB
5082003-04-07 Rob Browning <rlb@defaultvalue.org>
509
b5331f10
RB
510 * debug.h: change "id" arg name to "info_id" to avoid objective-c
511 clash.
512
07921c76
RB
513 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
514 and add regression test to standalone/.
515
5162003-04-06 Rob Browning <rlb@defaultvalue.org>
517
518 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
519 Thanks to Dale P. Smith.
520
521 * random.c: #include gmp.h.
522 (scm_c_random_bignum): normalize result on return.
523
524 * init.c: #include gmp.h.
525
526 * numbers.h: remove the gmp.h #include (not needed now).
527
528 * posix.h: change occurences of "id" to something else so we don't
529 cause trouble when included via objective-c (can't hurt, might
530 help). Still have usage in debug.h, though.
531
938f6b7c
MD
5322003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
533
372691d8
MD
534 * random.c (scm_c_random_bignum): Don't generate a random number
535 equal to m (the second argument of scm_c_random_bignum); only
536 generate numbers in the range 0 <= r < m.
c5f268f8
MD
537 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
538 scm_var_random_state.
372691d8 539
938f6b7c
MD
540 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
541 clause.
542
6cdb8c3f
RB
5432003-04-05 Rob Browning <rlb@defaultvalue.org>
544
938f6b7c 545 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
546 uses before any code.
547
15635be5
MD
5482003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
549
1ecfd013
MD
550 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
551 not top_srcdir.
552
15635be5
MD
553 * hashtab.c (rehash_after_gc): Clear to_rehash list before
554 processing it in order to avoid an infinite loop.
555
556 * print.c (scm_prin1): Remember old state of pstate->writingp.
557
73be1d9e
MV
5582003-04-05 Marius Vollmer <mvo@zagadka.de>
559
560 * Changed license terms to the plain LGPL thru-out.
561
ad815c06
RB
5622003-04-04 Rob Browning <rlb@defaultvalue.org>
563
564 * socket.c (FLIPCPY_NET_HOST_128): new macro.
565 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
566 rewrite to handle GMP bignums.
567
568
569 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
570
571 * ports.c (scm_getc): minor tweak.
572
573 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
574 rewrite to handle GMP bignums.
575
576 * numbers.c: rewrite *many* functions to handle GMP bignums.
577
578 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
579 handle GMP bignums.
580
581 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
582
583 * init.c (check_config): remove SCM_BIGDIG conditionals.
584 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
585
586 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
587
588 * eval.c: remove SCM_BIGDIG conditionals.
589
590 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
591
6cdb8c3f
RB
5922003-03-31 Rob Browning <rlb@defaultvalue.org>
593
594 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
595 to Kevin Ryde.)
596
5972003-03-27 Rob Browning <rlb@defaultvalue.org>
598
599 * threads.h: fix various preprocessor usages of new public
600 symbols to expect 0 or 1 values rather than 1 or undefined.
601 i.e. change #ifdef to #if, etc.
602
603 * threads.c: fix various preprocessor usages of new public
604 symbols to expect 0 or 1 values rather than 1 or undefined.
605 i.e. change #ifdef to #if, etc.
606
607 * tags.h: fix various preprocessor usages of new public
608 symbols to expect 0 or 1 values rather than 1 or undefined.
609 i.e. change #ifdef to #if, etc.
610
611 * stacks.c: fix various preprocessor usages of new public
612 symbols to expect 0 or 1 values rather than 1 or undefined.
613 i.e. change #ifdef to #if, etc.
614
615 * stackchk.h: fix various preprocessor usages of new public
616 symbols to expect 0 or 1 values rather than 1 or undefined.
617 i.e. change #ifdef to #if, etc.
618
619 * stackchk.c: fix various preprocessor usages of new public
620 symbols to expect 0 or 1 values rather than 1 or undefined.
621 i.e. change #ifdef to #if, etc.
622
623 * sort.c: fix various preprocessor usages of new public
624 symbols to expect 0 or 1 values rather than 1 or undefined.
625 i.e. change #ifdef to #if, etc.
626
627 * read.c: fix various preprocessor usages of new public
628 symbols to expect 0 or 1 values rather than 1 or undefined.
629 i.e. change #ifdef to #if, etc.
630
631 * random.c: fix various preprocessor usages of new public
632 symbols to expect 0 or 1 values rather than 1 or undefined.
633 i.e. change #ifdef to #if, etc.
634
635 * print.c: fix various preprocessor usages of new public
636 symbols to expect 0 or 1 values rather than 1 or undefined.
637 i.e. change #ifdef to #if, etc.
638
639 * objects.c: fix various preprocessor usages of new public
640 symbols to expect 0 or 1 values rather than 1 or undefined.
641 i.e. change #ifdef to #if, etc.
642
643 * numbers.h: fix various preprocessor usages of new public
644 symbols to expect 0 or 1 values rather than 1 or undefined.
645 i.e. change #ifdef to #if, etc.
646
647 * null-threads.c: fix various preprocessor usages of new public
648 symbols to expect 0 or 1 values rather than 1 or undefined.
649 i.e. change #ifdef to #if, etc.
650
651 * lang.c: fix various preprocessor usages of new public
652 symbols to expect 0 or 1 values rather than 1 or undefined.
653 i.e. change #ifdef to #if, etc.
654
655 * lang.h: fix various preprocessor usages of new public
656 symbols to expect 0 or 1 values rather than 1 or undefined.
657 i.e. change #ifdef to #if, etc.
658
659 * iselect.h: fix various preprocessor usages of new public
660 symbols to expect 0 or 1 values rather than 1 or undefined.
661 i.e. change #ifdef to #if, etc.
662
663 * init.c: fix various preprocessor usages of new public
664 symbols to expect 0 or 1 values rather than 1 or undefined.
665 i.e. change #ifdef to #if, etc.
666
667 * gh_data.c: fix various preprocessor usages of new public
668 symbols to expect 0 or 1 values rather than 1 or undefined.
669 i.e. change #ifdef to #if, etc.
670
671 * gh.h: fix various preprocessor usages of new public
672 symbols to expect 0 or 1 values rather than 1 or undefined.
673 i.e. change #ifdef to #if, etc.
674
675 * gen-scmconfig.c: change most new public symbols to be defined to
676 0 or 1 rather than being either 1 or undefined.
677
678 * gc_os_dep.c: fix various preprocessor usages of new public
679 symbols to expect 0 or 1 values rather than 1 or undefined.
680 i.e. change #ifdef to #if, etc.
681 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
682
683 * gc.h: fix various preprocessor usages of new public
684 symbols to expect 0 or 1 values rather than 1 or undefined.
685 i.e. change #ifdef to #if, etc.
686
687 * gc-card.c: fix various preprocessor usages of new public
688 symbols to expect 0 or 1 values rather than 1 or undefined.
689 i.e. change #ifdef to #if, etc.
690
691 * gc-mark.c: fix various preprocessor usages of new public
692 symbols to expect 0 or 1 values rather than 1 or undefined.
693 i.e. change #ifdef to #if, etc.
694
695 * feature.c: fix various preprocessor usages of new public
696 symbols to expect 0 or 1 values rather than 1 or undefined.
697 i.e. change #ifdef to #if, etc.
698
699 * evalext.c: fix various preprocessor usages of new public
700 symbols to expect 0 or 1 values rather than 1 or undefined.
701 i.e. change #ifdef to #if, etc.
702
703 * eval.h: fix various preprocessor usages of new public
704 symbols to expect 0 or 1 values rather than 1 or undefined.
705 i.e. change #ifdef to #if, etc.
706
707 * eval.c: fix various preprocessor usages of new public
708 symbols to expect 0 or 1 values rather than 1 or undefined.
709 i.e. change #ifdef to #if, etc.
710
711 * eq.c: fix various preprocessor usages of new public
712 symbols to expect 0 or 1 values rather than 1 or undefined.
713 i.e. change #ifdef to #if, etc.
714
715 * coop.c: fix various preprocessor usages of new public
716 symbols to expect 0 or 1 values rather than 1 or undefined.
717 i.e. change #ifdef to #if, etc.
718
719 * coop-threads.c: fix various preprocessor usages of new public
720 symbols to expect 0 or 1 values rather than 1 or undefined.
721 i.e. change #ifdef to #if, etc.
722
723 * coop-pthreads.c: fix various preprocessor usages of new public
724 symbols to expect 0 or 1 values rather than 1 or undefined.
725 i.e. change #ifdef to #if, etc.
726
727 * coop-defs.h: fix various preprocessor usages of new public
728 symbols to expect 0 or 1 values rather than 1 or undefined.
729 i.e. change #ifdef to #if, etc.
730
731 * convert.i.c: fix various preprocessor usages of new public
732 symbols to expect 0 or 1 values rather than 1 or undefined.
733 i.e. change #ifdef to #if, etc.
734
735 * continuations.c: fix various preprocessor usages of new public
736 symbols to expect 0 or 1 values rather than 1 or undefined.
737 i.e. change #ifdef to #if, etc.
738
739 * _scm.h: fix various preprocessor usages of new public symbols to
740 expect 0 or 1 values rather than 1 or undefined. i.e. change
741 #ifdef to #if, etc.
742
d11d697a
MV
7432003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
744
9686f86d
MV
745 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
746
747 * deprecated.c, deprecated.h: New files, to collect deprecated
748 things in one place.
749 * Makefile.am: Added them in all the right places.
750
d11d697a
MV
751 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
752 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
753 builds work.
9686f86d
MV
754 (DOT_X_FILES): Removed "iselect.x".
755 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 756
e3c0c3b9
RB
7572003-03-25 Rob Browning <rlb@defaultvalue.org>
758
759 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
760 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
761
762 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
763
764 * vports.c: #include <config.h> if HAVE_CONFIG_H.
765
766 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
767 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
768
769 * threads.h: replace usage of struct timespect with
770 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
771 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
772 favor of scm_t_timespec from scmconfig.h.
773
774 * threads.c: move libguile/_scm.h include to the top so we pick up
775 any critical defines like _GNU_SOURCE early. Replace usage of
776 struct timespect with scm_t_timespec. Replace usage of
777 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
778 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
779
780 * threads-plugin.h: replace usage of struct timespect with
781 scm_t_timespec.
782
783 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
784 usage of struct timespect with scm_t_timespec.
785
786 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
787 HAVE_INTTYPES_H handling to scmconfig.h. #include
788 "libguile/__scm.h". Rework handling for scm_t_bits,
789 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
790 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
791 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
792 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
793 SCM_HAVE_ARRAYS.
794
795 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
796
797 * struct.c: #include <config.h> if HAVE_CONFIG_H.
798
799 * strports.c: #include <config.h> if HAVE_CONFIG_H.
800
801 * strop.c: #include <config.h> if HAVE_CONFIG_H.
802
803 * stime.h: move handling of time related headers to scmconfig.h.
804
805 * stime.c: #include <config.h> if HAVE_CONFIG_H.
806
807 * stacks.c: replace usage of STACK_GROWS_UP with
808 SCM_STACK_GROWS_UP.
809
810 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
811 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
812
813 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
814 of uint32 and HAVE_UINT_32 with scm_t_int32.
815
816 * smob.c: #include <config.h> if HAVE_CONFIG_H.
817
818 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
819
820 * script.c: #include <config.h> if HAVE_CONFIG_H.
821
822 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
823
824 * scmconfig.h.top: new file -- preamble for scmconfig.h.
825
826 * rw.c: #include <config.h> if HAVE_CONFIG_H.
827
828 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
829
830 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
831
832 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
833
834 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
835 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
836 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
837 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
838
839 * ramap.c: replace usage of HAVE_LONG_LONGS with
840 "SCM_SIZEOF_LONG_LONG != 0".
841
842 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
843 "libguile/scmconfig.h".
844
845 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
846
847 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
848 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
849
850 * posix.c: #include <config.h> if HAVE_CONFIG_H.
851
852 * ports.c: #include <config.h> if HAVE_CONFIG_H.
853
854 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
855
856 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
857 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
858 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
859 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
860 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
861 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
862 "SCM_SIZEOF_LONG_LONG != 0".
863
864 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
865 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
866 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
867 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
868
869 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
870
871 * null-threads.h: replace usage of struct timespect with
872 scm_t_timespec.
873
874 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
875
876 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
877 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
878 scm_t_uint64 and rename usages.
879
880 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
881
882 * load.c: #include <config.h> if HAVE_CONFIG_H.
883
884 * iselect.h: move handling of time related headers to scmconfig.h.
885 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
886 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
887 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
888
889 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
890 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
891 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
892
893 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
894
895 * inline.h: #include "libguile/__scm.h" at the top. Change code
896 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
897 what to do instead of creating a new public #define. Rename usage
898 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
899 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
900 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
901
902 * inline.c: rearrange handling -- now we just #define
903 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
904 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
905 appropriate, and we use that in inline.h along with the above
906 define to determine how to respond.
907
908 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
909 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
910
911 * guile.c: #include <config.h> if HAVE_CONFIG_H.
912
913 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
914 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
915
916 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
917
918 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
919
920 * gen-scmconfig.c: new file -- see comments in file for details.
921
922 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
923
924 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
925 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
926
927 * gc.h: replace usage of SIZEOF_LONG with
928 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
929 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
930 since we handle that in scmconfig.h now.
931
932 * gc.c: #include <config.h> if HAVE_CONFIG_H.
933
934 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
935 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
936 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
937
938 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
939
940 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
941 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
942
943 * fports.c: #include <config.h> if HAVE_CONFIG_H.
944
945 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
946
947 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
948 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
949
950 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
951
952 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
953 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
954
955 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
956 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
957 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
958 with "SCM_SIZEOF_LONG_LONG != 0".
959
960 * error.c: #include <config.h> if HAVE_CONFIG_H.
961
962 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
963 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
964 with "SCM_SIZEOF_LONG_LONG != 0".
965
966 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
967
968 * coop.c: replace usage of struct timespect with scm_t_timespec.
969 #include <config.h> if HAVE_CONFIG_H.
970
971 * coop-threads.c: #include "libguile/_scm.h" early. Replace
972 usage of struct timespect with scm_t_timespec. Replace usage of
973 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
974
975 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
976 usage of struct timespect with scm_t_timespec. Replace usage of
977 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
978
979 * coop-defs.h: move handling of time related headers to
980 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
981 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
982 timespect with scm_t_timespec.
983
984 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
985
986 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
987
988 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
989 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
990
991 * continuations.c: move libguile/_scm.h include to the top so we
992 pick up any critical defines like _GNU_SOURCE early.
993
994 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
995
996 * async.c: #include <config.h> if HAVE_CONFIG_H.
997
998 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
999
1000 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
1001 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
1002
1003 * __scm.h: move libguile/scmconfig.h include up to the top, so
1004 we're sure to pick up any critical defines like _GNU_SOURCE early.
1005 #include <limits.h> removed in favor of scmconfig.h inclusion when
1006 appropriate. STDC_HEADERS based inclusion of stdlib.h,
1007 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
1008 scmconfig.h inclusion when appropriate. Various Win32 related
1009 definitions removed in favor of scmconfig.h inclusion when
1010 appropriate.
1011 (HAVE_UINTPTR_T): definition removed (see NEWS).
1012 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
1013 (HAVE_LONG_LONGS): definition removed (see NEWS).
1014 (HAVE_LONG_LONG): definition removed (see NEWS).
1015 (HAVE_PTRDIFF_T): definition removed (see NEWS).
1016
1017 * Makefile.am: scmconfig.h is now generated by building and
1018 running gen-scmconfig.h and capturing its output. gen-scmconfig
1019 uses config.h and the configure.in generated gen-scmconfig.h to
1020 decide what to output. See gen-scmconfig.c for details.
1021 (noinst_PROGRAMS): add gen-scmconfig.
1022 (gen_scmconfig_SOURCES): new variable.
1023 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
1024 cross-compiling right.
1025 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
1026 (BUILT_SOURCES): add scmconfig.h.
1027
25e0bf97
MV
10282003-03-19 Marius Vollmer <mvo@zagadka.de>
1029
1030 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
1031 Adrian Bunk. Thanks!
1032
74b6d6e4
MD
10332003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1034
1035 * goops.c (make_class_from_template): New fourth arg:
1036 applicablep.
1037 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
1038 cpls.
1039
1040 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
1041
1042 * goops.c, objects.c, objects.h (scm_make_extended_class): New
1043 second arg: applicablep.
1044 (scm_i_inherit_applicable): New function.
1045
1046 * goops.c, goops.h (scm_class_applicable,
1047 scm_class_extended_accessor): New classes.
1048
5c9e7dad
DH
10492003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1050
1051 * procs.c (scm_procedure_documentation): Removed redundant
1052 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
1053 predicates.
1054
f8af5c6d
MD
10552003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1056
c614a00b
MD
1057 * list.c, list.h (scm_filter, scm_filter_x): New functions.
1058
109c2c9f
MD
1059 * modules.c (scm_module_import_interface): New function.
1060
f8af5c6d
MD
1061 * goops.c, goops.h (scm_class_accessor_method): Renamed from
1062 scm_class_accessor.
1063 (scm_class_accessor): New class.
1064
a48d60b1
MD
10652003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1066
1067 * goops.c (scm_primitive_generic_generic): Enable primitive
1068 generic if not enabled.
1069 (scm_sys_goops_loaded): Setup unextended primitive generics.
1070
1071 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
1072
1073 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
1074 snarf macros.
1075
1076 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
1077 testing example. All uses of SCM_GPROC should be converted.)
1078
1079 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
1080 scm_assoc.
1081
1082 * eq.c (scm_equal_p): Turned into a primitive generic.
1083
84edc049
RB
10842003-02-27 Rob Browning <rlb@defaultvalue.org>
1085
1086 * Makefile.am (scmconfig.h): new target -- generate file from
1087 ../config.h.
1088 (modinclude_HEADERS): remove version.h.
1089 (nodist_modinclude_HEADERS): add version.h.
1090
ea5c9285
MD
10912003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1092
b4a1358c
MD
1093 This fixes a serious GC bug, introduced during the latest
1094 reorganization of the GC, which disabled freeing of structs and
1095 GOOPS objects:
1096
1097 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
1098 SCM_EOL.
53af8255
MD
1099 (scm_struct_prehistory): Move scm_free_structs to
1100 scm_before_mark_c_hook.
ea5c9285 1101
b4a1358c
MD
1102 * gc-card.c (sweep_card): Check that we haven't swept structs on
1103 this card before. That can happen if scm_i_sweep_all_segments has
1104 been called from some other place than scm_igc.
1105
c35738c1
MD
11062003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1107
231a4ea8
MD
1108 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
1109 (since hash tables now adapt their size).
1110
1111 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
1112 (current number of prehistory bindings; hashtable code will select
1113 a prime which is greater than this value).
1114
1115 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
1116 (current number of initial symbols).
1117
1118 * properties.c (scm_init_properties): Don't specify size of
1119 scm_properties_whash.
1120
1121 * objprop.c (scm_init_objprop): Don't specify size of
1122 scm_object_whash.
1123
1124 * keywords.c (scm_init_keywords): Don't specify a hash table size.
1125
c35738c1
MD
1126 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
1127
1128 The following changes introduce the use of resizable hash tables
1129 throughout Guile. It also renames the old *-hash-table* functions
1130 to *-alist-vector* and places them, together with the rest of the
1131 weak vector support, in the module (ice-9 weak-vector). We should
1132 probably introduce a new, better, API for weak references, for
1133 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
1134 look like and are used like ordinary pairs.)
1135
1136 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
1137 leaf_environment_fold, obarray_remove_all): Use hashtable
1138 accessors.
1139
1140 * gc.c (scm_init_storage): Moved hook initialization to
1141 scm_storage_prehistory.
1142 (scm_storage_prehistory): New function.
1143 (scm_igc): Added commentary about placement of
1144 scm_after_sweep_c_hook.
1145
1146 * gc-mark.c (scm_mark_all): Use hashtable accessors.
1147 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
1148 SCM_WVECT_WEAK_VALUE_P.
1149
1150 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
1151 functions.
1152 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
1153 Removed.
1154 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
1155 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
1156
1157 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
1158 calls to scm_storage_prehistory and scm_hashtab_prehistory.
1159
1160 * modules.c (module-reverse-lookup): Use hashtable accessors.
1161
1162 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
1163
1164 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
1165 scm_make_weak_value_alist_vector,
1166 scm_make_doubly_weak_alist_vector): New functions.
1167
1168 * weaks.c (scm_init_weaks_builtins): New function.
1169
1170 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
1171 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
1172 SCM_WVECT_NOSCAN_P): New macros.
1173
1174 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
1175 and SCM_WVECT_WEAK_VALUE_P.
1176
1177 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
1178 allocate_weak_vector and exported.
1179
0a4c1355
MD
11802003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1181
1182 * hashtab.c: Undid thread safety. (We decided that it's better to
1183 let the user explicitly protect the tables (or not) according what
1184 is suitable for the application.)
1185
87ca11ff
MD
11862003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1187
1188 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
1189 thread safe and handle resizing tables.
1190 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
1191 SCM_DEFER/ALLOW_INTS.
1192
f59a096e
MD
11932003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1194
1195 * hashtab.c (scm_vector_to_hash_table,
1196 scm_c_make_resizing_hash_table, scm_make_hash_table): New
1197 functions.
1198 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
1199 safe and handle resizing tables.
1200
1201 * weaks.c (scm_make_weak_key_hash_table,
1202 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
1203 Size argument made optional. Return resizable table if not
1204 specified.
1205
4b612c5b
MD
12062003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1207
1208 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
1209 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
1210
b3d7f6df
MD
12112003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1212
1213 * debug.c (scm_procedure_source): Handle all objects for which
1214 procedure? is #t. (Thanks to Bill Schottstaedt.)
1215
756414cf
MD
12162003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1217
361d631f
MD
1218 * futures.c (mark_futures): Don't need to mark data of recycled
1219 futures.
1220 (scan_futures, cleanup_undead): Be smarter about marking
1221 futures---avoid unnecessary passes through future lists.
1222
756414cf
MD
1223 * futures.h, futures.c: New files; Introduced recycling of
1224 futures. For fine-grained threading this lifts performance to
1225 another level. We can now use parallelization in inner loops of
1226 Guile programs without impossible overhead.
1227
1228 * threads.h, threads.c: Moved futures to their own file.
1229
1230 * Makefile.am (libguile_la_SOURCES): Added futures.c.
1231 (DOT_X_FILES): Added futures.x.
1232 (DOT_DOC_FILES): Added futures.doc.
1233 (modinclude_HEADERS): Added futures.h.
1234
1235 * threads.c, threads.h (scm_i_create_thread): Renamed from
1236 create_thread and made global.
1237
1238 * futures.c (scm_make_future): New procedure.
1239
1240 * eval.c: #include "libguile/futures.h".
1241
1242 * init.c: #include "futures.h"
1243 (scm_init_guile_1): Call scm_init_futures.
1244
1245 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
1246
1247 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
1248
1249 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
1250 functions.
1251
1252 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
1253
b4debead
MD
12542003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1255
1256 * threads.c (create_thread): Don't unwind dynwind chain of parent
1257 thread before creation. Just start the new thread with an empty
1258 dynwind chain.
1259
93f26b7b
MD
12602003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1261
1262 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
1263
38d8927c
MD
12642003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1265
41c96c32
MD
1266 * threads.c (scm_timed_wait_condition_variable): Support timed
1267 waiting also for simple condition variables.
1268
38d8927c
MD
1269 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
1270 of calling the procedure change-object-class.
1271
9cf5d9b7
MD
12722003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1273
1274 * ramap.c (scm_ramapc): Typo in error message.
1275
bbf8d523
MD
12762003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1277
b46fae00
MD
1278 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
1279 slots with instance allocation.
1280
bbf8d523
MD
1281 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
1282 class.
1283 (scm_compute_applicable_methods): Use scm_generic_function_methods.
1284
1285 * goops.c (scm_generic_function_methods): Support extended
1286 generic functions.
1287
ebf9b47c
MD
12882002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1289
1290 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 1291 Thanks to Neil for pointing this out!
ebf9b47c 1292
14a9ba3f
NJ
12932002-12-29 Neil Jerram <neil@ossau.uklinux.net>
1294
1295 * lang.h: Remove declarations matching definitions removed from
1296 lang.c (just below).
1297
c6a040a8
NJ
12982002-12-28 Neil Jerram <neil@ossau.uklinux.net>
1299
6054d805
NJ
1300 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
1301 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
1302 and already commented out.
1303
c6a040a8
NJ
1304 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
1305 scm_lreadparen): Support reading vectors with Elisp syntax if
1306 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
1307 is not currently defined, and there isn't even a configure switch
1308 to enable it yet.)
1309
3742c12f
MV
13102002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
1311
1312 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
1313 builds work.
1314 (EXTRA_DIST): Added version.h.in.
1315
fb50ef08
MD
13162002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1317
1318 This change makes it possible for one thread to do lazy sweeping
1319 while other threads are running. Now only the mark phase need to
1320 have all threads asleep. We should look further into this issue.
1321 Presently, I've put the locking of scm_i_sweep_mutex at
1322 "conservative" places due to my current lack of knowledge about
1323 the garbage collector. Please feel free to restrict these regions
1324 further to allow for maximal parallelism!
1325
1326 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
1327
1328 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
1329 scm_gc_register_collectable_memory): Substitute locking of
1330 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
1331 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
1332 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
1333 the single-thread section (which now only contains the mark
1334 phase).
1335 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
1336 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
1337
1338 * threads.c (gc_section_mutex): Removed.
1339
9ed24633
MD
13402002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1341
0d48aca5
MD
1342 * threads.c (create_thread): Clear parent field in root state in
1343 order not to unnecessarily remember dead threads.
1344
9ed24633
MD
1345 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
1346 (scm_trampoline_1, scm_trampoline_2): Use them.
1347
29717c89
MD
13482002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1349
1350 Partial introduction of real plugin interface.
1351
1352 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
1353 (EXTRA_DIST): Added threads-plugin.c.
1354
1355 * threads-plugin.h, threads-plugin.c: New files.
1356
1357 * threads.h: #include "libguile/threads-plugin.h".
1358
1359 * threads.c: #include "libguile/threads-plugin.c".
1360
1361 * pthread-threads.c: Temporarily remove debugging functions.
1362
1363 * threads.c, threads.h (scm_yield): Added back.
1364
e29e0b09
MD
13652002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1366
1367 * threads.c (really_launch): Detach before unlocking
1368 thread_admin_mutex in order not to risk being joined.
1369 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
1370 thread_admin_mutex locked during GC.
1371
1372 * pthread-threads.c, pthread-threads.h: Improvements to debugging
1373 functions.
1374
0b6843b1 13752002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 1376
6da2dfc4
MD
1377 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
1378 support for debugging mutex operations.
1379
1b92fb6b
MD
1380 * threads.c (scm_thread): Removed filed joining_threads.
1381 (thread_print): Print thread number as well as address of thread
1382 structure.
0b6843b1
MD
1383 (scm_join_thread): Bugfix.
1384 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
1385 scm_timed_wait_condition_variable, scm_signal_condition_variable,
1386 scm_broadcast_condition_variable): Use the low-level API.
1387 (scm_all_threads): Return copy of thread list (to prevent
1388 unintended destruction).
1389 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 1390
93cd4dcd
MD
1391 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
1392 pthread "native" recursive mutex support.
1393
2ff4f181
MD
13942002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1395
28d52ebb
MD
1396 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
1397 Simply lock a thread C API recursive mutex.
1398 (SCM_NONREC_CRITICAL_SECTION_START,
1399 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
1400 SCM_REC_CRITICAL_SECTION_END): Removed.
1401
1402 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
1403 direct calls to scm_rec_mutex_lock / unlock around the three calls
1404 to scm_m_expand_body.
1405
1406 * eval.c, eval.h (promise_free): New function.
1407 (scm_force): Rewritten; Now thread-safe; Removed
1408 SCM_DEFER/ALLOW_INTS.
1409
1410 * pthread-threads.h: Added partially implemented plugin interface
1411 for recursive mutexes. These are, for now, only intended to be
1412 used internally within the Guile implementation.
1413
1414 * pthread-threads.c: New file.
1415
1416 * threads.c: Conditionally #include "pthread-threads.c".
1417
1418 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
1419 thread-safe;
1420
1421 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
1422 SCM_GLOBAL_REC_MUTEX): New macros.
1423
1424 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
1425 macros---use mutexes instead.
1426
1427 * tags.h (SCM_IM_FUTURE): New tag.
1428
1429 * eval.c (scm_m_future): New primitive macro.
1430 (SCM_CEVAL): Support futures.
1431 (unmemocopy): Support unmemoization of futures.
1432
1433 * print.c (scm_isymnames): Name of future isym.
1434
2ff4f181
MD
1435 * version.c: Unmade some changes to my private copy that got
1436 committed by mistake.
1437
392d2833
MD
14382002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1439
e200ddee
MD
1440 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
1441 2002-12-10.
1442
392d2833
MD
1443 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
1444
1445 * gc.c (scm_gc_sweep): Call it here instead, which is a more
1446 logical place.
1447
1448 * threads.c (create_thread): Remember root object until the handle
1449 of the new thread is on all_threads list.
1450
1451 * root.c (scm_make_root): Moved copying of fluids until after
1452 creation of root handle so that the fluids are GC protected. Also
1453 removed the critical section.
1454
c4c52ebe
MD
14552002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1456
960c408c
MD
1457 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
1458
3cdde9d6 1459 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 1460 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
1461 (scm_realloc): Serialize call to realloc
1462 (scm_calloc): Same for calloc.
1463 Thanks to Wolfgang Jaehrling!
1464 (Now we have to make sure all calls to malloc/realloc are made
1465 through scm_malloc.)
1466
960c408c
MD
1467 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
1468
c4c52ebe
MD
1469 * threads.c (really_launch): Release heap (to prevent deadlock).
1470 (create_thread): Release heap before locking thread admin mutex.
1471
b0dc3d71
MD
14722002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1473
1474 * threads.c (scm_i_thread_invalidate_freelists): New
1475 function.
1476
1477 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
1478
1479 * modules.c (scm_export): Inserted a return statement.
1480
06e80f59
HWN
14812002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1482
1483 * modules.c (scm_export): new function
1484
1485 * gc-card.c: add a note about malloc()/free() overhead.
1486
a12611c3
MD
14872002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1488
1489 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
1490 in srcdir.
1491
c7fabadf
MD
14922002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1493
1494 These changes remove scm_ints_disabled (which hasn't has any
1495 effect in Guile for quite some time).
1496
1497 * async.c, error.h (scm_ints_disabled): Removed.
1498
1499 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
1500 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
1501 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
1502 (old_ints): Removed.
1503
1504 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
1505 critical section.
1506 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
1507 SCM_ALLOW_INTS.
1508
9bc4701c
MD
15092002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1510
52340b65
MD
1511 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
1512 Removed accidental #if 0 around these functions.
1513
9bc4701c
MD
1514 These changes are the start of support for preemptive
1515 multithreading. Marius and I have agreed that I commit this code
1516 into the repository although it isn't thoroughly tested and surely
1517 introduces many bugs. The bugs should only be exposed when using
1518 threads, though. Signalling and error handling for threads is
1519 very likely broken. Work on making the implementation cleaner and
1520 more efficient is needed.
1521
1522 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
1523 (SCM_NONREC_CRITICAL_SECTION_START,
1524 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
1525 SCM_REC_CRITICAL_SECTION_END): New macros.
1526 (SCM_CRITICAL_SECTION_START/END): Defined here.
1527
1528 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
1529 the three calls to scm_m_expand_body.
1530
1531 * gc.h: #include "libguile/pthread-threads.h";
1532 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
1533
1534 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
1535 scm_t_key;
1536
1537 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
1538 access.
1539
1540 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
1541
1542 * gc-freelist.c, threads.c (really_launch): Use
1543 SCM_FREELIST_CREATE.
1544
1545 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
1546
1547 * gc.c (scm_i_expensive_validation_check, scm_gc,
1548 scm_gc_for_newcell): Put threads to sleep before doing GC-related
1549 heap administration so that those pieces of code are executed
1550 single-threaded. We might consider rewriting these code sections
1551 in terms of a "call_gc_code_singly_threaded" construct instead of
1552 calling the pair of scm_i_thread_put_to_sleep () and
1553 scm_i_thread_wake_up (). Also, we would want to have as many of
1554 these sections eleminated.
1555
1556 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
1557
1558 * inline.h: #include "libguile/threads.h"
1559
1560 * pthread-threads.h: Macros now conform more closely to the
1561 pthreads interface. Some of them now take a second argument.
1562
1563 * threads.c, threads.h: Many changes.
1564
15652002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1566
1567 * Makefile.am (version.h): Changed $^ --> $< in rule for
1568 version.h.
1569
b2cbe8d8
RB
15702002-12-08 Rob Browning <rlb@defaultvalue.org>
1571
1572 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
1573 (SCM_MINOR_VERSION): use @--@ substitution now.
1574 (SCM_MICRO_VERSION): use @--@ substitution now.
1575 (scm_effective_version): new function prototype.
1576
1577 * version.c (scm_effective_version): new function, also add
1578 effective-version.
1579
1580 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
1581 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
1582 SCM_LIBRARY_DIR.
1583 (version.h): generate this here rather than configure.in. This
1584 approach tracks source edits better (i.e. more immediately).
1585 Might be worth considering for other .in files too.
1586
5441c65c
MV
15872002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
1588
1589 Reorganized thread package selection. A thread package now only
1590 implements a small set of pthread like functions and Guile
1591 implements the rest on top of that. Guile's implementation is
1592 what the "coop-pthreads" package has been previously. Support for
1593 "coop" threads has been removed until I get time to add it again.
1594
1595 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
1596 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
1597 null-threads.c, coop-pthreads.c.
1598 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
1599 pthread-threads.h.
1600
1601 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
1602
1603 * threads.h: Do not include "libguile/coop-defs.h". Include
1604 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
1605 (previously deprecated) C level thread API prototypes. They are
1606 now in the thread package specific headers, "null-threads.h" and
1607 "pthread-threads.h".
1608 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
1609 New.
1610 (scm_threads_init): Removed.
1611 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
1612 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
1613 SCM_I_THREAD_SWITCH_COUNT): Define here.
1614 (scm_single_thread_p): Removed.
1615 (scm_call_with_new_thread): Take two args directly instead of list
1616 of two args.
1617 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
1618 SCM_SET_THREAD_LOCAL_DATA): Define here.
1619
1620 * threads.c: Merged with "coop-pthreads.c".
1621
1622 * null-threads.h: Implement pthread-like API as a set of macros.
1623
1624 * pthread-threads.h: New, implement pthread-like API by deferring
1625 to pthread itself.
1626
1627 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
1628 has been lost in the reorganization.
1629
504d99c5
MD
16302002-12-01 Mikael Djurfeldt <mdj@linnaeus>
1631
1632 The following change makes it possible to move procedure
1633 application dispatch outside inner loops. The motivation was
1634 clean implementation of efficient replacements of R5RS primitives
1635 in SRFI-1.
1636
1637 The semantics is clear: scm_trampoline_N returns an optimized
1638 version of scm_call_N (or NULL if the procedure isn't applicable
1639 on N args).
1640
1641 Applying the optimization to map and for-each increases efficiency
1642 noticeably. For example, (map abs ls) is 8 times faster than
1643 before.
1644
1645 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
1646
1647 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
1648
1649 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
1650 (map, for-each): Handle also application on two args as a special
1651 case; Use trampolines.
1652
1653 Other changes:
1654
1655 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
1656 (subr2oless): Removed.
1657 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
1658 vector GC protected.
1659
1660 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
1661 scm_out_of_range.
1662
63dd3413
DH
16632002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
1664
1665 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
1666
4ba5f279
MD
16672002-11-17 Mikael Djurfeldt <mdj@linnaeus>
1668
1669 * debug.c (scm_make_iloc): Added missing "return".
1670
56ae231f
MV
16712002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
1672
1673 * strports.c (scm_eval_string_in_module): Validate second arg to
1674 be a module. Thanks to Arno Peters!
1675
80b28865
DH
16762002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1677
1678 * .cvsignore: remove goops.c
1679
c88b1456
DH
16802002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1681
1682 * modules.c (scm_env_top_level, scm_lookup_closure_module,
1683 module_variable, scm_module_lookup_closure,
1684 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
1685 scm_system_module_env_p): Don't compare SCM values with C
1686 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
1687 over SCM_NFALSEP.
1688
a8a19efc
DH
16892002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1690
1691 * eval.h (SCM_MAKE_ILOC): New macro.
1692
1693 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
1694 the iloc bitpattern here.
1695
76734914
MD
16962002-11-14 Mikael Djurfeldt <mdj@linnaeus>
1697
1698 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
1699 part of the API, otherwise it's difficult to write Guile
1700 extensions using non-blocking I/O => moved #include
1701 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
1702
1703 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
1704 s_unlock_mutex.
1705
8b5b4a75
MV
17062002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
1707
1708 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
1709 are defined in configure.in.
1710
1711 * threads.c: Removed SCM_API from function definitions. SCM_API
1712 is only for declarations.
1713
e5a83084
MD
17142002-11-07 Mikael Djurfeldt <mdj@linnaeus>
1715
9be8bb45
MD
1716 * coop-pthreads.h: Added support for thread specific data to the
1717 generic C API for the coop-pthreads case.
1718
e5a83084
MD
1719 * threads.c, threads.h (scm_cond_init): Undo unintentional API
1720 change.
6c214b62 1721 (scm_cond_broadcast): Added missing function.
e5a83084 1722
7edf178e
MV
17232002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1724
1725 * coop.c (coop_next_runnable_thread): Removed, wich should have
1726 happened when GUILE_ISELECT was hard-wired.
1727
7f5b1b77
MV
17282002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
1729
7caa1b07
MV
1730 * Makefile.am (libguile_la_SOURCES): Added threads.c
1731 (DOT_DOC_FILES): Added threads.doc.
1732 (DOT_X_FILES): Added threads.x.
1733 (EXTRA_libguile_la_SOURCES): Removed threads.c.
1734 (noinst_HEADERS): Added coop-pthreads.c.
1735 (modinclude_HEADERS): Added coop-pthreads.h.
1736
1737 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
1738 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
1739
bb11cbf4
MV
1740 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
1741 Thanks to Bill Schottstaedt!
1742
1d4cbbed
MV
1743 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
1744
7f5b1b77
MV
1745 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
1746 SCM_COPT_THREADS is defined.
1747 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
1748 is defined.
1749
1750 * coop-pthreads.c: Some harmless renamings of internal stuff.
1751 (create_thread): New, generalized version of
1752 scm_call_with_new_thread.
1753 (scm_call_with_new_thread): Use it.
1754 (scm_spawn_thread): New, use create_thread.
1755
d52f53b1
MV
17562002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
1757
1758 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
1759 start testing it now.
1760
1761 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
1762 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
1763 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
1764 is defined.
1765
30f920c3
MV
17662002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
1767
1768 * scmsigs.c (signal_cell_handlers, install_handler_data,
1769 scm_delq_spine_x, really_install_handler, install_handler): New
1770 scheme for triggering signal handlers, to simplify take_signal.
1771 (take_signal): Simplified, to avoid race conditions.
1772 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
1773 hasn't exited yet.
1774
1775 * async.c (scm_async_click): Reset pending_asyncs, handle
1776 signal_asyncs. Don't set cdr of a non-signal async to #f.
1777 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
1778 always. Set pending_asyncs.
1779 (scm_system_async_mark_for_thread): Check that thread has not
1780 exited.
1781 (scm_unmask_signals, decrease_block): Call scm_async_click after
1782 block_asyncs becomes zero.
1783
1784 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
1785 active_asyncs.
1786
1787 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
1788 fields.
1789 * root.c (root_mark): Mark them.
1790 (make_root): Initialize them.
1791
1792 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
1793 USE_COOP_THREADS.
1794 (scm_internal_select): Define one version for USE_COOP_THREADS and
1795 one for USE_NULL_THREADS.
1796 (scm_init_iselect): Likewise.
1797
1798 * inline.h (scm_cell, scm_double_cell): Also allow
1799 USE_COPT_THREADS to not protect the slot initializers.
1800
1801 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
1802 because threads need to be initialized before the stack, but
1803 gsubrs such as scm_timed_condition_variable_wait can only be
1804 created later.
1805
1806 * threads.h: Include "coop-pthreads.h" when requested.
1807 (scm_threads_make_mutex, scm_threads_lock_mutex,
1808 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
1809 not implemented anyway.
1810 (scm_init_thread_procs, scm_try_mutex,
1811 scm_timed_condition_variable_wait,
1812 scm_broadcast_condition_variable, scm_c_thread_exited_p,
1813 scm_thread_exited_p): New prototypes.
1814 (struct timespec): Define if not already defined.
1815 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1816 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
1817 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1818 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
1819 deprecated.
1820
1821 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
1822 requested.
1823 (scm_thread_exited_p): New.
1824 (scm_try_mutex, scm_broadcast_condition_variable): Newly
1825 registered procedures.
1826 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
1827 Use the latter as the procedure for "wait-condition-variable",
1828 thus offering a optional timeout parameter to Scheme.
1829 (scm_wait_condition_variable): Implement in terms of
1830 scm_timed_wait_condition_variable.
1831 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1832 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
1833 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1834 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
1835 scm_make_mutex, etc, and deprecate.
1836 (scm_init_threads): Do not create smobs, leave this to
1837 scm_threads_init. Do not include "threads.x" file.
1838 (scm_init_thread_procs): New, include "threads.x" here.
1839
1840 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
1841 scm_null_mutex_lock, scm_null_mutex_unlock,
1842 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
1843 scm_null_condvar_wait, scm_null_condvar_signal,
1844 scm_null_condvar_destroy): Removed.
1845 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
1846 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
1847 scm_cond_destory): Do not define, they are now deprecated and
1848 handled by threads.{h,c}.
1849
1850 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
1851 (scm_threads_init): Create smobs here, using the appropriate
1852 sizes.
1853 (block): Removed, now unused.
1854 (scm_c_thread_exited_p): New.
1855 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
1856 scm_null_mutex_destroy, scm_null_condvar_init,
1857 scm_null_condvar_wait, scm_null_condvar_signal,
1858 scm_null_condvar_destroy): Removed and updated users to do their
1859 task directly.
1860 (scm_try_mutex, timeval_subtract,
1861 scm_timed_wait_condition_variable,
1862 scm_broadcast_condition_variable): New.
1863 (scm_wait_condition_variable): Removed.
1864
1865 * coop-defs.h (coop_m): Added 'level' field.
1866 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1867 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
1868 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1869 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
1870 define.
1871 (coop_condition_variable_broadcast): New.
1872
1873 * coop-threads.c (scm_threads_init): Create smobs here, using the
1874 appropriate sizes.
1875 (scm_c_thread_exited_p, scm_try_mutex,
1876 scm_timed_wait_condition_variable,
1877 scm_broadcast_condition_variable): New.
1878 (scm_wait_condition_variable): Removed.
1879
1880 * coop.c (coop_new_mutex_init): Initialize level.
1881 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
1882 level.
1883 (coop_condition_variable_signal): Renamed to
1884 coop_condition_variable_broadcast and reimplemented in terms of
1885 that. Thus...
1886 (coop_condition_variable_broadcast): New.
1887
1888 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
1889
1890 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
1891
087ed40d
MV
18922002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
1893
65a23095
MV
1894 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
1895 of system headers.
1896
087ed40d
MV
1897 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
1898 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 1899 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 1900
5ec1d2c8
DH
19012002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1902
1903 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
1904 scm_definedp to scm_defined_p and deprecated scm_definedp.
1905
100ae50d
DH
19062002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1907
1908 * async.h, async.c (scm_system_async): Fixed deprecation to work
1909 correctly when deprecated features are excluded.
1910
2794cb50
MV
19112002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1912
1913 * async.c (scm_system_async_mark_for_thread): Validate thread
1914 argument.
1915
1916 * coop-threads.c (scm_i_thread_root): Do not validate argument.
1917
1918 * feature.c (scm_init_feature): Don't add 'threads' for
1919 USE_NULL_THREADS.
1920
1921 * inline.h (scm_cell, scm_double_cell): Also allow
1922 USE_NULL_THREADS to not protect the slot initializers.
1923
1924 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
1925 "USE_THREAD".
1926
1927 * Makefile.am (noinst_HEADERS): Added null-threads.c.
1928 (modinclude_HEADERS): Added null-threads.h.
1929
1930 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
1931 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
1932 (scm_init_threads): Use generic type names scm_t_mutex and
1933 scm_t_cond instead of coop_m and coop_c.
1934
1935 * null-threads.c, null-threads.h: New files.
1936
ff810d7a
MV
19372002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
1938
1939 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
1940 This is to support makes that know about "$<" only in pattern
1941 rules, like Sun's make.
1942
a90bdb73
MV
19432002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
1944
1945 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
1946 substitution. Thanks to David Allouche!
1947
e71a8bf2
DH
19482002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1949
1950 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
1951 !SCM_ENABLE_DEPRECATED.
1952
41f77ff5
MV
19532002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1954
504d99c5 1955 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
1956 scm_i_thread_root when USE_THREADS is defined. Use scm_root
1957 otherwise.
1958
1959 * scmsigs.c (take_signal): Only call scm_i_thread_root when
1960 USE_THREADS is defined. Use scm_root otherwise.
1961 (scm_sigaction_for_thread): Ignore THREAD argument when
1962 USE_THREADS is not defined. Also, move THREAD argument defaulting
1963 out of HAVE_SIGACTION section, which was a bug.
1964
6d16b125
MV
19652002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1966
1967 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
1968 signal_handlers, not the closure that is used as the async.
1969 The closure is stored in signal_handler_cells, as previously.
1970
acfa1f52
MV
19712002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
1972
1973 * root.h (scm_root_state): Added 'block_async' slot.
1974 (scm_active_asyncs): Removed abbrev.
1975 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
1976
1977 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
1978 abbrev.
1979
1980 * async.h (scm_call_with_blocked_asyncs,
1981 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
1982 scm_c_call_with_unblocked_asyncs): New prototypes.
1983 (scm_mask_signals, scm_unmask_signals): Deprecated.
1984 (scm_mask_ints): Turned into a macro.
1985 * async.c (scm_mask_ints): Removed.
1986 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
1987 this should not be necessary.
1988 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
1989 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
1990 deprecation warning and check for errornous use. Set block_asyncs
1991 instead of scm_mask_ints.
1992 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
1993 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
1994 scm_c_call_with_unblocked_asyncs): New.
1995
1996 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
1997 Asyncs are enabled by default.
1998
34010f56
NJ
19992002-10-09 Neil Jerram <neil@ossau.uklinux.net>
2000
2001 * vports.c (scm_make_soft_port): Allow vector argument to carry a
2002 6th element: an input waiting thunk.
2003 (sf_input_waiting): New.
2004
9310d6f2
MV
20052002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
2006
2007 * root.c (root_mark): Mark active_asyncs slot.
2008
2009 * async.c (scm_async_click): Set the cdr of a executed handler
2010 cell to SCM_BOOL_F, not SCM_EOL.
2011 (scm_i_queue_async_cell): Queue the cell at the end of the list,
2012 and only if the handler procedure is not already present.
2013 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
2014 with SCM_BOOL_F.
2015 * scmsigs.c (scm_sigaction_for_thread): Likewise.
2016
ac48c719
RB
20172002-10-04 Rob Browning <rlb@defaultvalue.org>
2018
1360a142
RB
2019 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
2020
2021 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
2022 scm_lt_dlopenext, and scm_lt_dlerror.
2023 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
2024 and scm_lt_dlerror.
2025 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
2026 and scm_lt_dlerror.
2027 (sysdep_dynl_init): switch to scm_lt_dlinit();
2028
2029 * Makefile.am (libguile_la_LIBADD): switch to use
2030 libguile-ltdl.la.
2031
504d99c5 2032 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 2033
497092c9
MV
20342002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
2035
2036 * scmsigs.h (scm_sigaction_for_thread): New prototype.
2037 * scmsigs.c (got_signal): Removed.
2038 (signal_handler_cells, signal_handler_threads): New.
2039 (take_signal): Queue the cell of the signal for the specified
2040 thread. Reset the signal handler on systems that don't have
2041 sigaction.
2042 (sys_deliver_signals): Removed.
2043 (close_1): New.
2044 (scm_sigaction_for_thread): Renamed from scm_sigaction and
2045 extended to also set the thread of a signal and allocate a cell
2046 for it. Keep the Scheme name "sigaction". Check that signum is
2047 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
2048 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
2049 (scm_init_scmsigs): Allocate signal_handler_cells and
2050 signal_handler_threads vectors.
2051
2052 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
2053 that system asnycs and user asyncs are separated. Reimplemented
2054 system asyncs to work per-thread.
2055
2056 * gc.c (scm_init_gc): Do not use scm_system_async.
2057
2058 * async.h (scm_asyncs_pending, scm_set_tick_rate,
2059 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
2060 Removed prototypes.
2061 (scm_i_queue_async_cell): New.
2062
2063 * __scm.h (scm_asyncs_pending_p): Removed.
2064 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
2065 scm_asyncs_pending_p.
2066
2067 * async.h (scm_system_async_mark_for_thread): New prototype.
2068
2069 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
2070
2071 * root.h (scm_root_state): Added new "active_asyncs" slot.
2072 * root.c (scm_make_root): Initialize it to SCM_EOL.
2073
2074 * coop-defs.h (coop_t): Added new "handle" slot.
2075 * coop-threads.c (all_threads, scm_current_thread,
2076 scm_all_threads, scm_i_thread_root): New.
2077 (scm_threads_init): Add main thread to all_threads.
2078 (scheme_launch_thread): Remove thread from all_threads when it
2079 terminates.
2080 (scm_call_with_new_thread): Initialize handle slot of coop_t
2081 structure and add new thread to all_threads.
2082 (scm_spawn_thread): Likewise.
2083
2084 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
2085 * threads.c (scm_current_thread, scm_all_threads): Register as
2086 primitives.
2087
2088 * dynl.c: Use scm_lt_ prefix for libltdl functions.
2089
480fa28d
NJ
20902002-09-29 Neil Jerram <neil@ossau.uklinux.net>
2091
2092 * script.c (scm_compile_shell_switches): Fix bad spelling of
2093 `explicitly' in comment.
2094
20952002-09-28 Neil Jerram <neil@ossau.uklinux.net>
2096
2097 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
2098 Refer to provided? in doc string rather than deprecated feature?.
2099
3553e1d1
GH
21002002-09-24 Gary Houston <ghouston@arglist.com>
2101
2102 * inline.h (scm_double_cell): prevent reordering of statements
2103 with any following code (for GCC 3 strict-aliasing).
2104 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
2105 the earlier version of the reordering prevention.
2106
4ad0814a
HWN
21072002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2108
2109 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
2110
e88e4f2e
HWN
21112002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2112
2113 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
2114 protection.
2115
1e71eafb
HWN
21162002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2117
2118 * inline.h: include stdio.h
2119
2120 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
2121
61ef9c1f
HWN
21222002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2123
dac04e9f
HWN
2124 * gc-segment.c (scm_i_make_initial_segment): check user settings
2125 for sanity.
2126
2127 * gc-malloc.c (scm_gc_init_malloc): check user settings for
2128 sanity.
dac04e9f
HWN
2129
2130 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
2131
ffd72400
HWN
2132 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
2133
2134 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
2135 these won't ever wrap around with high memory usage. Thanks to
2136 Sven Hartrumpf for finding this.
ffd72400 2137
5bd4a949
HWN
2138 * gc-freelist.c: include <stdio.h>
2139
61ef9c1f
HWN
2140 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
2141
ffd0ef3b
MV
21422002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
2143
a27e3d14
MV
2144 * vectors.h (SCM_VECTOR_REF): New.
2145
ffd0ef3b
MV
2146 * snarf.h (SCM_DEFINE_PUBLIC): New.
2147
f8a1712b
MV
21482002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
2149
2150 * socket.c (scm_addr_vector): Added size of address to arguments.
2151 Use it to avoid accessing a non-existent path in a sockaddr_un.
2152 Changed all callers.
2153
7200a36b
HWN
21542002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2155
1383773b
HWN
2156 * gc.h: remove DOUBLECELL card flags.
2157
2158 * gc-malloc.c (scm_calloc): try to use calloc() before calling
2159 scm_realloc().
2160
2161 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
2162 init loop; handle this from scm_init_card_freelist()
2163
2164 * gc-card.c (scm_init_card_freelist): init bit vector here.
2165
7200a36b 2166 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 2167 num2float.i.c (FLOAT2NUM): idem
7200a36b 2168
9981de3a
HWN
21692002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2170
2171 * eval.h: prepend libguile/ to include path
2172
19647556
MV
21732002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
2174
2175 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
2176