Previously, an empty string as spidermonkeydir or luadir meant
that the LIBS and CFLAGS variables should be used unchanged. A few
commits ago however, the configure script was changed to require
test -f "$spidermonkeydir$spidermonkeyinclude/jsapi.h" and
test -f "$luadir/include/lua$suffix/lua.h" to succeed. These
commands interpret spidermonkeydir="" and luadir="" as the root
directory. This behaviour was inconsistent with the part that
decides whether to add the directory to *_LIBS and *_CFLAGS or not.
The inconsistency could be solved in two ways. Either (a) add an
exception so that the test -f is skipped if the variable is empty,
or (b) treat an empty string as the root directory throughout.
Because the Makefile of SpiderMonkey always installs to a subdirectory
of the specified include directory, and ELinks uses #include <jsapi.h>
without specifying that subdirectory in source code, it seems unlikely
that the SpiderMonkey header files would ever be in the default
include path. I am therefore implementing solution (b) here.
I suppose similar considerations apply to Lua but did not check that
carefully.
This change avoids linker warnings when building with Debian tcc
0.9.23-4 + patch from Debian bug 418360:
[LD] src/protocol/bittorrent/lib.o
bittorrent.o: 'BITTORRENT_NULL_ID' defined twice
common.o: 'BITTORRENT_NULL_ID' defined twice
connection.o: 'BITTORRENT_NULL_ID' defined twice
dialogs.o: 'BITTORRENT_NULL_ID' defined twice
peerconnect.o: 'BITTORRENT_NULL_ID' defined twice
peerwire.o: 'BITTORRENT_NULL_ID' defined twice
piececache.o: 'BITTORRENT_NULL_ID' defined twice
tracker.o: 'BITTORRENT_NULL_ID' defined twice
The SpiderMonkey support in ELinks now uses JS_GetReservedSlot,
which was added in SpiderMonkey 1.5 RC3a, released on 2001-05-11.
So ELinks no longer supports earlier versions of SpiderMonkey.
However, be careful not to claim that ELinks needs "SpiderMonkey
1.5 RC3a or later", because we haven't tested 1.5 RC3a.
(I guess we didn't test zlib 1.2.0.2 either... oh, well.)
I'm not sure if JS_GetReservedSlot exists in all versions of the SpiderMonkey.
IMHO the configure script should check for JS_GetReservedSlot.
The patch in the attachment.
The previous code cast the integer (long actually) to void * and gave
that to JS_SetPrivate. This did not work because JS_SetPrivate
expects pointers to be aligned and replaces the least significant bit
with a tag. By using JS_SetReservedSlot instead, we get control of
the jsval conversions and can store the integer properly.
Revert part of commit 7215c964e40afe953787d7831b04182fbaba4662,
"Use real types (enum connection_{state,priority})." of 2005-06-14.
connection.pri[] is indexed by enum connection_priority, but its
elements are merely reference counts; they are never assigned from
or compared to enum connection_priority. Defining the elements
as int will result in more readable output from GDB.
Noted in bug 920.
Revert 8f030fcb63, "Hack elinkskeys.5
with sed some more, to please ESR." I asked ESR on 2007-01-06 and
2007-06-09 whether the changes were OK, but he never answered. So I'm
reverting the changes until someone with troff knowledge reviews them.
Add ecmascript_interpreter.backend_nesting, increment it when
beginning to evaluate an expression, and decrement it when evaluation
finishes. Then assert that it is zero in ecmascript_put_interpreter.
This detects bug 957 and similar ones before they corrupt memory.
The history converted from CVS is not in repo.or.cz though, so keep
referring to pasky.or.cz for that. (We don't seem to use
"gitweb.elinks.cz", which is a DNS alias for pasky.or.cz.)
<paakku> Do you think we should maybe point people to gitweb at
repo.or.cz rather than pasky.or.cz?
<pasky> absolutely
<pasky> actually I thought we already are pointing people at
repo.or.cz
<pasky> at least there was some movement to do that already, I believe
:)
And reorder the characters in the string given to strcspn(), to match
their expected order in the URI. This is also how strcspn() is called
elsewhere in uri.c.
It was reported at elinks-dev on 2007-06-03 that Solaris 10 comes with
zlib 1.1.4, which does not include gzclearerr(), which ELinks nowadays
requires. It would be possible to rewrite the decompression support
to use deflate() directly and avoid stdio, in which case gzclearerr()
would not be needed. That will take some time however, so I'm not
attempting it for ELinks 0.12.0. Instead, I'm just disabling gzip
decompression entirely if zlib is too old.