Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!lll-crg!rutgers!husc6!necntc!ci-dandelion!ulowell!walton
From: walton@ametek.UUCP (Steve Walton)
Newsgroups: comp.sys.amiga
Subject: Patch for Aztec exec()
Message-ID: <852@ulowell.UUCP>
Date: Tue, 16-Dec-86 22:03:33 EST
Article-I.D.: ulowell.852
Posted: Tue Dec 16 22:03:33 1986
Date-Received: Thu, 18-Dec-86 00:19:16 EST
Sender: page@ulowell.UUCP
Lines: 38

After much pain and heartache, I have found a solution for all of you
Manx users who need exec() or fexec() under 1.2 but don't have any
updates.  Compile, link, and run the following program in a directory
which also contains a copy of the Version 3.20a c.lib and c32.lib.
It will patch the libraries so the exec() and fexec() functions work
under AmigaDOS 1.2 but NOT under 1.1.  By the way, a bug: fexecl() is
equivalent to execvp(), and does NOT return to the calling program.
Use fexecv() for that.
--------------cut here: compilers don't speak English------------
/*
 * Patch for Aztec C Version 3.20a c.lib and c32.lib to enable
 * exec() and fexec() to work under AmigaDOS 1.2.
 */
#include "fcntl.h"

main()
{
    int fd;
    fd = open("c.lib", O_RDWR);
    if (fd > 0) {
	lseek(fd, 0x303eL, 0);
	write(fd, "\xa8", 1);
	lseek(fd, 0x348aL, 0);
	write(fd, "\xa8", 1);
	close(fd);
    }
    fd = open("c32.lib", O_RDWR);
    if (fd > 0) {
	lseek(fd, 0x3176L, 0);
	write(fd, "\xa8", 1);
	lseek(fd, 0x35beL, 0);
	write(fd, "\xa8", 1);
	close(fd);
    }
}
------------------cut here too---------------------------------
That's it!  Use it in good health.
          --Steve Walton, somewhere in time