summaryrefslogtreecommitdiffstats
path: root/configure
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* New: mkdtemp and mkstemp functions.Kaz Kylheku2021-05-311-0/+21
| | | | | | | | | | | | | | | | * configure: check for mkstemp and mkdtemp. * stream.c (stdio_set_prop): Implement setting the :name property. We need this in mkstemp_wrap in order to punch in the temporary name, so that the application can retrieve it. (mkdtemp_wrap, mkstemp_wrap): New functions. (stream_init): Register mkdtemp and mkstemp intrinsics. * stream.h (mkdtemp_wrap, mkstemp_wrap): Declared. * txr.1: Documented. * share/txr/stdlib/doc-syms.tl: Updated.
* Version 260txr-260Kaz Kylheku2021-05-261-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* Version 259txr-259Kaz Kylheku2021-05-131-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* configure: reconfigure: add "$@" to configure line.Kaz Kylheku2021-05-051-2/+2
| | | | | | * configure: Allow the conveninence of additional parameters to be passed through reconfigure, to tweak the previous configuration.
* configure: bug: in-place reconfigure clobber.Kaz Kylheku2021-05-051-0/+1
| | | | | | * configure: before generating reconfigure, remove it. Otherwise, if are executing the reconfigure script, errors can appear in it if its length is extended.
* Version 258txr-258Kaz Kylheku2021-05-011-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* configure: use -ansi, not -std=c90.Kaz Kylheku2021-05-011-1/+1
| | | | | * configure: In maintainer mode, we specify C90. Some versions of clang don't like -std=c90, but only the -ansi option.
* Version 257txr-257Kaz Kylheku2021-04-231-1/+1
| | | | | | | | | | | | | | | | | Log message correction superseding original commit 65213f5f7f6a204886a02c32f259ae2617d1dfb6. * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated. * protsymc.: Likewise * share/txr/stdlib/doc-syms.tl: Likewise.
* configure: clang banner moving target.Kaz Kylheku2021-04-221-1/+1
| | | | | | * configure: nopie test must check for "clang" in two places in the version banner. Some vendors stick their name in front of "clang".
* configure: remove LIT_ALIGN.Kaz Kylheku2021-04-201-37/+0
| | | | | | | | | | | | | LIT_ALIGN was introduced before there was SIZEOF_WCHAR_T. The latter was introduced on suspicion that they might not be the same. Since LIT_ALIGN is tied to SIZEOF_WCHAR_T again there is no need for it to exist. * configure (lit_align): Variable removed. Documentation of lit-align argument removed. Alignment of wide literals test removed. Not generating LIT_ALIGN in config.h any more. * lib.h (LIT_ALIGN): Occurrences replaced with SIZEOF_WCHAR_T.
* Revert bogus LIT_ALIGN commit from 2015.Kaz Kylheku2021-04-201-5/+1
| | | | | | | | | | | | | | | | This reverts commit 0343c6f32c5bd8335e88595cb9d23506625b2586. I don't see evidence that the claim in the commit is true: that wide literals are not four-byte-aligned on Darwin in spite of sizeof(wchar_t) being 4. Not even with the old clang in my old VM where I first thought I discovered this. * configure: do not set up LIT_ALIGN == 2 for Darwin. * lib.h (litptr): Remove LIT_ALIGN < 4 && SIZEOF_WCHAR_T == 4 case. * HACKING: Undocument bogus claim.
* configure: better way to avoid -no-pie.Kaz Kylheku2021-04-201-12/+21
| | | | | | | | | | * configure (gcc_version, broken128): Formally declare existing ad hoc variables. (do_nopie): New variable. Compiler version test moved up. We use the gcc version to disable nopie, and check for clang to do the same. Instead of checking for darwin and android to skip the nopie stuff, we check do_nopie.
* configure: use $makeKaz Kylheku2021-04-201-4/+4
| | | | | | * configure: in a few tests, we are calling make as "make" rather than via the $make variable. This fails when "make" isn't GNU Make.
* Version 256txr-256Kaz Kylheku2021-04-071-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* Version 255txr-255Kaz Kylheku2021-03-261-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* M1: disable -nopie.Kaz Kylheku2021-03-241-4/+2
| | | | | * configure: Don't try to use -nopie in Darwin environments. With newer clang on the M1, it generates nuisance warnings.
* build: port to Apple M1.Kaz Kylheku2021-03-231-1/+1
| | | | | | | | | | * configure (lit_align): Also don't calculate lit_align as 2 on Darwin/arm64; that is a hack needed on 32 bit x86 Mac OS. * jmp.S: Define DEFUN for Arm64 on Darwin. We have to use %% as the statement separator; semicolons are comments. Use the same __aarch64__ code for __arm64__. We just need some Apple specific tidbits before and after.
* Version 254txr-254Kaz Kylheku2021-03-101-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* Version 253txr-253Kaz Kylheku2021-03-061-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Bumped. * txr.vim, tl.vim: Regenerated.
* configure: remove yacc_is_newer_bison.Kaz Kylheku2021-03-011-3/+0
| | | | | | | * configure (yacc_is_newer_bison): Configuration variable removed. (gen_config_make): Generation of yacc_is_newer_bison make variable removed.
* build: cautiously allow parallel builds.Kaz Kylheku2021-03-011-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over two years ago, I disabled parallel building with a .NOTPARALLEL: directive in the Makefile, due to some rules that depended on order of updates of their prerequisites. Today the situation is better. It looks like there are just a few rules that have to be fixed, all in the area of executing tests. Let us not enable that by default, though, to protect downstream users from themselves. Some operating system distribution builds optimistically run make -j N on all the packages, and then have to deal with sporadic breakages when some of those packages have parallel build bugs. We can prevent TXR from ever being implicated in such a breakage by turning off parallel building even if make -j requests it. There will now be a ./configure --parallelmake option to allow parallel builds, off by default. The --maintainer configuration mode will flip that default; configuring in maintainer mode will enable parallel builds, unless explicitly disabled with --no-parallelmake. * Makefile (.NOTPARALLEL): Conditionally assert, if parallelmake is false. (tst/tests/014/dgram-stream.ok, tst/tests/014/socket-basic.ok): Enforce order between these two tests. They clash in their use of network ports so cannot run at the same time. (test.clean): test.clean must finish executing before tests; enforce order. * configure (parallelmake, parallelmake_given): New variables. (help text): Add parallelmake option to help. (gen_config_make): Generate the parallelmake make variable into config.make. New script section, defaulting parallelmake to y in maintainer mode.
* Version 252txr-252Kaz Kylheku2021-02-281-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.
* configure: reconfigure: spaces in argumentsKaz Kylheku2021-02-211-0/+3
| | | | | | | * configure (cmdline): We are missing the simple case when the argument contains spaces or tabs, and no quotes or special characters. This causes a badly formatted command line in reconfigure in common situations like --opt-flags="-O3 -W".
* Version 251txr-251Kaz Kylheku2021-02-081-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Re-synced to 251. * txr.vim, tl.vim: Regenerated.
* Version 250txr-250Kaz Kylheku2021-01-311-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* Version 249txr-249Kaz Kylheku2021-01-191-1/+1
| | | | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise. * txr.vim, tl.vim: Regenerated.
* Version 248txr-248Kaz Kylheku2021-01-201-1/+1
| | | | | | | | * RELNOTES: Updated. * configure, txr.1: Bumped version and date. * share/txr/stdlib/ver.tl: Likewise.