🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.unix.msdos
1 messages
1 total messages Started by Pete Gontier Wed, 27 Jan 1993 19:41
SUMMARY: UNIX-style links under MS-DOS
#565
Author: Pete Gontier
Date: Wed, 27 Jan 1993 19:41
58 lines
3069 bytes
I don't remember if I promised a summary, but I got such
high-quality repsonses that I figured I owed one.
 
My problem was this: due to #include file directory search
limitations of typical DOS C compilers (Borland, Microsoft), our
highly hierarchical source structure was giving us fits. We were
trying to specify too many directories for the compiler to search;
the command line was full and the relevant environment variable(s)
was (were) full.
 
I was hoping that someone had hacked DOS to support UNIX-style
links. I could then create a directory and fill it with links to
files deeply nested in our hierarchy. I could then instruct the
compiler to look in only that one place for #include files.
 
It turns out that this is: 1) not necessary, 2) not possible. :-)
 
DOS apparently maintains in its directory a direct reference to a
file's location on disk. (UNIX uses an indirect reference.) If one
were to create a "link" under DOS, it would point to the right
place on the disk only until the file were modified. DOS would
dutifully update the file's "real" directory entry, and the link
would get stale. The DOS tool CHKDSK would eventually complain and
try to "fix" the link.
 
Another possibility I imagined might work would be to patch DOS
with a TSR (terminate-and-stay-resident program). Several people
wrote to tell me this would be compatibility hell, in terms of both
other hacks and Windows, which doesn't necessarily go through
official DOS file system channels when it wants to mess with the
file system.
 
A good suggestion, put foward by several people, was to use the DOS
SUBST or JOIN command in whatever way was appropriate. Apparently
SUBST lets you assign a drive letter to an arbitrary directory,
which means I could "alias" C:\FOO\BAR\BAZ\QUUX to Q:.
Specifying Q: to the compiler would be a lot shorter than the
pathname. Apparently JOIN is similar to UNIX mount.
 
Another good suggestion, put forward by several more people, was to
create dummy header files in one directory. A file called "QUUX.H"
might contain 
 
	#include "\FOO\BAR\BAZ\QUUX.H"
 
Several schemes were mentioned which allowed one to at least
partially automate the creation of these dummy header files,
inlcuding using the DIR /S command in various ways.
 
Thanks to all who responded.
 
P.S. Some people 1) suggested that the next version of DR DOS might
support links. 2) told me that they were working on a relatively
safe method for creating links under DOS. Keep your eyes and ears
open for both.

-- 
 Pete Gontier // EC Technology // gurgle@netcom.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads