Date: Thu, 6 Jan 2000 12:03:13 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Mumit Khan cc: djgpp AT delorie DOT com Subject: Re: protoize for djgpp In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: dj-admin AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 5 Jan 2000, Mumit Khan wrote: > The SYSCALLs.c.X problem is the same on Unix, if you install it to a > directory other than build prefix, it won't find it without -B option. Sure. Except that on Unix, GCC is generally not moved like that. > I'm going eventually retrofit the "relative path" lookup to it, and > then it should be relocatable as well. DJGPP now has a feature to satisfy these needs: the special prefix "/dev/env/FOO" is transparently replaced at run time by the value of the environment variable FOO, just before the file name is passed to the OS. Since the DJGPP header files are at fixed places relative to the DJDIR variable, you simply need to compile with --prefix="/dev/env/DJDIR", it will work anywhere. > Will do, once I clean it up a bit. I still have to the usage of POSIX > "link" and use ANSI "rename" instead to save files under a different > name. DJGPP has a working "link" in the library (which simulates a hard link by copying). But "rename" will also work, of course. > I'm assuming the following work for DJGPP, which is necessary in getting > protoize to work: > > #ifdef O_BINARY > setmode (fd, O_BINARY) > #endif Yes. However, if FD can ever be stdin or stdout connected to the console device, please use this: #ifdef O_BINARY if (!isatty(fd))setmode (fd, O_BINARY); #endif Switching the console device to binary mode has several nasty side effects in DJGPP, and is almost never really necessary, unless you have an interactive program like Emacs or Less (which is what these side effects were designed for).