diff options
author | Kevin Ryde <user42@zip.com.au> | 2006-04-17 00:05:42 +0000 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2006-04-17 00:05:42 +0000 |
commit | 2b829bbb3d685ff780a0e3c0888d1d1231e2bc0e (patch) | |
tree | 2fa96f40db1d02c513fa3002eb4819335cd194dd | |
parent | cd5fea8dbe4879f2d79aeef72f7385728db39d75 (diff) |
merge from 1.8 branch
220 files changed, 603 insertions, 372 deletions
diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 0c435bc89..62e0fb9f4 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,79 @@ +2006-04-16 Kevin Ryde <user42@zip.com.au> + + * filesys.c (scm_stat2scm, scm_stat, scm_lstat): Use stat or stat64. + (scm_readdir): Use readdir64. + (scm_copy_file): Use open64 and fstat64, to cope with >2Gb files. + * ports.c (scm_truncate_file): Use truncate64. Correction truncate + and ftruncate take off_t not size_t. + * _scm.h (stat_or_stat64 etc): Macros for selecting LFS64 when + available. + +2006-04-06 Kevin Ryde <user42@zip.com.au> + + * fports.c (scm_setvbuf): Fix for not _IOLBF, clear SCM_BUFLINE + instead of toggling it. Reported by Ludovic Courtès. + +2006-03-26 Marius Vollmer <mvo@zagadka.de> + + * threads.c (get_thread_stack_base): Use scm_get_stack_base + instead of accessing __libc_stack_end directly, and only do this + when pthread_attr_getstack is known not to work for the main + thread or when not using pthreads at all. + + * gc_os_dep.c (scm_get_stack_base): Abort when the machine type is + unknown instead of returning NULL. + +2006-03-21 Ludovic Courtès <ludovic.courtes@laas.fr> + + * numbers.c (scm_i_mem2number): Renamed to + scm_c_locale_stringn_to_number. + * numbers.c, print.c, read.c: Updated callers. + * numbers.h: Update function declaration. + +2006-03-11 Neil Jerram <neil@ossau.uklinux.net> + + * unif.c (string_set): Don't return in a void function. (Reported + by Mike Gran.) + + * srfi-4.c (scm_uniform_vector_read_x): Declare base as char* + rather than void*, so we can do pointer arithmetic on it. + (Reported by Mike Gran.) + (s_scm_uniform_vector_write): Ditto. + +2006-03-10 Neil Jerram <neil@ossau.uklinux.net> + + * unif.c (scm_make_shared_array): Don't use SCM_I_ARRAY_BASE when + oldra is not an array. (Reported by Steve Juranich.) + + * threads.c (do_unlock): Renamed from "unlock", which is defined + in unistd.h on QNX. (Reported by Matt Kraai.) + +2006-03-04 Kevin Ryde <user42@zip.com.au> + + * deprecated.c (scm_i_defer_ints_etc): Show SCM_DEFER_INTS in message, + not SCM_CRITICAL_SECTION_START. + + * eval.c, posix.c: Change comments from C++ to C style. Reported by + Mike Gran. + +2006-02-28 Kevin Ryde <user42@zip.com.au> + + * unif.c (bitvector_set): Use h->writable_elements not h->elements. + +2006-02-26 Kevin Ryde <user42@zip.com.au> + + * filesys.c (scm_readdir): Use fpathconf for the dirent size when + NAME_MAX is not available, which is so on Solaris 10. Report and help + by Bill Schottstaedt. + + * srfi-13.c (MY_VALIDATE_SUBSTRING_SPEC_UCOPY): New macro. + (scm_string_compare, scm_string_compare_ci, scm_string_lt, + scm_string_gt, scm_string_le, scm_string_ge, scm_string_ci_lt, + scm_string_ci_gt, scm_string_ci_le, scm_string_ci_ge): In comparisons + use "unsigned char", not signed char. This ensures comparisons are + the same as `char<?' etc, and is also the same as guile 1.6 did. + Reported by Sven Hartrumpf. + 2006-02-19 Mikael Djurfeldt <mdj@neurologic.cc> * random.c: Test for SCM_HAVE_T_UINT64 instead of @@ -39,6 +115,23 @@ (scm_i_sweep_statistics_init): New macro. (scm_i_sweep_statistics_sum): New macro +2006-02-14 Ludovic Courtès <ludovic.courtes@laas.fr> + + * strings.c (scm_i_take_stringbufn): Register LEN+1 bytes instead of + LEN. Without this, too much collectable memory gets unregistered, + which results in an underflow of SCM_MALLOCATED in + `decrease_mtrigger()'. + + * gc-malloc.c (decrease_mtrigger): Make sure SIZE is lower than or + equal to SCM_MALLOCATED. + +2006-02-13 Marius Vollmer <mvo@zagadka.de> + + * eval.c (scm_eval_body): Use scm_i_dynwind_pthread_mutex_lock + oinstead of scm_dynwind_pthread_mutex_lock so that it works when + configured --without-threads. + (SCM_APPLY, CEVAL): Likewise. Thanks to Han-Wen Nienhuys! + 2006-02-12 Marius Vollmer <mvo@zagadka.de> * unif.c (scm_dimensions_to_uniform_array): Use the prototype for @@ -106,6 +199,10 @@ scm_i_with_continuation_barrier with scm_handle_by_message_noexit as the pre-unwind handler. +2006-02-04 Kevin Ryde <user42@zip.com.au> + + * gc-mark.c (scm_mark_all): Fix c99-isms "loops" and "again" variables. + 2006-02-03 Kevin Ryde <user42@zip.com.au> * list.c, list.h (scm_list): Restore this function for use from C. diff --git a/libguile/Makefile.am b/libguile/Makefile.am index 083129b71..6b6bb920d 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with Automake to create Makefile.in ## -## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. ## ## This file is part of GUILE. ## diff --git a/libguile/__scm.h b/libguile/__scm.h index b2b68a13b..fc581631a 100644 --- a/libguile/__scm.h +++ b/libguile/__scm.h @@ -3,7 +3,7 @@ #ifndef SCM___SCM_H #define SCM___SCM_H -/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002,2003, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/_scm.h b/libguile/_scm.h index a750d6b43..c2823a272 100644 --- a/libguile/_scm.h +++ b/libguile/_scm.h @@ -3,7 +3,7 @@ #ifndef SCM__SCM_H #define SCM__SCM_H -/* Copyright (C) 1995,1996,2000,2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 2002, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -133,6 +133,43 @@ #define max(A, B) ((A) >= (B) ? (A) : (B)) #endif + + +#if HAVE_STAT64 +#define CHOOSE_LARGEFILE(foo,foo64) foo64 +#else +#define CHOOSE_LARGEFILE(foo,foo64) foo +#endif + +/* These names are a bit long, but they make it clear what they represent. */ +#define dirent_or_dirent64 CHOOSE_LARGEFILE(dirent,dirent64) +#define fstat_or_fstat64 CHOOSE_LARGEFILE(fstat,fstat64) +#define ftruncate_or_ftruncate64 CHOOSE_LARGEFILE(ftruncate,ftruncate64) +#define lstat_or_lstat64 CHOOSE_LARGEFILE(lstat,lstat64) +#define off_t_or_off64_t CHOOSE_LARGEFILE(off_t,off64_t) +#define open_or_open64 CHOOSE_LARGEFILE(open,open64) +#define readdir_or_readdir64 CHOOSE_LARGEFILE(readdir,readdir64) +#define readdir_r_or_readdir64_r CHOOSE_LARGEFILE(readdir_r,readdir64_r) +#define stat_or_stat64 CHOOSE_LARGEFILE(stat,stat64) +#define truncate_or_truncate64 CHOOSE_LARGEFILE(truncate,truncate64) +#define scm_from_off_t_or_off64_t CHOOSE_LARGEFILE(scm_from_off_t,scm_from_int64) +#define scm_from_ino_t_or_ino64_t CHOOSE_LARGEFILE(scm_from_ulong,scm_from_uint64) +#define scm_from_blkcnt_t_or_blkcnt64_t CHOOSE_LARGEFILE(scm_from_ulong,scm_from_uint64) +#define scm_to_off_t_or_off64_t CHOOSE_LARGEFILE(scm_to_off_t,scm_to_int64) + +#if SIZEOF_OFF_T == 4 +#define scm_to_off_t scm_to_int32 +#define scm_from_off_t scm_from_int32 +#else +#if SIZEOF_OFF_T == 8 +#define scm_to_off_t scm_to_int64 +#define scm_from_off_t scm_from_int64 +#else +#error sizeof(off_t) is not 4 or 8. +#endif +#endif + + #endif /* SCM__SCM_H */ /* diff --git a/libguile/alist.c b/libguile/alist.c index 2287aec72..11da502b7 100644 --- a/libguile/alist.c +++ b/libguile/alist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/alist.h b/libguile/alist.h index ea05ae4ee..3d1784c7f 100644 --- a/libguile/alist.h +++ b/libguile/alist.h @@ -3,7 +3,7 @@ #ifndef SCM_ALIST_H #define SCM_ALIST_H -/* Copyright (C) 1995,1996,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/arbiters.c b/libguile/arbiters.c index bb3840555..57c089778 100644 --- a/libguile/arbiters.c +++ b/libguile/arbiters.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996, 1997, 2000, 2001, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996, 1997, 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/arbiters.h b/libguile/arbiters.h index 0928986b6..d04244926 100644 --- a/libguile/arbiters.h +++ b/libguile/arbiters.h @@ -3,7 +3,7 @@ #ifndef SCM_ARBITERS_H #define SCM_ARBITERS_H -/* Copyright (C) 1995,1996,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/async.c b/libguile/async.c index f12c3c28f..b3209be9a 100644 --- a/libguile/async.c +++ b/libguile/async.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/async.h b/libguile/async.h index cb278a079..a81a98d74 100644 --- a/libguile/async.h +++ b/libguile/async.h @@ -3,7 +3,7 @@ #ifndef SCM_ASYNC_H #define SCM_ASYNC_H -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/backtrace.c b/libguile/backtrace.c index 29a77355c..edeefb831 100644 --- a/libguile/backtrace.c +++ b/libguile/backtrace.c @@ -1,5 +1,5 @@ /* Printing of backtraces and error messages - * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004 Free Software Foundation + * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/backtrace.h b/libguile/backtrace.h index 7c5a7cb12..b4033dede 100644 --- a/libguile/backtrace.h +++ b/libguile/backtrace.h @@ -3,7 +3,7 @@ #ifndef SCM_BACKTRACE_H #define SCM_BACKTRACE_H -/* Copyright (C) 1996,1998,1999,2000,2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996,1998,1999,2000,2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/boolean.c b/libguile/boolean.c index 743db2a52..aaed1af55 100644 --- a/libguile/boolean.c +++ b/libguile/boolean.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 2000, 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/boolean.h b/libguile/boolean.h index 82565acd5..3dc82e1f6 100644 --- a/libguile/boolean.h +++ b/libguile/boolean.h @@ -3,7 +3,7 @@ #ifndef SCM_BOOLEAN_H #define SCM_BOOLEAN_H -/* Copyright (C) 1995,1996,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/chars.c b/libguile/chars.c index b6d024ef5..9cb7c3326 100644 --- a/libguile/chars.c +++ b/libguile/chars.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998, 2000, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998, 2000, 2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/chars.h b/libguile/chars.h index c2e6759c1..1a139e901 100644 --- a/libguile/chars.h +++ b/libguile/chars.h @@ -3,7 +3,7 @@ #ifndef SCM_CHARS_H #define SCM_CHARS_H -/* Copyright (C) 1995,1996,2000,2001,2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001,2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/continuations.c b/libguile/continuations.c index 06b0fb251..e456623f6 100644 --- a/libguile/continuations.c +++ b/libguile/continuations.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,2000,2001,2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001,2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/continuations.h b/libguile/continuations.h index 3bd01ec83..d10297956 100644 --- a/libguile/continuations.h +++ b/libguile/continuations.h @@ -3,7 +3,7 @@ #ifndef SCM_CONTINUATIONS_H #define SCM_CONTINUATIONS_H -/* Copyright (C) 1995,1996,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/convert.c b/libguile/convert.c index cf31db378..11a462b86 100644 --- a/libguile/convert.c +++ b/libguile/convert.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/convert.h b/libguile/convert.h index ade86ab91..f834a6b1d 100644 --- a/libguile/convert.h +++ b/libguile/convert.h @@ -3,7 +3,7 @@ #ifndef SCM_CONVERT_H #define SCM_CONVERT_H -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/coop-defs.h b/libguile/coop-defs.h index 73bf61498..a5ef5337e 100644 --- a/libguile/coop-defs.h +++ b/libguile/coop-defs.h @@ -3,7 +3,7 @@ #ifndef SCM_COOP_DEFS_H #define SCM_COOP_DEFS_H -/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/coop-pthreads.c b/libguile/coop-pthreads.c index bdcc579f7..a9b1b86e7 100644 --- a/libguile/coop-pthreads.c +++ b/libguile/coop-pthreads.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/coop-pthreads.h b/libguile/coop-pthreads.h index e4266331d..913487452 100644 --- a/libguile/coop-pthreads.h +++ b/libguile/coop-pthreads.h @@ -3,7 +3,7 @@ #ifndef SCM_COOP_PTHREADS_H #define SCM_COOP_PTHREADS_H -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/coop-threads.h b/libguile/coop-threads.h index bf8d16e0b..56ada64fd 100644 --- a/libguile/coop-threads.h +++ b/libguile/coop-threads.h @@ -3,7 +3,7 @@ #ifndef SCM_COOP_THREADS_H #define SCM_COOP_THREADS_H -/* Copyright (C) 1996,1997,1998,2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,2000, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/coop.c b/libguile/coop.c index 80340e0fd..133c3d470 100644 --- a/libguile/coop.c +++ b/libguile/coop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -16,7 +16,7 @@ */ -/* $Id: coop.c,v 1.38 2005-05-23 19:57:20 mvo Exp $ */ +/* $Id: coop.c,v 1.39 2006-04-17 00:05:38 kryde Exp $ */ /* Cooperative thread library, based on QuickThreads */ diff --git a/libguile/debug-malloc.c b/libguile/debug-malloc.c index c7b467ae4..ff627a966 100644 --- a/libguile/debug-malloc.c +++ b/libguile/debug-malloc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/debug-malloc.h b/libguile/debug-malloc.h index ce204837d..444f06d71 100644 --- a/libguile/debug-malloc.h +++ b/libguile/debug-malloc.h @@ -3,7 +3,7 @@ #ifndef SCM_DEBUG_MALLOC_H #define SCM_DEBUG_MALLOC_H -/* Copyright (C) 2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/debug.c b/libguile/debug.c index 0237426fa..b546b6cae 100644 --- a/libguile/debug.c +++ b/libguile/debug.c @@ -1,5 +1,5 @@ /* Debugging extensions for Guile - * Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003 Free Software Foundation + * Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2006 Free Software Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/deprecated.c b/libguile/deprecated.c index ceccfb54c..bb17967f9 100644 --- a/libguile/deprecated.c +++ b/libguile/deprecated.c @@ -2,7 +2,7 @@ deprecate something, move it here when that is feasible. */ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1435,7 +1435,7 @@ void scm_i_defer_ints_etc () { scm_c_issue_deprecation_warning - ("SCM_CRITICAL_SECTION_START etc are deprecated. " + ("SCM_DEFER_INTS etc are deprecated. " "Use a mutex instead if appropriate."); } diff --git a/libguile/deprecated.h b/libguile/deprecated.h index 3d89c1854..bbd8bc07a 100644 --- a/libguile/deprecated.h +++ b/libguile/deprecated.h @@ -5,7 +5,7 @@ #ifndef SCM_DEPRECATED_H #define SCM_DEPRECATED_H -/* Copyright (C) 2003,2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2003,2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/deprecation.c b/libguile/deprecation.c index 9998352a5..6e314ddd9 100644 --- a/libguile/deprecation.c +++ b/libguile/deprecation.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/deprecation.h b/libguile/deprecation.h index 53f82e32f..53500eeca 100644 --- a/libguile/deprecation.h +++ b/libguile/deprecation.h @@ -3,7 +3,7 @@ #ifndef SCM_DEPRECATION_H #define SCM_DEPRECATION_H -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/discouraged.c b/libguile/discouraged.c index cf395e2dd..1b5794a82 100644 --- a/libguile/discouraged.c +++ b/libguile/discouraged.c @@ -2,7 +2,7 @@ discourage something, move it here when that is feasible. */ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/discouraged.h b/libguile/discouraged.h index 8dd53af40..6e537bf1e 100644 --- a/libguile/discouraged.h +++ b/libguile/discouraged.h @@ -13,7 +13,7 @@ #ifndef SCM_DISCOURAGED_H #define SCM_DISCOURAGED_H -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/dynl.h b/libguile/dynl.h index 138643f9c..6936afd3d 100644 --- a/libguile/dynl.h +++ b/libguile/dynl.h @@ -3,7 +3,7 @@ #ifndef SCM_DYNL_H #define SCM_DYNL_H -/* Copyright (C) 1996,1998,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1996,1998,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/dynwind.c b/libguile/dynwind.c index bdddccdcf..82095008f 100644 --- a/libguile/dynwind.c +++ b/libguile/dynwind.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/dynwind.h b/libguile/dynwind.h index f437378c1..9e5390b10 100644 --- a/libguile/dynwind.h +++ b/libguile/dynwind.h @@ -3,7 +3,7 @@ #ifndef SCM_DYNWIND_H #define SCM_DYNWIND_H -/* Copyright (C) 1995,1996,1998,1999,2000,2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2003,2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/environments.c b/libguile/environments.c index 9a35027b1..a94f119cd 100644 --- a/libguile/environments.c +++ b/libguile/environments.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999,2000,2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1999,2000,2001, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/environments.h b/libguile/environments.h index 2880238c7..dd698b7b5 100644 --- a/libguile/environments.h +++ b/libguile/environments.h @@ -3,7 +3,7 @@ #ifndef SCM_ENVIRONMENTS_H #define SCM_ENVIRONMENTS_H -/* Copyright (C) 1999,2000 Free Software Foundation, Inc. +/* Copyright (C) 1999,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/eq.c b/libguile/eq.c index aade6aab9..4513b6b32 100644 --- a/libguile/eq.c +++ b/libguile/eq.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001,2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001,2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/eq.h b/libguile/eq.h index 12b383902..da5a71c9f 100644 --- a/libguile/eq.h +++ b/libguile/eq.h @@ -3,7 +3,7 @@ #ifndef SCM_EQ_H #define SCM_EQ_H -/* Copyright (C) 1995,1996,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/error.c b/libguile/error.c index 02095bf06..d4d3f41ee 100644 --- a/libguile/error.c +++ b/libguile/error.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/error.h b/libguile/error.h index 5300ef109..7ba0c4b37 100644 --- a/libguile/error.h +++ b/libguile/error.h @@ -3,7 +3,7 @@ #ifndef SCM_ERROR_H #define SCM_ERROR_H -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/eval.c b/libguile/eval.c index ed592af5e..5c9801c5b 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005 +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006 * Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or @@ -2970,7 +2970,7 @@ scm_eval_body (SCM code, SCM env) if (SCM_ISYMP (SCM_CAR (code))) { scm_dynwind_begin (0); - scm_dynwind_pthread_mutex_lock (&source_mutex); + scm_i_dynwind_pthread_mutex_lock (&source_mutex); /* check for race condition */ if (SCM_ISYMP (SCM_CAR (code))) m_expand_body (code, env); @@ -3369,7 +3369,7 @@ dispatch: if (SCM_ISYMP (form)) { scm_dynwind_begin (0); - scm_dynwind_pthread_mutex_lock (&source_mutex); + scm_i_dynwind_pthread_mutex_lock (&source_mutex); /* check for race condition */ if (SCM_ISYMP (SCM_CAR (x))) m_expand_body (x, env); @@ -4969,7 +4969,7 @@ tail: if (SCM_ISYMP (SCM_CAR (proc))) { scm_dynwind_begin (0); - scm_dynwind_pthread_mutex_lock (&source_mutex); + scm_i_dynwind_pthread_mutex_lock (&source_mutex); /* check for race condition */ if (SCM_ISYMP (SCM_CAR (proc))) m_expand_body (proc, args); @@ -5695,8 +5695,8 @@ SCM_DEFINE (scm_cons_source, "cons-source", 3, 0, 0, * hare-and-tortoise implementation, found several times in guile. */ struct t_trace { - struct t_trace *trace; // These pointers form a trace along the stack. - SCM obj; // The object handled at the respective stack frame. + struct t_trace *trace; /* These pointers form a trace along the stack. */ + SCM obj; /* The object handled at the respective stack frame.*/ }; static SCM @@ -5751,7 +5751,7 @@ copy_tree ( return new_vector; } - else // scm_is_pair (hare->obj) + else /* scm_is_pair (hare->obj) */ { SCM result; SCM tail; diff --git a/libguile/evalext.c b/libguile/evalext.c index 126f22797..6b03df464 100644 --- a/libguile/evalext.c +++ b/libguile/evalext.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1998,1999,2000,2001,2002,2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/evalext.h b/libguile/evalext.h index 37ca3f7c3..e9b442e44 100644 --- a/libguile/evalext.h +++ b/libguile/evalext.h @@ -3,7 +3,7 @@ #ifndef SCM_EVALEXT_H #define SCM_EVALEXT_H -/* Copyright (C) 1998,1999,2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998,1999,2000, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/extensions.c b/libguile/extensions.c index 6daa25660..7a05fa88e 100644 --- a/libguile/extensions.c +++ b/libguile/extensions.c @@ -1,6 +1,6 @@ /* extensions.c - registering and loading extensions. * - * Copyright (C) 2001 Free Software Foundation, Inc. + * Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/extensions.h b/libguile/extensions.h index a322fbd0b..294dcad76 100644 --- a/libguile/extensions.h +++ b/libguile/extensions.h @@ -3,7 +3,7 @@ #ifndef SCM_EXTENSIONS_H #define SCM_EXTENSIONS_H -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/feature.c b/libguile/feature.c index 73f86c8d4..1d44a7790 100644 --- a/libguile/feature.c +++ b/libguile/feature.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/feature.h b/libguile/feature.h index 6b6e395f2..58db46422 100644 --- a/libguile/feature.h +++ b/libguile/feature.h @@ -3,7 +3,7 @@ #ifndef SCM_FEATURE_H #define SCM_FEATURE_H -/* Copyright (C) 1995,1996,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/filesys.c b/libguile/filesys.c index 4468ce41b..14078ef45 100644 --- a/libguile/filesys.c +++ b/libguile/filesys.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2002, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -20,6 +20,7 @@ /* See stime.c for comments on why _POSIX_C_SOURCE is not always defined. */ #define _GNU_SOURCE /* ask glibc for everything */ +#define _LARGEFILE64_SOURCE /* ask for stat64 etc */ #ifdef __hpux #define _POSIX_C_SOURCE 199506L /* for readdir_r */ #endif @@ -28,6 +29,23 @@ # include <config.h> #endif +/* AIX requires this to be the first thing in the file. The #pragma + directive is indented so pre-ANSI compilers will ignore it, rather + than choke on it. */ +#ifndef __GNUC__ +# if HAVE_ALLOCA_H +# include <alloca.h> +# else +# ifdef _AIX +# pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +#endif + #include <stdio.h> #include <errno.h> @@ -35,6 +53,7 @@ #include "libguile/smob.h" #include "libguile/feature.h" #include "libguile/fports.h" +#include "libguile/private-gc.h" /* for SCM_MAX */ #include "libguile/iselect.h" #include "libguile/strings.h" #include "libguile/vectors.h" @@ -92,6 +111,7 @@ #if defined (__MINGW32__) || defined (_MSC_VER) || defined (__BORLANDC__) # include "win32-dirent.h" # define NAMLEN(dirent) strlen((dirent)->d_name) +/* The following bits are per AC_HEADER_DIRENT doco in the autoconf manual */ #elif HAVE_DIRENT_H # include <dirent.h> # define NAMLEN(dirent) strlen((dirent)->d_name) @@ -178,6 +198,13 @@ # define fsync(fd) _commit (fd) # define fchmod(fd, mode) (-1) #endif /* __MINGW32__ */ + +/* This definition is for Solaris 10, it's probably not right elsewhere, but + that's ok, it shouldn't be used elsewhere. */ +#if ! HAVE_DIRFD +#define dirfd(dirstream) (dirstream->dd_fd) +#endif + /* Two helper macros for an often used pattern */ @@ -449,12 +476,12 @@ SCM_SYMBOL (scm_sym_sock, "socket"); SCM_SYMBOL (scm_sym_unknown, "unknown"); static SCM -scm_stat2scm (struct stat *stat_temp) +scm_stat2scm (struct stat_or_stat64 *stat_temp) { SCM ans = scm_c_make_vector (15, SCM_UNSPECIFIED); SCM_SIMPLE_VECTOR_SET(ans, 0, scm_from_ulong (stat_temp->st_dev)); - SCM_SIMPLE_VECTOR_SET(ans, 1, scm_from_ulong (stat_temp->st_ino)); + SCM_SIMPLE_VECTOR_SET(ans, 1, scm_from_ino_t_or_ino64_t (stat_temp->st_ino)); SCM_SIMPLE_VECTOR_SET(ans, 2, scm_from_ulong (stat_temp->st_mode)); SCM_SIMPLE_VECTOR_SET(ans, 3, scm_from_ulong (stat_temp->st_nlink)); SCM_SIMPLE_VECTOR_SET(ans, 4, scm_from_ulong (stat_temp->st_uid)); @@ -464,7 +491,7 @@ scm_stat2scm (struct stat *stat_temp) #else SCM_SIMPLE_VECTOR_SET(ans, 6, SCM_BOOL_F); #endif - SCM_SIMPLE_VECTOR_SET(ans, 7, scm_from_ulong (stat_temp->st_size)); + SCM_SIMPLE_VECTOR_SET(ans, 7, scm_from_off_t_or_off64_t (stat_temp->st_size)); SCM_SIMPLE_VECTOR_SET(ans, 8, scm_from_ulong (stat_temp->st_atime)); SCM_SIMPLE_VECTOR_SET(ans, 9, scm_from_ulong (stat_temp->st_mtime)); SCM_SIMPLE_VECTOR_SET(ans, 10, scm_from_ulong (stat_temp->st_ctime)); @@ -474,7 +501,7 @@ scm_stat2scm (struct stat *stat_temp) SCM_SIMPLE_VECTOR_SET(ans, 11, scm_from_ulong (4096L)); #endif #ifdef HAVE_STRUCT_STAT_ST_BLOCKS - SCM_SIMPLE_VECTOR_SET(ans, 12, scm_from_ulong (stat_temp->st_blocks)); + SCM_SIMPLE_VECTOR_SET(ans, 12, scm_from_blkcnt_t_or_blkcnt64_t (stat_temp->st_blocks)); #else SCM_SIMPLE_VECTOR_SET(ans, 12, SCM_BOOL_F); #endif @@ -626,14 +653,14 @@ SCM_DEFINE (scm_stat, "stat", 1, 0, 0, { int rv; int fdes; - struct stat stat_temp; + struct stat_or_stat64 stat_temp; if (scm_is_integer (object)) { #ifdef __MINGW32__ SCM_SYSCALL (rv = fstat_Win32 (scm_to_int (object), &stat_temp)); #else - SCM_SYSCALL (rv = fstat (scm_to_int (object), &stat_temp)); + SCM_SYSCALL (rv = fstat_or_fstat64 (scm_to_int (object), &stat_temp)); #endif } else if (scm_is_string (object)) @@ -645,7 +672,7 @@ SCM_DEFINE (scm_stat, "stat", 1, 0, 0, while (p > file && (*p == '/' || *p == '\\')) *p-- = '\0'; #endif - SCM_SYSCALL (rv = stat (file, &stat_temp)); + SCM_SYSCALL (rv = stat_or_stat64 (file, &stat_temp)); free (file); } else @@ -656,7 +683,7 @@ SCM_DEFINE (scm_stat, "stat", 1, 0, 0, #ifdef __MINGW32__ SCM_SYSCALL (rv = fstat_Win32 (fdes, &stat_temp)); #else - SCM_SYSCALL (rv = fstat (fdes, &stat_temp)); + SCM_SYSCALL (rv = fstat_or_fstat64 (fdes, &stat_temp)); #endif } @@ -831,8 +858,9 @@ SCM_DEFINE (scm_opendir, "opendir", 1, 0, 0, /* FIXME: The glibc manual has a portability note that readdir_r may not null-terminate its return string. The circumstances outlined for this - are not clear, nor is it clear what should be done about it. Lets worry - about this if/when someone can figure it out. */ + are not clear, nor is it clear what should be done about it. Lets use + NAMLEN and worry about what else should be done if/when someone can + figure it out. */ SCM_DEFINE (scm_readdir, "readdir", 1, 0, 0, (SCM port), @@ -841,35 +869,73 @@ SCM_DEFINE (scm_readdir, "readdir", 1, 0, 0, "end of file object is returned.") #define FUNC_NAME s_scm_readdir { - struct dirent *rdent; + struct dirent_or_dirent64 *rdent; SCM_VALIDATE_DIR (1, port); if (!SCM_DIR_OPEN_P (port)) SCM_MISC_ERROR ("Directory ~S is not open.", scm_list_1 (port)); - errno = 0; - { #if HAVE_READDIR_R - /* On Solaris 2.7, struct dirent only contains "char d_name[1]" and one is - expected to provide a buffer of "sizeof(struct dirent) + NAME_MAX" - bytes. The glibc 2.3.2 manual notes this sort of thing too, and - advises "offsetof(struct dirent,d_name) + NAME_MAX + 1". Either should - suffice, we give both to be certain. */ - union { - struct dirent ent; - char pad1 [sizeof(struct dirent) + NAME_MAX]; - char pad2 [offsetof (struct dirent, d_name) + NAME_MAX + 1]; - } u; - SCM_SYSCALL (readdir_r ((DIR *) SCM_CELL_WORD_1 (port), &u.ent, &rdent)); + /* As noted in the glibc manual, on various systems (such as Solaris) the + d_name[] field is only 1 char and you're expected to size the dirent + buffer for readdir_r based on NAME_MAX. The SCM_MAX expressions below + effectively give either sizeof(d_name) or NAME_MAX+1, whichever is + bigger. + + On solaris 10 there's no NAME_MAX constant, it's necessary to use + pathconf(). We prefer NAME_MAX though, since it should be a constant + and will therefore save a system call. We also prefer it since dirfd() + is not available everywhere. + + An alternative to dirfd() would be to open() the directory and then use + fdopendir(), if the latter is available. That'd let us hold the fd + somewhere in the smob, or just the dirent size calculated once. */ + { + struct dirent_or_dirent64 de; /* just for sizeof */ + DIR *ds = (DIR *) SCM_CELL_WORD_1 (port); + size_t namlen; +#ifdef NAME_MAX + char buf [SCM_MAX (sizeof (de), + sizeof (de) - sizeof (de.d_name) + NAME_MAX + 1)]; #else - SCM_SYSCALL (rdent = readdir ((DIR *) SCM_CELL_WORD_1 (port))); + char *buf; + long name_max = fpathconf (dirfd (ds), _PC_NAME_MAX); + if (name_max == -1) + SCM_SYSERROR; + buf = alloca (SCM_MAX (sizeof (de), + sizeof (de) - sizeof (de.d_name) + name_max + 1)); #endif + + errno = 0; + SCM_SYSCALL (readdir_r_or_readdir64_r (ds, (struct dirent_or_dirent64 *) buf, &rdent)); if (errno != 0) SCM_SYSERROR; + if (! rdent) + return SCM_EOF_VAL; + + namlen = NAMLEN (rdent); return (rdent ? scm_from_locale_stringn (rdent->d_name, NAMLEN (rdent)) : SCM_EOF_VAL); } +#else + { + SCM ret; + scm_dynwind_begin (0); + scm_i_dynwind_pthread_mutex_lock (&scm_i_misc_mutex); + + errno = 0; + SCM_SYSCALL (rdent = readdir_or_readdir64 ((DIR *) SCM_CELL_WORD_1 (port))); + if (errno != 0) + SCM_SYSERROR; + + ret = (rdent ? scm_from_locale_stringn (rdent->d_name, NAMLEN (rdent)) + : SCM_EOF_VAL); + + scm_dynwind_end (); + return ret; + } +#endif } #undef FUNC_NAME @@ -1421,9 +1487,9 @@ SCM_DEFINE (scm_lstat, "lstat", 1, 0, 0, #define FUNC_NAME s_scm_lstat { int rv; - struct stat stat_temp; + struct stat_or_stat64 stat_temp; - STRING_SYSCALL (str, c_str, rv = lstat (c_str, &stat_temp)); + STRING_SYSCALL (str, c_str, rv = lstat_or_lstat64 (c_str, &stat_temp)); if (rv != 0) { int en = errno; @@ -1447,7 +1513,7 @@ SCM_DEFINE (scm_copy_file, "copy-file", 2, 0, 0, int oldfd, newfd; int n, rv; char buf[BUFSIZ]; - struct stat oldstat; + struct stat_or_stat64 oldstat; scm_dynwind_begin (0); @@ -1456,21 +1522,21 @@ SCM_DEFINE (scm_copy_file, "copy-file", 2, 0, 0, c_newfile = scm_to_locale_string (newfile); scm_dynwind_free (c_newfile); - oldfd = open (c_oldfile, O_RDONLY); + oldfd = open_or_open64 (c_oldfile, O_RDONLY); if (oldfd == -1) SCM_SYSERROR; #ifdef __MINGW32__ SCM_SYSCALL (rv = fstat_Win32 (oldfd, &oldstat)); #else - SCM_SYSCALL (rv = fstat (oldfd, &oldstat)); + SCM_SYSCALL (rv = fstat_or_fstat64 (oldfd, &oldstat)); #endif if (rv == -1) goto err_close_oldfd; /* use POSIX flags instead of 07777?. */ - newfd = open (c_newfile, O_WRONLY | O_CREAT | O_TRUNC, - oldstat.st_mode & 07777); + newfd = open_or_open64 (c_newfile, O_WRONLY | O_CREAT | O_TRUNC, + oldstat.st_mode & 07777); if (newfd == -1) { err_close_oldfd: diff --git a/libguile/filesys.h b/libguile/filesys.h index f3f71ba8a..6534da909 100644 --- a/libguile/filesys.h +++ b/libguile/filesys.h @@ -3,7 +3,7 @@ #ifndef SCM_FILESYS_H #define SCM_FILESYS_H -/* Copyright (C) 1995,1997,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1997,1998,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/fluids.c b/libguile/fluids.c index 1e849c057..ce2754822 100644 --- a/libguile/fluids.c +++ b/libguile/fluids.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,2000,2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,2000,2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/fluids.h b/libguile/fluids.h index b1047a204..cabce4617 100644 --- a/libguile/fluids.h +++ b/libguile/fluids.h @@ -3,7 +3,7 @@ #ifndef SCM_FLUIDS_H #define SCM_FLUIDS_H -/* Copyright (C) 1996,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1996,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/fports.c b/libguile/fports.c index 712c2b4d2..7af5f6a27 100644 --- a/libguile/fports.c +++ b/libguile/fports.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -155,7 +155,7 @@ SCM_DEFINE (scm_setvbuf, "setvbuf", 2, 1, 0, } else { - SCM_SET_CELL_WORD_0 (port, SCM_CELL_WORD_0 (port) ^ SCM_BUFLINE); + SCM_SET_CELL_WORD_0 (port, SCM_CELL_WORD_0 (port) & ~(scm_t_bits)SCM_BUFLINE); } if (SCM_UNBNDP (size)) diff --git a/libguile/fports.h b/libguile/fports.h index a155e8bb8..efc315792 100644 --- a/libguile/fports.h +++ b/libguile/fports.h @@ -3,7 +3,7 @@ #ifndef SCM_FPORTS_H #define SCM_FPORTS_H -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/futures.c b/libguile/futures.c index f465cfcfd..5da8dfa06 100644 --- a/libguile/futures.c +++ b/libguile/futures.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/futures.h b/libguile/futures.h index 6b8ee2339..dffb38db8 100644 --- a/libguile/futures.h +++ b/libguile/futures.h @@ -3,7 +3,7 @@ #ifndef SCM_FUTURES_H #define SCM_FUTURES_H -/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gc-card.c b/libguile/gc-card.c index 9fad48416..5477f650c 100644 --- a/libguile/gc-card.c +++ b/libguile/gc-card.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gc-freelist.c b/libguile/gc-freelist.c index 7a144c228..b3b558257 100644 --- a/libguile/gc-freelist.c +++ b/libguile/gc-freelist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gc-malloc.c b/libguile/gc-malloc.c index ccdc58323..4c71be6b7 100644 --- a/libguile/gc-malloc.c +++ b/libguile/gc-malloc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -185,6 +185,16 @@ static void decrease_mtrigger (size_t size, const char * what) { scm_i_pthread_mutex_lock (&scm_i_gc_admin_mutex); + + if (size > scm_mallocated) + { + fprintf (stderr, "`scm_mallocated' underflow. This means that more " + "memory was unregistered\n" + "via `scm_gc_unregister_collectable_memory ()' than " + "registered.\n"); + abort (); + } + scm_mallocated -= size; scm_gc_malloc_collected += size; scm_i_pthread_mutex_unlock (&scm_i_gc_admin_mutex); diff --git a/libguile/gc-segment.c b/libguile/gc-segment.c index 9e3f3f8e3..6e744184d 100644 --- a/libguile/gc-segment.c +++ b/libguile/gc-segment.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gc.c b/libguile/gc.c index 1602be547..30d1cad89 100644 --- a/libguile/gc.c +++ b/libguile/gc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gc.h b/libguile/gc.h index 0142b4448..439cf8a4b 100644 --- a/libguile/gc.h +++ b/libguile/gc.h @@ -3,7 +3,7 @@ #ifndef SCM_GC_H #define SCM_GC_H -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gc_os_dep.c b/libguile/gc_os_dep.c index 481f121a6..a0e60e9d7 100644 --- a/libguile/gc_os_dep.c +++ b/libguile/gc_os_dep.c @@ -3,7 +3,7 @@ * Copyright (c) 1991-1995 by Xerox Corporation. All rights reserved. * Copyright (c) 1996-1999 by Silicon Graphics. All rights reserved. * Copyright (c) 1999 by Hewlett-Packard Company. All rights reserved. - * Copyright (c) 2000, 2001, 2002, 2003, 2004 Free Software Foundation + * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2006 Free Software Foundation * * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED * OR IMPLIED. ANY USE IS AT YOUR OWN RISK. @@ -401,6 +401,7 @@ typedef int GC_bool; void * scm_get_stack_base () { + ABORT ("Can't determine stack base"); return NULL; } diff --git a/libguile/gdb_interface.h b/libguile/gdb_interface.h index 29f5575e7..5be4d0786 100644 --- a/libguile/gdb_interface.h +++ b/libguile/gdb_interface.h @@ -3,7 +3,7 @@ #ifndef GDB_INTERFACE_H #define GDB_INTERFACE_H /* Simple interpreter interface for GDB, the GNU debugger. - Copyright (C) 1996, 2000, 2001 Free Software Foundation + Copyright (C) 1996, 2000, 2001, 2006 Free Software Foundation This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gdbint.h b/libguile/gdbint.h index 59ba5df67..d6511f7ad 100644 --- a/libguile/gdbint.h +++ b/libguile/gdbint.h @@ -3,7 +3,7 @@ #ifndef SCM_GDBINT_H #define SCM_GDBINT_H -/* Copyright (C) 1996,2000 Free Software Foundation, Inc. +/* Copyright (C) 1996,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gettext.h b/libguile/gettext.h index fa3622f56..f54b6bff7 100644 --- a/libguile/gettext.h +++ b/libguile/gettext.h @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU <libintl.h>. - Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000-2002, 2006 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published diff --git a/libguile/gh.h b/libguile/gh.h index e7dd9ea1d..ea5513799 100644 --- a/libguile/gh.h +++ b/libguile/gh.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gh_data.c b/libguile/gh_data.c index d0423f7dd..1ed603375 100644 --- a/libguile/gh_data.c +++ b/libguile/gh_data.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2004, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either diff --git a/libguile/gh_eval.c b/libguile/gh_eval.c index 391ff4d26..7ea7583bb 100644 --- a/libguile/gh_eval.c +++ b/libguile/gh_eval.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998, 2000, 2001, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gh_funcs.c b/libguile/gh_funcs.c index 28e6dc647..ae6ca955f 100644 --- a/libguile/gh_funcs.c +++ b/libguile/gh_funcs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998, 2000, 2001, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gh_init.c b/libguile/gh_init.c index 66cfedc66..d7a2527d8 100644 --- a/libguile/gh_init.c +++ b/libguile/gh_init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gh_io.c b/libguile/gh_io.c index 28864ad15..7cc398e9c 100644 --- a/libguile/gh_io.c +++ b/libguile/gh_io.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gh_list.c b/libguile/gh_list.c index e9f123124..a24d0244f 100644 --- a/libguile/gh_list.c +++ b/libguile/gh_list.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997, 2000, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001, 2004, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gh_predicates.c b/libguile/gh_predicates.c index f36aedf26..78ba41474 100644 --- a/libguile/gh_predicates.c +++ b/libguile/gh_predicates.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/goops.h b/libguile/goops.h index 64da26f37..3fc87886f 100644 --- a/libguile/goops.h +++ b/libguile/goops.h @@ -3,7 +3,7 @@ #ifndef SCM_GOOPS_H #define SCM_GOOPS_H -/* Copyright (C) 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1998,1999,2000,2001,2002,2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gsubr.c b/libguile/gsubr.c index 290fd37dc..c0bdd841e 100644 --- a/libguile/gsubr.c +++ b/libguile/gsubr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/gsubr.h b/libguile/gsubr.h index 43a4968ae..e7488052b 100644 --- a/libguile/gsubr.h +++ b/libguile/gsubr.h @@ -3,7 +3,7 @@ #ifndef SCM_GSUBR_H #define SCM_GSUBR_H -/* Copyright (C) 1995,1996,1998,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/guardians.c b/libguile/guardians.c index f2c7c952e..5a7c76045 100644 --- a/libguile/guardians.c +++ b/libguile/guardians.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1998,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/guardians.h b/libguile/guardians.h index 7f88e587c..735f960f8 100644 --- a/libguile/guardians.h +++ b/libguile/guardians.h @@ -3,7 +3,7 @@ #ifndef SCM_GUARDIANS_H #define SCM_GUARDIANS_H -/* Copyright (C) 1998,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1998,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/guile-doc-snarf.in b/libguile/guile-doc-snarf.in index fd8c00075..49be29185 100755 --- a/libguile/guile-doc-snarf.in +++ b/libguile/guile-doc-snarf.in @@ -1,7 +1,7 @@ #!/bin/sh # Extract the initialization actions for builtin things. # -# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libguile/guile-func-name-check.in b/libguile/guile-func-name-check.in index 034b8df70..7f0114e0b 100644 --- a/libguile/guile-func-name-check.in +++ b/libguile/guile-func-name-check.in @@ -1,6 +1,6 @@ #!/usr/bin/awk -f # -# Copyright (C) 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libguile/guile-snarf-docs.in b/libguile/guile-snarf-docs.in index f010dfb9f..9cba3dc56 100755 --- a/libguile/guile-snarf-docs.in +++ b/libguile/guile-snarf-docs.in @@ -1,7 +1,7 @@ #!/bin/sh # Extract the doc stuff for builtin things. # -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2006 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libguile/guile-snarf.awk.in b/libguile/guile-snarf.awk.in index 509957a0c..be3b1236d 100644 --- a/libguile/guile-snarf.awk.in +++ b/libguile/guile-snarf.awk.in @@ -1,4 +1,4 @@ -# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libguile/guile-snarf.in b/libguile/guile-snarf.in index b568a4423..89ef79092 100644 --- a/libguile/guile-snarf.in +++ b/libguile/guile-snarf.in @@ -1,7 +1,7 @@ #!/bin/sh # Extract the initialization actions from source files. # -# Copyright (C) 1996, 97, 98, 99, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 1996, 97, 98, 99, 2000, 2001, 2002, 2004, 2006 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/libguile/guile.c b/libguile/guile.c index d17fb412e..c294837f1 100644 --- a/libguile/guile.c +++ b/libguile/guile.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/hash.c b/libguile/hash.c index 9b73d2f26..d35224948 100644 --- a/libguile/hash.c +++ b/libguile/hash.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/hash.h b/libguile/hash.h index 55499390c..a2d00c203 100644 --- a/libguile/hash.h +++ b/libguile/hash.h @@ -3,7 +3,7 @@ #ifndef SCM_HASH_H #define SCM_HASH_H -/* Copyright (C) 1995,1996,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/hashtab.c b/libguile/hashtab.c index df7cb0113..2fe09196c 100644 --- a/libguile/hashtab.c +++ b/libguile/hashtab.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/hashtab.h b/libguile/hashtab.h index b4b8ff81c..101735460 100644 --- a/libguile/hashtab.h +++ b/libguile/hashtab.h @@ -3,7 +3,7 @@ #ifndef SCM_HASHTAB_H #define SCM_HASHTAB_H -/* Copyright (C) 1995,1996,1999,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/hooks.c b/libguile/hooks.c index fbaa842d3..0adc019f6 100644 --- a/libguile/hooks.c +++ b/libguile/hooks.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/hooks.h b/libguile/hooks.h index 83ec507d8..e6598cabf 100644 --- a/libguile/hooks.h +++ b/libguile/hooks.h @@ -3,7 +3,7 @@ #ifndef SCM_HOOKS_H #define SCM_HOOKS_H -/* Copyright (C) 1995,1996,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/i18n.c b/libguile/i18n.c index ef5656d23..16e45e495 100644 --- a/libguile/i18n.c +++ b/libguile/i18n.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/i18n.h b/libguile/i18n.h index f7e125510..1f0cb0852 100644 --- a/libguile/i18n.h +++ b/libguile/i18n.h @@ -3,7 +3,7 @@ #ifndef SCM_I18N_H #define SCM_I18N_H -/* Copyright (C) 2004 Free Software Foundation, Inc. +/* Copyright (C) 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/init.c b/libguile/init.c index 6ca30f0b1..44810be4e 100644 --- a/libguile/init.c +++ b/libguile/init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/init.h b/libguile/init.h index 550a1e6db..ec083da52 100644 --- a/libguile/init.h +++ b/libguile/init.h @@ -3,7 +3,7 @@ #ifndef SCM_INIT_H #define SCM_INIT_H -/* Copyright (C) 1995,1996,1997,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/inline.c b/libguile/inline.c index 2917cfeab..802aae57a 100644 --- a/libguile/inline.c +++ b/libguile/inline.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/inline.h b/libguile/inline.h index 5a3300670..0f7f7aa01 100644 --- a/libguile/inline.h +++ b/libguile/inline.h @@ -3,7 +3,7 @@ #ifndef SCM_INLINE_H #define SCM_INLINE_H -/* Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/ioext.c b/libguile/ioext.c index f5940b0f0..fd232e48d 100644 --- a/libguile/ioext.c +++ b/libguile/ioext.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/ioext.h b/libguile/ioext.h index 77b0573d7..7ced2af32 100644 --- a/libguile/ioext.h +++ b/libguile/ioext.h @@ -3,7 +3,7 @@ #ifndef SCM_IOEXT_H #define SCM_IOEXT_H -/* Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/iselect.h b/libguile/iselect.h index 705296590..5a4b30da6 100644 --- a/libguile/iselect.h +++ b/libguile/iselect.h @@ -3,7 +3,7 @@ #ifndef SCM_ISELECT_H #define SCM_ISELECT_H -/* Copyright (C) 1997,1998,2000,2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000,2001, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/keywords.c b/libguile/keywords.c index bb0aaff65..045537a55 100644 --- a/libguile/keywords.c +++ b/libguile/keywords.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/keywords.h b/libguile/keywords.h index bea703c97..d11c0e334 100644 --- a/libguile/keywords.h +++ b/libguile/keywords.h @@ -3,7 +3,7 @@ #ifndef SCM_KEYWORDS_H #define SCM_KEYWORDS_H -/* Copyright (C) 1995,1996,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/lang.c b/libguile/lang.c index 4b8c81bf7..986007309 100644 --- a/libguile/lang.c +++ b/libguile/lang.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/lang.h b/libguile/lang.h index dc6b910a2..886bb34ce 100644 --- a/libguile/lang.h +++ b/libguile/lang.h @@ -3,7 +3,7 @@ #ifndef SCM_LANG_H #define SCM_LANG_H -/* Copyright (C) 1998, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/load.c b/libguile/load.c index 74b4a84dc..3e702c41e 100644 --- a/libguile/load.c +++ b/libguile/load.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/load.h b/libguile/load.h index 5cebbe0e9..9b45d409a 100644 --- a/libguile/load.h +++ b/libguile/load.h @@ -3,7 +3,7 @@ #ifndef SCM_LOAD_H #define SCM_LOAD_H -/* Copyright (C) 1995,1996,1998,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/macros.c b/libguile/macros.c index 25e19c70f..ede875154 100644 --- a/libguile/macros.c +++ b/libguile/macros.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/macros.h b/libguile/macros.h index d9de4d9eb..0ad8757de 100644 --- a/libguile/macros.h +++ b/libguile/macros.h @@ -3,7 +3,7 @@ #ifndef SCM_MACROS_H #define SCM_MACROS_H -/* Copyright (C) 1998,2000,2001,2002,2003 Free Software Foundation, Inc. +/* Copyright (C) 1998,2000,2001,2002,2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/mallocs.c b/libguile/mallocs.c index 236c55154..6a68b96e7 100644 --- a/libguile/mallocs.c +++ b/libguile/mallocs.c @@ -1,5 +1,5 @@ /* classes: src_files - * Copyright (C) 1995,1997,1998,2000,2001 Free Software Foundation, Inc. + * Copyright (C) 1995,1997,1998,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/mallocs.h b/libguile/mallocs.h index 6c4c06078..cae4d1f6b 100644 --- a/libguile/mallocs.h +++ b/libguile/mallocs.h @@ -3,7 +3,7 @@ #ifndef SCM_MALLOCS_H #define SCM_MALLOCS_H -/* Copyright (C) 1995,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/mkstemp.c b/libguile/mkstemp.c index 5c354f3d4..21b745125 100644 --- a/libguile/mkstemp.c +++ b/libguile/mkstemp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1998, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1996, 1998, 2001, 2006 Free Software Foundation, Inc. This file is derived from mkstemps.c from the GNU Libiberty Library which in turn is derived from the GNU C Library. diff --git a/libguile/modules.c b/libguile/modules.c index 086f214a4..10f72da3c 100644 --- a/libguile/modules.c +++ b/libguile/modules.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,2000,2001,2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1998,2000,2001,2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/modules.h b/libguile/modules.h index 5834ba1c1..882deb90c 100644 --- a/libguile/modules.h +++ b/libguile/modules.h @@ -3,7 +3,7 @@ #ifndef SCM_MODULES_H #define SCM_MODULES_H -/* Copyright (C) 1998, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2000, 2001, 2002, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/net_db.c b/libguile/net_db.c index 58d64cd9e..83ee03bc3 100644 --- a/libguile/net_db.c +++ b/libguile/net_db.c @@ -1,5 +1,5 @@ /* "net_db.c" network database support - * Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. + * Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/net_db.h b/libguile/net_db.h index 002ff308c..ae8e8aa11 100644 --- a/libguile/net_db.h +++ b/libguile/net_db.h @@ -3,7 +3,7 @@ #ifndef SCM_NET_DB_H #define SCM_NET_DB_H -/* Copyright (C) 1995,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/null-threads.c b/libguile/null-threads.c index 67a70df11..da762692b 100644 --- a/libguile/null-threads.c +++ b/libguile/null-threads.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/null-threads.h b/libguile/null-threads.h index c4808e082..233b8139d 100644 --- a/libguile/null-threads.h +++ b/libguile/null-threads.h @@ -3,7 +3,7 @@ #ifndef SCM_NULL_THREADS_H #define SCM_NULL_THREADS_H -/* Copyright (C) 2005 Free Software Foundation, Inc. +/* Copyright (C) 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/numbers.c b/libguile/numbers.c index dfa25d176..e07e5ce24 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005, 2006 Free Software Foundation, Inc. * * Portions Copyright 1990, 1991, 1992, 1993 by AT&T Bell Laboratories * and Bellcore. See scm_divide. @@ -2937,7 +2937,8 @@ mem2complex (const char* mem, size_t len, unsigned int idx, enum t_radix {NO_RADIX=0, DUAL=2, OCT=8, DEC=10, HEX=16}; SCM -scm_i_mem2number (const char* mem, size_t len, unsigned int default_radix) +scm_c_locale_stringn_to_number (const char* mem, size_t len, + unsigned int default_radix) { unsigned int idx = 0; unsigned int radix = NO_RADIX; @@ -3043,9 +3044,9 @@ SCM_DEFINE (scm_string_to_number, "string->number", 1, 1, 0, else base = scm_to_unsigned_integer (radix, 2, INT_MAX); - answer = scm_i_mem2number (scm_i_string_chars (string), - scm_i_string_length (string), - base); + answer = scm_c_locale_stringn_to_number (scm_i_string_chars (string), + scm_i_string_length (string), + base); scm_remember_upto_here_1 (string); return answer; } diff --git a/libguile/numbers.h b/libguile/numbers.h index 72caa478b..40b836959 100644 --- a/libguile/numbers.h +++ b/libguile/numbers.h @@ -3,7 +3,7 @@ #ifndef SCM_NUMBERS_H #define SCM_NUMBERS_H -/* Copyright (C) 1995,1996,1998,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001,2002,2003,2004,2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -215,7 +215,8 @@ SCM_API SCM scm_number_to_string (SCM x, SCM radix); SCM_API int scm_print_real (SCM sexp, SCM port, scm_print_state *pstate); SCM_API int scm_print_complex (SCM sexp, SCM port, scm_print_state *pstate); SCM_API int scm_bigprint (SCM exp, SCM port, scm_print_state *pstate); -SCM_API SCM scm_i_mem2number (const char *mem, size_t len, unsigned int radix); +SCM_API SCM scm_c_locale_stringn_to_number (const char *mem, size_t len, + unsigned int radix); SCM_API SCM scm_string_to_number (SCM str, SCM radix); SCM_API SCM scm_bigequal (SCM x, SCM y); SCM_API SCM scm_real_equalp (SCM x, SCM y); diff --git a/libguile/objects.c b/libguile/objects.c index 860500796..649d08fe2 100644 --- a/libguile/objects.c +++ b/libguile/objects.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1999,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/objects.h b/libguile/objects.h index 8cac24c1e..fdd8e2891 100644 --- a/libguile/objects.h +++ b/libguile/objects.h @@ -3,7 +3,7 @@ #ifndef SCM_OBJECTS_H #define SCM_OBJECTS_H -/* Copyright (C) 1996,1999,2000,2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1996,1999,2000,2001, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/objprop.c b/libguile/objprop.c index 470b3d02c..58449b888 100644 --- a/libguile/objprop.c +++ b/libguile/objprop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996, 2000, 2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996, 2000, 2001, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/objprop.h b/libguile/objprop.h index db6b51395..edf2d9573 100644 --- a/libguile/objprop.h +++ b/libguile/objprop.h @@ -3,7 +3,7 @@ #ifndef SCM_OBJPROP_H #define SCM_OBJPROP_H -/* Copyright (C) 1995,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/options.c b/libguile/options.c index 69cdb6b79..47cf60a91 100644 --- a/libguile/options.c +++ b/libguile/options.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,2000,2001 Free Software Foundation +/* Copyright (C) 1995,1996,1998,2000,2001, 2006 Free Software Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/options.h b/libguile/options.h index d6d258d39..650081cd2 100644 --- a/libguile/options.h +++ b/libguile/options.h @@ -3,7 +3,7 @@ #ifndef SCM_OPTIONS_H #define SCM_OPTIONS_H -/* Copyright (C) 1995,1996,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/pairs.c b/libguile/pairs.c index 34387cc89..d6cabded2 100644 --- a/libguile/pairs.c +++ b/libguile/pairs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,2000,2001, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/pairs.h b/libguile/pairs.h index 17256b66c..c30f4c564 100644 --- a/libguile/pairs.h +++ b/libguile/pairs.h @@ -3,7 +3,7 @@ #ifndef SCM_PAIRS_H #define SCM_PAIRS_H -/* Copyright (C) 1995,1996,2000,2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/ports.c b/libguile/ports.c index f582620b6..77b59bedc 100644 --- a/libguile/ports.c +++ b/libguile/ports.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,6 +19,8 @@ /* Headers. */ +#define _LARGEFILE64_SOURCE /* ask for stat64 etc */ + #if HAVE_CONFIG_H # include <config.h> #endif @@ -1429,9 +1431,12 @@ SCM_DEFINE (scm_truncate_file, "truncate-file", 1, 1, 0, #define FUNC_NAME s_scm_truncate_file { int rv; - off_t c_length; - /* object can be a port, fdes or filename. */ + /* "object" can be a port, fdes or filename. + + Negative "length" makes no sense, but it's left to truncate() or + ftruncate() to give back an error for that (normally EINVAL). + */ if (SCM_UNBNDP (length)) { @@ -1441,15 +1446,16 @@ SCM_DEFINE (scm_truncate_file, "truncate-file", 1, 1, 0, length = scm_seek (object, SCM_INUM0, scm_from_int (SEEK_CUR)); } - c_length = scm_to_size_t (length); object = SCM_COERCE_OUTPORT (object); if (scm_is_integer (object)) { + off_t c_length = scm_to_off_t (length); SCM_SYSCALL (rv = ftruncate (scm_to_int (object), c_length)); } else if (SCM_OPOUTPORTP (object)) { + off_t c_length = scm_to_off_t (length); scm_t_port *pt = SCM_PTAB_ENTRY (object); scm_t_ptob_descriptor *ptob = scm_ptobs + SCM_PTOBNUM (object); @@ -1465,9 +1471,10 @@ SCM_DEFINE (scm_truncate_file, "truncate-file", 1, 1, 0, } else { + off_t_or_off64_t c_length = scm_to_off_t_or_off64_t (length); char *str = scm_to_locale_string (object); int eno; - SCM_SYSCALL (rv = truncate (str, c_length)); + SCM_SYSCALL (rv = truncate_or_truncate64 (str, c_length)); eno = errno; free (str); errno = eno; diff --git a/libguile/ports.h b/libguile/ports.h index c8e89950e..8332107ca 100644 --- a/libguile/ports.h +++ b/libguile/ports.h @@ -3,7 +3,7 @@ #ifndef SCM_PORTS_H #define SCM_PORTS_H -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/posix.c b/libguile/posix.c index 982815049..5715a327d 100644 --- a/libguile/posix.c +++ b/libguile/posix.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1877,7 +1877,7 @@ SCM_DEFINE (scm_gethostname, "gethostname", 0, 0, 0, { const int save_errno = errno; - // No guile exceptions can occur before we have freed p's memory. + /* No guile exceptions can occur before we have freed p's memory. */ scm_dynwind_end (); free (p); @@ -1889,7 +1889,7 @@ SCM_DEFINE (scm_gethostname, "gethostname", 0, 0, 0, /* scm_from_locale_string may throw an exception. */ const SCM name = scm_from_locale_string (p); - // No guile exceptions can occur before we have freed p's memory. + /* No guile exceptions can occur before we have freed p's memory. */ scm_dynwind_end (); free (p); diff --git a/libguile/posix.h b/libguile/posix.h index 35e5edfac..3bef9f96d 100644 --- a/libguile/posix.h +++ b/libguile/posix.h @@ -3,7 +3,7 @@ #ifndef SCM_POSIX_H #define SCM_POSIX_H -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/print.c b/libguile/print.c index cdeb0c41d..efd51ce06 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999,2000,2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999,2000,2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -327,7 +327,7 @@ scm_print_symbol_name (const char *str, size_t len, SCM port) if (len == 0 || str[0] == '\'' || str[0] == '`' || str[0] == ',' || quote_keywordish_symbol (str, len) || (str[0] == '.' && len == 1) - || scm_is_true (scm_i_mem2number(str, len, 10))) + || scm_is_true (scm_c_locale_stringn_to_number (str, len, 10))) { scm_lfwrite ("#{", 2, port); weird = 1; diff --git a/libguile/print.h b/libguile/print.h index 9f7836554..7e59ba8b3 100644 --- a/libguile/print.h +++ b/libguile/print.h @@ -3,7 +3,7 @@ #ifndef SCM_PRINT_H #define SCM_PRINT_H -/* Copyright (C) 1995,1996,1998,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/procprop.c b/libguile/procprop.c index 50f6fa32a..cfa8abe30 100644 --- a/libguile/procprop.c +++ b/libguile/procprop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,2000,2001,2003,2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001,2003,2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/procprop.h b/libguile/procprop.h index d1986c6d0..dffdfd7bc 100644 --- a/libguile/procprop.h +++ b/libguile/procprop.h @@ -3,7 +3,7 @@ #ifndef SCM_PROCPROP_H #define SCM_PROCPROP_H -/* Copyright (C) 1995,1996,1998,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/procs.c b/libguile/procs.c index 3b447ff90..2359eae1f 100644 --- a/libguile/procs.c +++ b/libguile/procs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/procs.h b/libguile/procs.h index b38bef176..060c8ee42 100644 --- a/libguile/procs.h +++ b/libguile/procs.h @@ -3,7 +3,7 @@ #ifndef SCM_PROCS_H #define SCM_PROCS_H -/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/properties.c b/libguile/properties.c index 803f5050a..680b66946 100644 --- a/libguile/properties.c +++ b/libguile/properties.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,2000,2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/properties.h b/libguile/properties.h index 78de9cfde..3f8cb6d75 100644 --- a/libguile/properties.h +++ b/libguile/properties.h @@ -3,7 +3,7 @@ #ifndef SCM_PROPERTIES_H #define SCM_PROPERTIES_H -/* Copyright (C) 1995,1996,1998,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/pthread-threads.h b/libguile/pthread-threads.h index cc4c6179f..06e735f75 100644 --- a/libguile/pthread-threads.h +++ b/libguile/pthread-threads.h @@ -3,7 +3,7 @@ #ifndef SCM_PTHREADS_THREADS_H #define SCM_PTHREADS_THREADS_H -/* Copyright (C) 2002, 2005 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/putenv.c b/libguile/putenv.c index 96cee50da..b43765f6e 100644 --- a/libguile/putenv.c +++ b/libguile/putenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 2000, 2001, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1991, 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/ramap.c b/libguile/ramap.c index 99a6f93a9..25d8b2722 100644 --- a/libguile/ramap.c +++ b/libguile/ramap.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1998,2000,2001,2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1996,1998,2000,2001,2004,2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/ramap.h b/libguile/ramap.h index fb8540e92..8383649c9 100644 --- a/libguile/ramap.h +++ b/libguile/ramap.h @@ -3,7 +3,7 @@ #ifndef SCM_RAMAP_H #define SCM_RAMAP_H -/* Copyright (C) 1995,1996,1997,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/random.c b/libguile/random.c index 7c23999db..912f6acc5 100644 --- a/libguile/random.c +++ b/libguile/random.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999,2000,2001, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1999,2000,2001, 2003, 2005, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either diff --git a/libguile/random.h b/libguile/random.h index a7a1bc970..6ec43ff53 100644 --- a/libguile/random.h +++ b/libguile/random.h @@ -3,7 +3,7 @@ #ifndef SCM_RANDOM_H #define SCM_RANDOM_H -/* Copyright (C) 1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/rdelim.c b/libguile/rdelim.c index 002c93044..2ce1803c8 100644 --- a/libguile/rdelim.c +++ b/libguile/rdelim.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/rdelim.h b/libguile/rdelim.h index c5116760d..b211bb208 100644 --- a/libguile/rdelim.h +++ b/libguile/rdelim.h @@ -3,7 +3,7 @@ #ifndef SCM_RDELIM_H #define SCM_RDELIM_H -/* Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/read.c b/libguile/read.c index fa0fd7133..0714e3f84 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1999,2000,2001,2003, 2004 Free Software +/* Copyright (C) 1995,1996,1997,1999,2000,2001,2003, 2004, 2006 Free Software * Foundation, Inc. * * This library is free software; you can redistribute it and/or @@ -506,7 +506,8 @@ scm_lreadr (SCM *tok_buf, SCM port, SCM *copy) * does only consist of octal digits. Finally, it should be * checked whether the resulting fixnum is in the range of * characters. */ - p = scm_i_mem2number (scm_i_string_chars (*tok_buf), j, 8); + p = scm_c_locale_stringn_to_number (scm_i_string_chars (*tok_buf), + j, 8); if (SCM_I_INUMP (p)) return SCM_MAKE_CHAR (SCM_I_INUM (p)); } @@ -644,7 +645,7 @@ scm_lreadr (SCM *tok_buf, SCM port, SCM *copy) /* Shortcut: Detected symbol '+ or '- */ goto tok; - p = scm_i_mem2number (scm_i_string_chars (*tok_buf), j, 10); + p = scm_c_locale_stringn_to_number (scm_i_string_chars (*tok_buf), j, 10); if (scm_is_true (p)) return p; if (c == '#') diff --git a/libguile/read.h b/libguile/read.h index 1e41616d5..4bfa59eb0 100644 --- a/libguile/read.h +++ b/libguile/read.h @@ -3,7 +3,7 @@ #ifndef SCM_READ_H #define SCM_READ_H -/* Copyright (C) 1995,1996,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/regex-posix.c b/libguile/regex-posix.c index 31f8c1d28..fcef50006 100644 --- a/libguile/regex-posix.c +++ b/libguile/regex-posix.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/regex-posix.h b/libguile/regex-posix.h index 19fdbba2b..c3821362a 100644 --- a/libguile/regex-posix.h +++ b/libguile/regex-posix.h @@ -3,7 +3,7 @@ #ifndef SCM_REGEX_POSIX_H #define SCM_REGEX_POSIX_H -/* Copyright (C) 1997,1998,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/root.c b/libguile/root.c index 7b1e5e43c..43118b203 100644 --- a/libguile/root.c +++ b/libguile/root.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000, 2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000, 2001, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/root.h b/libguile/root.h index 91264063f..6c7800f5f 100644 --- a/libguile/root.h +++ b/libguile/root.h @@ -3,7 +3,7 @@ #ifndef SCM_ROOT_H #define SCM_ROOT_H -/* Copyright (C) 1996,1998,2000,2001, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1996,1998,2000,2001, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/rw.c b/libguile/rw.c index 78d822766..660ea2c6d 100644 --- a/libguile/rw.c +++ b/libguile/rw.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/rw.h b/libguile/rw.h index 3da5ec983..108104c33 100644 --- a/libguile/rw.h +++ b/libguile/rw.h @@ -3,7 +3,7 @@ #ifndef SCM_RW_H #define SCM_RW_H -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/scmconfig.h.top b/libguile/scmconfig.h.top index 1f6ef7d04..dfc7ba99c 100644 --- a/libguile/scmconfig.h.top +++ b/libguile/scmconfig.h.top @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index 3e7c3e12f..3452f911c 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/scmsigs.h b/libguile/scmsigs.h index ce124260d..54742de14 100644 --- a/libguile/scmsigs.h +++ b/libguile/scmsigs.h @@ -3,7 +3,7 @@ #ifndef SCM_SCMSIGS_H #define SCM_SCMSIGS_H -/* Copyright (C) 1995,1996,1997,1998,2000, 2002 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000, 2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/script.c b/libguile/script.c index 4a50ee233..33fcbc130 100644 --- a/libguile/script.c +++ b/libguile/script.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either @@ -633,7 +633,7 @@ scm_compile_shell_switches (int argc, char **argv) { /* Print version number. */ printf ("Guile %s\n" - "Copyright (c) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation\n" + "Copyright (c) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation\n" "Guile may be distributed under the terms of the GNU General Public Licence;\n" "certain other uses are permitted as well. For details, see the file\n" "`COPYING', which is included in the Guile distribution.\n" diff --git a/libguile/script.h b/libguile/script.h index d2cf6d6e4..37ebddebc 100644 --- a/libguile/script.h +++ b/libguile/script.h @@ -3,7 +3,7 @@ #ifndef SCM_SCRIPT_H #define SCM_SCRIPT_H -/* Copyright (C) 1997,1998,2000 Free Software Foundation, Inc. +/* Copyright (C) 1997,1998,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/simpos.h b/libguile/simpos.h index bccc163f1..c7f40b62a 100644 --- a/libguile/simpos.h +++ b/libguile/simpos.h @@ -3,7 +3,7 @@ #ifndef SCM_SIMPOS_H #define SCM_SIMPOS_H -/* Copyright (C) 1995,1996,1997,1998,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/smob.c b/libguile/smob.c index 13ed0f9da..a728cc78b 100644 --- a/libguile/smob.c +++ b/libguile/smob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/smob.h b/libguile/smob.h index 15099fd7b..a4d70c8be 100644 --- a/libguile/smob.h +++ b/libguile/smob.h @@ -3,7 +3,7 @@ #ifndef SCM_SMOB_H #define SCM_SMOB_H -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/snarf.h b/libguile/snarf.h index 34b350c23..5c2f18774 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -3,7 +3,7 @@ #ifndef SCM_SNARF_H #define SCM_SNARF_H -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/socket.c b/libguile/socket.c index e15806fc2..a9b7ed8ca 100644 --- a/libguile/socket.c +++ b/libguile/socket.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,2000,2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,2000,2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/socket.h b/libguile/socket.h index 137e669cc..146d283dc 100644 --- a/libguile/socket.h +++ b/libguile/socket.h @@ -3,7 +3,7 @@ #ifndef SCM_SOCKET_H #define SCM_SOCKET_H -/* Copyright (C) 1995,1996,1997,2000,2001, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,2000,2001, 2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/sort.c b/libguile/sort.c index 5a7f75080..ff33e1ee8 100644 --- a/libguile/sort.c +++ b/libguile/sort.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1999,2000,2001,2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999,2000,2001,2002, 2004, 2006 Free Software Foundation, Inc. * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either diff --git a/libguile/sort.h b/libguile/sort.h index ba3253145..b8bf4ce57 100644 --- a/libguile/sort.h +++ b/libguile/sort.h @@ -3,7 +3,7 @@ #ifndef SCM_SORT_H #define SCM_SORT_H -/* Copyright (C) 1999,2000 Free Software Foundation, Inc. +/* Copyright (C) 1999,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/srcprop.c b/libguile/srcprop.c index f8e0dc60f..e1b86738c 100644 --- a/libguile/srcprop.c +++ b/libguile/srcprop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002 Free Software Foundation +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001,2002, 2006 Free Software Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/srcprop.h b/libguile/srcprop.h index f35012b0b..c0e42778e 100644 --- a/libguile/srcprop.h +++ b/libguile/srcprop.h @@ -3,7 +3,7 @@ #ifndef SCM_SRCPROP_H #define SCM_SRCPROP_H -/* Copyright (C) 1995,1996,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/srfi-13.c b/libguile/srfi-13.c index 4887b4b1f..b3cb1bfdd 100644 --- a/libguile/srfi-13.c +++ b/libguile/srfi-13.c @@ -1,6 +1,6 @@ /* srfi-13.c --- SRFI-13 procedures for Guile * - * Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -42,6 +42,18 @@ start, &c_start, end, &c_end); \ } while (0) +/* Expecting "unsigned char *c_str" */ +#define MY_VALIDATE_SUBSTRING_SPEC_UCOPY(pos_str, str, c_str, \ + pos_start, start, c_start, \ + pos_end, end, c_end) \ + do { \ + const char *signed_c_str; \ + MY_VALIDATE_SUBSTRING_SPEC_COPY(pos_str, str, signed_c_str, \ + pos_start, start, c_start, \ + pos_end, end, c_end); \ + c_str = (unsigned char *) signed_c_str; \ + } while (0) + #define MY_VALIDATE_SUBSTRING_SPEC(pos_str, str, \ pos_start, start, c_start, \ pos_end, end, c_end) \ @@ -994,16 +1006,16 @@ SCM_DEFINE (scm_string_compare, "string-compare", 5, 4, 0, "@var{i} is the first position that does not match.") #define FUNC_NAME s_scm_string_compare { - const char *cstr1, *cstr2; + const unsigned char *cstr1, *cstr2; size_t cstart1, cend1, cstart2, cend2; SCM proc; - MY_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1, - 6, start1, cstart1, - 7, end1, cend1); - MY_VALIDATE_SUBSTRING_SPEC_COPY (2, s2, cstr2, - 8, start2, cstart2, - 9, end2, cend2); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (1, s1, cstr1, + 6, start1, cstart1, + 7, end1, cend1); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (2, s2, cstr2, + 8, start2, cstart2, + 9, end2, cend2); SCM_VALIDATE_PROC (3, proc_lt); SCM_VALIDATE_PROC (4, proc_eq); SCM_VALIDATE_PROC (5, proc_gt); @@ -1048,16 +1060,16 @@ SCM_DEFINE (scm_string_compare_ci, "string-compare-ci", 5, 4, 0, "character comparison is done case-insensitively.") #define FUNC_NAME s_scm_string_compare_ci { - const char *cstr1, *cstr2; + const unsigned char *cstr1, *cstr2; size_t cstart1, cend1, cstart2, cend2; SCM proc; - MY_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1, - 6, start1, cstart1, - 7, end1, cend1); - MY_VALIDATE_SUBSTRING_SPEC_COPY (2, s2, cstr2, - 8, start2, cstart2, - 9, end2, cend2); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (1, s1, cstr1, + 6, start1, cstart1, + 7, end1, cend1); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (2, s2, cstr2, + 8, start2, cstart2, + 9, end2, cend2); SCM_VALIDATE_PROC (3, proc_lt); SCM_VALIDATE_PROC (4, proc_eq); SCM_VALIDATE_PROC (5, proc_gt); @@ -1181,15 +1193,15 @@ SCM_DEFINE (scm_string_lt, "string<", 2, 4, 0, "true value otherwise.") #define FUNC_NAME s_scm_string_lt { - const char *cstr1, *cstr2; + const unsigned char *cstr1, *cstr2; size_t cstart1, cend1, cstart2, cend2; - MY_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1, - 3, start1, cstart1, - 4, end1, cend1); - MY_VALIDATE_SUBSTRING_SPEC_COPY (2, s2, cstr2, - 5, start2, cstart2, - 6, end2, cend2); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (1, s1, cstr1, + 3, start1, cstart1, + 4, end1, cend1); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (2, s2, cstr2, + 5, start2, cstart2, + 6, end2, cend2); while (cstart1 < cend1 && cstart2 < cend2) { @@ -1224,15 +1236,15 @@ SCM_DEFINE (scm_string_gt, "string>", 2, 4, 0, "true value otherwise.") #define FUNC_NAME s_scm_string_gt { - const char *cstr1, *cstr2; + const unsigned char *cstr1, *cstr2; size_t cstart1, cend1, cstart2, cend2; - MY_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1, - 3, start1, cstart1, - 4, end1, cend1); - MY_VALIDATE_SUBSTRING_SPEC_COPY (2, s2, cstr2, - 5, start2, cstart2, - 6, end2, cend2); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (1, s1, cstr1, + 3, start1, cstart1, + 4, end1, cend1); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (2, s2, cstr2, + 5, start2, cstart2, + 6, end2, cend2); while (cstart1 < cend1 && cstart2 < cend2) { @@ -1267,15 +1279,15 @@ SCM_DEFINE (scm_string_le, "string<=", 2, 4, 0, "value otherwise.") #define FUNC_NAME s_scm_string_le { - const char *cstr1, *cstr2; + const unsigned char *cstr1, *cstr2; size_t cstart1, cend1, cstart2, cend2; - MY_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1, - 3, start1, cstart1, - 4, end1, cend1); - MY_VALIDATE_SUBSTRING_SPEC_COPY (2, s2, cstr2, - 5, start2, cstart2, - 6, end2, cend2); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (1, s1, cstr1, + 3, start1, cstart1, + 4, end1, cend1); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (2, s2, cstr2, + 5, start2, cstart2, + 6, end2, cend2); while (cstart1 < cend1 && cstart2 < cend2) { @@ -1310,15 +1322,15 @@ SCM_DEFINE (scm_string_ge, "string>=", 2, 4, 0, "otherwise.") #define FUNC_NAME s_scm_string_ge { - const char *cstr1, *cstr2; + const unsigned char *cstr1, *cstr2; size_t cstart1, cend1, cstart2, cend2; - MY_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1, - 3, start1, cstart1, - 4, end1, cend1); - MY_VALIDATE_SUBSTRING_SPEC_COPY (2, s2, cstr2, - 5, start2, cstart2, - 6, end2, cend2); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (1, s1, cstr1, + 3, start1, cstart1, + 4, end1, cend1); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (2, s2, cstr2, + 5, start2, cstart2, + 6, end2, cend2); while (cstart1 < cend1 && cstart2 < cend2) { @@ -1442,15 +1454,15 @@ SCM_DEFINE (scm_string_ci_lt, "string-ci<", 2, 4, 0, "case-insensitively.") #define FUNC_NAME s_scm_string_ci_lt { - const char *cstr1, *cstr2; + const unsigned char *cstr1, *cstr2; size_t cstart1, cend1, cstart2, cend2; - MY_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1, - 3, start1, cstart1, - 4, end1, cend1); - MY_VALIDATE_SUBSTRING_SPEC_COPY (2, s2, cstr2, - 5, start2, cstart2, - 6, end2, cend2); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (1, s1, cstr1, + 3, start1, cstart1, + 4, end1, cend1); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (2, s2, cstr2, + 5, start2, cstart2, + 6, end2, cend2); while (cstart1 < cend1 && cstart2 < cend2) { @@ -1486,15 +1498,15 @@ SCM_DEFINE (scm_string_ci_gt, "string-ci>", 2, 4, 0, "case-insensitively.") #define FUNC_NAME s_scm_string_ci_gt { - const char *cstr1, *cstr2; + const unsigned char *cstr1, *cstr2; size_t cstart1, cend1, cstart2, cend2; - MY_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1, - 3, start1, cstart1, - 4, end1, cend1); - MY_VALIDATE_SUBSTRING_SPEC_COPY (2, s2, cstr2, - 5, start2, cstart2, - 6, end2, cend2); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (1, s1, cstr1, + 3, start1, cstart1, + 4, end1, cend1); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (2, s2, cstr2, + 5, start2, cstart2, + 6, end2, cend2); while (cstart1 < cend1 && cstart2 < cend2) { @@ -1530,15 +1542,15 @@ SCM_DEFINE (scm_string_ci_le, "string-ci<=", 2, 4, 0, "case-insensitively.") #define FUNC_NAME s_scm_string_ci_le { - const char *cstr1, *cstr2; + const unsigned char *cstr1, *cstr2; size_t cstart1, cend1, cstart2, cend2; - MY_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1, - 3, start1, cstart1, - 4, end1, cend1); - MY_VALIDATE_SUBSTRING_SPEC_COPY (2, s2, cstr2, - 5, start2, cstart2, - 6, end2, cend2); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (1, s1, cstr1, + 3, start1, cstart1, + 4, end1, cend1); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (2, s2, cstr2, + 5, start2, cstart2, + 6, end2, cend2); while (cstart1 < cend1 && cstart2 < cend2) { @@ -1574,15 +1586,15 @@ SCM_DEFINE (scm_string_ci_ge, "string-ci>=", 2, 4, 0, "case-insensitively.") #define FUNC_NAME s_scm_string_ci_ge { - const char *cstr1, *cstr2; + const unsigned char *cstr1, *cstr2; size_t cstart1, cend1, cstart2, cend2; - MY_VALIDATE_SUBSTRING_SPEC_COPY (1, s1, cstr1, - 3, start1, cstart1, - 4, end1, cend1); - MY_VALIDATE_SUBSTRING_SPEC_COPY (2, s2, cstr2, - 5, start2, cstart2, - 6, end2, cend2); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (1, s1, cstr1, + 3, start1, cstart1, + 4, end1, cend1); + MY_VALIDATE_SUBSTRING_SPEC_UCOPY (2, s2, cstr2, + 5, start2, cstart2, + 6, end2, cend2); while (cstart1 < cend1 && cstart2 < cend2) { diff --git a/libguile/srfi-13.h b/libguile/srfi-13.h index 6c16c68a3..833586adc 100644 --- a/libguile/srfi-13.h +++ b/libguile/srfi-13.h @@ -3,7 +3,7 @@ /* srfi-13.c --- SRFI-13 procedures for Guile * - * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/srfi-14.c b/libguile/srfi-14.c index d7dc15be5..7900d26f2 100644 --- a/libguile/srfi-14.c +++ b/libguile/srfi-14.c @@ -1,6 +1,6 @@ /* srfi-14.c --- SRFI-14 procedures for Guile * - * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/srfi-14.h b/libguile/srfi-14.h index 328759db4..3278b928e 100644 --- a/libguile/srfi-14.h +++ b/libguile/srfi-14.h @@ -3,7 +3,7 @@ /* srfi-14.c --- SRFI-14 procedures for Guile * - * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/srfi-4.c b/libguile/srfi-4.c index 544800bb8..fc5da1513 100644 --- a/libguile/srfi-4.c +++ b/libguile/srfi-4.c @@ -1,6 +1,6 @@ /* srfi-4.c --- Uniform numeric vector datatypes. * - * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -850,7 +850,7 @@ SCM_DEFINE (scm_uniform_vector_read_x, "uniform-vector-read!", 1, 3, 0, ssize_t inc; size_t cstart, cend; size_t remaining, off; - void *base; + char *base; if (SCM_UNBNDP (port_or_fd)) port_or_fd = scm_current_input_port (); @@ -963,7 +963,7 @@ SCM_DEFINE (scm_uniform_vector_write, "uniform-vector-write", 1, 3, 0, ssize_t inc; size_t cstart, cend; size_t amount, off; - const void *base; + const char *base; port_or_fd = SCM_COERCE_OUTPORT (port_or_fd); diff --git a/libguile/srfi-4.h b/libguile/srfi-4.h index 997aad375..7abbac8a4 100644 --- a/libguile/srfi-4.h +++ b/libguile/srfi-4.h @@ -2,7 +2,7 @@ #define SCM_SRFI_4_H /* srfi-4.c --- Homogeneous numeric vector datatypes. * - * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/stackchk.c b/libguile/stackchk.c index a7c3abe69..ee1fa859f 100644 --- a/libguile/stackchk.c +++ b/libguile/stackchk.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997, 2000, 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/stackchk.h b/libguile/stackchk.h index 273ae886d..9a5c59f71 100644 --- a/libguile/stackchk.h +++ b/libguile/stackchk.h @@ -3,7 +3,7 @@ #ifndef SCM_STACKCHK_H #define SCM_STACKCHK_H -/* Copyright (C) 1995,1996,1998,2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/stacks.c b/libguile/stacks.c index 77da146b4..9457ccc13 100644 --- a/libguile/stacks.c +++ b/libguile/stacks.c @@ -1,5 +1,5 @@ /* Representation of stack frame debug information - * Copyright (C) 1996,1997,2000,2001 Free Software Foundation + * Copyright (C) 1996,1997,2000,2001, 2006 Free Software Foundation * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/stacks.h b/libguile/stacks.h index 4f602a747..e44bb1cdf 100644 --- a/libguile/stacks.h +++ b/libguile/stacks.h @@ -3,7 +3,7 @@ #ifndef SCM_STACKS_H #define SCM_STACKS_H -/* Copyright (C) 1995,1996,2000,2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/stime.c b/libguile/stime.c index c6ed7c2eb..37d2290cf 100644 --- a/libguile/stime.c +++ b/libguile/stime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/stime.h b/libguile/stime.h index 21d49cd75..52acc2f80 100644 --- a/libguile/stime.h +++ b/libguile/stime.h @@ -3,7 +3,7 @@ #ifndef SCM_STIME_H #define SCM_STIME_H -/* Copyright (C) 1995,1996,1997,1998,2000, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/strerror.c b/libguile/strerror.c index f646dfaef..c2f20f0c2 100644 --- a/libguile/strerror.c +++ b/libguile/strerror.c @@ -1,5 +1,5 @@ /* Turning errno values into English error messages. - Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 2000, 2001 Free Software Foundation, Inc. + Copyright (C) 1985, 86, 87, 88, 93, 94, 95, 2000, 2001, 2006 Free Software Foundation, Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public diff --git a/libguile/strings.c b/libguile/strings.c index 49a92542d..1f3094dc6 100644 --- a/libguile/strings.c +++ b/libguile/strings.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,2000,2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -122,12 +122,12 @@ make_stringbuf (size_t len) } } -/* Return a new stringbuf whose underlying storage consists of the LEN octets - pointed to by STR. */ +/* Return a new stringbuf whose underlying storage consists of the LEN+1 + octets pointed to by STR (the last octet is zero). */ SCM_C_INLINE SCM scm_i_take_stringbufn (char *str, size_t len) { - scm_gc_register_collectable_memory (str, len, "stringbuf"); + scm_gc_register_collectable_memory (str, len + 1, "stringbuf"); return scm_double_cell (STRINGBUF_TAG, (scm_t_bits) str, (scm_t_bits) len, (scm_t_bits) 0); diff --git a/libguile/strings.h b/libguile/strings.h index a8a7af670..f96457eb9 100644 --- a/libguile/strings.h +++ b/libguile/strings.h @@ -3,7 +3,7 @@ #ifndef SCM_STRINGS_H #define SCM_STRINGS_H -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/strorder.c b/libguile/strorder.c index 124887b4a..9947c4560 100644 --- a/libguile/strorder.c +++ b/libguile/strorder.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1999, 2000, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1999, 2000, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/strorder.h b/libguile/strorder.h index 634c3f93e..51168e05f 100644 --- a/libguile/strorder.h +++ b/libguile/strorder.h @@ -3,7 +3,7 @@ #ifndef SCM_STRORDER_H #define SCM_STRORDER_H -/* Copyright (C) 1995,1996,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/strports.c b/libguile/strports.c index 6f3efe125..8659ccf91 100644 --- a/libguile/strports.c +++ b/libguile/strports.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001,2002, 2003, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/strports.h b/libguile/strports.h index dfd7c064c..2ca5fb572 100644 --- a/libguile/strports.h +++ b/libguile/strports.h @@ -3,7 +3,7 @@ #ifndef SCM_STRPORTS_H #define SCM_STRPORTS_H -/* Copyright (C) 1995,1996,2000,2001,2002 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001,2002, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/struct.c b/libguile/struct.c index 46b3bf830..033e1d037 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/struct.h b/libguile/struct.h index b53690e4e..a7c778275 100644 --- a/libguile/struct.h +++ b/libguile/struct.h @@ -3,7 +3,7 @@ #ifndef SCM_STRUCT_H #define SCM_STRUCT_H -/* Copyright (C) 1995,1997,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1997,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/symbols.c b/libguile/symbols.c index 314dcb79e..c8b901706 100644 --- a/libguile/symbols.c +++ b/libguile/symbols.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/symbols.h b/libguile/symbols.h index 35b327f08..f70d65578 100644 --- a/libguile/symbols.h +++ b/libguile/symbols.h @@ -3,7 +3,7 @@ #ifndef SCM_SYMBOLS_H #define SCM_SYMBOLS_H -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/threads.c b/libguile/threads.c index 7d5aa8aa0..20b8e38c9 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -41,6 +41,7 @@ #include "libguile/iselect.h" #include "libguile/fluids.h" #include "libguile/continuations.h" +#include "libguile/gc.h" #include "libguile/init.h" #ifdef __MINGW32__ @@ -564,10 +565,6 @@ scm_i_init_thread_for_guile (SCM_STACKITEM *base, SCM parent) } } -#ifdef HAVE_LIBC_STACK_END - -extern void *__libc_stack_end; - #if SCM_USE_PTHREAD_THREADS #ifdef HAVE_PTHREAD_ATTR_GETSTACK @@ -580,18 +577,20 @@ get_thread_stack_base () void *start, *end; size_t size; - /* XXX - pthread_getattr_np from LinuxThreads does not seem to work - for the main thread, but we can use __libc_stack_end in that - case. - */ - pthread_getattr_np (pthread_self (), &attr); pthread_attr_getstack (&attr, &start, &size); end = (char *)start + size; + /* XXX - pthread_getattr_np from LinuxThreads does not seem to work + for the main thread, but we can use scm_get_stack_base in that + case. + */ + +#ifndef PTHREAD_ATTR_GETSTACK_WORKS if ((void *)&attr < start || (void *)&attr >= end) - return __libc_stack_end; + return scm_get_stack_base (); else +#endif { #if SCM_STACK_GROWS_UP return start; @@ -610,11 +609,10 @@ get_thread_stack_base () static SCM_STACKITEM * get_thread_stack_base () { - return __libc_stack_end; + return scm_get_stack_base (); } #endif /* !SCM_USE_PTHREAD_THREADS */ -#endif /* HAVE_LIBC_STACK_END */ #ifdef HAVE_GET_THREAD_STACK_BASE @@ -1397,7 +1395,7 @@ scm_pthread_mutex_lock (scm_i_pthread_mutex_t *mutex) } static void -unlock (void *data) +do_unlock (void *data) { scm_i_pthread_mutex_unlock ((scm_i_pthread_mutex_t *)data); } @@ -1406,7 +1404,7 @@ void scm_dynwind_pthread_mutex_lock (scm_i_pthread_mutex_t *mutex) { scm_i_scm_pthread_mutex_lock (mutex); - scm_dynwind_unwind_handler (unlock, mutex, SCM_F_WIND_EXPLICITLY); + scm_dynwind_unwind_handler (do_unlock, mutex, SCM_F_WIND_EXPLICITLY); } int diff --git a/libguile/threads.h b/libguile/threads.h index 3b999ce01..09939b0a4 100644 --- a/libguile/threads.h +++ b/libguile/threads.h @@ -3,7 +3,7 @@ #ifndef SCM_THREADS_H #define SCM_THREADS_H -/* Copyright (C) 1996,1997,1998,2000,2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996,1997,1998,2000,2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/throw.c b/libguile/throw.c index 76cafddd9..e2b9526c7 100644 --- a/libguile/throw.c +++ b/libguile/throw.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2003, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/throw.h b/libguile/throw.h index 53a43cf7e..84b0aa9e4 100644 --- a/libguile/throw.h +++ b/libguile/throw.h @@ -3,7 +3,7 @@ #ifndef SCM_THROW_H #define SCM_THROW_H -/* Copyright (C) 1995,1996,1998,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/unif.c b/libguile/unif.c index 14438b5f6..7f01f62dd 100644 --- a/libguile/unif.c +++ b/libguile/unif.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001,2002,2003,2004, 2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -368,9 +368,9 @@ string_set (scm_t_array_handle *h, ssize_t pos, SCM val) { pos += h->base; if (SCM_I_ARRAYP (h->array)) - return scm_c_string_set_x (SCM_I_ARRAY_V (h->array), pos, val); + scm_c_string_set_x (SCM_I_ARRAY_V (h->array), pos, val); else - return scm_c_string_set_x (h->array, pos, val); + scm_c_string_set_x (h->array, pos, val); } static void @@ -380,9 +380,9 @@ bitvector_set (scm_t_array_handle *h, ssize_t pos, SCM val) pos += scm_array_handle_bit_elements_offset (h); mask = 1l << (pos % 32); if (scm_to_bool (val)) - ((scm_t_uint32 *)h->elements)[pos/32] |= mask; + ((scm_t_uint32 *)h->writable_elements)[pos/32] |= mask; else - ((scm_t_uint32 *)h->elements)[pos/32] &= ~mask; + ((scm_t_uint32 *)h->writable_elements)[pos/32] &= ~mask; } static void @@ -861,7 +861,7 @@ SCM_DEFINE (scm_make_shared_array, "make-shared-array", 2, 0, 1, SCM imap; size_t k; ssize_t i; - long old_min, new_min, old_max, new_max; + long old_base, old_min, new_min, old_max, new_max; scm_t_array_dim *s; SCM_VALIDATE_REST_ARGUMENT (dims); @@ -873,7 +873,7 @@ SCM_DEFINE (scm_make_shared_array, "make-shared-array", 2, 0, 1, if (SCM_I_ARRAYP (oldra)) { SCM_I_ARRAY_V (ra) = SCM_I_ARRAY_V (oldra); - old_min = old_max = SCM_I_ARRAY_BASE (oldra); + old_base = old_min = old_max = SCM_I_ARRAY_BASE (oldra); s = scm_array_handle_dims (&old_handle); k = scm_array_handle_rank (&old_handle); while (k--) @@ -887,7 +887,7 @@ SCM_DEFINE (scm_make_shared_array, "make-shared-array", 2, 0, 1, else { SCM_I_ARRAY_V (ra) = oldra; - old_min = 0; + old_base = old_min = 0; old_max = scm_c_generalized_vector_length (oldra) - 1; } @@ -909,7 +909,7 @@ SCM_DEFINE (scm_make_shared_array, "make-shared-array", 2, 0, 1, imap = scm_apply_0 (mapfunc, scm_reverse (inds)); i = scm_array_handle_pos (&old_handle, imap); - SCM_I_ARRAY_BASE (ra) = new_min = new_max = i + SCM_I_ARRAY_BASE (oldra); + SCM_I_ARRAY_BASE (ra) = new_min = new_max = i + old_base; indptr = inds; k = SCM_I_ARRAY_NDIM (ra); while (k--) diff --git a/libguile/unif.h b/libguile/unif.h index d13e05334..1ce3a8fa1 100644 --- a/libguile/unif.h +++ b/libguile/unif.h @@ -3,7 +3,7 @@ #ifndef SCM_UNIF_H #define SCM_UNIF_H -/* Copyright (C) 1995,1996,1997,1999,2000,2001, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1999,2000,2001, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/validate.h b/libguile/validate.h index 1eb637f7b..e23e83ad8 100644 --- a/libguile/validate.h +++ b/libguile/validate.h @@ -3,7 +3,7 @@ #ifndef SCM_VALIDATE_H #define SCM_VALIDATE_H -/* Copyright (C) 1999,2000,2001, 2002, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1999,2000,2001, 2002, 2004, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/values.c b/libguile/values.c index 9e01352ea..46b51c2e3 100644 --- a/libguile/values.c +++ b/libguile/values.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/values.h b/libguile/values.h index b34c0b29d..bc603c16b 100644 --- a/libguile/values.h +++ b/libguile/values.h @@ -3,7 +3,7 @@ #ifndef SCM_VALUES_H #define SCM_VALUES_H -/* Copyright (C) 2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/variable.c b/libguile/variable.c index 6364db78b..0bcd07cd0 100644 --- a/libguile/variable.c +++ b/libguile/variable.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1997,1998,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/variable.h b/libguile/variable.h index e5c9bc68f..2f2e1a5c9 100644 --- a/libguile/variable.h +++ b/libguile/variable.h @@ -3,7 +3,7 @@ #ifndef SCM_VARIABLE_H #define SCM_VARIABLE_H -/* Copyright (C) 1995,1996,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/vectors.c b/libguile/vectors.c index efd743408..7a6fdfd92 100644 --- a/libguile/vectors.c +++ b/libguile/vectors.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/vectors.h b/libguile/vectors.h index acf35ff83..b1def0689 100644 --- a/libguile/vectors.h +++ b/libguile/vectors.h @@ -3,7 +3,7 @@ #ifndef SCM_VECTORS_H #define SCM_VECTORS_H -/* Copyright (C) 1995,1996,1998,2000,2001,2002,2004,2005 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001,2002,2004,2005, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/version.c b/libguile/version.c index b675d1e21..9f5eedcf8 100644 --- a/libguile/version.c +++ b/libguile/version.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996, 1999, 2000, 2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996, 1999, 2000, 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/version.h.in b/libguile/version.h.in index f2828dc72..691898cd5 100644 --- a/libguile/version.h.in +++ b/libguile/version.h.in @@ -3,7 +3,7 @@ #ifndef SCM_VERSION_H #define SCM_VERSION_H -/* Copyright (C) 1995,1996,1998,1999,2000,2001 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/vports.c b/libguile/vports.c index b37e662ae..6aec948a4 100644 --- a/libguile/vports.c +++ b/libguile/vports.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2002, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2002, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/vports.h b/libguile/vports.h index 78019dfa4..c25f90f45 100644 --- a/libguile/vports.h +++ b/libguile/vports.h @@ -3,7 +3,7 @@ #ifndef SCM_VPORTS_H #define SCM_VPORTS_H -/* Copyright (C) 1995,1996,2000 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/weaks.c b/libguile/weaks.c index 4ab821f92..f7aaa3f0b 100644 --- a/libguile/weaks.c +++ b/libguile/weaks.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995,1996,1998,2000,2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,1998,2000,2001, 2003, 2006 Free Software Foundation, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/libguile/weaks.h b/libguile/weaks.h index fd5cb1f54..ec9e7b4f9 100644 --- a/libguile/weaks.h +++ b/libguile/weaks.h @@ -3,7 +3,7 @@ #ifndef SCM_WEAKS_H #define SCM_WEAKS_H -/* Copyright (C) 1995,1996,2000,2001, 2003 Free Software Foundation, Inc. +/* Copyright (C) 1995,1996,2000,2001, 2003, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/win32-dirent.c b/libguile/win32-dirent.c index fca84aecd..71ef62b63 100644 --- a/libguile/win32-dirent.c +++ b/libguile/win32-dirent.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/win32-dirent.h b/libguile/win32-dirent.h index ca404e647..30bc118ea 100644 --- a/libguile/win32-dirent.h +++ b/libguile/win32-dirent.h @@ -3,7 +3,7 @@ #ifndef SCM_WIN32_DIRENT_H #define SCM_WIN32_DIRENT_H -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/win32-socket.c b/libguile/win32-socket.c index 20f6b76a7..66f81b8c8 100644 --- a/libguile/win32-socket.c +++ b/libguile/win32-socket.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/win32-socket.h b/libguile/win32-socket.h index efb5f7e08..51856051d 100644 --- a/libguile/win32-socket.h +++ b/libguile/win32-socket.h @@ -3,7 +3,7 @@ #ifndef SCM_WIN32_SOCKET_H #define SCM_WIN32_SOCKET_H -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/win32-uname.c b/libguile/win32-uname.c index 5b7956b41..d4620e1b7 100644 --- a/libguile/win32-uname.c +++ b/libguile/win32-uname.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/libguile/win32-uname.h b/libguile/win32-uname.h index 859a92301..8593dc7d9 100644 --- a/libguile/win32-uname.h +++ b/libguile/win32-uname.h @@ -3,7 +3,7 @@ #ifndef SCM_WIN32_UNAME_H #define SCM_WIN32_UNAME_H -/* Copyright (C) 2001 Free Software Foundation, Inc. +/* Copyright (C) 2001, 2006 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public |