Mail Archives: djgpp-workers/1999/05/13/18:15:05
> The value of $HOSTNAME is a fallback, not an override. The code calls
> the network-aware function which returns whatever name you system has
> been configured to. This is what a Unix machine would do as well.
This seems reasonable on a re-think.
> There's no contradiction: $USER overrides the default "dosuser"
> exactly as $HOSTNAME overrides the default "pc". The difference is
> that in the case of gethostname there is a DOS function that returns
> the actual name of a machine, whereas there's no DOS function that
> returns the name of the user. So the call to Int 21h/AH=5Eh is *in
> addition* to the environment override.
The name returned is a LAN Manager name, which doesn't necessarily bear
any relation to the DNS name. From this point of view, it would be useful
to be able to override the host name. For instance, if one was using DJGPP
programs to call Win32 or other network-aware programs, there could be
problems. I guess by not having the same LAN Manager and DNS names, one is
asking for trouble.
I suppose if one was really concerned with this, one would just use
libsocket or equivalent.
[ BTW Eli, I'm on the workers list, so don't worry about cc'ing me. ]
- Raw text -