1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-17 22:12:25 +02:00
Commit graph

28 commits

Author SHA1 Message Date
Neil Jerram
0ebbcf43c4 Remove AC_SYS_RESTARTABLE_SYSCALLS and related code
As the Autoconf documentation says, "These days portable programs
[...] should not rely on `HAVE_RESTARTABLE_SYSCALLS', since nowadays
whether a system call is restartable is a dynamic issue, not a
configuration-time issue."

In other words, if we ever rely on HAVE_RESTARTABLE_SYSCALLS, we are
at the mercy of any code that Guile happens to be linked with, because
that code could install a signal handler without the SA_RESTART flag,
and then a Guile system call could unexpectedly return EINTR.

The readline part of this goes back to this problem report:
http://sources.redhat.com/ml/guile/2000-05/msg00177.html; and is an
excellent example of the above paragraph.  It was noted during the
discussion that undefining HAVE_RESTARTABLE_SYSCALLS would fix the
problem, but that solution wasn't adopted - I guess because Guile was
still using cooperative threads then (not pthreads) and so there was a
significant concern (whether founded or not) that not using
restartable syscalls (where available) could lead to a loss of
performance.

Now Guile's default mode of operation is with pthreads, where we
already don't assume that HAVE_RESTARTABLE_SYSCALLS is reliable, so
there is no possible further performance loss.  And in any case we
really have no choice, if we want correct operation.

Thanks to Sylvain Beucler for reporting this and suggesting the fix.

* configure.in (AC_SYS_RESTARTABLE_SYSCALLS): Removed.

* doc/ref/posix.texi (Signals): Remove statement that Guile always
  sets SA_RESTART flag.

* guile-readline/configure.in (GUILE_SIGWINCH_SA_RESTART_CLEARED):
  Remove this setting, together with its test code.
  (HAVE_RL_PRE_INPUT_HOOK): Remove this setting and its code, as no
  longer needed.

* guile-readline/readline.c (sigwinch_enable_restart): Removed.
  (scm_init_readline): Remove setting of rl_pre_input_hook.

* libguile/_scm.h (SCM_SYSCALL): Remove the definition that relies on
  HAVE_RESTARTABLE_SYSCALLS.

* libguile/scmsigs.c (scm_sigaction_for_thread): Don't always set the
  SA_RESTART flag if available.  Update docstring accordingly.
  (scm_init_scmsigs): Remove code that sets SA_RESTART flag for all
  signals.

* THANKS: Add Sylvain.
2009-06-23 23:04:41 +01:00
Neil Jerram
39b94fee43 Provide easier configure options for GMP and readline
This patch uses the AC_LIB_LINKFLAGS macro, provided by Gnulib's
havelib module, to provide --with-gmp-prefix and
--with-readline-prefix configure options.  Many thanks to Bruno Haible
for suggesting and explaining this to me.

* configure.in (top level): Add AC_LIB_LINKFLAGS(gmp).

* guile-readline/configure.in (AC_CONFIG_AUX_DIR): Change to
  ../build-aux, to share the main build-aux directory and so avoid
  having to distribute multiple copies of config.rpath.
  (top level): Add AC_LIB_LINKFLAGS(readline).

* lib/Makefile.am, m4/gnulib-cache.m4: Regenerated by gnulib-tool for
  new import of the `havelib' module.
2009-06-14 17:58:15 +01:00
Ludovic Courtès
c4d088f54c Don't use "echo -n" in `guile-readline/configure.in'. 2008-04-16 09:01:33 +02:00
Neil Jerram
6a945c34cf * readline.c (scm_init_readline): Only do init_bouncing_parens ()
if HAVE_RL_GET_KEYMAP.
(init_bouncing_parens, find_matching_paren, match_paren): Compile
out if ! HAVE_RL_GET_KEYMAP.

* configure.in: Add check for rl_get_keymap.
2008-01-29 23:02:18 +00:00
Kevin Ryde
5be9f7290b merge from 1.8 branch 2006-06-17 22:53:04 +00:00
Marius Vollmer
e5ab7101aa * LIBGUILEREADLINE-VERSION: Bumped versions for the 1.7.1 release.
Added LIBGUILEREADLINE_MAJOR variable for inclusion in the name of
the shared library.
* configure.in: AC_SUBST it.
* Makefile.am: Substitute it into name of library.
2004-08-26 15:16:10 +00:00
Rob Browning
6fb858d50c move package and version args to AC_INIT as is now
recommended.  This also requires m4_esyscmd to read GUILE-VERSION
given the way AC_INIT handles its args.  Also move "foreign"
indication here.
2004-06-16 17:14:20 +00:00
Mikael Djurfeldt
c78a96e063 * configure.in: Use AC_PROG_LIBTOOL instead of AM_PROG_LIBTOOL.
* scheme-compound.texi (Hash Table Reference): Renamed hash-map
--> hash-map->list.

* configure.in: Use AC_PROG_LIBTOOL instead of AM_PROG_LIBTOOL.
2004-02-15 18:27:31 +00:00
Marius Vollmer
3894870bde When checking whether readline clears SA_RESTART, let readline read
from "/dev/null".  Otherwise, it might be stopped when run in the
background with job control, say.  Thanks to Michael Talbot-Wilson!
2003-05-03 23:18:51 +00:00
Rob Browning
41d8c90a5e * configure.in (GUILE_EFFECTIVE_VERSION): AC_SUBST. 2002-12-09 00:50:10 +00:00
Rob Browning
587cd12650 * configure.in: add definitions to AC_DEFINE calls for new
autoconf.
2002-04-11 04:36:52 +00:00
Thien-Thi Nguyen
88a1ce4c0e (LIBGUILEREADLINE-VERSION): Use this file from $srcdir. 2002-02-26 07:16:12 +00:00
Rob Browning
cbab485527 * configure.in: source ./LIBGUILEREADLINE-VERSION for version info
and then AC_SUBST the resulting variables:
LIBGUILEREADLINE_INTERFACE_CURRENT,
LIBGUILEREADLINE_INTERFACE_REVISION,
LIBGUILEREADLINE_INTERFACE_AGE, and
LIBGUILEREADLINE_INTERFACE.
2002-02-25 04:59:01 +00:00
Stefan Jahn
8f99e3f38b 2001-11-04 Stefan Jahn <stefan@lkcc.org>
* NEWS: Corrected remarks about SCM_API.

        * configure.in: Defining USE_DLL_IMPORT definition to indicate
        usage of DLL import macros in `libguile/__scm.h'.
        (LIBOBJS): Removed `fileblocks.o' from the list of object files.
        Somehow Jim Blandy's patch from 1997 did not survive.

2001-11-04  Stefan Jahn  <stefan@lkcc.org>

        * configure.in (EXTRA_DEFS): Follow-up patch.  Using SCM_IMPORT
        instead of __SCM_IMPORT__.

        * readline.c (scm_readline_init_ports): Disable input/output
        stream redirection for Win32.  The readline package for Win32
        does not support this.  The guile-readline library works fine
        for command line editing.

        * readline.h (SCM_RL_API): Renamed __FOO__ macros into FOO.

2001-11-04  Stefan Jahn  <stefan@lkcc.org>

        * Makefile.am (libguile_la_LIBADD): Added $(THREAD_LIBS_LOCAL)
        here (was at guile_LDADD) which describes the dependency
        correctly and allows a clean build on Win32.

        * __scm.h (SCM_API): Follow-up patch.  Renamed __FOO__ macros
        into FOO.

        * __scm.h: USE_DLL_IMPORT indicates the usage of the DLL
        import macros for external libraries (libcrypt, libqthreads,
        libreadline and libregex).

        * coop-defs.h: Include <winsock2.h> for `struct timeval'.

        * posix.c (flock): Added support for flock() in M$-Windows.

        * guile.c (SCM_IMPORT): Follow-up patch.  Use SCM_IMPORT instead
        of __SCM_IMPORT__.

        * fports.c (getflags): Differentiate reading and writing pipes
        descriptors.

        * filesys.c (S_IS*): Redefine all of the S_IS*() macros for
        M$-Windows.

        * coop.c (coop_condition_variable_timed_wait_mutex): Use
        conditionalized error code if `ETIMEDOUT' is not available.
        (scm_thread_usleep): Remove bogus declaration of `struct timeval
        timeout'.

        * numbers.c (PTRDIFF_MIN): Moved this definition where it actually
        belongs.  That is because NO_PREPRO_MAGIC gets undefined after
        each inclusion of `num2integral.i.c'.
        (SIZE_MAX): Define NO_PREPRO_MAGIC if SIZE_MAX is undefined.

2001-11-04  Stefan Jahn  <stefan@lkcc.org>

        * md/Makefile.am (EXTRA_DIST): Added `i386.asm'.

        * md/i386.asm: New file.  Contains the Intel syntax version for
        nasm/tasm/masm of the file `i386.s'.

        * qt.h.in: Definition of QT_API, QT_IMPORT and QT_EXPORT.
        Prefixed each symbols which is meant to go into a DLL.

        * Makefile.am (libqthreads_la_LDFLAGS):  Put `-no-undefined'
        into LDFLAGS to support linkers which do not allow unresolved
        symbols inside shared libraries.
        (EXTRA_DIST): Add `libqthreads.def', which is an export file
        definition for M$-Windows.  It defines exported symbols.  This is
        necessary because the M$VC linker does not know how to export
        assembler symbols into a DLL.

2001-11-04  Stefan Jahn  <stefan@lkcc.org>

        * srfi-13.h, srfi-14.h, srfi-4.h: Follow-up patch.  Renamed
        __FOO__ macros into FOO.

2001-11-04  Stefan Jahn  <stefan@lkcc.org>

        * tests/ports.test: Run (close-port) before (delete-file) if
        necessary/advisory.
2001-11-04 15:52:30 +00:00
Marius Vollmer
78f8126600 Define AC_LIBTOOL_WIN32_DLL to build clean dlls
on Win32 platforms.
Define extra compiler flags necessary to build clean dlls.
2001-11-02 00:06:26 +00:00
Marius Vollmer
dcb17187c3 * configure.in: Check for rl_filename_completion_function.
* readline.c (s_scm_filename_completion_function): Use
rl_filename_completion_function instead of
filename_completion_function, if we have it.
(scm_init_readline): Use rl_compentry_func_t instead if Function
when _RL_FUNCTION_TYPEDEF is defined.
2001-06-14 17:42:45 +00:00
Marius Vollmer
691f5a4d2d Added AC_PREREQ(2.50) and minimally changed for
autoconf 2.50.  This is mostly so that the `transparent autoconf
wrapper' on Debian picks the right version of autoconf.
2001-06-03 00:59:23 +00:00
Gary Houston
c2c2760293 * configure.in: test $ac_cv_lib_readline_readline instead of
$ac_cv_lib_readline_main.  Thanks to Lars J. Aas.
2000-11-19 12:21:36 +00:00
Marius Vollmer
49dd8ff330 * configure.in: Check for curses, terminfo and termlib libraries
in addition to ncurses and termcap.
Check for `readline' in libreadline, not for `main'.
Thanks to Albert Chin!
2000-09-17 21:16:18 +00:00
Marius Vollmer
6011327117 * configure.in (rl_pre_input_hook): Don't check for this with
AC_CHECK_FUNCS, it doesn't work on HP/UX.  Test for it with
AC_TRY_LINK.
2000-07-19 18:10:30 +00:00
Mikael Djurfeldt
f59a8b6460 * configure.in: Check for siginterrupt and rl_pre_input_hook. 2000-06-19 01:11:28 +00:00
Mikael Djurfeldt
49a2970b4a * configure.in: Added test if readline clears SA_RESTART flag for
SIGWINCH.  (Thanks to Dale P. Smith.)
2000-06-19 00:42:30 +00:00
Mikael Djurfeldt
5ca264aaec * configure.in: Put more ink before readline version warning.
(Thanks to Ian Grant.)
2000-06-06 12:41:39 +00:00
Jim Blandy
52b30d5e8d * configure.in: Call AM_PROG_CC_STDC.
* configure, aclocal.m4: Regenerated.
1999-09-22 19:58:54 +00:00
Marius Vollmer
395753a155 * configure.in: Get version from ../GUILE-VERSION and use it for
package version.
1999-09-11 15:21:24 +00:00
Mikael Djurfeldt
f30a1c9560 * configure.in (HAVE_RL_GETC_FUNCTION): Modified test to actually
use rl_getc_function.  Otherwise smart compilers, like gcc,
optimize away the reference so that no error occurs in the link
phase.
1999-08-17 20:58:19 +00:00
Mikael Djurfeldt
66e28f022f * configure.in: Changed AC_MSG_ERROR into AC_MSG_WARN in case
readline doesn't exist on the system, so that configuration can
proceed normally without readline.
1999-07-24 11:38:30 +00:00
Marius Vollmer
c374ab69c1 * Checked everything into CVS. 1999-07-23 21:43:58 +00:00