1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-15 10:10:21 +02:00
Commit graph

10869 commits

Author SHA1 Message Date
Ludovic Courtès
62bc1072c1 Fix stack growth direction check.
Backport of 236f901b0e from `stable-2.0'.
Fixes <http://bugs.gnu.org/11845>.
Reported by Cyprien Nicolas <c.nicolas@gmail.com>.

* configure.in: Pull stack growth direction check from upstream
  Autoconf.  See
  http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00035.html
  for a discussion.
2012-07-03 23:27:08 +02:00
Ludovic Courtès
a3467025d9 Remove unnecessary chmod' in test-suite/standalone'.
* test-suite/standalone/Makefile.am (all-local): Remove.
2012-05-23 15:18:11 +02:00
Ludovic Courtès
2ce4a1ae88 configure: Provide guesses for `AC_RUN_IFELSE' tests when cross-compiling.
* configure.in: Define PTHREAD_ATTR_GETSTACK_WORKS when cross-compiling.
2012-05-23 15:17:18 +02:00
Ludovic Courtès
e7e267be01 Build without `-Werror' by default.
* configure.in: Set GUILE_ERROR_ON_WARNING to "no" by default.
2012-05-23 14:59:17 +02:00
Ludovic Courtès
93f68a5ac4 Remove set-but-unused variables from libguile.
* libguile/filesys.c (scm_readdir): Remove set-but-unused `namlen' variable.
* libguile/fports.c (fport_flush): Same for `written'.
* libguile/gc-segment.c (scm_i_initialize_heap_segment_data): Same
  for `bvec_ptr'.
* libguile/posix.c (scm_nice): Same for `nice_value'.
* libguile/scmsigs.c (take_signal): Same for `count'.
* libguile/srfi-4.c (uvec_to_list): Same for `elts'.
* libguile/stacks.c (scm_stack_ref): Same for `c_index'.
* libguile/threads.c (scm_std_select): Same for `count'.
* libguile/throw.c (scm_ithrow): Same for `answer'.
* libguile/unif.c (scm_i_read_array): Same for `got_rank'.
2012-05-23 14:55:38 +02:00
Noah Lavine
e254747644 Remove unused variable
* libguile/async.c (scm_i_queue_async_cell): remove unused
  variable 'count'.
2012-05-01 23:27:58 -04:00
Noah Lavine
f5556ab3e6 Remove duplicate definitions
* libguile/c-tokenize.lex: remove duplicate definitions of yy*
  functions. Solution by Sergey Poznyakoff.
2012-05-01 23:27:32 -04:00
Ludovic Courtès
9718acde77 Don't rely on `HAVE_' macros in public header "tags.h".
* configure.ac: Check for `intptr_t' and `uintptr_t'.  Substitute
  `SCM_I_GSC_T_INTPTR' and `SCM_I_GSC_T_UINPTR'.

* libguile/__scm.h (SCM_T_UINTPTR_MAX, SCM_T_INTPTR_MIN,
  SCM_T_INTPTR_MAX): New macros.

* libguile/_scm.h (SIZEOF_SCM_T_BITS): New macro.

* libguile/gen-scmconfig.c (main): Produce typedefs for `scm_t_intptr'
  and `scm_t_uintptr'.

* libguile/gen-scmconfig.h.in (SCM_I_GSC_T_INTPTR, SCM_I_GSC_T_UINPTR):
  New macros.

* libguile/tags.h: Don't check for `HAVE_INTTYPES_H' and
  `HAVE_STDINT_H'; don't include <inttypes.h> nor <stdint.h>.
  (scm_t_signed_bits, scm_t_bits): Define unconditionally as aliases for
  `scm_t_intptr' and `scm_t_uintptr', respectively.
  (SCM_T_SIGNED_BITS_MAX, SCM_T_SIGNED_BITS_MIN, SCM_T_BITS_MAX):
  Likewise.
  (SIZEOF_SCM_T_BITS): Remove.
2011-11-06 18:15:51 +01:00
Cedric Cellier
c27411f180 Default to using poll(2) in `fport_input_waiting'.
* libguile/fports.c (fport_input_waiting): Use poll(2) instead of
  select(2) when possible.  Cosmetic changes by Ludovic Courtès.

* configure.in: Look for <poll.h> and `poll'.
2011-10-19 17:21:52 +02:00
Andy Wingo
99c6be814f fix write-beyond-end of an on-stack buffer while reading typed arrays
* libguile/unif.c (scm_i_read_array): Fix case in which we could write
  beyond the end of `tag'.  See
  http://article.gmane.org/gmane.lisp.guile.devel/12685.
2011-07-29 09:31:32 +02:00
Ludovic Courtès
b720f24494 Make `sockets.test' more robust.
* test-suite/tests/socket.test ("AF_INET6/SOCK_STREAM"): Gracefully
  handle cases where this combination is not supported.
2011-04-28 22:31:44 +02:00
Neil Jerram
0270d90125 Couple of README updates
* README: Update version to 1.8.8; update URL for GMP.  (Thanks to
  Yuriy Taraday for pointing out the wrong URL.)
2010-12-24 00:11:46 +00:00
Ludovic Courtès
72e4a3b1df Bump version number for 1.8.8.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
  (LIBGUILE_INTERFACE_CURRENT): Increment, to account for the addition
  of `scm_c_random64'.
  (LIBGUILE_INTERFACE_REVISION): Reset.
  (LIBGUILE_INTERFACE_AGE): Increment.
2010-12-13 20:23:43 +01:00
Ludovic Courtès
2e44da4aea Update `NEWS'.
* NEWS: Update for 1.8.8.
2010-12-13 20:22:39 +01:00
Ludovic Courtès
2172d53709 Fix doc about the installation of GDS' elisp files.
This is a followup to commit dcf7c034 ("add note to docs about gds.el").

* doc/ref/scheme-using.texi (GDS Getting Started): Correct the comment
  about whether elisp files get installed.
2010-12-13 20:20:23 +01:00
Andy Wingo
4e30666a1a fix libguile compilation on newer solaris
* libguile/gc_os_dep.c: Update SUNOS5 stack and heap bounding heuristics
  from upstream libgc. Based on a patch by Marion Hakanson.
2010-08-29 12:20:05 -07:00
Andy Wingo
dcf7c03487 add note to docs about gds.el
* doc/ref/scheme-using.texi (GDS Getting Started): Add a note about gds
  el files.
2010-08-25 10:14:47 -04:00
Andy Wingo
96d98db12f update download location in manual
* doc/ref/intro.texi (Obtaining and Installing Guile): Update download
  location.
2010-08-25 09:52:13 -04:00
Andy Wingo
3de9a08715 fix vector-move-right! and vector-move-left!
* libguile/vectors.c (scm_vector_move_left_x, scm_vector_move_right_x):
  Fix some bugs reported by Michael Lucy -- both variants would happily
  write beyond the end, and vector-move-right! didn't increment the
  counter before copying in the reverse direction.

* test-suite/tests/vectors.test ("vector-move-left!"):
  ("vector-move-right!"): Add tests.
2010-08-05 10:54:37 +02:00
Andy Wingo
5c8c9d05ae fix ice-9 debugging error
* ice-9/debugging/ice-9-debugger-extensions.scm: Import ice-9 debugging
  trace, to fix an error on finish. Thanks to Ian Hulin.
2010-08-04 20:57:23 +02:00
Andy Wingo
7e6f4be53e Fix the range of `random' on 64-bit platforms
For > 32 bit integers still in the fixnum range, scm_random() would
return random numbers with a lower range than specified.

* libguile/random.c (scm_i_mask32): New static inline function.
  (scm_c_random): Use `scm_i_mask32'.
  (scm_c_random64): New function, 64-bit variant of scm_c_random.
  (scm_random): Use `scm_c_random64' instead of forming the 64-bit random
  number in a bogus way.
* libguile/random.h: Added `scm_c_random64'.

Conflicts:

	libguile/random.c
	libguile/random.h
2010-08-04 20:13:04 +02:00
Andy Wingo
cfbccaf49c scm_random fix for 64-bit inums
* libguile/random.c (scm_random): Fix for 64-bit inums.
2010-07-27 11:43:22 +02:00
Andy Wingo
3bac8ddf92 though scm_c_random returns a ulong, it's only 32 random bits
* libguile/random.c (scm_c_random): Revert previous patch adapting to
  assume ulong-sized bits, as the RNGs really only give us 32 bits at a
  time.
  (scm_c_random_bignum): Adjust to expect random_bits giving us 32 bits
  at a time.

* libguile/random.h: Add comments.
2010-07-26 14:38:20 +02:00
Andy Wingo
db6e848d19 always having scm_t_uint64
* libguile/gen-scmconfig.c:
* libguile/random.c:
* libguile/srfi-4.c:
* libguile/srfi-4.h:
* libguile/__scm.h:
* libguile/numbers.c:
* libguile/numbers.h:
* test-suite/standalone/test-conversion.c: Since we always require
  scm_t_uint64 and friends, remove some conditional compiles.
2010-07-26 14:38:15 +02:00
Andreas Rottmann
33290f52ef Fix random number generator on 64-bit platforms
* libguile/random.c (scm_c_random): On platforms where `unsigned long' has 64
  bit, generate up to 64 bit of randomness. This is expected by
  scm_c_random_bignum(), and hence was a serious distortion of the random value
  distribution for values exceeding 2^32. This change also fixes a crash when
  the `m' argument is a value above 2^32.
2010-07-19 22:55:16 +02:00
Andy Wingo
0d559b775a update guile.texi copyright years
* doc/ref/guile.texi: Update copyright years.
2010-06-10 22:44:28 +02:00
Andy Wingo
40adef04f4 fix LICENSE
* LICENSE: Ahem, LGPL 2.1 *or later*. Thanks to Christophe Jarry.
2010-06-10 22:40:31 +02:00
Andy Wingo
aac41d2835 fix doc snarfing with fedora 12
* module/scripts/snarf-check-and-output-texi.scm
  (process-multiline-directive): Be more accepting of source location
  markers in the preprocessed source, by adding a couple cases in which
  they can appear. Not foolproof, but it does adapt to what new GCCs are
  putting out (e.g. cpp (GCC) 4.4.2 20091222 (Red Hat 4.4.2-20)).
2010-06-10 14:35:50 +02:00
Andy Wingo
2462fad237 avoid type-punning errors in guile_ieee_init on OSF
* libguile/numbers.c (guile_ieee_init): Avoid type-punning errors on
  OSF. Thanks to Jay Krell for the report.
2010-06-10 14:34:51 +02:00
Andy Wingo
899a17a783 fix build error with Compaq C V6.3-025
* libguile/hashtab.c: Re-arrange functions to avoid the need for
  pre-declaring character arrays with no length. Fixes compilation on
  Compaq C V6.3-025. Thanks to Jay Krell for the report.
2010-06-09 23:21:20 +02:00
Neil Jerram
23ff1cff61 Fix Interix build hang
Jay Krell writes:

"Later on I get to:
gawk -f ./guile-func-name-check /src/guile-1.8.6/libguile/regex-posix.c
(./guile-snarf-docs -DHAVE_CONFIG_H -I.. -I/src/guile-1.8.6 -I.. -g -O2 -Wall -
Wmissing-prototypes -Werror /src/guile-1.8.6/libguile/regex-posix.c | \
./guile_filter_doc_snarfage --filter-snarfage) > regex-posix.doc || { rm
regex-posix.doc; false; }
cat alist.doc arbiters.doc async.doc backtrace.doc boolean.doc chars.doc
continuations.doc debug.doc deprecation.doc deprecated.doc discouraged.doc dynl.doc
dynwind.doc environments.doc eq.doc error.doc eval.doc evalext.doc extensions.doc
feature.doc fluids.doc fports.doc futures.doc gc.doc goops.doc gsubr.doc
gc-mark.doc gc-segment.doc gc-malloc.doc gc-card.doc guardians.doc hash.doc hashtab.doc
hooks.doc i18n.doc init.doc ioext.doc keywords.doc lang.doc list.doc load.doc
macros.doc mallocs.doc modules.doc numbers.doc objects.doc objprop.doc
options.doc pairs.doc ports.doc print.doc procprop.doc procs.doc properties.doc random.doc
rdelim.doc read.doc root.doc rw.doc scmsigs.doc script.doc simpos.doc smob.doc
sort.doc srcprop.doc stackchk.doc stacks.doc stime.doc strings.doc srfi-4.doc
srfi-13.doc srfi-14.doc strorder.doc strports.doc struct.doc symbols.doc
threads.doc throw.doc values.doc variable.doc vectors.doc version.doc vports.doc
weaks.doc ramap.doc unif.doc dynl.doc filesys.doc posix.doc net_db.doc
socket.doc
regex-posix.doc | GUILE="/dev/fs/C/obj/guile/pre-inst-guile" /src/guile-1.8.6/scripts/
snarf-check-and-output-texi > guile-procedures.texi || { rm guile-procedures.texi; false; }
ERROR: In procedure fport_input_waiting:
ERROR: Invalid argument

and it hangs.

[...and then later...]

Here is a very strange but successul fix for the hang. Now guile 1.8.6 builds
all the way through for me."

* libguile/iselect.h: On Interix, restrict SELECT_SET_SIZE to 1024.
2010-03-26 01:05:52 +00:00
Neil Jerram
5be63eea82 Interix build warning fix
/bin/sh ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.. -I/src/g
uile-1.8.6 -I.. -g -O2 -Wall -Wmissing-prototypes -Werror -MT filesys.lo -MD -
MP -MF .deps/filesys.Tpo -c -o filesys.lo /src/guile-1.8.6/libguile/filesys.c
libtool: compile: gcc -DHAVE_CONFIG_H -I.. -I/src/guile-1.8.6 -I.. -g -O2 -Wall
-Wmissing-prototypes -Werror -MT filesys.lo -MD -MP -MF .deps/filesys.Tpo -c /s
rc/guile-1.8.6/libguile/filesys.c -DPIC -o .libs/filesys.o
/src/guile-1.8.6/libguile/filesys.c: In function `scm_readdir':
/src/guile-1.8.6/libguile/filesys.c:918: warning: implicit declaration of
function `readdir_r'

Report and fix provided by Jay Krell.

* libguile/filesys.c: On Interix, define _REENTRANT in order to pick
  up readdir_r prototype.
2010-03-26 00:48:08 +00:00
Ludovic Courtès
a0aa1e5b69 Fix test environment issue with ltdl from Libtool 2.2.6b.
Earlier versions of ltdl would look for extensions under $PWD; this
behavior changed in 2.2.6b.

* test-suite/standalone/Makefile.am (TESTS_ENVIRONMENT): Define
  $builddir.

* test-suite/standalone/test-asmobs: Specify the full path to
  `libtest-asmobs', using $builddir.
2009-12-18 19:01:12 +00:00
Ludovic Courtès
5411e043d0 Work around path name length limitations in `socket.test'.
* test-suite/tests/socket.test (%tmpdir, %curdir): New variables.
  Chdir to %TMPDIR.  Switch back to %CURDIR at the end.
  (temp-file-path): Return a base file name, not an absolute path.
2009-11-26 10:17:05 +01:00
Ludovic Courtès
a0f8a73f28 Update `NEWS'. 2009-10-26 21:39:13 +01:00
Ludovic Courtès
bb9c5bbd2e Add GOOPS `class-of' test for nameless structs.
* test-suite/tests/goops.test ("classes for built-in types")["struct
  vtable"]: New test case.
2009-10-26 19:48:07 +01:00
Ludovic Courtès
f9e8030266 SRFI-35: Provide nice vtable names, to make GOOPS happier.
* module/srfi/srfi-35.scm (%make-condition-type): New procedure.
  (make-condition-type, make-compound-condition-type): Use it.

* test-suite/tests/srfi-35.test ("condition
  types")["struct-vtable-name"]: New test.
2009-10-26 19:06:10 +01:00
Ludovic Courtès
ef171ff039 Fix unbound variable references in `srfi-19.scm'.
* module/srfi/srfi-19.scm: Use `(ice-9 rdelim)'.
  (date->broken-down-time, priv:year-day, priv:char->int): Fix typo.
  (time-*->time-*, time-*->time-*!): Fix reference to unbound variable
  `caller'.
2009-10-26 19:03:26 +01:00
Neil Jerram
84a54b292d Fix doc for inet-ntop: always produces a string
Thanks to Scott McPeak for reporting this.

* libguile/socket.c (scm_inet_ntop): In docstring, add quotes around
  IPv6 address (+ reflow a bit).

* doc/ref/posix.texi (Network Address Conversion): Corresponding
  change.

* doc/maint/guile.texi: Corresponding change.
2009-10-01 23:44:21 +01:00
Neil Jerram
451e15a06c Fix handling of IPv6 addresses
Thanks to Scott McPeak for reporting this and providing a patch.

* libguile/socket.c (scm_to_ipv6): When address is the wrong type,
  provide more information in the exception message.

  (scm_to_sockaddr): scm_to_ipv6 expects just an address, not the
  whole vector.

* test-suite/tests/socket.test ("AF_INET6/SOCK_STREAM"): New set of
  tests.
2009-10-01 23:43:54 +01:00
Neil Jerram
7394551f61 Fix incorrect doc mentions of INADDR_LOCALHOST
Thanks to Scott McPeak for reporting this.

* doc/ref/posix.texi (Network Sockets and Communication): Change
  INADDR_LOCALHOST to INADDR_LOOPBACK.
2009-10-01 22:29:35 +01:00
Andy Wingo
1bfae3ccf7 bugfix: don't dynamic link if we found a registered extension
* libguile/extensions.c (load_extension): Don't do dynamic linking if we
  actually did find an extension in the list.
2009-09-23 21:35:13 +01:00
Neil Jerram
7496b0397a Fix doc of let*-values
Thanks to Judy Hawkins for reporting this.

* doc/ref/api-modules.texi (Included Guile Modules): Change
  `let-values*' to `let*-values'.
2009-08-27 22:31:50 +01:00
Neil Jerram
7457f712ea Update NEWS 2009-08-21 22:31:09 +01:00
Neil Jerram
e4d87bf9fd Avoid clash with system setjmp/longjmp on IA64
Problem was that if an application includes both libguile.h and the
system's setjmp.h, and is compiled on IA64, it gets compile errors
because of jmp_buf, setjmp and longjmp being multiply defined.

* libguile/__scm.h (__ia64__): Define scm_i_jmp_buf, SCM_I_SETJMP and
  SCM_I_LONGJMP instead of jmp_buf, setjmp and longjmp.

  (all other platforms): Map scm_i_jmp_buf, SCM_I_SETJMP and
  SCM_I_LONGJMP to jmp_buf, setjmp and longjmp.

* libguile/continuations.c (scm_make_continuation): Use `SCM_I_SETJMP'
  instead of `setjmp'.
  (copy_stack_and_call): Use `SCM_I_LONJMP' instead of `longjmp'.
  (scm_ia64_longjmp): Use type `scm_i_jmp_buf' instead of `jmp_buf'.

* libguile/continuations.h (scm_t_contregs): Use type `scm_i_jmp_buf'
  instead of `jmp_buf'.

* libguile/threads.c (suspend): Use `SCM_I_SETJMP' instead of
  `setjmp'.

* libguile/threads.h (scm_i_thread): Use type `scm_i_jmp_buf' instead
  of `jmp_buf'.

* libguile/throw.c (JBJMPBUF, make_jmpbuf, jmp_buf_and_retval): Use
  type `scm_i_jmp_buf' instead of `jmp_buf'.
  (scm_c_catch): Use `SCM_I_SETJMP' instead of `setjmp'.
  (scm_ithrow): Use `SCM_I_LONGJMP' instead of `longjmp'.
2009-08-21 22:15:56 +01:00
Ludovic Courtès
40c9875d7c Update `NEWS' for commit d8dd381fa7. 2009-08-17 23:09:16 +02:00
Andy Wingo
d8dd381fa7 fix buffer overrun reading partial numbers: 1.0f, 1.0/, and 1.0+
* libguile/numbers.c (mem2decimal_from_point, mem2ureal, mem2complex):
  Fix a number of cases where, for invalid numbers, we could read past
  the end of the buffer. This happened in e.g. "1.0+", "1/" and "1.0f".
  But I couldn't figure out how to test for these, given that the
  behavior depended on the contents of uninitialized memory in the
  reader buffer. We'll just have to be happy with this.

Thanks to Kjetil S. Matheussen for the report.
2009-08-04 20:32:51 +02:00
Ludovic Courtès
240a7800d0 Bump version number for 1.8.7.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
  (LIBGUILE_INTERFACE_REVISION): Increment.
2009-07-05 22:23:15 +02:00
Ludovic Courtès
015573ca9e Update `NEWS'.
* NEWS: Update.
2009-07-05 22:19:30 +02:00
Ludovic Courtès
85955347ba Enclose `bit-operations.test' in its own module.
* test-suite/tests/bit-operations.test: Use the `define-module' clause.
2009-07-05 21:13:51 +02:00