Mail Archives: djgpp-workers/1996/08/08/02:59:01
>
> On Wed, 7 Aug 1996, Tom Demmer wrote:
>
> > I had a little spare time the last days and wondered how much work it
> > might be to teach djgpp a bit UNC. Surprinsingly it was pretty easy,
> > a bit hacking in fixpath(), a bit in stat() and a lot of things seem
> > to work out fine. At least with Novell VLMs.
>
> Are you sure this will work on other redirectors? What about
> `_put_path'? AFAIK, it weeds out multiple slashes, and it might
> therefore convert "//machine/vol/dir" into "/machine/vol/dir". So if
> some application runs "\\machine\vol\dir" through the usual loop of
> converting the slashes, they will be in trouble, right? And `stat' is
> quite entrenched in assuming it isn't called with a UNC; are you sure you
> looked at the latest sources of `stat' (in the alpha 960725 snapshot)?
It is the one you sent me that corrects the NETX Bug for
stat("i:/subdir/."); Where can I find these alpha sources?
The rule for having (or recognizing) a UNC is that it _MUST_ start
with two backslashes. This complies with the samba deamon on Linux.
DOS does not recognize "//machine/vol/dir", but it recognizes
"\\machine/vol/dir" and "\\machine/vol\dir/subdir\subdir"
DOS itself seems to be pretty flexible, most things are broken by
command.com.
For the other redirectos: This is quite easy to check, I guess if
_truename("[NetDrv_Letter]:") returns a UNC, it should work. But I
do not have more redirectors here right now. But I am setting up a
samba deamon for NetBIOS on another network, so I'll be able to
check that soon.
I tested this stuff so far with NetWare VLM and XFS, both work fine.
Netware drives can be accessed with UNCs, XFS drives cannot, but
_truename("e:bin") just returns "e:\bin". stat() still recognizes
that e: is not a local drive and invents inodes.
What i have not yet tried is system("\\\\machine/vol/dir/prog") and
the spawn* and exec* calls.
One more thing to consider is splitpath(). I think it is a good idea
to put the machine name into the drive slot, but for that I need to
know the maximum allowed length for the name. Some nice guy on the
german novell list will know that for sure.
>
> > Do you think this is
> > something to incorporate into the next release? It would ease the
> > pains of a poor beaten NetWare administrator when he can forget about
> > things like ``drive mapping'' and such.
>
> I'm not sure, but if it doesn't break other things, I don't mind.
Not breaking other things has highest priority.
> Why won't you ask djgpp-workers and see what other people think?
They'll get a copy of this.
> The issue of forward and backslashes in a UNC should be resolved
> for this to work, IMHO.
Sure.
Ciao
Tom
******************************************************************
* Thomas Demmer * Phone : +49 234 700 6434 *
* Universitaetsstr. 150 * Fax : +49 234 709 4162 *
* Lehrstuhl fuer Stroemungsmechanik * Fax/Voice Box: *
* D-44780 Bochum * +49 2561 91371 2056 *
******************************************************************
* Email: demmer AT LStM DOT Ruhr-Uni-Bochum DOT De *
* WWW: http://www.lstm.ruhr-uni-bochum.de/~demmer *
******************************************************************
Muysenberg's Law: There's an easier way to do anything.
- Raw text -