www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/02/02/18:58:32

From: gpk AT physics DOT att DOT com
Date: Tue, 2 Feb 93 17:24:37 EST
Original-From: physics!gpk (Greg Kochanski)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Intercepting Open

>Stephen Turnbull Wrote:
>On the other hand, intercepting the calls only
>for automatically generated, read, and deleted (ie, temp) files is
>going to require exactly the kind of surgery on GCC that has already
>been discussed by Alan Eldridge among others.

Not necessarily.  It is messy, but you can do the following:

Intercept calls to creat(), hash names, and generate entries in a
	table (which must reside in a file) showing the translations.
Intercept open(), unlink(), and the like, and check for a translated name.
Then, all you have to do is put a small patch at the very end of
the gcc driver that calls a function (e.g. dos_cleanup()), that
takes all remaining files (temp files are gone by here) and renames
them to the best intelligible approximation to their real filenames.
Presumably on the output, there isn't any non-uniqueness in 8+3 chars.
The only problem would be non-unique input files (.h files, mostly).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019