mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
Merge commit 'origin/master' into vm
Conflicts: doc/Makefile.am ice-9/Makefile.am libguile/gc.c
This commit is contained in:
commit
999f1b26e7
262 changed files with 6880 additions and 7772 deletions
34
.cvsignore
34
.cvsignore
|
@ -1,34 +0,0 @@
|
|||
BUGS
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
benchmark-guile
|
||||
check-guile
|
||||
check-guile.log
|
||||
compile
|
||||
confdefs.h
|
||||
config.build-subdirs
|
||||
config.cache
|
||||
config.h
|
||||
config.h.in
|
||||
config.log
|
||||
config.status
|
||||
configure
|
||||
conftest
|
||||
conftest.c
|
||||
depcomp
|
||||
elisp-comp
|
||||
guile-*.tar.gz
|
||||
guile-tools
|
||||
install-sh
|
||||
lib
|
||||
libtool
|
||||
ltconfig
|
||||
ltmain.sh
|
||||
mdate-sh
|
||||
missing
|
||||
mkinstalldirs
|
||||
pre-inst-guile
|
||||
pre-inst-guile-env
|
||||
stamp-h1
|
3395
ChangeLog-2008
Normal file
3395
ChangeLog-2008
Normal file
File diff suppressed because it is too large
Load diff
169
HACKING
169
HACKING
|
@ -31,22 +31,15 @@ See http://www.gnu.org/software/guile/mail/mail.html for more info.
|
|||
|
||||
Hacking It Yourself ==================================================
|
||||
|
||||
When Guile is obtained from CVS, a few extra steps must be taken
|
||||
When Guile is obtained from Git, a few extra steps must be taken
|
||||
before the usual configure, make, make install. You will need to have
|
||||
up-to-date versions of the tools listed below, correctly installed.
|
||||
i.e., they must be found in the current PATH and not shadowed or
|
||||
otherwise broken by files left behind from other versions.
|
||||
up-to-date versions of the tools as listed below, correctly installed.
|
||||
|
||||
"up-to-date" means the latest released versions at the time that Guile
|
||||
was obtained from CVS. Sometimes older or newer versions will work.
|
||||
(See below for versions to avoid.)
|
||||
Sometimes older or newer versions will work. (See below for versions
|
||||
to avoid.)
|
||||
|
||||
Then you must run the autogen.sh script, as described below.
|
||||
|
||||
In case of problems, it may be worth getting a fresh copy of Guile
|
||||
from CVS: synchronisation problems have been known to occur
|
||||
occasionally.
|
||||
|
||||
The same procedure can be used to regenerate the files in released
|
||||
versions of Guile. In that case the headers of the original generated
|
||||
files (e.g., configure, Makefile.in, ltmain.sh) can be used to
|
||||
|
@ -145,30 +138,27 @@ Bill further writes:
|
|||
Contributing Your Changes ============================================
|
||||
|
||||
- If you have put together a change that meets the coding standards
|
||||
described below, we encourage you to submit it to Guile. The best
|
||||
place to post it is guile-devel@gnu.org. Please don't send it
|
||||
directly to me; I often don't have time to look things over. If you
|
||||
have tested your change, then you don't need to be shy.
|
||||
described below, we encourage you to submit it to Guile. Post your
|
||||
patch to guile-devel@gnu.org.
|
||||
|
||||
- Please submit patches using either context or unified diffs (diff -c
|
||||
or diff -u). Don't include a patch for ChangeLog; such patches don't
|
||||
apply cleanly, since we've probably changed the top of ChangeLog too.
|
||||
Instead, provide the unaltered text at the top of your patch.
|
||||
- We prefer patches generated using 'git format-patch'.
|
||||
|
||||
- Provide a description in the commit message, like so:
|
||||
|
||||
1-line description of change
|
||||
|
||||
More extensive discussion of your change. Document why you are
|
||||
changing things.
|
||||
|
||||
* filename (function name): file specific change comments.
|
||||
|
||||
- For proper credit, also make sure you update the AUTHORS file
|
||||
(for new files for which you've assigned copyright to the FSF), or
|
||||
the THANKS file (for everything else).
|
||||
|
||||
Please don't include patches for generated files like configure,
|
||||
aclocal.m4, or any Makefile.in. Such patches are often large, and
|
||||
we're just going to regenerate those files anyway.
|
||||
|
||||
|
||||
Coding standards =====================================================
|
||||
|
||||
- Before contributing larger amounts of code to Guile, please read the
|
||||
documents in `guile-core/devel/policy' in the CVS source tree.
|
||||
|
||||
- As for any part of Project GNU, changes to Guile should follow the
|
||||
GNU coding standards. The standards are available via anonymous FTP
|
||||
from prep.ai.mit.edu, as /pub/gnu/standards/standards.texi and
|
||||
|
@ -191,13 +181,6 @@ compiler. This means that people using more stringent compilers will
|
|||
have more work to do, and assures that everyone won't switch to the
|
||||
most lenient compiler they can find. :)
|
||||
|
||||
Note also that EGCS (as of November 3 1998) doesn't handle the
|
||||
`noreturn' attribute properly, so it doesn't understand that functions
|
||||
like scm_error won't return. This may lead to some silly warnings
|
||||
about uninitialized variables. You should look into these warnings to
|
||||
make sure they are indeed spurious, but you needn't correct warnings
|
||||
caused by this EGCS bug.
|
||||
|
||||
- If you add code which uses functions or other features that are not
|
||||
entirely portable, please make sure the rest of Guile will still
|
||||
function properly on systems where they are missing. This usually
|
||||
|
@ -240,16 +223,15 @@ When deprecating a definition, always follow this procedure:
|
|||
to do at each release. Add a reminder about the removal of the
|
||||
deprecated defintion at the appropriate release.
|
||||
|
||||
- Please write log entries for functions written in C under the
|
||||
functions' C names, and write log entries for functions written in
|
||||
Scheme under the functions' Scheme names. Please don't do this:
|
||||
- Write commit messages for functions written in C using the
|
||||
functions' C names, and write entries for functions written in Scheme
|
||||
using the functions' Scheme names. For example,
|
||||
|
||||
* procs.c, procs.h (procedure-documentation): Moved from eval.c.
|
||||
* foo.c: Moved scm_procedure_documentation from eval.c.
|
||||
|
||||
Entries like this make it harder to search the ChangeLogs, because you
|
||||
can never tell which name the entry will refer to. Instead, write this:
|
||||
is preferred over
|
||||
|
||||
* procs.c, procs.h (scm_procedure_documentation): Moved from eval.c.
|
||||
* foo.c: Moved procedure-documentation from eval.c.
|
||||
|
||||
Changes like adding this line are special:
|
||||
|
||||
|
@ -258,12 +240,7 @@ Changes like adding this line are special:
|
|||
Since the change here is about the name itself --- we're adding a new
|
||||
alias for scm_map that guarantees the order in which we process list
|
||||
elements, but we're not changing scm_map at all --- it's appropriate
|
||||
to use the Scheme name in the log entry.
|
||||
|
||||
- There's no need to keep a change log for a ChangeLog file. For any
|
||||
other kind of file (including documentation, since our documentation
|
||||
is indeed precisely engineered -- we surpass GNU standards here), add
|
||||
an appropriate ChangeLog entry when you change it. Simple!
|
||||
to use the Scheme name in the commit message.
|
||||
|
||||
- Make sure you have papers from people before integrating their
|
||||
changes or contributions. This is very frustrating, but very
|
||||
|
@ -357,106 +334,6 @@ same when you add new procedures/C functions for debugging purpose.
|
|||
You can define the GUILE_DEBUG flag by passing --enable-guile-debug to
|
||||
the configure script.
|
||||
|
||||
- You'll see uses of the macro SCM_P scattered throughout the code;
|
||||
those are vestiges of a time when Guile was meant to compile on
|
||||
pre-ANSI compilers. Guile now requires ANSI C, so when you write new
|
||||
functions, feel free to use ANSI declarations, and please provide
|
||||
prototypes for everything. You don't need to use SCM_P in new code.
|
||||
|
||||
|
||||
Jim Blandy, and others
|
||||
|
||||
|
||||
Patches ===========================================================
|
||||
|
||||
This one makes cvs-1.10 consider the file $CVSDOTIGNORE instead of
|
||||
.cvsignore when that environment variable is set.
|
||||
|
||||
=== patch start ===
|
||||
diff -r -u cvs-1.10/src/cvs.h cvs-1.10.ignore-hack/src/cvs.h
|
||||
--- cvs-1.10/src/cvs.h Mon Jul 27 04:54:11 1998
|
||||
+++ cvs-1.10.ignore-hack/src/cvs.h Sun Jan 23 12:58:09 2000
|
||||
@@ -516,7 +516,7 @@
|
||||
|
||||
extern int ign_name PROTO ((char *name));
|
||||
void ign_add PROTO((char *ign, int hold));
|
||||
-void ign_add_file PROTO((char *file, int hold));
|
||||
+int ign_add_file PROTO((char *file, int hold));
|
||||
void ign_setup PROTO((void));
|
||||
void ign_dir_add PROTO((char *name));
|
||||
int ignore_directory PROTO((char *name));
|
||||
diff -r -u cvs-1.10/src/ignore.c cvs-1.10.ignore-hack/src/ignore.c
|
||||
--- cvs-1.10/src/ignore.c Mon Sep 8 01:04:15 1997
|
||||
+++ cvs-1.10.ignore-hack/src/ignore.c Sun Jan 23 12:57:50 2000
|
||||
@@ -99,9 +99,9 @@
|
||||
/*
|
||||
* Open a file and read lines, feeding each line to a line parser. Arrange
|
||||
* for keeping a temporary list of wildcards at the end, if the "hold"
|
||||
- * argument is set.
|
||||
+ * argument is set. Return true when the file exists and has been handled.
|
||||
*/
|
||||
-void
|
||||
+int
|
||||
ign_add_file (file, hold)
|
||||
char *file;
|
||||
int hold;
|
||||
@@ -149,8 +149,8 @@
|
||||
if (fp == NULL)
|
||||
{
|
||||
if (! existence_error (errno))
|
||||
- error (0, errno, "cannot open %s", file);
|
||||
- return;
|
||||
+ error (0, errno, "cannot open %s", file);
|
||||
+ return 0;
|
||||
}
|
||||
while (getline (&line, &line_allocated, fp) >= 0)
|
||||
ign_add (line, hold);
|
||||
@@ -159,6 +159,7 @@
|
||||
if (fclose (fp) < 0)
|
||||
error (0, errno, "cannot close %s", file);
|
||||
free (line);
|
||||
+ return 1;
|
||||
}
|
||||
|
||||
/* Parse a line of space-separated wildcards and add them to the list. */
|
||||
@@ -375,6 +376,7 @@
|
||||
struct stat sb;
|
||||
char *file;
|
||||
char *xdir;
|
||||
+ char *cvsdotignore;
|
||||
|
||||
/* Set SUBDIRS if we have subdirectory information in ENTRIES. */
|
||||
if (entries == NULL)
|
||||
@@ -397,7 +399,10 @@
|
||||
if (dirp == NULL)
|
||||
return;
|
||||
|
||||
- ign_add_file (CVSDOTIGNORE, 1);
|
||||
+ cvsdotignore = getenv("CVSDOTIGNORE");
|
||||
+ if (cvsdotignore == NULL || !ign_add_file (cvsdotignore, 1))
|
||||
+ ign_add_file (CVSDOTIGNORE, 1);
|
||||
+
|
||||
wrap_add_file (CVSDOTWRAPPER, 1);
|
||||
|
||||
while ((dp = readdir (dirp)) != NULL)
|
||||
=== patch end ===
|
||||
|
||||
This one is for pcl-cvs-2.9.2, so that `i' adds to the local
|
||||
.cvsignore file.
|
||||
|
||||
=== patch start ===
|
||||
--- pcl-cvs.el~ Mon Nov 1 12:33:46 1999
|
||||
+++ pcl-cvs.el Tue Jan 25 21:46:27 2000
|
||||
@@ -1177,7 +1177,10 @@
|
||||
"Append the file in FILEINFO to the .cvsignore file.
|
||||
Can only be used in the *cvs* buffer."
|
||||
(save-window-excursion
|
||||
- (set-buffer (find-file-noselect (expand-file-name ".cvsignore" dir)))
|
||||
+ (set-buffer (find-file-noselect
|
||||
+ (expand-file-name (or (getenv "CVSDOTIGNORE")
|
||||
+ ".cvsignore")
|
||||
+ dir)))
|
||||
(goto-char (point-max))
|
||||
(unless (zerop (current-column)) (insert "\n"))
|
||||
(insert str "\n")
|
||||
=== patch end ===
|
||||
|
|
|
@ -32,8 +32,9 @@ bin_SCRIPTS = guile-tools
|
|||
|
||||
include_HEADERS = libguile.h
|
||||
|
||||
EXTRA_DIST = LICENSE HACKING GUILE-VERSION \
|
||||
m4/ChangeLog FAQ guile-1.8.pc.in
|
||||
EXTRA_DIST = LICENSE HACKING GUILE-VERSION \
|
||||
m4/ChangeLog-2008 FAQ guile-1.8.pc.in \
|
||||
m4/autobuild.m4 ChangeLog-2008
|
||||
|
||||
TESTS = check-guile
|
||||
|
||||
|
|
24
NEWS
24
NEWS
|
@ -32,6 +32,13 @@ See `cancel-thread', `set-thread-cleanup!', and `thread-cleanup'.
|
|||
|
||||
* Changes to the C interface
|
||||
|
||||
** The GH interface (deprecated in version 1.6, 2001) was removed.
|
||||
|
||||
** Internal `scm_i_' functions now have "hidden" linkage with GCC/ELF
|
||||
|
||||
This makes these internal functions technically not callable from
|
||||
application code.
|
||||
|
||||
** Functions for handling `scm_option' now no longer require an argument
|
||||
indicating length of the `scm_t_option' array.
|
||||
|
||||
|
@ -49,20 +56,27 @@ When you use GDS to evaluate Scheme code from Emacs, you can now use
|
|||
`C-u' to indicate that you want to single step through that code. See
|
||||
`Evaluating Scheme Code' in the manual for more details.
|
||||
|
||||
* Changes to the distribution
|
||||
|
||||
** Automake's `AM_MAINTAINER_MODE' is no longer used
|
||||
|
||||
Thus, the `--enable-maintainer-mode' configure option is no longer
|
||||
available: Guile is now always configured in "maintainer mode".
|
||||
|
||||
* Bugs fixed
|
||||
|
||||
** Internal `scm_i_' functions now have "hidden" linkage with GCC/ELF
|
||||
|
||||
This makes these internal functions technically not callable from
|
||||
application code.
|
||||
|
||||
** `symbol->string' now returns a read-only string, as per R5RS
|
||||
** Literal strings as returned by `read' are now read-only, as per R5RS
|
||||
** Fix incorrect handling of the FLAGS argument of `fold-matches'
|
||||
** `guile-config link' now prints `-L$libdir' before `-lguile'
|
||||
** Fix memory corruption involving GOOPS' `class-redefinition'
|
||||
** Fix possible deadlock in `mutex-lock'
|
||||
** Fix build issue on Tru64 and ia64-hp-hpux11.23 (`SCM_UNPACK' macro)
|
||||
** Fix build issue on mips, mipsel, powerpc and ia64 (stack direction)
|
||||
** Fix build issue on hppa2.0w-hp-hpux11.11 (`dirent64' and `readdir64_r')
|
||||
** Fix misleading output from `(help rationalize)'
|
||||
** Fix build failure on Debian hppa architecture (bad stack growth detection)
|
||||
** Fix `gcd' when called with a single, negative argument.
|
||||
|
||||
|
||||
Changes in 1.8.5 (since 1.8.4)
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2002, 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2002, 2006, 2008 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
@ -23,6 +23,6 @@ AUTOMAKE_OPTIONS = gnu
|
|||
|
||||
am_frags = pre-inst-guile maintainer-dirs
|
||||
|
||||
EXTRA_DIST = $(am_frags)
|
||||
EXTRA_DIST = $(am_frags) ChangeLog-2008
|
||||
|
||||
## Makefile.am ends here
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,7 +1,9 @@
|
|||
SCM_BENCHMARKS = benchmarks/0-reference.bm \
|
||||
benchmarks/continuations.bm \
|
||||
benchmarks/if.bm \
|
||||
benchmarks/logand.bm \
|
||||
benchmarks/read.bm
|
||||
SCM_BENCHMARKS = benchmarks/0-reference.bm \
|
||||
benchmarks/continuations.bm \
|
||||
benchmarks/if.bm \
|
||||
benchmarks/logand.bm \
|
||||
benchmarks/read.bm \
|
||||
benchmarks/uniform-vector-read.bm
|
||||
|
||||
EXTRA_DIST = guile-benchmark lib.scm $(SCM_BENCHMARKS)
|
||||
EXTRA_DIST = guile-benchmark lib.scm $(SCM_BENCHMARKS) \
|
||||
ChangeLog-2008
|
||||
|
|
53
benchmark-suite/benchmarks/uniform-vector-read.bm
Normal file
53
benchmark-suite/benchmarks/uniform-vector-read.bm
Normal file
|
@ -0,0 +1,53 @@
|
|||
;;; uniform-vector-read.bm --- Exercise binary I/O primitives. -*- Scheme -*-
|
||||
;;;
|
||||
;;; Copyright (C) 2008 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
|
||||
;;; the Free Software Foundation; either version 2, or (at your option)
|
||||
;;; any later version.
|
||||
;;;
|
||||
;;; This program is distributed in the hope that it will be useful,
|
||||
;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;;; GNU General Public License for more details.
|
||||
;;;
|
||||
;;; You should have received a copy of the GNU General Public License
|
||||
;;; along with this software; see the file COPYING. If not, write to
|
||||
;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
;;; Boston, MA 02110-1301 USA
|
||||
|
||||
(define-module (benchmarks uniform-vector-read)
|
||||
:use-module (benchmark-suite lib)
|
||||
:use-module (srfi srfi-4))
|
||||
|
||||
(define file-name
|
||||
(tmpnam))
|
||||
|
||||
(define %buffer-size
|
||||
7777)
|
||||
|
||||
(define buf
|
||||
(make-u8vector %buffer-size))
|
||||
|
||||
(define str
|
||||
(make-string %buffer-size))
|
||||
|
||||
|
||||
(with-benchmark-prefix "uniform-vector-read!"
|
||||
|
||||
(benchmark "uniform-vector-write" 500
|
||||
(let ((output (open-output-file file-name)))
|
||||
(uniform-vector-write buf output)
|
||||
(close output)))
|
||||
|
||||
(benchmark "uniform-vector-read!" 500
|
||||
(let ((input (open-input-file file-name)))
|
||||
(setvbuf input _IONBF)
|
||||
(uniform-vector-read! buf input)
|
||||
(close input)))
|
||||
|
||||
(benchmark "string port" 5000
|
||||
(let ((input (open-input-string str)))
|
||||
(uniform-vector-read! buf input)
|
||||
(close input))))
|
|
@ -1,13 +0,0 @@
|
|||
.deps
|
||||
.dirstamp
|
||||
link-warning.h
|
||||
compile
|
||||
config.guess
|
||||
config.sub
|
||||
depcomp
|
||||
elisp-comp
|
||||
install-sh
|
||||
ltmain.sh
|
||||
mdate-sh
|
||||
missing
|
||||
texinfo.tex
|
|
@ -48,7 +48,6 @@ AC_CONFIG_SRCDIR([GUILE-VERSION])
|
|||
|
||||
. $srcdir/GUILE-VERSION
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AH_TOP(/*GUILE_CONFIGURE_COPYRIGHT*/)
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
*.aux
|
||||
*.cp
|
||||
*.cps
|
||||
*.dvi
|
||||
*.fn
|
||||
*.fns
|
||||
*.html
|
||||
*.info*
|
||||
*.ky
|
||||
*.log
|
||||
*.pg
|
||||
*.ps
|
||||
*.toc
|
||||
*.tp
|
||||
*.tps
|
||||
*.vr
|
||||
*.vrs
|
||||
Makefile
|
||||
Makefile.in
|
||||
stamp-vti
|
||||
stamp-vti1
|
||||
stamp-vti.1
|
||||
version-tutorial.texi
|
||||
version.texi
|
|
@ -27,7 +27,7 @@ SUBDIRS = ref tutorial goops r5rs
|
|||
# man_MANS = guile.1
|
||||
|
||||
EXAMPLE_SMOB_FILES = \
|
||||
ChangeLog Makefile README image-type.c image-type.h myguile.c
|
||||
ChangeLog-2008 Makefile README image-type.c image-type.h myguile.c
|
||||
|
||||
OLDFMT = oldfmt.c
|
||||
|
||||
|
@ -38,16 +38,14 @@ dist-hook:
|
|||
cp $(srcdir)/example-smob/$$f $(distdir)/example-smob/; \
|
||||
done
|
||||
|
||||
EXTRA_DIST = groupings.alist # guile-api.alist
|
||||
EXTRA_DIST = groupings.alist ChangeLog-2008 # guile-api.alist
|
||||
|
||||
# pending the papers from Robert Merkel
|
||||
# EXTRA_DIST = guile.1
|
||||
|
||||
if MAINTAINER_MODE
|
||||
include $(top_srcdir)/am/maintainer-dirs
|
||||
guile-api.alist: guile-api.alist-FORCE
|
||||
( cd $(top_builddir) ; $(mscripts)/update-guile-api.alist )
|
||||
guile-api.alist-FORCE:
|
||||
endif
|
||||
|
||||
info_TEXINFOS = guile-vm.texi
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
stamp-vti
|
||||
stamp-vti.1
|
||||
*.log
|
||||
*.dvi
|
||||
*.aux
|
||||
*.toc
|
||||
*.cp
|
||||
*.fn
|
||||
*.vr
|
||||
*.tp
|
||||
*.ky
|
||||
*.pg
|
||||
*.cps
|
||||
*.fns
|
||||
*.tps
|
||||
*.vrs
|
||||
*.ps
|
||||
*.info*
|
||||
*.html
|
||||
goops.tmp
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 1998, 2004, 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 2004, 2006, 2008 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
@ -27,3 +27,5 @@ goops_TEXINFOS = goops-tutorial.texi \
|
|||
hierarchy.eps hierarchy.png hierarchy.txt hierarchy.pdf
|
||||
|
||||
TEXINFO_TEX = ../ref/texinfo.tex
|
||||
|
||||
EXTRA_DIST = ChangeLog-2008
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
stamp-vti
|
||||
stamp-vti.1
|
||||
*.log
|
||||
*.dvi
|
||||
*.aux
|
||||
*.toc
|
||||
*.cp
|
||||
*.fn
|
||||
*.vr
|
||||
*.tp
|
||||
*.ky
|
||||
*.pg
|
||||
*.pgs
|
||||
*.cps
|
||||
*.fns
|
||||
*.tps
|
||||
*.vrs
|
||||
*.ps
|
||||
*.info*
|
||||
*.html
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 1998, 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 2006, 2008 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
@ -24,3 +24,5 @@ AUTOMAKE_OPTIONS = gnu
|
|||
info_TEXINFOS = r5rs.texi
|
||||
|
||||
TEXINFO_TEX = ../ref/texinfo.tex
|
||||
|
||||
EXTRA_DIST = ChangeLog-2008
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
*.aux
|
||||
*.cp
|
||||
*.cps
|
||||
*.dvi
|
||||
*.fn
|
||||
*.fns
|
||||
*.ge
|
||||
*.html
|
||||
*.info*
|
||||
*.ky
|
||||
*.log
|
||||
*.pg
|
||||
*.ps
|
||||
*.rn
|
||||
*.rns
|
||||
*.toc
|
||||
*.tp
|
||||
*.tps
|
||||
*.vr
|
||||
*.vrs
|
||||
Makefile
|
||||
Makefile.in
|
||||
autoconf-macros.texi
|
||||
mdate-sh
|
||||
lib-version.texi
|
||||
stamp-vti
|
||||
stamp-vti.1
|
||||
texinfo.tex
|
||||
version.texi
|
|
@ -55,7 +55,6 @@ guile_TEXINFOS = preface.texi \
|
|||
scsh.texi \
|
||||
tcltk.texi \
|
||||
scheme-scripts.texi \
|
||||
gh.texi \
|
||||
api-overview.texi \
|
||||
scheme-debugging.texi \
|
||||
scheme-using.texi \
|
||||
|
@ -80,6 +79,8 @@ guile_TEXINFOS = preface.texi \
|
|||
|
||||
ETAGS_ARGS = $(info_TEXINFOS) $(guile_TEXINFOS)
|
||||
|
||||
EXTRA_DIST = ChangeLog-2008
|
||||
|
||||
include $(top_srcdir)/am/pre-inst-guile
|
||||
|
||||
# Automated snarfing
|
||||
|
@ -102,4 +103,4 @@ MAINTAINERCLEANFILES = autoconf-macros.texi
|
|||
# it can't possibly be different on the build machine than where the
|
||||
# distribution was generated, so we might as well include it in the
|
||||
# distribution.
|
||||
EXTRA_DIST = lib-version.texi
|
||||
EXTRA_DIST += lib-version.texi
|
||||
|
|
|
@ -99,7 +99,7 @@ your site should be installed. On Unix-like systems, this is usually
|
|||
@defvar %load-path
|
||||
List of directories which should be searched for Scheme modules and
|
||||
libraries. @code{%load-path} is initialized when Guile starts up to
|
||||
@code{(list (%site-dir) (%library-dir) (%package-data-dir) ".")},
|
||||
@code{(list (%site-dir) (%library-dir) (%package-data-dir))},
|
||||
prepended with the contents of the GUILE_LOAD_PATH environment variable,
|
||||
if it is set.
|
||||
@end defvar
|
||||
|
|
1201
doc/ref/gh.texi
1201
doc/ref/gh.texi
File diff suppressed because it is too large
Load diff
|
@ -307,7 +307,6 @@ available through both Scheme and C interfaces.
|
|||
* Translation:: Support for translating other languages.
|
||||
* Internationalization:: Support for gettext, etc.
|
||||
* Debugging:: Debugging infrastructure and Scheme interface.
|
||||
* GH:: The deprecated GH interface.
|
||||
@end menu
|
||||
|
||||
@include api-overview.texi
|
||||
|
@ -331,7 +330,6 @@ available through both Scheme and C interfaces.
|
|||
@include api-translation.texi
|
||||
@include api-i18n.texi
|
||||
@include api-debug.texi
|
||||
@include gh.texi
|
||||
|
||||
@node Guile Modules
|
||||
@chapter Guile Modules
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
@c -*-texinfo-*-
|
||||
@c This is part of the GNU Guile Reference Manual.
|
||||
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007
|
||||
@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2006, 2007, 2008
|
||||
@c Free Software Foundation, Inc.
|
||||
@c See the file guile.texi for copying conditions.
|
||||
|
||||
|
@ -1263,28 +1263,6 @@ formatting.
|
|||
|
||||
If @code{setlocale} has been called (@pxref{Locales}), month and day
|
||||
names are from the current locale and in the locale character set.
|
||||
|
||||
Note that @samp{%Z} might print the @code{tm:zone} in @var{tm} or it
|
||||
might print just the current zone (@code{tzset} above). A GNU system
|
||||
prints @code{tm:zone}, a strict C99 system like NetBSD prints the
|
||||
current zone. Perhaps in the future Guile will try to get
|
||||
@code{tm:zone} used always.
|
||||
@c
|
||||
@c The issue in the above is not just whether tm_zone exists in
|
||||
@c struct tm, but whether libc feels it should read it. Being a
|
||||
@c non-C99 field, a strict C99 program won't know to set it, quite
|
||||
@c likely leaving garbage there. NetBSD, which has the field,
|
||||
@c therefore takes the view that it mustn't read it. See the PR
|
||||
@c about this at
|
||||
@c
|
||||
@c http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=21722
|
||||
@c
|
||||
@c Uniformly making tm:zone used on all systems (all those which have
|
||||
@c %Z at all of course) might be nice (either mung TZ and tzset, or
|
||||
@c mung tzname[]). On the other hand it would make us do more than
|
||||
@c C99 says, and we really don't want to get intimate with the gory
|
||||
@c details of libc time funcs, no more than can be helped.
|
||||
@c
|
||||
@end deffn
|
||||
|
||||
@deffn {Scheme Procedure} strptime format string
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
stamp-vti
|
||||
*.log
|
||||
*.dvi
|
||||
*.aux
|
||||
*.toc
|
||||
*.cp
|
||||
*.fn
|
||||
*.vr
|
||||
*.tp
|
||||
*.ky
|
||||
*.pg
|
||||
*.cps
|
||||
*.fns
|
||||
*.tps
|
||||
*.vrs
|
||||
*.ps
|
||||
*.info*
|
||||
version.texi
|
|
@ -4,4 +4,4 @@ EXTRA_DIST = libguile-overview.texi snarf.texi contributors.texi
|
|||
libguile-tools.texi strings.texi data-rep.texi new-types.texi tk.texi \
|
||||
debug-c.texi old-intro.texi unix-other.texi debug-scheme.texi \
|
||||
sample-APIs.texi unix.texi guile-slib.texi scheme-concepts.texi \
|
||||
jimb-org.texi scm-ref.texi
|
||||
jimb-org.texi scm-ref.texi ChangeLog-2008
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
*.aux
|
||||
*.cp
|
||||
*.cps
|
||||
*.dvi
|
||||
*.fn
|
||||
*.fns
|
||||
*.html
|
||||
*.info*
|
||||
*.ky
|
||||
*.log
|
||||
*.pg
|
||||
*.ps
|
||||
*.toc
|
||||
*.tp
|
||||
*.tps
|
||||
*.vr
|
||||
*.vrs
|
||||
Makefile
|
||||
Makefile.in
|
||||
mdate-sh
|
||||
stamp-vti
|
||||
stamp-vti.1
|
||||
version.texi
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 1998, 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 2006, 2008 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
@ -24,3 +24,5 @@ AUTOMAKE_OPTIONS = gnu
|
|||
info_TEXINFOS = guile-tut.texi
|
||||
|
||||
TEXINFO_TEX = ../ref/texinfo.tex
|
||||
|
||||
EXTRA_DIST = ChangeLog-2008
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
*.info
|
||||
Makefile
|
||||
Makefile.in
|
||||
gds.aux
|
||||
gds.cp
|
||||
gds.dvi
|
||||
gds.fn
|
||||
gds.ky
|
||||
gds.log
|
||||
gds.pg
|
||||
gds.toc
|
||||
gds.tp
|
||||
gds.vr
|
||||
mdate-sh
|
||||
stamp-vti
|
||||
version.texi
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2006, 2008 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
@ -24,4 +24,4 @@ AUTOMAKE_OPTIONS = gnu
|
|||
dist_lisp_LISP = gds.el gds-server.el gds-scheme.el
|
||||
ELCFILES =
|
||||
|
||||
ETAGS_ARGS = $(dist_lisp_LISP)
|
||||
ETAGS_ARGS = $(dist_lisp_LISP) ChangeLog-2008
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 2001, 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 2001, 2006, 2008 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
@ -22,4 +22,4 @@
|
|||
SUBDIRS = scripts box box-module box-dynamic box-dynamic-module\
|
||||
modules safe
|
||||
|
||||
EXTRA_DIST = README
|
||||
EXTRA_DIST = README ChangeLog-2008
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,3 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
.deps
|
|
@ -1,3 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
.deps
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,3 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
guile-config
|
|
@ -1,7 +1,7 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
## Jim Blandy <jimb@red-bean.com> --- September 1997
|
||||
##
|
||||
## Copyright (C) 1998, 1999, 2001, 2006, 2007 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 1999, 2001, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
@ -22,7 +22,7 @@
|
|||
|
||||
bin_SCRIPTS=guile-config
|
||||
CLEANFILES=guile-config
|
||||
EXTRA_DIST=guile-config.in guile.m4
|
||||
EXTRA_DIST=guile-config.in guile.m4 ChangeLog-2008
|
||||
|
||||
## FIXME: in the future there will be direct automake support for
|
||||
## doing this. When that happens, switch over.
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
*.c.clean.c
|
||||
*.la
|
||||
*.lo
|
||||
*.x
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
aclocal.m4
|
||||
autom4te.cache
|
||||
config.guess
|
||||
config.log
|
||||
config.status
|
||||
config.sub
|
||||
configure
|
||||
depcomp
|
||||
guile-readline-config.h
|
||||
guile-readline-config.h.in
|
||||
install-sh
|
||||
libtool
|
||||
ltmain.sh
|
||||
missing
|
||||
mkinstalldirs
|
||||
stamp-h1
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with Automake to create Makefile.in
|
||||
##
|
||||
## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006, 2007 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
@ -48,7 +48,7 @@ SUFFIXES = .x
|
|||
.c.x:
|
||||
$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
|
||||
|
||||
EXTRA_DIST = LIBGUILEREADLINE-VERSION
|
||||
EXTRA_DIST = LIBGUILEREADLINE-VERSION ChangeLog-2008
|
||||
|
||||
MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#ifdef HAVE_RL_GETC_FUNCTION
|
||||
#include "libguile.h"
|
||||
#include "libguile/gh.h"
|
||||
#include "libguile/iselect.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
config.log
|
||||
config.status
|
||||
version.scm
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 1998,1999,2000,2001,2003, 2004, 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998,1999,2000,2001,2003, 2004, 2006, 2008 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
@ -60,11 +60,10 @@ NOCOMP_SOURCES = match.scm occam-channel.scm gds-client.scm psyntax.scm
|
|||
include $(top_srcdir)/guilec.mk
|
||||
|
||||
## test.scm is not currently installed.
|
||||
EXTRA_DIST += test.scm compile-psyntax.scm
|
||||
EXTRA_DIST += test.scm compile-psyntax.scm ChangeLog-2008
|
||||
|
||||
TAGS_FILES = $(SOURCES)
|
||||
|
||||
if MAINTAINER_MODE
|
||||
# We expect this to never be invoked when there is not already
|
||||
# ice-9/psyntax-pp.scm in %load-path, since compile-psyntax.scm depends
|
||||
# on ice-9/syncase.scm, which does `(load-from-path "ice-9/psyntax-pp.scm")'.
|
||||
|
@ -74,4 +73,3 @@ include $(top_srcdir)/am/pre-inst-guile
|
|||
psyntax-pp.scm: psyntax.scm
|
||||
$(preinstguile) -s $(srcdir)/compile-psyntax.scm \
|
||||
$(srcdir)/psyntax.scm $(srcdir)/psyntax-pp.scm
|
||||
endif
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,4 +1,4 @@
|
|||
;;;; Copyright (C) 1997, 1999, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 1997, 1999, 2001, 2004, 2005, 2006, 2008 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
|
||||
|
@ -178,7 +178,7 @@
|
|||
|
||||
(define (fold-matches regexp string init proc . flags)
|
||||
(let ((regexp (if (regexp? regexp) regexp (make-regexp regexp)))
|
||||
(flags (if (null? flags) 0 flags)))
|
||||
(flags (if (null? flags) 0 (car flags))))
|
||||
(let loop ((start 0)
|
||||
(value init)
|
||||
(abuts #f)) ; True if start abuts a previous match.
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,6 +1,6 @@
|
|||
## Process this file with automake to produce Makefile.in.
|
||||
##
|
||||
## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
|
||||
## Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006, 2008 Free Software Foundation, Inc.
|
||||
##
|
||||
## This file is part of GUILE.
|
||||
##
|
||||
|
@ -36,4 +36,4 @@ subpkgdatadir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)/lang/elisp
|
|||
subpkgdata_DATA = $(elisp_sources)
|
||||
TAGS_FILES = $(subpkgdata_DATA)
|
||||
|
||||
EXTRA_DIST = $(elisp_sources)
|
||||
EXTRA_DIST = $(elisp_sources) ChangeLog-2008
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
|
@ -1,2 +0,0 @@
|
|||
Makefile
|
||||
Makefile.in
|
107
lib/Makefile.am
107
lib/Makefile.am
|
@ -9,7 +9,7 @@
|
|||
# the same distribution terms as the rest of that program.
|
||||
#
|
||||
# Generated by gnulib-tool.
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl alloca extensions strcase
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --aux-dir=build-aux --lgpl --libtool --macro-prefix=gl alloca autobuild count-one-bits extensions strcase strftime
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.5 gnits
|
||||
|
||||
|
@ -63,6 +63,13 @@ EXTRA_DIST += alloca.in.h
|
|||
|
||||
## end gnulib module alloca-opt
|
||||
|
||||
## begin gnulib module count-one-bits
|
||||
|
||||
|
||||
EXTRA_DIST += count-one-bits.h
|
||||
|
||||
## end gnulib module count-one-bits
|
||||
|
||||
## begin gnulib module link-warning
|
||||
|
||||
LINK_WARNING_H=$(top_srcdir)/build-aux/link-warning.h
|
||||
|
@ -71,6 +78,24 @@ EXTRA_DIST += $(top_srcdir)/build-aux/link-warning.h
|
|||
|
||||
## end gnulib module link-warning
|
||||
|
||||
## begin gnulib module stdbool
|
||||
|
||||
BUILT_SOURCES += $(STDBOOL_H)
|
||||
|
||||
# We need the following in order to create <stdbool.h> when the system
|
||||
# doesn't have one that works.
|
||||
stdbool.h: stdbool.in.h
|
||||
rm -f $@-t $@
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
|
||||
} > $@-t
|
||||
mv $@-t $@
|
||||
MOSTLYCLEANFILES += stdbool.h stdbool.h-t
|
||||
|
||||
EXTRA_DIST += stdbool.in.h
|
||||
|
||||
## end gnulib module stdbool
|
||||
|
||||
## begin gnulib module strcase
|
||||
|
||||
|
||||
|
@ -80,6 +105,15 @@ EXTRA_libgnu_la_SOURCES += strcasecmp.c strncasecmp.c
|
|||
|
||||
## end gnulib module strcase
|
||||
|
||||
## begin gnulib module strftime
|
||||
|
||||
|
||||
EXTRA_DIST += strftime.c strftime.h
|
||||
|
||||
EXTRA_libgnu_la_SOURCES += strftime.c
|
||||
|
||||
## end gnulib module strftime
|
||||
|
||||
## begin gnulib module strings
|
||||
|
||||
BUILT_SOURCES += strings.h
|
||||
|
@ -89,7 +123,8 @@ BUILT_SOURCES += strings.h
|
|||
strings.h: strings.in.h
|
||||
rm -f $@-t $@
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
||||
-e 's|@''NEXT_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \
|
||||
-e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
|
||||
-e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
|
||||
|
@ -103,6 +138,74 @@ EXTRA_DIST += strings.in.h
|
|||
|
||||
## end gnulib module strings
|
||||
|
||||
## begin gnulib module time
|
||||
|
||||
BUILT_SOURCES += time.h
|
||||
|
||||
# We need the following in order to create <time.h> when the system
|
||||
# doesn't have one that works with the given compiler.
|
||||
time.h: time.in.h
|
||||
rm -f $@-t $@
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
||||
-e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
|
||||
-e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
|
||||
-e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
|
||||
-e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
|
||||
-e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
|
||||
-e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
|
||||
-e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
|
||||
< $(srcdir)/time.in.h; \
|
||||
} > $@-t
|
||||
mv $@-t $@
|
||||
MOSTLYCLEANFILES += time.h time.h-t
|
||||
|
||||
EXTRA_DIST += time.in.h
|
||||
|
||||
## end gnulib module time
|
||||
|
||||
## begin gnulib module time_r
|
||||
|
||||
|
||||
EXTRA_DIST += time_r.c
|
||||
|
||||
EXTRA_libgnu_la_SOURCES += time_r.c
|
||||
|
||||
## end gnulib module time_r
|
||||
|
||||
## begin gnulib module verify
|
||||
|
||||
libgnu_la_SOURCES += verify.h
|
||||
|
||||
## end gnulib module verify
|
||||
|
||||
## begin gnulib module wchar
|
||||
|
||||
BUILT_SOURCES += $(WCHAR_H)
|
||||
|
||||
# We need the following in order to create <wchar.h> when the system
|
||||
# version does not work standalone.
|
||||
wchar.h: wchar.in.h
|
||||
rm -f $@-t $@
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
||||
-e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
|
||||
-e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
|
||||
-e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
|
||||
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
|
||||
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
|
||||
-e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
|
||||
< $(srcdir)/wchar.in.h; \
|
||||
} > $@-t
|
||||
mv $@-t $@
|
||||
MOSTLYCLEANFILES += wchar.h wchar.h-t
|
||||
|
||||
EXTRA_DIST += wchar.in.h
|
||||
|
||||
## end gnulib module wchar
|
||||
|
||||
## begin gnulib module dummy
|
||||
|
||||
libgnu_la_SOURCES += dummy.c
|
||||
|
|
77
lib/count-one-bits.h
Normal file
77
lib/count-one-bits.h
Normal file
|
@ -0,0 +1,77 @@
|
|||
/* count-one-bits.h -- counts the number of 1-bits in a word.
|
||||
Copyright (C) 2007-2008 Free Software Foundation, Inc.
|
||||
|
||||
This program 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 version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Ben Pfaff. */
|
||||
|
||||
#ifndef COUNT_ONE_BITS_H
|
||||
# define COUNT_ONE_BITS_H 1
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "verify.h"
|
||||
|
||||
/* Expand the code which computes the number of 1-bits of the local
|
||||
variable 'x' of type TYPE (an unsigned integer type) and returns it
|
||||
from the current function. */
|
||||
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
||||
#define COUNT_ONE_BITS(BUILTIN, TYPE) \
|
||||
return BUILTIN (x);
|
||||
#else
|
||||
#define COUNT_ONE_BITS(BUILTIN, TYPE) \
|
||||
/* This condition is written so as to avoid shifting by more than \
|
||||
31 bits at once, and also avoids a random HP-UX cc bug. */ \
|
||||
verify (((TYPE) -1 >> 31 >> 31 >> 2) == 0); /* TYPE has at most 64 bits */ \
|
||||
int count = count_one_bits_32 (x); \
|
||||
if (1 < (TYPE) -1 >> 31) /* TYPE has more than 32 bits? */ \
|
||||
count += count_one_bits_32 (x >> 31 >> 1); \
|
||||
return count;
|
||||
|
||||
/* Compute and return the the number of 1-bits set in the least
|
||||
significant 32 bits of X. */
|
||||
static inline int
|
||||
count_one_bits_32 (unsigned int x)
|
||||
{
|
||||
x = ((x & 0xaaaaaaaaU) >> 1) + (x & 0x55555555U);
|
||||
x = ((x & 0xccccccccU) >> 2) + (x & 0x33333333U);
|
||||
x = (x >> 16) + (x & 0xffff);
|
||||
x = ((x & 0xf0f0) >> 4) + (x & 0x0f0f);
|
||||
return (x >> 8) + (x & 0x00ff);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Compute and return the number of 1-bits set in X. */
|
||||
static inline int
|
||||
count_one_bits (unsigned int x)
|
||||
{
|
||||
COUNT_ONE_BITS (__builtin_popcount, unsigned int);
|
||||
}
|
||||
|
||||
/* Compute and return the number of 1-bits set in X. */
|
||||
static inline int
|
||||
count_one_bits_l (unsigned long int x)
|
||||
{
|
||||
COUNT_ONE_BITS (__builtin_popcountl, unsigned long int);
|
||||
}
|
||||
|
||||
#if HAVE_UNSIGNED_LONG_LONG_INT
|
||||
/* Compute and return the number of 1-bits set in X. */
|
||||
static inline int
|
||||
count_one_bits_ll (unsigned long long int x)
|
||||
{
|
||||
COUNT_ONE_BITS (__builtin_popcountll, unsigned long long int);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* COUNT_ONE_BITS_H */
|
119
lib/stdbool.in.h
Normal file
119
lib/stdbool.in.h
Normal file
|
@ -0,0 +1,119 @@
|
|||
/* Copyright (C) 2001-2003, 2006-2008 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
|
||||
|
||||
This program 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 version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
#ifndef _GL_STDBOOL_H
|
||||
#define _GL_STDBOOL_H
|
||||
|
||||
/* ISO C 99 <stdbool.h> for platforms that lack it. */
|
||||
|
||||
/* Usage suggestions:
|
||||
|
||||
Programs that use <stdbool.h> should be aware of some limitations
|
||||
and standards compliance issues.
|
||||
|
||||
Standards compliance:
|
||||
|
||||
- <stdbool.h> must be #included before 'bool', 'false', 'true'
|
||||
can be used.
|
||||
|
||||
- You cannot assume that sizeof (bool) == 1.
|
||||
|
||||
- Programs should not undefine the macros bool, true, and false,
|
||||
as C99 lists that as an "obsolescent feature".
|
||||
|
||||
Limitations of this substitute, when used in a C89 environment:
|
||||
|
||||
- <stdbool.h> must be #included before the '_Bool' type can be used.
|
||||
|
||||
- You cannot assume that _Bool is a typedef; it might be a macro.
|
||||
|
||||
- Bit-fields of type 'bool' are not supported. Portable code
|
||||
should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'.
|
||||
|
||||
- In C99, casts and automatic conversions to '_Bool' or 'bool' are
|
||||
performed in such a way that every nonzero value gets converted
|
||||
to 'true', and zero gets converted to 'false'. This doesn't work
|
||||
with this substitute. With this substitute, only the values 0 and 1
|
||||
give the expected result when converted to _Bool' or 'bool'.
|
||||
|
||||
Also, it is suggested that programs use 'bool' rather than '_Bool';
|
||||
this isn't required, but 'bool' is more common. */
|
||||
|
||||
|
||||
/* 7.16. Boolean type and values */
|
||||
|
||||
/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
|
||||
definitions below, but temporarily we have to #undef them. */
|
||||
#if defined __BEOS__ && !defined __HAIKU__
|
||||
# include <OS.h> /* defines bool but not _Bool */
|
||||
# undef false
|
||||
# undef true
|
||||
#endif
|
||||
|
||||
/* For the sake of symbolic names in gdb, we define true and false as
|
||||
enum constants, not only as macros.
|
||||
It is tempting to write
|
||||
typedef enum { false = 0, true = 1 } _Bool;
|
||||
so that gdb prints values of type 'bool' symbolically. But if we do
|
||||
this, values of type '_Bool' may promote to 'int' or 'unsigned int'
|
||||
(see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
|
||||
(see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
|
||||
enum; this ensures that '_Bool' promotes to 'int'. */
|
||||
#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
|
||||
/* A compiler known to have 'bool'. */
|
||||
/* If the compiler already has both 'bool' and '_Bool', we can assume they
|
||||
are the same types. */
|
||||
# if !@HAVE__BOOL@
|
||||
typedef bool _Bool;
|
||||
# endif
|
||||
#else
|
||||
# if !defined __GNUC__
|
||||
/* If @HAVE__BOOL@:
|
||||
Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
|
||||
the built-in _Bool type is used. See
|
||||
http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
|
||||
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
|
||||
http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
|
||||
Similar bugs are likely with other compilers as well; this file
|
||||
wouldn't be used if <stdbool.h> was working.
|
||||
So we override the _Bool type.
|
||||
If !@HAVE__BOOL@:
|
||||
Need to define _Bool ourselves. As 'signed char' or as an enum type?
|
||||
Use of a typedef, with SunPRO C, leads to a stupid
|
||||
"warning: _Bool is a keyword in ISO C99".
|
||||
Use of an enum type, with IRIX cc, leads to a stupid
|
||||
"warning(1185): enumerated type mixed with another type".
|
||||
Even the existence of an enum type, without a typedef,
|
||||
"Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
|
||||
The only benefit of the enum, debuggability, is not important
|
||||
with these compilers. So use 'signed char' and no enum. */
|
||||
# define _Bool signed char
|
||||
# else
|
||||
/* With this compiler, trust the _Bool type if the compiler has it. */
|
||||
# if !@HAVE__BOOL@
|
||||
typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#define bool _Bool
|
||||
|
||||
/* The other macros must be usable in preprocessor directives. */
|
||||
#define false 0
|
||||
#define true 1
|
||||
#define __bool_true_false_are_defined 1
|
||||
|
||||
#endif /* _GL_STDBOOL_H */
|
1461
lib/strftime.c
Normal file
1461
lib/strftime.c
Normal file
File diff suppressed because it is too large
Load diff
26
lib/strftime.h
Normal file
26
lib/strftime.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* declarations for strftime.c
|
||||
|
||||
Copyright (C) 2002, 2004, 2008 Free Software Foundation, Inc.
|
||||
|
||||
This program 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 version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <time.h>
|
||||
|
||||
/* Just like strftime, but with two more arguments:
|
||||
POSIX requires that strftime use the local timezone information.
|
||||
When __UTC is nonzero and tm->tm_zone is NULL or the empty string,
|
||||
use UTC instead. Use __NS as the number of nanoseconds in the
|
||||
%N directive. */
|
||||
size_t nstrftime (char *, size_t, char const *, struct tm const *,
|
||||
int __utc, int __ns);
|
|
@ -1,6 +1,6 @@
|
|||
/* A substitute <strings.h>.
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007-2008 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
|
@ -18,6 +18,8 @@
|
|||
|
||||
#ifndef _GL_STRINGS_H
|
||||
|
||||
@PRAGMA_SYSTEM_HEADER@
|
||||
|
||||
/* The include_next requires a split double-inclusion guard. */
|
||||
#@INCLUDE_NEXT@ @NEXT_STRINGS_H@
|
||||
|
||||
|
|
116
lib/time.in.h
Normal file
116
lib/time.in.h
Normal file
|
@ -0,0 +1,116 @@
|
|||
/* A more-standard <time.h>.
|
||||
|
||||
Copyright (C) 2007-2008 Free Software Foundation, Inc.
|
||||
|
||||
This program 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 version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
@PRAGMA_SYSTEM_HEADER@
|
||||
|
||||
/* Don't get in the way of glibc when it includes time.h merely to
|
||||
declare a few standard symbols, rather than to declare all the
|
||||
symbols. Also, Solaris 8 <time.h> eventually includes itself
|
||||
recursively; if that is happening, just include the system <time.h>
|
||||
without adding our own declarations. */
|
||||
#if (defined __need_time_t || defined __need_clock_t \
|
||||
|| defined __need_timespec \
|
||||
|| defined _GL_TIME_H)
|
||||
|
||||
# @INCLUDE_NEXT@ @NEXT_TIME_H@
|
||||
|
||||
#else
|
||||
|
||||
# define _GL_TIME_H
|
||||
|
||||
# @INCLUDE_NEXT@ @NEXT_TIME_H@
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
|
||||
Or they define it with the wrong member names or define it in <sys/time.h>
|
||||
(e.g., FreeBSD circa 1997). */
|
||||
# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
|
||||
# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# undef timespec
|
||||
# define timespec rpl_timespec
|
||||
struct timespec
|
||||
{
|
||||
time_t tv_sec;
|
||||
long int tv_nsec;
|
||||
};
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
|
||||
return -1 and store the remaining time into RMTP. See
|
||||
<http://www.opengroup.org/susv3xsh/nanosleep.html>. */
|
||||
# if @REPLACE_NANOSLEEP@
|
||||
# define nanosleep rpl_nanosleep
|
||||
int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp);
|
||||
# endif
|
||||
|
||||
/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
|
||||
<http://www.opengroup.org/susv3xsh/localtime_r.html> and
|
||||
<http://www.opengroup.org/susv3xsh/gmtime_r.html>. */
|
||||
# if @REPLACE_LOCALTIME_R@
|
||||
# undef localtime_r
|
||||
# define localtime_r rpl_localtime_r
|
||||
# undef gmtime_r
|
||||
# define gmtime_r rpl_gmtime_r
|
||||
struct tm *localtime_r (time_t const *restrict __timer,
|
||||
struct tm *restrict __result);
|
||||
struct tm *gmtime_r (time_t const *restrict __timer,
|
||||
struct tm *restrict __result);
|
||||
# endif
|
||||
|
||||
/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
|
||||
the resulting broken-down time into TM. See
|
||||
<http://www.opengroup.org/susv3xsh/strptime.html>. */
|
||||
# if @REPLACE_STRPTIME@
|
||||
# undef strptime
|
||||
# define strptime rpl_strptime
|
||||
char *strptime (char const *restrict __buf, char const *restrict __format,
|
||||
struct tm *restrict __tm);
|
||||
# endif
|
||||
|
||||
/* Convert TM to a time_t value, assuming UTC. */
|
||||
# if @REPLACE_TIMEGM@
|
||||
# undef timegm
|
||||
# define timegm rpl_timegm
|
||||
time_t timegm (struct tm *__tm);
|
||||
# endif
|
||||
|
||||
/* Encourage applications to avoid unsafe functions that can overrun
|
||||
buffers when given outlandish struct tm values. Portable
|
||||
applications should use strftime (or even sprintf) instead. */
|
||||
# if GNULIB_PORTCHECK
|
||||
# undef asctime
|
||||
# define asctime eschew_asctime
|
||||
# undef asctime_r
|
||||
# define asctime_r eschew_asctime_r
|
||||
# undef ctime
|
||||
# define ctime eschew_ctime
|
||||
# undef ctime_r
|
||||
# define ctime_r eschew_ctime_r
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif
|
47
lib/time_r.c
Normal file
47
lib/time_r.c
Normal file
|
@ -0,0 +1,47 @@
|
|||
/* Reentrant time functions like localtime_r.
|
||||
|
||||
Copyright (C) 2003, 2006, 2007 Free Software Foundation, Inc.
|
||||
|
||||
This program 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 version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <string.h>
|
||||
|
||||
static struct tm *
|
||||
copy_tm_result (struct tm *dest, struct tm const *src)
|
||||
{
|
||||
if (! src)
|
||||
return 0;
|
||||
*dest = *src;
|
||||
return dest;
|
||||
}
|
||||
|
||||
|
||||
struct tm *
|
||||
gmtime_r (time_t const * restrict t, struct tm * restrict tp)
|
||||
{
|
||||
return copy_tm_result (tp, gmtime (t));
|
||||
}
|
||||
|
||||
struct tm *
|
||||
localtime_r (time_t const * restrict t, struct tm * restrict tp)
|
||||
{
|
||||
return copy_tm_result (tp, localtime (t));
|
||||
}
|
140
lib/verify.h
Normal file
140
lib/verify.h
Normal file
|
@ -0,0 +1,140 @@
|
|||
/* Compile-time assert-like macros.
|
||||
|
||||
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program 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 version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
|
||||
|
||||
#ifndef VERIFY_H
|
||||
# define VERIFY_H 1
|
||||
|
||||
/* Each of these macros verifies that its argument R is nonzero. To
|
||||
be portable, R should be an integer constant expression. Unlike
|
||||
assert (R), there is no run-time overhead.
|
||||
|
||||
There are two macros, since no single macro can be used in all
|
||||
contexts in C. verify_true (R) is for scalar contexts, including
|
||||
integer constant expression contexts. verify (R) is for declaration
|
||||
contexts, e.g., the top level.
|
||||
|
||||
Symbols ending in "__" are private to this header.
|
||||
|
||||
The code below uses several ideas.
|
||||
|
||||
* The first step is ((R) ? 1 : -1). Given an expression R, of
|
||||
integral or boolean or floating-point type, this yields an
|
||||
expression of integral type, whose value is later verified to be
|
||||
constant and nonnegative.
|
||||
|
||||
* Next this expression W is wrapped in a type
|
||||
struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }.
|
||||
If W is negative, this yields a compile-time error. No compiler can
|
||||
deal with a bit-field of negative size.
|
||||
|
||||
One might think that an array size check would have the same
|
||||
effect, that is, that the type struct { unsigned int dummy[W]; }
|
||||
would work as well. However, inside a function, some compilers
|
||||
(such as C++ compilers and GNU C) allow local parameters and
|
||||
variables inside array size expressions. With these compilers,
|
||||
an array size check would not properly diagnose this misuse of
|
||||
the verify macro:
|
||||
|
||||
void function (int n) { verify (n < 0); }
|
||||
|
||||
* For the verify macro, the struct verify_type__ will need to
|
||||
somehow be embedded into a declaration. To be portable, this
|
||||
declaration must declare an object, a constant, a function, or a
|
||||
typedef name. If the declared entity uses the type directly,
|
||||
such as in
|
||||
|
||||
struct dummy {...};
|
||||
typedef struct {...} dummy;
|
||||
extern struct {...} *dummy;
|
||||
extern void dummy (struct {...} *);
|
||||
extern struct {...} *dummy (void);
|
||||
|
||||
two uses of the verify macro would yield colliding declarations
|
||||
if the entity names are not disambiguated. A workaround is to
|
||||
attach the current line number to the entity name:
|
||||
|
||||
#define GL_CONCAT0(x, y) x##y
|
||||
#define GL_CONCAT(x, y) GL_CONCAT0 (x, y)
|
||||
extern struct {...} * GL_CONCAT(dummy,__LINE__);
|
||||
|
||||
But this has the problem that two invocations of verify from
|
||||
within the same macro would collide, since the __LINE__ value
|
||||
would be the same for both invocations.
|
||||
|
||||
A solution is to use the sizeof operator. It yields a number,
|
||||
getting rid of the identity of the type. Declarations like
|
||||
|
||||
extern int dummy [sizeof (struct {...})];
|
||||
extern void dummy (int [sizeof (struct {...})]);
|
||||
extern int (*dummy (void)) [sizeof (struct {...})];
|
||||
|
||||
can be repeated.
|
||||
|
||||
* Should the implementation use a named struct or an unnamed struct?
|
||||
Which of the following alternatives can be used?
|
||||
|
||||
extern int dummy [sizeof (struct {...})];
|
||||
extern int dummy [sizeof (struct verify_type__ {...})];
|
||||
extern void dummy (int [sizeof (struct {...})]);
|
||||
extern void dummy (int [sizeof (struct verify_type__ {...})]);
|
||||
extern int (*dummy (void)) [sizeof (struct {...})];
|
||||
extern int (*dummy (void)) [sizeof (struct verify_type__ {...})];
|
||||
|
||||
In the second and sixth case, the struct type is exported to the
|
||||
outer scope; two such declarations therefore collide. GCC warns
|
||||
about the first, third, and fourth cases. So the only remaining
|
||||
possibility is the fifth case:
|
||||
|
||||
extern int (*dummy (void)) [sizeof (struct {...})];
|
||||
|
||||
* This implementation exploits the fact that GCC does not warn about
|
||||
the last declaration mentioned above. If a future version of GCC
|
||||
introduces a warning for this, the problem could be worked around
|
||||
by using code specialized to GCC, e.g.,:
|
||||
|
||||
#if 4 <= __GNUC__
|
||||
# define verify(R) \
|
||||
extern int (* verify_function__ (void)) \
|
||||
[__builtin_constant_p (R) && (R) ? 1 : -1]
|
||||
#endif
|
||||
|
||||
* In C++, any struct definition inside sizeof is invalid.
|
||||
Use a template type to work around the problem. */
|
||||
|
||||
|
||||
/* Verify requirement R at compile-time, as an integer constant expression.
|
||||
Return 1. */
|
||||
|
||||
# ifdef __cplusplus
|
||||
template <int w>
|
||||
struct verify_type__ { unsigned int verify_error_if_negative_size__: w; };
|
||||
# define verify_true(R) \
|
||||
(!!sizeof (verify_type__<(R) ? 1 : -1>))
|
||||
# else
|
||||
# define verify_true(R) \
|
||||
(!!sizeof \
|
||||
(struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; }))
|
||||
# endif
|
||||
|
||||
/* Verify requirement R at compile-time, as a declaration without a
|
||||
trailing ';'. */
|
||||
|
||||
# define verify(R) extern int (* verify_function__ (void)) [verify_true (R)]
|
||||
|
||||
#endif
|
93
lib/wchar.in.h
Normal file
93
lib/wchar.in.h
Normal file
|
@ -0,0 +1,93 @@
|
|||
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
|
||||
|
||||
Copyright (C) 2007-2008 Free Software Foundation, Inc.
|
||||
|
||||
This program 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 version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||
|
||||
/* Written by Eric Blake. */
|
||||
|
||||
/*
|
||||
* ISO C 99 <wchar.h> for platforms that have issues.
|
||||
* <http://www.opengroup.org/susv3xbd/wchar.h.html>
|
||||
*
|
||||
* For now, this just ensures proper prerequisite inclusion order and
|
||||
* the declaration of wcwidth().
|
||||
*/
|
||||
|
||||
@PRAGMA_SYSTEM_HEADER@
|
||||
|
||||
#ifdef __need_mbstate_t
|
||||
/* Special invocation convention inside uClibc header files. */
|
||||
|
||||
#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
|
||||
|
||||
#else
|
||||
/* Normal invocation convention. */
|
||||
|
||||
#ifndef _GL_WCHAR_H
|
||||
|
||||
/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
|
||||
<wchar.h>.
|
||||
BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
|
||||
included before <wchar.h>. */
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
/* Include the original <wchar.h> if it exists.
|
||||
Some builds of uClibc lack it. */
|
||||
/* The include_next requires a split double-inclusion guard. */
|
||||
#if @HAVE_WCHAR_H@
|
||||
# @INCLUDE_NEXT@ @NEXT_WCHAR_H@
|
||||
#endif
|
||||
|
||||
#ifndef _GL_WCHAR_H
|
||||
#define _GL_WCHAR_H
|
||||
|
||||
/* The definition of GL_LINK_WARNING is copied here. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/* Return the number of screen columns needed for WC. */
|
||||
#if @GNULIB_WCWIDTH@
|
||||
# if @REPLACE_WCWIDTH@
|
||||
# undef wcwidth
|
||||
# define wcwidth rpl_wcwidth
|
||||
extern int wcwidth (wchar_t);
|
||||
# else
|
||||
# if !defined wcwidth && !@HAVE_DECL_WCWIDTH@
|
||||
/* wcwidth exists but is not declared. */
|
||||
extern int wcwidth (int /* actually wchar_t */);
|
||||
# endif
|
||||
# endif
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef wcwidth
|
||||
# define wcwidth(w) \
|
||||
(GL_LINK_WARNING ("wcwidth is unportable - " \
|
||||
"use gnulib module wcwidth for portability"), \
|
||||
wcwidth (w))
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _GL_WCHAR_H */
|
||||
#endif /* _GL_WCHAR_H */
|
||||
#endif
|
|
@ -1,45 +0,0 @@
|
|||
gen-scmconfig
|
||||
gen-scmconfig.h
|
||||
*.bb
|
||||
*.bbg
|
||||
*.c.clean.c
|
||||
*.da
|
||||
*.doc
|
||||
*.gcov
|
||||
*.la
|
||||
*.lo
|
||||
*.x
|
||||
.deps
|
||||
.libs
|
||||
Makefile
|
||||
Makefile.in
|
||||
c-tokenize.c
|
||||
config.cache
|
||||
config.log
|
||||
config.status
|
||||
cpp_err_symbols.c
|
||||
cpp_sig_symbols.c
|
||||
errnos.list
|
||||
fd.h
|
||||
gh_test_c
|
||||
gh_test_repl
|
||||
guile
|
||||
guile-doc-snarf
|
||||
guile-func-name-check
|
||||
guile-procedures.texi
|
||||
guile-procedures.txt
|
||||
guile-snarf
|
||||
guile-snarf-docs
|
||||
guile-snarf-docs-texi
|
||||
guile-snarf.awk
|
||||
guile.texi
|
||||
guile_filter_doc_snarfage
|
||||
libpath.h
|
||||
libtool
|
||||
scmconfig.h
|
||||
scmconfig.h.in
|
||||
stamp-h
|
||||
stamp-h.in
|
||||
stamp-h1
|
||||
version.h
|
||||
versiondat.h
|
|
@ -1,3 +1,17 @@
|
|||
2008-08-29 Julian Graham <joolean@gmail.com>
|
||||
|
||||
* threads.c (fat_mutex_lock): Resolve a deadlock caused by not
|
||||
checking mutex state after calling `SCM_TICK'.
|
||||
|
||||
2008-08-27 Ludovic Courtès <ludo@gnu.org>
|
||||
|
||||
Fix builds `--without-threads'. Reported by Han-Wen Nienhuys
|
||||
<hanwen@xs4all.nl>.
|
||||
|
||||
* scmsigs.c (scm_i_close_signal_pipe): Don't refer to
|
||||
`signal_pipe' unless `SCM_USE_PTHREAD_THREADS' is true.
|
||||
* threads.c (scm_leave_guile_cleanup): Mark as `SCM_UNUSED'.
|
||||
|
||||
2008-08-25 Ludovic Courtès <ludo@gnu.org>
|
||||
|
||||
* Makefile.am (AM_CFLAGS): New.
|
|
@ -1,256 +0,0 @@
|
|||
The gh implementation (gh_data.c, gh.h, etc.) used to live in a
|
||||
separate directory called gh. In April 1997, that dir was merged with
|
||||
libguile; this is the ChangeLog from the old directory.
|
||||
|
||||
Please put new entries in the ordinary ChangeLog.
|
||||
|
||||
Thu Apr 10 16:14:43 1997 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
Let the test programs build even when we're not using threads.
|
||||
* configure.in: Use CY_AC_WITH_THREADS to decide whether to build
|
||||
with threads.
|
||||
* Makefile.am (check_PROGRAMS_LDADD): Remove -lthreads -lqt. The
|
||||
configure script will stick them in LIBS if they're needed.
|
||||
* Makefile.in, aclocal.m4, configure: Rebuilt.
|
||||
|
||||
* gh_funcs.c (gh_apply, gh_call0, gh_call1, gh_call2, gh_call3):
|
||||
New functions.
|
||||
* gh.h: Prototypes for above.
|
||||
* gh_test_c.c (main_prog): Added test cases for above.
|
||||
|
||||
* gh.h (gh_display, gh_newline): Added prototypes.
|
||||
|
||||
* gh_test_c.c (main_prog): Remove bizarre single quote from test
|
||||
of gh_symbol2scm, and from "test" of (display "hello world").
|
||||
|
||||
* gh.c: Removed; its guts have been redistributed to the other
|
||||
gh-mumble.c files.
|
||||
|
||||
* gh.c, gh_data.c, gh_eval.c, gh_funcs.c, gh_init.c, gh_io.c,
|
||||
gh_list.c, gh_predicates.c, gh_test_c.c, gh_test_repl.c:
|
||||
Re-indented, according to the GNU coding standards. (Put function
|
||||
names at beginning of lines, basically.)
|
||||
|
||||
Wed Apr 9 17:56:34 1997 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
Changes to work with automake-1.1n, which has better libtool support.
|
||||
* Makefile.am: Use lib_LTLIBRARIES, not lib_PROGRAMS.
|
||||
* Makefile.in: Regenerated.
|
||||
|
||||
Sat Mar 8 06:37:23 1997 Gary Houston <ghouston@actrix.gen.nz>
|
||||
|
||||
* gh_eval.c (gh_eval_file): remove case_i, sharp arguments from
|
||||
scm_primitive_load call.
|
||||
|
||||
Mon Feb 24 21:45:32 1997 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
|
||||
|
||||
* configure.in: Added AM_MAINTAINER_MODE
|
||||
|
||||
Wed Feb 12 16:34:42 1997 Mark Galassi <rosalia@sarastro.lanl.gov>
|
||||
|
||||
* gh_data.c (gh_symbol2newstr): added this conversion from SCM
|
||||
symbol to C string.
|
||||
(gh_set_substr): more data conversion: from part of a (possibly
|
||||
large) C string to an existing SCM string.
|
||||
(gh_get_substr): more data conversion: from part of a (possibly
|
||||
large) SCM string to an existing C char array.
|
||||
|
||||
Mon Feb 10 14:03:09 1997 Mark Galassi <rosalia@sarastro.lanl.gov>
|
||||
|
||||
* gh_funcs.c (gh_define): added this function.
|
||||
|
||||
* gh_init.c (gh_catch): fixed stupid bug, gh_catch() was not
|
||||
returning anything.
|
||||
|
||||
* gh_data.c (gh_scm2newstr): Renamed gh_scm2str0() to
|
||||
gh_scm2newstr(), and did away with the str0 convention (it doesn't
|
||||
seem to belong in gh_).
|
||||
(gh_scm2str): this function now copies Scheme data to a
|
||||
pre-allocated C string.
|
||||
|
||||
Fri Feb 7 15:12:30 1997 Mark Galassi <rosalia@sarastro.lanl.gov>
|
||||
|
||||
* gh_data.c (gh_scm2str0): On Sascha Ziemann and Jim Blandy's
|
||||
suggestion I changed gh_scm2str0() so that it returns a malloc-ed
|
||||
string, rather than taking a pre-allocated string with a maximum
|
||||
length...
|
||||
|
||||
Fri Jan 24 08:18:28 1997 Mark Galassi <rosalia@sarastro.lanl.gov>
|
||||
|
||||
* gh_eval.c (gh_eval_str): gh_eval_str() now returns an SCM object
|
||||
with the result of the evaluation. It has also been simplified to
|
||||
just call scm_eval_0str(). gh_eval_file() has been similarly
|
||||
altered.
|
||||
|
||||
Sat Jan 11 14:40:17 1997 Marius Vollmer <mvo@zagadka.ping.de>
|
||||
|
||||
* ltconfig, ltmain.sh: New files for libtool support. libguile,
|
||||
rx, gh and gtcltk-lib can now be build as shared libraries.
|
||||
* Makefile.am (EXTRA_DIST): Added ltconfig and ltmain.sh
|
||||
|
||||
Sun Jan 5 16:57:10 1997 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
* Guile 1.0 released. This is the first release by the Free
|
||||
Software Foundation; Cygnus has also released earlier versions of
|
||||
Guile.
|
||||
|
||||
* GUILE-VERSION: Updated version number.
|
||||
* NEWS: Added comments for all the user-visible changes marked in
|
||||
the ChangeLogs.
|
||||
* README: Updated for release.
|
||||
|
||||
Thu Dec 12 00:14:32 1996 Gary Houston <ghouston@actrix.gen.nz>
|
||||
|
||||
* scsh: new directory.
|
||||
|
||||
Mon Dec 2 17:33:04 1996 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* configure.in: Generate doc/guile-programmer/Makefile and
|
||||
doc/guile-user/Makefile.
|
||||
|
||||
Sat Nov 30 23:45:54 1996 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* aclocal.m4: Now automatically generated by aclocal.
|
||||
* threads.m4: New file.
|
||||
* guile.m4: New file.
|
||||
* Makefile.am, doc/Makefile.am: New files.
|
||||
* configure.in: Updated for Automake. Avoid excessively verbose
|
||||
"greet" messages.
|
||||
|
||||
Wed Oct 16 07:32:14 1996 Mark Galassi <rosalia@sarastro.lanl.gov>
|
||||
|
||||
* lgh: directory renamed to gh, along with all prefixes of the
|
||||
high level library procedures.
|
||||
|
||||
Thu Oct 10 14:37:43 1996 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
* Makefile.in (TAGS tags): Find the source files in $srcdir.
|
||||
|
||||
Wed Oct 9 19:37:14 1996 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
* Makefile.in (DISTFILES): Add AUTHORS and aclocal.m4.
|
||||
|
||||
Tue Oct 1 00:13:55 1996 Mikael Djurfeldt <mdj@woody.nada.kth.se>
|
||||
|
||||
* configure.in: Added some configuration magic from the Cygnus
|
||||
distribution.
|
||||
|
||||
* aclocal.m4: New file. For now used for thread support
|
||||
configuration.
|
||||
|
||||
Fri Sep 13 14:39:30 1996 Mark Galassi <rosalia@sarastro.lanl.gov>
|
||||
|
||||
* Makefile.in (DISTFILES): added mkinstalldirs to the DISTFILES
|
||||
|
||||
* PLUGIN: changed the PLUGIN/REQ files in the ice-9 and lgh
|
||||
directories, to arrange for lgh to the last thing
|
||||
configured/built.
|
||||
|
||||
Wed Sep 11 21:11:33 1996 Mark Galassi <rosalia@nis.lanl.gov>
|
||||
|
||||
* lgh/: added the directory in which I implement the high level
|
||||
libguile library (lgh_) for this release of Guile. See the
|
||||
ChangeLog in there for further details.
|
||||
|
||||
Wed Sep 11 16:12:53 1996 Mark Galassi <rosalia@sarastro.lanl.gov>
|
||||
|
||||
* doc/ (guile-user and guile-programmer): added the guile-user and
|
||||
guile-programmer directories which contain the user and programmer
|
||||
manuals. See the ChangeLog entries there for detail.
|
||||
|
||||
Wed Sep 11 14:33:49 1996 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
* Makefile.in (distclean): Don't forget to delete doc/Makefile.
|
||||
|
||||
* Makefile.in (distclean): Don't forget to delete
|
||||
config.build-subdirs.
|
||||
|
||||
Thu Sep 5 17:36:15 1996 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
* Makefile.in (tags): New name for `TAGS' target, which will
|
||||
always run the commands.
|
||||
|
||||
Thu Sep 5 09:56:50 1996 Jim Blandy <jimb@totoro.cyclic.com>
|
||||
|
||||
* README: Doc fixes.
|
||||
|
||||
Fri Aug 30 16:56:27 1996 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
* Makefile.in (TAGS): Produce a single tags file for all of Guile.
|
||||
|
||||
Thu Aug 15 19:03:03 1996 Jim Blandy <jimb@floss.cyclic.com>
|
||||
|
||||
* configure.in: Check for -ldl, so the check for Tcl won't fail
|
||||
spuriously.
|
||||
|
||||
Thu Aug 15 01:29:29 1996 Jim Blandy <jimb@totoro.cyclic.com>
|
||||
|
||||
Change the way we decide whether to build gtcltk-lib, so that it's
|
||||
omitted from the build process when appropriate, but never from
|
||||
the dist process.
|
||||
* configure.in: Don't edit all_subdirs depending on the
|
||||
availability of Tk; let that be the list of all PLUGIN
|
||||
subdirectories present, as it used to be. Instead, edit a new
|
||||
variable, build_subdirs; write its final value, the list of
|
||||
subdirs we do want to compile in, to config.build-subdirs.
|
||||
Substitute that into the top-level Makefile too.
|
||||
* Makefile.in (subdirs): Set this to @build_subdirs@, so we only
|
||||
recurse on the subdirectories we should build.
|
||||
(distdirs): Set this to @existingdirs@, so it includes the subdirs
|
||||
we decided not to build.
|
||||
|
||||
* doc/gtcltk.texi: File resurrected from old Guile releases.
|
||||
* doc/Makefile.in (info): Build the gtcltk documentation.
|
||||
(DIST_FILES): Include it in the distribution.
|
||||
|
||||
* configure.in: If we can find the library for tcl7.5, build
|
||||
gtcltk-lib. Call AC_PROG_CC, to help run that test with the right
|
||||
compiler (not sure this is necessary).
|
||||
|
||||
Mon Aug 12 15:09:37 1996 Jim Blandy <jimb@totoro.cyclic.com>
|
||||
|
||||
* NEWS: Fix bug reporting address.
|
||||
|
||||
Fri Aug 9 15:58:42 1996 Jim Blandy <jimb@totoro.cyclic.com>
|
||||
|
||||
* AUTHORS: New file, in accordance with the GNU maintainers'
|
||||
standards.
|
||||
|
||||
Tue Aug 6 14:40:44 1996 Jim Blandy <jimb@totoro.cyclic.com>
|
||||
|
||||
* README: Renamed from ANNOUNCE; include bug report address,
|
||||
description, and short tour.
|
||||
* INSTALL: Renamed from BUILDING.
|
||||
* NEWS: New file.
|
||||
* Makefile.in (DISTFILES): Update appropriately.
|
||||
|
||||
Thu Aug 1 02:31:53 1996 Jim Blandy <jimb@totoro.cyclic.com>
|
||||
|
||||
* doc/Makefile.in: Added pattern targets for creating DVI and
|
||||
PostScript files.
|
||||
(%.ps, %.dvi, %.txt): New targets.
|
||||
(DVIPS, TEXI2DVI): New variables.
|
||||
|
||||
* GUILE-VERSION: Updated to 1.0b3.
|
||||
|
||||
Rehashed distribution system, in preparation for nightly
|
||||
snapshots. Other changes in subdirectories.
|
||||
* Makefile.in (dist): Rewritten --- the old target was out of
|
||||
date, dependent on files that we don't have, and relied on GNU
|
||||
tar. The new target is simpler.
|
||||
(VERSION, srcdir, dist_dirs): New variables.
|
||||
(DISTFILES): Renamed from localfiles. Added GUILE-VERSION and
|
||||
TODO.
|
||||
(localtreats): Variable removed. We don't have this file.
|
||||
(info): cd to doc and make info there; don't make info in every
|
||||
${subdir}; those Makefiles don't know what to do.
|
||||
(distname, distdir, treats, announcefile): Variables removed.
|
||||
(manifest-file): Target removed.
|
||||
(dist-dir): New target, responsible for distributable files in
|
||||
this directory.
|
||||
(GZIP, GZIP_EXT, TAR_VERBOSE, DIST_NAME): New variables,
|
||||
controlling the 'dist' target.
|
||||
* configure.in: Substitute GUILE-VERSION into the top-level
|
||||
Makefile. Build doc/Makefile from doc/Makefile.in.
|
||||
|
||||
* doc/Makefile.in: New file.
|
|
@ -111,8 +111,7 @@ libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c \
|
|||
eval.c evalext.c extensions.c feature.c fluids.c fports.c \
|
||||
futures.c gc.c gc-mark.c gc-segment.c gc-malloc.c gc-card.c \
|
||||
gc-freelist.c gc_os_dep.c gdbint.c gettext.c gc-segment-table.c \
|
||||
gh_data.c gh_eval.c gh_funcs.c \
|
||||
gh_init.c gh_io.c gh_list.c gh_predicates.c goops.c gsubr.c \
|
||||
goops.c gsubr.c \
|
||||
guardians.c hash.c hashtab.c hooks.c init.c inline.c \
|
||||
ioext.c keywords.c lang.c list.c load.c macros.c mallocs.c \
|
||||
modules.c numbers.c objects.c objprop.c options.c pairs.c ports.c \
|
||||
|
@ -219,7 +218,7 @@ libguile_la_LIBADD = @LIBLOBJS@ $(gnulib_library)
|
|||
libguile_la_LDFLAGS = @LTLIBINTL@ -version-info @LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@ -export-dynamic -no-undefined
|
||||
|
||||
# These are headers visible as <guile/mumble.h>
|
||||
pkginclude_HEADERS = gh.h
|
||||
pkginclude_HEADERS =
|
||||
|
||||
# These are headers visible as <libguile/mumble.h>.
|
||||
modincludedir = $(includedir)/libguile
|
||||
|
@ -252,11 +251,11 @@ bin_SCRIPTS = guile-snarf
|
|||
# and people feel like maintaining them. For now, this is not the case.
|
||||
noinst_SCRIPTS = guile-doc-snarf guile-snarf-docs guile-func-name-check
|
||||
|
||||
EXTRA_DIST = ChangeLog-gh ChangeLog-scm ChangeLog-threads \
|
||||
ChangeLog-1996-1999 ChangeLog-2000 cpp_signal.c \
|
||||
cpp_errno.c cpp_err_symbols.in cpp_err_symbols.c \
|
||||
cpp_sig_symbols.c cpp_sig_symbols.in cpp_cnvt.awk \
|
||||
c-tokenize.lex version.h.in \
|
||||
EXTRA_DIST = ChangeLog-scm ChangeLog-threads \
|
||||
ChangeLog-1996-1999 ChangeLog-2000 ChangeLog-2008 cpp_signal.c \
|
||||
cpp_errno.c cpp_err_symbols.in cpp_err_symbols.c \
|
||||
cpp_sig_symbols.c cpp_sig_symbols.in cpp_cnvt.awk \
|
||||
c-tokenize.lex version.h.in \
|
||||
scmconfig.h.top libgettext.h
|
||||
# $(DOT_DOC_FILES) $(EXTRA_DOT_DOC_FILES) \
|
||||
# guile-procedures.txt guile.texi
|
||||
|
|
|
@ -197,6 +197,14 @@
|
|||
#define SCM_DEBUG 0
|
||||
#endif
|
||||
|
||||
/* For debugging purposes: define this is to ensure nobody is using
|
||||
* the mark bits outside of the marking phase. This is meant for
|
||||
* debugging purposes only.
|
||||
*/
|
||||
#ifndef SCM_DEBUG_MARKING_API
|
||||
#define SCM_DEBUG_MARKING_API 0
|
||||
#endif
|
||||
|
||||
/* If SCM_DEBUG_CELL_ACCESSES is set to 1, cell accesses will perform
|
||||
* exhaustive parameter checking: It will be verified that cell parameters
|
||||
* actually point to a valid heap cell. Note: If this option is enabled,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 96, 97, 98, 99, 2000, 2001, 2004, 2006, 2008 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
|
||||
|
@ -17,6 +17,10 @@
|
|||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "libguile/_scm.h"
|
||||
#include "libguile/eq.h"
|
||||
#include "libguile/list.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
allocating any. It is a good idea to use alloca(0) in
|
||||
your main control loop, etc. to force garbage collection. */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995,1996, 1997, 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996, 1997, 2000, 2001, 2004, 2005, 2006, 2008 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
|
||||
|
@ -17,6 +17,9 @@
|
|||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "libguile/_scm.h"
|
||||
#include "libguile/ports.h"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995, 1996, 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995, 1996, 2000, 2001, 2006, 2008 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
|
||||
|
@ -17,6 +17,9 @@
|
|||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "libguile/_scm.h"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995,1996,1998, 2000, 2001, 2004, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1998, 2000, 2001, 2004, 2006, 2008 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
|
||||
|
@ -17,6 +17,9 @@
|
|||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <limits.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1995,1996,1998,2000,2001,2004, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 1995,1996,1998,2000,2001,2004, 2006, 2008 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
|
||||
|
@ -17,6 +17,9 @@
|
|||
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "libguile/_scm.h"
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,221 +0,0 @@
|
|||
/* classes: h_files */
|
||||
|
||||
#ifndef SCM_COOP_DEFS_H
|
||||
#define SCM_COOP_DEFS_H
|
||||
|
||||
/* 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
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "libguile/__scm.h"
|
||||
#include "libguile/iselect.h"
|
||||
|
||||
#if SCM_HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#ifdef GUILE_PTHREAD_COMPAT
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
|
||||
/* This file is included by threads.h, which, in turn, is included by
|
||||
libguile.h while coop-threads.h only is included by
|
||||
coop-threads.c. */
|
||||
|
||||
/* The coop_t struct must be declared here, since macros in this file
|
||||
refer to the data member. */
|
||||
|
||||
/* The notion of a thread is merged with the notion of a queue.
|
||||
Thread stuff: thread status (sp) and stuff to use during
|
||||
(re)initialization. Queue stuff: next thread in the queue
|
||||
(next). */
|
||||
|
||||
struct qt_t;
|
||||
|
||||
typedef struct coop_t {
|
||||
struct qt_t *sp; /* QuickThreads handle. */
|
||||
void *sto; /* `malloc'-allocated stack. */
|
||||
|
||||
struct coop_t *next; /* Next thread in the queue. */
|
||||
|
||||
struct coop_t *all_next;
|
||||
struct coop_t *all_prev;
|
||||
|
||||
void *data; /* Thread local data */
|
||||
void **specific; /* Data associated with keys */
|
||||
int n_keys; /* Upper limit for keys on this thread */
|
||||
|
||||
void *base; /* Base of stack */
|
||||
void *top; /* Top of stack */
|
||||
|
||||
void *joining; /* A queue of threads waiting to join this
|
||||
thread */
|
||||
|
||||
SCM handle; /* SCM handle, protected via scm_all_threads. */
|
||||
|
||||
int nfds;
|
||||
SELECT_TYPE *readfds;
|
||||
SELECT_TYPE *writefds;
|
||||
SELECT_TYPE *exceptfds;
|
||||
int timeoutp;
|
||||
struct timeval wakeup_time; /* Time to stop sleeping */
|
||||
int _errno;
|
||||
int retval;
|
||||
|
||||
#ifdef GUILE_PTHREAD_COMPAT
|
||||
pthread_t dummy_thread;
|
||||
pthread_mutex_t dummy_mutex;
|
||||
#endif
|
||||
} coop_t;
|
||||
|
||||
/* A queue is a circular list of threads. The queue head is a
|
||||
designated list element. If this is a uniprocessor-only
|
||||
implementation we can store the `main' thread in this, but in a
|
||||
multiprocessor there are several `heavy' threads but only one run
|
||||
queue. A fancier implementation might have private run queues,
|
||||
which would lead to a simpler (trivial) implementation */
|
||||
|
||||
typedef struct coop_q_t {
|
||||
coop_t t;
|
||||
coop_t *tail;
|
||||
} coop_q_t;
|
||||
|
||||
/* A Mutex variable is made up of a owner thread, and a queue of threads
|
||||
waiting on the mutex */
|
||||
|
||||
typedef struct coop_m {
|
||||
coop_t *owner; /* Mutex owner */
|
||||
int level; /* for recursive locks. */
|
||||
coop_q_t waiting; /* Queue of waiting threads */
|
||||
} coop_m;
|
||||
|
||||
typedef int coop_mattr;
|
||||
|
||||
SCM_API int coop_mutex_init (coop_m*);
|
||||
SCM_API int coop_new_mutex_init (coop_m*, coop_mattr*);
|
||||
SCM_API int coop_mutex_lock (coop_m*);
|
||||
SCM_API int coop_mutex_trylock (coop_m*);
|
||||
SCM_API int coop_mutex_unlock (coop_m*);
|
||||
SCM_API int coop_mutex_destroy (coop_m*);
|
||||
|
||||
/* A Condition variable is made up of a list of threads waiting on the
|
||||
condition. */
|
||||
|
||||
typedef struct coop_c {
|
||||
coop_q_t waiting; /* Queue of waiting threads */
|
||||
} coop_c;
|
||||
|
||||
typedef int coop_cattr;
|
||||
|
||||
SCM_API int coop_condition_variable_init (coop_c*);
|
||||
SCM_API int coop_new_condition_variable_init (coop_c*, coop_cattr*);
|
||||
SCM_API int coop_condition_variable_wait_mutex (coop_c*, coop_m*);
|
||||
SCM_API int coop_condition_variable_timed_wait_mutex (coop_c*,
|
||||
coop_m*,
|
||||
const scm_t_timespec *abstime);
|
||||
SCM_API int coop_condition_variable_signal (coop_c*);
|
||||
SCM_API int coop_condition_variable_broadcast (coop_c*);
|
||||
SCM_API int coop_condition_variable_destroy (coop_c*);
|
||||
|
||||
typedef int coop_k;
|
||||
|
||||
typedef coop_k scm_t_key;
|
||||
|
||||
SCM_API int coop_key_create (coop_k *keyp, void (*destruktor) (void *value));
|
||||
SCM_API int coop_setspecific (coop_k key, const void *value);
|
||||
SCM_API void *coop_getspecific (coop_k key);
|
||||
SCM_API int coop_key_delete (coop_k);
|
||||
#define scm_key_create coop_key_create
|
||||
#define scm_setspecific coop_setspecific
|
||||
#define scm_getspecific coop_getspecific
|
||||
#define scm_key_delete coop_key_delete
|
||||
|
||||
SCM_API coop_t *coop_global_curr; /* Currently-executing thread. */
|
||||
|
||||
SCM_API void coop_join (coop_t *t);
|
||||
SCM_API void coop_yield (void);
|
||||
|
||||
SCM_API size_t scm_switch_counter;
|
||||
SCM_API size_t scm_thread_count;
|
||||
|
||||
|
||||
/* Some iselect functions. */
|
||||
|
||||
/* I'm not sure whether these three declarations should be here.
|
||||
They're really defined in iselect.c, so you'd think they'd go in
|
||||
iselect.h, but they use coop_t, defined above, which uses things
|
||||
defined in iselect.h. Basically, we're making at best a flailing
|
||||
(and failing) attempt at modularity here, and I don't have time to
|
||||
rethink this at the moment. This code awaits a Hero. --JimB
|
||||
*/
|
||||
SCM_API void coop_timeout_qinsert (coop_q_t *, coop_t *);
|
||||
SCM_API coop_t *coop_next_runnable_thread (void);
|
||||
SCM_API coop_t *coop_wait_for_runnable_thread_now (struct timeval *);
|
||||
SCM_API coop_t *coop_wait_for_runnable_thread (void);
|
||||
|
||||
|
||||
|
||||
|
||||
/* Cooperative threads don't need to have these defined */
|
||||
|
||||
#define SCM_CRITICAL_SECTION_START
|
||||
#define SCM_CRITICAL_SECTION_END
|
||||
|
||||
|
||||
|
||||
#define SCM_NO_CRITICAL_SECTION_OWNER 0
|
||||
#define SCM_THREAD_SWITCH_COUNT 50 /* was 10 /mdj */
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
#define SCM_THREAD_SWITCHING_CODE \
|
||||
do { \
|
||||
if (scm_thread_count > 1) \
|
||||
coop_yield(); \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
#define SCM_THREAD_SWITCHING_CODE \
|
||||
do { \
|
||||
if (scm_thread_count > 1) \
|
||||
{ \
|
||||
scm_switch_counter--; \
|
||||
if (scm_switch_counter == 0) \
|
||||
{ \
|
||||
scm_switch_counter = SCM_THREAD_SWITCH_COUNT; \
|
||||
coop_yield(); \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
||||
/* For pthreads, this is a value associated with a specific key.
|
||||
* For coop, we use a special field for increased efficiency.
|
||||
*/
|
||||
#define SCM_THREAD_LOCAL_DATA (coop_global_curr->data)
|
||||
#define SCM_SET_THREAD_LOCAL_DATA(ptr) (coop_global_curr->data = (ptr))
|
||||
|
||||
#endif /* SCM_COOP_DEFS_H */
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
c-file-style: "gnu"
|
||||
End:
|
||||
*/
|
|
@ -1,105 +0,0 @@
|
|||
/* classes: h_files */
|
||||
|
||||
#ifndef SCM_COOP_THREADS_H
|
||||
#define SCM_COOP_THREADS_H
|
||||
|
||||
/* 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
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/* This file is only included by coop-threads.c while coop-defs.h is
|
||||
included by threads.h, which, in turn, is included by
|
||||
libguile.h. */
|
||||
|
||||
/* The coop_t struct is declared in coop-defs.h. */
|
||||
|
||||
#include "libguile/__scm.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include "libguile/coop-defs.h"
|
||||
#include "qt/qt.h"
|
||||
|
||||
/* This code is based on a sample thread libraru by David Keppel.
|
||||
Portions of this file fall under the following copyright: */
|
||||
|
||||
/*
|
||||
* QuickThreads -- Threads-building toolkit.
|
||||
* Copyright (c) 1993 by David Keppel
|
||||
*
|
||||
* Permission to use, copy, modify and distribute this software and
|
||||
* its documentation for any purpose and without fee is hereby
|
||||
* granted, provided that the above copyright notice and this notice
|
||||
* appear in all copies. This software is provided as a
|
||||
* proof-of-concept and for demonstration purposes; there is no
|
||||
* representation about the suitability of this software for any
|
||||
* purpose.
|
||||
*/
|
||||
|
||||
/* Each thread starts by calling a user-supplied function of this
|
||||
type. */
|
||||
|
||||
typedef void (coop_userf_t)(void *p0);
|
||||
|
||||
/* Call this before any other primitives. */
|
||||
SCM_API void coop_init (void);
|
||||
|
||||
/* When one or more threads are created by the main thread,
|
||||
the system goes multithread when this is called. It is done
|
||||
(no more runable threads) when this returns. */
|
||||
|
||||
SCM_API void coop_start (void);
|
||||
|
||||
/* Create a thread and make it runable. When the thread starts
|
||||
running it will call `f' with arguments `p0' and `p1'. */
|
||||
|
||||
SCM_API coop_t *coop_create (coop_userf_t *f, void *p0);
|
||||
|
||||
/* The current thread stops running but stays runable.
|
||||
It is an error to call `coop_yield' before `coop_start'
|
||||
is called or after `coop_start' returns. */
|
||||
|
||||
SCM_API void coop_yield (void);
|
||||
|
||||
/* Like `coop_yield' but the thread is discarded. Any intermediate
|
||||
state is lost. The thread can also terminate by simply
|
||||
returning. */
|
||||
|
||||
SCM_API void coop_abort (void);
|
||||
|
||||
/* The following are needed in iselect.c */
|
||||
|
||||
SCM_API coop_t *coop_qget (coop_q_t *);
|
||||
SCM_API void coop_qput (coop_q_t *, coop_t *);
|
||||
SCM_API void *coop_sleephelp (qt_t *, void *, void *);
|
||||
|
||||
SCM_API coop_t *coop_wait_for_runnable_thread ();
|
||||
|
||||
SCM_API coop_q_t coop_global_runq; /* A queue of runable threads. */
|
||||
SCM_API coop_q_t coop_global_sleepq;
|
||||
SCM_API coop_q_t coop_tmp_queue;
|
||||
SCM_API coop_q_t coop_global_allq; /* A queue of all threads. */
|
||||
SCM_API coop_t *coop_global_curr; /* Currently-executing thread. */
|
||||
|
||||
#endif /* SCM_COOP_THREADS_H */
|
||||
|
||||
/*
|
||||
Local Variables:
|
||||
c-file-style: "gnu"
|
||||
End:
|
||||
*/
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/* Cooperative thread library, based on QuickThreads */
|
||||
|
||||
#if HAVE_CONFIG_H
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2000, 2006 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2000, 2006, 2008 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
|
||||
|
@ -15,6 +15,10 @@
|
|||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue