home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / unix / msdos / 1161 next >
Encoding:
Internet Message Format  |  1993-01-28  |  3.0 KB

  1. Xref: sparky comp.unix.msdos:1161 comp.unix.questions:16014 alt.msdos.programmer:3267 comp.os.msdos.programmer:12509
  2. Newsgroups: comp.unix.msdos,comp.unix.questions,alt.msdos.programmer,comp.os.msdos.programmer
  3. Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!pacbell.com!decwrl!csus.edu!netcom.com!gurgle
  4. From: gurgle@netcom.com (Pete Gontier)
  5. Subject: SUMMARY: UNIX-style links under MS-DOS
  6. Message-ID: <1993Jan27.194149.26386@netcom.com>
  7. Followup-To: poster
  8. Keywords: link DOS unix
  9. Organization: cellular
  10. Date: Wed, 27 Jan 1993 19:41:49 GMT
  11. Lines: 58
  12.  
  13. I don't remember if I promised a summary, but I got such
  14. high-quality repsonses that I figured I owed one.
  15.  
  16. My problem was this: due to #include file directory search
  17. limitations of typical DOS C compilers (Borland, Microsoft), our
  18. highly hierarchical source structure was giving us fits. We were
  19. trying to specify too many directories for the compiler to search;
  20. the command line was full and the relevant environment variable(s)
  21. was (were) full.
  22.  
  23. I was hoping that someone had hacked DOS to support UNIX-style
  24. links. I could then create a directory and fill it with links to
  25. files deeply nested in our hierarchy. I could then instruct the
  26. compiler to look in only that one place for #include files.
  27.  
  28. It turns out that this is: 1) not necessary, 2) not possible. :-)
  29.  
  30. DOS apparently maintains in its directory a direct reference to a
  31. file's location on disk. (UNIX uses an indirect reference.) If one
  32. were to create a "link" under DOS, it would point to the right
  33. place on the disk only until the file were modified. DOS would
  34. dutifully update the file's "real" directory entry, and the link
  35. would get stale. The DOS tool CHKDSK would eventually complain and
  36. try to "fix" the link.
  37.  
  38. Another possibility I imagined might work would be to patch DOS
  39. with a TSR (terminate-and-stay-resident program). Several people
  40. wrote to tell me this would be compatibility hell, in terms of both
  41. other hacks and Windows, which doesn't necessarily go through
  42. official DOS file system channels when it wants to mess with the
  43. file system.
  44.  
  45. A good suggestion, put foward by several people, was to use the DOS
  46. SUBST or JOIN command in whatever way was appropriate. Apparently
  47. SUBST lets you assign a drive letter to an arbitrary directory,
  48. which means I could "alias" C:\FOO\BAR\BAZ\QUUX to Q:.
  49. Specifying Q: to the compiler would be a lot shorter than the
  50. pathname. Apparently JOIN is similar to UNIX mount.
  51.  
  52. Another good suggestion, put forward by several more people, was to
  53. create dummy header files in one directory. A file called "QUUX.H"
  54. might contain 
  55.  
  56.     #include "\FOO\BAR\BAZ\QUUX.H"
  57.  
  58. Several schemes were mentioned which allowed one to at least
  59. partially automate the creation of these dummy header files,
  60. inlcuding using the DIR /S command in various ways.
  61.  
  62. Thanks to all who responded.
  63.  
  64. P.S. Some people 1) suggested that the next version of DR DOS might
  65. support links. 2) told me that they were working on a relatively
  66. safe method for creating links under DOS. Keep your eyes and ears
  67. open for both.
  68.  
  69. -- 
  70.  Pete Gontier // EC Technology // gurgle@netcom.com
  71.