| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
* protsym.c: Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* configure: detect strsignal, producing HAVE_STRSIGNAL symbol
in config.h.
* sysif.c (strsignal_wrap): New function.
(sysif_init): Register strsignal intrinsic.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure (have_strerror_r): New variable.
Detect whether we have strerror_r and which flavor:
GNU or POSIX. Define HAVE_STRERROR_GNU or HAVE_STRERROR_POSIX
in config.h.
* sysif.c (strerror_wrap): New function.
(sysif_init): Register strerror intrinsic.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: provide LONGLONG_TYPE and INTPTR_TYPE macros in
config.h that expand to a string literal capturing the
original tokens of the type that was probed.
* stream.c (struct fmt): Removed size member, replaced with
type string. We can match format strings to the textual type,
which will work even if we cannot compile that type. So that
is to say, for instance the "%I64d" entry in the table is
associated with "int64", whereas an expression like sizeof
(int64) won't compile where that type doesn't exist.
(fmt_tab): Replace sizes with type names. Also fix an issue:
%llx was replicated in three rows of the table.
(detect_format_string): Determine the textual type of cnum. It
is a typedef for intptr_t, and the new INPTR_TYPE macro gives
the tokens that were used to typedef intptr_t. If
INTPTR_TYPE happens to be "longlong_t", we use LONGLONG_TYPE
in its place. Then using the determined type, we can search
the table for an appropriate entry: one which matches the type
and whose conversion specifier works. Also, we now test all
four conversion specifiers rather than assuming that if the
decimal one is okay, the others work. Plus, if a working
format string is not found, we now abort.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
| |
* configure: move the section of the script which
produces ./reconfigure after the help processing.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: cosmetics: change HAVE_SYS_SELECT to HAVE_SELECT,
and log that the function rather than the header is being
detected.
* socket.c (fd_timeout): New function, implemented using
poll or select.
(to_connect): select logic replaced with fd_timeout. Bug
fixed: connect requires polling for writability, not
readability. If poll and select are not available,
ignore timeout argument.
(sock_accept): Use fd_timeout; fall back on non-timed-out
accept if poll or select not available.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: the golden trick is simply to test
whether PS4 contains "+ ". PS2 is not a useful variable,
because even crappy old 1980's vintage System V shells
set that up. It turns out that Zsh in POSIX mode (when run as
/bin/sh) handles configuring and building TXR just fine.
And Zsh does set PS4 to "+ " in that mode. However, it
does not set PS2, unless run interactively. When run
interactively as /bin/sh, Zsh sets PS2 to "> ".
So, let us drop the Bash variable tests, and the test
for PS2 being "> " and only test PS4.
|
|
|
|
|
| |
* configure: everything works fine with ksh93, so let's add
ksh to list of shell to look for.
|
|
|
|
|
|
|
| |
* configure: There is a clue in the PS2 and PS4 variables.
If these are present and have the values "> " and "+ "
the shell could be Dash or newer NetBSD Ash, which
got PS4 circa 2004. The Solaris XPG shell also has these.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: If we determine we are running on Bash, then do
not re-execute. If re-executing, then look for CONFIG_SHELL
first, which is an Autoconf convention that some distros rely
on. Include dash in the fallback shell list because dash works
fine. Include more places in which to look for bash and dash.
Uses of txr_shell must be quoted now because it could take on
the value of CONFIG_SHELL which we don't control.
Print a trace message about re-executing. Print the message
about which shell we are running on earlier, before
parsing the variables and printing the baner.
Since we might not re-execute any more, we might not know the
exact name of the shell we are running on. That is difficult
and hacky to obtain, so instead we print an alternative
message that we are running on the original shell.
(gen_config_make): Only generate the SHELL Makefile variable
if txr_shell is set. If whatever shell we were run with is
good enough for the configure script, it's good enough for
Makefile recipes. Likely, the configure script was executed
directly, so that /bin/sh is that default shell and that is
what GNU Make will use by default.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the eight and final round of an effort to enable
GCC's -Wextra option. The C++ compiler, with -Wextra,
doesn't like C's universal struct initializer { 0 },
individually complaining about all the remaining members
not being initialized. What works in C++ is the { }
initializer. Conditional definition to the rescue.
* lib.h (all_zero_init): New macro which expands to
{ } under C++, and { 0 } under C.
* lib.c (make_time_impl, epoch_tm, time_string_meth,
time_parse_meth): Use all_zero_init.
* parser.c (prime_parser): Likewise.
* socket.c (sock_mark_connected): Likewise.
* sysif.c (fcntl_wrap): Likewise.
* termios.c (encode_speeds, decode_speeds): Likewise.
* configure (diag_flags): Add -Wextra.
|
|
|
|
|
|
|
|
|
| |
* configure: When generating the assignment that stores the
value of the command line variable into the corresponding
shell variable, interpolate $val between single quotes in such
a way that single quotes occurring in $val are replaced by the
pattern '\''. Thus, variables may contain any character
whatsoever.
|
|
|
|
|
|
|
| |
* configure (cplusplus): New variable.
Check ccname and cc for signs of C++; if so, set the new
variable to 'y'. If the variable is set, then filter
C-specific options out of diag_flags.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
* protsym.c: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
| |
* configure (small_mem): New variable. Provide help text and
show default value of --small-mem option. Generate
CONFIG_SMALL_MEM in config.h.
* gc.c (HEAP_SIZE, CHECKOBJ_VEC_SIZE, MUTOBJ_VEC_SIZE,
FULL_GC_INTERVAL, FRESHOBJ_VEC_SIZE, DFL_MALLOC_DELTA_THRESH):
Define conservative values of these constants if
CONFIG_SMALL_MEM is in effect.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We revive the dead _wspawnvp code that was used on MinGW, a
platform that has not been supported for years, adapting it
for Cygwin.
* configure: Correct the _wspawnlp test; it should have been
testing for _wspawnvp function, which is what is is actually
used by the matching code. Moreover, the broken test was
calling _wspawnlp with _wspawnvp style arguments. Anyway, this
is moot because we will never detect this function in the
foreseeable future. More importantly, adding a test for
spawnvp, which exists on Cygwin.
* stream.c: Include the <process.h> header if HAVE_WSPAWN or
HAVE_SPAWN. This was missing before; how did the _wspawnvp
call ever compile?
(w_spawnvp): New static function.
(run): spawn version now calls either _wspawwnvp or w_spawnvp
if that is not available. We test for HAVE_WSPAWN or
HAVE_SPAWN first, before HAVE_FORK_STUFF, so that we use the
spawn function preferentially. On Cygwin, we have the fork
stuff.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The configure command line is now turned into an
executable script called reconfigure which can be invoked to
repeat the config.
* Makefile (distclean): Whether in a configured or state or
not, try to remove reconfigure. In the configured state, don't
remove config.log. (If distclean is invoked when not
configured, the config.* pattern will remove config.log).
* configure: rewrite the logic which turns the command line
into text. It is now robust against spaces, quotes and
meta-charaters. Moreover, the printed representation is chosen
according to good heuristics to minimize unnecessary quoting
and escaping. The config line is written into an executable
script called reconfigure. This is now done twice; it is done
immediately, so that we save the command line even if the
configure subsequently fails. A comment is added to
reconfigure indicating that configure didn't succeed. Then
after a successful run through the tests, we save it again,
without the cautionary comment. Help texts updated.
|
|
|
|
|
|
|
|
|
|
| |
* configure: New configure test for chown, fchown and lchown.
* sysif.c (get_fd): Define for HAVE_CHOWN also.
(do_chown, chown_wrap, lchown_wrap): New functions.
(sysif_init): chown and lchown intrinsics registered.
* txr.1: Documented.
|
|
|
|
|
|
|
| |
* configure: detect mkfifo.
(sysif_init): Register mkfifo intrinsic.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: Detect various functions for setting file
timestamps.
* sysif.c (get_fd): Define this function for use by utimes
also.
(timens, do_utimes): New static functions.
(wrap_utimes, wrap_lutimes): New static functions.
(sysif_init): Register utimes and lutimes intrinsics.
* txr.1: Documented.
|
|
|
|
|
|
|
|
|
| |
* configure: extend chmod detection to cover fchmod.
* sysif.c (get_fd): New static functions.
(chmod_wrap): Include fchmod wrapping for integer
or stream argument.
(sysif_init): Register fchmod intrinsic.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
| |
* configure: there is no need to 'rm -f conftest.yacc' before
requesting that target, because it's correctly marked as
a phony target. Even if a file by that name exists, make will
execute the rule.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Newer versions of Bison produce spurious warnings in Yacc mode
about %pure-parser being not POSIX conforming and also
deprecated. Plus some strange fluff about "fix-its" that can
be applied if option --update is specified.
Let's detect at configure time whether the Yacc program
being used is actually Bison 3.0 or greater, and if so, give
it some flags to shut up these warnings.
* Makefile (YACC_FLAGS): New variable, conditionally set
based on yacc_is_newer_bison, also new variable, that being
generated into config.make.
(y.tab.c): Invoke $(TXR_YACC) with $(YACC_FLAGS).
(conftest.yacc-version): New phony target for running Yacc
with --version, out of the configure script.
* configure (yacc_is_newer_bison): New variable.
(gen_config_make): Generate yacc_is_newer_bison
make variable. New test for whether Yacc is Bison.
If so, and the version is >= 3.0, sets the
yacc_is_newer_bison variable to y.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Newer versions of gcc add a lot of aggravating spewage to the
diagnostics, by including copies of the lines of code where
the error occurs followed by a line showing the error location
with a caret and some tilde underlining.
* configure: new test to see whether the compiler emits a
caret line for a program that has a syntax error (missing
closing brace). If so, we test whether the compiler accepts
the option -fno-diagnostics-show-caret, and if so, we add
that option to DIAG_FLAGS in config.make.
|
|
|
|
|
|
| |
* configure: add missing break statement into the loop that
determines the definition for FLO_MAX_DIG, so we don't add
multiple definitions. This reproduces on the Musl library.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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, 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, rand.c, rand.h, regex.c,
regex.h, share/txr/stdlib/asm.tl, share/txr/stdlib/awk.tl,
share/txr/stdlib/build.tl, share/txr/stdlib/cadr.tl,
share/txr/stdlib/compiler.tl, share/txr/stdlib/conv.tl,
share/txr/stdlib/debugger.tl, share/txr/stdlib/defset.tl,
share/txr/stdlib/doloop.tl, share/txr/stdlib/error.tl,
share/txr/stdlib/except.tl, share/txr/stdlib/ffi.tl,
share/txr/stdlib/getopts.tl, share/txr/stdlib/getput.tl,
share/txr/stdlib/hash.tl, share/txr/stdlib/ifa.tl,
share/txr/stdlib/keyparams.tl, share/txr/stdlib/op.tl,
share/txr/stdlib/package.tl, share/txr/stdlib/param.tl,
share/txr/stdlib/path-test.tl, share/txr/stdlib/place.tl,
share/txr/stdlib/pmac.tl, share/txr/stdlib/save-exe.tl,
share/txr/stdlib/socket.tl, share/txr/stdlib/stream-wrap.tl,
share/txr/stdlib/struct.tl, share/txr/stdlib/tagbody.tl,
share/txr/stdlib/termios.tl, share/txr/stdlib/trace.tl,
share/txr/stdlib/txr-case.tl, share/txr/stdlib/type.tl,
share/txr/stdlib/vm-param.tl,
share/txr/stdlib/with-resources.tl,
share/txr/stdlib/with-stream.tl, share/txr/stdlib/yield.tl,
signal.c, signal.h, socket.c, socket.h, stream.c, stream.h,
struct.c, struct.h, strudel.c, strudel.h, sysif.c, sysif.h,
syslog.c, syslog.h, termios.c, termios.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: Extended copyright notices
to 2020.
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
|
|
|
|
|
|
|
| |
* configure: the logic must be cumulative; the test for the code
generation flag (e.g. -fno-pie) needs to incorporate the previously
detected linker flag (e.g. -no-pie). On x86_64, -fno-pie by itself
without -no-pie fails with errors.
|
|
|
|
|
|
| |
* configure: don't fail with a "unbound variable $3" error
if make is not found; correctly print "missing" and
quit cleanly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On some GNU/Linux distributions, the compiler is configured
for PIE (position-independent executables).
This is horrible garbage which causes our "make tests" to run
more than 22% slower (e.g. 8.22 seconds versus 6.69) which is
unacceptable. Worse, this was implicated in a crash in TXR's
exception handling logic. The committed workaround for that
problem stays in place for users who want to build TXR in the
PIE style anyway.
* configure: detect which, if any, of the known gcc and clang
options are available for disabling PIE and add those to
opt_flags (which turns into OPT_FLAGS in config.make).
|
|
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
* protsym.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* arith.c (sinh_s, cosh_s, tanh_s, asinh_s, acosh_s, atanh_s):
New symbol variables.
(sinh, cosh, tanh, asinh, acosh, atanh): New static functions.
(sineh, cosih, tangh, asineh, acosih, atangh): New functions.
(arith_init): Register sinh, cosh, tanh, asinh, acosh and
atanh intrinsic functions, and initialize the new symbol
variables.
* configure: Detect availability of hyperbolic functions in
math library and defne HAVE_HYPERBOLICS as 1 in config.h
accordingly.
* lib.h (sineh, cosih, tangh, asineh, acosih, atangh):
Declared.
* txr.1: Documented new hyperbolic functions and their method
counterparts that a numeric struct can implement.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
* protsym.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure (have_sys_stat): New variable. Set to y when our
test detects <sys/stat.h>. New test added for the presence of
high resolution time stamps in struct stat. If we have these,
we #define HAVE_STAT_NSEC 1 in config.h.
* share/txr/stdlib/path-test.tl (path-newer): Compare
nanosecond parts of the modification time if the seconds are
equal, improving the resolution of the test.
* sysif.c (atime_nsec_s, mtime_nsec_s, ctime_nsec_s): New
symbol variables.
(stat_to_struct): If nanosecond resolution is available, set
the new nanosecond slots from the three tv_nsec fields in
struct stat. Otherwise, set the new slots to zero.
(sysif_init): Initialize the new symbol variables. Add the
three new slots to the stat struct.
* sysif.c (atime_nsec_s, mtime_nsec_s, ctime_nsec_s):
Declared.
* txr.1: Documented new atime-nsec, mtime-nsec and ctime-nsec
slots of stat structure. Added note to path-newer mentioning
high resolution support.
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
|
|
|
|
|
| |
* configure: remove stray exit statement added while debugging
memalign test on Solaris.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
* protsym.c: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes build problems on Mac OS and Solaris due
to the introduction of the use of memalign.
* configure: After detecting that __EXTENSIONS__ is
required on Solaris and adding that to lang_flags, we
must call gen_config_make so that it becomes available to
subsequent configure tests. On Solaris, memalign is just in
<stdlib.h>, so let's test for that first, then test for a
memalign in <malloc.h>, and in that case add HAVE_MALLOC_H
into config.h. Also, fixing two bugs here. Firstly, the
memalign test used inverted logic, causing HAVE_MEMALIGN
to be defined on platforms that don't have it. Secondly,
the dummy while loop that is just supposed to be a control
structure for forward breaks turned infinite due to a
missing break at the bottom.
* lib.c: if HAVE_MALLOC_H is defined and nonzero, then
include <malloc.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this commit, we ensure that objects in the heap are aligned
to at east eight byte boundaries (the minimum alignment from
most malloc implementations on 32 and 64 bit systems). If
possible, we align objects to a multiple of their size, sizeof
(obj_t), which is 16 bytes on 32 bit platforms and 32 bytes
on 64 bit platforms. We do this by making the object array the
first field of the heap structure, and by allocating it with
an aligned allocator function, if possible.
* configure: detect memory alignment function: either
memalign (preferred) or else posix_memalign (ugly duckling).
We conditionally add either HAVE_MEMALIGN or
HAVE_POSIX_MEMALIGN into config.h.
* gc.c (OBJ_ALIGN): New macro.
(struct heap, heap_t): Put the block member first, so objects
are aligned with the containing heap.
(in_heap): If the pointer is not aligned to a multiple of
OBJ_ALIGN, it can't be a heap object; return zero.
If allocations of the heap are aligned, then we don't need the
additional alignment check in the loop body; if the pointer
lands in the array, then the earlier OBJ_ALIGN check assures
us it must be aligned. If we have only malloc alignment, we
must do the check; the pointer could be to an address
divisible by 8 which is in the middle of an obj_t.
* lib.c: If HAVE_MEMALIGN is true, then include <malloc.h> so
we have it declared.
(memalign): If HAVE_POSIX_MEMALIGN is true,
this static function is defined; it's compatible with the
Glibc memalign. If HAVE_MEMALIGN and HAVE_POSIX_MEMALIGN are
false, then memalign is defined as a malloc wrapper which
doesn't align.
(chk_malloc_gc_more): Use memalign instead of malloc. If
aligned allocation is available, this will cause the heap to
be aligned to a multiple of the object size.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: In several config tests, test HAVE_SUPERLONG_T,
HAVE_LONGLONG_T and HAVE_SYS_WAIT with #if.
* lib.c: Test HAVE_GETENVIRONMENTSTRINGS with #if.
* lib.h: Test HAVE_DOUBLE_INTPTR_T with #if.
* mpi/mpi.c: Likewise.
* mpi/mpi.h: Likewise.
* socket.c: Test HAVE_GETADDRINFO with #if in three places.
* stream.c: Test HAVE_SYS_WAIT and HAVE_SOCKETS with #if.
|