[comp.sys.amiga] Manx Aztec C under WorkBench release 1.2

vanam@pttesac.UUCP (Marnix van Ammers) (12/08/86)

I finally got my copy of release 1.2 .  I patched my Manx cc and make
with the little patch program posted a few months ago, but I still get
a fatal error "EXEC failure".  I am using version 3.20a of Aztec C.
The patch I got off the net is in the form of the following program:

main()
{
	int fd;

	fd = open("cc", 2);
	lseek(fd, 0xd51fL, 0);
	write(fd, "\xa8", 1);
	close(fd);

	fd = open("make", 2);
	lseek(fd, 0x1d37L, 0);
	write(fd, "\xa8", 1);
	lseek(fd, 0x2063L, 0);
	write(fd, "\xa8", 1);
	close(fd);
}

Can someone please post the correct patch?  (I haven't heard a word
from Manx since I sent in my registration card back in June).  If the
patch is correct and has worked for others, any hints as to what I
might have done or am doing wrong would be appreciated.  Thanks.

Marnix (is not Unix)
-- 
Marnix A.  van\ Ammers		Work: (415) 545-8334
Home: (707) 644-9781		CEO: MAVANAMMERS:UNIX
{ihnp4|ptsfa}!pttesac!vanam	CIS: 70027,70

vanam@pttesac.UUCP (Marnix van Ammers) (12/14/86)

I previously posted an article asking about the Manx patch for
cc and make for WB 1.2 .  I reported that I had done the patches,
but that I still got "error EXEC failure" (or something close to
that).

Well the trouble was that my "cc" and "make" were not in c: .  I had
my c: assigned to df0:c .  My "cc" and "make" were in df0:c2 .  My
PATH knew about df0:c2, but "make" and "cc" didn't, they were still
using only c: .

This may have been posted before I had 1.2 and I may have ignored
it.  When I got 1.2 all I could remember to do was to get the Manx
patch and apply it.  It wasn't until today that I saw that I also
had to make sure that cc, as, and ln were in c: , even if they were
in my PATH.

In summary, if you have troubles with "exec" after going to WB 1.2,
you might see if the program in question knows about PATH or if it
only knows about c: .

Marnix
-- 
Marnix (ain't unix!) A.  van\ Ammers	Work: (415) 545-8334
Home: (707) 644-9781			CEO: MAVANAMMERS:UNIX
UUCP: {ihnp4|ptsfa}!pttesac!vanam	CIS: 70027,70

phils@tekigm.UUCP (Phil Staub) (12/16/86)

<><><><><><><><><><><><><><><>

Latest update on what I've found out about the patches to 3.20a.

It appears that 3 routines actually are affected by the changes from WB
1.1 to 1.2:

	fexcev.c
	execv.c
	execvp.c

In all cases, the code which is generated is a sequence of 

D6BC 0000 01AC (disassembled, this is "ADD.L #000001AC,D3")

which needs to be converted to 

D6BC 0000 01A8 (disassembled, this is "ADD.L #000001A8,D3")

If you have the library sources, the responsible code is generated by a
really gory looking piece of code which begins with a string of (long *)
casts and ends with the value '107'. (Do a grep on sysio.arc and you should
find three such offending lines).

Make apparently uses two of the above three routines, hence there are two
addresses to patch in the patch program posted to the net.

Now, regarding a problem I was having with the makefile for Egad. I
was attempting to get EGad compiled, and make crashed the machine. 
Being naive enough not to believe that Manx would ship with that kind of an 
obvious flaw in "make", I did some experimenting. What I found was truly 
enlightening.

One of the makefile targets is a pre-compiled symbol table file generated by
running cc with the +h switch on a .h file which contains all of the include
files ever requested by any of the other modules. The command line looked
like this:

gt.dmp:
	cc +hgt.dmp -a +D +l head.h

where head.h contained a #include line for each include file used.

Typing "make gt.dmp" caused the Amiga to hang when everything was complete.
So I got rid of a few options. First the -a. Still crashed. Then the +D and 
+l. Still no luck. So I edited head.h and got rid of all but one include, 
in the event that the problem was being caused by something in one of the 
include files. Nope. Then I changed the name of head.h to head.c, updated the 
Makefile, and re-ran it. Eureka! apparently, the .h extension was somehow 
crashing make! 

I don't know if this will do anyone any good, but I thought I'd pass it 
along, for what it's worth.



-------------------------------------------------------------------------------
Phil Staub              tektronix!tekigm!phils    (206) 253-5634
Tektronix, Inc., ISI Engineering
P.O.Box 3500, M/S C1-904, Vancouver, Washington  98668
-- 
-------------------------------------------------------------------------------
Phil Staub              tektronix!tekigm!phils    (206) 253-5634
Tektronix, Inc., ISI Engineering
P.O.Box 3500, M/S C1-904, Vancouver, Washington  98668