Mail Archives: djgpp/2000/01/06/15:42:51
On Thu, 6 Jan 2000, Eli Zaretskii wrote:
> Sure. Except that on Unix, GCC is generally not moved like that.
Not so in our environment. We have a fleet of few thousand machines
where users pick up tarballs and may install to specific directories
to maintain multiple version (eg., install to /usr/local/gcc-2.95.2
instead of build prefix, say /usr/local). I do agree that it's not
common in other environments.
>
> > 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.
Neat.
> DJGPP has a working "link" in the library (which simulates a hard link
> by copying). But "rename" will also work, of course.
That's why I want to get rid of renaming via (1) link old to new, and (2)
unlink old. It sounds like a good trick, until you run into systems where
hard links are not supported (doesn't work), or emulated by copying
(inefficient).
> 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
protoize reads files, so not an issue in this case.
Regards,
Mumit
- Raw text -