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

16114 commits

Author SHA1 Message Date
Andy Wingo
45037e7527 split linker out of elf module
* module/Makefile.am:
* module/system/vm/linker.scm: New file, split out of (system vm elf).
  (make-string-table, string-table-intern): Export under their bare
  names, instead of make-elf-string-table and elf-string-table-intern.

* module/system/vm/elf.scm: Remove linking capabilities.
  (string-table-ref): Export.

* module/language/objcode/elf.scm (bytecode->elf): Adapt to use (system
  vm linker).

* test-suite/tests/linker.test: New test.
2013-05-23 09:42:04 +02:00
Aleix Conchillo Flaque
6fe2803b45 web: uri-encode hexadecimal percent-encoding is now uppercase
* module/web/uri.scm (uri-encode): the hexadecimal percent-encoding %HH
  is now uppercased as suggested by RFC3986:

      "For consistency, URI producers and normalizers should use
       uppercase hexadecimal digits for all percent-encodings."

* test-suite/tests/web-uri.test ("encode"): update tests.
2013-05-02 17:13:55 -04:00
Mark H Weaver
e006d87ba5 Manual: fix 'my-or' examples to use let-bound variable.
Fixes <http://bugs.gnu.org/14203> reported by Nikita Karetnikov.

* doc/ref/api-macros.texi (Defining Macros, Syntax Rules): Fix
  definition of 'my-or' example macro to use the let-bound variable.
2013-04-14 13:38:28 -04:00
Ludovic Courtès
72d4abda1d tests: Use shell constructs that /bin/sh on Solaris 10 can understand.
Partly fixes <http://bugs.gnu.org/14042>.
Reported by Marc Girod <marc.girod@gmail.com>

* test-suite/standalone/test-language: Use a shell construct that
  /bin/sh on Solaris 10 can understand.
2013-04-14 15:46:56 +02:00
Mark H Weaver
f6f4feb0a2 Merge remote-tracking branch 'origin/stable-2.0'
Conflicts:
	GUILE-VERSION
	libguile/array-map.c
	libguile/fports.h
	libguile/gc.h
	libguile/inline.h
	libguile/ports.c
	libguile/ports.h
	libguile/print.c
	libguile/r6rs-ports.c
	libguile/read.c
	test-suite/tests/00-socket.test
2013-04-14 02:48:33 -04:00
Mark H Weaver
f5b2eea6a3 Using 'pass-if-equal' in coding.test.
* test-suite/tests/coding.test ("block comments", "line comments"):
  Use 'pass-if-equal'.
2013-04-14 02:29:25 -04:00
Mark H Weaver
3f315b6433 Adjust BOM tests to reflect the fact that big endian is used by default.
* test-suite/tests/ports.test ("BOM not discarded unless at start of
  UTF-16 stream", "BOM not discarded unless at start of UTF-32 stream"):
  Adjust tests to reflect the fact that, in the absence of a BOM, big
  endian will be used by default for the "UTF-16" and "UTF-32"
  encodings.
2013-04-14 01:50:47 -04:00
Mark H Weaver
f480a98e9a Add 2012 and 2013 to copyright notice on numbers.test.
* test-suite/tests/numbers.test: Add 2012 and 2013 to copyright notice.
  It was modified both of those years.
2013-04-10 20:07:22 -04:00
Mark H Weaver
dac5e6491b Do not add $(EXEEXT) to guild or guile-tools.
* meta/Makefile.am (install-exec-hook): Do not add $(EXEEXT) to guild or
  guile-tools.
2013-04-10 09:02:47 -04:00
Ludovic Courtès
7f74dcb4a5 Mention `open-file' in NEWS. 2013-04-10 07:52:36 +02:00
Ludovic Courtès
800c094382 doc: Require libunistring 0.9.3 in `README'.
* README: Require libunistring 0.9.3.  The <unitypes.h> header in 0.9.1
  lacks the _UC_ATTRIBUTE_CONST definition, leading to build failures.
2013-04-10 07:52:25 +02:00
Ludovic Courtès
039300a1eb build: Tell gen-scmconfig' whether the system has struct timespec'.
* configure.ac: Reinstate `struct timespec' check removed in commit
  7e7c6f6a93, but define
  `HAVE_SYSTEM_STRUCT_TIMESPEC' instead of `HAVE_STRUCT_TIMESPEC'.
* libguile/gen-scmconfig.c (main): Change `HAVE_STRUCT_TIMESPEC' to
  `HAVE_SYSTEM_STRUCT_TIMESPEC'.
2013-04-10 01:39:02 +02:00
Ludovic Courtès
cfeb9130bb Bump version number for 2.0.9.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
2013-04-10 01:10:04 +02:00
Ludovic Courtès
3e78acd978 doc: Update `release.org'.
* doc/release.org: Recommend "distcheck".  Add `makeinfo' to the
  bootstrap tool list.
2013-04-10 01:09:28 +02:00
Ludovic Courtès
fff92ff309 stime: Remove #ifdef HAVE_*_H for headers provided by Gnulib.
* libguile/stime.c: Remove #ifdef HAVE_SYS_TIMES_H, HAVE_SYS_TYPES_H,
  and HAVE_STRING_H since those headers are always provided by Gnulib
  when the corresponding macro is undefined.  Fixes a regression on
  MinGW introduced by commit 40e2a31.
2013-04-10 00:13:54 +02:00
Ludovic Courtès
486a456d4d Make `build-aux/gendocs.sh' executable. 2013-04-10 00:10:23 +02:00
Ludovic Courtès
47ad34fad6 Bump version number for 2.0.8.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
  (LIBGUILE_INTERFACE_CURRENT): Increment, to account for new C
  functions `scm_c_bind_keyword_arguments' et al.
  (LIBGUILE_INTERFACE_AGE): Increment.
2013-04-09 22:51:48 +02:00
Ludovic Courtès
9a5b6f6eda tests: Skip FFI tests involving scm_is_pair' when dynamic-func' fails.
* test-suite/tests/foreign.test ("make-pointer")["equal? modulo
  finalizer", "equal? modulo finalizer (set-pointer-finalizer!)"]: Wrap
  `dynamic-func' in `false-if-exception' (static builds on NetBSD 5.1
  raise "Symbol not found" here.)
2013-04-09 22:47:53 +02:00
Ludovic Courtès
11f80955e8 doc: Cosmetic change for `release.org'.
* doc/release.org: Add #+STARTUP.
2013-04-09 22:47:53 +02:00
Ludovic Courtès
4e7d48a04b Update `THANKS'. 2013-04-09 22:47:52 +02:00
Andy Wingo
14f2e47068 update NEWS
* NEWS: Updates.
2013-04-09 22:45:35 +02:00
Andy Wingo
40e2a31d87 fix stime patch for HAVE_TIMES removal
* libguile/stime.c (scm_init_stime): Fix previous patch.  At this point
  in the source, we definitely have a run-time function, but don't
  necessarily have a real-time function.
2013-04-09 22:12:28 +02:00
Andy Wingo
32cec09d13 simplify configure checks for functionality provided by gnulib
* configure.ac: Remove checks for pipe, stftime, times, and select, as
  our Gnulib modules already ensure they are provided.

* libguile/stime.c: Rely on gnulib providing `times'.
2013-04-09 21:58:30 +02:00
Mark H Weaver
e67cea4214 Minor 'THANKS' fix. 2013-04-09 15:24:18 -04:00
Mark H Weaver
b1b1cbcb78 Fix alignment in 'THANKS'. 2013-04-09 15:23:20 -04:00
Mark H Weaver
82352e01ff Update bug report section of 'THANKS'. 2013-04-09 15:21:12 -04:00
Mark H Weaver
f841b26d84 Update 'THANKS'. 2013-04-09 14:07:14 -04:00
Mark H Weaver
51607806ec Manual: Don't promise to signal an error for an illegal 'letrec'.
Reported by Nikita Karetnikov <nikita@karetnikov.org>.

* doc/ref/api-binding.texi (Local Bindings): Remove the incorrect claim
  that improperly accessing a letrec-bound variable during evaluation of
  its initializers will necessarily cause an error to be signalled.
2013-04-09 13:59:25 -04:00
Ludovic Courtès
3c8f2ae958 tests: Skip IPv6 socket tests when OS support is missing.
Reported by Samuel Thibault <samuel.thibault@gnu.org>
and Peter Simons <simons@cryp.to>.

* test-suite/tests/00-socket.test ("AF_INET6/SOCK_STREAM"): Throw
  `unresolved' when `bind' throws EADDRNOTAVAIL.
2013-04-09 08:52:31 +02:00
Mark H Weaver
22c76fd822 Update 'NEWS'. 2013-04-08 10:15:12 -04:00
Mark H Weaver
7ca88a403f Update 'NEWS'. 2013-04-08 08:58:00 -04:00
Mark H Weaver
7520a9b95d Consume a peeked EOF at the REPL.
* module/system/repl/repl.scm (meta-reader): Consume peeked EOF.
2013-04-08 08:44:02 -04:00
Mark H Weaver
7f3be1db99 Miscellaneous 'sendfile' fixes and improved tests.
* libguile/filesys.c (scm_sendfile): In Linux-style sendfile(2) code, if
  EINTR or EAGAIN occurs, set result to 1 (not 0) so that we actually
  keep going.  In non-sendfile(2) code, deal gracefully with short reads
  due to EOF.

* test-suite/tests/filesys.test ("sendfile"): Use 'let*' to guarantee
  the needed order of operations: write (test-file) and then read it.
  Add code to check the written data (not just the returned length) in
  all tests, including the cases that hit EOF prematurely.
2013-04-08 00:36:00 -04:00
Mark H Weaver
eed0d26cc0 Update 'NEWS'. 2013-04-07 17:48:58 -04:00
Ludovic Courtès
e0886e0780 Change `sendfile' to loop until everything has been sent.
* libguile/filesys.c (scm_sendfile)[HAVE_SYS_SENDFILE_H &&
  HAVE_SENDFILE]: Compare RESULT with C_COUNT.  Loop until C_COUNT bytes
  have been sent.
* doc/ref/posix.texi (File System): Update the description.  Explain the
  new semantics.
* test-suite/tests/filesys.test ("sendfile"): Rewrite using
  `pass-if-equal'.  Check the return value for all the tests.
  ["file with offset past the end", "file with offset near the end"]:
  New tests.
2013-04-07 23:47:38 +02:00
Mark H Weaver
254d313a21 Remove outdated and misplaced "Included Guile Modules" node from manual.
* doc/ref/api-modules.texi (Included Guile Modules): Remove.
  (Using Guile Modules): Fix cross reference.
2013-04-07 15:45:38 -04:00
Mark H Weaver
7099eec4fb Clarify 'file-encoding' docs: heuristics may be improved later.
* doc/ref/api-evaluation.texi (Character Encoding of Source Files):
  Mention UTF-8 as another common encoding used for Scheme source files,
  and that it is used by default.  Change the description to leave open
  the possibility of adding additional heuristics in the future.
  Mention that if the coding declaration is in a #!-style block comment,
  it must be the first such comment in the file.  Mention the
  '#:guess-encoding' keyword argument.
2013-04-07 15:37:27 -04:00
Mark H Weaver
3ace9a8e4e Add keyword arguments to file opening procedures.
* libguile/fports.c (scm_open_file_with_encoding): New API function,
  containing the code previously found in 'scm_open_file', but modified
  to accept the new 'guess_encoding' and 'encoding' arguments.

  (scm_open_file): Now just a simple wrapper that calls
  'scm_open_file_with_encoding'.

  (scm_i_open_file): New implementation of 'open-file' that accepts
  keyword arguments '#:guess-encoding' and '#:encoding', and calls
  'scm_open_file_with_encoding'.

  (scm_init_fports_keywords): New initialization function that gets
  called after keywords are initialized.

* libguile/fports.h (scm_open_file_with_encoding,
  scm_init_fports_keywords): Add prototypes.

* libguile/init.c (scm_i_init_guile): Call 'scm_init_fports_keywords'.

* module/ice-9/boot-9.scm: Add enhanced versions of 'open-input-file',
  'open-output-file', 'call-with-input-file', 'call-with-output-file',
  'with-input-from-file', 'with-output-to-file', and
  'with-error-to-file', that accept keyword arguments '#:binary',
  '#:encoding', and (for input port constructors) '#:guess-encoding'.

* doc/ref/api-io.texi (File Ports): Update documentation.

* test-suite/tests/ports.test ("keyword arguments for file openers"):
  Add tests.
2013-04-07 15:37:23 -04:00
Chris K. Jester-Young
b6e374e535 Add record type printer for srfi-41.
* module/srfi/srfi-41.scm: Add record type printer for streams.
  (stream-promise-visit): New helper for visiting stream promises.
2013-04-07 12:44:31 -04:00
Chris K. Jester-Young
3ed8d953f8 Add record type printer for srfi-45.
* module/srfi/srfi-45.scm: Add record type printer for promises.
  (promise-visit): New helper for visiting lazy promises.
2013-04-07 12:43:17 -04:00
Mark H Weaver
7f6c3f8f00 Implement efficient 'scm_unget_bytes' and 'unget-bytevector'.
* libguile/ports.c (scm_i_unget_bytes): New static function.
  (scm_unget_bytes): New API function.
  (scm_unget_byte): Rewrite to simply call 'scm_i_unget_bytes'.
  (scm_ungetc, scm_peek_char, looking_at_bytes): Use 'scm_i_unget_bytes'.

* libguile/ports.h: Add prototype for 'scm_unget_bytes'.

* libguile/fports.c (scm_setvbuf): Use 'scm_unget_bytes'.

* libguile/r6rs-ports.c (scm_unget_bytevector): New procedure.

* module/ice-9/binary-ports.scm (unget-bytevector): New export.

* doc/ref/api-io.texi (R6RS Binary Input): Add documentation.
  (R6RS I/O Ports): Update brief description of (ice-9 binary-ports) to
  reflect the new reality: it is no longer a subset of (rnrs io ports).

* test-suite/tests/ports.test ("unget-bytevector"): Add test.
2013-04-07 10:14:44 -04:00
Mark H Weaver
e1966d0e21 Remove byte-order mark check from 'scm_i_scan_for_encoding'.
* libguile/read.c (scm_i_scan_for_encoding): Remove byte-order mark
  check.
2013-04-07 10:11:41 -04:00
Mark H Weaver
9a334eb3ab Do not scan for coding declarations in open-file.
* libguile/fports.c (scm_open_file): Do not scan for coding
  declarations.  Replace 'use_encoding' local variable with
  'binary'.  Update documentation string.

* module/ice-9/psyntax.scm (include): Add the same file-encoding
  logic that's used in compile-file and scm_primitive_load.

* module/ice-9/psyntax-pp.scm: Regenerate.

* doc/ref/api-io.texi (File Ports): Update docs.

* test-suite/tests/ports.test: Change "open-file HONORS file coding
  declarations" test to "open-file IGNORES file coding declaration".

* test-suite/tests/coding.test (scan-coding): Use 'file-encoding' to
  scan for the encoding, since 'open-input-file' no longer does so.
2013-04-07 10:11:41 -04:00
Ludovic Courtès
bc3901092d doc: Link exceptions and escape continuations.
* doc/ref/api-control.texi (Prompt Primitives): Mention exceptions.
  (Exception Terminology): Link to `call/ec'.
2013-04-07 11:51:58 +02:00
Ludovic Courtès
7d39b48875 doc: Warn against misuses of `file-name-separator-string'.
* doc/ref/posix.texi (File System): Warn against misuses of
  `file-name-separator-string'.
2013-04-07 11:51:58 +02:00
Daniel Llorens
48ffc52cc9 Don't use scm_generalized_vector_get_handle() in array-map.c
* libguile/array-map.c: (rafill, racp, ramap, rafe): use
  scm_array_get_handle() instead of scm_generalized_get_vector_handle().

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2013-04-07 11:51:58 +02:00
Mark H Weaver
a71e79c3e5 Fix the recommendations for conversion of C string constants.
* doc/ref/api-data.texi (Conversion to/from C, Symbol Primitives,
  Keyword Procedures): Fix the recommendations for conversion of C
  string constants.  The encoding of the source code is irrelevant in
  modern compilers.  What is relevant is the execution character set.
  Both GCC and clang use UTF-8 by default, so recommend the
  'scm_from_utf8_*' functions when the argument is a C string constant.

  Also fix the broken texinfo markup for 'scm_from_*_symbol' that
  prevented them from being listed in the index.
2013-04-06 18:37:29 -04:00
Mark H Weaver
3e5a164ac3 Fix indentation in test-scm-c-bind-keyword-arguments.c.
* test-suite/standalone/test-scm-c-bind-keyword-arguments.c
  (test_invalid_keyword): Fix indentation.
2013-04-06 18:13:04 -04:00
Mark H Weaver
a16d4e82e9 Implement 'scm_c_bind_keyword_arguments'.
* libguile/keywords.c (scm_keyword_argument_error): New variable.
  (scm_c_bind_keyword_arguments): New API function.

* libguile/keywords.h (enum scm_keyword_arguments_flags): New enum.
  (scm_t_keyword_arguments_flags): New typedef.
  (scm_c_bind_keyword_arguments): New prototype.

* doc/ref/api-data.texi (Coding With Keywords, Keyword Procedures): Add
  documentation.

* test-suite/standalone/test-scm-c-bind-keyword-arguments.c: New file.

* test-suite/standalone/Makefile.am: Add
  test-scm-c-bind-keyword-arguments test.
2013-04-06 18:09:45 -04:00
Andy Wingo
c608e1aafa NEWS tweaks
* NEWS: Correct some errors.
2013-04-06 22:51:52 +02:00