* configure.ac: Add a check for GC_set_start_callback.
* libguile/gc.c (scm_i_gc): If we don't have GC_set_start_callback, run
the before-gc hook manually here.
(scm_init_gc): Otherwise set it as a start callback.
* libguile/hashtab.c (weak_gc_callback, weak_gc_hook)
(weak_gc_finalizer, scm_c_register_weak_gc_callback): Fix to work
either way, with or without GC_set_start_callback.
* configure.ac: Check for <sched.h>.
* libguile/posix.c [HAVE_SCHED_H]: Include <sched.h>, for
`sched_setaffinity' & co.
Reported by Marco Maggi <marco.maggi-ipsu@poste.it>.
* configure.ac: Check for pthread_sigmask.
* libguile/gen-scmconfig.c: Create SCM_HAVE_GC_PTHREAD_SIGMASK.
* libguile/pthread-threads.h (scm_i_pthread_sigmask): Only redirect to
GC_pthread_sigmask if GC_pthread_sigmask is present.
* configure.ac: Check for sys/mman.h.
* libguile/objcodes.c (verify_cookie): Factor cookie verification out to
a helper function.
(make_objcode_from_file): Rename from make_objcode_by_mmap. If mmap
is unavailable, just read(2) to a bytevector.
This is not present in earlier versions of BDW-GC
* configure.ac: check for GC_allow_register_threads
* libguile/threads.c (scm_i_init_thread_for_guile): Only call
GC_allow_register_threads if it is present.
* configure.ac: Check for GC_pthread_exit and GC_pthread_cancel.
* libguile/gen-scmconfig.c: Write HAVE_GC_PTHREAD_CANCEL and
HAVE_GC_PTHREAD_EXIT into scmconfig.h.
* libguile/pthread-threads.h (scm_i_pthread_exit, scm_i_pthread_cancel):
Only redefine to their GC_pthread_* variants if we have those
functions, which is not the case in libgc < 7.2.
* configure.ac: Strip anything beyond `-I' from $GUILE_CFLAGS so that
`guile-2.0.pc' does not export them to the user. Reported and fixed
by Bruno Haible <bruno@clisp.org>.
* configure.ac: Detect when struct sockaddr_in has a sin_len field.
Remove obsolete comment.
* libguile/socket.c (scm_to_sockaddr, scm_fill_sockaddr): Set the
sin_len field in our struct sockaddr_in when it exists.
* libguile/dynl.c (augment_env): New function.
(sysdep_dynl_init): Use it instead of `lt_dladdsearchdir'.
* configure.ac: Define `SHARED_LIBRARY_PATH_VARIABLE'.
Guile's configure script takes fairly long. On a system without
automatic build dependency installation, it is amplified by the fact
that your user might be both impatient and not read the build
instructions, thus needs to rerun configure several times only to find
out there is another dependency to install. Still, there is help even
for such kinds of misguided figures such as me: save the temporary
config.cache file (if one is used anyway) before embarking upon the set
of tests that are likely to error out. That way, the second and further
reruns are much faster.
The downside of this patch is that, when fixing the errors requires
changing to precious variables (such as CPPFLAGS or so), the user will
need to 'rm -f config.cache' to keep configure happy.
* configure.ac: Call AC_CACHE_SAVE before the gmp tests.
* configure.ac (HAVE_SHARED_LIBRARIES): New Automake conditional.
* test-suite/standalone/Makefile.am (check_SCRIPTS): Add `test-asmobs',
`test-ffi', and `test-extensions' only when `HAVE_SHARED_LIBRARIES'.
* configure.ac: Check for GC_call_with_gc_active.
* libguile/threads.h (scm_i_thread): Remove "top", as it's not used.
* libguile/threads.c (with_gc_inactive, with_gc_active): Define shims to
GC_do_blocking and GC_call_with_gc_active.
(scm_i_init_thread_for_guile): Don't do thread base adjustment here,
do it in scm_i_with_guile_and_parent. The previous logic would never
be run.
(scm_i_with_guile_and_parent): If we enter Guile mode, leave it too.
Take care of adjusting the thread stack base here too. Also, call
with_gc_active.
(scm_without_guile): Refactor.
* configure.ac: Add checks for `sched_setaffinity' and
`sched_getaffinity'.
* doc/ref/posix.texi (Processes): Document `getaffinity' and
`setaffinity'.
* libguile/posix.c (cpu_set_to_bitvector,
scm_getaffinity)[HAVE_SCHED_GETAFFINITY]: New functions.
(scm_setaffinity)[HAVE_SCHED_SETAFFINITY]: New function.
* libguile/posix.h (scm_getaffinity, scm_setaffinity): New declarations.
* test-suite/tests/posix.test ("affinity"): New test prefix.
* configure.ac: Relax the sizeof(long)==sizeof(void*) restriction,
instead asserting that the sizeof(long)<=sizeof(void*). There will
still be problems on nonstandard platforms related to the interface
with gmp, but those are confined to numbers.c.
Fixes an error when running ./configure:
./configure: line 31873: text: command not found
* configure.ac: Change "text" to "test", in libltdl-related code.
* libguile/srfi-1.c:
* libguile/srfi-1.h:
* libguile/srfi-60.c:
* libguile/srfi-60.h:
* libguile/ChangeLog-srfi: Move here, from the srfi/ dir. The C API is
internal. Add API to register the extensions, called by init.c.
* libguile/init.c: Verily, register srfi extensions.
* libguile/Makefile.am: Add srfi files.
* module/srfi/srfi-1.scm:
* module/srfi/srfi-60.scm: Update load-extension invocation.
* Makefile.am:
* configure.ac: Remove srfi/ dir.
* test-suite/standalone/Makefile.am:
* test-suite/standalone/test-srfi-1.c: Remove srfi-1 C test, we don't
support this API any more.
* srfi/srfi-13.c:
* srfi/srfi-13.h:
* srfi/srfi-14.c:
* srfi/srfi-14.h:
* srfi/srfi-4.c:
* srfi/srfi-4.h:
* srfi/Makefile.am:
* configure.ac: Remove empty shlibs and headers for srfis 4, 13, and
14. The "version" was never programmatically exported, so there's no
possible way people could have used these.
This updates Gnulib to v0.0-4219-g84cdd8b.
* m4/gnulib-cache.m4: Add `isinf' and `isnan'.
* configure.ac: Remove checks for `floatingpoint.h', `ieeefp.h', and
`nan.h'.
* libguile/gen-scmconfig.c (main): Remove definitions of
`SCM_HAVE_FLOATINGPOINT_H', `SCM_HAVE_IEEEFP_H', and
`SCM_HAVE_NAN_H'.
* libguile/numbers.c (isnan)[SCO && !HAVE_ISNAN]: Remove.
(isinf)[SCO && !HAVE_ISINF]: Remove.
(xisinf, xisnan): Remove. Change callers to use `isinf' and `isnan'.
(guile_ieee_init): Remove the `defined HAVE_ISINF' and `define
HAVE_ISNAN' conditions.
* libguile/numbers.h: Remove code conditional on
`SCM_HAVE_FLOATINGPOINT_H', `SCM_HAVE_IEEEFP_H', or `SCM_HAVE_NAN_H'.
Suggested by primus <rprimus@gmail.com>.
* configure.ac: Use `AC_LIB_HAVE_LINKFLAGS' when checking for libltdl.
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD):
Add $(LTLIBLTDL).
* README: Update to make it clear that libgc and libffi don't have a
`--with-XXX-prefix' option.
* configure.ac (sitedir): Fix definition to point to the
version-specific sitedir.
* libguile/Makefile.am (libpath.h): Take sitedir definition from
configure.ac.
* README: Remove docs on "discouraged".
* configure.ac: Remove one more "discouraged" thing.
* doc/ref/api-deprecated.texi: Rename from api-discdepr.texi, and remove
sections on "discouraged".
* doc/ref/Makefile.am:
* doc/ref/guile.texi: Update referrers.
* GUILE-VERSION (GUILE_VERSION): Remove.
* Makefile.am (dist-hook): Depend on `gen-tarball-version'.
(BUILT_SOURCES): New variable.
($(top_srcdir)/.version, gen-tarball-version): New targets.
* cfg.mk (git-version-gen-tag-sed-script): New variable.
* configure.ac: Use `build-aux/git-version-gen' to generate the VERSION
argument of `AC_INIT'. Initialize Automake without `check-news'.
Define $GUILE_VERSION as an alias for $PACKAGE_VERSION.