1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
Commit graph

159 commits

Author SHA1 Message Date
Andy Wingo
b2208d2e98 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	configure.ac
	libguile/fluids.c
	libguile/gc.c
	libguile/gc.h
	libguile/objcodes.c
	libguile/procprop.c
	libguile/vm.c
	module/ice-9/psyntax-pp.scm
	module/ice-9/psyntax.scm
2011-12-01 23:31:50 +01:00
Andy Wingo
6360beb28a increase garbage collection rate if the process is growing
* configure.ac: Check for GC_get_free_space_divisor.
* libguile/gc.c (GC_get_free_space_divisor): Define an implementation,
  if needed.
  (accumulate_gc_timer): Fix indentation.
  (get_image_size): New terrible hack.  Needs implementations on other
  platforms.
  (adjust_gc_frequency): Attempt to adjust the GC frequency based on
  process image growth.  Needs more comments.
  (scm_init_gc): Add the adjust_gc_frequency to the after_gc_c_hook.
2011-11-29 10:12:22 +01:00
Andy Wingo
14294ce0df get heap stats with GC_get_heap_usage_safe, if available.
* configure.ac: Check for GC_get_heap_usage_safe.
* libguile/gc.c (SCM_DEFINE): Use GC_get_heap_usage_safe.
2011-11-28 19:58:53 +01:00
Andy Wingo
3dc9f41900 support for new GC_move_disappearing_link
* configure.ac: Check for GC_move_disappearing_link.
* libguile/weak-set.c (move_weak_entry):
* libguile/weak-table.c (move_disappearing_links):
  (move_weak_entry): Use GC_move_disappearing_link if available.
2011-11-24 11:47:36 +01:00
Ludovic Courtès
1c1f7a3223 configure: Make sure $GUILE_FOR_BUILD is suitable.
* acinclude.m4 (GUILE_CHECK_VERSION, GUILE_CHECK_GUILE_FOR_BUILD): New
  macros.

* configure.ac: Remove $GUILE_FOR_BUILD tests.  Use
  `GUILE_CHECK_GUILE_FOR_BUILD'.
2011-11-23 22:05:53 +01:00
Andy Wingo
ab4bc85398 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	GUILE-VERSION
	test-suite/tests/srfi-4.test
2011-07-25 18:26:37 +02:00
Ludovic Courtès
f4b7d918ef guild: Close over `$bindir/guile'.
* configure.ac: Substitute `guile_program_name'.

* meta/guild.in: Use `@bindir@/@guile_program_name@' by default.

* meta/uninstalled-env.in: Define $GUILE.
2011-07-23 22:43:38 +02:00
Ludovic Courtès
0adcd1bd93 configure: Build a tar.xz' in addition to tar.gz'.
* configure.ac: Explicitly require Automake 1.11.  Add Automake option
  `dist-xz'.
2011-07-06 16:01:22 +02:00
Andy Wingo
8a562c697b Merge remote-tracking branch 'local-2.0/stable-2.0'
Conflicts:
	libguile/deprecated.c
	module/ice-9/psyntax-pp.scm
2011-06-30 13:47:46 +02:00
Andy Wingo
08969a2407 fix --disable-modules build
* configure.ac (HAVE_MODULES): Define HAVE_MODULES iff
  --enable-modules.

* libguile/deprecated.c (scm_dynamic_args_call)
* libguile/extensions.c (load_extension):
* libguile/init.c (scm_i_init_guile): Use HAVE_MODULES in a few places.
2011-06-30 12:26:31 +02:00
Andy Wingo
43adb591f4 allow gc <= 7.1 to stop the signal delivery thread
* configure.ac: Add a check for GC_get_suspend_signal().
* libguile/scmsigs.c (GC_get_suspend_signal): Define a fallback
  implementation if one isn't available.
  (signal_delivery_thread): Unmask the suspend signal so that GC can
  stop the world.  Fixes test-pthread-create on libgc 7.1 and earlier.
  Thanks to Frank Terbeck <ft@bewatermyfriend.org> for the report.
2011-06-23 11:31:03 +02:00
Andy Wingo
236f901b0e update stack growth direction check
* configure.ac: Pull stack growth direction check from upstream
  autoconf.  See
  http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00035.html
  for a discussion.
2011-06-20 10:03:35 +02:00
Ludovic Courtès
d1f2417102 Comment on the Gnulib `clock-gettime' workaround.
* acinclude.m4: Remove `clock_time.m4' serial.

* configure.ac: Add URL of the discussion about `clock-gettime'.
2011-06-19 16:39:22 +02:00
Ludovic Courtès
10c29ebde5 configure: Factorize code checking for `iconveh_' constants; use the cache.
* configure.ac: Remove code that determines the values of the `iconveh_'
  constants.  Use `GUILE_UNISTRING_ICONVEH_VALUES'. instead.

* acinclude.m4 (GUILE_UNISTRING_CONSTANT,
  GUILE_UNISTRING_ICONVEH_VALUES): New macros.
2011-06-19 16:30:56 +02:00
Andy Wingo
78f0ef20a7 Merge remote-tracking branch 'local-2.0/stable-2.0'
Conflicts:
	module/ice-9/psyntax-pp.scm
	module/language/tree-il/compile-glil.scm
2011-06-18 01:07:20 +02:00
Andy Wingo
ad0fedbf82 fix AC_LANG_SOURCE warnings
* configure.ac: Fix annoying AC_LANG_SOURCE warnings.
2011-06-17 11:37:11 +02:00
Andy Wingo
074f39c7bc check for clock_getcpuclockid in gl_CLOCK_TIME
* acinclude.m4 (gl_CLOCK_TIME): It could be that clock_gettime is in
  libc but clock_getcpuclockid is not, so check for that explicitly.
2011-06-17 11:31:12 +02:00
Andy Wingo
95643853d7 remove win32-dirent.[ch]
* libguile/win32-dirent.c:
* libguile/win32-dirent.h: Remove these files.  MinGW has opendir and
  readdir support, I hear.

* configure.ac:
* libguile/filesys.c:
* libguile/Makefile.am: Adapt.
2011-06-17 00:20:56 +02:00
Andy Wingo
46da7909e1 Merge remote-tracking branch 'local-2.0/stable-2.0'
Conflicts:
	meta/Makefile.am
2011-06-02 22:49:33 +02:00
Andy Wingo
b8b0659879 rename guile-tools' to guild'
* configure.ac: Look for ln -s.  Write out `guild' instead of
  `guile-tools'.

* meta/Makefile.am (install-data-hook): Link the installed `guild' to
  the backward-compatible `guile-tools' name.
  (bin_SCRIPTS, EXTRA_DIST): Fix up for guild change.

* meta/guild.in: Moved here from `guile-tools.in'.

* doc/ref/Makefile.am (autoconf-macros.texi):
* doc/ref/api-evaluation.texi (Compilation):
* doc/ref/autoconf.texi (Autofrisk, Using Autofrisk):
* doc/ref/mod-getopt-long.texi (getopt-long Reference):
* doc/ref/tools.texi (Miscellaneous Tools, Executable Modules): Minimal
  doc update.

* .gitignore:
* am/guilec (.scm.go):
* libguile/Makefile.am (snarf2checkedtexi):
* module/Makefile.am (ice-9/psyntax-pp.go): Update makefiles, etc.

* module/scripts/README:
* module/scripts/lint.scm:
* module/scripts/list.scm: Update commentaries.
2011-05-31 22:01:47 +02:00
Andy Wingo
891a1851a1 Merge remote-tracking branch 'origin/stable-2.0' 2011-05-05 14:09:29 +02:00
Andy Wingo
e3b8bce8f4 build support for detecting clock_gettime, with -lrt if needed
* acinclude.m4 (gl_CLOCK_TIME):
* configure.ac: Locally include gl_CLOCK_TIME.  To be fixed properly
  when gnulib updates their license to reflect the actual BSD state of
  things.
* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS):
  Add -lrt for clock_gettime, if needed.
* meta/guile-2.0-uninstalled.pc.in:
* meta/guile-2.0.pc.in: Likewise, in Libs.private.
2011-05-04 20:19:11 +02:00
Andy Wingo
ad378da975 check for iconveh values at configure-time
* configure.ac: Check for the iconveh values here, instead of relying on
  gen-scmconfig to know them.  That doesn't work in general because
  gen-scmconfig runs on the build machine, not the target machine.

* libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): Revert rule to the
  revision before 533d8212.

* libguile/gen-scmconfig.h.in (SCM_I_GSC_ICONVEH_ERROR):
  (SCM_I_GSC_ICONVEH_QUESTION_MARK):
  (SCM_I_GSC_ICONVEH_ESCAPE_SEQUENCE):
* libguile/gen-scmconfig.c: Use configure-time substitutions to set
  SCM_ICONVEH_ERROR_HANDLER et al.
2011-04-28 22:39:20 +02:00
Andy Wingo
1903eae4c9 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	GUILE-VERSION
2011-04-28 15:53:35 +02:00
Ludovic Courtès
dd7d0148f2 Update Gnulib to v0.0-5158-g7d06b32; remove strcase' and version-etc-fsf'.
* m4/gnulib-cache.m4: Remove `strcase' and `version-etc-fsf'.

* configure.ac (POTENTIAL_GCC_CFLAGS): Remove `-Wundef'.

* libguile/script.c: Don't include <version-etc.h>.
2011-04-25 23:59:37 +02:00
Ludovic Courtès
969bb92e9b Turn the libunistring/iconv configure check into a macro.
* acinclude.m4 (GUILE_LIBUNISTRING_WITH_ICONV_SUPPORT): New macro.

* configure.ac: Use it.
2011-04-22 16:59:08 +02:00
Ludovic Courtès
a508fbdb01 Fix typo in `configure.ac'.
* configure.ac: Add missing comma in `AC_RUN_IFELSE' invocation.
2011-04-22 16:59:07 +02:00
Andy Wingo
514ff6ea07 add test that libunistring was built with iconv support
* configure.ac: Add check that libunistring was built with iconv
  support.  Thanks to Mark Weaver for the debugging and test program.
2011-04-21 16:02:09 +02:00
Andy Wingo
66b229d56e pre-GC_set_start_callback compatibility
* 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.
2011-04-15 18:31:06 +02:00
Ludovic Courtès
073167ef7b Allow compilation with `--disable-posix'.
Reported by Dmitry Dzhus <dima@dzhus.org>.

* configure.ac: Remove `AC_LIBOBJ([filesys])'.  Document
  `--disable-posix' as omitting non-essential POSIX interfaces.

* libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
  Add `filesys.c'.
  (DOT_DOC_FILES): Add `filesys.doc'.
  (EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): Remove
  `filesys.c'.

* libguile/posix.c (scm_mkstemp, scm_access): Move to `filesys.c'.
  (scm_init_posix): Move `R_OK' etc. to `filesys.c'.

* libguile/filesys.c (scm_chown, scm_chmod, scm_umask, scm_open_fdes,
  scm_open, scm_close, scm_close_fdes, scm_link, scm_tc16_dir,
  scm_directory_stream_p, scm_opendir, scm_readdir, scm_rewinddir,
  scm_closedir, scm_dir_print, scm_dir_free, scm_chdir, scm_getcwd,
  set_element, fill_select_type, get_element, retrieve_select_type,
  scm_select, scm_fcntl, scm_fsync, scm_symlink, scm_readlink,
  scm_lstat, scm_copy_file): Conditionalize on HAVE_POSIX.
  (scm_mkstemp, scm_access): New functions.
  (scm_init_filesys): Conditionalize `scm_tc16_dir', `O_RDONLY', etc. on
  HAVE_POSIX.  Define `R_OK', `W_OK', etc.

* libguile/fports.c (fport_print): Use `scm_ttyname' only when
  HAVE_POSIX.

* libguile/i18n.c (lock_locale_mutex, unlock_locale_mutex): New
  functions.  Update users of `scm_i_locale_mutex' to use them.

* libguile/init.c (scm_i_init_guile): Always call `scm_init_filesys'.

* meta/guile-tools.in (main): Use `setlocale' only when it is defined.

* module/ice-9/boot-9.scm: Always load `ice-9/posix'.
2011-04-15 00:09:16 +02:00
Ludovic Courtès
22072f2155 Include <sched.h> in `posix.c'.
* 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>.
2011-04-14 23:16:21 +02:00
Andy Wingo
0c81a0c13a bump effective version to 2.2
* .gitignore:
* GUILE-VERSION (GUILE_EFFECTIVE_VERSION):
* configure.ac:
* doc/example-smob/Makefile (CFLAGS, LIBS):
* doc/guile.1:
* doc/ref/libguile-concepts.texi:
* doc/ref/srfi-modules.texi:
* doc/ref/vm.texi:
* meta/Makefile.am (EXTRA_DIST, pkgconfig_DATA):
* meta/guile-config.in (guile-module):
* meta/guile-2.2-uninstalled.pc.in:
* meta/guile-2.2.pc.in: Bump effective version to 2.2.
2011-04-11 23:45:04 +02:00
Andy Wingo
90fed973ab pthread-threads.h: only redirect to GC_pthread_sigmask if it is present
* 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.
2011-04-03 22:03:56 +02:00
Andy Wingo
13a78b0fd7 support loading objcode even if mmap(2) is unavailable
* 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.
2011-04-01 12:34:21 +02:00
Michael Gran
4000d0641f check for GC_allow_register_threads
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.
2011-03-30 09:21:09 +02:00
Andy Wingo
8cf49d836f fix compilation with libgc 7.0, 7.1
* 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.
2011-03-29 13:21:44 +02:00
Neil Jerram
aab99f7b8b Make explicit that GUILE_FOR_BUILD is only used when cross-compiling
* configure.ac (GUILE_FOR_BUILD): Change normal build value to
  'this-value-will-never-be-used'.
2011-03-25 19:45:14 +00:00
Neil Jerram
08e6b25ca2 GUILE_FOR_BUILD is only needed by meta/guile.in, not by Makefiles
* configure.ac: Use AM_SUBST_NOTMAKE for GUILE_FOR_BUILD instead of
  AC_SUBST.
2011-03-25 19:45:14 +00:00
Andy Wingo
5f0d2951a0 bdw-gc 6.8 compatibility (hopefully)
* configure.ac (HAVE_GC_STACK_BASE): New check.

* libguile/threads.c (GC_UNIMPLEMENTED, GC_SUCCESS): Define if needed.
  (GC_register_my_thread, GC_unregister_my_thread)
  (GC_call_with_stack_base): Define shims if needed.
2011-03-24 20:34:31 +01:00
Ludovic Courtès
364b6eb7cf Add `gc-benchmarks/' to the distribution.
* gc-benchmarks/Makefile.am: New file.

* configure.ac: Produce it.

* Makefile.am (SUBDIRS): Add `gc-benchmarks'.
2011-03-06 23:05:00 +01:00
Ludovic Courtès
62cdb4e478 Strip any CPPFLAGS other than -I' from guile-2.0.pc'.
* 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>.
2011-02-28 00:21:48 +01:00
Ludovic Courtès
958a28e9fe Change tag naming convention to `vX.Y.Z'.
* configure.ac: Tell `git-version-gen' that we're switching to a
  `vX.Y.Z' scheme for release tags.
2011-02-16 10:25:23 +01:00
Noah Lavine
482d311b39 Set sockaddr_in.sin_len field when it exists.
* 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.
2011-02-13 22:08:44 +01:00
Ludovic Courtès
e66ff09adb Make sure we don't override the user's extension search path.
* libguile/dynl.c (augment_env): New function.
  (sysdep_dynl_init): Use it instead of `lt_dladdsearchdir'.

* configure.ac: Define `SHARED_LIBRARY_PATH_VARIABLE'.
2011-02-12 12:25:18 +01:00
Ralf Wildenhues
726788204f Save config.cache before tests which are likely to fail.
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.
2011-02-12 12:01:03 +01:00
Ludovic Courtès
2ddf085149 Disable stand-alone tests that require dlopen' when --disable-shared'.
* 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'.
2011-01-31 19:26:01 +01:00
Andy Wingo
cde24ce12b scm_with_guile calls GC_call_with_gc_active
* 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.
2011-01-22 19:55:31 +01:00
Andy Wingo
6f81b18abe add (ice-9 poll), a poll wrapper
* libguile/poll.c:
* libguile/poll.h:
* module/ice-9/poll.scm: New module, (ice-9 poll).

* module/Makefile.am:
* libguile/init.c:
* libguile/Makefile.am: Adapt.

* configure.ac: Check for poll.h and poll.
2010-12-03 15:16:37 +01:00
Ludovic Courtès
fe613fe25d Add bindings to GNU sched_setaffinity' and sched_getaffinity'.
* 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.
2010-12-03 00:38:29 +01:00
Andy Wingo
8d4f5e8f92 relax sizeof(long) restriction in configure.ac
* 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.
2010-11-19 15:22:43 +01:00