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