| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
* configure (have_git): Don't set this variable if
the TXR repository is missing, even if git is installed.
I.e. have_git means have have the tool and the repo.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (EXTRA_OBJS-y): New variable.
(WINDRES): New recipe.
* configure: Check for presence of windres,
and generate add_win_res variable in config.make.
* win/txr.xcf: New file: GIMP project for icon.
* win/txr.ico: New file: icon with three sizes generated
from GIMP project.
* win/txr.rc: New file.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aligned, affecting OS X port.
* configure: Detect a SIZEOF_WCHAR_T when detecting integer
type that will hold a pointer. In the lit_align test,
if we are on Apple Mac OSX, use a lit_align of 2,
so the logic kicks in for padding literals and handling
misalignment.
* lib.h (litptr): Add a case for LIT_ALIGN < 4 and
SIZEOF_WCHAR_T == 4. In this case we do the arithmetic
on the pointer using short *, and then convert to
wchar_t.
* HACKING: New section 2.4.3 about new wchar_t hack.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(glob_wrap, glob_init): New functions.
(errfunc_thunk): New static function.
* glob.h: New file.
* txr.c (main): call glob_init if HAVE_GLOB is defined.
* configure (have_glob): New variable.
(gen_config_make): Add have_glob to config/config.make.
Detect glob function and set have_glob, and add
HAVE_GLOB to config/config.h.
* Makefile (OBJS): Include glob.h if have_glob is "y".
* genvim.txr: Scan glob.c for functions and variables also.
* txr.1: Documented glob and glob-related variables.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
then that header is used when building in a separate directory,
instead of the config.h generated in that directory.
To fix this, we move config.h into a config/ subdirectory.
The $(top_srcdir)/config is not in the include search path
when buiding in a separate build directory.
While we are at it, let's move all the configure materials
generated by the configure script into config/.
* Makefile: include config/config.make at the top. Removing the
rule which asserts the existence of configuration based on
the presence of config.make.
(CFLAGS): Add $(conf_dir) to include search path with -iquote.
(notconfigured): New conditionally-defined target for producing
the error message when the build system is not configured.
(NL, DEP): New variables.
($(OBJS)): Make dependent on config/config.make and config/config.h
with help of DEP macro.
(opt/lex.yy.o, dbg/lex.yy.o): Express dependency using DEP.
(y.tab.h): Split off as a dependent on y.tab.c rather than
a co-target in the rule. The rule has a body to handle
the situation when y.tab.h is missing for some reason, but
y.tab.c already exists (and so won't be re-made, and so
y.tab.h won't be remade).
* configure: Require GNU Make 3.81 rather than 3.80.
(conf_dir): New variable.
(config_h, config_make, config_log): New variables. These are used in
place of config.h, config.make and config.log. Add conf_dir to
config.make variable.
|
| |
|
|
|
|
|
| |
* Makefile (SRCS): Only set if git is available.
(enforce): Fail if we don't have git.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (TESTS_OUT): We don't need to refer to top_srcdir.
Add the tst/ prefix to .out paths. Find must be used with -H
because tests is a symlink for out-of-tree build directories.
(tests/*): All target-specific assignments are moved to tst/tests/*
paths, and top_srcdir is no longer used in the right hand side
values.
(%.out): Becomes (tst/%.out).
(%.ok): need to compute .expected name from .out differently to
account for tst/ prefix.
(tests.clean): Just remove the tst directory.
(install-tests): Remove the tst directory first so test commands
are forced to run (though it is a dry run).
We no longer need to switch to top_srcdir to find the .txr
files, nor do we have to filter out .out files from the tests
tree. We no longer have to switch to top_srcdir in the recursive
make. Also, show the installation of tests using ABBREV3.
* configure: When configuring in a separate directory, symlink
the tests directory back to the source tree. Since there
are now three things being symlinked, rewrote that as a loop.
The recommendation to build in a separate directory is just a note, not
a warning.
|
|
|
|
|
|
|
|
|
| |
* Makefile (PROG): Variable removed, now set in config.make.
(all): Target now depends on $(BUILD_TARGETS) variable, set
in config.make.
* configure (debug_also) New variable.
(gen_config_make): Generate PROG and BUILD_TARGETS variables.
|
|
|
|
|
| |
symbolically linked. Without this, tests which require txr to have
access to its library do not work.
|
|
|
|
|
|
|
|
|
|
|
|
| |
only causes build issues on some systems where it is not provided
in the standard location, or is not cross-compiled properly.
* Makefile (LEXLIB): Reference to variable removed.
* configure (lexlib): Variable removed.
(LEXLIB): config.make variable not generated.
* parser.l (yywrap): Provide this trivial function as inline.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to C++ style casts when compiling as C++.
* lib.h (strip_qual, convert, coerce): New casting macros.
(TAG_MASK, tag, type, wli_noex, auto_str, static_str,
litptr, num_fast, chr, lit_noex, nil, nao): Use cast macros.
* arith.c (mul, isqrt_fixnum, bit): Use cast macros.
* configure (INT_PTR_MAX): Define using cast macro.
* debug.c (debug_init): Use cast macro.
* eval.c (do_eval, expand_macro, reg_op, reg_mac, eval_init):
Use cast macros.
* filter.c (filter_init): Use cast macro.
* gc.c (more, mark_obj, in_heap, mark, sweep_one, unmark): Use
cast macros.
* hash.c (hash_double, equal_hash, eql_hash, hash_equal_op,
hash_hash_op, hash_print_op, hash_mark, make_hash, make_similar_hash,
copy_hash, gethash_c, gethash, gethash_f, gethash_n, remhash,
hash_count, get_hash_userdata, set_hash_userdata, hash_iter_destroy,
hash_iter_mark, hash_begin, hash_uni, hash_diff, hash_isec): Use
cast macros.
* lib.c (code2type, chk_malloc, chk_malloc_gc_more, chk_calloc,
chk_realloc, chk_strdup, num, c_num, string, mkstring, mkustring,
upcase_str, downcase_str, string_extend, sub_str, cat_str, trim_str,
c_chr, vector, vec_set_length, copy_vec, sub_vec, cat_vec,
cobj_print_op, obj_init): Likewise.
* match.c (do_match_line, hv_trampoline, match_files, dir_tables_init):
Likewise.
* parser.l (grammar): Likewise.
* parser.y (parse): Likewise.
* rand.c (make_state, make_random_state, random_fixnum, random):
Likewise.
* regex.c (CHAR_SET_L2_LO, CHAR_SET_L2_HI, CHAR_SET_L1_LO,
CHAR_SET_L1_HI, CHAR_SET_L0_LO, CHAR_SET_L0_HI, L0_full, L0_fill_range,
L1_full, L1_fill_range, L1_contains, L1_free, L2_full, L2_fill_range,
L2_contains, L2_free, L3_fill_range, L3_contains, L3_free,
char_set_create, char_set_cobj_destroy, nfa_state_accept,
nfa_state_empty, nfa_state_single, nfa_state_wild, nfa_state_set,
|
|
|
|
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version.
* share/txr/stdlib/ver.txr: Likewise
* Makefile: Improve binary packaging rules.
* regex.c: #include <stdarg.h> added.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* configure: Add test for getppid.
* eval.c (getppid_wrap, eval_init): use HAVE_GETPPID
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Added check for setitimer/getitimer which also
checks for <sys/time.h>.
* signal.c (sig_init): Register itimer-real, itimer-virtual,
itimer-prof variables and getitimer and setitimer functions.
(tv_to_usec): New static function.
(getitimer_wrap, setitimer_wrap): New functions.
* signal.h (getitimer_wrap, setitimer_wrap): Declared.
* txr.1: Documented itimers.
|
|
|
|
|
|
|
|
| |
debug.h, eval.c, eval.h, filter.c, filter.h, gc.c, gc.h, hash.c,
hash.h, lib.c, lib.h, match.c, match.h, parser.h, parser.l, parser.y,
rand.c, rand.h, regex.c, regex.h, signal.c, signal.h, stream.c,
stream.h, syslog.c, syslog.h, txr.c, txr.h, unwind.c, unwind.h,
utf8.c, utf8.h: Synchronize license header with LICENSE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
executable, whether this is due to being required to use C99.
For instance, the Solaris environment requires compilation
using the C99 dialect if _XOPEN_SOURCE is set to 600 or higher.
* debug.c: When compiling as C99, we have to obey the special
C99 conventions for instantiating inline functions.
* hash.c: Likewise.
* lib.c: Likewise.
* parser.y: Likewise.
* unwind.c: Likewise.
|
|
|
|
|
|
|
|
| |
* configure, txr.1: Bumped version.
* share/txr/stdlib/ver.txr: Likewise
* arith.c (log2): Change to static.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
library so we can test for math functions.
* arith.c (log2_init): New static function.
(log2, logtwo): New functions.
(l2): New static variable.
(arith_init): Call log2_init.
* configure (lang_flags): Switching _XOPEN_SOURCE
from 500 to 600 to reveal log2.
Adding test for log2.
* eval.c (eval_init): Register log2 intrinsic.
* lib.h (logtwo): Declared.
* txr.1: Documented log2.
|
|
|
|
|
|
|
|
| |
* RELNOTES: Updated.
* configure, txr.1: Bumped version.
* share/txr/stdlib/ver.txr: Likewise
|
| |
|
|
|
|
| |
* configure: set up EXE variable in config.make, not exe.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
line.
(PREINSTALL): New variable holding a step for the install recipe.
(pax tar zip): New targets.
* configure (txr_ver): Version now added to config.make, passed
through to txr.c.
(gen_config_make): bindir, datadir and mandir are established
using gmake's regular macro assignment (=) rather than
expanding assignment (:=). This allows us to override the
prefix variable after configure time.
* lib.h (wli_noex): New macro.
(wli): Retarget to wli_noex, so that argument is subject
to macro replacement.
* txr.c (version): Use TXR_VER defined on compiler command line,
rather than hard-coded string literal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Makefile (PROG): Removing ./ prefix from variable name; adding it
to invocations of $(PROG) in some rules.
(txr.o): Pass several strings as macros on the command line:
TXR_REL_PATH, EXE_SUFF and PROG_NAME.
* configure (bindir, datadir, mandir): These variables become
just relative paths from the prefix.
* txr.c (sysroot): Use the TXR_REL_PATH, EXE_SUFF and PROG_NAME
preprocessor symbols defined on the command line to avoid
hard-coding strings like "bin/txr" and "bin/txr.exe" which
actually should reflect the value of the bindir variable.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
from lang_flags. Adding a test for determining
which flag reveals BSD functions. This is due to the
braindamaged way feature selection macros work on
FreeBSD. There is no way to say "give me only the
functions from a certain version of the Unix spec,
plus traditional BSD functions", so we have to resort to
using the internal symbol __BSD_VISIBLE. Also, changing
the detection test for daemon function to the
pointer-based approach.
|
|
|
|
| |
This is subsumed by -D_XOPEN_SOURCE=500.
|
| |
|
|
|
|
|
|
|
|
|
| |
* configure: Use pointer-based test for timegm, because
-Werror=implicit-function-declaration does not work in the
gcc 4.2 used on FreeBSD 9.
* parser.l: Check for Flex 2.5.9 and earlier which don't
have yylex_destroy. Thanks to Marcus Breiing.
|
|
|
|
|
|
|
|
|
| |
/usr/bin/xpg4/sh shell. Solaris' /bin/sh does not like test
-e. Adding break to the new shell existence testing loop so we
use the first shell in the list. Solaris wants _XOPEN_SOURCE=500
to reveal certain functions. Fix breakage in the make utility
detection, and also use the $make variable everywhere instead
of make.
|
|
|
|
|
|
|
| |
We boostrap using #!/bin/sh, but try to detect a better shell
and re-execute the script with that shell. Furthermore, we now
set up the SHELL variable in config.make, so that make uses that
shell for executing build recipes.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
* stream.c (run): Implement using _wspawnvp on MinGW.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
segmentation fault that occurs when running out of stack space,
and escape by throwing an exception.
Also, bugfix: save and restore the gc enable/disable state. Without
this, if we are ever running cod in a gc disabled state and it jumps
out, gc stays disabled.
* configure: added check for sigaltstack.
* gc.h (gc_enabled): Declaration added for existing variable.
* signal.c (is_cpu_exception): New static function.
(sig_handler): For cpu_exception type signals that pertain
to the execution of some instruction, turn on async_sig_enabled,
so that the signal is not deferred. Otherwise we will just
return without calling the user-defined handler, restart
the instruction and get into a loop. Also, disable gc around
the handler just in case. One issue is that we might be on
an alternate stack, which gc won't like.
(setup_alt_stack, teardown_alt_stack): New static functions.
(set_sig_handler): If we have sigaltstack, and are asked
to set up a SEGV handler, then set it up on the alternate
stack.
* signal.h (extended_jmp_buf): Adding new member, gc.
(extended_setjmp, extended_longjmp): use gc member
to save and restore the gc_enable state across
setjmp and longjmp.
|
|
|
|
|
|
|
|
|
|
|
| |
* stream.c (open_process): Fixed off-by one erroneous value of nargs,
causing memory leak of one string. Fixed memory leak on fork failure.
Fixed a deadlock that can occur in the pipe close function when
multiple pipes are in existence. This is fixed by setting the
FD_CLOEXEC flag on the pipe file descriptor. Without this, one child
process can hold another's pipe open, causing that other one not to
terminate when we're trying to shut it down, resulting in that child
blocked on a write, while we block on waitpid.
|