guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. release_1-9-8-107-g71


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-8-107-g71fada0
Date: Tue, 16 Mar 2010 22:26:56 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=71fada0b6d6106b173bc06b2de5959b039c909e8

The branch, master has been updated
       via  71fada0b6d6106b173bc06b2de5959b039c909e8 (commit)
       via  17ed90df4896a0648d5b6f0171a45ba181cbd68f (commit)
       via  718815d7618fe7766f3620538917849ccc93f36f (commit)
       via  44602b08680ad6422dd88780c23540c0632bcc68 (commit)
       via  89607fab50ed88dff3b6fb5310a6753da8dbaa97 (commit)
       via  462bcfd03847a568b34074ba6fcf4f7f4de3c0fc (commit)
       via  dbf499823f29dcb3329eec8e00ff22762f6b5d49 (commit)
      from  f7cea64566407151de4ff665ec787fca927b908f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 71fada0b6d6106b173bc06b2de5959b039c909e8
Author: Andy Wingo <address@hidden>
Date:   Tue Mar 16 22:56:37 2010 +0100

    cull 1.9.8 NEWS items
    
    * NEWS: Remove 1.9.8 items; they have been folded in already.

commit 17ed90df4896a0648d5b6f0171a45ba181cbd68f
Author: Andy Wingo <address@hidden>
Date:   Tue Mar 16 22:47:35 2010 +0100

    add a section to the manual on prompts
    
    * doc/ref/api-control.texi (Prompts): Add a section on prompts.

-----------------------------------------------------------------------

Summary of changes:
 GUILE-VERSION                     |    4 +-
 Makefile.am                       |    5 +-
 NEWS                              |   77 +------------------------
 doc/ref/api-control.texi          |  118 +++++++++++++++++++++++++++++++++++--
 guile-readline/Makefile.am        |    7 +-
 libguile/Makefile.am              |   23 ++++----
 libguile/bytevectors.c            |    3 +-
 libguile/foreign.c                |    3 +-
 libguile/i18n.c                   |    3 +-
 libguile/instructions.c           |    3 +-
 libguile/objcodes.c               |    3 +-
 libguile/programs.c               |    3 +-
 libguile/version.c                |   11 +---
 libguile/version.h.in             |    3 +-
 libguile/vm.c                     |    3 +-
 meta/guile-2.0-uninstalled.pc.in  |    2 +-
 meta/guile-2.0.pc.in              |    5 +-
 module/ice-9/i18n.scm             |    3 +-
 module/rnrs/bytevector.scm        |    3 +-
 module/rnrs/io/ports.scm          |    3 +-
 module/system/foreign.scm         |    3 +-
 module/system/vm/instruction.scm  |    5 +-
 module/system/vm/objcode.scm      |    5 +-
 module/system/vm/program.scm      |    3 +-
 module/system/vm/vm.scm           |    3 +-
 srfi/Makefile.am                  |   13 ++--
 test-suite/standalone/Makefile.am |   28 +++++-----
 test-suite/tests/version.test     |    7 +--
 28 files changed, 197 insertions(+), 155 deletions(-)

diff --git a/GUILE-VERSION b/GUILE-VERSION
index 89f0a55..0bad19d 100644
--- a/GUILE-VERSION
+++ b/GUILE-VERSION
@@ -4,8 +4,8 @@ GUILE_MAJOR_VERSION=1
 GUILE_MINOR_VERSION=9
 GUILE_MICRO_VERSION=8
 
-GUILE_EFFECTIVE_VERSION=${GUILE_MAJOR_VERSION}.${GUILE_MINOR_VERSION}
-GUILE_VERSION=${GUILE_EFFECTIVE_VERSION}.${GUILE_MICRO_VERSION}
+GUILE_EFFECTIVE_VERSION=2.0
+GUILE_VERSION=${GUILE_MAJOR_VERSION}.${GUILE_MINOR_VERSION}.${GUILE_MICRO_VERSION}
 
 # All of the shared lib versioning info.  Right now, for this to work
 # properly, you'll also need to add AC_SUBST calls to the right place
diff --git a/Makefile.am b/Makefile.am
index 20f0382..bbd1352 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with automake to produce Makefile.in.
 ##
-##     Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006, 2007, 2008, 2009 Free 
Software Foundation, Inc.
+##     Copyright (C) 1998, 1999, 2000, 2001, 2002, 2006, 2007, 2008, 2009, 
2010 Free Software Foundation, Inc.
 ##
 ##   This file is part of GUILE.
 ##
@@ -28,7 +28,8 @@ SUBDIRS = lib meta libguile guile-readline emacs \
          srfi examples test-suite benchmark-suite am \
          module doc testsuite
 
-include_HEADERS = libguile.h
+libguileincludedir = $(pkgincludedir)/$(GUILE_EFFECTIVE_VERSION)
+libguileinclude_HEADERS = libguile.h
 
 EXTRA_DIST = LICENSE HACKING GUILE-VERSION             \
             m4/ChangeLog-2008 \
diff --git a/NEWS b/NEWS
index 4f6ff6a..c348251 100644
--- a/NEWS
+++ b/NEWS
@@ -8,82 +8,7 @@ Please send Guile bug reports to address@hidden
 (During the 1.9 series, we will keep an incremental NEWS for the latest
 prerelease, and a full NEWS corresponding to 1.8 -> 2.0.)
 
-Changes in 1.9.8 (since the 1.9.7 prerelease):
-
-** Struct optimizations
-
-Structs underly many types in Guile, including records and objects. This
-release speeds up struct access and creation.
-
-** Add libffi dependency
-
-Libffi is now required, to build the foreign function interface. See
-http://sourceware.org/libffi/, for more information on libffi.
-
-We are not aware of a platform that Guile runs on for which libffi is
-unavailable.
-
-** Foreign function interface
-
-This release comes with a new `(system foreign)' module.  Currently it
-provides a low level "foreign function interface" (FFI), which allows
-users to write Scheme code to invoke C code, without writing a single
-line of C code.
-
-The `dynamic-link' and `dynamic-func' procedures, which have been
-available for a long time, can be used to get the address of a C
-function as a "foreign" object at the Scheme level; using libffi, Guile
-can construct calls to these functions.
-
-The arguments to a C function may be integers, floating point numbers,
-pointers, and structs.  Numbers are passed using their normal Scheme
-representations, and pointers and structs are represented as foreign
-objects.  Foreign objects can be converted back and forth to/from a
-bytevector.  They can have an associated foreign finalizer (e.g., a
-procedure that will reclaim any associated resources when the object
-becomes unreachable); alternatively, they can be finalized using a
-guardian.
-
-The `(system foreign)' API is currently low-level and possibly
-inconvenient.  It will be extended to provide higher-level constructs.
-
-** Incompatible changes to the foreign value interface introduced in 1.9.7
-
-The API in <libguile/foreign.h> changed since 1.9.7.  C extensions need
-recompilation.
-
-** `dynamic-wind' compilation
-
-`dynamic-wind' now has special support from the compiler and VM.  The
-compiler is able to inline the body of a `dynamic-wind', making it more
-efficient.  The run-time support is provided by the `wind' and `unwind'
-VM instructions.
-
-** New module: `(ice-9 vlist)'
-
-This module provides an implementation of Bagwell's VLists and
-VList-based hash lists ("VHashes").  VLists are a list data structure
-that provides constant-time random access and length computation
-logarithmic in the number of elements.  VLists also use less storage
-space than standard Scheme linked lists.
-
-VHashes are a functional dictionary type similar to association lists.
-However, unlike association lists, accessing a value given its key is
-typically a constant-time operation.  VHashes are now used in a few
-places of the compiler.
-
-** New procedures: `getaddrinfo' and family
-
-Bindings for the POSIX getaddrinfo(3) host name and service lookup
-function are available.  This function is now recommended over
-`gethostname' and friends as it's more expressive and can return a
-sorted list of addresses, as opposed to a single address.
-
-** Tutorial deleted
-
-The tutorial was removed.  It was incomplete, outdated, and contained C
-examples that were no longer valid.  The reference manual, on the other
-hand, contains up-to-date examples and documentation.
+Changes in 1.9.9 (since the 1.9.8 prerelease):
 
 ** And of course, the usual collection of bugfixes
  
diff --git a/doc/ref/api-control.texi b/doc/ref/api-control.texi
index 7c73793..8379412 100644
--- a/doc/ref/api-control.texi
+++ b/doc/ref/api-control.texi
@@ -16,7 +16,8 @@ flow of Scheme affects C code.
 * if cond case::                Simple conditional evaluation.
 * and or::                      Conditional evaluation of a sequence.
 * while do::                    Iteration mechanisms.
-* Continuations::               Continuations.
+* Prompts::                     Composable, delimited continuations.
+* Continuations::               Non-composable continuations.
 * Multiple Values::             Returning and accepting multiple values.
 * Exceptions::                  Throwing and catching exceptions.
 * Error Reporting::             Procedures for signaling errors.
@@ -344,6 +345,112 @@ times.
 @end deffn
 
 
address@hidden Prompts
address@hidden Prompts
address@hidden prompts
address@hidden delimited continuations
address@hidden composable continuations
address@hidden non-local exit
+
+Prompts are control-flow barriers between different parts of a program. In the
+same way that a user sees a shell prompt (e.g., the Bash prompt) as a barrier
+between the operating system and her programs, Scheme prompts allow the Scheme
+programmer to treat parts of programs as if they were running in different
+operating systems.
+
+We use this roundabout explanation because, unless you're a functional
+programming junkie, you probably haven't heard the term, ``delimited, 
composable
+continuation''. That's OK; it's a relatively recent topic, but a very useful
+one to know about.
+
address@hidden {Scheme Procedure} call-with-prompt tag thunk handler
+Set up a prompt, and call @var{thunk} within that prompt.
+
+During the dynamic extent of the call to @var{thunk}, a prompt named @var{tag}
+will be present in the dynamic context, such that if a user calls
address@hidden (see below) with that tag, control rewinds back to the
+prompt, and the @var{handler} is run.
+
address@hidden must be a procedure. The first argument to @var{handler} will be
+the state of the computation begun when @var{thunk} was called, and ending with
+the call to @code{abort-to-prompt}. The remaining arguments to @var{handler} 
are
+those passed to @code{abort-to-prompt}.
address@hidden deffn
+
address@hidden {Scheme Procedure} abort-to-prompt tag val ...
+Unwind the dynamic and control context to the nearest prompt named @var{tag},
+also passing the given values.
address@hidden deffn
+
+C programmers may recognize @code{call-with-prompt} and @code{abort-to-prompt}
+as a fancy kind of @code{setjmp} and @code{longjmp}, respectively. Prompts are
+indeed quite useful as non-local escape mechanisms. Guile's @code{catch} and
address@hidden are implemented in terms of prompts. Prompts are more convenient
+than @code{longjmp}, in that one has the opportunity to pass multiple values to
+the jump target.
+
+Also unlike @code{longjmp}, the prompt handler is given the full state of the
+process that was aborted, as the first argument to the prompt's handler. That
+state is the @dfn{continuation} of the computation wrapped by the prompt. It is
+a @dfn{delimited continuation}, because it is not the whole continuation of the
+program; rather, just the computation initiated by the call to
address@hidden
+
+The continuation is a procedure, and may be reinstated simply by invoking it,
+with any number of values. Here's where things get interesting, and complicated
+as well. Besides being described as delimited, continuations reified by prompts
+are also @dfn{composable}, because invoking a prompt-saved continuation 
composes
+that continuation with the current one.
+
+Imagine you have saved a continuation via call-with-prompt:
+
address@hidden
+(define cont
+  (call-with-prompt
+   ;; tag
+   'foo
+   ;; thunk
+   (lambda ()
+     (+ 34 (abort-to-prompt 'foo)))
+   ;; handler
+   (lambda (k) k)))
address@hidden example
+
+The resulting continuation is the addition of 34. It's as if you had written:
+
address@hidden
+(define cont
+  (lambda (x)
+    (+ 34 x)))
address@hidden example
+
+So, if we call @code{cont} with one numeric value, we get that number,
+incremented by 34:
+
address@hidden
+(cont 8)
address@hidden 42
+(* 2 (cont 8))
address@hidden 84
address@hidden example
+
+The last example illustrates what we mean when we say, "composes with the
+current continuation". We mean that there is a current continuation -- some
+remaining things to compute, like @code{(lambda (x) (* x 2))} -- and that
+calling the saved continuation doesn't wipe out the current continuation, it
+composes the saved continuation with the current one.
+
+We're belaboring the point here because traditional Scheme continuations, as
+discussed in the next section, aren't composable, and are actually less
+expressive than continuations captured by prompts. But there's a place for them
+both.
+
+Before moving on, we should mention that if the handler of a prompt is a
address@hidden expression, and the first argument isn't referenced, an abort to
+that prompt will not cause a continuation to be reified. This can be an
+important efficiency consideration to keep in mind.
+
+
 @node Continuations
 @subsection Continuations
 @cindex continuations
@@ -467,13 +574,12 @@ with programs written in other languages, such as C, 
which do not know
 about continuations.  Basically continuations are captured by a block
 copy of the stack, and resumed by copying back.
 
-For this reason, generally continuations should be used only when
-there is no other simple way to achieve the desired result, or when
-the elegance of the continuation mechanism outweighs the need for
-performance.
+For this reason, continuations captured by @code{call/cc} should be used only
+when there is no other simple way to achieve the desired result, or when the
+elegance of the continuation mechanism outweighs the need for performance.
 
 Escapes upwards from loops or nested functions are generally best
-handled with exceptions (@pxref{Exceptions}).  Coroutines can be
+handled with prompts (@pxref{Prompts}).  Coroutines can be
 efficiently implemented with cooperating threads (a thread holds a
 full program stack but doesn't copy it around the way continuations
 do).
diff --git a/guile-readline/Makefile.am b/guile-readline/Makefile.am
index efdcd75..8d22b24 100644
--- a/guile-readline/Makefile.am
+++ b/guile-readline/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with Automake to create Makefile.in
 ##
-##     Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006, 2007, 2008, 2009 Free 
Software Foundation, Inc.
+##     Copyright (C) 1998, 1999, 2000, 2001, 2004, 2006, 2007, 2008, 2009, 
2010 Free Software Foundation, Inc.
 ##
 ##   This file is part of guile-readline.
 ##
@@ -45,7 +45,7 @@ lib_LTLIBRARIES = address@hidden@.la
 address@hidden@_la_SOURCES = readline.c
 address@hidden@_la_LIBADD =    \
   $(READLINE_LIBS)                                     \
-  ../libguile/libguile.la ../lib/libgnu.la
+  ../libguile/address@hidden@.la ../lib/libgnu.la
 
 address@hidden@_la_LDFLAGS =   \
   -version-info @LIBGUILEREADLINE_INTERFACE@ -export-dynamic   \
@@ -54,7 +54,8 @@ address@hidden@_la_LDFLAGS =  \
 
 BUILT_SOURCES = readline.x
 
-pkginclude_HEADERS = readline.h
+modincludedir = $(pkgincludedir)/$(GUILE_EFFECTIVE_VERSION)
+modinclude_HEADERS = readline.h
 
 snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
 SUFFIXES = .x
diff --git a/libguile/Makefile.am b/libguile/Makefile.am
index 5ffb6f6..59a3647 100644
--- a/libguile/Makefile.am
+++ b/libguile/Makefile.am
@@ -43,7 +43,7 @@ gnulib_library = $(top_builddir)/lib/libgnu.la
 ETAGS_ARGS = 
--regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/'
 \
    --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
 
-lib_LTLIBRARIES = libguile.la
+lib_LTLIBRARIES = address@hidden@.la
 bin_PROGRAMS = guile
 
 noinst_PROGRAMS = guile_filter_doc_snarfage gen-scmconfig
@@ -99,12 +99,12 @@ guile_filter_doc_snarfage$(EXEEXT): 
$(guile_filter_doc_snarfage_OBJECTS) $(guile
 
 guile_SOURCES = guile.c
 guile_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
-guile_LDADD = libguile.la
+guile_LDADD = address@hidden@.la
 guile_LDFLAGS = $(GUILE_CFLAGS)
 
-libguile_la_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
address@hidden@_la_CFLAGS = $(GUILE_CFLAGS) $(AM_CFLAGS)
 
-libguile_la_SOURCES =                          \
address@hidden@_la_SOURCES =                            \
        alist.c                                 \
        arbiters.c                              \
        array-handle.c                          \
@@ -412,7 +412,7 @@ BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c 
libpath.h \
     version.h scmconfig.h \
     $(DOT_I_FILES) $(DOT_X_FILES) $(EXTRA_DOT_X_FILES)
 
-EXTRA_libguile_la_SOURCES = _scm.h             \
address@hidden@_la_SOURCES = _scm.h             \
     memmove.c strerror.c                       \
     dynl.c regex-posix.c                       \
     filesys.c posix.c net_db.c socket.c                \
@@ -440,11 +440,11 @@ noinst_HEADERS = conv-integer.i.c conv-uinteger.i.c       
        \
 # vm instructions
 noinst_HEADERS += vm-engine.c vm-i-system.c vm-i-scheme.c vm-i-loader.c
 
-libguile_la_DEPENDENCIES = @LIBLOBJS@
-libguile_la_LIBADD =                           \
address@hidden@_la_DEPENDENCIES = @LIBLOBJS@
address@hidden@_la_LIBADD =                             \
   @LIBLOBJS@ $(gnulib_library) $(LTLIBGMP)     \
   $(LTLIBUNISTRING) $(LTLIBICONV) $(LTLIBINTL)
-libguile_la_LDFLAGS =                                                          
                        \
address@hidden@_la_LDFLAGS =                                                    
                                \
   @LTLIBINTL@ $(LIBFFI_LIBS) $(INET_NTOP_LIB) $(INET_PTON_LIB)                 
                        \
   $(GETADDRINFO_LIB) $(HOSTENT_LIB) $(SERVENT_LIB)                             
                        \
   -version-info 
@LIBGUILE_INTERFACE_CURRENT@:@LIBGUILE_INTERFACE_REVISION@:@LIBGUILE_INTERFACE_AGE@
    \
@@ -453,7 +453,7 @@ libguile_la_LDFLAGS =                                       
                                                \
 
 if HAVE_LD_VERSION_SCRIPT
 
-libguile_la_LDFLAGS += -Wl,--version-script="$(srcdir)/libguile.map"
address@hidden@_la_LDFLAGS += -Wl,--version-script="$(srcdir)/libguile.map"
 
 endif HAVE_LD_VERSION_SCRIPT
 
@@ -462,7 +462,7 @@ endif HAVE_LD_VERSION_SCRIPT
 pkginclude_HEADERS = 
 
 # These are headers visible as <libguile/mumble.h>.
-modincludedir = $(includedir)/libguile
+modincludedir = $(pkgincludedir)/$(GUILE_EFFECTIVE_VERSION)/libguile
 modinclude_HEADERS =                           \
        __scm.h                                 \
        alist.h                                 \
@@ -604,7 +604,8 @@ version.h: version.h.in $(top_builddir)/config.status
        sed < $(srcdir)/version.h.in > address@hidden \
          -e s:@-GUILE_MAJOR_VERSION-@:${GUILE_MAJOR_VERSION}: \
          -e s:@-GUILE_MINOR_VERSION-@:${GUILE_MINOR_VERSION}: \
-         -e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}:
+         -e s:@-GUILE_MICRO_VERSION-@:${GUILE_MICRO_VERSION}: \
+         -e s:@-GUILE_EFFECTIVE_VERSION-@:${GUILE_EFFECTIVE_VERSION}:
        mv address@hidden $@
 
 ## FIXME: Consider using timestamp file, to avoid unnecessary rebuilds.
diff --git a/libguile/bytevectors.c b/libguile/bytevectors.c
index 45dae1c..f3a61c1 100644
--- a/libguile/bytevectors.c
+++ b/libguile/bytevectors.c
@@ -2223,7 +2223,8 @@ scm_bootstrap_bytevectors (void)
   scm_i_native_endianness = scm_from_locale_symbol ("little");
 #endif
 
-  scm_c_register_extension ("libguile", "scm_init_bytevectors",
+  scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
+                            "scm_init_bytevectors",
                            (scm_t_extension_init_func) scm_init_bytevectors,
                            NULL);
 
diff --git a/libguile/foreign.c b/libguile/foreign.c
index b754fad..00de06f 100644
--- a/libguile/foreign.c
+++ b/libguile/foreign.c
@@ -987,7 +987,8 @@ scm_init_foreign (void)
 void
 scm_register_foreign (void)
 {
-  scm_c_register_extension ("libguile", "scm_init_foreign",
+  scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
+                            "scm_init_foreign",
                             (scm_t_extension_init_func)scm_init_foreign,
                             NULL);
   foreign_weak_refs = scm_make_weak_key_hash_table (SCM_UNDEFINED);
diff --git a/libguile/i18n.c b/libguile/i18n.c
index d8e2c3c..9c78bfc 100644
--- a/libguile/i18n.c
+++ b/libguile/i18n.c
@@ -1866,7 +1866,8 @@ scm_init_i18n ()
 void
 scm_bootstrap_i18n ()
 {
-  scm_c_register_extension ("libguile", "scm_init_i18n",
+  scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
+                            "scm_init_i18n",
                            (scm_t_extension_init_func) scm_init_i18n,
                            NULL);
 
diff --git a/libguile/instructions.c b/libguile/instructions.c
index 4c1f9f1..4981635 100644
--- a/libguile/instructions.c
+++ b/libguile/instructions.c
@@ -196,7 +196,8 @@ SCM_DEFINE (scm_opcode_to_instruction, 
"opcode->instruction", 1, 0, 0,
 void
 scm_bootstrap_instructions (void)
 {
-  scm_c_register_extension ("libguile", "scm_init_instructions",
+  scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
+                            "scm_init_instructions",
                             (scm_t_extension_init_func)scm_init_instructions,
                             NULL);
 }
diff --git a/libguile/objcodes.c b/libguile/objcodes.c
index f30d815..2931468 100644
--- a/libguile/objcodes.c
+++ b/libguile/objcodes.c
@@ -258,7 +258,8 @@ scm_i_objcode_print (SCM objcode, SCM port, scm_print_state 
*pstate)
 void
 scm_bootstrap_objcodes (void)
 {
-  scm_c_register_extension ("libguile", "scm_init_objcodes",
+  scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
+                            "scm_init_objcodes",
                             (scm_t_extension_init_func)scm_init_objcodes, 
NULL);
 }
 
diff --git a/libguile/programs.c b/libguile/programs.c
index e777e56..79b1c32 100644
--- a/libguile/programs.c
+++ b/libguile/programs.c
@@ -390,7 +390,8 @@ scm_bootstrap_programs (void)
   /* arglist can't be snarfed, because snarfage is only loaded when (system vm
      program) is loaded. perhaps static-alloc will fix this. */
   sym_arglist = scm_from_locale_symbol ("arglist");
-  scm_c_register_extension ("libguile", "scm_init_programs",
+  scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
+                            "scm_init_programs",
                             (scm_t_extension_init_func)scm_init_programs, 
NULL);
 }
 
diff --git a/libguile/version.c b/libguile/version.c
index db1bc9f..f1bd3c3 100644
--- a/libguile/version.c
+++ b/libguile/version.c
@@ -1,4 +1,4 @@
-/*     Copyright (C) 1995,1996, 1999, 2000, 2001, 2006, 2008 Free Software 
Foundation, Inc.
+/*     Copyright (C) 1995,1996, 1999, 2000, 2001, 2006, 2008, 2010 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
@@ -105,14 +105,7 @@ SCM_DEFINE (scm_effective_version, "effective-version", 0, 
0, 0,
            "@end lisp")
 #define FUNC_NAME s_scm_effective_version
 {
-
-  char version_str[2 * 4 + 3];
-
-#if (SCM_MAJOR_VERSION > 9999 || SCM_MINOR_VERSION > 9999)
-# error version string may overflow buffer
-#endif
-  sprintf (version_str, "%d.%d", SCM_MAJOR_VERSION, SCM_MINOR_VERSION);
-  return scm_from_locale_string (version_str);
+  return scm_from_locale_string (SCM_EFFECTIVE_VERSION);
 }
 #undef FUNC_NAME
 
diff --git a/libguile/version.h.in b/libguile/version.h.in
index 394bbdb..49d26c2 100644
--- a/libguile/version.h.in
+++ b/libguile/version.h.in
@@ -3,7 +3,7 @@
 #ifndef SCM_VERSION_H
 #define SCM_VERSION_H
 
-/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008 Free Software 
Foundation, Inc.
+/* Copyright (C) 1995,1996,1998,1999,2000,2001, 2006, 2008, 2010 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
@@ -30,6 +30,7 @@
 #define SCM_MAJOR_VERSION @-GUILE_MAJOR_VERSION-@
 #define SCM_MINOR_VERSION @-GUILE_MINOR_VERSION-@
 #define SCM_MICRO_VERSION @-GUILE_MICRO_VERSION-@
+#define SCM_EFFECTIVE_VERSION "@-GUILE_EFFECTIVE_VERSION-@"
 
 SCM_API SCM scm_major_version (void);
 SCM_API SCM scm_minor_version (void);
diff --git a/libguile/vm.c b/libguile/vm.c
index 98df057..f5e66ae 100644
--- a/libguile/vm.c
+++ b/libguile/vm.c
@@ -759,7 +759,8 @@ SCM scm_load_compiled_with_vm (SCM file)
 void
 scm_bootstrap_vm (void)
 {
-  scm_c_register_extension ("libguile", "scm_init_vm",
+  scm_c_register_extension ("libguile-" SCM_EFFECTIVE_VERSION,
+                            "scm_init_vm",
                             (scm_t_extension_init_func)scm_init_vm, NULL);
 
   sym_vm_run = scm_from_locale_symbol ("vm-run");
diff --git a/meta/guile-2.0-uninstalled.pc.in b/meta/guile-2.0-uninstalled.pc.in
index 6e687ea..4bf6058 100644
--- a/meta/guile-2.0-uninstalled.pc.in
+++ b/meta/guile-2.0-uninstalled.pc.in
@@ -4,5 +4,5 @@ address@hidden@
 Name: GNU Guile (uninstalled)
 Description: GNU's Ubiquitous Intelligent Language for Extension (uninstalled)
 Version: @GUILE_VERSION@
-Libs: -L${builddir}/libguile -lguile @GUILE_LIBS@
+Libs: -L${builddir}/libguile address@hidden@ @GUILE_LIBS@
 Cflags: -I${srcdir} -I${builddir} @GUILE_CFLAGS@ @BDW_GC_CFLAGS@
diff --git a/meta/guile-2.0.pc.in b/meta/guile-2.0.pc.in
index c73a171..c83d821 100644
--- a/meta/guile-2.0.pc.in
+++ b/meta/guile-2.0.pc.in
@@ -5,6 +5,7 @@ address@hidden@
 address@hidden@
 address@hidden@
 address@hidden@/guile
address@hidden@/guile
 
 address@hidden@
 address@hidden@/guile/@GUILE_EFFECTIVE_VERSION@/extensions
@@ -13,5 +14,5 @@ address@hidden@
 Name: GNU Guile
 Description: GNU's Ubiquitous Intelligent Language for Extension
 Version: @GUILE_VERSION@
-Libs: -L${libdir} -lguile @GUILE_LIBS@
-Cflags: -I${includedir} @GUILE_CFLAGS@ @BDW_GC_CFLAGS@
+Libs: -L${libdir} address@hidden@ @GUILE_LIBS@
+Cflags: -I${pkgincludedir}/@GUILE_EFFECTIVE_VERSION@ @GUILE_CFLAGS@ 
@BDW_GC_CFLAGS@
diff --git a/module/ice-9/i18n.scm b/module/ice-9/i18n.scm
index 6fa31e4..ce04aa3 100644
--- a/module/ice-9/i18n.scm
+++ b/module/ice-9/i18n.scm
@@ -84,7 +84,8 @@
 
 
 (eval-when (eval load compile)
-  (load-extension "libguile" "scm_init_i18n"))
+  (load-extension (string-append "libguile-" (effective-version))
+                  "scm_init_i18n"))
 
 
 ;;;
diff --git a/module/rnrs/bytevector.scm b/module/rnrs/bytevector.scm
index 56b8a64..9b8ac45 100644
--- a/module/rnrs/bytevector.scm
+++ b/module/rnrs/bytevector.scm
@@ -71,7 +71,8 @@
            utf8->string utf16->string utf32->string))
 
 
-(load-extension "libguile" "scm_init_bytevectors")
+(load-extension (string-append "libguile-" (effective-version))
+                "scm_init_bytevectors")
 
 (define-macro (endianness sym)
   (if (memq sym '(big little))
diff --git a/module/rnrs/io/ports.scm b/module/rnrs/io/ports.scm
index 308a36c..17d4907 100644
--- a/module/rnrs/io/ports.scm
+++ b/module/rnrs/io/ports.scm
@@ -52,7 +52,8 @@
            ;; binary output
            put-u8 put-bytevector))
 
-(load-extension "libguile" "scm_init_r6rs_ports")
+(load-extension (string-append "libguile-" (effective-version))
+                "scm_init_r6rs_ports")
 
 
 
diff --git a/module/system/foreign.scm b/module/system/foreign.scm
index 2a74332..73c11fe 100644
--- a/module/system/foreign.scm
+++ b/module/system/foreign.scm
@@ -33,7 +33,8 @@
             make-foreign-function
             make-c-struct parse-c-struct))
 
-(load-extension "libguile" "scm_init_foreign")
+(load-extension (string-append "libguile-" (effective-version))
+                "scm_init_foreign")
 
 (define *writers*
   `((,float . ,bytevector-ieee-single-native-set!)
diff --git a/module/system/vm/instruction.scm b/module/system/vm/instruction.scm
index 403e9cd..287e472 100644
--- a/module/system/vm/instruction.scm
+++ b/module/system/vm/instruction.scm
@@ -1,6 +1,6 @@
 ;;; Guile VM instructions
 
-;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2010 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
@@ -24,4 +24,5 @@
            instruction-pops instruction-pushes
            instruction->opcode opcode->instruction))
 
-(load-extension "libguile" "scm_init_instructions")
+(load-extension (string-append "libguile-" (effective-version))
+                "scm_init_instructions")
diff --git a/module/system/vm/objcode.scm b/module/system/vm/objcode.scm
index 7c0490d..966f345 100644
--- a/module/system/vm/objcode.scm
+++ b/module/system/vm/objcode.scm
@@ -1,6 +1,6 @@
 ;;; Guile VM object code
 
-;; Copyright (C) 2001 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2010 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
@@ -24,4 +24,5 @@
             load-objcode write-objcode
             word-size byte-order))
 
-(load-extension "libguile" "scm_init_objcodes")
+(load-extension (string-append "libguile-" (effective-version))
+                "scm_init_objcodes")
diff --git a/module/system/vm/program.scm b/module/system/vm/program.scm
index 1afc3e0..6c59566 100644
--- a/module/system/vm/program.scm
+++ b/module/system/vm/program.scm
@@ -44,7 +44,8 @@
             program-num-free-variables
             program-free-variable-ref program-free-variable-set!))
 
-(load-extension "libguile" "scm_init_programs")
+(load-extension (string-append "libguile-" (effective-version))
+                "scm_init_programs")
 
 (define (make-binding name boxed? index start end)
   (list name boxed? index start end))
diff --git a/module/system/vm/vm.scm b/module/system/vm/vm.scm
index c6e550b..c50959b 100644
--- a/module/system/vm/vm.scm
+++ b/module/system/vm/vm.scm
@@ -31,7 +31,8 @@
             vm-next-hook vm-apply-hook vm-boot-hook vm-return-hook
             vm-break-hook vm-exit-hook vm-halt-hook vm-enter-hook))
 
-(load-extension "libguile" "scm_init_vm")
+(load-extension (string-append "libguile-" (effective-version))
+                "scm_init_vm")
 
 (define (vms:time stat) (vector-ref stat 0))
 (define (vms:clock stat) (vector-ref stat 1))
diff --git a/srfi/Makefile.am b/srfi/Makefile.am
index 459d606..bb91268 100644
--- a/srfi/Makefile.am
+++ b/srfi/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with Automake to create Makefile.in
 ##
-##   Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free 
Software Foundation, Inc.
+##   Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 
Software Foundation, Inc.
 ##
 ##   This file is part of GUILE.
 ##
@@ -32,7 +32,8 @@ AM_CPPFLAGS = -I.. -I$(srcdir)/..                             
\
 AM_CFLAGS = $(GCC_CFLAGS)
 AM_LDFLAGS = $(GNU_LD_FLAGS)
 
-srfiincludedir = $(pkgincludedir)/srfi
+# FIXME: should be libguile/srfi
+srfiincludedir = $(pkgincludedir)/$(GUILE_EFFECTIVE_VERSION)/srfi
 
 # These headers are visible as <guile/srfi/mumble.h>
 srfiinclude_HEADERS = srfi-1.h srfi-4.h srfi-13.h srfi-14.h srfi-60.h
@@ -47,22 +48,22 @@ BUILT_SOURCES = srfi-1.x srfi-4.x srfi-13.x srfi-14.x 
srfi-60.x
 
 address@hidden@_la_SOURCES = srfi-1.x srfi-1.c
 address@hidden@_la_LIBADD =            \
-   $(top_builddir)/libguile/libguile.la $(top_builddir)/lib/libgnu.la
+   $(top_builddir)/libguile/address@hidden@.la $(top_builddir)/lib/libgnu.la
 address@hidden@_la_LDFLAGS = -no-undefined -export-dynamic -version-info 
@LIBGUILE_SRFI_SRFI_1_INTERFACE@
 
 address@hidden@_la_SOURCES = srfi-4.x srfi-4.c
 address@hidden@_la_LIBADD =            \
-   $(top_builddir)/libguile/libguile.la $(top_builddir)/lib/libgnu.la
+   $(top_builddir)/libguile/address@hidden@.la $(top_builddir)/lib/libgnu.la
 address@hidden@_la_LDFLAGS = -no-undefined -export-dynamic -version-info 
@LIBGUILE_SRFI_SRFI_4_INTERFACE@
 
 address@hidden@_la_SOURCES = srfi-13.x srfi-13.c srfi-14.x srfi-14.c
 address@hidden@_la_LIBADD =    \
-   $(top_builddir)/libguile/libguile.la $(top_builddir)/lib/libgnu.la
+   $(top_builddir)/libguile/address@hidden@.la $(top_builddir)/lib/libgnu.la
 address@hidden@_la_LDFLAGS = -no-undefined -export-dynamic -version-info 
@LIBGUILE_SRFI_SRFI_13_14_INTERFACE@
 
 address@hidden@_la_SOURCES = srfi-60.x srfi-60.c
 address@hidden@_la_LIBADD =    \
-   $(top_builddir)/libguile/libguile.la $(top_builddir)/lib/libgnu.la
+   $(top_builddir)/libguile/address@hidden@.la $(top_builddir)/lib/libgnu.la
 address@hidden@_la_LDFLAGS = -no-undefined -export-dynamic -version-info 
@LIBGUILE_SRFI_SRFI_60_INTERFACE@
 
 EXTRA_DIST = ChangeLog-2008
diff --git a/test-suite/standalone/Makefile.am 
b/test-suite/standalone/Makefile.am
index 46a7759..806245c 100644
--- a/test-suite/standalone/Makefile.am
+++ b/test-suite/standalone/Makefile.am
@@ -67,13 +67,13 @@ TESTS += test-require-extension
 # test-num2integral
 test_num2integral_SOURCES = test-num2integral.c
 test_num2integral_CFLAGS = ${test_cflags}
-test_num2integral_LDADD = ${top_builddir}/libguile/libguile.la
+test_num2integral_LDADD = ${top_builddir}/libguile/address@hidden@.la
 check_PROGRAMS += test-num2integral
 TESTS += test-num2integral
 
 # test-round
 test_round_CFLAGS = ${test_cflags}
-test_round_LDADD = ${top_builddir}/libguile/libguile.la
+test_round_LDADD = ${top_builddir}/libguile/address@hidden@.la
 check_PROGRAMS += test-round
 TESTS += test-round
 
@@ -82,7 +82,7 @@ noinst_LTLIBRARIES += libtest-asmobs.la
 libtest_asmobs_la_SOURCES = test-asmobs-lib.c test-asmobs-lib.x
 libtest_asmobs_la_CFLAGS = ${test_cflags}
 libtest_asmobs_la_LDFLAGS = -no-undefined -rpath `pwd` # so libtool will 
really build an .so
-libtest_asmobs_la_LIBADD = ${top_builddir}/libguile/libguile.la
+libtest_asmobs_la_LIBADD = ${top_builddir}/libguile/address@hidden@.la
 BUILT_SOURCES += test-asmobs-lib.x
 check_SCRIPTS += test-asmobs
 TESTS += test-asmobs
@@ -92,7 +92,7 @@ noinst_LTLIBRARIES += libtest-ffi.la
 libtest_ffi_la_SOURCES = test-ffi-lib.c test-ffi-lib.x
 libtest_ffi_la_CFLAGS = ${test_cflags}
 libtest_ffi_la_LDFLAGS = -no-undefined -rpath `pwd` # so libtool will really 
build an .so
-libtest_ffi_la_LIBADD = ${top_builddir}/libguile/libguile.la
+libtest_ffi_la_LIBADD = ${top_builddir}/libguile/address@hidden@.la
 BUILT_SOURCES += test-ffi-lib.x
 check_SCRIPTS += test-ffi
 TESTS += test-ffi
@@ -100,28 +100,28 @@ TESTS += test-ffi
 # test-list
 test_list_SOURCES = test-list.c
 test_list_CFLAGS = ${test_cflags}
-test_list_LDADD = ${top_builddir}/libguile/libguile.la
+test_list_LDADD = ${top_builddir}/libguile/address@hidden@.la
 check_PROGRAMS += test-list
 TESTS += test-list
 
 # test-unwind
 test_unwind_SOURCES = test-unwind.c
 test_unwind_CFLAGS = ${test_cflags}
-test_unwind_LDADD = ${top_builddir}/libguile/libguile.la
+test_unwind_LDADD = ${top_builddir}/libguile/address@hidden@.la
 check_PROGRAMS += test-unwind
 TESTS += test-unwind
 
 # test-conversion
 test_conversion_SOURCES = test-conversion.c
 test_conversion_CFLAGS = ${test_cflags}
-test_conversion_LDADD = ${top_builddir}/libguile/libguile.la
+test_conversion_LDADD = ${top_builddir}/libguile/address@hidden@.la
 check_PROGRAMS += test-conversion
 TESTS += test-conversion
 
 # test-loose-ends
 test_loose_ends_SOURCES = test-loose-ends.c
 test_loose_ends_CFLAGS = ${test_cflags}
-test_loose_ends_LDADD = ${top_builddir}/libguile/libguile.la
+test_loose_ends_LDADD = ${top_builddir}/libguile/address@hidden@.la
 check_PROGRAMS += test-loose-ends
 TESTS += test-loose-ends
 
@@ -136,21 +136,21 @@ TESTS += test-use-srfi
 # test-scm-c-read
 test_scm_c_read_SOURCES = test-scm-c-read.c
 test_scm_c_read_CFLAGS = ${test_cflags}
-test_scm_c_read_LDADD = ${top_builddir}/libguile/libguile.la
+test_scm_c_read_LDADD = ${top_builddir}/libguile/address@hidden@.la
 check_PROGRAMS += test-scm-c-read
 TESTS += test-scm-c-read
 
 # test-scm-take-locale-symbol
 test_scm_take_locale_symbol_SOURCES = test-scm-take-locale-symbol.c
 test_scm_take_locale_symbol_CFLAGS = ${test_cflags}
-test_scm_take_locale_symbol_LDADD = ${top_builddir}/libguile/libguile.la
+test_scm_take_locale_symbol_LDADD = ${top_builddir}/libguile/address@hidden@.la
 check_PROGRAMS += test-scm-take-locale-symbol
 TESTS += test-scm-take-locale-symbol
 
 # test-scm-take-u8vector
 test_scm_take_u8vector_SOURCES = test-scm-take-u8vector.c
 test_scm_take_u8vector_CFLAGS = ${test_cflags}
-test_scm_take_u8vector_LDADD = ${top_builddir}/libguile/libguile.la
+test_scm_take_u8vector_LDADD = ${top_builddir}/libguile/address@hidden@.la
 check_PROGRAMS += test-scm-take-u8vector
 TESTS += test-scm-take-u8vector
 
@@ -159,7 +159,7 @@ noinst_LTLIBRARIES += libtest-extensions.la
 libtest_extensions_la_SOURCES = test-extensions-lib.c
 libtest_extensions_la_CFLAGS = ${test_cflags}
 libtest_extensions_la_LDFLAGS = -no-undefined -rpath `pwd` # so libtool will 
really build an .so
-libtest_extensions_la_LIBADD = ${top_builddir}/libguile/libguile.la
+libtest_extensions_la_LIBADD = ${top_builddir}/libguile/address@hidden@.la
 check_SCRIPTS += test-extensions
 TESTS += test-extensions
 
@@ -168,12 +168,12 @@ if BUILD_PTHREAD_SUPPORT
 
 # test-with-guile-module
 test_with_guile_module_CFLAGS = ${test_cflags}
-test_with_guile_module_LDADD = ${top_builddir}/libguile/libguile.la
+test_with_guile_module_LDADD = ${top_builddir}/libguile/address@hidden@.la
 check_PROGRAMS += test-with-guile-module
 TESTS += test-with-guile-module
 
 test_scm_with_guile_CFLAGS = ${test_cflags}
-test_scm_with_guile_LDADD = ${top_builddir}/libguile/libguile.la
+test_scm_with_guile_LDADD = ${top_builddir}/libguile/address@hidden@.la
 check_PROGRAMS += test-scm-with-guile
 TESTS += test-scm-with-guile
 
diff --git a/test-suite/tests/version.test b/test-suite/tests/version.test
index 5b7acc9..1789287 100644
--- a/test-suite/tests/version.test
+++ b/test-suite/tests/version.test
@@ -1,7 +1,7 @@
 ;;;; versions.test --- test suite for Guile's version functions  -*- scheme -*-
 ;;;; Greg J. Badros <address@hidden>
 ;;;;
-;;;;   Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
+;;;;   Copyright (C) 2000, 2001, 2006, 2010 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
@@ -26,7 +26,4 @@
              (string=? (version)
                        (string-append (major-version) "."
                                       (minor-version) "."
-                                      (micro-version)))
-             (string=? (effective-version)
-                       (string-append (major-version) "."
-                                      (minor-version)))))
+                                      (micro-version)))))


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]