| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our build system lumps all linker options together. The
correct way is that linker flags are separated info flags and
libs. Also, we respond to the LDFLAGS variable but ignore
LDLIBS which is incorrect. Other issues are fixed.
All that is fixed here.
* Makefile (TXR_CFLAGS): Interpolate $(CFLAGS) last, so that
options coming from CFLAGS can override previous options.
(TXR_LDFLAGS): Interpolate $(LDFLAGS) last; same reason.
(TXR_LDLIBS): New variable.
(LINK_PROG): Put $(TXR_LDFLAGS) with the options, before
the -o, and put $(TXR_LDLIBS) at the end.
* configure (conf_ldlibs, platform_ldlibs): New variables.
(usage text): Document platform-ldlibs and adjust
documentation of platform-ldflags.
(gen_config_make): Generate PLATFORM_LDLIBS and CONF_LDLIBS
now needed by Makefile.
(mainline): Adjusts various recipes to use conf_ldlibs
instead of conf_ldflags, or in some cases both.
In the case of libffi where we use pkg-config, we use the
special pgk-config options to separately extract the
flags and libs. We use EXTRA_LDLIBS instead of EXTRA_LDFLAGS
in some conftest invocations, as necessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* METALICENSE: 2020 copyrights bumped to 2021. Added note
about SHA-256 routines from Colin Percival.
* LICENSE, LICENSE-CYG, 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, 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/copy-file.tl, share/txr/stdlib/debugger.tl,
share/txr/stdlib/defset.tl, share/txr/stdlib/doloop.tl,
share/txr/stdlib/each-prod.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/quips.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, 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 2021.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems that the Brew people are running into a problem. The
configure test is detecting that "inline" can be used for
declaring inline functions, but then some functions are not
inlined, requiring an external definition.
On GNU/Linuxes, we detect "static inline", so this doesn't
reproduce.
This is likely triggered by the recent change to compile as
C99 (unless configuring in maintainer mode).
* configure: Let's revise the set of possible definitions of
INLINE that we try. Firstly, we only try "inline" if we are
compiling as C++. If that fails, all the other forms of inline
we try include "static". Let's not mess with anything involving
"extern". Like a bare "inline", it might work in the test
program but cause some sort of failure.
|
|
|
|
|
|
|
|
|
|
| |
* 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. Fixed repeated
word in documentation under env-hash.
* share/txr/stdlib/ver.tl: Bumped from incorrect 243
value to 245.
|
|
|
|
|
|
|
| |
* configure: Move how-to-disable-PIE check below plaform
detections, where we know whether we have Android or not. On
Android, we can't disable PIE; non-PIE executables are not
supported. Let's cross our fingers things work.
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (conftest.android): New helper target for testing
for Android toolchain, via presence of __ANDROID__
preprocessor symbol, similarly to how we detect Darwin.
* configure: New test for Android. This is mutually exclusive
agains Darwin. On Android, we add some necessary feature
selection macros to the compiler command line.
|
|
|
|
| |
* configure (need_darwin_c_source): Renamed to darwin_target.
|
|
|
|
|
|
|
|
| |
* configure (diag_flags): Remove the -Wold-style-declaration
option. It is not useful, unlike -Wold-style-definition;
it warns agains some unspecified old style usages, like
storage class specifiers not being first. Moreover, clang 10
does not recognize this option and complains.
|
|
|
|
|
|
|
|
|
|
|
| |
The code will continue to stick to C90, but requesting C90
compatibility from GCC may break for downstream users in some
environments that don't support C90 in their header files.
* configure (lang_flags): Remove -ansi option from here.
(usage): Help text for maintainer mode updated.
(mainline): Add -std=c++98 to the front of lang_flags if
compiling as C++, -std=c90 in maintainer mode, else -std=c99.
|
|
|
|
|
|
|
| |
* configure: When we detect we are using C++, we filter out
certain C-only compiler options. TO that list, we must add a
pattern that gets rid of the recently added
-Wold-style-definitions and -Wold-style-declarations.
|
|
|
|
|
|
|
|
|
|
| |
* configure: The new logic for detecting type sizes introduced
in October, replacing the old nm-based trick, doesn't work
with C++. An anonymous structure is being used to define an
object with linkage: we fix that by giving the structure a tag
name which be. C++ also doesn't like a one-character string
literal like "\n" being used to initialize a char [1] array,
so we make it [2].
|
|
|
|
|
|
| |
* configure (diag_flags): Add warning options agains defining
an old style C function, and against obsolecent features in
declarations.
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version and date.
* share/txr/stdlib/ver.tl: Likewise.
* txr.vim, tl.vim: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The trick of declaring static arrays whose size is the value
of an integer is not working with newer gcc 10 on Cygwin,
because that compiler is rearranging the order of the arrays
and adding padding. Basically, the writing on the wall is that
this is not a good approach.
I'm switching to a different approach. By initializing a
suitable C structure (which contains character arrays) in a
particular way, we can create a .o file in which a shell
script is embedded. We can pull out the shell script and
evaluate it to get the sizes of types.
* Makefile (conftest.syms): Rule removed.
(conftest.clean): Don't remove conftest.syms.
* configure (conftest_syms, read_syms): Functions removed.
(LANG, LC_ALL): New environment variables. This is needed
because we are using tr to process a binary file;
we can't have it trying to decode multi-byte characters.
(mainline): Use new trick for obtaining variables like
SIZEOF_INT.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure: Test for clock_gettime, generating
HAVE_CLOCK_GETTIME symbol in config.h.
* time.c (time_sec_nsec): New function.
(time_init): time-nsec intrinsic registered.
* time.h (time_sec_nsec): Declared.
* txr.1: Documented.
|
|
|
|
|
|
|
| |
* configure: When calculating the cmdline variable from the
positional parameters, there are more shell-special characters
that require quoting: parentheses, braces, redirection
operators, the semicolon and the hash comment.
|
|
|
|
|
|
|
|
|
| |
* Makefile (lex.yy.c): Move rule into maintainer conditional.
* configure: Describe maintainer variable in help text.
Move lex check into maintainer conditional.
* lex.yy.c.shipped: New file.
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (YACC_FLAGS): Removed. We don't need these because we
won't be trying to get newer Bison to behave like older Bison.
(y.tab.c): Drop reference to $(YACC_FLAGS).
* configure: Entire yacc-detecting section is conditional on
the maintainer Boolean variable. If the yacc program is
detected as Bison, check for version 2.5 and fail if not
found.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is now a ./configure --maintainer mode which establishes
a variable called maintainer in config.make, with a y value.
The initial use for maintainer mode will be that the Yacc
parser (the y.tab.c and y.tab.h) files will no longer be
regenerated whenever the parser.y file is newer.
In the following commit, I will add a generated parser.
* Makefile (y.tab.h, y.tab.c): These rules are now only
enabled in maintainer mode via an ifeq.
* configure (maintainer): New variable.
(gen_config_make): Generate maintainer make variable
definition in config.make.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|