summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update gnulib to a3a946f670718d0dee5a7425ad5ac0a29fb46ea1wip-gnulib-updateDaniel Llorens2021-04-0854-302/+1075
| | | | This fixes https://lists.gnu.org/archive/html/guile-devel/2021-04/msg00009.html
* Fix typos in examples.Mikael Djurfeldt2021-04-045-6/+6
| | | | Thanks to Eugene Klimov.
* Fix handling of parameter lists to elisp defun to allow nil.Mikael Djurfeldt2021-04-012-2/+5
| | | | Thanks to Vasilij Schneidermann.
* goops: Preserve all slot options in redefinable classes.David Thompson2021-03-192-8/+52
| | | | | | | * module/goops.scm (compute-slots): Fix <redefinable-class> slot transformation. * test-suite/tests/goops.test ("slot options on redefinable classes"): Add a test.
* web: 'tls-wrap' returns an unbuffered custom port.Ludovic Courtès2021-03-191-3/+10
| | | | | | | | This mirrors Guix commit b168acae2a01fd84075cc134a6140594a978fde5. * module/web/client.scm (tls-wrap)[unbuffered]: New procedure. Pass the result of 'make-custom-binary-input/output-port' to 'unbuffered'.
* web: 'tls-wrap' avoids intermediate buffer.Ludovic Courtès2021-03-191-10/+7
| | | | | | | This mirrors Guix commit 279d932b1ca7bfbb8657c41a84616dd0dfc6e0a8. * module/web/client.scm (tls-wrap)[read!]: Read straight into BV instead of calling 'get-bytevector-some' and 'unget-bytevector'.
* Update NEWSAndy Wingo2021-03-181-1/+4
| | | | * NEWS: Updates.
* Fix recent i18n testsAndy Wingo2021-03-161-2/+4
| | | | | * test-suite/tests/i18n.test ("text collation (French)"): Fix to actually pass locale arg.
* Fix buffer overread in string-locale<?Andy Wingo2021-03-152-23/+25
| | | | | | | | | * libguile/i18n.c (compare_strings): In all cases, convert to a null-terminated string. While we're doing that, might as well use utf-8. * test-suite/tests/i18n.test ("text collation (French)"): Add test. Thanks again to Rob Browning for the report.
* Adapt test for string-locale-ci=?Andy Wingo2021-03-151-5/+7
| | | | | * test-suite/tests/i18n.test ("text collation (French)"): Punt on collating if utf8 locale unavailable.
* Fix buffer overread in string-locale-ci=? and related functionsAndy Wingo2021-03-152-12/+18
| | | | | | | | | | | * libguile/i18n.c (u32_locale_casecoll): Take lengths of incoming strings as parameters rather than assuming "nul" termination. (compare_u32_strings_ci): Pass string lengths as computed from the Scheme strings. * test-suite/tests/i18n.test ("text collation (English)"): Add a test case. Thanks a million to Rob Browning for the report.
* Add JIT capability for MinGWMike Gran2021-03-132-14/+52
| | | | | | | | | | * libguile/jit.c [__MING32__]: add windows.h on Win32 (struct code_arena) [__MINGW32__]: a HANDLE for Win32 mmap (BIGENDIAN): rename to JIT_BIGENDIAN, to avoid collision with Win32 BIGENDIAN constant. All users changed (allocate_code_arena) [__MINGW32__]: add Win32 mmap allocator (emit_code) [__MINGW32__]: add Win32 munmap * libguile/lightening/lightening/lightening.c: remove unnecessary mman.h
* On Cygwin, 'lib' DLLs use 'cyg' prefixMike Gran2021-03-133-1/+64
| | | | | | | | | | | | | When using automake and libtool to build DLLs on Cygwin, libtool will rename libXXX to cygXXX. 'load-foreign-library' should emulate libltdl behavior and search for DLLs using that convention. * module/system/foreign-library.scm (lib->cyg): new helper function (load-foreign-library): add rename-on-cygwin? option to rename libraries using Cygwin semantics * test-suite/tests/foreign.test: new test section 'lib->cyg' * doc/ref/api-foreign.text: document new rename-on-cygwin? option for load-foreign-library
* Don't force installation of GMP allocators in guile shellAndy Wingo2021-03-121-1/+0
| | | | | | * libguile/guile.c (main): Don't override initial setting of scm_install_gmp_memory_functions. Thanks to Andrew Whatson for the fix.
* Fix hash-table-merge! bug.Ricardo G. Herdt2021-03-121-1/+1
| | | | * module/srfi/srfi-69.scm : fold over second hash table.
* Fix suspendable implementation of 'get-bytevector-some!'Andrew Whatson2021-03-121-1/+1
| | | | | * module/ice-9/suspendable-ports.scm (get-bytevector-some!): Fix incorrect arguments to bytevector-copy!
* Add tests for get-bytevector-some!Andrew Whatson2021-03-121-0/+20
| | | | | * test-suite/tests/r6rs-ports.test (get-bytevector-n! [short]): add (get-bytevector-n! [long]): add
* Revert "Handle CRLF and Unicode line endings in read-line"Andy Wingo2021-03-126-171/+25
| | | | | | | | This reverts commit 0f983e3db0c43ad7c89f57ea84f792ede373ba0c. After discussing with Mike we are going to punt the read-line changes for now. Open the port in O_TEXT mode if you want to chomp the CR in CFLF sequences.
* Add read-line and ftw changes to NEWSMichael Gran2021-03-111-0/+7
| | | | * NEWS: updated
* Handle CRLF and Unicode line endings in read-lineMike Gran2021-03-115-25/+165
| | | | | | | | | * libguile/rdelim.c (scm_read_line): handle CRLF, LS and PS * module/ice-9/suspendable-ports.scm (read-line): handle CRLF, LS, and PS * module/web/http.scm (read-header-line): take advantage of CRLF in read-line (read-header): don't need to test for \return * test-suite/tests/rdelim.test: new tests for read-line CRLF, LS and PS * doc/ref/api-io.texi: update doc for read-line
* ice-9 ftw: handle non-working inodesMichael Gran2021-03-112-30/+67
| | | | | | | | | * module/ice-9/ftw.scm (visited?-proc): accept filename for string hash (file-system-fold): use string hash if ino = 0 (ftw): use new visited?-proc * test-suite/tests/ftw.test (visited?-proc valid inodes): add filenames to visited?-proc calls (visited?-proc broken inodes): new tests (%top-srcdir): canonicalize-path
* ice-9 ftw: handle missing getuid and getgidMichael Gran2021-03-112-17/+27
| | | | | | | * module/ice-9/ftw.scm (getuid-or-false, getgid-or-false): new macros (stat-dir-readable?-proc): don't overwrite arguments (ftw, nftw): use new macros * test-suite/tests/ftw.test (test-EACCES): don't presume getuid exists
* For MinGW use Windows filepaths in libpath.hMichael Gran2021-03-112-1/+49
| | | | | | * configure.ac (MINGW_LIBPATH): new automake conditional and test * libguile/Makefile.am (libpath.h) [MINGW_LIBPATH]: use Windows-style paths
* on MinGW, prefer winsock2.h over sys/select in iselectMike Gran2021-03-111-0/+4
| | | | * libguile/iselect.h [__MINGW32__]: add winsock2 include
* Build standalone test libraries as unversionedMike Gran2021-03-111-4/+4
| | | | | * test-suite/standalone/Makefile.am (libtest_asmobs_la_LDFLAGS): avoid version (libtest_ffi_la_LDFLAGS, libtest_extensions_la_LDFLAGS): avoid version
* Add windows stubs for dlopen, dlclose, dlsym, dlerrorMike Gran2021-03-113-1/+66
| | | | | | | | | | * libguile/dynl.c [__MING32__] (dlopen, dlsym, dlclose, dlerror): use windows stubs * libguile/posix-w32.c (dlopen_w32, dlsym_w32, dlclose_w32, dlerror_w32): new procedures (dlerror_str): new module-level variable (DLERROR_LEN): new define * libguile/posix-w32.h: declare dlopen_w32, dlsym_w32, dlclose_w32, dlerror_w32. Declare RTLD_NOW, RTLD_LAZY, RTLD_GLOBAL, RTLD_LOCAL
* Add mkstemp; undocument mkstemp!Andy Wingo2021-03-107-64/+93
| | | | | | | | | | | | | | | | * doc/ref/posix.texi (File System): Update to document mkstemp only. * libguile/filesys.c: Make a mkstemp that doesn't modify the input template. Instead the caller has to get the file name from port-filename. (scm_mkstemp): Use the new mkstemp to implement mkstemp!. Can't deprecate yet though as the replacement hasn't been there for long enough. * libguile/posix.c (scm_tempnam): Update to mention mkstemp instead. * module/system/base/compile.scm (call-with-output-file/atomic): Use mkstemp. * test-suite/tests/posix.test: * test-suite/tests/r6rs-files.test: Use mkstemp. * NEWS: Update.
* On Win32, prefer winsock2 header for socket declarationsMike Gran2021-03-101-3/+8
| | | | | | * libguile/posix-w32.h: prefer lowercase windows.h for MinGW cross-builds * libguile/socket.c [HAVE_WINSOCK2_H]: use only winsock2.h for socket declarations
* remove 2nd attempt at invoking ComSpec when spawning childMichael Gran2021-03-101-17/+1
| | | | | | | | | | | | | The start_child procedure is used to spawn a child process. If it fails to launch the given argv[0] as if it were a command, it has logic to retry using the ComSpec as a command interpreter, treating argv[0] as a batch file name. Usually, this fails because batch files would have been handled in the first pass if they were valid. Also, this has the unfortunate side effect of spawning a shell awaiting user input. It is safer to remove this attempt. * libguile/posix-w32.c (start_child): remove fallback processing
* disable popen 'no duplicates' test for MinGWMichael Gran2021-03-101-1/+6
| | | | | | | | This test, which seems quite complicated to fix, causes the MinGW build to hang. Disable it for now, but, come back to it later. * test-suite/tests/popen.test (mingw?): new constant (no duplicate): disable for mingw, for now
* Use lower-case windows.hMichael Gran2021-03-101-1/+1
| | | | | | | On some linux cross-builds, Windows.h is windows.h. On MinGW case is irrelevant. * libguile/posix-w32.h: modified
* Write a proper vector-map and vector-for-each for (rnrs base)Linus2021-03-092-9/+81
| | | | | | * module/rnrs/base.scm (vector-map vector-for-each): Rewrite to not be slow. * NEWS: Update.
* Document syntax-sourcevAndy Wingo2021-03-093-1/+11
| | | | | | | * NEWS: Add doc link. * doc/ref/api-macros.texi (Syntax Transformer Helpers): Document syntax-sourcev. * module/system/syntax.scm: Re-export syntax-sourcev.
* Document quote-syntaxAndy Wingo2021-03-092-2/+25
| | | | | * NEWS: Update. * doc/ref/api-macros.texi (Syntax Case): Update.
* Update NEWSAndy Wingo2021-03-091-0/+7
| | | | * NEWS: More words about mini-gmp.
* Fix define error for mini-gmpMichael Gran2021-03-081-1/+1
| | | | | * libguile/gen-scmconfig.c [!SCM_I_GSC_ENABLE_MINI_GMP]: define SCM_ENABLE_MINI_GMP as zero, not undef
* Update NEWS for --enable-mini-gmpAndy Wingo2021-03-081-0/+45
| | | | * NEWS: Update.
* Only install libgc as GMP allocator with mini-gmpAndy Wingo2021-03-081-5/+19
| | | | | * libguile/numbers.c (scm_install_gmp_memory_functions): Default to 1 only if mini-gmp is enabled.
* Don't expose mini-gmp to usersAndy Wingo2021-03-082-14/+26
| | | | | | | * libguile.h: Don't import anything GMP-related. * libguile/numbers.h: Import GMP here instead. If we are using mini-GMP, only import it when building Guile. (scm_to_mpz, scm_from_mpz): Don't define when mini-gmp is enabled.
* More informative error message if GMP not foundAndy Wingo2021-03-071-1/+1
| | | | * configure.ac: Mention --enable-mini-gmp if GMP not found.
* Fix reading #!!#Andy Wingo2021-03-072-9/+26
| | | | | * module/ice-9/read.scm (%read): Fix reading #!!#. * test-suite/tests/reader.test ("reading"): Add some test cases.
* tweak unknown hash object error in readerMichael Gran2021-03-051-1/+1
| | | | | | | This makes it match the other species of unknown hash object error when reading number with radix. * module/ice-9/read.scm (read-sharp): modified
* print token in error msg for unknown hash objectMichael Gran2021-03-051-1/+1
| | | | * module/ice-9/read.scm (read-number-and-radix): modified
* Handle <eof> in reader's character escape sequencesMichael Gran2021-03-051-0/+6
| | | | | * module/ice-9/read.scm (read-r6rs-hex-escape, read-fixed-hex-escape): modified
* Fix reading "#;", "'", and similar premature-EOF situationsAndy Wingo2021-03-052-25/+25
| | | | | | * module/ice-9/read.scm (%read): Adjust how subexpressions are read to error on EOF. Improve the error message. * test-suite/tests/reader.test ("#;"): Adapt expectation.
* Fix up source properties section in manualAndy Wingo2021-03-051-6/+6
| | | | | * doc/ref/api-debug.texi (Source Properties): Fix wordo, and adapt text.
* Fix reading of #true / #falseAndy Wingo2021-03-051-1/+1
| | | | * module/ice-9/read.scm (%read): Fix bad argument order to unread-char.
* Update reference for GUILE_EXTENSIONS_PATHAndy Wingo2021-03-042-4/+12
| | | | | * NEWS: Update. * doc/ref/guile-invoke.texi (Environment Variables): Add entry.
* Update documentation to incorporate read-syntaxAndy Wingo2021-03-044-42/+96
| | | | | | | * NEWS: Update a bit. * doc/ref/api-debug.texi (Source Properties): Mention read-syntax. * doc/ref/api-evaluation.texi (Annotated Scheme Read): New section. * doc/ref/api-macros.texi (Syntax Case): Update for source vectors.
* Syntax objects print with source locationsAndy Wingo2021-03-041-2/+11
| | | | * module/system/syntax.scm (print-syntax): Print source locations.