From 680135b6a363fddfe331e749f2bb3fdb44c76524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 3 Dec 2014 19:07:28 +0100 Subject: [PATCH 1/2] doc: Clarify the unit of the 'offset' argument of 'seek'. Reported in by David Kastrup . * doc/ref/api-io.texi (Random Access): Clarify the unit of the 'offset' argument to 'seek'. --- doc/ref/api-io.texi | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/ref/api-io.texi b/doc/ref/api-io.texi index 02d92a2d7..83313782f 100644 --- a/doc/ref/api-io.texi +++ b/doc/ref/api-io.texi @@ -443,8 +443,12 @@ open. @deffn {Scheme Procedure} seek fd_port offset whence @deffnx {C Function} scm_seek (fd_port, offset, whence) Sets the current position of @var{fd_port} to the integer -@var{offset}, which is interpreted according to the value of -@var{whence}. +@var{offset}. For a file port, @var{offset} is expressed +as a number of bytes; for other types of ports, such as string +ports, @var{offset} is an abstract representation of the +position within the port's data, not necessarily expressed +as a number of bytes. @var{offset} is interpreted according to +the value of @var{whence}. One of the following variables should be supplied for @var{whence}: @@ -460,7 +464,7 @@ Seek from the end of the file. If @var{fd_port} is a file descriptor, the underlying system call is @code{lseek}. @var{port} may be a string port. -The value returned is the new position in the file. This means +The value returned is the new position in @var{fd_port}. This means that the current position of a port can be obtained using: @lisp (seek port 0 SEEK_CUR) From 7c433cbbce83bc9f2f9967afba00bbb68e312657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 3 Dec 2014 23:09:12 +0100 Subject: [PATCH 2/2] build: Add missing substitutions for 'guile-2.0.pc'. This is a followup to 5fac1a7. * meta/Makefile.am (substitute): Add GUILE_* and LIBGUILE_* substitutions, and $(dependency_substitutions). (dependency_substitutions): New variable. --- meta/Makefile.am | 60 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/meta/Makefile.am b/meta/Makefile.am index 5f19db5c6..b48c8ec8a 100644 --- a/meta/Makefile.am +++ b/meta/Makefile.am @@ -47,26 +47,50 @@ aclocal_DATA = guile.m4 # Script to instantiate substitution variables found on the standard # input. We do this from the Makefile because we need things like # $(program_transform_name), which are not usable from 'configure.ac'. -substitute = \ - guile="`echo guile | $(SED) -e '$(program_transform_name)'`" ; \ - guild="`echo guild | $(SED) -e '$(program_transform_name)'`" ; \ - installed_guile="@bindir@/$$guile" ; \ - $(SED) -e "s,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g" \ - -e "s,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g" \ - -e "s,[@]PKG_CONFIG[@],$(PKG_CONFIG),g" \ - -e "s,[@]pkgconfigdir[@],$(pkgconfigdir),g" \ - -e "s,[@]prefix[@],$(prefix),g" \ - -e "s,[@]exec_prefix[@],$(exec_prefix),g" \ - -e "s,[@]bindir[@],$(bindir),g" \ - -e "s,[@]libdir[@],$(libdir),g" \ - -e "s,[@]includedir[@],$(includedir),g" \ - -e "s,[@]datarootdir[@],$(datarootdir),g" \ - -e "s,[@]datadir[@],$(datadir),g" \ - -e "s,[@]sitedir[@],$(sitedir),g" \ - -e "s,[@]guile[@],$$guile,g" \ - -e "s,[@]guild[@],$$guild,g" \ +substitute = \ + guile="`echo guile | $(SED) -e '$(program_transform_name)'`" ; \ + guild="`echo guild | $(SED) -e '$(program_transform_name)'`" ; \ + installed_guile="@bindir@/$$guile" ; \ + $(SED) -e "s,[@]PACKAGE_NAME[@],$(PACKAGE_NAME),g" \ + -e "s,[@]PACKAGE_BUGREPORT[@],$(PACKAGE_BUGREPORT),g" \ + -e "s,[@]GUILE_EFFECTIVE_VERSION[@],$(GUILE_EFFECTIVE_VERSION),g" \ + -e "s,[@]GUILE_VERSION[@],$(GUILE_VERSION),g" \ + -e "s,[@]GUILE_CFLAGS[@],$(GUILE_CFLAGS),g" \ + -e "s,[@]GUILE_LIBS[@],$(GUILE_LIBS),g" \ + -e "s,[@]LIBGUILE_INTERFACE[@],$(LIBGUILE_INTERFACE),g" \ + $(dependency_substitutions) \ + -e "s,[@]PKG_CONFIG[@],$(PKG_CONFIG),g" \ + -e "s,[@]pkgconfigdir[@],$(pkgconfigdir),g" \ + -e "s,[@]prefix[@],$(prefix),g" \ + -e "s,[@]exec_prefix[@],$(exec_prefix),g" \ + -e "s,[@]bindir[@],$(bindir),g" \ + -e "s,[@]libdir[@],$(libdir),g" \ + -e "s,[@]includedir[@],$(includedir),g" \ + -e "s,[@]datarootdir[@],$(datarootdir),g" \ + -e "s,[@]datadir[@],$(datadir),g" \ + -e "s,[@]sitedir[@],$(sitedir),g" \ + -e "s,[@]guile[@],$$guile,g" \ + -e "s,[@]guild[@],$$guild,g" \ -e "s,[@]installed_guile[@],$$installed_guile,g" +# Substitutions for dependencies that appear in 'guile-2.0.pc'. +dependency_substitutions = \ + -e "s,[@]BDW_GC_CFLAGS[@],$(BDW_GC_CFLAGS),g" \ + -e "s,[@]BDW_GC_LIBS[@],$(BDW_GC_LIBS),g" \ + -e "s,[@]LIB_CLOCK_GETTIME[@],$(LIB_CLOCK_GETTIME),g" \ + -e "s,[@]LIBGMP[@],$(LIBGMP),g" \ + -e "s,[@]LIBLTDL[@],$(LIBLTDL),g" \ + -e "s,[@]LIBFFI_LIBS[@],$(LIBFFI_LIBS),g" \ + -e "s,[@]LIBUNISTRING[@],$(LIBUNISTRING),g" \ + -e "s,[@]LIBICONV[@],$(LIBICONV),g" \ + -e "s,[@]LIBINTL[@],$(LIBINTL),g" \ + -e "s,[@]LIBSOCKET[@],$(LIBSOCKET),g" \ + -e "s,[@]SERVENT_LIB[@],$(SERVENT_LIB),g" \ + -e "s,[@]HOSTENT_LIB[@],$(HOSTENT_LIB),g" \ + -e "s,[@]GETADDRINFO_LIB[@],$(GETADDRINFO_LIB),g" \ + -e "s,[@]INET_NTOP_LIB[@],$(INET_NTOP_LIB),g" \ + -e "s,[@]INET_PTON_LIB[@],$(INET_PTON_LIB),g" + guile-2.0.pc: guile-2.0.pc.in $(substitute) < "$<" > "$@.out" mv "$@.out" "$@"