Article View: demon.ip.developers
Article #1109Re: Building KA9Q
From: Graham E Kinns
Date: Fri, 22 Mar 1996 00:00
Date: Fri, 22 Mar 1996 00:00
77 lines
3794 bytes
3794 bytes
Chris Croughton <chris@keris.demon.co.uk> wrote:
>I've rebuilt KA9Q 2.16d, but all it does is clear the screen and then
>lock up (CTRL-ALT-DEL works, but nothing else). I rebuilt it using the
>makefile using BC++ 4.02 and maker
[snip]
I'm using v4.01+patches (which I think makes it 4.02). The problem is
the C++ exception handling code which is linked in whether you need it
or not (ever wondered why a Hello World was 40k ?). I believe v4.5x
gets round it with an alternate set of Dos libs without the exception
handlers and a 'smarter' tlink. See Borland's TechInfo ti1789 for
their explanation and fix, it's still not quite enough for KA9Q ...
To fix it:
In main.c add a dummy function to prevent the exception fns being
pulled in at link:
void _ExceptInit ( void )
{
}
(You could add an #if wrapper to check for __BORLANDC__ >= 0x0450 &&
<= 0x0452 - that is my best guess for the versions affected (I know
it looks like 4.5, what's 4.5x return, anybody ? ))
(That fix is needed for any Dos/C program compiled with BC4.0x, BTW)
The other problem is that the setjmp()/longjmp() functions, used to
task-switch, also reference exception related functions. The easiest
way round this is to link KA9Q with BC4\LIB\COMPAT\setjmp.obj (it's a
version without the exception calls, mentioned in BC4\DOC\compat.txt)
- the alternative is to add another 3 dummy functions for which I've
worked out the prototypes, if anyone's interested, but this would slow
things down.
That should give you a working KA9Q (if you ignore all the warnings, I
haven't found one that will cause any run-time problems). A word of
warning though, don't use the '!' shell-to-dos or whatever the z-modem
receive command is which executes things since both spawn() and
system() under BC4 reference a function that calls realloc() which
leads to a nasty crash since KA9Q doesn't implement realloc. There
is a realloc function commented out in alloc.c but I'm not sure I like
the look of it.
You don't actually need to compile around a third of the source files
to build the DIS version. I've come up with a replacement makefile
which works on a re-organised source tree to easily manage different
configs and can take advantage of some new features of the BC4 make
(multiple directories for source & targets) - it currently looks like:
src/ Source files
doc/ Text files
unused/ Unused source files
large/ One directory for each configuration
net.exe Large build net.exe target
config/ for large build config.h
obj/ *.obj
(I presume maker acts the same way, don't think I've ever used it, I
just use make with a swapfile set up - mail me if you want the
details, the manuals/text files are IMHO ambiguous/conflicting/wrong
as to what settings are required)
>Also, looking at the config files I notice that although SLIP is
>disabled the Van Jacobson TCP compression for SLIP is on. Is there some
>arcane reason for this?
I've checked this before myself, it doesn't make any difference if
SLIP is not defined.
Cheers,
Graham.
--
----[ Graham E. Kinns ]----==============----< GEKinns@IEE.Org >----
Technical Details
Message-ID:
<827513023snz.3994@grempc.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<827059610snz@keris.demon.co.uk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bb05,b0fe0d8715e0346a X-Google-Attributes: gid10bb05,public From: Graham E Kinns <Graham@grempc.demon.co.uk> Subject: Re: Building KA9Q Date: 1996/03/22 Message-ID: <827513023snz.3994@grempc.demon.co.uk> X-Deja-AN: 143871475 x-mail2news-path: grempc.demon.co.uk x-nntp-posting-host: grempc.demon.co.uk references: <827059610snz@keris.demon.co.uk> organization: Home, N Yorks, UK newsgroups: demon.ip.developers