summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Enable option to prefer mini-gmp over libgmpuse-minigmpMichael Gran2021-02-0612-25/+4951
| | | | | | | | | | | | | | | * configure.ac: rework gmp library detection. Add new flag. * libguile.h: modify gmp header inclusion * libguile/Makefile.am: add mini-gmp.[ch] files * libguile/bytevectors.c: add mini-gmp headers * libguile/gen-scmconfig.c: new #include variable GUILE_MINI_GMP * libguile/init.c: add mini-gmp header * libguile/mini-gmp.c: new file * libguile/mini-gmp.h: new file * libguile/numbers.c: add fallback for missing mpz_get_d_2exp * libguile/numbers.h: yse mini-gmp header * libguile/random.c: use mini-gmp header * libguile/socket.c: use mini-gmp header
* the mkdtemp tests don't clean up the directories createdMichael Gran2021-02-041-3/+3
| | | | | | | | The tests erroneously try to rmdir the template names, not the names of the directories created. * test-suite/tests/filesys.test ("mkdtemp"): clean up temp directories, and not their templates
* Optimize eof-object?Andy Wingo2021-02-032-3/+11
| | | | | | | * module/language/cps/types.scm (constant-type): Add case for EOF. * module/language/tree-il/primitives.scm (*interesting-primitive-names*): (*effect+exception-free-primitives*): Add case for eof-object?. (eof-object?): Expand to eq? on the-eof-object.
* Replace libltdl with raw dlopen, dlsymAndy Wingo2021-02-0317-883/+906
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: Update. * am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Add system/foreign-library.scm. * configure.ac: Replace ltdl check with -ldl check. * libguile/dynl.c: Rewrite to just expose core dlopen / dlsym / etc to a helper Scheme module. (scm_dynamic_link, scm_dynamic_pointer, scm_dynamic_function) (scm_dynamic_object_p, scm_dynamic_call): Rewrite in terms of (system foreign-library). * libguile/extensions.c (load_extension): Avoid scm_dynamic_call. * module/system/foreign-library.scm: New file. * module/oop/goops.scm (<dynamic-object>): Hackily export <foreign-library> instead of a class here. * doc/ref/api-foreign.texi (Foreign Function Interface): Rewrite to only document the new interfaces. Eventually we will deprecate dynamic-link and friends. * doc/ref/guile.texi (API Reference): Move Foreign Objects after Foreign Function Interface. Seems there should be some closer relationship but this will do for now. * doc/ref/tour.texi (Putting Extensions into Modules): * doc/ref/libguile-parallel.texi (Parallel Installations): Update for rename of Modules and Extensions to Foreign Extensions. * libguile/deprecated.h: * libguile/deprecated.c (scm_dynamic_unlink): Deprecate. * libguile/guile.c: Remove ltdl include. * test-suite/tests/foreign.test: Update tests to use new API, and update error expectations.
* strptime test shouldn't presume that initial whitespace is ignoredMike Gran2021-01-231-3/+3
| | | | | | As far as I can tell, ignoring initial whitespace is not required by POSIX. * test-suite/tests/time.test (strptime tests):
* don't test crypt if not presentMike Gran2021-01-231-1/+5
| | | | * test-suite/tests/posix.test (crypt): throw unsupported if crypt not presetnt
* socket test should not throw unresolved outside of a testMike Gran2021-01-231-2/+4
| | | | * test-suite/tests/00-socket.test: don't throw at top level
* add test for setsockoptMichael Gran2021-01-231-0/+11
| | | | * test-suite/tests/00-socket.test (setsockopt AF_INET): new test
* getsockopt may return garbage for parameters < sizeof(int)Michael Gran2021-01-211-1/+2
| | | | | | Uninitialized variable. * libguile/socket.c (scm_getsockopt): zeroize arguments before use
* socket test should not throw unresolved outside of a testMichael Gran2021-01-211-18/+19
| | | | | * test-suite/tests/00-socket.test: don't throw unresolved outside of a test
* avoid a ports test when fcntl is not providedMichael Gran2021-01-211-1/+1
| | | | | * test-suite/tests/ports.test (non blocking I/O): disable test when fcntl is not provided
* standalone tests require libgnu on DLL-based platformsMichael Gran2021-01-211-13/+13
| | | | | | | | | | | | | | | | * test-suite/standalone/Makefile.am (test_conversion_LDADD): add libgnu (test_scm_to_latin1_string_LDADD): add libgnu (test_scm_values_LDADD): add libgnu (test_scm_c_bind_keyword_arguments): add libgnu (test_srfi_4_LDADD): add libgnu (libtest_extensions_la_LIBADD): add libgnu (test_with_guile_module_LDADD): add libgnu (test_scm_with_guile_LDADD): add libgnu (test_scm_spawn_thread_LDADD): add libgnu (test_pthread_create_LDADD): add libgnu (test_pthread_create_secondary_LDADD): add libgnu (test_smob_mark_LDADD): add libgnu (test_smob_mark_race_LDADD): add libgnu
* skip version test if git-version-gen can't compute version from gitMichael Gran2021-01-211-11/+13
| | | | | | This might occur due to a shallow git clone. * test-suite/tests/version.test: throw unsupported if version is unknown
* in null threads, don't define sigmask stub when pthread_sigmask does not existMichael Gran2021-01-212-4/+12
| | | | | | | * libguile/gen-scmconfig.c (main) [HAVE_PTHREAD_SIGMASK]: new output define SCM_HAVE_PTHREAD_SIGMASK * libguile/null-threads.h (scm_i_pthread_sigmask) [SCM_HAVE_PTHREAD_SIGMASK]: make inline function conditional on existence of pthread_sigmask
* Need Guile and Windows types for the declarations posix-w32Michael Gran2021-01-211-1/+8
| | | | * libguile/posix-w32.h: include scm.h and windows.h
* missing includes for list.hMichael Gran2021-01-212-2/+4
| | | | | * libguile/loader.c: include list.h * libguile/stime.c: include list.h
* test-foreign-object-c should link libgnuMichael Gran2021-01-211-2/+2
| | | | | | For MinGW, the foreign object test requires stubs provided by libgnu * test-suite/standalone/Makefile.am (test_foreign_object_c_LDADD): add libgnu
* for dynamic-link tests, mingw needs to link to msvcrtMichael Gran2021-01-212-0/+5
| | | | | * test-suite/standalone/test-ffi: link msvcrt for mingw * test-suite/standalone/test-foreign-object-scm: link msvcrt for mingw
* in command line encoding test don't presume extant UTF-8 localeMichael Gran2021-01-211-1/+4
| | | | | * test-suite/standalone/test-command-line-encoding: abort if locale is not UTF-8
* skip compile test when pause not availableMichael Gran2021-01-211-2/+2
| | | | | * test-suite/standalone/test-guild-compile: abort if pause does not exist
* for socket test, don't presume TMP is usableMichael Gran2021-01-211-2/+2
| | | | | * test-suite/tests/00-socket.test: don't abort when unable to change into tmpdir
* encoding test tries to delete a file that is not closedMichael Gran2021-01-211-6/+9
| | | | | | | On Windows, deleting a file on an open port does not succeed * test-suite/tests/ports.test ("%default-port-encoding, wrong encoding"): ensure port is closed before deleting
* Use mkdtemp to simplify repl server testMichael Gran2021-01-211-18/+6
| | | | | * test-suite/tests/00-repl-server.test (make-tempdir): removed (call-with-repl-server): use mkdtemp instead of make-tempdir
* Replace mutating mkdtemp! with non-mutating mkdtempMichael Gran2021-01-214-45/+34
| | | | | | | | | | | * doc/ref/posix.texi: replace mkdtemp! and scm_mkdtemp_x documentation with documentation for mkdtemp and scm_mkdtemp * libguile/filesys.c (scm_mkdtemp_x): procedure mkdtemp! removed (scm_mkdtemp): new procedure mkdtemp * libguile/filesys.h: Remove declaration for scm_mkdtemp_x. New declaration scm_mkdtemp. * test-suite/tests/filesys.test: Remove mkdtemp! tests. Add tests for mkdtemp.
* Replace stftime gnulib module with nstrftimeAndy Wingo2021-01-213-4/+3
| | | | * lib/Makefile.am: Update to replace deprecated strftime module.
* Update environ_locale_charset gnulib patchAndy Wingo2021-01-207-352/+416
| | | | | | | | | | | * gnulib-local/lib/localcharset.c.diff: Update to apply to current gnulib. Lots of code duplication now, but oh well. * lib/localcharset.c (environ_locale_charset): Update. * lib/iconv_open-solaris.h: * lib/iconv_open-osf.h: * lib/iconv_open-irix.h: * lib/iconv_open-hpux.h: * lib/iconv_open-aix.h: Regenerate with gperf 3.1.
* Update Gnulib to v0.1-4379-g2ef5a9b4bAndy Wingo2021-01-20483-9960/+26594
| | | | Also bump required autoconf version to 2.64, as required by Gnulib.
* Fix incorrect docstring of mkdtemp!Michael Gran2021-01-191-3/+3
| | | | * libguile/filesys.c (scm_mkdtemp_x): fix docstring
* New procedure mkdtemp! to create unique temporary directoryMichael Gran2021-01-195-13/+112
| | | | | | | | | | * configure.ac (AC_CHECK_FUNCS): add mkdtemp! test * doc/ref/posix.texi: document mkdtemp! * libguile/filesys.c (scm_mkdtemp_x): new function * libguile/filesys.h: new declaration for scm_mkdtemp_x * test-suite/tests/filesys.test: add tests for mkdtemp! Adapted from a patch by Rob Browning.
* Move declaration for scm_mkstemp to filesys.hMichael Gran2021-01-182-3/+3
| | | | | | | | The underlying function was moved to filesys.c in 073167ef7b803067bcc8be19925fac1a48577bd8 but the declaration didn't follow * libguile/filesys.h: add declaration for scm_mkstemp * libguile/posix.h: remove declaration for scm_mkstemp
* Fix "display" typo in make-thread and begin-thread docsRob Browning2021-01-171-2/+2
| | | | | * doc/ref/api-scheduling.texi (make-thread, begin-thread): fix "display" typo.
* scm_i_make_transcoded_port: fix mode for input/output portsRob Browning2021-01-172-2/+28
| | | | | | | | | * libguile/r6rs-ports.c (scm_i_make_transcoded_ports): make sure to include SCM_RDNG for input/output ports. Thanks to Göran Weinholt for reporting the problem. Closes: 41045
* (scheme base) member: return #f, not (), for no matchRob Browning2021-01-173-4/+7
| | | | | | | | | * module/scheme/base.scm (member): Match the r7rs requirement, as assoc already does. Thanks to Erik Dominikus for reporting the problem. Closes: 43304
* Replace a line which was accidentally removed.Asher Gordon2021-01-172-0/+2
| | | | | | | | | | | | The line, part of the sentence above it in a comment, was accidentally removed in commit b8d757732fae7c396d58327185f94e5d90846445 "Rationalize include order in C files". * libguile/guile.c: restore missing line. [rlb@defaultvalue.org: augment commit message; add THANKS] Closes: 42331
* doc: Fix composition describing scm_reverse_list_to_stringRob Browning2021-01-172-1/+2
| | | | | | | | * libguile/srfi-13.c (scm_reverse_list_to_string): Replace string->list with list->string in the composition explaning how it works. Thanks to Andrey Ivanov for reporting the problem. Closes: 34457
* Document new interfacesAndy Wingo2021-01-122-0/+34
| | | | | * NEWS: Update. * doc/ref/api-io.texi (Bytevector Ports): Add docs.
* Document call-with-portAndy Wingo2021-01-122-7/+8
| | | | | * doc/ref/api-io.texi (Ports): Add docs. * doc/ref/r6rs.texi (rnrs io ports): Remove docs.
* Finish call-with-port cleanupAndy Wingo2021-01-122-11/+1
| | | | | | * module/rnrs/io/ports.scm (call-with-port): Remove local definition. * module/system/repl/server.scm (system): Call-with-port is imported via (ice-9 ports).
* Add call-with-input-bytevector, call-with-output-bytevectorAndy Wingo2021-01-123-85/+47
| | | | | | | | | | | * module/ice-9/binary-ports.scm (call-with-input-bytevector): (call-with-output-bytevector): New functions. * module/ice-9/iconv.scm: Remove superfluous copies of call-with-output-string* and call-with-output-bytevector*, now that the former closes the port and the latter exists. (call-with-encoded-output-string): Adapt. * module/web/uri.scm: Use (ice-9 iconv) instead of local bytevector/string conversion procedures.
* Close accumulating output ports after useAndy Wingo2021-01-122-30/+25
| | | | | | | | * module/ice-9/ports.scm (call-with-port): New procedure, from r7rs. (call-with-input-file, call-with-output-file): Refactor to use call-with-port. (call-with-output-string): Close the string after normal exit. * module/scheme/base.scm (scheme): Re-export call-with-port from base.
* Bump copyright years for user-visible copyright messagesv3.0.5Andy Wingo2021-01-073-5/+5
| | | | | | * module/ice-9/command-line.scm (version-etc): * module/scripts/compile.scm (show-version): * module/system/repl/common.scm (*version*): Bump to 2021.
* Bump version to 3.0.5Andy Wingo2021-01-071-6/+7
| | | | * GUILE-VERSION (GUILE_MICRO_VERSION): Bump.
* Update NEWSAndy Wingo2021-01-071-1/+40
| | | | * NEWS: Update.
* Merge remote-tracking branch 'lightening/main'Andy Wingo2021-01-072-0/+28
|\
| * Merge branch 'fix-shortening' into 'master'Andy Wingo2021-01-072-0/+28
| |\ | | | | | | | | | | | | Fix jmp-shortening on x86 when target within instruction. See merge request wingo/lightening!12
| | * Fix jmp-shortening on x64 when target within instruction.Andy Wingo2021-01-072-0/+28
| |/ | | | | | | | | | | | | | | | | | | | | * lightening/x86.c (jit_try_shorten): If the address is within the last instruction, don't shorten. If the intstruction is a jump, we could elide it entirely in some cases, but we don't know if the user captured the PC before calling jit_patch_here. Better to leave this to the user. Thanks to Helmut Eller for the bug report and test case in https://gitlab.com/wingo/lightening/-/issues/17.
* | New warnings: -Wuse-before-definition, -Wnon-idempotent-definitionAndy Wingo2021-01-075-175/+422
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * module/ice-9/boot-9.scm (%auto-compilation-options): Add use-before-definition and non-idempotent-definition. * module/language/tree-il/analyze.scm (<use-before-def-info>): New analysis info. (make-use-before-definition-analysis): New function. (goops-toplevel-definition): Move down. (unbound-variable-analysis, macro-use-before-definition): Remove, as they are subsumed by use-before-def. There are some deprecated bindings though. (make-analyzer): Rework to allow for use-before-def analysis to handle multiple * module/system/base/message.scm (%warning-types): Add handlers for the new warning types. * test-suite/tests/tree-il.test: Add tests. * doc/ref/api-evaluation.texi (Compilation): Update.
* | Fix source location bug for neoteric exprs introduced by refactoringAndy Wingo2020-09-101-1/+1
| | | | | | | | | | * libguile/read.c (scm_read_expression): Ungetc after capturing the column.
* | Move copy-tree to (ice-9 copy-tree); deprecate main bindingAndy Wingo2020-09-1020-290/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/ref/api-data.texi (List Constructors): * doc/ref/api-utility.texi (Copying): Update docs to mention module. * libguile.h: Remove trees.h inclusion. * libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): (DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Remove trees.c, trees.h, and related files. * libguile/init.c (scm_i_init_guile): Remove trees.h and the scm_init_trees call. * libguile/trees.c: * libguile/trees.h: Remove. * module/Makefile.am (SOURCES): Add ice-9/copy-tree.scm. * module/ice-9/copy-tree.scm: New file. * module/ice-9/deprecated.scm (copy-tree*): Export as copy-tree, proxying to (ice-9 copy-tree). * module/system/repl/common.scm: * module/web/client.scm: * test-suite/tests/elisp.test: * test-suite/tests/srfi-1.test: * module/oop/goops/save.scm: Use (ice-9 copy-tree). * test-suite/Makefile.am (SCM_TESTS): Add copy-tree.test. * test-suite/tests/copy-tree.test: New file; test pulled from eval.test. * libguile/deprecated.h: * libguile/deprecated.c (scm_copy_tree): Deprecate.
* | Update NEWSAndy Wingo2020-09-052-1/+21
| | | | | | | | | | * NEWS: Update. * doc/ref/api-evaluation.texi (Scheme Read): Remove copy option.