summaryrefslogtreecommitdiffstats
path: root/configure
Commit message (Collapse)AuthorAgeFilesLines
* Version 280.txr-280Kaz Kylheku2022-08-091-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date.
* Version 279.txr-279Kaz Kylheku2022-08-081-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated.
* Version 278.Kaz Kylheku2022-07-011-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * protsym.c: Regenerated.
* configure: remove unused android_targetKaz Kylheku2022-06-211-2/+0
| | | | * configure (android_target): Remove unused variable.
* Version 277.txr-277Kaz Kylheku2022-05-311-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated.
* First cut at new feature: gzip streams.Kaz Kylheku2022-05-261-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile (OBJS): Conditionally include new gzio.o object file. * configure: Detect external zlib, setting up new have_zlib variable in config.make, HAVE_ZLIB in config.h, and also -lz in conf_ldlibs. * gzio.[ch]: New files, implementing the stream abstraction over the gzip file I/O routines in zlib. * stream.h (struct stdio_mode): New gzip flag and gzlevel bitfield to hold a value 0 to 9. (stdio_mode_init_blank, stdio_mode_init_r, stdio_mode_init_rpb): Update intializers to cover new bitfield members. * stream.c: Include <zlib.h> and "gzio.h" if HAVE_ZLIB. (do_parse_mode): Recognize new mode modifier letter "z", setting the gzip flag in the mode structure. If it's followed by a digit, set the gziplevel to that value. (format_mode): Don't output "b" letter for binary mode if gzip is set, because gzopen interprets "b" differently. Don't put out "t" if gzip is set. If gzip mode is specified, do put out the level. If gzip is set, and gziplevel is nonzero then encode the level: gzopen will understand it. (open_file): If gzip mode is requested, then open the file using gzopen mode, a new function in gzio.c. The return a gzio stream based on the returned gzip file handle. However, if we are reading, and the gzip stream indicates that it's not decompressing anything, then we close it and open the file using an ordinary stream. (stream_init): Call gzio_init if HAVE_ZLIB is true. This is done here because the module is integrated with stream.c, and also so that lib.c doesn't have to know about HAVE_ZLIB and <zlib.h>.
* configure: don't exit on no mmap.Kaz Kylheku2022-05-261-2/+0
| | | | | | * configure: do not treat the failure to detect mmap as a fatal condition. This was just debugging commands accidentally left behind.
* Version 276.txr-276Kaz Kylheku2022-05-241-1/+1
| | | | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* Version 275.txr-275Kaz Kylheku2022-05-101-1/+1
| | | | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* configure: bugfix in shell escaping codeKaz Kylheku2022-03-181-1/+1
| | | | | | | | | | | * configure: in the case when the argument contains single quotes, we try to identify the subcase that cannot use double quotes instead. That subcase is not correctly identified: it occurs when there are double quotes, dollar signs **or backslashes**. For instance the data '\ cannot be put into double quotes as "'\" on account of the backslash, which is an active character in double quotes. We also simplify the pattern by using a character class.
* configure: missing tab in shell escaping code.Kaz Kylheku2022-03-181-1/+1
| | | | | | * configure: a certain ' ' (four spaces between single quotes is actually supposed to be a tab; it must have been expanded by the editor.
* ffi: support intmax-t and uintmax-t types.Kaz Kylheku2022-03-151-0/+19
| | | | | | | | | | | | | * configure: detect intmax_t and place HAVE_INTMAX_T into config.h. * ffi.c (ffi_init_extra_types): register intmax-t and uintmax-t types. If HAVE_INTMAX_T is missing, then make them aliases for longlong and ulonglong. * txr.1: Documented. * stdlib/doc-syms.tl: Updated.
* Version 274.txr-274Kaz Kylheku2022-02-241-1/+1
| | | | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* configure: typos in help.Kaz Kylheku2022-02-141-1/+1
| | | | * configure: fix "Flas" and "librariews" typos.
* tests: don't run tets/012/stack.tl if built with ubsan.Kaz Kylheku2022-02-141-0/+4
| | | | | | | | | * configure (have_ubsan): New variable. This is set to y in the ubsan test, if detected. (gen_config_make): Add have_ubsan variable to config.make. * Makefile (TESTS_OK): If have_ubsan is true, filter out the ../012/stack.ok target that calls for that test case.
* configure: detect ubsan compilation.Kaz Kylheku2022-02-141-0/+21
| | | | | | | | * configure: detect that the compiler is generating undefined behavior sanitizer code, a feature supported in GCC and Clang. The tell-tale sign of this is that "ubsan" occurs in the executable. If so, we deposit #define HAVE_UBSAN 1 into config.h.
* Copyright year bump 2022.Kaz Kylheku2022-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *LICENSE, LICENSE-CYG, METALICENSE, Makefile, alloca.h, args.c, args.h, arith.c, arith.h, buf.c, buf.h, cadr.c, cadr.h, chksum.c, chksum.h, chksums/crc32.c, chksums/crc32.h, combi.c, combi.h, configure, debug.c, debug.h, eval.c, eval.h, ffi.c, ffi.h, filter.c, filter.h, ftw.c, ftw.h, gc.c, gc.h, glob.c, glob.h, hash.c, hash.h, itypes.c, itypes.h, jmp.S, lex.yy.c.shipped, lib.c, lib.h, linenoise/linenoise.c, linenoise/linenoise.h, lisplib.c, lisplib.h, match.c, match.h, parser.c, parser.h, parser.l, parser.y, protsym.c, psquare.h, rand.c, rand.h, regex.c, regex.h, signal.c, signal.h, socket.c, socket.h, stdlib/arith-each.tl, stdlib/asm.tl, stdlib/awk.tl, stdlib/build.tl, stdlib/cadr.tl, stdlib/compiler.tl, stdlib/constfun.tl, stdlib/conv.tl, stdlib/copy-file.tl, stdlib/debugger.tl, stdlib/defset.tl, stdlib/doloop.tl, stdlib/each-prod.tl, stdlib/error.tl, stdlib/except.tl, stdlib/ffi.tl, stdlib/getopts.tl, stdlib/getput.tl, stdlib/hash.tl, stdlib/ifa.tl, stdlib/keyparams.tl, stdlib/match.tl, stdlib/op.tl, stdlib/optimize.tl, stdlib/package.tl, stdlib/param.tl, stdlib/path-test.tl, stdlib/pic.tl, stdlib/place.tl, stdlib/pmac.tl, stdlib/quips.tl, stdlib/save-exe.tl, stdlib/socket.tl, stdlib/stream-wrap.tl, stdlib/struct.tl, stdlib/tagbody.tl, stdlib/termios.tl, stdlib/trace.tl, stdlib/txr-case.tl, stdlib/type.tl, stdlib/vm-param.tl, stdlib/with-resources.tl, stdlib/with-stream.tl, stdlib/yield.tl, stream.c, stream.h, struct.c, struct.h, strudel.c, strudel.h, sysif.c, sysif.h, syslog.c, syslog.h, termios.c, termios.h, time.c, time.h, tree.c, tree.h, txr.1, txr.c, txr.h, unwind.c, unwind.h, utf8.c, utf8.h, vm.c, vm.h, vmop.h, win/cleansvg.txr, y.tab.c.shipped: Copyright year bumped to 2022.
* configure: more nuanced time_t treatment.Kaz Kylheku2022-01-041-1/+47
| | | | | | | | | | | | | | | | | | | | I'm taking the position that on systems where time_t is 32 bits by default, but can be switched to 64 with some option that we positively detect, configure will refuse to run unless the user explicitly chooses what to do using either --big-time or --no-big-time. We neither want to ignore this situation (because Y2038 is a problem, and we don't want to contribute to it) nor do we want to force 64 bit time_t, which could be problematic in distributions where other applications and components are not being configured that way for whatever reason (like it being a system with a projected life span that is not expected to go past Y2038). * configure (big_time, big_time_given): New variables. (help): Document big-time. New logic in the test to validate the detected situation versus whether or not the big-time variable has been specified, and which way. Error out in several cases.
* rlimit: var init problem due to large file offset.Kaz Kylheku2022-01-021-0/+1
| | | | | | | | | | | | | | | | Now that we fixed the regression in detecting whether to use -D_FILE_OFFSET_BITS=64, this has unmasked an issue in newer code. In sysif.c, the RLIM_INFINITY, and related constants, are being passed to num_fast: but they are 64 bit unsigned constants under the large file offset, which don't fit into a cnum or unum on a 32 bit system. * configure: When we detect large file offset, we deposit the tell-tale configuration constant CONFIG_LARGE_FILE_OFFSET into config.h. * sysif.c (sysif_init): Under CONFIG_LARGE_FILE_OFFSET, treat the RLIM_ constants using bignum_dbl_uipt.
* configure: support 64 bit time_t on glibc.Kaz Kylheku2021-12-301-11/+36
| | | | | | | | | | | | | | | | | There is a new feature in glibc: -D_TIME_BITS=64 makes time_t 64 bits wide, as part of a solution to Y2038. Let's detect this together with _FILE_OFFSET_BITS in the same test. I've not tested this because I need a system with a bleeding edge glibc that supports _TIME_BITS. * configure (time_bits_define): New variable. Test which searches some known command line options for 64 bit off_t expanded to also check for 64 bit time_t. This complicates the loop only slightly; it is much better than copy and pasting the code
* configure: broken file offset bits detection.Kaz Kylheku2021-12-301-1/+1
| | | | | | | | | | | | | We are not detecting the need to do -D_FILE_OFFSET_BITS=64 correct, resulting in no large file support on 32 bit platforms based on Glibc. This is a regression since TXR 244. * configure: We must pass EXTRA_FLAGS=-D$try to actually try the options we are looping over. This argument was accidentally removed in commit 3d80caccafc27ac812bbf8226eba6d8e529c63ff on October 9, 2020, when the conftest_symns command was changed to conftest_o.
* configure: file offset test: don't change config.hKaz Kylheku2021-12-301-2/+0
| | | | | | | | * configure: The file offset test has no reason to be writing anything into config.h. The SIZEOF_OFF_T symbol isn't used anywhere, and SIZEOF_BYTE already exists in the header. Because this command is in a loop, it ends up writing multiple definitions of SIZEOF_BYTE, and SIZEOF_OFF_T into config.h.
* configure: detect warning opts missing in older compilers.Kaz Kylheku2021-12-301-2/+16
| | | | | | | | | | | | * configure (diag_flags): Remove -Wvla and -Werror=declaration-after-statement. (diag_flags_given): New variable. New test: if diag_flags_given indicates that diag_flags were not specified by the user, then we try to add additional flags, subject to them being available, which we test by compiling the hello-world program with those flags. We rely on the hello-world program being left over by the previous compiler sanity check.
* Eliminate declaration-after-statement everywhere.Kaz Kylheku2021-12-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of -ansi doesn't by itself diagnose instances of some constructs we don't want in the project, like mixed declarations and statements. * configure (diag_flags): Add -Werror=declaration-after-statement. This is C only, so filter it out for C++. Also add -Werror=vla. * HACKING: Update inaccurate statements about what dialect we are using. TXR isn't pure C90: some GCC extensions are used. We even use long long if the configure script detects it as working, and some C99 library features. * buf.c (replace_buf, buf_list): Fix by reordering. * eval.c (op_dohash, op_load_time_lit): Fix by reordering. * ffi.c (ffi_simple_release): Fix by reordering. (align_sw_get): Fix empty macro to expand to dummy declaration so a semicolon after it isn't interpreted as a statement. On platforms with alignment, remove a semicolon from the macro so that it requires one. (ffi_i8_put, ffi_u8_put): Fix by reordering. * gc.c (gc_init): Fix with extra braces. * hash.c (hash_init): Fix by reordering. * lib.c (list_collect_revappend, sub_iter, replace_str, replace_vec, mapcar_listout, mappend, mapdo, window_map_list, subst): Fix by reordering. (gensym, find, rfind, pos, rpos, in, search_common): Fix by renaming optional argument and using declaration instead of assignment. * linenoise/linenoise.c (edit_in_editor): Fix by reordering. * parser.c (is_balanced_line): Fix by reordering. * regex.c (nfa_count_one, print_rec): Fix by reordering. * signal.c (sig_mask): Fix by reordering. * stream.c (get_string): Fix by renaming optional argument and using declaration instead of assignment. * struct.c (lookup_static_slot_desc): Fix by turning mutated variable into block local. (umethod_args_fun): Fix by reordering. (get_special_slot): Fix by new scope via braces. * sysif.c (usleep_wrap): Fix by new scope via braces. (setrlimit_wrap): Fix by new scope via braces. * time.c (time_string_meth, time_parse_meth): Fix by reordering. * tree.c (tr_do_delete_spec): Fix by new scope via braces. * unwind.h (uw_block_beg): New macro which doesn't define RESULTVAR but expects it to refers to an existing one. (uw_block_begin): Replace do while (0) with enum trick so that we have a declaration that requires a semicolon, rather than a statement, allowing declarations to follow. (uw_match_env_begin): Now opens a scope and features the same enum trick as in uw_block_begin. This fixes a declaration-follows-statement issue in the v_output function in match.c. (uw_match_env_end): Closes scope opened by uw_match_env_begin. * unwind.c (revive_cont): Fix by introducing variable, and using new uw_block_beg macro. * vm.c (vm_execute_closure): Fix using combination of local variable and reordering.
* Version 273.txr-273Kaz Kylheku2021-12-281-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated.
* Version 272.txr-272Kaz Kylheku2021-11-111-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated.
* Version 271.txr-271Kaz Kylheku2021-10-051-1/+1
| | | | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* Version 270.txr-270Kaz Kylheku2021-08-301-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date.
* Version 269.txr-269Kaz Kylheku2021-08-281-1/+1
| | | | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* mmap: Solaris 10 build fix.Kaz Kylheku2021-08-251-0/+20
| | | | | | | | | | | | | | Solaris 10's <sys/mman.h> header doesn't declare madvise if _POSIX_C_SOURCE > 2 is defined or _XPTG4_2, even though __EXTENSIONS__ is defined. This is a bug in the header. * configure (solaris_target): New variable. We set this to y in several places where the script discovers that -D__EXTENSIONS__ is required to get something to work, which is a Solaris 10 telltale sign. Then just before the mmap test, if solaris_target is true, we deposit a blurb into config.h that declares madvise. This way, the ffi.c code, or any other committed C code doesn't have to carry any Solaris hack.
* ffi: provide mmap through carray.Kaz Kylheku2021-08-221-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure: configure test for mmap depositing HAVE_MMAP into config.h. * ffi.c (struct carray): Subject to HAVE_MMAP, new mm_len member which keeps track of the size of an underlying mapping so that we can unmap it, as well as peform operations like msync on it. (make_carray): Initialize mm_len to 0. (MAP_GROWSDOWN, MAP_LOCKED, MAP_NORESERVE, MAP_POPULATE, MAP_NONBLOCK, MAP_STACK, MAP_HUGETLB, MAP_SHARED, MAP_PRIVATE, MAP_FIXED, MAP_ANON, MAP_HUGE_SHIFT, MAP_HUGE_MASK, PROT_READ, PROT_WRITE, PROT_EXEC, PROT_NONE, PROT_GROWSDOWN, PROT_GROWSUP, MADV_NORMAL, MADV_RANDOM, MADV_SEQUENTIAL, MADV_WILLNEED, MADV_DONTNEED, MADV_FREE, MADV_REMOVE, MADV_DONTFORK, MADV_DOFORK, MADV_MERGEABLE, MADV_UNMERGEABLE, MADV_HUGEPAGE, MADV_NOHUGEPAGE, MADV_DONTDUMP, MADV_DODUMP, MADV_WIPEONFORK, MADV_KEEPONFORK, MADV_HWPOISON, MS_ASYNC, MS_SYNC, MS_INVALIDATE): #define as 0 if missing. (carray_munmap_op): New static function. (carray_mmap_ops): New static structure. (mmap_wrap, munmap_wrap): New functions. (mmap_op): New static function. (mprotect_wrap, madvise_wrap, msync_wrap): New functions. (ffi_init): Register mmap, munmap, mprotect, madvise and msync as well as numerous integer variables: map-growsdown, map-locked, map-noreserve, map-populate, map-nonblock, map-stack, map-hugetlb, map-shared, map-private, map-fixed, map-anon, map-huge-shift, map-huge-mask, prot-read, prot-write, prot-exec, prot-none, prot-growsdown, prot-growsup, madv-normal, madv-random, madv-sequential, madv-willneed, madv-dontneed, madv-free, madv-remove, madv-dontfork, madv-dofork, madv-mergeable, madv-unmergeable, madv-hugepage, madv-nohugepage, madv-dontdump, madv-dodump, madv-wipeonfork, madv-keeponfork, madv-hwpoison, ms-async, ms-sync, ms-invalidate, page-size. * ffi.h (mmap_wrap, munmap_wrap, mprotect_wrap madvise_wrap, msync_wrap): Declared. * tests/017/mmap.tl: New file. * txr.1: Documented. * stdlib/doc-syms.tl: Updated.
* configure: implement full-repl option.Kaz Kylheku2021-08-201-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch unbundles the building of the full-featured REPL from HAVE_TERMIOS. We make it subject to its own configuration option CONFIG_FULL_REPL, which is 1 by default. This way, the downstream users or package maintainers can build TXR without the full-featured REPL even if HAVE_TERMIOS is 1, and the other termios material is built-in. * configure (full_repl): New variable. (help): Include full-repl in the help text. In the termios test, if we don't detect termios, then negate the full_repl variable. In the final config variable generation section, generate the CONFIG_FULL_REPL 1 define in config.h, if full_repl is true, ensuring it is subject to HAVE_TERMIOS, too. * linenoise/linenoise.c: Replace HAVE_TERMIOS with CONFIG_FULL_REPL. * linenoise/linenoise.h: Likewise. * parser.c: Likewise. * txr.c: Likewise and ... (if_termios): Macro renamed to if_full_repl. (if_full_repl): New macro. (opt_noninteractive): Use if_full_repl macro for initializing. (banner): Use if_ful_repl macro instead of if_termios.
* doc: improve.Paul A. Patience2021-08-141-1/+1
| | | | | | | | | | | | * RELNOTES: Fix various minor issues and stylistic issues. * configure: Remove repeated word and add missing word. * txr.1: Fix various minor, not-so-minor and stylistic issues. In particular, struct-from-args was misspelled in the .mets line and open-subprocess was missing from the .coNP line. * stdlib/doc-syms.tl: Updated.
* configure: superfluous printf argument.Kaz Kylheku2021-08-131-4/+4
| | | | | | | * configure: In the test for an alignming malloc, fix a copy-and-paste error. The $try_header expansion is passed to printf, but there is nothing in the format string. FreeBSD printf diagnoses this and dies.
* Version 268.txr-268Kaz Kylheku2021-08-071-1/+1
| | | | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* musl: fix missing <sys/time.h>.Kaz Kylheku2021-08-041-0/+2
| | | | | | | | | | | | | | | | Issue peported by Ethan Hawk. Our socket.c module is using struct timeval without including <sys/time.h>, which breaks on musl. * configure: in the select test, let's include <sys/time.h>, and if the test passes, let's set have_sys_time, so that HAVE_SELECT implies HAVE_SYS_TIME. This way code wrapped with HAVE_SELECT doesn't separately have to test for HAVE_SYS_TIME. * socket.c: If HAVE_SYS_TIME is true, then we include <sys/time.h>, independently of HAVE_SELECT. (sock_timeout, sock_load_init): Like the select-based code, code using SO_SNDTIMEO or SO_RCVTIMO also uses timeval, so needs to be wrapped with HAVE_SYS_TIME.
* Version 267.txr-267Kaz Kylheku2021-07-261-1/+1
| | | | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* configure: tone down language.Kaz Kylheku2021-07-131-1/+1
|
* Version 266.txr-266Kaz Kylheku2021-07-041-1/+1
| | | | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* configure: adjust comment in config.make.Kaz Kylheku2021-07-111-1/+2
| | | | | | * configure (gen_config_make): Maintenance in comment above top_srcdir. It obviously does not hold an absolute path in the case when it is blank.
* New: build-id feature.Kaz Kylheku2021-07-111-0/+30
| | | | | | | | | | | | | | | | | | | | | | A build-id is a string optionally embedded into TXR at build time which can be displayed with a command line option. It can help developers who are juggling multiple builds in their workspace to identify what they are running. * Makefile (txr.o, txr-win.o): If a build_id has been defined, then define the TXR_BUILD_ID macro on the command line when compiling these object files. * configure (build_id): New variable. (help) Describe build_id. (gen_config_make): Generate build_id and build_id_exp make variables. * txr.1: Documented --build-id option. * tsr.c (build_id): Conditionally defined global variable. (help): Brief help string for --build-id. (txr_main): Process --build-id option.
* Version 265.txr-265Kaz Kylheku2021-07-041-1/+1
| | | | | | | | | | | | | | * RELNOTES: Updated. * configure (txr_ver): Bumped version. * stdlib/ver.tl (lib-version): Bumped. * txr.1: Bumped version and date. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* build: fix broken building in separate directory.Kaz Kylheku2021-06-251-1/+1
| | | | | | | * configure: create a link farm for stdlib, not share, which no longer exists. I missed this because this is an occurrence of "share" not followed by /txr of \txr. Reported by Paul. A. Patience
* Version 264txr-264Kaz Kylheku2021-06-251-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* New: stack overflow protection.Kaz Kylheku2021-06-231-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure: detect getrlimit, producing HAVE_RLIMIT in config.h. * eval.c (do_eval, do_expand): Call gc_stack_check inline function to check stack pointer against limit. * gc.c (gc_stack_bottom): Static becomes extern, so inline function in gc.h can refer to it. (gc_stack_limit): New global variable. (gc_init): If we have rlimit, then probe RLIMIT_STACK. If the stack is sufficiently large, then enable the stack overflow protection, which kicks in when the stack pointer appears to be within a certain percentage of the limit. (set_stack_limit, get_stack_limit): New static functions. (gc_late_init): Register set-stack-limit and get-stack-limit intrinsics. (gc_stack_overflow): New function. * gc.h (gc_stack_bottom, gc_stack_limit, gc_stack_overflow): Declared. (gc_stack_check): New inline function. * lib.c (stack_overflow_s): New symbol variable. (obj_print_impl): Call gc_stack_check to protect recursive printing againts overflow. * lib.h (stack_overflow_s): Declared. * unwind.c (uw_init): Register stack-overflow symbol as a an exception symbol subtyped from error. (uw_unwind_to_exit_point): When dealing with an unhandled exception, turn off the stack limit, so we can print the messages without triggering it in a loop. * vm.c (vm_execute_closure, vm_funcall_common): Insert gc_stack_check to the top of the execution of every VM function. * txr.1: Documented. * share/txr/stdlib/doc-syms.tl: Updated.
* Version 263txr-263Kaz Kylheku2021-06-171-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.
* android: fix compiler noise about __ANDROID_API__Kaz Kylheku2021-06-171-1/+1
| | | | | | | | * configure: Termux's gcc now defines __ANDROID_API__ which clashes with our definition. We cannot remove our definition because Termux's uses a uselessly low, conservative value. Thus, add a -U to undefine it before our -D redefinition.
* Version 262txr-262Kaz Kylheku2021-06-111-1/+1
| | | | | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise. * y.tab.c.shipped: Regenerated. Good catch! forgot to do this for most recent change to parser.y.
* solaris: unbundle mkstemp and mkdtemp.Kaz Kylheku2021-06-021-2/+21
| | | | | | | | | | | | | * configure: Solaris 10 doesn't have mkdtemp, so we detect it separately from mkstemp, which Solaris 10 does have, producing HAVE_MKSTEMP and MAKE_MKDTEMP config.h symbols. * stream.c (mkdtemp_wrap): Separately surround with #if HAVE_MKDTEMP. (mkstemp_wrap): Reduce scope of #if HAVE_MKSTEMP only around this function. Bugfix here: in the #else case of #if HAVE_MKSTEMPS, we are calling the mkstemps function instead of mkstemp.
* Version 261txr-261Kaz Kylheku2021-06-011-1/+1
| | | | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated. * protsym.c: Likewise.