1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-09 21:40:33 +02:00
Commit graph

10886 commits

Author SHA1 Message Date
Thien-Thi Nguyen
dad6ec0846 [build int] Use AC_MSG_ERROR.
* configure.ac (ALLOCA): ...here, instead of ‘AC_ERROR’.
2021-02-28 15:44:44 -05:00
Thien-Thi Nguyen
618620c4c8 Delete trailing whitespace in configure.ac; nfc. 2021-02-28 15:42:58 -05:00
David Kastrup
6c76a42de1 Let reverse! accept arbitrary types as second argument (new_tail)
Backport from ‘master’.  See
<https://debbugs.gnu.org/cgi/bugreport.cgi?bug=13835>.

* libguile/list.c (scm_reverse_x): remove typecheck for 2nd arg.

Signed-off-by: Mark H Weaver <mhw@netris.org>
2020-12-13 23:39:59 -05:00
Knut Petersen
4613c52c3b Fix building with makeinfo 6.7
* doc/goops/goops-tutorial.texi (Copyright):
Replace 0xA9 with "(C)" (two instances).
* doc/ref/api-compound.texi (Vector Accessing from C):
Replace 0xA0 with 0x20.
2020-12-12 04:38:13 -05:00
Thien-Thi Nguyen
9f3004bc26 [maint] Update years in copyright notice; nfc 2017-03-03 10:20:48 +01:00
Thien-Thi Nguyen
4c6f43a635 [doc] Clean up .texi for modern GNU Texinfo
These changes are the minimal needed to get "make" to
complete w/o error or warnings using GNU Texinfo 6.3.

* doc/goops/goops.texi <title page>: Condense @author lines.
  (Running GOOPS, Methods, User-defined types)
  (Asking for the type of an object):
  Promote these nodes from subsection to section.
* doc/r5rs/r5rs.texi <title page>: Remove spurious @author;
  change @unnumbered to @heading.
  (Entry format): Comment out spurious @center;
  remove spurious @item.
  (Characters): Likewise.
  (Lexical structure): Rework @format blocks w/ embedded
  @t and @cindex, as a series of abutting @example blocks
  that close and reopen around the @cindex; and sans @t.
  (Additional material): Comment out spurious @center lines.
* doc/tutorial/guile-tut.texi (Hello World):
  Promote from @subsection to @section.
  (A bunch of operations in Scheme): Likewise;
  change @print to take no args.
  (Using recursion to process lists, Processing matrices):
  Promote from @subsection to @section.
  (Using Guile to program in Scheme): Change @print to take no args.
2017-03-03 10:17:03 +01:00
Thien-Thi Nguyen
de2d678982 [build doc] Accomodate whitespace-injecting makeinfo
* libguile/Makefile.am (guile-procedures.txt) [HAVE_MAKEINFO]:
  After doing makeinfo, use sed to remove whitespace
  betweeen the formfeed and the symbol, in the target file.
2017-03-03 06:51:23 +01:00
Thien-Thi Nguyen
ec27e23318 Improve ‘(ice-9 documentation) file-commentary’ default scrub proc
Long-standing oversight.  The Commentary lines almost always
include at least one space following the bol semicolons.

* ice-9/documentation.scm (file-commentary): In the default
  scrub proc, append "zero or one space char" to the ‘dirt’ regexp.
2017-03-03 06:49:12 +01:00
Thien-Thi Nguyen
3ca22333b7 [libguile] Fix bug: Don't expect ‘send’ string to be writable
Expecting writable strings fails if the string is the result
of ‘symbol->string’, for example.

* libguile/socket.c (scm_send): Use ‘scm_i_string_chars’.
2017-03-03 06:44:58 +01:00
Thien-Thi Nguyen
181e92ba73 [build int] Add more 'AC_LANG_PROGRAM' calls
* configure.ac (guile_cv_need_braces_on_pthread_once_init)
  (guile_cv_need_braces_on_pthread_mutex_initializer): Add
  ‘AC_LANG_PROGRAM’ call to first arg of ‘AC_COMPILE_IFELSE’.
2017-03-03 06:42:00 +01:00
Thien-Thi Nguyen
d6aae483df [build int] Remove EOF "Local Variables" block; nfc
These days, Emacs' Autoconf mode has proper support for
‘dnl’ in ‘comment-start’, ‘comment-end’, ‘comment-start-skip’;
we no longer need to specify these explicitly.

* configure.ac: Remove EOF "Local Variables" block.
2017-03-03 06:39:22 +01:00
Thien-Thi Nguyen
956494e4f7 [build int] Dose configure.ac w/ "proper" m4-quoting
* configure.ac: Add m4-quoting everywhere it was missing.
2017-03-03 06:33:50 +01:00
Thien-Thi Nguyen
3f61b3ffa4 [build int] Add abstraction: CONFIG_SCRIPT
* configure.ac (CONFIG_SCRIPT): New AC_DEFUN.  Use it instead of
  AC_CONFIG_FILES for: check-guile benchmark-guile, guile-tools,
  pre-inst-guile, pre-inst-guile-env, libguile/guile-snarf,
  libguile/guile-doc-snarf, libguile/guile-func-name-check,
  libguile/guile-snarf-docs, test-suite/standalone/test-use-srfi,
  test-suite/standalone/test-fast-slot-ref.
2017-03-03 06:22:14 +01:00
Thien-Thi Nguyen
7c59f65f81 Rename configure.in to configure.ac, twice
* configure.ac: Rename from configure.in.
* GUILE-VERSION: Update comments; nfc.
* HACKING: Likewise.

* guile-readline/configure.ac: Rename from guile-readline/configure.in.
* guile-readline/LIBGUILEREADLINE-VERSION: Update comments; nfc.

* libguile/__scm.h: Likewise.
* libguile/gen-scmconfig.c: Likewise.
* libguile/gen-scmconfig.h.in: Likewise.
2017-03-03 05:59:49 +01:00
Cyprien Nicolas
579b604173 Fix configure.in macro for automake-1.13
Reported through https://bugs.gentoo.org/show_bug.cgi?id=467064
Fix by Arfrever Frehtes Taifersar Arahesis

* Replace AM_CONFIG_HEADER by AC_CONFIG_HEADERS, the former
  being deprecated since automake-1.13

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2013-05-31 00:06:12 +02:00
Ludovic Courtès
2e14ce0e43 build: Use Automake 1.12+ and `serial-tests'.
* configure.in: Require Automake 1.12+.  Use `serial-tests'.
2013-05-31 00:01:37 +02:00
Cyprien Nicolas
0832660a65 Fix texinfo files for makeinfo-5.1
* doc/ref/api-options.texi: Move "Debugger options" in the menu.
* doc/ref/api-utility.texi (Handling Scheme-level hooks from C code):
  Turn into a @subsubheading.
* doc/ref/fdl.texi (ADDENDUM: How to use this License for your
  documents): Turn into @appendixsec.
* doc/ref/gh.texi: Don't use @dots{} in the middle of @deftypefun{,x}.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2013-05-31 00:00:47 +02:00
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